Attack Nearest with Halberd and Swap to Katana (V) by Jaseowns
# Attack Nearest with Halberd and Swap to Katana by Jaseowns
# UO Outlands
if findtype "halberd" backpack 1790 as item
dclick item
wait 200
endif
hotkey "Target Closest Grey Monster"
wait 200
if insysmsg "no one matching"
// do nothing
stop
else
attack lasttarget
endif
while hidden
// wait to strike
wait 50
endwhile
if findtype "katana" backpack 1790 as item
dclick item
elseif findtype "halberd" backpack 1790 as item
dclick item
endif
@clearignore
if not hidden and findtype "Elven Spellblade" backpack and findtype "corpse" ground -1 -1 2 as jorpse
while not targetexists
useskill 'forensicevaluation'
endwhile
if targetexists
hotkey "Target Self"
@ignore jorpse
endif
endif
@clearignore