why doesnt this parse?

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

why doesnt this parse?

Post by BadBoy » Sat Sep 25, 2004 12:59 pm

Code: Select all

#turbo

#Event Exp "You gain experience!!" 
#Event Exp "You gain party experience!!" 
#Event Exp "You gained raid experience!" 

Sub Main
/echo Started
:loop
/if ((${Target.Type.Equal[PC]} && ${Target.PctHPs}<=70) && ${Target.Distance}<=95) {
/delay 1s
/cast "Complete Healing"
/delay 1s
/cast "Complete Healing"
/delay 10s
/goto :loop
}
/notify TradeWnd TRDW_Trade_Button LeftMouseUp 
/goto :loop
/return

Sub Event_Exp 
/exp
/return 
This wont do the Event :( help please.

User avatar
Zornecro
a ghoul
a ghoul
Posts: 82
Joined: Sun Sep 19, 2004 10:19 pm
Location: El Paso, TX

Post by Zornecro » Sat Sep 25, 2004 1:06 pm

I believe events actually don't trigger like you'd expect happens in C++. Somewhere in your loop where you need events to be handled you have to add:

Code: Select all

/doevents
That is what is known as "cooperative" multi-tasking or event processing, aka the old Windows 3.x way of doing things when programs that had to play nice with others needed to call Yield().
- Zornecro Mancer, Retired EQ1 Veeshan
- Unktehila, Redtigre, Twinaxe, EQ2 Crushbone

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

Post by BadBoy » Sat Sep 25, 2004 1:09 pm

ahhhh, gotcha.

thanks. I will try it now.

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

Post by BadBoy » Sat Sep 25, 2004 1:10 pm

Works :D