spell_routines.inc ( updated: 11/07/2004 )

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Tue Jun 29, 2004 6:38 pm

ok added in quick fix for the auto-interrupt. just made it like the invis thing, if you dont want it to auto interrupt spells if a mob dies, just make sure to have this at the top of your macro:

Code: Select all

/declare noInterrupt int outer 1

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Tue Jun 29, 2004 6:42 pm

as for the other questions... yes i tried to make this as interchangeable with spellcast.inc as possible.

the main reason i made this in the first place was spellcast seemed to waste a lot of time just doing nothing, or waiting for a spell to pop or whatever. as i play a chanter as my main, timing is very very critical, so i wanted to cut as much wasted time as possible, and i feel i've done that with this code.

it's nice to see people are using it, and hope it helps them as much as it has helped me.

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Thu Jul 01, 2004 10:34 pm

thanks Rusty~, thats a perfect solution. Now my wiz macro has a couple lines added to my med sub routine that toggle the interrupt. works great.

Code: Select all

   /if (${Me.Mount.ID}) /varset noInterrupt 1
   /if (!${Me.Mount.ID}) /varset noInterrupt 0
This way my wiz uses interrupts if he is standing, but if mounted he doesn't... no more strafe movement to make him look funny, no more killing mount.

=)

Me.Name
a lesser mummy
a lesser mummy
Posts: 56
Joined: Thu Mar 11, 2004 11:49 pm
Location: ${Me.Bound}

Post by Me.Name » Fri Jul 02, 2004 12:33 am

fantum409 wrote:

Code: Select all

   /if (${Me.Mount.ID}) /varset noInterrupt 1
   /if (!${Me.Mount.ID}) /varset noInterrupt 0
I think this could be rewritten as:

Code: Select all

/varset noInterrupt ${if[${Me.Mount.ID},1,0]}
One less "if" comparison, correct?

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Fri Jul 02, 2004 3:21 am

or you can just do:

Code: Select all

/varset noInterrupt ${Me.Mount.ID}

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Tue Jul 06, 2004 12:55 am

fixed an error in the recent edition that would make you try to cast a spell that wasn't up yet if cast right after an item.

Hannibal
orc pawn
orc pawn
Posts: 19
Joined: Sat Jul 03, 2004 10:28 pm

Post by Hannibal » Fri Jul 09, 2004 11:15 am

Code: Select all

/call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name]
If I wish to use custom subroutine name, is it necessary to also use the item/alt/gem & give up time params also? Or can I just use:

/call Cast "${Complete Heal}" CheckHP

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Fri Jul 09, 2004 2:26 pm

yeah, as it is now, you have to include the other parameters if you want to use a custom sub. you can just specify default values though. for example:

Code: Select all

/call Cast "${Complete Heal}" gem1 0 CheckHP
also... if the spell is memmed in a different slot than gem1, it will still cast it, so don't worry. all that is there for is to tell it what slot to mem it in if it's not memed. if you don't want it to cast a spell if it's not memed, you can replace gem# with "spell"

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Fri Jul 16, 2004 10:46 am

The new /stopspellcast commad does not impose a recast time, not sure if it works while mounted though. Maybe this could be incorporated into spell_routines.inc?

A Troll
a lesser mummy
a lesser mummy
Posts: 30
Joined: Fri May 21, 2004 10:04 am

Post by A Troll » Fri Jul 23, 2004 4:59 pm

Is there a way to remove all the movement of your inc ?
and give the mainmacro the most time if its running ?
i mean the /delay x stuff

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sun Jul 25, 2004 12:06 am

made a few changes. if you have auto interrupt on, and are mounted, it wont bother interrupting if you're casting a spell with a recast time less than 3 secs (most spells), and theres 3 secs or less left on the cast time...

also fixed a bug that would happen if you died while casting an item.

aa abilities still dont work atm but they should once it's added back to MQ.

as for the stopcast thing, i dont really see any reason to change it, since it doesn't work while mounted either.

as for the last comment on movement... the only movement now is when you're on a horse and you're casting a spell that has a long recast time (that is, even if you cast it on an empty target, the spell will stay faded out). you can also disable this completely..

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sun Jul 25, 2004 7:17 am

Thanks for the update Rusty~!
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

EQBot_man
a ghoul
a ghoul
Posts: 111
Joined: Mon May 17, 2004 6:35 pm

Post by EQBot_man » Thu Jul 29, 2004 5:06 pm

Is there anyway quick way to to use spell_routines.inc so that it will contunually try to cast the spell and won't stop until the spell has landed?
for instance..
I could put:

Code: Select all

/call Cast "Force Shield"
/call Cast "Force Shield"
/call Cast "Force Shield"
/call Cast "Force Shield"
just like that in my macro and it would cast it 4 times. Any easy way to do that exectp through like:

Code: Select all

/call Cast "Force Shield"
:Here
/if (!${Me.SpellReady["Force Shield"]}) /goto :Here
/call Cast "Force Shield"
etc...

Draimen
a lesser mummy
a lesser mummy
Posts: 69
Joined: Sun Jan 25, 2004 3:13 pm

Post by Draimen » Fri Jul 30, 2004 12:53 am

Rusty, I pm'ed you a while back and you never responded. If you are OOR or OOM and are using a custom sub routine, your inc file never executes that sub.

There anyway to fix this?

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Fri Jul 30, 2004 10:42 am

Rusty, I pm'ed you a while back and you never responded. If you are OOR or OOM and are using a custom sub routine, your inc file never executes that sub.

There anyway to fix this?
sorry i'm bad with the checking PM thing heh. yeah i can fix this really fast. how it is atm, it only calls it while casting. i'll make it so it calls it at least one time.

*edit* should be fixed now!