- Joined
- May 1, 2008
- Messages
- 38
- Reaction score
- 0
- Points
- 6
This is a shaman macro i wrote from scratch. Over the years i got some ideas from people and I am sorry to say I dont remember who it was. 98% of the code though in the main macro is stuff i came up with or something I reinvented the wheel with. Some of the includes arent my work but are well known like aapurchase.inc, spell_routines.inc, ninjadvloot.inc.
Features:
Debuff mobs in the radius set
Heals group like a bawse. Adding in healing people on ext target lists.
Buff from tells and everyone in BC
DoT
Nuke
Pet handling as well.
Cure from tells and everyone in BC. Will cast grp cure spells if people are in your grp and single target if they are out of grp.
Wild growth line on the MT.
Grp proc buff line on group.
Clicks 2.0 / 1.5 and spire if a named is in camp.
Plugins required:
Exchange
Netbots
EQBC
Cast
Stock plugins
I might be missing a couple. If I am forgetting any I will update this.
Features:
Debuff mobs in the radius set
Heals group like a bawse. Adding in healing people on ext target lists.
Buff from tells and everyone in BC
DoT
Nuke
Pet handling as well.
Cure from tells and everyone in BC. Will cast grp cure spells if people are in your grp and single target if they are out of grp.
Wild growth line on the MT.
Grp proc buff line on group.
Clicks 2.0 / 1.5 and spire if a named is in camp.
Plugins required:
Exchange
Netbots
EQBC
Cast
Stock plugins
I might be missing a couple. If I am forgetting any I will update this.
Code:
#include spell_routines.inc
#include wait4rez.inc
#include Events.inc
#include ninjadvloot.inc
#include AAPurchase.inc
#include General2.inc
#include ItemBuff.inc
#include Cure.inc
#Event GainXP "You gain experience!!"
#Event GainXP "You gain raid experience!"
#Event ListMob "#*#[MQ2] list#*#"
#Event ImDead "You have been slain by#*#"
#Event ImDead "You died."
#Event Summon "#*#You have been summoned#*#"
#Event WornOff "Your #1# spell has worn off of #2#."
#Event ImHit "#*#hits YOU for#*#"
#Event ImHit "#*#slashes YOU for#*#"
#Event ImHit "#*#crushes YOU for#*#"
#Event ImHit "#*#bashes YOU for#*#"
#Event ImHit "#*#kicks YOU for#*#"
#Event ImHit "#*#smashes YOU for#*#"
#event ImHit "#*#mauls YOU for#*#"
#Event ImHit "#*#gores YOU for#*#"
#Event ImHit "#*#pierces YOU for#*#"
#Event ImHit "#*#kicks YOU for#*#"
#Event ImHit "#*#bashes YOU for#*#"
#event AddFuck "[MQ2] Adding mob to dont fuck with list#*#"
#event Yak "#1# tells #2#, '#3#'"
#Event Talk "<#1#> #2#"
#turbo 40
Sub Main
/call InitializeMac
/call SetDebuffList
/call SetDotList
/call SetHealList
/call SetBuffList
/call SetPetList
/call SetNuke
/call InitCure
/call GeneralDeclares2
/call SetupAdvLootVars
/call IntializeItemBuff
/if (!${MaID}) {
|/echo Need to set an MA in the INI or the MA isnt in zone!
}
/echo Shm mac started Version ${CurrentVersion}
/echo There are ${BcClients2} toons in EQBC
/if (${MA.NotEqual[Somebody]} && ${Spawn[pc ${MA}].ID}) {
/varset MaID ${Spawn[pc ${MA}].ID}
/echo MA is: ${MA}
} else {
/echo Need to set an MA in the INI or the MA isnt in zone!
/echo Setting the MA makes the macro run better.
/echo Use /setma <name>
}
/echo Ignoring Mobs: ${ExcludeList}
/echo Named Mobs: ${NameList}
/doevents flush
/call AAInit
/varset QueueCount 0
:Loop
/if ( ${MacroState.NotEqual[MAINLOOP]} ) {
/varset OldMacroState ${MacroState}
/varset MacroState MAINLOOP
}
/doevents
/if (${Me.Dead}) /call Wait4Rez
|**/if (${Me.Invis}) /goto :Loop**|
/call AssistMA
/if (${DebuffList.Count[[]}) {
/if (${DoDebuff}) /call Debuff
/if (${Spawn[${MATarget}].PctHPs}<${WhenToBurn} && ${NameList.Find[${Spawn[${MATarget}].CleanName}]}) /call BurnName
/if (${DoHeal}) /call CheckGrp
/if (${DoCure}) /call CheckCureGrp
/call Mana
} else /if (${MobList.Count[[]} && !${DebuffList.Count[[]}) {
|**|/echo MobList: ${MobList} |-| DebuffList: ${DebuffList} -- ${DebuffList.Count[[]}**|
/if (${DoHeal}) /call CheckGrp
/if (${Spawn[${MATarget}].PctHPs}<${WhenToBurn} && ${NameList.Find[${Spawn[${MATarget}].CleanName}]}) /call BurnName
/if (${DoNuke}) /call Nuke
/if (${DoDoT}) /call DoT
/if (${DoPanther}) /call Panther
/if (${DoHeal}) /call CheckGrp
/if (${UsePet}) /call Pet
/if (${DoCure}) /call CheckCureGrp
/if (${DebuffedList.Count[[]}) /call CheckDebuffs
/call Mana
} else /if (!${MobList.Count[[]}) {
/if (${DoHeal}) /call CheckGrp
/if (${DoCure}) /call CheckCureGrp
/call Mana
/if (!${UnSlowedAdds} && !${Me.Casting.ID}) {
/if ( ${UsePet} ) /call CheckPetBuff
/if (${DoWild} && !${WildTimer}) /call CheckWild
/call CheckSelfBuff
/doevents
/if (${QueueCount}) /call DoBuffEvents
}
/if (${Defined[MobList]} && ${MobList.Length}) /deletevar MobList
/if (!${Defined[MobList]}) /declare MobList string outer
}
/if (${Cursor.ID}) /autoinventory
/if (${DoLoot} && ${Me.CombatState.NotEqual[COMBAT]}) /call LootMobs
/if (${Spawn[${MATarget}].Dead} || ${Spawn[${MATarget}].Type.Equal[NULL]}) /varset MATarget 0
/if (${DoLeash} && !${DoLeashToon}) /call Leash
/if (${DoLeashToon}) /call DoLeashPerson
/if (!${CheckExpTimer}) /call AutoAdjustExp
/call UpdateMobList
/goto :Loop
/return
Sub CheckTanks
/varset OldGameState ${GameState}
/varset GameState CHECKTANK
/declare X int local
/for X 1 to 10
/if (${Spawn[${Me.XTarget[${X}].ID}].ID} && ${Spawn[${Me.XTarget[${X}].ID}].Type.Equal[PC]} && ${Spawn[${Me.XTarget[${X}].ID}].PctHPs}<=${${Spawn[id ${Me.XTarget[${X}].ID}].Class.ShortName}Point}) {
/if (${Spawn[${Me.XTarget[${X}].ID}].PctHPs}<=${${Spawn[id ${Me.XTarget[${X}].ID}].Class.ShortName}Point} && ${Spawn[${Me.XTarget[${X}].ID}].Distance}<=${Spell[${HealSpell}].MyRange} && ${Me.SpellReady[${HealSpell}]} && ${Spawn[${Me.XTarget[${X}].ID}].Type.Equal[PC]}) {
/if (${Announce} || ${Debug}) /${ChatChannel} Healing XTarget ${Spawn[${Me.XTarget[${X}].ID}].CleanName}
/call CastSpell "${HealSpell}" gem${HealGem} ${Spawn[${Me.XTarget[${X}].ID}].ID} CheckHP
}
}
/next X
/if (${Raid.Members} && !${AddTankTimer}) {
/call AddTanks
/call CreateTimer AddTankTimer
/varset AddTankTimer 60s
}
/varset GameState ${OldGameState}
/varset OldGameState CHECKTANK
/return
Sub AddTanks
/declare x int local
/declare b int local 1
/declare GroupList string local
/declare TempName string local
/declare Warriors int local
/declare SKS int local
/declare Paladins int local
/declare Rangers int local
/declare Zerkers int local
/declare Wizards int local
/declare Rogues int local
/declare Necros int local
/varset Warriors ${SpawnCount[pc warrior guild]}
/varset SKS ${SpawnCount[pc shadowknight guild]}
/varset Paladins ${SpawnCount[pc paladin guild]}
/varset Rangers ${SpawnCount[pc Ranger guild]}
/varset Zerkers ${SpawnCount[pc Berserker guild]}
/varset Wizards ${SpawnCount[pc Wizard guild]}
/varset Rogues ${SpawnCount[pc Rogue guild]}
/varset Necros ${SpawnCount[pc Necromancer guild]}
/for x 0 to ${Group}
/varset TempName [${Group.Member[${x}].Name}]
/varset GroupList ${GroupList}${TempName}
/next x
/if (${Rangers}) {
/for x 1 to ${Rangers}
/if (${b} >9) /return
/if (${GroupList.Find[${NearestSpawn[${x}, pc Ranger guild].Name}]}) /goto :skip4
/xtarget set ${b} ${NearestSpawn[${x}, pc Ranger guild]}
/varcalc b ${b}+1
:skip4
/next x
}
/if (${Zerkers}) {
/for x 1 to ${Zerkers}
/if (${b} >9) /return
/if (${GroupList.Find[${NearestSpawn[${x}, pc Berserker guild].Name}]}) /goto :skip5
/xtarget set ${b} ${NearestSpawn[${x}, pc Berserker guild]}
/varcalc b ${b}+1
:skip5
/next x
}
/if (${Wizards}) {
/for x 1 to ${Wizards}
/if (${b} >9) /return
/if (${GroupList.Find[${NearestSpawn[${x}, pc Wizard guild].Name}]}) /goto :skip6
/xtarget set ${b} ${NearestSpawn[${x}, pc Wizard guild]}
/varcalc b ${b}+1
:skip6
/next x
}
/if (${Rogues}) {
/for x 1 to ${Rogues}
/if (${b} >9) /return
/if (${GroupList.Find[${NearestSpawn[${x}, pc Rogue guild].Name}]}) /goto :skip7
/xtarget set ${b} ${NearestSpawn[${x}, pc Rogue guild]}
/varcalc b ${b}+1
:skip7
/next x
}
/if (${Necros}) {
/for x 1 to ${Necros}
/if (${b} >9) /return
/if (${GroupList.Find[${NearestSpawn[${x}, pc Necromancer guild].Name}]}) /goto :skip8
/xtarget set ${b} ${NearestSpawn[${x}, pc Necromancer guild]}
/varcalc b ${b}+1
:skip8
/next x
}
/return
Sub InitializeMac
/declare CurrentVersion string outer 4.0
/declare Counter int local
/declare MacroState string outer NULL
/declare OldMacroState string outer NULL
/declare iMobID int outer
/declare iMobArray int outer 10
/declare UnSlowedAdds int outer 0
/declare DebuffList string outer
/declare MobList string outer
/declare DebuffedList string outer
/declare iNumOfDots int outer
/declare Doting int outer
/declare MaID int outer
/declare MATarget int outer 0
/declare MobAgro int outer
/declare Interrupted int outer
/declare AddOneID int outer 0
/declare BcClients string outer
/declare BcClients2 int outer
/declare X int local
/declare BuffTimer timer outer 0s
/declare INIFile string outer ${MacroQuest.Server}_Shm_${Me.Name}
/varset BcClients ${NetBots.Client}
/varset BcClients2 ${Math.Calc[${BcClients.Count[ ]}+1]}
/call DeclareIniVar Version string SETTINGS 4.0
/call DeclareIniVar RaidSet int SETTINGS 0 /raidset
/call DeclareIniVar CanniSpell string SETTINGS "NULL"
/call DeclareIniVar CanniGem int SETTINGS 3
/if (${RaidSet}) {
/call IntializeRaidSettings
} else {
/call IntializeGrpSettings
}
/return
Sub IntializeRaidSettings
|/echo Intializing Raid Settings.
/call DeclareIniVar MA string RAID Somebody
/call DeclareIniVar DoDoT int RAID 0
/call DeclareIniVar DoWild int RAID 1
/call DeclareIniVar DoHeal int RAID 1
/call DeclareIniVar DoDebuff int RAID 1
/call DeclareIniVar DoNuke int RAID 1
/call DeclareIniVar DoCure int RAID 0
/call DeclareIniVar DoPanther int RAID 1
/call DeclareIniVar MobRadius int RAID 150
/call DeclareIniVar MasterList string RAID NULL
/call DeclareIniVar DoLoot int RAID 0
/call DeclareIniVar WhenToBurn int RAID 99
/return
Sub IntializeGrpSettings
|/echo Intializing Group Settings.
/call DeclareIniVar MA string SETTINGS Somebody /setma
/call DeclareIniVar DoDoT int SETTINGS 0 /dodot
/call DeclareIniVar DoWild int SETTINGS 1 /dowild
/call DeclareIniVar DoHeal int SETTINGS 1 /doheal
/call DeclareIniVar DoDebuff int SETTINGS 1 /dodebuff
/call DeclareIniVar DoNuke int SETTINGS 1 /donuke
/call DeclareIniVar DoCure int SETTINGS 0 /docure
/call DeclareIniVar DoPanther int SETTINGS 1 /dopanther
/call DeclareIniVar MobRadius int SETTINGS 150 /mobrad
/call DeclareIniVar MasterList string SETTINGS NULL
/call DeclareIniVar DoLoot int SETTINGS 0 /doloot
/call DeclareIniVar WhenToBurn int SETTINGS 99 /burn
/call DeclareIniVar DoShrink int SETTINGS 0 /doshrink
/return
Sub CheckTanks
/varset OldMacroState ${GameState}
/varset MacroState CHECKTANK
/declare X int local
/for X 1 to 7
/if (${Spawn[${Me.XTarget[${X}].ID}].ID} && ${Spawn[${Me.XTarget[${X}].ID}].Type.Equal[PC]}) {
/if (${Spawn[${Me.XTarget[${X}].ID}].PctHPs}<=${${Target.Class.ShortName}Point} && ${Spawn[${Me.XTarget[${X}].ID}].Distance}<=${Spell[${HealSpell}].MyRange} && ${Me.SpellReady[${HealSpell}]} && ${Spawn[${Me.XTarget[${X}].ID}].Type.Equal[PC]}) {
/echo Healing XTarget ${Spawn[${Me.XTarget[${X}].ID}].CleanName}
/call CastSpell "${HealSpell}" gem${HealGem} ${Spawn[${Me.XTarget[${X}].ID}].ID} CheckHP
}
}
/next X
/varset MacroState ${OldGameState}
/varset OldMacroState CHECKTANK
/return
Sub BurnName
/echo Burnin NAMED!!
/if (!${FindItem[Blessed spiritstaff of the heyokah].Timer}) {
/echo Clicking 2.0!!
/call CastItemClickyb "Blessed spiritstaff of the heyokah"
}
/if (${Me.AltAbilityReady[Fundament: Third Spire of Ancestors]}) {
/echo Clicking Third Spire!!
/call Cast "Fundament: Third Spire of Ancestors" alt 0
}
/if (${DoPanther}) /call Panther
/return
Sub MoveToTornado
/moveto loc ${Spawn[Tempest of Vyskudra].Y} ${Spawn[Tempest of Vyskudra].X}
/delay 2s ${Spawn[Tempest of Vyskudra].Distance}<30
/return
Sub AssistMA
/varset OldMacroState ${MacroState}
/varset MacroState ASSISTMA
/if (${MaID}) {
/if (${Spawn[${MA}].NearestSpawn[npc targetable radius ${MobRadius}].ID} && !${MATarget} && !${Me.Casting.ID} && ${Spawn[${MA}].LineOfSight} && ${Spawn[${MaID}].ID} && ${Spawn[${MaID}].Distance}<100 && ${Spawn[${MaID}].LineOfSight}) {
/if (${NetBots[${MA}].ID}) {
/if (${Spawn[${NetBots[${MA}].TargetID}].LineOfSight} && ${Spawn[${NetBots[${MA}].TargetID}].Type.Equal[NPC]} && !${ExcludeList.Find[${Spawn[id ${NetBots[${MA}].TargetID}].CleanName}]}) {
/varset MATarget ${NetBots[${MA}].TargetID}
/call AddToList MobList ${NetBots[${MA}].TargetID}
/if (${Spawn[${MATarget}].PctHPs}<${WhenToBurn} && ${NameList.Find[${Spawn[${MATarget}].CleanName}]}) /call BurnName
/if (${DoDebuff}) {
/call AddToList DebuffList ${NetBots[${MA}].TargetID}
/if (${DoDebuff}) /call Debuff
}
}
} else {
/assist ${Spawn[${MaID}].CleanName}
/delay 7
/if (${Target.LineOfSight} && ${Target.ID} && ${Target.Type.Equal[NPC]} && !${ExcludeList.Find[${Spawn[id ${Target.ID}].CleanName}]}) {
/call AddToList MobList ${Target.ID}
/if (${Spawn[${MATarget}].PctHPs}<${WhenToBurn} && ${NameList.Find[${Spawn[${MATarget}].CleanName}]}) /call BurnName
/if (${DoDebuff}) {
/call AddToList DebuffList ${Target.ID}
/if (${DoDebuff}) /call Debuff
}
}
}
}
}
/if (${DoDebuff}) /call GetMobs
/varset MacroState ${OldMacroState}
/varset OldMacroState ASSISTMA
/return
Sub GetMobs
/varset OldMacroState ${MacroState}
/varset MacroState GETMOBS
/declare lMobID string local
/declare Mobs int local 1
/declare Temp int local
:ParseNextMob
/if (${NearestSpawn[${Mobs},pet targetable range 45 110 radius ${MobRadius} zradius 50].Master.Type.Equal[NPC]}) {
/varset lMobID ${NearestSpawn[${Mobs}, targetable pet range 45 110 radius ${MobRadius} zradius 50].ID}
/if (!${MobList.Find[${lMobID}]} && ${Spawn[id ${lMobID}].Distance}<=${MobRadius} && ${Spawn[id ${lMobID}].LineOfSight} && !${ExcludeList.Find[${Spawn[id ${lMobID}].CleanName}]} && ${Spawn[${lMobID}].CleanName.Length}>1 && ${Spawn[${lMobID}].Type.NotEqual[Untargetable]}) {
|/echo ADDIN PET TO LIST!
/call AddToList MobList ${lMobID}
/if (!${DebuffList.Find[${lMobID}]} && ${DoDebuff}) {
/call AddToList DebuffList ${lMobID}
}
}
/varcalc Mobs ${Mobs}+1
}
/if (${NearestSpawn[${Mobs},npc targetable range 45 110 radius ${MobRadius} zradius 50].ID}) {
/varset lMobID ${NearestSpawn[${Mobs},npc targetable range 45 110 radius ${MobRadius} zradius 50].ID}
/if (!${MobList.Find[${lMobID}]} && ${Spawn[id ${lMobID}].Distance}<=${MobRadius} && ${Spawn[id ${lMobID}].LineOfSight} && !${ExcludeList.Find[${Spawn[id ${lMobID}].CleanName}]} && ${Spawn[${lMobID}].CleanName.Length}>1 && ${Spawn[${lMobID}].Type.NotEqual[Untargetable]} && ${Spawn[${lMobID}].State.NotEqual[FEIGN]}) {
/call AddToList MobList ${lMobID}
/if (${Spawn[${MATarget}].PctHPs}<${WhenToBurn} && ${NameList.Find[${Spawn[${MATarget}].CleanName}]}) /call BurnName
/if (!${DebuffList.Find[${lMobID}]} && ${DoDebuff}) {
/call AddToList DebuffList ${lMobID}
}
}
/varcalc Mobs ${Mobs}+1
}
/if (${NearestSpawn[${Mobs},npc targetable range 45 110 radius ${MobRadius} zradius 50].ID} || ${NearestSpawn[${Mobs},pet range 45 110 radius ${MobRadius} zradius 50].Master.Type.Equal[NPC]}) /goto :ParseNextMob
/varset MacroState ${OldMacroState}
/varset OldMacroState GETMOBS
/return
Sub AddToList(string listName,string tempID)
/if (!${${listName}.Find[${tempID}]}) {
/varset ${listName} ${${listName}}[${tempID}]
/if (${listName.Equal[DebuffList]}) {
/if (!${Defined[SlowTimer${tempID}]} && ${DoDebuff}) /declare SlowTimer${tempID} timer outer 0
/if (!${Defined[MaloTimer${tempID}]} && ${DoDebuff}) /declare MaloTimer${tempID} timer outer 0
/if (!${AddOneID}) /varset AddOneID ${Int[${tempID}]}
}
/return 1
}
/return 0
Sub DeleteFromList(string listName,string tempID)
/declare TempID string local [${tempID}]
/declare a int local
/declare b int local
/declare strLeft string local
/declare strRight string local
/varcalc a ${${listName}.Find[${TempID}]}-1
/varcalc b ${${listName}.Length}-${TempID.Length}-${a}
/if (${a}>0) /varset strLeft ${${listName}.Left[${a}]}
/if (${b}>0) /varset strRight ${${listName}.Right[${b}]}
/varset ${listName} ${strLeft}${strRight}
/return
Sub UpdateMobList
/declare a int local
/declare i int local
/declare MobListID string local
/if (${MobList.Find[[]}) {
/if (${MobList.Find[[]}>1) /varset MobList ${MobList.Right[-${Math.Calc[${MobList.Find[[]}-1]}]}
/for i ${MobList.Count[[]} downto 1
/varset MobListID ${MobList.Arg[${i},[].Left[-1]}
/if (${Spawn[${MobListID}].Dead} || !${Spawn[${MobListID}].LineOfSight} || ${Spawn[${MobListID}].Distance}>${MobRadius} || !${Spawn[${MobListID}].ID}) {
/if (${Defined[SlowTimer${MobListID}]}) /deletevar SlowTimer${MobListID}
/if (${Defined[MaloTimer${MobListID}]}) /deletevar MaloTimer${MobListID}
/if (${Int[${MobListID}]}==${MATarget}) {
/varset MATarget 0
/for a 1 to ${NumOfDots}
/varset DotTimer${a} 0
/next a
}
/if (${MobList.Find[${MobListID}]}) /call DeleteFromList MobList ${MobListID}
/if (${DebuffList.Find[${MobListID}]}) /call DeleteFromList DebuffList ${mobListID}
/if (${DebuffedList.Find[${MobListID}]}) /call DeleteFromList DebuffedList ${mobListID}
}
/next i
}
/return
Sub CheckWild
/if ((!${NetBots[${MA}].Buff.Find[${Spell[${WildSpell}].ID}]} || ${NetBots[${MA}].Duration[${Math.Calc[${Select[${Spell[${WildSpell}].ID},${NetBots[${MA}].Buff}]}-1]}]}<26) && ${Me.SpellReady[${WildSpell}]} && ${Spawn[${MA}].ID} && ${Spawn[${MA}].Distance}<=${Spell[${WildSpell}].MyRange}) {
/target pc ${MA}
/delay 5s ${Target.ID}==${Spawn[$MA].ID}
/if (${Target.ID}!=${Spawn[${MA}].ID}) /return
/call cast "${WildSpell}" gem4 10s
/if (${castReturn.Equal[CAST_SUCCESS]}) /varset WildTimer 120s
} else /if (!${Me.Gem[${WildSpell}]} && ${Spawn[${MA}].ID}) {
/memspell 4 ${WildSpell}
/delay 10s ${Me.Gem[${WildSpell}]}
}
/return
Sub AddToQueue(int Buffee,int BuffNumber)
/declare a int local
/declare Compare int local
/if (${QueueCount}<25 && !${Spawn[${Buffee}].Dead} && ${Spawn[${Buffee}].ID}) {
/varset Compare 0
/for a 1 to 25
/if ((${Buffee}==${DoBuffQueue[${a},1]} || (${Select[${Spell[${DoBuffID[${DoBuffQueue[${a},2]}]}].TargetType},"Group v2","AE PC v2","Group v1","AE PC v1"]} && (${Group.Member[${Spawn[${Buffee}].CleanName}]} || ${Group.Member[${Spawn[${Buffee}].Master.CleanName}]}) && ${Group.Member[${Spawn[${DoBuffQueue[${a},1]}].CleanName}]})) && ${BuffNumber}==${DoBuffQueue[${a},2]}) /varset Compare 1
/next a
/if (!${Compare}) {
/for a 1 to 25
/if (!${DoBuffQueue[${a},1]}) {
/varset DoBuffQueue[${a},1] ${Buffee}
/varset DoBuffQueue[${a},2] ${BuffNumber}
/varcalc QueueCount ${QueueCount}+1
/return
}
/next a
}
}
/return
Sub RemoveFromQueue(int Buffee,int BuffNumber)
/doevents IRC
/doevents Chat
/declare a int local
/for a 1 to 25
/if (((${Spawn[${DoBuffQueue[${a},1]}].State.Equal["DEAD"]} || !${Spawn[${DoBuffQueue[${a},1]}].ID}) || ((${DoBuffQueue[${a},1]}==${Buffee} || (!${Buffee} && (${Group.Member[${Spawn[${DoBuffQueue[${a},1]}].CleanName}]} || ${Group.Member[${Spawn[${DoBuffQueue[${a},1]}].Master.CleanName}]}))) && (${DoBuffID[${DoBuffQueue[${a},2]}]}==${BuffNumber} || ${DoBuffQueue[${a},2]}==${BuffNumber}))) && ${DoBuffQueue[${a},1]}) {
/varset DoBuffQueue[${a},1] 0
/varset DoBuffQueue[${a},2] 0
/varcalc QueueCount ${QueueCount}-1
}
/next a
/return
Sub CheckDoBuffs(Sender,ChatText)
/declare a int local
/declare i int local
/for i 1 to ${DoBuffTotal}
/for a 1 to ${DoBuffAliases${i}.Count[|]}
/if (${ChatText.Find["${DoBuffAliases${i}.Arg[${a},|]}"]}) {
/if (${ChatText.Find["pet"]} || ${ChatText.Find[${Spawn[pc ${Sender}].Pet.CleanName}]} || ${Spawn[pet ${Sender}].ID}) {
/echo Pet ${ChatText} -- ${DoBuffAliases${i}.Arg[${a},|]} - ${ChatText.Find["${DoBuffAliases${i}.Arg[${a},|]}"]}
/call AddToQueue ${Spawn[pc ${Sender}].Pet.ID} ${i}
} else {
/echo Person ${ChatText} -- ${DoBuffAliases${i}.Arg[${a},|]} - ${ChatText.Find["${DoBuffAliases${i}.Arg[${a},|]}"]}
/call AddToQueue ${Spawn[pc ${Sender}].ID} ${i}
}
}
/next a
/next i
/return
Sub DoBuffEvents
/declare a int local
/declare TempVar int local ${Math.Calc[${DoBuffTotal}+1]}
/declare TempGuy int local 0
/varset OldMacroState ${MacroState}
/varset MacroState DoBuffEvents
/for a 1 to 25
/if (${DoBuffQueue[${a},2]}<${TempVar} && ${Spawn[${DoBuffQueue[${a},1]}].ID} && !${Spawn[${DoBuffQueue[${a},1]}].Dead} && (${Spawn[${DoBuffQueue[${a},1]}].Distance}<${Spell[${DoBuffID[${DoBuffQueue[${a},2]}]}].MyRange} || ${Spawn[${DoBuffQueue[${a},1]}].Distance}<${Spell[${DoBuffID[${DoBuffQueue[${a},2]}]}].AERange})) {
/varset TempGuy ${DoBuffQueue[${a},1]}
/varset TempVar ${DoBuffQueue[${a},2]}
}
/next a
/if (${TempGuy}) /if (((${Me.SpellReady[${DoBuffCast${TempVar}}]} || !${Me.Gem[${DoBuffCast${TempVar}}]} || ${Spell[${DoBuffID[${TempVar}]}].RecastTime}<30) && ${Me.CurrentMana}>${Spell[${DoBuffID[${TempVar}]}].Mana} && ${Me.PctMana}>=${DoBuffMana${TempVar}}) || (${DoBuffGem${TempVar}.Equal[item]} && ${FindItem[${DoBuff${TempVar}}].TimerReady}<30) || (${DoBuffGem${TempVar}.Equal[alt]} && ${Me.AltAbilityReady[${DoBuff${TempVar}}]}<30)) {
/call CastSpell "${DoBuffCast${TempVar}}" gem${DoBuffGem${TempVar}} ${TempGuy}
/if (${castReturn.Equal[CAST_SUCCESS]} || ${spellNotHold}) /call RemoveFromQueue ${TempGuy} ${TempVar}
/doevents flush
}
/varset MacroState ${OldMacroState}
/varset OldMacroState DoBuffEvents
/return
Sub Mana
/if (${Me.PctMana}<=95 && ${Me.PctHPs}>=60 && ${Me.SpellReady["${CanniSpell}"]}) /call CastSpell "${CanniSpell}" ${CanniGem} 0 CheckALL
/if (${Me.PctMana}<=80 && ${Me.PctHPs}>=85 && ${Me.AltAbilityReady[Cannibalization]}) {
/delay 1s
/alt activate 47
/delay 3s
}
/if (!${FindItem[rod of prime transvergence].Timer} && ${Me.PctMana}<=80 && ${Me.PctHPs}>=54 ) /call cast "rod of prime transvergence" Item 0s
/if (${Me.PctHPs}<85 && !${Me.Song[${HotSpell}].ID} && ${Me.SpellReady[${HotSpell}]}) {
/call CastSpell "${HotSpell}" gem${HoTGem} ${Me.ID} CheckALL
}
/if (!${Me.Mount.ID}) /call CheckSit
/return
Sub CheckDTGargoyle
/declare GargRace string local Gargoyle
/declare WolfRace string local Werewolf
/declare b int local
/for b 0 to ${Group.Members}
:CureZiDT
/if (${Group.Member[${b}].Race.Name.Equal[${GargRace}]}) {
/target id ${Group.Member[${b}].ID}
/delay 2s ${Target.ID}==${Group.Member[${b}].ID}
/bc INC RGC on ==[ ${Target.CleanName} ]==
/call Cast "Remove Greater Curse" gem6 5s CheckCured
/if (${Macro.Return.NotEqual[CAST_SUCCESS]}) /goto :CureZiDT
}
|**/if (${Group.Member[${b}].Race.Name.Equal[${WolfRace}]}) {
/target id ${Group.Member[${b}].ID}
/delay 2s ${Target.ID}==${Group.Member[${b}].ID}
/bc INC Cure Corruption Rk. III on ==[ ${Target.CleanName} ]==
/call Cast "Cure Corruption Rk. III" gem8 5s
/if (${Macro.Return.NotEqual[CAST_SUCCESS]}) /goto :CureZiDT
}**|
/next b
|**
:Startagain
/if (${SpawnCount[pc race ${GargRace}]} && ${NearestSpawn[pc race ${GargRace}].Distance}<${Spell[Remove Greater Curse].MyCastRange}) {
/target id ${Spawn[pc race ${GargRace}].ID}
/delay 1s ${Target.Race.Name.Equal[${GargRace}]}
/if (${Target.Race.Name.Equal[${GargRace}]}) {
/bc INC RGC on ==[ ${Target.CleanName} ]==
/call Cast "Remove Greater Curse" gem6 5s CheckCured
}
}
/if (${SpawnCount[pc race ${WolfRace}]} && ${NearestSpawn[pc race ${WolfRace}].Distance}<${Spell[Cure Corruption Rk. III].MyCastRange}) {
/target id ${Spawn[pc race ${WolfRace}].ID}
/delay 1s ${Target.Race.Name.Equal[${WolfRace}]}
/if (${Target.Race.Name.Equal[${GargRace}]}) {
/bc INC Cure Corruption Rk. III on ==[ ${Target.CleanName} ]==
/call Cast "Cure Corruption Rk. III" gem8 5s
}
/goto :Startagain
}**|
/doevents
/return
Sub CheckCured
/declare GargRace string local Gargoyle
/if (${Target.Race.Name.NotEqual[${GargRace}]}) /call Interrupt
/return
Sub Panther
/if (!${Me.Buff[${PantherSpell}].ID}) {
/call CastSpell "${PantherSpell}" gem${PantherSpellGem} ${Me.ID}
/return
}
/return
Sub CheckSit
/varset OldMacroState ${MacroState}
/varset MacroState CHECKSIT
/doevents Summon
/doevents ImHit
/if (${Me.CombatState.NotEqual[COMBAT]} && ${Me.CombatState.Equal[ACTIVE]} && ${Me.Standing} && ${Me.PctMana}<98 && !${Me.Casting.ID}) {
/if (${MobAgro}) /varset MobAgro 0
/sit
} else /if (!${MobAgro} && !${Me.Sitting} && !${Me.Mount.ID} && ${Me.PctMana}<=85 && !${Me.Sitting} && !${Me.Casting.ID} ) {
/sit
} else /if (${MobAgro} && ${Me.Sitting} && !${Me.Mount.ID}) {
/stand
}
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKSIT
/return
Sub CheckList
/return
/declare a int local
/declare b int local
/for a 1 to ${iMobArray}
/if (${iDebuffList[${a}}) {
|/echo --------------------------
|/echo Mob${a} - ${Spawn[id ${iDebuffList[${a}]}].CleanName}
|/echo --------------------------
}
/next a
/return
Sub SetDebuffList
/call DeclareIniVar MaloSpell string DEBUFFS "Malis Rk. II"
/call DeclareIniVar MaloType string DEBUFFS "gem8"
/call DeclareIniVar MaloList string DEBUFFS "NULL"
/call DeclareIniVar SlowSpell1 string DEBUFFS "Turgur's Swarm"
/call DeclareIniVar SlowType1 string DEBUFFS "alt"
/call DeclareIniVar SlowSpell2 string DEBUFFS "Time's Antithesis"
/call DeclareIniVar SlowType2 string DEBUFFS "item"
/call DeclareIniVar AESlowSpell string DEBUFFS "Tortugone's Drowse"
/call DeclareIniVar AESlowType string DEBUFFS "gem4"
/call DeclareIniVar SlowList string DEBUFFS "NULL"
/return
Sub Debuff
/varset OldMacroState ${MacroState}
/varset MacroState DEBUFF
/if (!${DoDebuff}) /goto :EndDebuffMob
/declare a int local 1
/declare i int local
/declare Counter int local ${DebuffList.Count[[]}
/declare IsSlow int local
/declare IsMalo int local
/declare tempID string local
:DebuffNextMob
/if (${DebuffList.Left[1].NotEqual[[]}) {
/varset DebuffList [2${DebuffList}
/call DeleteFromList DebuffList ${DebuffList.Arg[1,[].Left[-1]}
}
/if ((${Me.SpellReady[${AESlowSpell}]} || ${AESlowType.Equal[alt]} && ${Me.AltAbilityReady[${AESlowSpell}]}) && ${DebuffList.Count[[]}>=3) {
/call CastSpell "${AESlowSpell}" ${AESlowType} ${DebuffList.Arg[1,[].Left[-1]} CheckALL
}
/varset tempID ${DebuffList.Arg[1,[].Left[-1]}
/if (${Spawn[${tempID}].ID} && ${tempID} && !${Spawn[${tempID}].Dead}) {
/varset IsMalo 0
/varset IsSlow 0
:RecastDebuff
/if (${Spawn[id ${tempID}].LineOfSight} && ${Spawn[${tempID}].Distance}<=${MobRadius} && !${Spawn[${tempID}].Dead} && (!${MaloTimer${tempID}} || !${SlowTimer${tempID}})) {
/target id ${tempID}
/delay 2s ${Target.ID}==${tempID}
/if (${Me.LAInspectBuffs} || ${Group.GroupSize}>=3) {
/delay 5 ${Target.BuffCount}
/if (!${Target.BuffCount}) {
/if (!${MaloTimer${tempID}}) /call Malo ${tempID}
/if (!${SlowTimer${tempID}}) /call Slow ${tempID}
/goto :EndDebuffMob
}
/for i 1 to ${Target.BuffCount}
/if (${MaloList.Find[${Target.Buff[${i}]}]} && !${MaloTimer${tempID}}) {
/varcalc MaloTimer${tempID} ${Target.BuffDuration[${i}]}*6-15
/varset IsMalo 1
/if (${IsSlow}) /goto :EndDebuffMob
} else /if (${SlowList.Find[${Target.Buff[${i}]}]} && !${SlowTimer${tempID}}) {
/varcalc SlowTimer${tempID} ${Target.BuffDuration[${i}]}*6-15
/if (${UnSlowedAdds}) /varcalc UnSlowedAdds ${UnSlowedAdds}-1
/varset IsSlow 1
/if (${IsMalo}) /goto :EndDebuffMob
}
/next i
/if (!${MaloTimer${tempID}}) /call Malo ${tempID}
/if (!${SlowTimer${tempID}}) /call Slow ${tempID}
} else /if (${Target.ID}!=${tempID} || ${Target.Type.Equal[PC]}) {
/goto :RecastDebuff
} else {
/if (!${MaloTimer${tempID}}) /call Malo ${tempID}
/if (!${SlowTimer${tempID}}) /call Slow ${tempID}
}
} else /if (${Spawn[id ${tempID}].Dead}) {
/call UpdateMobList
}
} else {
/call DeleteFromList DebuffList ${tempID}
}
:EndDebuffMob
/if (${Spawn[${tempID}].ID}) {
/if (${MaloTimer${tempID}} && ${SlowTimer${tempID}}) {
/call DeleteFromList DebuffList ${tempID}
/call AddToList DebuffedList ${tempID}
} else /if (${Spawn[${tempID}].ID} && ${tempID}) {
/goto :DebuffNextMob
}
}
/varset AddOneID 0
/varset UnSlowedAdds 0
/varset MacroState ${OldMacroState}
/varset OldMacroState DEBUFF
/return
Sub CheckDebuffs
/declare a int local
/declare tempID int local
/for a 1 to ${DebuffedList.Count[[]}
/varset tempID ${DebuffedList.Arg[${a},[].Left[-1]}
:CheckDebuffs
/if (!${MaloTimer${tempID}} && !${Spawn[${tempID}].Dead} && ${Spawn[${tempID}].ID} && ${tempID} && ${DoDebuff}) /call Malo ${tempID}
/if (!${SlowTimer${tempID}} && !${Spawn[${tempID}].Dead} && ${Spawn[${tempID}].ID} && ${tempID} && ${DoDebuff}) /call Slow ${tempID}
/if ((!${MaloTimer${tempID}} || !${SlowTimer${tempID}}) && !${Spawn[${tempID}].Dead} && ${Spawn[${tempID}].ID} && ${tempID}) /goto :CheckDebuffs
/next a
/return
Sub Malo(int MaloID)
/declare tempID int local ${MaloID}
/declare MaloResistCounter int local 0
:RecastMalo
/if (${Spawn[${tempID}].Type.NotEqual[PC]} && ${Spawn[${tempID}].Distance}<=${Spell[${MaloSpell}].MyRange} && ${Spawn[${tempID}].LineOfSight}) {
|/echo Casting Malo on ${Spawn[${tempID}].CleanName}
/call CastSpell "${MaloSpell}" ${MaloType} ${tempID} CheckALL
/if (${castReturn.Equal[CAST_SUCCESS]}) {
/if (${Defined[MaloTimer${tempID}]}) {
/varcalc MaloTimer${tempID} ${Spell[${MaloSpell}].Duration.TotalSeconds}*.975*10
} else {
/declare MaloTimer${tempID} timer outer ${Math.Calc[${Spell[${MaloSpell}].Duration.TotalSeconds}*.975*10]}
}
} else /if (${castReturn.Equal[CAST_IMMUNE]} || ${spellNotHold}) {
/if (${Defined[MaloTimer${tempID}]}) {
/varset MaloTimer${tempID} 1000s
} else {
/declare MaloTimer${tempID} timer outer 1000s
}
} else /if (${castReturn.Equal[CAST_RESISTED]}) {
/varcalc MaloResistCounter ${MaloResistCounter}+1
/if (${MaloResistCounter}>=2) {
/if (${Defined[MaloTimer${tempID}]}) {
/varset MaloTimer${tempID} 1000s
} else {
/declare MaloTimer${tempID} timer outer 1000s
}
/return
} else {
/goto :RecastMalo
}
} else /if (${Interrupted} || ${castReturn.Equal[CAST_INTERRUPTED]}) {
/varset Interrupted 0
/varcalc MaloResistCounter ${MaloResistCounter}-1
/goto :RecastMalo
}
} else {
/if (${Defined[MaloTimer${tempID}]}) {
/varset MaloTimer${tempID} 1000s
} else {
/declare MaloTimer${tempID} timer outer 1000s
}
}
/return
Sub Slow(int SlowID)
/declare tempID int local ${SlowID}
/declare SlowResistCounter int local 0
:RecastSlow
/if (${Spawn[${tempID}].Type.NotEqual[PC]} && ${Spawn[${tempID}].Distance}<=${Spell[${SlowSpell1}].MyRange} || (${Select[${SlowType1},item,alt]} && ${Spawn[${tempID}].Distance}<=200)) {
/if ((${SlowType1.Equal[alt]} && ${Me.AltAbilityReady[${SlowSpell1}]}) || (${SlowType1.Find[gem]} && ${Me.SpellReady[${SlowSpell1}]})) {
|/echo Casing Slow1 on ${Spawn[${tempID}].CleanName}
/call CastSpell "${SlowSpell1}" ${SlowType1} ${tempID} CheckALL
} else {
/goto :RecastSlow
}
/if (${castReturn.Equal[CAST_IMMUNE]} || ${spellNotHold}) {
/varset SlowTimer${tempID} 1000s
} else /if (${castReturn.Equal[CAST_SUCCESS]}) {
/if (${Defined[SlowTimer${tempID}]}) {
/varcalc SlowTimer${tempID} ${Spell[${SlowSpell1}].Duration.TotalSeconds}*.975*10
} else {
/declare SlowTimer${tempID} timer outer ${Math.Calc[${Spell[${SlowSpell1}].Duration.TotalSeconds}*.975*10]}
}
/if (${UnSlowedAdds}) /varcalc UnSlowedAdds ${UnSlowedAdds}-1
||/echo ${Spawn[${tempID}].CleanName} has been slowed.
} else /if (${castReturn.Equal[CAST_RESISTED]}) {
/if (${SlowResistCounter}<5 && ${Target.LineOfSight}) {
||/echo Casing Slow2 on ${Spawn[${tempID}].CleanName}
/call Cast "${SlowSpell2}" ${SlowType2} ${tempID} CheckALL
/if (${castReturn.Equal[CAST_SUCCESS]}) {
/if (${Defined[SlowTimer${tempID}]}) {
/varcalc SlowTimer${tempID} ${Spell[${SlowSpell1}].Duration.TotalSeconds}*.975*10
} else {
/declare SlowTimer${tempID} timer outer ${Math.Calc[${Spell[${SlowSpell1}].Duration.TotalSeconds}*.975*10]}
}
/if (${UnSlowedAdds}) /varcalc UnSlowedAdds ${UnSlowedAdds}-1
/return
}
}
/varcalc SlowResistCounter ${SlowResistCounter}+1
/if (${SlowResistCounter}>=4) {
/if (${Defined[SlowTimer${tempID}]}) {
/varset SlowTimer${tempID} 10000s
} else {
/declare SlowTimer${tempID} timer outer 1000s
}
/return
} else {
/goto :RecastSlow
}
} else /if (${Select[${castReturn},CAST_OUTOFMANA,CAST_OUTOFRANGE,CAST_CANNOTSEE]}) {
/varset SlowTimer${tempID} 50
} else /if (${Interrupted} || ${castReturn.Equal[CAST_INTERRUPTED]}) {
/varset Interrupted 0
/varcalc MaloResistCounter ${MaloResistCounter}-1
/goto :RecastSlow
}
} else {
/if (${Defined[SlowTimer${tempID}]}) {
/varset SlowTimer${tempID} 10000s
} else {
/declare SlowTimer${tempID} timer outer 1000s
}
}
/return
Sub SetDotList
/declare a int local
/declare i int local
/call DeclareIniVar NumOfDots int DOTS 4 /numofdots DOTS
/call DeclareIniVar DotMinManaPct int DOTS 35
/for i 1 to ${NumOfDots}
/call DeclareIniVar Dot${i} string DOTS "DotName"
/call DeclareIniVar DotType${i} string DOTS "Type"
/declare DotTimer${Spell[${Dot${i}}].ID} timer outer 0
/next i
/for a 1 to ${NumOfDots}
/declare DotTimer${a} timer outer 0
/next a
/return
Sub DoT
/varset OldMacroState ${MacroState}
/varset MacroState DOT
/declare TimesCast int local 0
/declare a int local
/if (!${MATarget} || ${Spawn[${MATarget}].Dead}) /call GetMaTarget
/if (${Spawn[${MATarget}].Type.NotEqual[NPC]} || ${Spawn[${MATarget}].Dead} || !${MATarget}) {
/varset MATarget 0
/if (${DoDebuff}) /call GetMobs
/goto :GetOutSubDot
}
/if (!${MobList.Find[${MATarget}]} || !${DebuffList.Find[${MATarget}]}) /call GetMobs
/if (!${MaloTimer${MATarget}} && ${DoDebuff}) /call Malo ${MATarget}
/if (!${SlowTimer${MATarget}} && ${DoDebuff}) /call Slow ${MATarget}
/varset Doting 1
/for a 1 to ${NumOfDots}
/varset TimesCast 0
:RecastDot
/if (!${Me.SpellReady[${Me.Gem[1]}]} && !${Me.SpellReady[${Me.Gem[2]}]} && !${Me.SpellReady[${Me.Gem[3]}]} && !${Me.SpellReady[${Me.Gem[4]}]}) {
/call CheckGrp
/delay 3s ${Me.SpellReady[${Dot${a}}]}
}
/if (!${DotTimer${a}} && ${Spawn[id ${MATarget}].LineOfSight} && ${Spawn[${MATarget}].Distance}<${MobRadius} && !${Spawn[${MATarget}].Dead} && ${Spawn[${MATarget}].Type.Equal[NPC]}) {
/if (${DotType${a}.Find[gem]} && ${Spawn[id ${MATarget}].PctHPs}>30 && ${Me.PctMana}>${DotMinManaPct} && ${Me.SpellReady[${Dot${a}}]}) {
|/echo Dotting ${Spawn[id ${MATarget}].CleanName} with ${Dot${a}}
/call CastSpell "${Dot${a}}" "${DotType${a}}" ${MATarget} CheckALL
/varcalc TimesCast ${TimesCast}+1
} else /if (${DotType${a}.Equal[item]}) {
/echo Dotting ${Spawn[id ${MATarget}].CleanName} with ${Dot${a}}
/call CastSpell "${Dot${a}}" "${DotType${a}}" ${MATarget} CheckALL
/varcalc TimesCast ${TimesCast}+1
} else {
/goto :BreakOutDot
}
/if (${castReturn.Equal[CAST_IMMUNE]} || ${spellNotHold}) {
/varset DotTimer${a} 10000s
} else /if (${Macro.Return.Equal[DEAD]}) {
/goto :GetOutSubDot
} else /if (${castReturn.Equal[CAST_SUCCESS]} && !${Interrupted}) {
/if ( ${DotType${a}.Equal[item]} ) {
/varset DotTimer${a} ${Math.Calc[${FindItem[${Dot${a}}].Spell.Duration.TotalSeconds}-6]}s
/varset DotTimer${FindItem[${Dot${a}}].Spell.ID} ${Math.Calc[${FindItem[${Dot${a}}].Spell.Duration.TotalSeconds}-6]}s
} else /if ( ${TimesCast}>1 ) {
/varset DotTimer${a} 10000s
/goto :BreakOutDot
} else {
/varset DotTimer${a} ${Math.Calc[${Spell[${Dot${a}}].Duration.TotalSeconds}-6]}s
/varset DotTimer${Spell[${Dot${a}}].ID} ${Math.Calc[${Spell[${Dot${a}}].Duration.TotalSeconds}-6]}s
}
} else /if (${Interrupted} || ${castReturn.Equal[CAST_INTERRUPTED]}) {
/varset Interrupted 0
/varcalc TimesCast ${TimesCast}-1
/goto :RecastDot
} else {
/goto :RecastDot
}
}
:BreakOutDot
/next a
:GetOutSubDot
/varset Doting 0
/varset MacroState ${OldMacroState}
/varset OldMacroState DOT
/return
Sub SetNuke
/call DeclareIniVar NumOfNuke int NUKES 2
/call DeclareIniVar NukeMinManaPct int NUKES 35
/call DeclareIniVar Nuke1 string NUKES "Sting of the Queen Rk.II"
/call DeclareIniVar NukeType1 string NUKES gem9
/call DeclareIniVar NukeAt1 int NUKES 80
/call DeclareIniVar NukeStop1 int NUKES 0
/call DeclareIniVar Nuke2 string NUKES "Ahnkaul's Spear of Venom"
/call DeclareIniVar NukeType2 string NUKES gem4
/call DeclareIniVar NukeAt2 int NUKES 80
/call DeclareIniVar NukeStop2 int NUKES 0
/return
Sub Nuke
/varset OldMacroState ${MacroState}
/varset MacroState NUKE
/declare a int local
/if (!${MATarget} || ${Spawn[${MATarget}].Dead}) /call GetMaTarget
/if ( ${Spawn[${MATarget}].Type.NotEqual[NPC]} || ${Spawn[${MATarget}].Dead} ) {
/varset MATarget 0
/if (${DoDebuff}) /call GetMobs
/goto :BreakOutNuke
}
:TopOfNuke
/for a 1 to ${NumOfNuke}
/doevents
/if (${Me.Book["${Nuke${a}}"]}) {
/if ( ${Spawn[${MATarget}].ID} && ${Spawn[${MATarget}].Type.Equal[NPC]} && ${Spawn[${MATarget}].PctHPs}<=${NukeAt${a}} && ${Spawn[${MATarget}].PctHPs}>=${NukeStop${a}} && ${Me.PctMana}>${NukeMinManaPct} ) {
/if (${Me.SpellReady["${Nuke${a}}"]}) {
/if ( ${Target.ID}!=${MATarget} ) {
/target id ${MATarget}
/delay 1s ${Target.ID}==${MATarget}
}
/call CastSpell "${Nuke${a}}" "${NukeType${a}}" ${MATarget} CheckALL
} else /if ( !${Me.Gem["${Nuke${a}}"]} ) {
/memspell ${NukeType${a}.Right[1]} "${Nuke${a}}"
/delay 10s ${Me.Gem[${NukeType${a}.Right[1]}].Name.Equal[${Nuke${a}}]}
}
}
}
/next a
/if ( ${Me.PctMana}<=95 && ${Me.PctHPs}>=85 && ${Me.SpellReady["${CanniSpell}"]} ) /call CastSpell "${CanniSpell}" ${CanniGem} 0 CheckALL
:BreakOutNuke
/varset MacroState ${OldMacroState}
/varset OldMacroState NUKE
/return
Sub CastSpell(string sSpell,string sType,int iTarget,string sCheckUp)
/if (${sSpell.Equal[NULL]} || ${sType.Equal[NULL]}) {
/return
}
:ReTarget
/if ( ${iTarget} && ${Target.ID}!=${iTarget} && ${Spawn[id ${iTarget}].ID} && !${Spawn[id ${iTarget}].Dead}) {
/squelch /target id ${iTarget}
/delay 2s ${Target.ID}==${iTarget}
/if ( ${Target.ID}!=${iTarget} ) {
/if (${Me.Dead}) /call Wait4Rez
/goto :ReTarget
}
} else /if (${Spawn[id ${iTarget}].Type.Equal[PC]} && ${Spawn[${Spawn[id ${iTarget}].Name}].ID}!=${iTarget}) {
/target id ${Spawn[${Spawn[id ${iTarget}].Name}].ID}
/delay 2s ${Target.ID}==${Spawn[${Spawn[id ${iTarget}].Name}].ID}
} else /if (!${Spawn[id ${iTarget}].ID} && ${iTarget} && !${Spawn[${Spawn[id ${iTarget}].Name}].ID} && ${Spawn[id ${iTarget}].Dead}) {
/if (${DoDebuff}) {
/call UpdateMobList
/call GetMobs
}
/return DEAD
}
/if (${Target.Dead} || ${Spawn[id ${iTarget}].Dead}) {
/if (${DoDebuff}) /call GetMobs
/return DEAD
}
/if (!${Me.Gem[${sSpell}]} && ${sType.Find[gem]} && ${Me.Book[${sSpell}]}) {
/if (${sType.Length}==4) /memspell ${sType.Right[1]} "${sSpell}"
/if (${sType.Length}==5) /memspell ${sType.Right[2]} "${sSpell}"
/delay 10s ${Me.Gem[${sType.Right[1]}].Name.Equal[${sSpell}]}
} else /if (!${Me.Book[${sSpell}]} && ${sType.Find[gem]}) {
/return
}
:WaitToCast
/doevents
/if (!${Me.SpellReady["${sSpell}"]} && ${sType.Find[gem]}) {
/if (!${Me.Gem[${sSpell}]} && ${Me.Book[${sSpell}]}) /goto :ReTarget
/if (${Me.Dead}) /call Wait4Rez
/call CheckALL
/if (!${Spawn[${iTarget}].ID}) /return DEAD
/goto :WaitToCast
}
/if (${sType.Equal[item]}) {
/echo Its an ITEM!!
/if (${FindItem[${sSpell].InvSlot}) /call CastItemClickyb ${sSpell}
} else /if ( ${sCheckUp.NotEqual[NULL]} ) {
/call Cast "${sSpell}" ${sType} 0 ${sCheckUp}
} else {
/call Cast "${sSpell}" ${sType} 0
}
/return ${Macro.Return}
Sub SetHealList
/declare WorstHurt int outer 0
/declare WorstHp int outer 100
/declare WorstClass string outer NULL
/declare MinorHurt int outer 0
/declare MajorHurt int outer 0
/declare HoTTimer timer outer 0
/declare DaTimer timer outer 0
/call DeclareIniVar HealSpell string HEAL "Ancient: Wilslik's Mending"
/call DeclareIniVar HealGem int HEAL 1
/call DeclareIniVar HotSpell string HEAL "Halcyon Breeze Rk. II"
/call DeclareIniVar HoTGem int HEAL 2
/call DeclareIniVar GroupHoT string HEAL "Ghost of Renewal"
/call DeclareIniVar GroupGem int HEAL 4
/call DeclareIniVar InterventionSpell string HEAL "Ancestral Intervention RK. II"
/call DeclareIniVar HealRange int HEAL 150
/call DeclareIniVar GroupRange int HEAL 100
/call DeclareIniVar EmgHealMod int HEAL 60
/call DeclareIniVar HealPriority int HEAL 0 /healp
/call DeclareIniVar CLRPoint int HEAL 80
/call DeclareIniVar DRUPoint int HEAL 70
/call DeclareIniVar SHMPoint int HEAL 60
/call DeclareIniVar WIZPoint int HEAL 75
/call DeclareIniVar MAGPoint int HEAL 75
/call DeclareIniVar ENCPoint int HEAL 80
/call DeclareIniVar NECPoint int HEAL 75
/call DeclareIniVar WARPoint int HEAL 45
/call DeclareIniVar MNKPoint int HEAL 60
/call DeclareIniVar ROGPoint int HEAL 60
/call DeclareIniVar RNGPoint int HEAL 60
/call DeclareIniVar BSTPoint int HEAL 60
/call DeclareIniVar SHDPoint int HEAL 50
/call DeclareIniVar BRDPoint int HEAL 65
/call DeclareIniVar BERPoint int HEAL 60
/call DeclareIniVar PALPoint int HEAL 50
/return
Sub CheckGrp
/varset OldMacroState ${MacroState}
/varset MacroState CHECKGRP
/declare b int local
:HealTop
/varset WorstHurt 0
/varset WorstHp 100
/varset WorstClass NULL
/varset MinorHurt 0
/varset MajorHurt 0
/for b 0 to ${Group.Members}
/if ((${Spawn[pc id ${Group.Member[${b}].ID}].ID} || ${Spawn[mercenary id ${Group.Member[${b}].ID}].ID}) && ${Group.Member[${b}].Distance}<=${Spell[${HealSpell}].MyRange} && ${Group.Member[${b}].PctHPs}<=${WorstHp} && !${Group.Member[${b}].Dead}) {
/varset WorstHurt ${Group.Member[${b}].ID}
/varset WorstHp ${Group.Member[${b}].PctHPs}
/varset WorstClass ${Group.Member[${b}].Class.ShortName}
}
/if (${Group.Member[${b}].PctHPs}<85 && ${Group.Member[${b}].PctHPs}>${${Group.Member[${b}].Class.ShortName}Point}*.7 && ${Group.Member[${b}].Distance}<=${Spell[${GroupHoT}].AERange}) {
/varcalc MinorHurt ${MinorHurt}+1
} else /if (${Group.Member[${b}].PctHPs}<${${Group.Member[${b}].Class.ShortName}Point}*.7 && ${Group.Member[${b}].Type.NotEqual[Corpse]} && ${Group.Member[${b}].Distance}<=${Spell[${GroupHoT}].AERange}) {
/varcalc MajorHurt ${MajorHurt}+1
}
/next b
/if (!${MajorHurt} && !${MinorHurt} || ${Spawn[${WorstHurt}].CleanName.Equal[NULL]} || ${Spawn[${WorstHurt}].PctHPs}>${${WorstClass}Point} || ${Me.Buff["Bestow Divine Aura"].ID}) /goto :GetOutChkGrp
/if (${Spawn[${WorstHurt}].PctHPs}<=${${WorstClass}Point}*.5 && ${Spawn[${WorstHurt}].Distance}<=${Spell[${InterventionSpell}].MyRange} && ${Me.SpellReady[${InterventionSpell}]}) {
/if (${Me.Casting.ID}) /call Interrupt
/echo Interrupting a spell. CheckGrp DivARB
/call Cast "${InterventionSpell}" gem10 1s
}
/if (${Math.Calc[${MajorHurt}+${MinorHurt}]}>3 && ${Me.SpellReady[${GroupHoT}]} && ${Spell[${GroupHoT}].Stacks[0]} && ${Me.CurrentMana}>${Spell[${GroupHoT}].Mana} && !${Me.Buff[${GroupHoT}].ID}) {
/call CastSpell "${GroupHoT}" gem${GroupGem} ${Me.ID} CheckALL 50
/if ( !${castReturn.Equal[CAST_SUCCESS]} ) /goto :HealTop
/goto :GetOutChkGrp
}
/if ( ${Spawn[${WorstHurt}].PctHPs}<=${${WorstClass}Point} && ${Spawn[${WorstHurt}].Distance}<=${Spell[${HealSpell}].MyRange} && ${Me.CurrentMana}>${Spell[${HealSpell}].Mana} ) {
|/echo Healing ${Spawn[${WorstHurt}].CleanName}
/call CastSpell "${HealSpell}" gem${HealGem} ${WorstHurt} CheckALL 50
/if ( !${castReturn.Equal[CAST_SUCCESS]} ) /goto :HealTop
}
:GetOutChkGrp
/if ( ${Me.PctHPs}<85 && !${Me.Song[${HotSpell}].ID} && ${Me.SpellReady[${HotSpell}]} ) {
/call CastSpell "${HotSpell}" gem${HoTGem} ${Me.ID} CheckALL 50
}
/if (${Spawn[id ${MaID}].PctHPs}<=85 && !${HoTTimer} ) {
/call CastSpell "${HotSpell}" gem${HoTGem} ${MaID} CheckALL 50
/if (${Macro.Return.Equal[CAST_SUCCESS]} ) /varset HoTTimer 65s
}
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKGRP
/return
Sub CheckHP(int HealModPct)
/varset OldMacroState ${MacroState}
/varset MacroState CHECKHP
/declare TempHealModPct int local 10
/if (${HealModPct}) {
/varset TempHealModPct ${EmgHealMod}
} else {
/varset TempHealModPct ${HealModPct}
}
/declare lWorstHurt int local
/declare lWorstHp int local
/declare lWorstClass string local
/declare lMajorHurt int local
/declare a int local
:HealTopB
/if (!${Me.Casting.ID}) /goto :EndCHKHP
/varset lWorstHurt 0
/varset lWorstHp 100
/varset lWorstClass NULL
/varset lMajorHurt 0
/for a 0 to ${Group.Members}
/if (${Group.Member[${a}].ID} && ${Group.Member[${a}].Distance}<=${HealRange} && ${Group.Member[${a}].PctHPs}<=${lWorstHp}) {
/varset lWorstHurt ${Group.Member[${a}].ID}
/varset lWorstHp ${Group.Member[${a}].PctHPs}
/varset lWorstClass ${Group.Member[${a}].Class.ShortName}
}
/if (${Group.Member[${a}].ID} && ${Group.Member[${a}].PctHPs}<${${Group.Member[${a}].Class.ShortName}Point}*${EmgHealMod} && ${Group.Member[${a}].Distance}<${HealRange}) /varcalc lMajorHurt ${lMajorHurt}+1
/next a
/if (${Spawn[${lWorstHurt}].PctHPs}<=${${lWorstClass}Point}*.5 && ${Spawn[${lWorstHurt}].Distance}<=${Spell[${InterventionSpell}].MyRange} && ${Me.SpellReady[${InterventionSpell}]} && ${Me.CurrentMana}>${Spell[${InterventionSpell}].Mana}) {
/if (${Me.Casting.ID}) /call Interrupt
/varset Interrupted 1
/echo Interrupted to divarb!
/call Cast "${InterventionSpell}" gem10 1s
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKHP
/return CAST_INTERRUPTED
}
/if (${Spawn[${lWorstHurt}].PctHPs}<${Math.Calc[${${lWorstClass}Point}*${TempHealModPct}/100]} && ${Me.CurrentMana}>${Spell[${HealSpell}].Mana} && ${Spawn[${lWorstHurt}].Distance}<=${Spell[${HealSpell}].MyRange} && ${Target.ID}!=${lWorstHurt} && ${Target.PctHPs}>${Math.Calc[${${Target.Class.ShortName}Point}*${TempHealModPct}/120]} || ${Spawn[${lWorstHurt}].ID}==${Me.ID} && ${Target.ID}!=${Me.ID} && ${Me.CurrentMana}>${Spell[${HealSpell}].Mana} && ${Me.PctHPs}<${Math.Calc[${${Me.Class.ShortName}Point}*${TempHealModPct}/120]}) {
/if (${Me.Casting.ID}) /call Interrupt
/echo INTERRUPT!!!! ${Spawn[${Target.ID}].CleanName} != ${Spawn[${lWorstHurt}].CleanName}
/echo ${${lWorstClass}Point} -- ${Math.Calc[${${lWorstClass}Point}*${TempHealModPct}/100]} -- ${Math.Calc[${${lWorstClass}Point}*${TempHealModPct}]}
/varset Interrupted 1
/call CastSpell "${HealSpell}" gem${HealGem} ${lWorstHurt} CheckALL
/if ( !${Macro.Return.Equal[CAST_SUCCESS]} ) /goto :HealTopB
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKHP
/return CAST_INTERRUPTED
}
:EndCHKHP
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKHP
/return
Sub CheckAll
/if (${Me.Casting.SpellType.Equal[Detrimental]} && ${Target.Type.Equal[PC]}) {
/echo WHY AM I CASTING A BAD SPELL ON TEH GOOD GUY! -- ${Me.Casting.Name} -- ${Me.Casting.SpellType}
/call Interrupt
}
/if (${Me.Dead}) /call Wait4Rez
/if (${DoCure}) /call CheckCureGrp
/if (${Me.Casting.ID} && ${DoHeal}) /call CheckHP ${EmgHealMod}
/if (${Me.Casting.ID} && ${Target.Dead}) /call Interrupt
/if (${NetBots[${Target.CleanName}].Buff.Find[${Spell[${Me.Casting}].ID}]}) {
/echo Bish already has the buff!
/call Interrupt
}
/doevents
/delay 1
/if (${DoDebuff}) {
/call UpdateMobList
/call GetMobs
}
/if (${DebuffList.Count[[]} && ${Me.Casting.SpellType.NotEqual[Detrimental]} && ${Me.Casting.Name.NotEqual[${HealSpell}]} && ${Me.Casting.Name.NotEqual[${InterventionSpell}]} && !${HealPriority} && !${Curing} && ${DoDebuff}) {
/call Interrupt
/echo There is an add in camp!!! ${Me.Casting.Name}
/if (${DoDebuff}) /call Debuff
}
/return
Sub SetBuffList
/call DeclareIniVar NumSelfBuff int BUFF 0
/call DeclareIniVar SelfBuff1 string BUFF NULL
/call DeclareIniVar SelfType1 string BUFF NULL
/call DeclareIniVar BuffNoStack1 string BUFF NULL
/call DeclareIniVar SelfBuff2 string BUFF NULL
/call DeclareIniVar SelfType2 string BUFF NULL
/call DeclareIniVar BuffNoStack2 string BUFF NULL
/call DeclareIniVar SelfBuff3 string BUFF NULL
/call DeclareIniVar SelfType3 string BUFF NULL
/call DeclareIniVar BuffNoStack3 string BUFF NULL
/call DeclareIniVar SelfBuff4 string BUFF NULL
/call DeclareIniVar SelfType4 string BUFF NULL
/call DeclareIniVar BuffNoStack4 string BUFF NULL
/call DeclareIniVar SelfBuff5 string BUFF NULL
/call DeclareIniVar SelfType5 string BUFF NULL
/call DeclareIniVar BuffNoStack5 string BUFF NULL
/call DeclareIniVar SelfBuff6 string BUFF NULL
/call DeclareIniVar SelfType6 string BUFF NULL
/call DeclareIniVar BuffNoStack6 string BUFF NULL
/call DeclareIniVar NumGrpBuff int BUFF 0
/call DeclareIniVar GrpBuff1 string BUFF NULL
/call DeclareIniVar GrpGem1 int BUFF 0
/call DeclareIniVar GrpBuff2 string BUFF NULL
/call DeclareIniVar GrpGem2 int BUFF 0
/call DeclareIniVar GrpBuff3 string BUFF NULL
/call DeclareIniVar GrpGem3 int BUFF 0
/call DeclareIniVar GrpBuff4 string BUFF NULL
/call DeclareIniVar GrpGem4 int BUFF 0
/call DeclareIniVar PantherSpell string BUFF NULL
/call DeclareIniVar PantherSpellGem int BUFF 0
/call DeclareIniVar BuffGem string Buff gem9
/call DeclareIniVar DoBuffTotal int BUFF 0
/call DeclareIniVar WildSpell string BUFF "Rampant Growth"
/declare i int local
/declare WildTimer timer outer 0
/if (${DoBuffTotal}) {
/if (!${Defined[DoBuffID]}) /declare DoBuffID[${DoBuffTotal}] int outer
/if (!${Defined[DoBuffQueue]}) /declare DoBuffQueue[25,2] int outer
/if (!${Defined[QueueCount]}) /declare QueueCount int outer 0
/if (!${Defined[DoBuffLowest]}) /declare DoBuffLowest int outer 100
/if (!${Defined[DoBuffTimer]}) /declare DoBuffTimer timer outer
/for i 1 to ${DoBuffTotal}
/call DeclareIniVar DoBuff${i} string Buff NULL
/call DeclareIniVar DoBuffCast${i} string Buff NULL
/call DeclareIniVar DoBuffGem${i} string Buff null
/call DeclareIniVar DoBuffAliases${i} string Buff NULL
/call DeclareIniVar DoBuffMana${i} int Buff NULL
/call DeclareIniVar DoBuffIgnoreClass${i} string Buff "Use the Class's full Name and seperate with commas"
/if (${Me.AltAbility[${DoBuff${i}}]}) /varset DoBuffID[${i}] ${Me.AltAbility[${DoBuff${i}}].Spell.ID}
/if (${FindItem[${DoBuff${i}}].ID}) /varset DoBuffID[${i}] ${FindItem[${DoBuff${i}}].Spell.ID}
/if (${Me.Book[${DoBuffCast${i}}]}) /varset DoBuffID[${i}] ${Me.Book[${Me.Book[${DoBuffCast${i}}]}].ID}
/if (${Ini[${MacroQuest.Server}_Shm_${Me.CleanName}.ini,Buff,DoBuffIcon${i},NOTFOUND].NotEqual[NOTFOUND]}) /varset DoBuffID[${i}] ${Spell[${Ini[${MacroQuest.Server}_Shm_${Me.CleanName}.ini,Buff,DoBuffIcon${i},NOTFOUND]}].ID}
/if (${DoBuffLowest}>${DoBuffMana${i}}) /varset DoBuffLowest ${DoBuffMana${i}}
/next i
}
/return
Sub CheckSelfBuff
/varset OldMacroState ${MacroState}
/varset MacroState CHECKSELFBUFF
/declare X int local
/declare a int local
/declare b int local 1
/declare c int local
/declare BuffName string local
/declare ItemSlot string local
/declare OldItem string local
/declare ignorelist string local
/if (${Me.AltAbility[Group Pact of the Wolf]} && !${Me.State.Equal[MOUNT]} && !${Me.Buff[Group Pact of the Wolf].ID}) /call Cast "Group Pact of the Wolf" alt
/if (${Me.Height}>2.5 && ${Me.AltAbility[Group Shrink]} && ${Me.AltAbilityReady[Group Shrink]} && ${DoShrink}) /call CastSpell "Group Shrink" "alt" ${Me.ID} CheckAll
/call CheckItems
/if (!${NumSelfBuff}) /goto :CheckBcBuffs
/for a 1 to ${NumSelfBuff}
/if ( ${SelfBuff${a}.NotEqual[NULL]} && ${SelfType${a}.Equal[item]} && ${FindItem[=${SelfBuff${a}}].ID} && ${Me.Buff[${FindItem[=${SelfBuff${a}}].Spell.Name}].Duration}<4 ) {
:CheckNoStack
/if (!${Spell[${FindItem[=${SelfBuff${a}}].Spell.Name}].Stacks[2]}) /goto :SkipBuff
/varset BuffName ${BuffNoStack${i}.Arg[${b},,]}
/if (${FindItem[=${SelfBuff${a}}].InvSlot}>21) {
/varset ItemSlot ${FindItem["${SelfBuff${a}}"].WornSlot[1].Name}
} else {
/varset ItemSlot ${FindItem[=${SelfBuff${a}}].InvSlot.Name}
}
/if ( ${Bool[${BuffName}]} ) {
/if ( ${Me.Buff[${BuffName}].ID} ) /goto :SkipBuff
/varcalc b ${b}+1
/goto :CheckNoStack
}
/if (${Me.Inventory[${ItemSlot}].Name.NotEqual["${SelfBuff${a}}"]}) {
/varset OldItem ${Me.Inventory[${ItemSlot}].Name}
/exchange "${SelfBuff${a}}" ${ItemSlot}
/call Cast "${Me.Inventory[${ItemSlot}].Name}" item
/exchange "${OldItem}" ${ItemSlot}
} else {
/call Cast "${Me.Inventory[${ItemSlot}].Name}" item
}
} else /if ( ${Me.Book[${SelfBuff${a}}]} && ${SelfType${a}.Find[gem]} && ${SelfBuff${a}.NotEqual[NULL]} && ${Spell[${SelfBuff${a}}].Mana} < ${Me.CurrentMana} ) {
/if ( !${Me.Buff[${SelfBuff${a}}].ID} || ${Me.Buff[${SelfBuff${a}}].Duration} < 4 ) {
:CheckNoStack2
/if (!${Spell[${SelfBuff${a}}].Stacks[2]}) /goto :SkipBuff
/varset BuffName ${BuffNoStack${i}.Arg[${b},,]}
/if ( ${Bool[${BuffName}]} ) {
/if ( ${Me.Buff[${BuffName}].ID} ) /goto :SkipBuff
/varcalc b ${b}+1
/goto :CheckNoStack2
}
/call Cast "${SelfBuff${a}}" "${SelfType${a}}"
}
}
:SkipBuff
/next a
:CheckBcBuffs
/varset BcClients ${NetBots.Client}
/varset BcClients2 ${Math.Calc[${BcClients.Count[ ]}+1]}
|**Start Of the BC buffing Routine**|
/for X 1 to ${BcClients2}
/for b 1 to ${DoBuffTotal}
/varset ignorelist ${Ini[${INIFile}.ini,BUFF,DoBuffIgnoreClass${b},NOTFOUND]}
/if (${NetBots[${BcClients.Arg[${X}]}].Stacks[${Spell[${DoBuff${b}}].ID}]} && ${NetBots[${BcClients.Arg[${X}]}].InZone} && ${Spawn[${BcClients.Arg[${X}]}].ID} && ${Spawn[${BcClients.Arg[${X}]}].Distance}<=100 && ${Me.PctMana}> ${DoBuffMana${b}} && !${SpawnCount[npc targetable radius ${DoBuffMobRange${b}} range 40 130]} && !${ignorelist.Find[${NetBots[${BcClients.Arg[${X}]}].Class}]} && ${Me.CurrentMana}>${Spell[${DoBuff${b}}].Mana} && ${NetBots[${BcClients.Arg[${X}]}.Stacks[${Spell[${DoBuff${b}}].ID}]} && ${NetBots[${BcClients.Arg[${X}]}.Stacks[${Spell[${DoBuffCast${b}}].ID}]}) {
|/echo buffing ${NetBots[${BcClients.Arg[${X}]}].Name} the ${NetBots[${BcClients.Arg[${X}]}].Class.ShortName} with ${DoBuff${b}} by Casting ${DoBuffCast${b}}
/call CastSpell "${DoBuffCast${b}}" ${BuffGem} ${NetBots[${BcClients.Arg[${X}]}].ID} CheckAll
}
/next b
/next X
|**end bc buffing**|
:EndCheckBuffs
/varset BuffTimer 25s
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKSELFBUFF
/return
Sub SetPetList
/call DeclareIniVar UsePet int PET 0 /usepet
/call DeclareIniVar PetSpell string PET NULL
/call DeclareIniVar NumPetBuff int PET 0
/call DeclareIniVar PetBuff1 string PET NULL
/call DeclareIniVar PetBuff2 string PET NULL
/call DeclareIniVar PetBuff3 string PET NULL
/call DeclareIniVar PetBuff4 string PET NULL
/return
Sub CheckPetBuff
/varset OldMacroState ${MacroState}
/varset MacroState CHECKPETBUFF
/declare a int local
/if ( !${Me.Pet.ID} ) {
/call CastSpell "${PetSpell}" gem9 ${Me.ID} CheckALL
}
/if ( ${Me.Pet.ID} && ${NumPetBuff} ) {
/for a 1 to ${NumPetBuff}
/if ( !${Me.PetBuff[${PetBuff${a}}]} ) {
/call CastSpell "${PetBuff${a}}" gem9 ${Me.Pet.ID} CheckALL
}
/next a
}
/varset MacroState ${OldMacroState}
/varset OldMacroState CHECKPETBUFF
/return
Sub Pet
/varset OldMacroState ${MacroState}
/varset MacroState PET
/declare PetTarget int local 0
/if (!${MATarget} || ${Spawn[${MATarget}].Dead}) /call GetMaTarget
/if (${Spawn[${MATarget}].ID} && ${Spawn[${MATarget}].Type.Equal[NPC]} && ${Spawn[${MaID}].ID} && ${Me.Pet.ID} && !${Me.Pet.Following.ID} || ${Me.Pet.Following.ID}!=${MATarget} && ${Spawn[${MATarget}].ID}) {
/squelch /target id ${MaID}
/delay 1s ${Target.ID}==${MaID}
/assist ${Spawn[${MaID}].CleanName}
/delay 1s ${Target.ID}==${MATarget}
/if ( ${Target.ID} && ${Target.Type.Equal[NPC]} ) /pet attack
} else {
/call CheckPetBuff
}
/varset MacroState ${OldMacroState}
/varset OldMacroState PET
/return
Sub GetMaTarget
/varset OldMacroState ${MacroState}
/varset MacroState GETMATARGET
/if (${NetBots[${MA}].ID}) {
/varset MATarget ${NetBots[${MA}].TargetID}
} else {
/if (${Spawn[${MaID}].Type.Equal[PC]} && ${Spawn[${MaID}].ID} && ${Spawn[${MaID}].Distance}<150) {
/squelch /target id ${MaID}
/delay 1s ${Target.ID}==${MaID}
/assist ${Spawn[${MaID}].CleanName}
/delay 7
/if ( ${Target.ID} && ${Target.Type.Equal[NPC]} && !${ExcludeList.Find[${Spawn[id ${Target.ID}].CleanName}]}) {
/varset MATarget ${Target.ID}
}
}
}
/varset MacroState ${OldMacroState}
/varset OldMacroState GETMATARGET
/return
Sub Event_ImDead
:Zone_Loop
|/if ( ${Me.Bound.ID} !=${Zone.ID} ) /goto :Zone_Loop
/delay 5s
/delay 5
/call Wait4Rez
/delay 20
/if (${Me.State.Equal[Stand]}) /sit
:Meditate
/delay 1s
/if (${Me.CurrentMana} < 300) /goto :Meditate
/return
sub Event_GainXP
/call UpdateMobList
/return
sub Event_ListMob
/declare lCounter int local
/varset lCounter 1
|/echo displayin mobs on list
:DisplayLoop
/if (${lCounter}<11) {
|/echo Mob ${lCounter}: ${Spawn[id ${iDebuffList[${lCounter}]}].Name} -- ${iDebuffList[${lCounter}]}
/varcalc lCounter ${lCounter}+1
/goto :DisplayLoop
}
/return
Sub Event_Summon
/varset MobAgro ${NearestSpawn[npc targetable radius 20].ID}
/return
Sub CastBuff(string Buff, string Person)
/if ( ${Spawn[PC ${Person}].Distance}<=100 ) {
/target pc ${Person}
/tell ${Person} ${Buff} is incomming!!!
/call cast "${Buff}" gem7
}
/return
Sub Event_ImHit(string Line)
/if (${Me.PctHPs}<60) {
/if (${Me.Casting.ID}) /call Interrupt
/echo I AM HIT....HARD!!
/target myself
/delay 2s ${Target.ID}==${Me.ID}
/call Cast "${HealSpell}" gem${HealGem}
}
/varset MobAgro ${NearestSpawn[1,npc targetable radius 20].ID}
/doevents flush
/return
Sub Event_AddFuck
/declare CurrFuckList string local
/bc Adding ${Target.DisplayName} to ExcludeList
/varset CurrFuckList ${Ini[${INIFile}.ini,${Zone},ExcludeList,NULL]}
/if ( ${CurrFuckList.Find[NULL]} ) {
/ini "${INIFile}.ini" "${Zone.ShortName}" "ExcludeList" "${Target.CleanName}"
/varset CurrFuckList ${Target.CleanName}
} else {
/varset CurrFuckList ${Target.CleanName}|${CurrFuckList}
/ini "${INIFile}.ini" "${Zone.ShortName}" "ExcludeList" "${CurrFuckList}"
}
/varset ExcludeList ${CurrFuckList}
/return
Sub DeclareIniVar(string name,string varType,string section,string value,string alias)
/if ( !${Defined[${name}]} ) /declare ${name} ${varType} outer
/varset ${name} ${Ini[${INIFile}.ini,"${section}",${name.Left[1].Upper}${name.Right[-1]},"${value}"]}
/ini "${INIFile}.ini" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}"
/if (${Defined[alias]} && ${Version.NotEqual[${CurrentVersion}]}) {
/echo /alias ${alias} /echo set: ${name} ${section}
/docommand /alias ${alias} /echo set: ${name} ${section}
}
/if (${Me.Book[${Me.Book[${${name}} Rk. III]}].ID}) /varset ${name} ${Me.Book[${Me.Book[${${name}} Rk. III]}].Name}
/if (${Me.Book[${Me.Book[${${name}} Rk. II]}].ID}) /varset ${name} ${Me.Book[${Me.Book[${${name}} Rk. II]}].Name}
/if (${Me.CombatAbility[${${name}} Rk III]}) /varset ${name} ${${name}} Rk. III
/if (${Me.CombatAbility[${${name}} Rk. II]}) /varset ${name} ${${name}} Rk. III
/return
|**Sub Event_SetVar(sting line,string varName,string section,string value)
/if (${value.Equal[on]}) /varset value 1
/if (${value.Equal[off]}) /varset value 0
/echo ${varName} -- ${${varName}}
/if (${Defined[${varName}]} && ${${varName}}!=${Int[${value}]}) {
/doevents flush
/if (${varName.Equal[RaidSet]}) {
/if (${value.Equal[1]}) {
/call IntializeRaidSettings
} else {
/call IntializeGrpSettings
}
}
/ini "${INIFile}.ini" ${section} "${varName.Left[1].Upper}${varName.Right[-1]}" "${value}"
/varset ${varName} ${value}
/popup ${varName} is set to ${${varName}} now.
}
/return**|
Sub Event_WornOff(string sLine, string sSpell, string sTarget)
/if (${Defined[DotTimer${Spell[${sSpell}].ID}]} && ${Me.SpellReady[${sSpell}]}) {
/echo calling DOT OMG!!!
/echo DotTimer${Spell[${sSpell}].ID} is at ${DotTimer${Spell[${sSpell}].ID}}
/echo ${DotTimer1} ${DotTimer2} ${DotTimer3} ${DotTimer4} ${DotTimer5}
/call DoT
}
/return
Sub Event_Yak(string Line, string Person, string Channel, string Message)
|**/if ( !${MasterList.Find[${Person}]} ) /return**|
/varset Person ${Person.Right[-2].Left[-1]}
/if (!${Spawn[pc ${Person}].ID} && ${Spawn[pc ${Person}].CleanName.NotEqual[${Person}]} || ${Channel.NotEqual[you]}) /return
/if (${DoBuffTotal} && ${Spawn[pc ${Person}].ID} && ${Person.NotEqual[${Me.CleanName}]}) {
|/echo Checking Buffs1 <<${Person}>> >>${Message}<< == ${Spawn[pc ${Person}].CleanName} == ${Spawn[pc ${Person}].CleanName.NotEqual[${Person}]} ==
/call CheckDoBuffs "${Person}" "${Message}"
/doevents flush
}
/if (${QueueCount}) /call DoBuffEvents
/return
Sub Event_Talk(String Line, String Sender, String ChatText)
/varset Sender ${Sender.Right[-2].Left[-1]}
/if (!${Spawn[pc ${Sender}].ID} || ${Spawn[pc ${Sender}].CleanName.NotEqual[${Sender}]}) /return
/if (${ChatText.Equal[follow]}) {
:TargetSender
/if (${Spawn[pc ${Sender}].ID}) {
/target id ${Spawn[pc ${Sender}].ID}
/delay 5 ${Target.ID}==${Spawn[pc ${Sender}].ID}
/if (${Target.ID}!=${Spawn[pc ${Sender}].ID}) /goto :TargetSender
/afollow on
}
/return
}
/if (${ChatText.Equal[stop]}) {
/afollow off
/return
}
/if (${DoBuffTotal} && ${Sender.NotEqual[${Me.CleanName}]} && ${Spawn[pc ${Sender}].ID}) {
|/echo Checking Buffs2 <<${Sender}>> >>${ChatText}<< ==${Spawn[pc ${Sender}].CleanName}== ${Spawn[pc ${Sender}].CleanName.NotEqual[${Sender}]} ==
/call CheckDoBuffs "${Sender}" "${ChatText}"
}
/if (${QueueCount}) /call DoBuffEvents
/return