Setup is straightforward, it can use any spells you tell it, and heals itself. Also has support for Canni5, which is easily turned off.
Suggestions and ideas always welcome, though this is daily life tested working.
Edit: Changed global to outer for new system.
Code: Select all
| Title : Canni
| Filename : Canni.mac
| Release : 2.0
| Date : 5/11/04
| Author : MoonRaver
| Auto Canni and Heal
| Canni5 Support
| Lag proof as possible
| Requires this...
#include SpellCast.inc
Sub Main
|-----------------------------------------------------------
| Set your spells and thresholds here...
|-----------------------------------------------------------
| Your Canni spell name
/declare cCanni string outer "Cannibalize IV"
|-----------------------------------------------------------
| Your Heal spell name.
/declare cHeal string outer "Quiescence"
|-----------------------------------------------------------
| At what percent hp to stop canni, and start a heal.
/declare cHealAt int outerl 50
|-----------------------------------------------------------
| At what percent mana to stop the macro.
/declare cCannTo int outer 90
|-----------------------------------------------------------
|-----------------------------------------------------------
| For those with Canni 5...
|-----------------------------------------------------------
| Set this 1 to use it, 0 if you don't want it to.
/declare cUseAA int outer 1
|-----------------------------------------------------------
| This is the minimum hp at which you will activate Canni5.
/declare cMinHP int outer 3000
|-----------------------------------------------------------
:loopstart
/if ( ${Me.PctHPs}<${cHealAt} ) /call CastHeal
/if ( ${Me.PctMana}>${cCannTo} ) /call AllDone
/if ( ${cUseAA} && !(${Me.AltAbilityTimer[Cannibalization]}) ) /call BigCan
/if ( ${Me.PctMana}<${cCannTo} ) /call CastCanni
/doevents
/delay 1
/goto :loopstart
/endmacro
Sub BigCan
:tryagain
/if ( ${Me.MaxHPs}<${cMinHP} ) {
/deletevar cUseAA
/declare cUseAA int outer 0
/echo Your MaxHP is less than you set as minimum. Will not use Canni5 right now.
/return
}
/if ( ${Me.CurrentHPs}<${cMinHP} && ${Me.MaxHPs}>${cMinHP} && !${Me.Buff[${cHeal}].ID} ) /call CastHeal
/if ( ${Me.CurrentHPs}<${cMinHP} && ${Me.MaxHPs}>${cMinHP} ) /goto :tryagain
/sit off
/declare cA string local ${Me.CurrentHPs}
/declare cB string local ${cA}
/alt activate ${AltAbility[Cannibalization].ID}
:WaitFinish
/varset cB ${Me.CurrentHPs}
/if ( !${cB.Equal[${cA}]} ) /goto :WaitFinish
/deletevar cA
/deletevar cB
/if ( !${Me.Buff[${cHeal}].ID} ) /call CastHeal
/sit on
/delay 1
/return
Sub CastCanni
:tryagain
/if (!${Me.SpellReady[${cCanni}]}) /goto :tryagain
/sit off
/call Cast ${cCanni}
/if ( ${Macro.Return.Equal["CAST_RESTART"]} ) /goto :tryagain
/if ( ${Macro.Return.Equal["CAST_SUCCESS"]} ) /goto :success
/call ErrorTrap
:success
/sit on
/delay 1
/return
Sub CastHeal
:tryagain
/if (!${Me.SpellReady[${cHeal}]}) /goto :tryagain
/if ( ${Me.Buff[${cHeal}].ID} ) /goto :success
/sit off
/target myself
/call Cast ${cHeal}
/if ( ${Macro.Return.Equal["CAST_RESTART"]} ) /goto :tryagain
/if ( ${Macro.Return.Equal["CAST_SUCCESS"]} ) /goto :success
/call ErrorTrap
:success
/sit on
/if ( ${Me.PctHPs}<${cHealAt} ) /goto :success
/delay 1
/return
Sub ErrorTrap
/echo Something went wrong with casting. Killing macro now.
/delay 1
/endmacro
Sub AllDone
/sit off
/echo Cannidance Complete.
/delay 1
/endmacro


