I tried to find a simple script to clean the treasure chests, but couldn't find one from easyuo site or our forum so i just wrote one for myself. Made a few adjustments for others to use the script, hope someone will find this useful~!!
The script will move magery scrolls, gems, and magery/necro reagents out of box.
p.s. I only tested this 3 times, cannot guarantee it will work. please comment or pm "jack skellington" for inquiry~
1/10/2015
the script will pause if it finds enemy after each dump from the chest.
Code: Select all
;Excelsior Shard, http://uoex.net/
;http://www.uoex.net/forum/viewtopic.php?f=39&t=8977
;by Jack Skellington 12/29/2014
;added spawn check (sub FindEnemy) before each drag and drop 1/10/2015
;this is vocational script, no updates will be guaranteed.
;this will clean both Regs and Scrolls
;To Change Hotkey, go to "HOTKEY" section below.
;send pm to Jack Skellington in game if you have any question~
set #LPC 100
set %GarbageReg DUF_SZF_JZF_RZF_WZF_MZF_IUF_TZF_UZF_KZF_JUF_KUF_YZF_
set %GarbageScroll NXL_QXL_PXL_AYL_ZXL_CYL_BYL_WXL_VXL_YXL_XXL_IYL_HYL_KYL_JYL_EYL_DYL_GYL_FYL_STL_RTL_UTL_TTL_OTL_NTL_QTL_PTL_AUL_ZTL_CUL_BUL_WTL_VTL_YTL_XTL_IUL_HUL_KUL_JUL_EUL_DUL_GUL_FUL_QUL_PUL_SUL_RUL_MUL_LUL_OUL_NUL_YUL_XUL_AVL_ZUL_UUL_TUL_WUL_VUL_GVL_FVL_IVL_HVL_CVL_
set %Gem UVF_NVF_HVF_VVF_GVF_BVF_EVF_ZVF_RVF_GXS_FXS_AXS_TWS_VWS_UWS_ZWS_WWS_
set %EnemyType DD_WD_PD_HD_XC_R_EB_EJ_RI_OD_BD_FD_MD_KE_ME_DBB_Q_DF_CD_YE_XE_
;Lvl6 Enemy: _KE_ME_DBB_Q_DF_CD_YE_XE_ ;OD from lvl5
;Lvl5 Enemy: _R_EB_EJ_RI_OD_BD_FD_MD_
;Lvl4 Enemy: _PD_HD_XC_ ;lich lord, gazer, deamon in lvl5
;Lvl3 Enemy: _DD_WD_ ;air eli, dread, ogreL from lvl4
;check if backpack has enough room, normal max @ 125
;possible max # of dump items to "40", so limit max# of item < 125-40 = 85
event property #BackPackID
str pos #property items
set %itemDel_1 #Strres
set %itemDel_2 #Strres + 20
str del #property %itemdel_1 %itemdel_2
set %itemdel_3 #StrRes
str del %itemdel_3 1 9
set %itemdel_final #StrRes
if %itemdel_final <= 124
{
event ExMsg #CharID 3 50 There are %itemdel_final items, #weight / #maxweight stones in your backpack!
}
if %itemdel_final > 124 || #weight > #MaxWeight - 50 || #weight > 300
{
display ok You are holding too much. $Please note that $1. Total # of items in backpack needs to be "LESS than 85" $2. Current Weight is BELOW "300" AND "Maxweight - 50" $Go unload some stuff and restart.
halt
}
display ok Please target your trash bag
set #targcurs 1
waitforclick:
if #targcurs = 1
goto waitforclick
set %TrashBag #LTargetID
display ok Please target your REAGENTS bag $(If you don't want to keep Reagents, target Trash bag again)
set #targcurs 1
waitforclick:
if #targcurs = 1
goto waitforclick
set %RegBag #LTargetID
display ok Please target your GEM pouch $(If you don't want to keep gems, target Trash bag again)
set #targcurs 1
waitforclick:
if #targcurs = 1
goto waitforclick
set %GemBag #LTargetID
;HOTKEY
hotkey:
event ExMsg #CharID 3 50 Press -F4- to start
repeat
onhotkey f4
goto Start
until #false
Start:
gosub FindChest
gosub Dump
set %ContOpenTimer #null
event ExMsg #CharID 3 50 Finished Cleaning
goto hotkey
;1.
;find chest within 5 tiles and move to it
Sub FindChest
FindItem IIF_IKF G_ , 5
set %ChestID #FindID
set #LObjectID #FindID
set %ChestX #FindX
set %ChestY #FindY
if #FindKind <> 1
{
event ExMsg #CharID 3 50 cannot find treasure chest nearby. Stopping!
halt
}
if %ContOpenTimer > 2
{
event ExMsg #CharID 3 50 cannot open chest. Please make sure it's not locked. Going back...
set %ContOpenTimer #null
goto hotkey
}
if #FindKind = 1 && #FindDist > 1
{
event ExMsg #CharID 3 50 moving to chest~
move %ChestX %ChestY 1 2s
gosub FindChest
}
event macro 17 0
wait 10
if #FindKind = 1 && #ContSize <> 180_240
{
event ExMsg #CharID 3 50 trying to open the chest
event macro 17 0
wait 20
set %ContOpenTimer %ContOpenTimer + 1
gosub FindChest
}
return
;2.
;chest garbage dump
sub Dump
gosub FindEnemy
FindItem %GarbageScroll C_ , %ChestID
if #Findkind = 0
{
ExEvent Drag #findID #findstack
event ExMsg #CharID 3 50 cleaning scrolls
wait 10
ExEvent Dropc %TrashBag
wait 10
gosub dump
}
FindItem %GarbageReg C_ , %ChestID
if #Findkind = 0
{
ExEvent Drag #findID #findstack
event ExMsg #CharID 3 50 cleaning reagents
wait 10
ExEvent Dropc %RegBag
wait 10
gosub dump
}
FindItem %Gem C_ , %ChestID
if #Findkind = 0
{
ExEvent Drag #findID #findstack
event ExMsg #CharID 3 50 moving gems
wait 10
ExEvent Dropc %GemBag
wait 10
gosub dump
}
return
sub FindEnemy
ignoreitem #CharID
if #Hits < #MaxHits * 8 / 10
{
msg $
msg [bandself$
}
FindItem %EnemyType G_ , 6
if #FindCnt > 0
{
if #stamina < #maxstam * 2 / 3
{
event macro 15 205
}
event ExMsg #CharID 3 50 Enemy Found!! -F4- to continue
repeat
onhotkey f4
return
until #false
}
return