Page 1 of 4

Stalled Macro

Posted: Tue Oct 09, 2007 2:20 pm
by pantaloonz
Greetings,

WIKI Edit: http://www.macroquest2.com/wiki/index.p ... e_Movement


My macro seems to just stall out sometimes until I move the mouse, but especially if I click either right or left, it picks right back up. It always stalls in the combat sub so I'm just submitting that and the main for suggestions why that's happening.

Code: Select all


#turbo 
#Include spell_routines.inc 


Sub Main
/declare brells timer outer 0
/declare vom timer outer 0
/declare divine timer outer 0
/declare session timer outer 0
/varset session 20000s


:mainloop
/if (!${session}) /call Endmacro
/if (!${brells}) /call Brells
/if (!${vom}) /call Vom
/if (!${divine}) /call Divine
/if (${Me.PctHPs}< 85) /call Healup
/if (${Me.PctMana}< 85) /call Medup
/sit off
/delay 5
/keypress f8
/if (${Target.ID} && ${Target.Type.NotEqual[PC]}) /call Combat
/goto :mainloop
/return

Sub Combat
/if (${Target.Type.Equal[PC]}) /keypress f8
/attack on
/call cast "stun"
/call cast "cease"
:combatloop
/face
/if (${Target.ID} && ${Target.Type.NotEqual[PC]}) /goto :combatloop
/return
thoughts?
maybe targetting a corpse? perhaps I'm smashed into wall?

Pantz

Posted: Tue Oct 09, 2007 2:23 pm
by dont_know_at_all
Add teh /echo and tell us where it's stuck....

Posted: Tue Oct 09, 2007 2:25 pm
by fearless

Code: Select all

:combatloop
/face
/if (${Target.ID} && ${Target.Type.NotEqual[PC]}) /goto :combatloop 
If I have a target and it is not a player, to the top of the loop.

Any target other then a pc qualifies, a corpse, a treasure box . . . anything. You should fix that logic and it should work better.

Posted: Tue Oct 09, 2007 2:44 pm
by pantaloonz
My Lord!

You guys are too fast, I'm happily pleased from the responses I've gotten back so far, I guess it really makes a difference to those who are trying their best to follow the rules.

As I'm updating the wiki; thinking to myself wow I have no friggen clue what I'm talking about, turns out the next thing I did while I was waiting for those responses was add a corpse check...

Anyway, I need to read up on how to use the /echo feature. I'll let you know if my corpse logic works here's what I added:

Code: Select all

Sub Combat
/if (${Target.Type.Equal[PC]} [b]|| ${Target.Type.Equal[Corpse]})[/b] /keypress f8
/attack on
/call cast "stun"
/call cast "cease"
:combatloop
/face
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && [b]${Target.Type.NotEqual[Corpse]})[/b] /goto :combatloop
/return

Posted: Tue Oct 09, 2007 2:51 pm
by fearless
That should work better. I am curious why you have a "/keypress f8" in there. Are you just trying to move to next target?
pantaloonz wrote:I guess it really makes a difference to those who are trying their best to follow the rules
exactly

Posted: Tue Oct 09, 2007 4:21 pm
by pantaloonz
Greetings,

That is exactly what I'm trying to do.

I recognize it's a very specific location macro because pressing F8 isn't going to give you good results if you happen to target a friendly!

I worry about using /tar npc name

will it choose the closest one like f8 does? I also find that if I use /target I'll get corpses.

Thanks,

OH! I see what you mean about the F8 question, I should probably just do the buffs/med check in main and then call combat. Or better yet call a pull sub...

Oh so much to learn.

Posted: Tue Oct 09, 2007 4:36 pm
by Kroak
Maybe this would help you.
http://www.macroquest2.com/wiki/index.p ... arestSpawn
If you add the right filters...

Posted: Tue Oct 09, 2007 4:43 pm
by pantaloonz
Yep,

that will help,

my MQ2 life just got a whole lot broader.....

Thanks,

I did manage to fix my issue,
I removed the excessive F8'ing, the combat sub handles targetting and does it with /target and not /keypress, much cleaner.

Thanks everyone. I'm archiving this one for now while I work on /doevents and reading on TLO's.

Thanks

Re: Stalled Macro

Posted: Tue Aug 19, 2025 10:29 am
by xyilla

Re: Stalled Macro

Posted: Tue Aug 19, 2025 10:30 am
by xyilla

Re: Stalled Macro

Posted: Tue Aug 19, 2025 11:07 am
by xyilla

Re: Stalled Macro

Posted: Tue Aug 19, 2025 11:08 am
by xyilla

Re: Stalled Macro

Posted: Tue Aug 19, 2025 11:10 am
by xyilla

Re: Stalled Macro

Posted: Tue Aug 19, 2025 11:11 am
by xyilla

Re: Stalled Macro

Posted: Tue Aug 19, 2025 11:48 am
by xyilla