spellcast.inc - generic casting include file.

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

Azum
a hill giant
a hill giant
Posts: 229
Joined: Wed Jun 04, 2003 5:04 am

Post by Azum » Sat May 29, 2004 4:02 pm

Noticed the same thing, seems to return a CAST_SUCCESS on a resist, not totally sure why though.

Azum
a hill giant
a hill giant
Posts: 229
Joined: Wed Jun 04, 2003 5:04 am

Post by Azum » Sat May 29, 2004 4:13 pm

..
Last edited by Azum on Mon May 31, 2004 5:19 am, edited 1 time in total.

oddball
orc pawn
orc pawn
Posts: 14
Joined: Sat May 29, 2004 6:21 pm

Post by oddball » Sun May 30, 2004 5:19 pm

I added the code and a return value for mobs that are immune to root/snare.
CAST_IMMUNEROOT is the new return value.

Here's the whole thing. It's based on the code in the first post

Code: Select all

| 
| SpellCast.inc 
| 
| Last Modified: 5/14/2004 9:30pm 
| Modified by oddball: 5/29/2004 to detect root immunity
| This will cast a spell reliably for you... 
| 
| Usage: 
|       /call Cast "spellname|itemname|AA#|AAskillname" [item|activate|gem#] [nocheck|dismount|nodismount] 
| 
| If no dismount or nodismount is provided it defaults to nodismount. 
| 
| This would essentially: /cast "Death Peace" 
| example: /call Cast "Death Peace" 
| 
| This would essentially: Check for the spell in your spell slots, if not there mem it to spell 
|                         gem slot 7 and then /cast "Death Peace" 
| example: /call Cast "Death Peace" gem7 
| 
| This would essentially: /cast item "White Rope Bridle" 
| example: /call Cast "White Rope Bridle" item 
| 
| This would essentially: /alt activate 169 
| example: /call Cast "169" activate 
|  or... 
| example: /call Cast "Divine Arbitration" activate 
| 
| This would dismount if your target was lost or dies mid-cast, cast Burn and mem it to spell 
| slot 3 if it wasn't already memmed: 
| example: /call Cast "Burn" gem3 dismount 
| 
| This would not dismount but would move you back and forth if your target was lost or dies mid-cast, cast Burn and mem 
| it to spell slot 3 if it wasn't already memmed: 
| example: /call Cast "Burn" gem3 nodismount 
| 
| 'nocheck' is the default for the "loss of target/target dying" value.  If nocheck is specified (Or nothing was specified) 
| no target checking will be performed and spellcast.inc should act like the spellcast.inc of the past. 
| 
| It will return the following values: 
| CAST_SUCCESS 
| CAST_UNKNOWNSPELL 
| CAST_OUTOFMANA 
| CAST_OUTOFRANGE 
| CAST_CANNOTSEE 
| CAST_STUNNED 
| CAST_RESISTED 
| CAST_TOOK2LONG 
| CAST_ABILITYNOTREADY 
| CAST_IMMUNESLOW 
| CAST_LOSTTARGET 
| CAST_IMMUNEROOT 
| 
| New Vars Modification 
| Plazmic's no globals needed version 
| 
| Oct 09, 2003 - Updated to work with new vars and $char(casting) -gf 
| Oct 11, 2003 - switched some logic, removed defines -gf 
| Oct 15, 2003 - Item support added by -EqMule 
| XXX xx, xxxx - Modified to add automeming of spells. -Goofmester1 
| Dec 26, 2003 - fd fail 1 added -m0nk 
| Jan 01, 2004 - timeout(5s) added to stop "dead-time" -m0nk 
| Jan 01, 2004 - switchd fdfail to a standing check. -m0nk 
| Jan 01, 2004 - added silence checking as a stun check -m0nk 
| Feb 17, 2004 - added AA activate capabilities -ml2517 
| Apr 11, 2004 - Updated for new Parm system -ml2517 
| Apr 12, 2004 - Will spit out a different message on immune to slows. -ml2517 
| Apr 16, 2004 - Removed /sendkeys and replaced with /keypress. -ml2517 
| Apr 17, 2004 - Various code enhancements. -Wassup 
| Apr 20, 2004 - Updated all of the /if's to have parenthesis. -ml2517 
| Apr 25, 2004 - Updated to new variable system. -ml2517 
| Apr 29, 2004 - Fixed Item problem -ml2517 
| Apr 29, 2004 - Changed the alt ability to use AltAbilityReady instead of an event. -ml2517 
| May 02, 2004 - Added the ability to specify a gem slot to mem spells to. -ml2517 
| May 10, 2004 - Updated for new event system. 
| May 12, 2004 - Added suggestions for loss of target and stun handling change. -ml2517 
| May 13, 2004 - Activate now accepts AA skill by name or number. -ml2517 
| May 14, 2004 - Added the nocheck value, it is the default. This bypasses the target checking code. -ml2517 
| 

#event Fizzle "#*#Your spell fizzles#*#" 
#event Interrupt "#*#Your casting has been interrupted#*#" 
#event Interrupt "#*#Your spell is interrupted.#*#" 
#event Recover "#*#You haven't recovered yet...#*#" 
#event Recover "#*#Spell recovery time not yet met.#*#" 
#event Resisted "#*#Your target resisted the #*#" 
#event OutOfMana "#*#Insufficient Mana to cast this spell!#*#" 
#event OutOfRange "#*#Your target is out of range, get closer!#*#" 
#event NoLOS "#*#You cannot see your target.#*#" 
#event Stunned "#*#You cannot cast while stunned#*#" 
#event Stunned "#*#You *CANNOT* cast spells, you have been silenced!#*#" 
#event Standing "#*#You must be standing to cast a spell#*#" 
#event Standing "#*#has fallen to the ground.#*#" 
#event Collapse "#*#Your gate is too unstable, and collapses.#*#" 
#event ImmuneSlow "#*#Your target is immune to changes in its attack speed.#*#" 
#event ImmuneRoot "#*#Your target is immune to changes in its run speed.#*#"


Sub Cast(SpellName,ItemFlag,DismountFlag) 
   /declare HaveTarget int local 0 
   /declare CastBarTime timer local 
   /declare CastCurrLocY float local 0 
   /declare CastCurrLocX float local 0 
   /varset CastCurrLocY ${Me.Y} 
   /varset CastCurrLocX ${Me.X} 
   /if (${Target.ID}>0) /varset HaveTarget 1 
   /if (!${Defined[CastGiveUpTime]}) /declare CastGiveUpTime timer local 
   /if (!${Defined[ItemFlag]}) /declare ItemFlag string local 
   /if (!${Defined[DismountFlag]}) { 
       /declare DismountFlag string local nocheck 
       /if (${ItemFlag.Find["dismount"]}) /varset DismountFlag ${ItemFlag} 
   } 
   /if (!${Me.Standing} && !${Me.Mount.ID}>0) /stand 
   /if (${Me.Moving}) { 
       /keypress forward 
       /keypress back 
       /delay 8 
   } else { 
       /delay 4 
   } 
   /if (${ItemFlag.Equal["Item"]} || ${ItemFlag.Equal["Activate"]}) /goto :StartCast 

   /if (!${Me.Gem["${SpellName}"]}) { 
       /if (${ItemFlag.Find[gem]}) { 
           /if (${Int[${ItemFlag.Right[1]}]}>0 && ${Int[${ItemFlag.Right[1]}]}<9) { 
               /memspell ${ItemFlag.Right[1]} "${SpellName}" 
               /delay 5s 
           } else { 
               /goto :GenericMem 
           } 
       } else {        
           :GenericMem 
           /memspell 1 "${SpellName}" 
           /delay 5s 
       } 

   } 
   :StartCast 
      /varset CastGiveUpTime 5s 
   :CastNow 
      /if (${ItemFlag.Equal["Item"]}) { 
         /call ClearReturnValue 
         /cast item "${SpellName}" 
      } else /if (${ItemFlag.Equal["Activate"]}) { 
         /call ClearReturnValue 
         /if (!${Me.AltAbilityReady[${SpellName}]}) /return CAST_ABILITYNOTREADY 
         /alt activate ${AltAbility[${SpellName}].ID} 
         /varset CastBarTime ${Me.Casting.CastTime} 
      } else { 
         /if (!${Me.Gem["${SpellName}"]}) /return CAST_UNKNOWNSPELL 
         /call ClearReturnValue 
         /if (!${Me.SpellReady["${SpellName}"]}) { 
            /if (${CastGiveUpTime}==0) /return CAST_TOOK2LONG 
            /delay 1 
            /goto :CastNow 
         } 
         /cast "${SpellName}" 
         /varset CastBarTime ${Math.Calc[${Me.Casting.CastTime}*10]} 
      } 
   :WaitCast 
      /if (${Me.Casting.ID}) { 
         /if ((!${Target.ID}>0 || ${Target.Type.Equal[CORPSE]}) && !${DismountFlag.Find[nocheck]} && ${HaveTarget}==1) { 
             /if (${Me.Mount.ID}>0) { 
                 /if (${DismountFlag.Equal[dismount]}) { 
                     /dismount 
                 } else { 
                     /if (!${ItemFlag.Equal["Item"]}) { 
                         /if (${CastBarTime}<7) { 
                             :Interrupt 
                             /keypress FORWARD hold 
                             /delay 6 
                             /keypress FORWARD 
                             /keypress BACK hold 
                             /delay 8 
                             /keypress BACK 
                         } else { 
                             :HoldForSpell 
                             /delay 1 
                             /if (${CastBarTime}<7) /goto :Interrupt 
                             /goto :HoldForSpell 
                         } 
                     } else { 
                         /keypress FORWARD hold 
                         :Forward 
                         /delay 1 
                         /if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}<6) /goto :Forward 
                         /keypress FORWARD 
                         /keypress BACK hold 
                         :Backward 
                         /delay 1 
                         /if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}>4) /goto :Backward 
                         /keypress BACK 
                         /if (!${Me.Casting.ID}>0) /goto :DuckTime 
                     } 
                 } 
             } 
             :DuckTime 
             /keypress FORWARD 
             /keypress BACK 
             /if (!${Me.Ducking}) /keypress DUCK 
             /delay 1 
             /if (${Me.Ducking}) /keypress DUCK 
             /return CAST_LOSTTARGET 
         } 
         /delay 1 
         /goto :WaitCast 
      } 
   /delay 1 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Interrupt 
   /doevents Recover 
   /doevents Standing 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted 
   /doevents ImmuneSlow 
   /doevents ImmuneRoot 
   /doevents Stunned 
   /doevents Collapse 
   /if (${Macro.Return.Equal["CAST_RESTART"]}) /goto :StartCast 
   /if (!${Macro.Return.Equal["NULL"]}) /return ${Macro.Return} 
