help me fix this weird anomaly with this Cleric Rotation Mac

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

Moderator: MacroQuest Developers

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Wed Aug 13, 2003 6:26 pm

I had a macro i was editing a few weeks ago. It did the same thing as far as casting 2 times, but mine wouldnt work after that. I put a 5 second timer in just before the return. If the timer was not at 0 then the call would return.

something like this.

Code: Select all

#chat Chat 

|Assign names to variables 
#define ClericName v40 
#define TheString v41 
#define CastDelay v42 

Sub Main 
    |Set ClericName as parameter p0 from /macro chrot 
    /varset ClericName $p0 

    |Set the trigger string as p1 from /macro chrot 
     /varset TheString $p1 

    |Set the cast delay from /macro chrot 
    /varset CastDelay $p2 

    :MainLoop 
    /doevents chat 
    /goto :MainLoop 
/return 

Sub Event_Chat 
    |Does the Cleric announcing match the cleric you are waiting for 
    |This p1 is not the p1 from /macro chrot, its the parameter p1 from the event. 
 [b]    /if n $t50!=0 /return  [/b]
    /if "$p1"=="$ClericName" { 

        |Did the cleric announce the trigger string 
        /if "$arg(1,"$p2")"=="$TheString" { 

            |Initiate the delay then cast Complete Heal 
            /delay $CastDelay 
            /cast "Complete Heal" 
         [b]   /varset t50 5s  [/b]
        } 
    } 
/return