Moderator: MacroQuest Developers

Code: Select all
| MyChant.mac
| Last Updated: 17-May-2004 by Chill
| A Simple chanter macro to: Tash, Slow, and Nuke single pulls, then check basic buff and boggle when agro.
|
| Usage: /mac MyChant [Main Assist] [Nukes]
| [Main Assist] will default to the last tank used and stored in the ini file
| [Nukes] can be 0 for none, 1 for Insanity only, or 2 to chain Insanity and Dementing Visions
#include spell_routines.inc
#include buffbeg.inc
#chat tell
#chat group
#event Damage "#*#hits YOU#*#"
Sub Main
/call BuffBegDeclares
/declare MyTarget string outer
/declare Nukes int outer 2
/declare TargetReturn string outer
/declare BuffGuy string outer
/declare MA string outer
/declare MATarget int outer
/declare IniFile string outer
/declare CheckBuffTimer timer outer 0
/declare SlowTimer timer outer
/declare TashTimer timer outer
/varset IniFile "MyChant.ini"
| INI setup variables
/if (${Defined[Param0]}) {
/ini "${IniFile}" Settings MA ${Param0}
/varset MA ${Param0}
} else {
/varset MA ${Ini[${IniFile},Settings,MA,NOTFOUND]}
/if (${MA.Equal["NOTFOUND"]}) {
/echo You need to start the macro with /mac MyChant [Main Assist] and generate your .INI file.
/endmacro
} else {
/echo Assisting ${MA}
}
}
/if (${Defined[Param1]}) {
/ini "${IniFile}" Settings Nukes ${Param1}
/varset Nukes ${Param1}
} else {
/varset Nukes ${Ini[${IniFile},Settings,Nukes,2]}
}
:MainLoop
/if (${SpawnCount[npc radius 200]}==0) /goto :MainLoop
:wait4hps
/doevents
/call CheckBuffs
/call BuffBeg
/if (${MATarget}!=${Target.ID}) {
/varset SlowTimer 0
/varset TashTimer 0
}
/assist ${MA}
/delay 2s ${Target.ID}
/if (${Target.Type.Equal[NPC]} && ${Target.PctHPs}<=95 && ${Target.PctHPs} > 10) {
/varset MATarget ${Target.ID}
/call TashSlow
/call Nuke
} else {
/echo ${Target.Name} not yet engaged
/doevents
/goto :wait4hps
}
/goto :MainLoop
Sub TashSlow
/echo Engaged ${Target.Name} at ${Target.PctHPs}%
/if (${TashTimer}==0) {
/call Cast "Howl of Tashan" gem4
/varset TashTimer ${Math.Calc[${Spell[Howl of Tashan].Duration.TotalSeconds}-10]}s
}
/doevents Damage
/call Boggle
:SlowResisted
/if (${Target.ID}==${MATarget} && ${SlowTimer}==0) {
/call Cast "Serpent of Vindication" item 10s
/if (${castReturn.Equal[CAST_SUCCESS]}) {
/echo Slowed ${Target.Name} at ${Target.PctHPs}%
/varset SlowTimer ${Math.Calc[${Spell[Forlorn Deeds].Duration.TotalSeconds}-10]}s
/doevents Damage
/call Boggle
/return
} else {
/if (${castReturn.Equal[CAST_IMMUNE]}) {
/echo ${Target.Name} Immune to slow
/varset SlowTimer 300s
/doevents Damage
/call Boggle
/return
}
} else {
/if (${castReturn.Equal[CAST_RESISTED]}) {
/echo ${Target.Name} Resisted slow
/goto :SlowResisted
}
} else {
/if (${SpellNotHold}==1) {
/varset SlowTimer 300s
/return
}
}
}
/return
Sub Boggle
/if (${Me.TargetOfTarget.ID}==${Me.ID}) {
/echo Boggling ${Target.Name} at ${Target.PctHPs}%
/call Cast "Boggle" gem9
}
/return
Sub Nuke
/echo Nuking ${Target.Name} at ${Target.PctHPs}%
:nuke
/if (${Target.PctHPs}>=10 && ${Me.PctMana}>=30 && ${Nukes}>0) /call Cast "Psychosis" gem5
/doevents
/call Boggle
/if (${Target.PctHPs}>=10 && ${Me.PctMana}>=30 && ${Nukes}>1) /call Cast "Insanity" gem6
/doevents Damage
/call Boggle
/return
Sub CheckBuffs
/if (${Me.Buff[Ethereal Rune].Duration}<60) /call Cast "Ethereal Rune" gem8
/if (${CheckBuffTimer}==0) {
/echo Checking Buffs...
/if (${Me.Buff[Illusion: High Elf].Duration}<60) /call Cast "Inlaid jade hoop" item
/if (${Me.Buff[Overwhelming Splendor].Duration}<60) {
/target myself
/call Cast "Overwhelming Splendor" gem7
}
/if (${Me.Buff[Aura of Eternity].Duration}<60) /call Cast "Celestial Cloak" item
/if (!${Me.Buff[Talisman of Wunshi].ID} && !${Me.Buff[Wunshi's Focusing].ID} && !${Me.Buff[Focus of the Seventh].ID} && !${Me.Buff[Focus of Soul].ID} && ${Me.Buff[Shield of Maelin].Duration}<60) /call Cast "Shield of Maelin" gem7
/if (${Me.Buff[Clairvoyance].Duration}<60) {
/target myself
/call Cast "Clairvoyance" gem7
}
/varset CheckBuffTimer 60s
}
/return
Sub Event_Damage
/if (${Me.AltAbilityReady[Eldritch Rune]}) /call Cast "Eldritch Rune" alt
|} else {
| /if (${Me.ItemReady[Oculus of Persuasion]}) /call Cast "Oculus of Persuasion" item
} else {
/if (${Me.AltAbilityReady[Doppleganger]}) /call Cast "Doppleganger" alt
} else {
/if (${Me.AltAbilityReady[Soothing Words]}) /call Cast "Soothing Words" alt
} else {
/if (${Me.AltAbilityReady[Mind Over Matter]}) /call Cast "Mind Over Matter" alt
} else {
/if (${Me.AltAbilityReady[Color Shock]}) /call Cast "Color Shock" alt
} else {
/if (${Me.AltAbilityReady[Stasis]}) /call Cast "Stasis" alt
}
/return
Sub Event_Chat(ChatType,Sender,ChatText)
/varset BuffGuy ${Sender}
/if (${ChatText.Find[VoQ]} || ${ChatText.Find[KEI]} || ${ChatText.Find[Clair]} || ${ChatText.Find[Clar]} || ${ChatText.Find[c5]} || ${ChatText.Find[C6]} || ${ChatText.Find[mana buff]} || ${ChatText.Find[buffs]}) {
/call TargetGuy
/if (${TargetReturn.Equal[TARGET_SUCCESS]} && ${Target.Distance}<100) /call Cast "Clairvoyance" gem2 10s
}
/if (${ChatText.Find[haste]} || ${ChatText.Find[sov]} || ${ChatText.Find[salik]} || ${ChatText.Find[speed]} || ${ChatText.Find[buffs]}) {
/call TargetGuy
/if (${TargetReturn.Equal[TARGET_SUCCESS]} && ${Target.Distance}<100) /call Cast "Speed of Salik" gem3 10s
}
/if (${ChatText.Find[invis]}) {
/call TargetGuy
/if (${TargetReturn.Equal[TARGET_SUCCESS]} && ${Target.Distance}<100) /call Cast "Invisibility" gem7 10s
}
/if (${ChatText.Find[frog]} || ${ChatText.Find[guktan]}) {
/call TargetGuy
/if (${TargetReturn.Equal[TARGET_SUCCESS]} && ${Target.Distance}<100) {
/call Cast "Project Illusion" alt 10s
/call Cast "Illusion: Guktan" gem7
}
}
/if (${ChatText.Find[gnome]}) {
/call TargetGuy
/if (${TargetReturn.Equal[TARGET_SUCCESS]} && ${Target.Distance}<100) {
/call Cast "Project Illusion" alt 10s
/call Cast "Illusion: Gnome" gem7
}
}
/if (${ChatText.Find[half elf]}) {
/call TargetGuy
/if (${TargetReturn.Equal[TARGET_SUCCESS]} && ${Target.Distance}<100) {
/call Cast "Project Illusion" alt 10s
/call Cast "Illusion: Half Elf" gem7
}
}
/target clear
/assist ${MA}
/delay 2s ${Target.ID}
/return
Sub TargetGuy
/squelch /target clear
/target pc ${BuffGuy}
/if (!${Target.ID}) {
/varset TargetReturn TARGET_FAILED
/return
}
/varset TargetReturn TARGET_SUCCESS
/returnCode: Select all
/itemnotify ${FindItem[Serpent of Vindication].InvSlot} leftmouseup