/return CAST_SUCCESS 

Sub ClearReturnValue 
/return NULL 

Sub Event_Fizzle 
/return CAST_RESTART 

Sub Event_Interrupt 
/return CAST_RESTART 

Sub Event_Recover 
   /delay 5 
/return CAST_RESTART 

Sub Event_Standing 
   /stand 
/return CAST_RESTART 

Sub Event_Collapse 
/return CAST_RESTART 

Sub Event_OutOfMana 
/return CAST_OUTOFMANA 

Sub Event_OutOfRange 
/return CAST_OUTOFRANGE 

Sub Event_NoLOS 
/return CAST_CANNOTSEE 

Sub Event_Stunned 
   /delay 2s !${Me.Stunned} 
/return CAST_RESTART 

Sub Event_Resisted 
/return CAST_RESISTED 

Sub Event_ImmuneSlow 
/return CAST_IMMUNESLOW 

Sub Event_ImmuneRoot 
/return CAST_IMMUNEROOT 

Vexix
Genbot Janitor
Posts: 245
Joined: Sat Apr 17, 2004 10:10 am

Post by Vexix » Thu Jun 03, 2004 9:42 am

Hmm. . . I notice the nodismount code basically waits until the spell is just about to finish, and then moves you forward a bit to interrupt. If your target died midcast, then it would blank out your target anyway, and you don't loose mana if you cast a targettable spell without a target, right? Is there some benefit to this I'm missing?

