|Macro FHloot
|Re-created by Armysoldier
|
|modified Macro Lootwhore.mac
|Made By Hamburgerhelper
|
|
|Usage /mac FHloot
|
#Event NL "#*#entered Nedaria#*#"
#Event FH "#*#entered The Forgotten Halls#*#"
#Event kill "#*#lunges at you#*#"
#Event Died "#*#You have entered Guild Lobby#*#"
|--------------------------------^^^^^^^^^^^^^^^
|------------------ Edit to where you are bound
#Event MobDied "#*# has been slain by#*#"
#Event Invite "#*#invites you#*#"
#Include advpath.inc
#include spell_routines.inc
#turbo 10
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|loot all items? (0 no, 1 yes)
/declare LootAllItems int outer 1
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Loot Array Information.
/declare MyXLOCA int outer 0
/declare MyYLOCA int outer 0
/declare AnchorX int outer 161
/declare AnchorY int outer -597
/call ReadINI HunterLoot.ini "${Zone.Name}" Loot
/if (!${Defined[ItemsToLoot]}) {
/echo No Loot Array Created...
}
|Variables that you don't need to worry about.
/declare LootSlot int outer 0
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/call InitAPFVars 1 15 20
/echo Starting Looter Assist Macro.
:loop
/call GMcheck
/doevents
/delay 5s
/goto :loop
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Nedaria's Landing
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_NL
/disband
/dzremove ${Me}
/doevents flush
/delay 15s
/doevents
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Sub Invite
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_Invite
:WaitForInviteToInstance
/delay 1s
/if (!${Window[ConfirmationDialogBox].Open}) /goto :WaitForInviteToInstance
/delay 1s
| 2) Click YES
/notify ConfirmationDialogBox Yes_Button leftmouseup
/doevents flush
/delay 5s
/invite
/delay 5s
/keypress esc
/keypress esc
/call PlayFunction "move2rock 1 cf nopp noz"
/call WaitTilThere
/delay 5s
/doortarget
/face
/delay 2s
/click left 400 50
/click left 400 100
/click left 400 150
/click left 425 200
/click left 450 250
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Forgotten Halls
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_FH
/docrack nostun on
/docrack noencumber on
/doevents
/call PlayFunction "move2Sweetspot 1 cf nopp noz"
/call WaitTilThere
:movetocenter
/face nolook loc -597,161
/if (${Math.Distance[1585,-594]}>2) /nomodkey /keypress forward hold
/if (${Math.Distance[1585,-594]}<=2) {
/nomodkey /keypress forward
/goto :centered
}
/goto :movetocenter
:centered
/sit
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Died - Take a Guess
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_died
/camp desktop
/end
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Camp - Bard died
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_camp
/tar a harindu
/warp target
/say ready to leave
/delay 15s
/sit
/camp desk
/endmac
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|GM CHECK
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub GMCheck
/if (${Spawn[gm].ID}) {
/echo Gm detected
/beep
/beep
/beep
/endmac
/unload
/q
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Wait Till there - movement wait
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub WaitTilThere
:LoopTilThere
/if (${PathingFlag}==1) {
/call AdvPathPoll
/delay 0
/doevents
/goto :LoopTilThere
}
/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
/call checkanchor
/delay 5
/call sit
/delay 10
/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
/call checkanchor
/delay 5
/call sit
/delay 10
/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: Checking Anchor
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CheckAnchor
/if (${Math.Distance[${AnchorY},${AnchorX}]}>12) /call MoveToAnchor
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Move to anchor
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub MoveToAnchor
/declare iCount int local
/varset iCount 0
/echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}.
:AnchorMoveLoop
/delay 1
/doevents
/face nolook loc ${AnchorY},${AnchorX}
/if (${Math.Distance[${AnchorY},${AnchorX}]}>12) {
/keypress forward hold
} else {
/keypress forward
/face away loc ${AnchorY},${AnchorX}
/return
}
/if (${iCount}>2) {
/face nolook loc ${AnchorY},${AnchorX}
/varset iCount 0
}
/varcalc iCount ${iCount}+1
/goto :AnchorMoveLoop
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: check sit .. and sit
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub sit
/if (${Me.State.NotEqual[SIT]}) {
/sit
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub succor - Healer not doing his job ... whats new
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub succor
/tar a harindu
/warp target
/say ready to leave
/delay 15s
/call PlayFunction "move2rock 1 cf nopp noz"
/call WaitTilThere
/doortarget
/face
/keypress forward
/keypress u
/keypress u
/delay 15s
/return