Problems with events and chat

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

bhaal
orc pawn
orc pawn
Posts: 17
Joined: Fri Oct 04, 2002 3:21 pm

Problems with events and chat

Post by bhaal » Sun Oct 13, 2002 7:11 pm

I am working on a macro and I am not having any luck getting events to fire off. Here is my seduo code:

Code: Select all

| - macro1.mac - 
| 
| Written by: Bhaal the Ranger
|
#include SpellSub.mac 
#event HitsYou "YOU for"

#chat tell


Sub Main
   .
   .
   .
/return


sub Event_HitsYou 
	/stand
	/if "$combat"=="TRUE" /goto :StillEngaged 
	/call TargetMobAndAttack
   :StillEngaged 
/return 


sub event_chat 
   /mqlog $p1 tells you: $p2
/return
Any suggestions would be appreciated.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Oct 13, 2002 7:15 pm

Salutations,
make sure you are calling /doevents in your code... this works for me...

Code: Select all

#event attackingme "YOU for "

sub main
 :loop
   /doevents
  /goto :loop
/return

sub event_attackingme
 /echo You where attacked you dum-dum!
 /endmacro
/return