--Vexix

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Thu Jun 03, 2004 11:17 am

If it waits til the end...no, no real benefit since targetless spells no longer use mana. However I personally find interrupting spells quite useful (I rarely use a mount) because I can co on to casting something else that much faster.

Dulapore
a lesser mummy
a lesser mummy
Posts: 67
Joined: Thu Feb 26, 2004 4:39 am

Post by Dulapore » Thu Jun 03, 2004 9:44 pm

He created that function before that point was brought to light. That's when he added the option to do neither.

Azum
a hill giant
a hill giant
Posts: 229
Joined: Wed Jun 04, 2003 5:04 am

Post by Azum » Sat Jun 05, 2004 9:50 pm

Okay, problem I was having, spellcast.inc returned CAST_SUCCESS on a resist from a Staff of Temperate Flux (instant cast debuff item). Everything else seemed to be working okay. Although I'm sure you could reproduce the bug with any instant cast debuff item.

I finally fixed it by changing the following:

Code: Select all

/delay 1 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Interrupt 
   /doevents Recover 
   /doevents Standing 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted 
   /doevents ImmuneSlow 
   /doevents Stunned 
   /doevents Collapse 
to

Code: Select all

/delay 4
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Interrupt 
   /doevents Recover 
   /doevents Standing 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted 
   /doevents ImmuneSlow 
   /doevents Stunned 
   /doevents Collapse 
   /delay 1

