Edited: Corrected functions using /call Main instead of /return
Code: Select all
| Canni.mac
| Autocanni and heal for a 65 with Q and C4
| Usage: /macro canni.mac
| Parameters...
| help - Display this information
| noheal - Canni and dont stop. Good for slow groups with a cleric healing you.
| nostop - Do not end the canni loop when you are done. It will continue to
| . loop and canni as necissary to keep you up on mana.
| nosit - Perform basic, but do not sit between casts.
| Note: Noheal will still heal if you hit 35%, there is some sanity to it.
|
| Brought to you by MoonRaverX
| Used for all my spell macros.
#include SpellCast.mac
|Main Loop
Sub Main
/declare Canni_nosit global
/declare Canni_noheal global
/declare Canni_nostop global
/varset Canni_nosit 0
/varset Canni_noheal 0
/varset Canni_nostop 0
| Lets check out paramters.
/if "@Param0"=="help" /call Canni_Syntax
/if "@Param0"=="nosit" /varset Canni_nosit 1
/if "@Param0"=="noheal" /varset Canni_noheal 1
/if "@Param0"=="nostop" /varset Canni_nostop 1
/if "@Param1"=="nosit" /varset Canni_nosit 1
/if "@Param1"=="noheal" /varset Canni_noheal 1
/if "@Param1"=="nostop" /varset Canni_nostop 1
/if "@Param2"=="nosit" /varset Canni_nosit 1
/if "@Param2"=="noheal" /varset Canni_noheal 1
/if "@Param2"=="nostop" /varset Canni_nostop 1
:loopstart
| If your hp are less than 35% start a heal first.
/if n $char(hp,pct)<35 /call Canni_CastHeal
| If your mana is more than 5%, and hp are between 25 and 50%, heal.
/if n $char(mana,pct)>5 /if n $char(hp,pct)>25 /if n $char(hp,pct)<50 /call Canni_CastHeal
| If hp are more than 40% and mana is under 90%, canni.
/if n $char(hp,pct)>40 /if n $char(mana,pct)<90 /call Canni_CastCanni
| If your done canni'ing stop the macro.
/if n $char(mana,pct)>90 /if Canni_nostop == 0 /call Canni_AllDone
/doevents
/delay 1
/goto :loopstart
/return
Sub Canni_CastCanni
:tryagain
/delay 1
/if n $char(gem,"Cannibalize IV")<1 /goto :tryagain
/sit off
/call Cast "Cannibalize IV"
/if $return==CAST_RESTART /call CastCanni
/if $return==CAST_OUTOFMANA /call ErrorTrap
/if $return==CAST_OUTOFRANGE /call ErrorTrap
/if $return==CAST_CANNOTSEE /call ErrorTrap
/if $return==CAST_STUNNED /call ErrorTrap
/if $return==CAST_RESISTED /call ErrorTrap
/if Canni_nosit == 0 /sit on
/delay 1
/return
Sub Canni_CastHeal
| Noheal catch, with stupidity checking
/if Canni_noheal == 1 /if n $char(hp,pct)>35 /call Canni_CastCanni
:tryagain
/delay 1
/if n $char(gem,"Quiescence")<1 /goto :tryagain
/sit off
/target myself
/call Cast "Quiescence"
/if $return==CAST_RESTART /call CastHeal
/if $return==CAST_OUTOFMANA /call ErrorTrap
/if $return==CAST_OUTOFRANGE /call ErrorTrap
/if $return==CAST_CANNOTSEE /call ErrorTrap
/if $return==CAST_STUNNED /call ErrorTrap
/if $return==CAST_RESISTED /call ErrorTrap
/delay 1
/if Canni_nosit == 0 /sit on
/delay 90
/return
Sub Canni_Syntax
/echo Canni..Syntax (Brought to you by MoonRaverX)
/echo help - Display this information
/echo noheal - Canni and dont stop. Good for slow groups with a cleric healing you.
/echo nostop - Do not end the canni loop when you are done. It will continue to
/echo . loop and canni as necissary to keep you up on mana.
/echo nosit - Perform basic, but do not sit between casts.
/echo Note: Noheal will still heal if you hit 35%, there is some sanity to it.
/endmacro
/return
Sub Canni_ErrorTrap
/echo Something went wrong with the macro. Killing now.
/endmacro
/return
Sub Canni_AllDone
/delay 1
/sit off
/echo Cannidance done.
/endmacro
/return



