;==========================================================================
; Script Name: Mort's Looter
; Author: Mort
; Version: 1.00
; Client Tested with: 4.0.4a
; EUO version tested with: 1.42 (0097)
; Shard OSI / FS: OSI
; Revision Date: September 6, 2004
; Public Release:
; Purpose: Will loot a corpse automatically for the specified items. Will work as soon as a corpse is found within 1 tile.
;========================================================================= Notes:
; - You can select which items you want to loot (Gold, Gems, Reagents) or any combination of all three.
; - This script works very quickly, less than 2 seconds to loot a single item.
set %gold POF_ ; Object ID for gold.
set %gems uvf_vuf_gvf_evf_hvf_ovf_fvf_bvf_rvf_ ; Object ID's for gems.
set %regs KUF_JUF_KZF_JZF_MZF_WZF_RZF_SZF_IUF_DUF_TZF_UZF_YZF_ ; Object ID's for reagents.
set #menubutton closed
gosub showWindow
gosub setup
initevents
mainloop:
set %status IDLE
gosub updateStatusWindow
gosub checkMenuBtn
; Searches for corpses within 1 tile of the player, if it finds one that it hasn't already looted, it will start the looting process.
finditem YFM G_1
if #findkind = -1
goto mainloop
else
gosub startLoot
return
sub setup
; Determines where to drop the items when dragging from the corpse gump. (opens the paperdoll, and targets the backpack).
click 150 10
if #contname = paperdoll_gump
contPos 1010 0
else
gosub setup
set %x 1150
set %y 220
; Determines the users option selection (gold, gems, reagents etc.)
set %loot ap_
menu get goldChk
if #menures = -1
set %loot %loot , %gold
menu get gemsChk
if #menures = -1
set %loot %loot , %gems
menu get reagentsChk
if #menures = -1
set %loot %loot , %regs
return
sub startLoot
set %status RUNNING
openbody:
set %body #findid
set #lobjectid #findid
nextCPos 10 10
event macro 17 0
set %nt2 #scnt2 + 10
OQ:
finditem %loot C_ . %body
if #findkind = -1 && %nt2 < #scnt2
goto OQ
wait 13
findloot:
finditem %loot C_ . %body
if #findkind = -1
{
ignoreitem %body
wait 15
ignoreitem reset 2
goto mainloop
}
loot:
event drag #findid
wait 8
msg $
key enter
wait 7
click %x %y p
ignoreitem #findid 2
goto findloot
event SysMessage Corpse looted...
goto top
return
sub showWindow
menu Clear
menu Window Title Looter
menu Window Color btnFace
menu Window Size 125 175
menu Font Transparent #true
menu Font Align Left
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style b
menu Font Color WindowText
menu Font Transparent #false
menu Text lootitemsTxt 4 10 Loot Items:
menu Font Style n
menu Text weightTxt 5 100 Weight:
menu Text goldTxt 5 115 Gold:
menu Text statusTxt 5 130 Status:
menu Font Align Right
menu Text goldInfoTxt 118 115 0 -
menu Text weightInfoTxt 118 100 -
menu Text statusInfoTxt 118 130 -
menu Font Style n
menu Font Align Left
menu Check goldChk 5 32 75 15 #true Gold
menu Check gemsChk 5 48 75 15 #false Gems
menu Check reagentsChk 5 64 75 15 #false Reagents
menu button resetBtn 5 150 50 20 Reset
menu button closeBtn 70 150 50 20 Close
menu Show 1010 347
return
sub updateStatusWindow
; Displays the status field in the status window
menu Set statusInfoTxt %status
; Calculates weight percentage to display in the status window.
set %weightPercentage #weight * 100 / #maxWeight
menu set weightInfoTxt %weightPercentage , %
; Displays gold in the status window.
menu set goldInfoTxt #gold
return
sub checkMenuBtn
; These conditions check if a button has been pressed.
if #menubutton = resetBtn
{
gosub setup
set #menubutton closed
}
if #menubutton = closeBtn
{
menu Hide
set #menubutton closed
halt
}
return
Simple Looter
Simple Looter
Always remember to pillage before you burn!-----------Unknown
Re: Simple Looter
just my input
i think its a nono to use goto or gosub while inside a sub.
also, please post this in the coding talk section of the forums. And, if you could, use the code] /code] commands (first [ left off)
i think its a nono to use goto or gosub while inside a sub.
also, please post this in the coding talk section of the forums. And, if you could, use the code] /code] commands (first [ left off)
Resident Wiki Editor/Village Idiot
EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)