Help with spell_routines.inc

Status
Not open for further replies.

Mattr33

Lifetimer
Joined
Apr 11, 2005
Messages
265
Reaction score
0
Points
0
I'm using spell_routines.inc and I want my macro to check for resists after the spell was cast and then retry a certain number of times.

The .inc file says:
/call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name] [Number of resist recasts]

So I see were to put it in my call. So I stick this in my macro:

/call cast snare gem1 7s 5

I then get an error saying there is no subroutine named 5 because the .inc file parses that command and sees 5 as the [custom subroutine name] not the [Number of resist recasts].

So short of throwing in a dummy sub that just returns once it is called, how can I do this?

Matt
 
Code:
Sub Cast(string spellName,string spellType,timer giveUpTimer,string mySub)

Is the only thing I'm seeing in my spell_routines.inc so I guess you have a custom version.

Either way just shift 'string mySub' to the right of the ResistCheck variable and the rest should fall into place making it work like

/call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [Number of resist recasts] [custom subroutine name]
 
Why not just use MQ2Cast? It already has this built in.
 
you can try something like this: edit as needed.

:castcheck
/call cast "Snare" gem7 3s

/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :castcheck
/if (${Macro.Return.Equal["CAST_RESISTED"]}) /goto :castcheck
 
thez said:
Why not just use MQ2Cast? It already has this built in.

Yep, just went and looked at the wiki.

-maxtries|<#>
Cast the spell this many times until successful.

Thanks Thez!

Matt
 
Status
Not open for further replies.