|Macro Lootwhore.mac
|Macro Made By Hamburgerhelper
|For use of Redguides ONLY
|My brain hurts
|Usage /mac Lootwhore "Mastersname"
|Commands: /tell "lootwhore" Camp out now - Makes Bot Camp
| /tell "lootwhore" Reset Mac - Resets Mac
#Event MobDied "#*# has been slain by#*#"
|#Event Tell "#*#tells you#*#"
#Event MobDied "#*#You have slain#*#"
#Event Died "#*#You have entered Guild Lobby#*#"
#Event reset "#*#Reset mac#*#"
#Include advpath.inc
#turbo 10
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Change This Stuff ---------------------------
|Spell List
/declare turnedon outer FALSE
/call InitAPFVars 1 15 20
|loot all items? (0 no, 1 yes)
/declare LootAllItems int outer 0
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Loot Array Information.
/call ReadINI HunterLoot.ini "${Zone.Name}" Loot
/if (!${Defined[ItemsToLoot]}) {
/echo No Loot Array Created...
}
|Variables that you don't need to worry about.
/deletevar Master
/declare Master string Global
/varset Master ${Param0}
/declare LootSlot int outer 0
/declare MyXLOCA int outer 0
/declare MyYLOCA int outer 0
/declare AnchorX int outer ${Me.X}
/declare AnchorY int outer ${Me.Y}
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/echo Starting Looting Macro.
:loop
/call GMcheck
/doevents
/delay 5
/goto :loop
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Looting
Sub Event_MobDied
/delay 5s
/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!
/notify LootWnd DoneButton leftmouseup
/delay 5
/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 5
/call Kill
/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
Sub Kill
/declare Dotted bool inner
/declare OldTarget string inner
/if (!${Defined[Dotted]}) /varset Dotted FALSE
/tar ${Master}
/assist
/if (${Target.PctHPs}<81&&${Me.PctMana}>90&&${Me.PctMana}>20) {
/petattack
} else {
/echo target not under 80%, returning
/return
}
/if (${Target.PctHPs}<51&&${Me.PctMana}>90&&${Me.PctMana}>20&&${Dotted}==FALSE&&!${Target[${OldTarget}]}) {
/cast 1
/varset Dotted FALSE
/varset OldTarget (${Target})
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub WaitTilThere
:LoopTilThere
/if (${PathingFlag}==1) {
/call AdvPathPoll
/delay 0
/doevents
/goto :LoopTilThere
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_reset
/Tell ${Master} Resetting in 5
/delay 5s
/tar ${Master}
/macro lootwhore ${Master}
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_tell
/tell ${Master} ${Sender} told Me, '${ChatText}'
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_camp
/camp
/endmac
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub GMcheck
/if (${Spawn[gm].ID}) {
/mqlog GM Fuggin up plan
/keypress instant_camp
/endmac
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_died
/twist off
/delay 1
/sit
/delay 3
/camp desktop
/end
/return