Code: Select all
|Twitchbot.Mac by Hiidan.
#Event OOM "#*#Insufficient Mana to cast this spell#*#"
#Chat Chat
#Chat tell
#Include Spell_routines.inc
Sub Main
/declare LichSpell outer "Arch Lich"
/declare Twitching int outer 0
/echo TWITCH BOT ACTIVE.
:MainLoop
/if (!${Me.Sitting} && !${Me.Casting.ID} && !${Me.Moving} && (${Me.PctMana}<=92)) /sit
/call Lich
/doevents
/delay 4
/goto :MainLoop
/return
Sub Twitch
:Twitch
/if (${Twitching}==1) {
/if (${Me.SpellReady[Sedulous Subversion]}) /call cast "Sedulous Subversion"
/if (${Me.SpellReady[Covetous Subversion]}) /call cast "Covetous Subversion"
}
/doevents
/call Lich
/delay 4
/goto :Twitch
/return
Sub ManaRobe
:ManaRobe
/if (!${Me.Buff[Boon of Recovery].ID}) /call cast "Orb of Lost Souls" item
/if ((${Me.PctHPs}>=60) && (${Me.PctMana}<=70)) {
/call cast "Mana Robe" item
}
/doevents
/delay 4
/goto :ManaRobe
/return
Sub Lich
/if (!${Me.Buff[Boon of Recovery].ID}) /call cast "Orb of Lost Souls" item
/if ((${Me.PctMana}<=96) && (!${Me.Buff[${LichSpell}].ID}) && (${Me.PctHPs}>=35) && (!${Me.Casting.ID})) /call cast ${LichSpell}
/if (${Me.PctHPs}<35 && ${Me.Buff[${LichSpell}].ID} || ${Me.PctMana}==100 && ${Me.Buff[${LichSpell}].ID}) /notify BuffWindow Buff${Int[${LichSpell}]} leftmouseup
/doevents
/delay 2s
/return
Sub Event_Chat(string ChatType,string Sender,string ChatText)
/if ((${ChatText.Equal[Twitch On]}) && (${ChatType.Equal[TELL]})) {
/if (!${Twitching}==0) {
/tell ${Sender} I'm sorry, I'm currently twitching someone else!
}
/varset Twitching 1
/target ${Sender}
/if (${Target.ID}) {
/call Twitch
}
}
/if ((${ChatText.Equal[Twitch Off]}) && (${ChatType.Equal[TELL]})) {
/varset Twitching 0
}
/if ((${ChatText.Equal[Mana Check]}) && (${ChatType.Equal[TELL]})) {
/tell ${Sender} ${Me.PctMana}
}
/return
Sub Event_OOM
/varset Twitching 0
/call ManaRobe
/return
