I would like it to check if it can cast the spell after every successful canni
...been beating my head against the wall for a bit now... tried a few things but no real progress for a bit .. if someone else could give it a once over and clue me in I would be very greatfull.
I know this probably already exists, maybe in a better form even but i would like to finnish this to learn the macro language a bit .
**Note SpellCast is edited with
Code: Select all
Sub Event_OutOfMana
/if n $char(hp,pct)>50 /if n $char(mana,pct)<90 {
/call Cast "Cannibalize III"
/return CAST_RESTART
} else {
/if $char(state)!="SIT" /sit
/delay 10s
/return CAST_RESTART |CAST_OUTOFMANA
}
Code: Select all
#event SpellFizzle "Your spell fizzles"
#turbo 90
#include Buffspellcast.inc
Sub Main
/clear
/declare BuffCount local
/declare i local
/declare g local
/declare BuffSpell array
/declare SingleBuffSpell array
/declare SingleBuffCount local
/if $ucase("@Param0")=="GROUP" {
/if n $target(level)<=46 {
/echo Low Group
/varset BuffCount 1
/varset BuffSpell(1) "Spirit of Bih`Li"
/varset SingleBuffCount 9
/varset SingleBuffSpell(1) "Infusion of Spirit"
/varset SingleBuffSpell(2) "Guardian"
/varset SingleBuffSpell(3) "Agility"
/varset SingleBuffSpell(4) "Dexterity"
/varset SingleBuffSpell(5) "Strength"
/varset SingleBuffSpell(6) "Stamina"
/varset SingleBuffSpell(7) "Talisman of Altuna"
/varset SingleBuffSpell(8) "Chloroplast"
/varset SingleBuffSpell(9) "Alacrity"
}
/if n $target(level)>=45 {
/echo high Group
/varset BuffCount 6
/varset BuffSpell(1) "Talisman of the Cat"
/varset BuffSpell(2) "Talisman of the Brute"
/varset BuffSpell(3) "Talisman of Shadoo"
/varset BuffSpell(4) "talisman of Jasinth"
/varset BuffSpell(5) "Regrowth of Dar Khura"
/varset BuffSpell(6) "Spirit of Bih`Li"
/varset SingleBuffCount 2
/varset SingleBuffSpell(1) "Harnessing of Spirit"
/varset SingleBuffSpell(2) "Celerity"
}
| Cast Procedures for group buff go here
/declare TargetedPC local | this is here so if your grouped with a person below level 45 and want to high buff group, you will re target the high member you started with
/varset TargetedPC $target(id)
/for i 1 to @SingleBuffCount
/for g 0 to $group(count)
/if n $group(@g)!=-1 {
/target id $group(@g)
/echo Casting "@SingleBuffSpell(@i)" on $target(name)
/call Cast "@SingleBuffSpell(@i)"
}
/next g
/next i
/target id @TargetedPC
/for i 1 to @BuffCount
/echo Casting "@BuffSpell(@i)" on Group
/call Cast "@BuffSpell(@i)"
/next i
| End cast procedures for group buff
} else {
/if n $target(id)!=0 {
/if n $target(level)<=46 {
/echo Low
/varset BuffCount 10
/varset BuffSpell(1) "Infusion of Spirit"
/varset BuffSpell(2) "Guardian"
/varset BuffSpell(3) "Agility"
/varset BuffSpell(4) "Dexterity"
/varset BuffSpell(5) "Strength"
/varset BuffSpell(6) "Stamina"
/varset BuffSpell(7) "Talisman of Altuna"
/varset BuffSpell(8) "Chloroplast"
/varset BuffSpell(9) "Alacrity"
/varset BuffSpell(10) "Spirit of Bih`Li"
} else {
/echo high
/varset BuffCount 10
/varset BuffSpell(1) "Infusion of Spirit"
/varset BuffSpell(2) "Shroud of the Spirits"
/varset BuffSpell(3) "Deliriously Nimble"
/varset BuffSpell(4) "Dexterity"
/varset BuffSpell(5) "Maniacal Strength"
/varset BuffSpell(6) "Riotous Health"
/varset BuffSpell(7) "Talisman of Kragg"
/varset BuffSpell(8) "Regrowth"
/varset BuffSpell(9) "Celerity"
/varset BuffSpell(10) "Spirit of Bih`Li"
}
| Cast Procedures for single buff go here
/for i 1 to @BuffCount
/echo Casting "@BuffSpell(@i)" on $target(name)
/call Cast "@BuffSpell(@i)"
/next i
| End Procedures for single buff
}
}
/call main
/return
Code: Select all
| SpellCast.inc
| This will cast a spell reliably for you...
| Usage:
| /call Cast "spellname" [item]
| 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
| Oct 15, 2003 - Item support added by EqMule
| Modified to add automeming of spells. Goofmester1
#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."
#event BookOpen "You are too distracted to cast a spell now!"
Sub Cast(SpellName,Item)
/if n $char(gem,"@SpellName")==0 {
/memspell 8 "@SpellName"
/delay 5s
}
:StartCast
/if "@Item"=="Item" {
/call ClearReturnValue
/cast item "@SpellName"
} else {
/if n $char(gem,"@SpellName")==0 /return CAST_UNKNOWNSPELL
/call ClearReturnValue
/if n $char(gem,"@SpellName")<0 {
/delay 0
/goto :StartCast
}
/stand
/cast "@SpellName"
}
:WaitCast
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :WaitCast
}
/doevents Fizzle
/doevents BookOpen
/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"
/if "$return"=="CAST_OUTOFMANA" /goto :StartCast
/return CAST_SUCCESS
Sub ClearReturnValue
/return CAST_SUCCESS
Sub Event_BookOpen
/book
/return CAST_RESTART
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
/if n $char(hp,pct)>50 /if n $char(mana,pct)<90 {
/call Cast "Cannibalize III"
/return CAST_RESTART
} else {
/if $char(state)!="SIT" /sit
/delay 10s
/return CAST_RESTART |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

