|lich.mac by HardOne
|Custom Written for ViperOfAurole, or anyone else who finds it usefull.
|This macro will cast your lich spell on you when your mana is less then 90%,
|and hp greater then 50%. It also check for invis, Feign Death, or if your stunned before casting.
|click back off when your mana is 100%, or click off when your HP's drop below 15%.
|You can easilly change the % at which things happen by changing the defines.
|This is set to use Gem 5, you can also edit the /call Cast line to what ever gem you like.
|Requires spell_routines.inc to work proerly. Which will Handle any Fizzles that occur.
#include spell_routines.inc
#define LICH_SPELL Seduction of Saryrn
#define CAST_LICH_PCT_HPS 50
#define CAST_LICH_PCT_MANA 90
#define CLICK_OFF_PCT_MANA 100
#define CLICK_OFF_PCT_HPS 15
Sub Main
:lichloop
/if ((${Me.PctMana} <= CAST_LICH_PCT_MANA) && !${Me.Buff[LICH_SPELL].ID} && (${Me.PctHPs} >= CAST_LICH_PCT_HPS) && !${Me.Stunned} && !${Me.Invis} && !${Me.Feigning}) {
/echo Lich.mac: Casting Lich, your Mana is ${Me.PctMana} Percent.
/call Cast "Seduction of Saryrn" gem5
}
/if ((${Me.PctMana} >= CLICK_OFF_PCT_MANA) && ${Me.Buff[LICH_SPELL].ID}) {
/echo Lich.mac: Clicking off your Lich, your Mana is ${Me.PctMana} Percent.
/nomodkey /notify BuffWindow ${Me.Buff[LICH_SPELL]) leftmouseup
}
/if ((${Me.PctHPs} <= CLICK_OFF_PCT_HPS) && ${Me.Buff[LICH_SPELL].ID}) {
/echo Lich.mac: Clicking off your Lich, your HP's are ${Me.PctHPs} Percent.
/nomodkey /notify BuffWindow ${Me.Buff[LICH_SPELL]) leftmouseup
}
/goto :lichloop
/return