/call Cast "YourSpell" gem#
ex. /call Cast "Quiescence" gem1
CrappySpell.inc
Code: Select all
#event Collapse "Your gate is too unstable, and collapses.#*#"
#event FDFail "#1# has fallen to the ground.#*#"
#event Fizzle "Your spell fizzles#*#"
#event Immune "Your target is immune to changes in its attack speed#*#"
#event Immune "Your target is immune to changes in its run speed#*#"
#event Immune "Your target cannot be mesmerized#*#"
#event Interrupt "Your casting has been interrupted#*#"
#event Interrupt "Your spell is interrupted#*#"
#event NoHold "Your spell did not take hold#*#"
#event NoLOS "You cannot see your target.#*#"
#event NoTarget "You must first select a target for this spell!#*#"
#event NotReady "Spell recast time not yet met.#*#"
#event OutOfMana "Insufficient Mana to cast this spell!#*#"
#event OutOfRange "Your target is out of range, get closer!#*#"
#event Recover "You haven't recovered yet...#*#"
#event Recover "Spell recovery time not yet met#*#"
#event Resisted "Your target resisted the #1# spell#*#"
#event Standing "You must be standing to cast a spell#*#"
#event Stunned "You are stunned#*#"
#event Stunned "You can't cast spells while stunned!#*#"
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#"
Sub Cast(string CastSpell,string spellType)
/if (!${Defined[SpellCT]}) /declare SpellCT int outer
/if (!${Defined[SpellCTTimer]}) /declare SpellCTTimer timer outer
/if (!${Defined[SpellName]}) /declare SpellName string outer ${CastSpell}
/if (!${Defined[WaitMem]}) /declare WaitMem int outer
/varset WaitMem 0
/varset SpellName ${CastSpell}
/varcalc SpellCT ${Spell[${CastSpell}].CastTime}*10+40
/if (!${Int[${Me.Book[${SpellName}]}]}) {
/echo Spell: "${SpellName}" was not found in your book.
/return
}
/if (!${Me.Gem[${SpellName}]}) {
:mem_spell
/if ( ${Cursor.ID} ) {
/autoinventory
/delay 5
/goto :mem_spell
}
/if (${spellType.Left[3].Equal[gem]}) {
/memspell ${spellType.Right[1]} "${SpellName}"
/delay 9s
:mem
/if (!${Me.SpellReady[${SpellName}]} && ${WaitMem}==0) {
/varset WaitMem 1
/delay 6s
/goto :mem
}
} else {
/echo No gem# given, and ${SpellName} not memmed.
/return
}
:close_spell_book
/if ( ${Window[SpellBookWnd].Open} ) {
/echo *** SpellBookWnd Stuck Open ***
/notify SpellBookWnd DoneButton leftmouseup
/goto :close_spell_book
}
}
/if ( ${Me.Sitting} ) {
/sit
}
/if (!${Me.Gem[${SpellName}]}) {
/echo Spell mem interrupted...
/return
}
/cast "${CastSpell}"
/varset SpellCTTimer ${SpellCT}
:Casting
/doevents
/if (${SpellCTTimer}!=0) /goto :Casting
|/echo Done casting ${CastSpell}
/return
Sub Event_Collapse
/echo Gate Colapsed!
/call Cast "${SpellName}"
/return
Sub Event_FDFail
/echo FD Failed!
/call Cast "${SpellName}"
/return
Sub Event_Fizzle
/delay 15
/call Cast "${SpellName}"
/return
Sub Event_Immune
/echo ${Target.Name} is immune!
/return
Sub Event_Interrupt
/delay 15
/call Cast "${SpellName}"
/return
Sub Event_NoHold
/echo ${SpellName} did not take hold on ${Target.Name}!
/return
Sub Event_NoLOS
/echo ${Target} is out of sight.
/return
Sub Event_NoTarget
/echo Target something first.
/return
Sub Event_OutOfMana
/echo I need to med.
/return
Sub Event_OutOfRange
/echo ${Target} is out of range!
/return
Sub Event_Recover
/echo Spell recover time not met.
/return
Sub Event_Resisted
/echo ${Target} resisted ${SpellName}!
/return
Sub Event_Standing
/stand
/delay 10
/call Cast "${SpellName}"
/return
Sub Event_Stunned
/echo Stunned!
/delay 10
/return


