Stalled Macro

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

Moderator: MacroQuest Developers

pantaloonz
orc pawn
orc pawn
Posts: 22
Joined: Thu Aug 16, 2007 10:00 am

Stalled Macro

Post by pantaloonz » Tue Oct 09, 2007 2:20 pm

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
I newb, therefore I search

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 » Tue Oct 09, 2007 2:23 pm

Add teh /echo and tell us where it's stuck....

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Tue Oct 09, 2007 2:25 pm

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.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

pantaloonz
orc pawn
orc pawn
Posts: 22
Joined: Thu Aug 16, 2007 10:00 am

Post by pantaloonz » Tue Oct 09, 2007 2:44 pm

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
I newb, therefore I search

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Tue Oct 09, 2007 2:51 pm

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
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

pantaloonz
orc pawn
orc pawn
Posts: 22
Joined: Thu Aug 16, 2007 10:00 am

Post by pantaloonz » Tue Oct 09, 2007 4:21 pm

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.
I newb, therefore I search

Kroak
a grimling bloodguard
a grimling bloodguard
Posts: 1801
Joined: Thu Sep 15, 2005 4:10 am

Post by Kroak » Tue Oct 09, 2007 4:36 pm

Maybe this would help you.
http://www.macroquest2.com/wiki/index.p ... arestSpawn
If you add the right filters...

pantaloonz
orc pawn
orc pawn
Posts: 22
Joined: Thu Aug 16, 2007 10:00 am

Post by pantaloonz » Tue Oct 09, 2007 4:43 pm

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
I newb, therefore I search

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 10:29 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 10:30 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 11:07 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 11:08 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 11:10 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 11:11 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Stalled Macro

Post by xyilla » Tue Aug 19, 2025 11:48 am