Events arent working

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

Moderator: MacroQuest Developers

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Events arent working

Post by MSMage » Sun Aug 03, 2003 4:12 pm

I have no idea if Im even on the right track here, but i could use some help. This is the first time ive tried to get anything more complex than a simple conjuration skill up macro.

Code: Select all

#turbo
#event Heal "Taunting attacker, Master."
#event Dead "You gain experience!!"
#event Death "You have entered Plane of Knowledge"
#event Burnout "Your pet's Burnout V spell has worn off."

Sub Main
	/goto :loophole
:loopey
	/press 2
	/delay 10
	/press 5
	/delay 600
	/call Main
:loophole
	/delay 100
	/target npc radius 80 zradius 10
	/if $target(class)==warrior {
/goto :loopey
} else {
/goto :loophole
}


Sub Event_Heal
	/goto :loopsave
:heal
	/delay 5
	/cast 3
	/delay 70
	/goto :loop2
:loopsave
	/delay 50
	/if $spawn($spawn($group(0),pet),hp,cur)>=80 {
/goto :loopsave
} else /if $spawn($spawn($group(0),pet),hp,cur)<=80 {
/goto :heal
}


	
Sub Event_Dead
	/delay 10
	/press 1
	/call Main

Sub Event_Death
	/delay 750
	/press 1
	/delay 15
	/camp desktop

Sub Event_Burnout
	/press 2
	/delay 10
	/cast 7
	/delay 60
	/press 1
	/call Main

Any help at all would be appreciated.
MSMage

chimaera
a lesser mummy
a lesser mummy
Posts: 37
Joined: Fri Aug 01, 2003 4:14 pm

Post by chimaera » Sun Aug 03, 2003 5:52 pm

I have the same problem with Events. They only fire when my macro goes into a sub ive called "Attack". If the macro is currently in the "Main" sub or any other sub really, the event does not fire.

They do however register as triggered, because for example.. i have an event thats called "Invite". It should autojoin a group whenever my char gets an invite to a group. It does not do this ... not until my macro goes into the Attack sub, does the event fire. At that point i /invite whatever i got on target, because ive already manually joined the group.

Any help with this would be appreciated.

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Something to try ...

Post by MacroFiend » Sun Aug 03, 2003 5:56 pm

Try throwing a /doevents in your main loop

chimaera
a lesser mummy
a lesser mummy
Posts: 37
Joined: Fri Aug 01, 2003 4:14 pm

Post by chimaera » Sun Aug 03, 2003 5:59 pm

Hm i think i found my problem already... the loop in the main sub did not include a /doevents. The /doevents was placed outside the loop and probably didnt kick in.

Perhaps your problem is the same as mine ?

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Sun Aug 03, 2003 11:44 pm

Thanks alot for the help :) This is basically what it looks like now. I had a problem with getting it to quit healing, but i fixed that by putting in a redirect to the mob death event when pet hit 100%.

Code: Select all

#turbo
#event Heal "Taunting attacker, Master."
#event Dead "You gain experience!!"
#event Death "You have entered Plane of Knowledge"
#event Burnout "Your pet's Burnout V spell has worn off."

Sub Main
	/doevents Death
	/doevents Burnout
	/doevents Heal
	/goto :loophole
:loopey
	/press 2
	/delay 10
	/press 5
	/delay 200
	/call Main
:loophole
	/delay 300
	/target npc radius 80 zradius 10
	/if $target(class)==warrior {
/goto :loopey
} else {
/goto :loophole
}


Sub Event_Heal
	/doevents Dead
	/goto :loopsave
:heal
	/delay 5
	/cast 3
	/delay 120
	/goto :loopsave
:loopsave
	/delay 75
	/if $spawn($spawn($group(0),pet),hp,cur)==100 {
/call Event_Dead
} else /if $spawn($spawn($group(0),pet),hp,cur)>=75 {
/goto :loopsave
} else /if $spawn($spawn($group(0),pet),hp,cur)<=75 {
/goto :heal
}

	
Sub Event_Dead
	/press esc
	/delay 70
	/press 1
	/call Main

Sub Event_Death
	/delay 750
	/press 1
	/delay 15
	/camp desktop

Sub Event_Burnout
	/press 2
	/delay 10
	/cast 7
	/delay 90
	/press 1
	/call Main

I still havent had the patience to test my burnout event, but im hoping it works. Ill try it out and tell ya how it does :)
MSMage

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Mon Aug 04, 2003 12:15 am

Tested my burnout event, and it doesnt seem to work, but thats ok, i just slipped in burnout after the mobs death, which is about the same place ill stick all my other buffs, since most are clicky anyway. I am having a problem with the "/call Main" in my Event_dead not working and i was wondering if anyone could explain why.

Code: Select all

#turbo
#event Heal "Taunting attacker, Master."
#event Dead "You gain experience!!"
#event Death "You have entered Plane of Knowledge"

Sub Main
	/doevents Death
	/doevents Heal
	/goto :loophole
:loopey
	/press 2
	/delay 10
	/press 5
	/delay 200
	/call Main
:loophole
	/delay 300
	/target npc radius 80 zradius 10
	/if $target(class)==warrior {
/goto :loopey
} else {
/goto :loophole
}


Sub Event_Heal
	/doevents Dead
	/press 6
	/goto :loopsave
:heal
	/delay 5
	/cast 3
	/delay 120
	/goto :loopsave
:loopsave
	/delay 75
	/if $spawn($spawn($group(0),pet),hp,cur)==100 {
/call Event_Dead
} else /if $spawn($spawn($group(0),pet),hp,cur)>=75 {
/goto :loopsave
} else /if $spawn($spawn($group(0),pet),hp,cur)<=75 {
/goto :heal
}

	
Sub Event_Dead
	/delay 10
	/cast 7	
	/press esc
	/delay 70
	/press 1
	/delay 10
	/call Main

Sub Event_Death
	/delay 750
	/press 1
	/delay 15
	/camp desktop
Thanks for any help you can give me :)
MSMage

chimaera
a lesser mummy
a lesser mummy
Posts: 37
Joined: Fri Aug 01, 2003 4:14 pm

Post by chimaera » Mon Aug 04, 2003 3:45 am

I dont think your supposed to /call Main. Use /return to return to the main sub instead.

But im a newb at this so dont take my word for it.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Aug 04, 2003 7:52 pm

Don't call main from main. You will eventually use up so many resources that you will disconnect.

Especially if you have a crappy machine, like me.