Botmaker
orc pawn
orc pawn
Posts: 14
Joined: Mon Jan 26, 2004 11:46 am

Post by Botmaker » Fri Jun 11, 2004 2:18 pm

might wanna add different return value for spell that didnt take hold on the target (spare the calling macro to check if buff/debuff held:)

Code: Select all

#event NoHold "#*#Your spell did not take hold.#*#" 
...

Code: Select all

/delay 1 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Interrupt 
   /doevents Recover 
   /doevents Standing 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted 
   /doevents ImmuneSlow 
   /doevents Stunned 
   /doevents Collapse 
  [color=red]  /doevents NoHold[/color]
....

Code: Select all

Sub Event_NoHold
/return CAST_NOHOLD

NBarnes
orc pawn
orc pawn
Posts: 19
Joined: Wed Jan 28, 2004 10:46 pm

Post by NBarnes » Tue Aug 31, 2004 3:41 am

I'm getting errors in line 105 and 112 when using this with YAST.mac (spell trainer) relating to non-numeric arguments.

Runamuck
orc pawn
orc pawn
Posts: 17
Joined: Fri Aug 27, 2004 3:14 pm

Post by Runamuck » Sun Sep 05, 2004 12:02 pm

Found the fixed version by azum.

Code: Select all

| 
| SpellCast.inc 
| 
| Last Modified: 5/14/2004 9:30pm 
| This will cast a spell reliably for you... 
| 
| Usage: 
|       /call Cast "spellname|itemname|AA#|AAskillname" [item|activate|gem#] [nocheck|dismount|nodismount] 
| 
| If no dismount or nodismount is provided it defaults to nodismount. 
| 
| This would essentially: /cast "Death Peace" 
| example: /call Cast "Death Peace" 
| 
| This would essentially: Check for the spell in your spell slots, if not there mem it to spell 
|                         gem slot 7 and then /cast "Death Peace" 
| example: /call Cast "Death Peace" gem7 
| 
| This would essentially: /cast item "White Rope Bridle" 
| example: /call Cast "White Rope Bridle" item 
| 
| This would essentially: /alt activate 169 
| example: /call Cast "169" activate 
|  or... 
| example: /call Cast "Divine Arbitration" activate 
| 
| This would dismount if your target was lost or dies mid-cast, cast Burn and mem it to spell 
| slot 3 if it wasn't already memmed: 
| example: /call Cast "Burn" gem3 dismount 
| 
| This would not dismount but would move you back and forth if your target was lost or dies mid-cast, cast Burn and mem 
| it to spell slot 3 if it wasn't already memmed: 
| example: /call Cast "Burn" gem3 nodismount 
| 
| 'nocheck' is the default for the "loss of target/target dying" value.  If nocheck is specified (Or nothing was specified) 
| no target checking will be performed and spellcast.inc should act like the spellcast.inc of the past. 
| 
| It will return the following values: 
| CAST_SUCCESS 
| CAST_UNKNOWNSPELL 
| CAST_OUTOFMANA 
| CAST_OUTOFRANGE 
| CAST_CANNOTSEE 
| CAST_STUNNED 
| CAST_RESISTED 
| CAST_TOOK2LONG 
| CAST_ABILITYNOTREADY 
| CAST_IMMUNESLOW 
| CAST_LOSTTARGET 
| 
| New Vars Modification 
| Plazmic's no globals needed version 
| 
| Oct 09, 2003 - Updated to work with new vars and $char(casting) -gf 
| Oct 11, 2003 - switched some logic, removed defines -gf 
| Oct 15, 2003 - Item support added by -EqMule 
| XXX xx, xxxx - Modified to add automeming of spells. -Goofmester1 
| Dec 26, 2003 - fd fail 1 added -m0nk 
| Jan 01, 2004 - timeout(5s) added to stop "dead-time" -m0nk 
| Jan 01, 2004 - switchd fdfail to a standing check. -m0nk 
| Jan 01, 2004 - added silence checking as a stun check -m0nk 
| Feb 17, 2004 - added AA activate capabilities -ml2517 
| Apr 11, 2004 - Updated for new Parm system -ml2517 
| Apr 12, 2004 - Will spit out a different message on immune to slows. -ml2517 
| Apr 16, 2004 - Removed /sendkeys and replaced with /keypress. -ml2517 
| Apr 17, 2004 - Various code enhancements. -Wassup 
| Apr 20, 2004 - Updated all of the /if's to have parenthesis. -ml2517 
| Apr 25, 2004 - Updated to new variable system. -ml2517 
| Apr 29, 2004 - Fixed Item problem -ml2517 
| Apr 29, 2004 - Changed the alt ability to use AltAbilityReady instead of an event. -ml2517 
| May 02, 2004 - Added the ability to specify a gem slot to mem spells to. -ml2517 
| May 10, 2004 - Updated for new event system. 
| May 12, 2004 - Added suggestions for loss of target and stun handling change. -ml2517 
| May 13, 2004 - Activate now accepts AA skill by name or number. -ml2517 
| May 14, 2004 - Added the nocheck value, it is the default. This bypasses the target checking code. -ml2517 
| 

#event Fizzle "#*#Your spell fizzles#*#" 
#event Interrupt "#*#Your casting has been interrupted#*#" 
#event Interrupt "#*#Your spell is interrupted.#*#" 
#event Recover "#*#You haven't recovered yet...#*#" 
#event Recover "#*#Spell recovery time not yet met.#*#" 
#event Resisted "#*#Your target resisted the #*#" 
#event OutOfMana "#*#Insufficient Mana to cast this spell!#*#" 
#event OutOfRange "#*#Your target is out of range, get closer!#*#" 
#event NoLOS "#*#You cannot see your target.#*#" 
#event Stunned "#*#You cannot cast while stunned#*#" 
#event Stunned "#*#You *CANNOT* cast spells, you have been silenced!#*#" 
#event Standing "#*#You must be standing to cast a spell#*#" 
#event Standing "#*#has fallen to the ground.#*#" 
#event Collapse "#*#Your gate is too unstable, and collapses.#*#" 
#event ImmuneSlow "#*#Your target is immune to changes in its attack speed.#*#" 


Sub Cast(SpellName,ItemFlag,DismountFlag) 
   /declare HaveTarget int local 0 
   /declare CastBarTime timer local 
   /declare CastCurrLocY float local 0 
   /declare CastCurrLocX float local 0 
   /varset CastCurrLocY ${Me.Y} 
   /varset CastCurrLocX ${Me.X} 
   /if (${Target.ID}>0) /varset HaveTarget 1 
   /if (!${Defined[CastGiveUpTime]}) /declare CastGiveUpTime timer local 
   /if (!${Defined[ItemFlag]}) /declare ItemFlag string local 
   /if (!${Defined[DismountFlag]}) { 
       /declare DismountFlag string local nocheck 
       /if (${ItemFlag.Find["dismount"]}) /varset DismountFlag ${ItemFlag} 
   } 
   /if (!${Me.Standing} && !${Me.Mount.ID}>0) /stand 
   /if (${Me.Moving}) { 
       /keypress forward 
       /keypress back 
       /delay 8 
   } else { 
       /delay 4 
   } 
   /if (${ItemFlag.Equal["Item"]} || ${ItemFlag.Equal["Activate"]}) /goto :StartCast 

   /if (!${Me.Gem["${SpellName}"]}) { 
       /if (${ItemFlag.Find[gem]}) { 
           /if (${Int[${ItemFlag.Right[1]}]}>0 && ${Int[${ItemFlag.Right[1]}]}<9) { 
               /memspell ${ItemFlag.Right[1]} "${SpellName}" 
               /delay 5s 
           } else { 
               /goto :GenericMem 
           } 
       } else {        
           :GenericMem 
           /memspell 5 "${SpellName}" 
           /delay 5s 
       } 

   } 
   :StartCast 
      /varset CastGiveUpTime 5s 
   :CastNow 
      /if (${ItemFlag.Equal["Item"]}) { 
         /call ClearReturnValue 
         /cast item "${SpellName}" 
      } else /if (${ItemFlag.Equal["Activate"]}) { 
         /call ClearReturnValue 
         /if (!${Me.AltAbilityReady[${SpellName}]}) /return CAST_ABILITYNOTREADY 
         /alt activate ${AltAbility[${SpellName}].ID} 
         /varset CastBarTime ${Me.Casting.CastTime} 
      } else { 
         /if (!${Me.Gem["${SpellName}"]}) /return CAST_UNKNOWNSPELL 
         /call ClearReturnValue 
         /if (!${Me.SpellReady["${SpellName}"]}) { 
            /if (${CastGiveUpTime}==0) /return CAST_TOOK2LONG 
            /delay 1 
            /goto :CastNow 
         } 
         /cast "${SpellName}" 
         /varset CastBarTime ${Math.Calc[${Me.Casting.CastTime}*10]} 
      } 
   :WaitCast 
      /if (${Me.Casting.ID}) { 
         /if ((!${Target.ID}>0 || ${Target.Type.Equal[CORPSE]}) && !${DismountFlag.Find[nocheck]} && ${HaveTarget}==1) { 
             /if (${Me.Mount.ID}>0) { 
                 /if (${DismountFlag.Equal[dismount]}) { 
                     /dismount 
                 } else { 
                     /if (!${ItemFlag.Equal["Item"]}) { 
                         /if (${CastBarTime}<7) { 
                             :Interrupt 
                             /keypress FORWARD hold 
                             /delay 6 
                             /keypress FORWARD 
                             /keypress BACK hold 
                             /delay 8 
                             /keypress BACK 
                         } else { 
                             :HoldForSpell 
                             /delay 1 
                             /if (${CastBarTime}<7) /goto :Interrupt 
                             /goto :HoldForSpell 
                         } 
                     } else { 
                         /keypress FORWARD hold 
                         :Forward 
                         /delay 1 
                         /if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}<6) /goto :Forward 
                         /keypress FORWARD 
                         /keypress BACK hold 
                         :Backward 
                         /delay 1 
                         /if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}>4) /goto :Backward 
                         /keypress BACK 
                         /if (!${Me.Casting.ID}>0) /goto :DuckTime 
                     } 
                 } 
             } 
             :DuckTime 
             /keypress FORWARD 
             /keypress BACK 
             /if (!${Me.Ducking}) /keypress DUCK 
             /delay 1 
             /if (${Me.Ducking}) /keypress DUCK 
             /return CAST_LOSTTARGET 
         } 
         /delay 1 
         /goto :WaitCast 
      } 
   /delay 4 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Interrupt 
   /doevents Recover 
   /doevents Standing 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted 
   /doevents ImmuneSlow 
   /doevents Stunned 
   /doevents Collapse 
   /delay 1 
   /if (${Macro.Return.Equal["CAST_RESTART"]}) /goto :StartCast 
   /if (!${Macro.Return.Equal["NULL"]}) /return ${Macro.Return} 
