There's umm, quite a bit of excess code in here, but without nitpicking over style issues, there is one major problem for you to take a look at.
You initialize FollName with the target the character running the macro has at the time of it's execution (which may or may not be the person who says "Follow me bitches" in the secretroom.
More of an issue is that you have no main sub (which isn't required, but I'm not even sure what the behavior would be without it, presuming you have other subroutines). This is almost structured like an include file :). I'm guessing MQ2 is exeucting your Subfuction Followme as a main, and once it's executed, it will loop as long as you're in follow-mode (Following>0), but if the Endfollow event is triggered, the final "else" portion of your Followme sub will fire and cause it to reach the /return statement. At that point, your macro dies.
If I may suggest, try using a single #Chat event:
Code: Select all
Sub Event_Chat(ChatType, Sender, ChatText)
for your "Follow me bitches, and stop following me bitches" commands, and also us it to change the global follow state for your character(s).
I butchered yours a bit and wrote a new one. I haven't tested this, nor have I even tried to run it with MQ2 (there could be a syntax error in it, or possibly a logic problem).
Code: Select all
|Followme.inc
#Chat chat mysecretroom
Sub Main
/declare Following bool outer FALSE
:Loop
/doevents
/if (${Following}) {
/face fast
/if (${Target.Distance}>10) /keypress forward hold
/if (${Target.Distance}<9) /keypress forward
/if (!${Target.ID}) /varset Following FALSE
}
/goto :Loop
/return
Sub Event_Chat(ChatType, Sender, ChatText)
/if (${ChatText.Equal[Follow me bitches]}) {
/varset Following TRUE
/target ${Sender}
}
/if (${ChatText.Equal[Stop following me bitches]}) {
/varset Following FALSE
}
/return