Basically I 3 box (hence my name) a lot. I tank with my SK (the master). I'm wanting my beastlord to 'assist' or kill when told to. To slow when told to, and to follow when told to. That's basically it. I'm using Plasmic's spellcast as an include. I'm a little confused how to implement it tho, as you may notice that the end of the 'Slowthis' subroutine is incomplete - I'm not sure what to do with it. My goal was simply to have the BST slow when told to, check for fizzles, resists, etc using Plasmic's script, and then after a successful slow, return to the 'Main' subroutine - where I'll then issue a command to 'Kill'.
Am I doing this the right way? Does this look incomplete to you?
Thanks!
Code: Select all
|usage /mac assistme "mastername"
|
#include Spellcast.inc
#turbo
#Event kill "@Param0 tells you, 'kill"
#Event Slowthis "@Param0 tells you, 'slow"
#Event enraged "has become enraged"
#Event toofar "Your target is too far away, get closer!"
#Event follow "@Param0 tells you, 'follow'"
Sub Main
| ----Declares
/declare slowSpell global
| ----CHANGE THESE DEFAULT SETTINGS AS APPROPRIATE----
/varset slowSpell "Sha's Lethargy"
:mainloop
/doevents
/delay 1s
/goto :mainloop
/return
Sub Event_kill
/assist @Param0
/delay 1s
/t commander Attacking %t
/pet attack
/call Combat
/return
Sub Event_follow
/press esc
/press esc
/stand
/attack off
/target @Param0
/t @Param0 Following you
:followLoop
/if n $target(distance)>40 /sendkey down up
/if n $target(distance)<20 /sendkey up up
/face fast
/doevents
/delay 0
/if "$target()"=="TRUE" /goto :followLoop
/return
Sub Event_toofar
/sendkey down up
:farLoop
/if n $target(distance)<30 /sendkey up up
/face fast
/doevents
/delay 0
/if "$target()"=="TRUE" {
/if n $target(distance)>40 /goto :farLoop
/call Combat
}
/return
Sub Event_enraged
/attack off
/pet back off
/press esc
/t @Param0 rage
/delay 0
/return
Sub Combat
/attack on
:fight
/face fast
/doevents
/delay 0
/if "$target()"=="False" {
/sendkey up up
/call Main
}
/goto :fight
/return
Sub Slowthis
/assist @Param0
/delay 1
/call Cast "@slowSpell"
/delay 1
/if $return==CAST_SUCCESS {
}
/return
Code: Select all
|Plazmic + 1 line change by Imperfect
|** SpellCast.inc
** This will cast a spell reliably for you...
** Usage:
** /call Cast "spellname"
** It will return the following values:
** CAST_SUCCESS
** CAST_UNKNOWNSPELL
** CAST_OUTOFMANA
** CAST_OUTOFRANGE
** CAST_CANNOTSEE
** CAST_STUNNED
** CAST_RESISTED
**
** New Vars Modification
** Plazmic's no globals needed version
**|
|Oct 9, 2003 - Updated to work with new vars and $char(casting) - gf
|Oct 11, 2003 - switched some logic, removed defines - gf
#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 "You 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 Standing "You must be standing to cast a spell"
#event Collapse "Your gate is too unstable, and collapses."
Sub Cast(SpellName)
/if n $char(gem,"@SpellName")==0 /return CAST_UNKNOWNSPELL
:StartCast
/call ClearReturnValue
/if n $char(gem,"@SpellName")<0 {
/delay 0
/goto :StartCast
}
/cast "@SpellName"
:WaitCast
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :WaitCast
}
/doevents Fizzle
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/if "$return"=="CAST_RESTART" /goto :StartCast
/if "$return"!="CAST_SUCCESS" /return "$return"
/return CAST_SUCCESS
Sub ClearReturnValue
/return CAST_SUCCESS
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
/return CAST_STUNNED
Sub Event_Resisted
/return CAST_RESISTED