/return CAST_SUCCESS 

Sub ClearReturnValue 
/return NULL 

Sub Event_Fizzle 
/return CAST_RESTART 

Sub Event_Interrupt 
/return CAST_RESTART 

Sub Event_Recover 
   /delay 5 
/return CAST_RESTART 

Sub Event_Standing 
   /stand 
/return CAST_RESTART 

Sub Event_Collapse 
/return CAST_RESTART 

Sub Event_OutOfMana 
/return CAST_OUTOFMANA 

Sub Event_OutOfRange 
/return CAST_OUTOFRANGE 

Sub Event_NoLOS 
/return CAST_CANNOTSEE 

Sub Event_Stunned 
   /delay 2s !${Me.Stunned} 
/return CAST_RESTART 

Sub Event_Resisted 
/return CAST_RESISTED 

Sub Event_ImmuneSlow 
/return CAST_IMMUNESLOW

JVerse
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sat Aug 28, 2004 5:37 pm

cannot find file....

Post by JVerse » Fri Sep 10, 2004 2:39 am

cannot open filse ..include mq2/macros/spellcast.inc

WTf is going on ...ive copy n pasted the whole thing ....change it too macro all kinda shit ..adn i get the same damn line.....Im running a different macro and i get that same line everytime...plz help

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

Post by fearless » Fri Sep 10, 2004 8:05 am

well, I would assume that it can't open the file, did you make sure you actually have a file in that directory named spellcast.inc? and NOT spellcast.mac?