Code: Select all
|solodruid.mac
|By Articrbe
|heavly based off of the druid.mac by Digitalxero (AFK CLeric),Compudoc
|thanks for the awesome script
|dot.mac by Pugs
|looting macro by the warden
|This is to take some of the button clicking out of root roting
#include Spell_routines.inc
#include move.inc
#include HunterLoot.inc
#event Swarm "Your Drones of Doom spell has worn off."
#event Root "Your Enveloping Roots spell has worn off."
#event Snare "Your Ensnare spell has worn off."
#event Drifting "Your Drifting Death spell has worn off."
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event castFizzle "Your spell fizzles!"
#Event MobDied "#*# has been slain by |${Me.Pet.CleanName}|!"
#Event MobDied "#*#You have slain #*#"
#Event Starter "You begin to hide..."
sub Main
:Loop
/declare CastInfo string outer
/declare CastLastResult string outer
/declare CastName string outer
/declare CastOldTargetID int outer
/declare CastQueue string outer
/declare CastStep int outer
/declare CastTarget string outer
/declare CastType string outer
/declare myvar int outer
/declare Healpct int outer ${Param1}
/declare HomeX int outer ${Me.X}
/declare HomeY int outer ${Me.Y}
/declare MOB int outer
/declare EndX int outer
/declare EndY int outer
/declare Fastheal string outer Greater Healing
/declare Groupnum int outer
/declare Sit int outer ${Param0}
/declare Delay int outer
/declare Casting string outer
/doevents
/call Auto-Healer
/doevents
/goto :loop
/return
Sub Initialize
/doevents
/call cast "Spirit of Wolf"
/call PullMob
/return
|-----------------------------------------------------------
|Should I loot all items? (0 no, 1 yes)
|-----------------------------------------------------------
/declare LootAllItems int outer 1
/next i
|-----------------------------------------------------------
|Loot Array Information.
|-----------------------------------------------------------
/call ReadINI HunterLoot.ini "${Zone.Name}" Loot
/if (!${Defined[ItemsToLoot]}) {
/echo No Loot Array Created...
}
/doevents
/return
|-----------------------------------------------------------
|Variables that you don't need to worry about.
|-----------------------------------------------------------
/declare LootSlot int outer 0
/next i
/echo Starting Looting Macro.
:loop
/doevents
/delay 5
/goto :loop
/return
Sub Auto-Healer
/echo ***********************************************************
/echo ** Druid Auto-Healer and Rot and Dotting Activated **
/echo ** Casting heals when party member is under ${Healpct}% **
/if (${Sit}==1) /echo ** Autosit is enabled **
/if (${Sit}==0) /echo ** Autosit is disabled **
/echo ***********************************************************
:chkevent
/doevents
/varset Groupnum ${Group}
| *** AutoHeal ***
:Healcheck
/for myvar 0 to ${Group}
/if (${Group[${i}].PctHPs}<=${Healpct}) {
/if (${Group[${i}].PctHPs}<1) /goto :nextmember
/if (${Group[${i}].Class.Name.Equal["Warrior"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Paladin"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Shadow Knight"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Monk"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Berserker"]}) /goto :Tankheal
/if (${Group[${i}].Class.Name.Equal["Beastlord"]}) /goto :Bstheal
/doevents
/goto :CasterHeal
:Tankheal
/target ${Group[${i}]}
/stand
/varset Casting Greater Healing
/cast "Greater Healing"
/doevents
/varset Delay ${Math.Calc[${Spell[Greater Healing].MyCastTime}*10]}
/delay 30
/doevents
/delay ${Delay}
/if (${Sit}==1) /sit
/goto :nextmember
:Casterheal
/target ${Group[${i}]}
/stand
/varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10]}
/doevents
/varset Casting ${Fastheal}
/cast "${Fastheal}"
/delay 30
/doevents
/delay ${Delay}
/goto :nextmember
:Bstheal
/keypress esc
/if (${i}==1) /keypress F2
/if (${i}==2) /keypress F3
/if (${i}==3) /keypress F4
/if (${i}==4) /keypress F5
/if (${i}==5) /keypress F6
/stand
/g Quick Heal inc on >> %t <<
/varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10]}
/varset Casting ${Fastheal}
/cast "${Fastheal}"
/doevents
/delay 30
/doevents
/delay ${Delay}
/if (${Sit}==1) /sit
}
:nextmember
}
/next myvar
/call Initialize
/goto :chkevent
/return
Sub Event_OutOfMana
/g OOM, meding
/if (${Sit}==1) /sit
/delay 10s
/return
Sub Event_OutOfRange
| /delay 2s
| /g %t your OOR!
| /delay 2s
/return
Sub Event_CastFizzle
/if (${CastStep}) {
/varset CastStep 0
/varset CastLastResult CAST_Fizzled
}
/return
sub Event_Swarm
/echo casting Drones of Doom
/call cast "Drones of Doom" gem1
/doevents
/if (${Sit}==1) /sit
/return
sub Event_Root
/popup Casting Enveloping Roots
/call cast "Enveloping Roots" gem7
/doevents
/if (${Sit}==1) /sit
/return
sub Event_Snare
/popup ensare has wore off watch out trying to recast
/call cast "Ensnare" gem8
/doevents
/sit
/return
sub Event_Drifting
/popup Casting Drifting Death
/call cast "Drifting Death" gem2
/doevents
/if (${Sit}==1) /sit
/return
sub Event_Starter
/echo casting
/call cast "Enveloping Roots"
/delay 4s
/call cast "Ensnare"
/delay 2s
/call cast "Drones of Doom"
/delay 3s
/call cast "Drifting Death"
/doevents
/if (${Sit}==1) /sit
:loop
/docommand ${if[${target.currentHPs}>20/call cast "Calefaction"]}
/docommand ${if[${target.currentHPs}>1/goto :loop]}
/docommand ${if[${target.currentHPs}<1/call Looting]}
/return
Sub PullMob
:PullBegin
/doevents
/varset MOB ${Spawn[nopcnear 400 npc range ${Math.Calc[${Me.Level} * .75]} ${Me.Level} radius 1000].ID}
:TarLoop
/doevents
/if ((${Spawn[id ${MOB}].PctHPs} < 100) || (!${String[${Spawn[${MOB}].Type}].Compare["Pet"]})) {
/varset MOB ${Spawn[nopcnear 400 npc id ${MOB} range ${Math.Calc[${Me.Level} * .75]} ${Me.Level} radius 1000 next].ID}
/goto :TarLoop
}
/call MoveToSpawn ${MOB} 120
/target id ${MOB}
/assist
/delay 1s
/doevents
/if ((${Target.ID} != ${MOB}) && (${Target.ID} != ${Me.ID})) {
/call MoveToLoc ${HomeY} ${HomeX}
/doevents
/goto :PullBegin
}
/if (${Target.PctHPs} < 100) /goto :PullBegin
/doevents
/doability hide
/goto :pullbegin
/doevents
/next i
/return
|-----------------------------------------------------------
|SUB: Looting
|-----------------------------------------------------------
Sub Event_MobDied
/squelch /declare LootSlot int inner 0
/declare LootCheck int inner 0
/declare LootTotal int inner 0
/target npc corpse radius 200
:MovementLoop
/face fast nolook
/if (${Int[${Target.Distance}]}>13) {
/keypress forward hold
}
/if (${Int[${Target.Distance}]}<13&&${Int[${Target.Distance}]}>11) {
/keypress forward
}
/if (${Int[${Target.Distance}]}<9) {
/keypress back
}
/if (${Int[${Target.Distance}]}>13) {
/goto :MovementLoop
}
/keypress forward
/keypress back
/delay 5
/loot
/delay 5
/if (!${Corpse.Items}) {
/echo NO LOOT! Cheap Bastard!
/notify LootWnd DoneButton leftmouseup
/return
}
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/itemnotify loot${LootSlot} leftmouseup
/delay 5
/if (${LootAllItems}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/autoinventory
/delay 5
} else {
/for LootCheck 1 to ${ItemsToLoot.Size}
/if (${Cursor.Name.Find[${ItemsToLoot[${LootCheck}]}]}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/autoinventory
/delay 5
}
/next LootCheck
}
/if (${Cursor.ID}) {
/echo Destroying a ${Cursor.Name}...
/destroy
/destroy
/delay 5
}
/next LootSlot
/delay 5
/notify LootWnd DoneButton leftmouseup
/delay 2
/if (${Sit}==1) /sit
/return
|-----------------------------------------------------------
|SUB: Reading from an INI File
|-----------------------------------------------------------
Sub ReadINI(FileName,SectionName,ArrayType)
/echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
/delay 1s
/if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
/echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
/delay 1s
/return
}
/declare nValues int local 1
/declare nArray int local 0
/declare KeySet string local ${Ini[${FileName},${SectionName}]}
:CounterLoop
/if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
/varcalc nValues ${nValues}-1
/goto :MakeArray
}
/varcalc nValues ${nValues}+1
/goto :CounterLoop
:MakeArray
/if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) {
/echo Declaring Loot Array...
/declare ItemsToLoot[${nValues}] string outer
}
/for nArray 1 to ${nValues}
/if (${FileName.Equal["HunterLoot.ini"]}) {
/squelch /varset ItemsToLoot[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
}
/next nArray
/echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
/delay 1s
/return 

