ScriptUO
Ultima Online Fan Board => General UO Chat => Topic started by: Gemviper on October 02, 2015, 05:16:42 PM
-
I've been running a most excellent IDOC finding script from right here in the script section, can't tell you which because I don't want to play favorites and they are all good in one way or another, but the abundance of IDOCs I've attended in the past week thanks in part to that script are revealing a rather frustrating problem.
I wrote my own Idoc "wrecking" script last year primarily for Fel Idocs and I love it but it's not working out so well in trammel since the changes went into effect since then.
The Problem
- I'm getting beaten quite soundly in trammel regardless of which script I am using
Some options
- Rework my script(s)
A Vacuum
- I'm basically going to tweak things until I have a vacuum script that sucks up everything onto my own pack horses, which is probably similar to better scripts with all the pathfinding and prioritizing goodies. At least then I'd actually grab more items, not necessarily better items, but more.
- Doing weight checks and item number checks will be needed to not overload, not too hard
- Pack horse support
Any help appreciated, as always.
-
Working on it now, some other issues to resolve would be opening heavy containers to loot from inside and the new "cannot perform another action" problem if you loot too fast at idoc, I didn't see anyone mentioning a workaround yet, does anyone know what the delays are? If not I'll post when I figure them out myself.
-
Sounds like you need to scavenge as quickly as possible. My guess is there are other people out there that are using UOS scripts or even stealth scripts that can run rings around EUO.
I'd stay away from the CLAw for this; it's deliberately slow to be reliable. You need something much simpler.
Here's a smaller looter I wrote a while back that might help form a more quick framework for you:
;============================================
; Script Name: TrailMyx's Loot'n'Scoot Pro v6
; Author: TrailMyx
; Version: 9
; Client Tested with: 5.0.1h 60
; EUO version tested with: 1.5 69
; Shard OSI / FS: FS (Alexandria) OK / OSI OK(Should be)
; Revision Date: 2-2-2007
; Public Release: 2-2-2007
; Global variables: none
; Purpose:
; I wanted a looting aid to help loot magery/necro scrolls as well as gems
; from various elemental-type monsters. So that's what this script is
; geared for. This script is simple, fast and easy to use.
;
; This script will loot any body type found within 2 spaces from your character
; using 2 different modes:
;
; Mode 1: Alt-F1 - Loots a targeted body. Your computer will *bonk* when complete
; Mode 2: Alt-F2 - Loots all bodies within 2 spaces. The script will keep
; track of bodies that you have looted for 2 minutes, then reset all ignored bodies.
; This way you won't keep looting bodies already looted.
;
; If you would like to loot/change the looted items, edit the second
; parameter in the GrabItem() function with your specific itemtype.
;
; Note: If you have Alt-F1 or Alt-F2 used for a UO-client macro, you will need
; to change this script (onhotkey) or your client settings.
;
; Enjoy! -TM
;============================================
set %version 9
gosub showEUOMenu1
gosub OpenPaperdoll
gosub TM_AdvJournalSync DRAG 200
set #LPC 50
set %use_sound #TRUE
set %hide_corpses #TRUE
set %targeted_key F1
set %area_key F2
set %loot_list POF_KYM_QYM_WYM_SYM_PYM_NYM_TYM_HYM_VYM_UYM_RYM_MYM_LYM_JYM_IYM_OYM
set %scan_ground #FALSE
set %always_scan #TRUE
gosub TM_NGFS_DoesSaveExist loot_n_scoot
if #RESULT = #FALSE
{
gosub TM_NGFS_InitializeScript loot_n_scoot
gosub TM_NGFS_RegisterVariables loot_n_scoot std std use_sound
gosub TM_NGFS_RegisterVariables loot_n_scoot std std hide_corpses
gosub TM_NGFS_RegisterVariables loot_n_scoot std std targeted_key
gosub TM_NGFS_RegisterVariables loot_n_scoot std std area_key
gosub TM_NGFS_RegisterVariables loot_n_scoot std std loot_list
gosub TM_NGFS_RegisterVariables loot_n_scoot std std always_scan
gosub TM_NGFS_SaveVariables loot_n_scoot
}
else
{
gosub TM_NGFS_InitializeScript loot_n_scoot
gosub TM_NGFS_LoadVariables loot_n_scoot
}
menu set EUOCheckSound %use_sound
menu set EUOCheckHide %hide_corpses
menu set EUOEditTargeted %targeted_key
menu set EUOEditArea %area_key
menu set EUOLootList %loot_list
menu set EUOCheckAuto %always_scan
set %container_delay 20
set %lootdelay 20
set #NEXTCPOSX 15
set #NEXTCPOSY 396
set %ignoreitem_ptr LIST1
set %hidden_containers_old
set %hidden_containers_current
set %ignored_containers
set %ignoreitem_timer #SCNT + 600 ; 10 minutes between
set !TM_HEAL #FALSE
set %BOS_ITEMS POF_
set %use_bos #TRUE
namespace push
namespace global TM_loot
set !TM_initialized #TRUE
set !TM_loot_enable #TRUE
set !TM_loot_in_progress #FALSE
set !TM_loot_success #FALSE ; item successfully found and looted
set !TM_eval_request #FALSE
set !TM_artifact_index 0
set !TM_ping N/A
set !TM_MODE N/A
namespace pop
gosub StandingStill
;-----------------------------------
;----------- Main Loop -------------
;-----------------------------------
set #MENUBUTTON N/A
repeat
gosub CheckForBagOfSending
namespace copy TM_HEAL from global TM_healer
if !TM_HEAL <> #TRUE
{
gosub HandleExternalInterface
gosub ManageIgnoreList
gosub CheckHotKey
gosub HandleTargeted
gosub CheckHotKey
gosub HandleArea
gosub HandleExternalRequest
gosub HandleAreaGround
if #MENUBUTTON = EUOButtonSave
{
set #MENUBUTTON = N/A
display yesno Are you sure you want to save?
if #DISPRES = yes
{
menu get EUOCheckSound
set %use_sound #MENURES
menu get EUOCheckHide
set %hide_corpses #MENURES
menu get EUOEditTargeted
set %targeted_key #MENURES
menu get EUOEditArea
set %area_key #MENURES
menu get EUOLootList
set %loot_list #MENURES
menu get EUOCheckAuto
set %always_scan #MENURES
gosub TM_NGFS_SaveVariables loot_n_scoot
}
}
}
until #FALSE
;-----------------------------------
;-----------------------------------
;-----------------------------------
sub HandleExternalRequest
namespace push
namespace global TM_loot
if !TM_eval_request = #TRUE
{
set !TM_loot_in_progress #TRUE
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Red
set %body !TM_eval_source
finditem %body
if #FINDCNT > 0
{
gosub OpenContainer #FINDID
set %container #RESULT
gosub LootStuff %container !TM_eval_destination
set #NEXTCPOSX 15
set #NEXTCPOSY 396
}
menu get EUOCheckSound
if #MENURES = #TRUE
sound
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Lime
set !TM_loot_in_progress #FALSE
}
namespace pop
return
;-------------------------------------------------------------------------------
sub StandingStill
namespace push
namespace local STILL
set !newpos #CHARPOSX , #CHARPOSY , #CHARPOSZ
if !newpos <> !oldpos || !move_timer = N/A
{
set !delay 1
set !oldpos !newpos
set !still #FALSE
set !move_timer #SCNT + !delay
}
if #SCNT > !move_timer
{
if !oldpos = !newpos
{
set !still #TRUE
}
else
{
set !oldpos !newpos
set !move_timer #SCNT + !delay
}
}
set #RESULT !still
namespace pop
return #RESULT
;-------------------------------------------------------------------------------
sub HandleExternalInterface
namespace copy TM_ping from global TM_loot
if !TM_ping = PING ;------------------------- looter being pinged to be used, adjust behavior
{
set !TM_ping PONG
set %runtimeLPC 10
set %exevent_drag 10
set %exevent_drop 20 ; slow down for interfacing script
namespace copy TM_ping to global TM_loot
}
return
;-----------------------------------
sub HandleTargeted
if %loottargeted = #TRUE
{
namespace push
namespace global TM_loot
set !TM_loot_in_progress #TRUE
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Red
set %loottargeted #FALSE
set #TARGCURS 1
repeat
until #TARGCURS <> 1
set %body #LTARGETID
finditem %body
if #FINDCNT > 0
{
gosub OpenContainer #FINDID
set %container #RESULT
gosub LootStuff %container #BACKPACKID
set #NEXTCPOSX 15
set #NEXTCPOSY 396
}
menu get EUOCheckSound
if #MENURES = #TRUE
sound
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Lime
set !TM_loot_in_progress #FALSE
namespace pop
}
return
;-----------------------------------
sub HandleArea
menu get EUOCheckAuto
set %always_scan #MENURES
gosub StandingStill
if %always_scan = #TRUE && #RESULT = #TRUE
{
finditem YFM G_2
if #FINDCNT > 0
set %lootarea #TRUE
}
if %lootarea = #TRUE
{
namespace push
namespace global TM_loot
set !TM_loot_in_progress #TRUE
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Red
set %lootarea #FALSE
repeat
finditem YFM G_2
set %foundcount #FINDCNT
menu set EUOEditBodies %foundcount
if #FINDCNT > 0 && #FINDID notin %ignored_containers
{
set %body #FINDID
gosub OpenContainer #FINDID
set %container #RESULT
gosub LootStuff %container #BACKPACKID
set #NEXTCPOSX 15
set #NEXTCPOSY 396
ignoreitem %body TEMP
menu get EUOCheckHide
event property %body
if #MENURES = #TRUE && remains notin #PROPERTY
hideitem %body
}
until %foundcount = 0
menu get EUOCheckSound
if #MENURES = #TRUE
sound
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Lime
set !TM_loot_in_progress #FALSE
namespace pop
}
return
;-----------------------------------
sub HandleAreaGround
gosub StandingStill
if %scan_ground = #TRUE && #RESULT = #TRUE
{
namespace push
namespace global TM_loot
set !TM_loot_in_progress #TRUE
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Red
gosub LootStuffGround #BACKPACKID
menu get EUOCheckSound
if #MENURES = #TRUE
sound
menu delete EUOShape1
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Lime
set !TM_loot_in_progress #FALSE
namespace pop
}
return
;-----------------------------------
; %1 = %container
sub LootStuff
namespace push
namespace local LS
set !container %1
set !dest %2
menu get EUOLootList
gosub GrabItem !container #MENURES !dest
namespace pop
return
;-----------------------------------
; %1 = %container
sub LootStuffGround
namespace push
namespace local LS
set !dest %1
menu get EUOLootList
gosub GrabItemGround #MENURES !dest
namespace pop
return
;-------------------------------------------------------------------------------
sub OpenContainer
namespace push
namespace local OC
set !body %1
set !temp_cnt #SCNT + 12
set !container_timeout 5
repeat
namespace copy TM_HEAL from global TM_healer
if !TM_HEAL = #TRUE
wait 20
if #SCNT > !temp_cnt
{
namespace pop
return #TRUE
}
until !TM_HEAL <> #TRUE && #LLIFTEDKIND = 0 && #TargCurs <> 1 && A notin #CHARSTATUS
gosub TM_AdvJournalSync DRAG
set #LOBJECTID !body
set !temp_contid #CONTID
set !temp2_cnt #SCNT + 5
event macro 17 0
repeat
until #CONTID <> !temp_contid || #SCNT > !temp2_cnt
set !temp_cnt #SCNT + !container_timeout
set !open_retry_cnt #SCNT + 2
repeat
set !sample_contid #CONTID
gosub TM_AdvJournalScan DRAG VALID you_must_wait
if #RESULT = #TRUE || #SCNT > !open_retry_cnt
{
gosub TM_AdvJournalSync DRAG
wait 20
set #LOBJECTID !body
set !temp_contid #CONTID
set !temp2_cnt #SCNT + 2
event macro 17 0
repeat
until #CONTID <> !temp_contid || #SCNT > !temp2_cnt
set !temp_cnt #SCNT + !container_timeout
set !open_retry_cnt #SCNT + 2
continue
}
gosub TM_AdvJournalScan DRAG VALID you_did_not_earn that_is_too_far that_is_out_of_sight reach
if #RESULT = #TRUE
{
gosub TM_AdvJournalSync DRAG
namespace pop
return #TRUE ; impossible to open this container - forget it
}
str del !sample_contid 1 4
until ( ( ( #STRRES in !body ) || ( #SCNT > !temp_cnt ) ) && !temp_cnt <> #CHARID )
if #SCNT > !temp_cnt
{
namespace pop
return #FALSE ; not a fatal error, can try and open again
}
wait %container_delay
set %ignored_containers %ignored_containers , _ , !sample_contid
set #RESULT !sample_contid
namespace pop
return #RESULT
;-----------------------------------
; %1 = Body ID
; %2 = Item type
sub GrabItem
namespace push
namespace local GI
set !tempbody %1
set !items %2
set !dest %3
finditem !items C_ , !tempbody
if #FINDCNT > 0
{
for #FINDINDEX 1 #FINDCNT
{
repeat
until #LLIFTEDKIND = 0 && #TargCurs <> 1
exevent drag #FINDID #FINDSTACK
exevent dropc !dest
exevent dropc !dest
wait %lootdelay
}
}
return
;-----------------------------------
; %1 = Item type
; %2 = Destination
sub GrabItemGround
namespace push
namespace local GI
set !items %1
set !dest %2
finditem !items G_2
if #FINDCNT > 0
{
for #FINDINDEX 1 #FINDCNT
{
exevent drag #FINDID #FINDSTACK
wait 5
exevent dropc !dest
wait %lootdelay
}
}
return
;-------------------------------------------------------------------------------
; %1 = Gumpname 1
; %2 = Gumpname 2
sub GumpWait
wait 10
set %timedelay #SCNT
repeat
if #CONTNAME = %1 || #CONTNAME = %2
return
until #SCNT > %timedelay + 7
return
;-------------------------------------------------------------------------------
sub OpenPaperdoll
event macro 8 1 ; open paperdoll
gosub GumpWait NULL paperdoll_gump NULL
contpos 750 0
return
;-------------------------------------------------------------------------------
;---------------------- Advanced Journal Handling Subs -----------------------
;-------------------------------------------------------------------------------
; %1 - Journal Name
; %2 - #LPC setting (optional)
; Brings !_jindex up to the most recent #journal entry
sub TM_AdvJournalSync
namespace push
namespace local TM_AdvJS_ , %1
set !_jindex #jindex + 1
if %0 > 1
set !lpc_set %2
namespace pop
set !TM_FunctionCalled #TRUE
return
;-------------------------------------------------------------------------------
; %1 - Journal Name
; %2 - NONE, ADVANCE , ( _VALID ) - advances jindex pointer, anything else
; %3, %4, %5, etc strings to match
; returns #TRUE for match, #FALSE for no match
; Will not advance !_jindex pointer to allow for scanning journal history for more than one search.
; Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
; About %2 arguments:
; NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
; ADVANCE: no spam checking, advances #jindex copy
; VALID: invokes SPAM filtering, no advance of #jindex copy
; VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy
sub TM_AdvJournalScan
namespace push
namespace local TM_AdvJS_ , %1
set !args %2
set !temp_lpc #LPC
if !lpc_set = N/A
set #LPC 1000
else
set #LPC !lpc_set
set !num_args %0
set !first_arg 3
if !_jindex = N/A
set !_jindex #jindex
if !charname = N/A
{
set !charname #CHARNAME
AdvJournalScan_loop1:
str pos !charname #SPC
if #STRRES <> 0
{
set !val #STRRES - 1
str left !charname !val
set !left #STRRES
set !val !val + 1
str del !charname 1 !val
set !charname !left , _ , #STRRES
goto AdvJournalScan_loop1
}
}
set !index !first_arg
repeat
set !temp_jindex !_jindex
set !text % . !index
while !temp_jindex <= #jindex
{
scanjournal !temp_jindex
str pos #JOURNAL !charname 1
set !namepos #STRRES
str count #JOURNAL !charname
set !namecnt #STRRES
str pos #JOURNAL :_ 1
set !smcpos #STRRES
str pos #JOURNAL !text 1
set !textpos #STRRES
if !textpos < !smcpos && !smcpos <> 0 || !smcpos = 1 || :_ notin #JOURNAL || VALID notin !args
set !pass #TRUE
else
set !pass #FALSE
if ( !text in #journal && ( ( !namepos = 1 && !namecnt <= 1 ) || !pass ) )
{
set !temp_jindex !temp_jindex + 1
if ADVANCE in !args
set !_jindex !temp_jindex
set #LPC !temp_lpc
namespace pop
set !TM_FunctionCalled #TRUE
return #TRUE
}
set !temp_jindex !temp_jindex + 1
}
set !index !index + 1
until !index - !first_arg > !num_args - !first_arg
set #LPC !temp_lpc
set %10 #JINDEX - !_jindex
set %10 %1 , _ , %10
namespace pop
set !TM_FunctionCalled #TRUE
return #FALSE
;-------------------------------------------------------------------------------
sub ManageIgnoreList
if #SCNT > %ignoreitem_timer
{
if %ignoreitem_ptr = LIST1
set %ignoreitem_ptr LIST2
else
set %ignoreitem_ptr LIST1
ignoreitem reset %ignoreitem_ptr
set %hidden_containers_old %hidden_containers_current
set %hidden_containers_current
set %ignoreitem_timer #SCNT + 600 ; 10 minutes between
set %ignored_containers
}
return
;-------------------------------------------------------------------------------
sub CheckHotKey
menu get EUOEditTargeted
onhotkey #MENURES ALT
set %loottargeted #TRUE
menu get EUOEditArea
onhotkey #MENURES ALT
set %lootarea #TRUE
return
;--------------------------------------------------------------------
;--------------------- Base User Functions -------------------------
;--------------------------------------------------------------------
; TM_NGFS_InitializeScript
; %1 - ScriptName
; %2 = (opt) generic : add this tag to create a generic (non-character relative data set)
sub TM_NGFS_InitializeScript
namespace push
namespace local TM_NGFS , _ , %1
namespace clear
set !lpc #LPC
set #LPC 10000
if %0 = 0
{
display ok You must name your script, spaces will be converted to underscores.
stop
}
set !TM_FSSIZE 1000 ; do not change this!!
set !script_name %1
set !args %0
gosub AddUnderscore !script_name
set !script_name #RESULT
if !args = 1
{
gosub AddUnderscore #SHARD
set !slot #CHARID , _ , #RESULT , _ , !script_name , _vars
}
else
{
set !slot generic , _ , !script_name , _vars
}
set ! . !slot
set !varcnt 0
set !index 0
set !script_index N/A
while *TM_FS . !index <> N/A
{
if *TM_FS . !index = !slot
{
set !script_index !index
break
}
set !index !index + 1
}
if !script_index = N/A
{
set !script_index !index
set *TM_FS . !script_index !slot
}
set #LPC !lpc
namespace pop
set !TM_Function_found #TRUE
return
;--------------------------------------------------------------------
; TM_NGFS_RegisterVariables
; %1 - ScriptName
; %2 - NSType (local, global, std) --> std is a %var
; %3 - NSName (std) --> std is a %var
; %4, %5, %6, etc. variable names (don't include the % or ! - so %var becomes var, etc)
sub TM_NGFS_RegisterVariables
if %0 <= 3
{
display ok Not enough arguments
stop
}
namespace push
namespace local TM_NGFS , _ , %1
if !slot = N/A
{
display ok You must name your script and also run TM_NGFS_InitializeScript first.
stop
}
set !nstype %2
set !nsname %3
for !i 4 %0
{
set !var % . !i
if !nstype , , !nsname , , !var notin ! . !slot
{
set !newval ! . !slot
set ! . !slot !newval , !nstype , , !nsname , , !var ,
set !varcnt !varcnt + 1
}
}
namespace pop
set !TM_Function_found #TRUE
return
;--------------------------------------------------------------------
; TM_NGFS_SaveVariables
; %1 - ScriptName
; assuming you have registered the variables, then everything will be saved in one call
sub TM_NGFS_SaveVariables
if %0 = 0
{
display ok You must name your script, spaces will be converted to underscores.
stop
}
namespace push
namespace local TM_NGFS , _ , %1
if !TM_FSSIZE = N/A
{
display ok You must first call TM_NGFS_InitializeScript and have$registered variables with TM_NGFS_RegisterVariables - STOPPING.
stop
}
set !lpc #LPC
set #LPC 10000
set !outstring
set !start 1
set !sepcnt 1
set !line_count 0
set !temp_str ! . !slot
for !i 1 !varcnt
{
gosub ReadItem ! . !slot
set !nstype #RESULT
gosub ReadItem ! . !slot
set !nsname #RESULT
gosub ReadItem ! . !slot
set !var #RESULT
if std in !nstype
{
set !val % . !var
}
else
{
namespace copy !var from !nstype !nsname
set !val ! . !var
}
set !outstring !outstring , !nstype , , !nsname , , !var , , !val ,
str len !outstring
if #STRRES >= !TM_FSSIZE
{
set * . !slot , !line_count !outstring
set !outstring
set !line_count !line_count + 1
set !start !start - 1
str del ! . !slot 1 !start
set ! . !slot #STRRES
set !start 1
set !sepcnt 1
}
}
str len !outstring
if #STRRES > 0
{
set * . !slot , !line_count !outstring
set !line_count !line_count + 1
}
set * . !slot , !line_count N/A ; make sure there's nothing left at end of the list
set #LPC !lpc
set ! . !slot !temp_str
namespace pop
set !TM_Function_found #TRUE
return
;--------------------------------------------------------------------
; TM_NGFS_LoadVariables
; %1 - ScriptName
; note you have to call TM_NGFS_InitializeScript
sub TM_NGFS_LoadVariables
if %0 = 0
{
display ok You must name your script, spaces will be converted to underscores.
stop
}
namespace push
namespace local TM_NGFS , _ , %1
if !TM_FSSIZE = N/A
{
display ok You must first call TM_NGFS_InitializeScript - STOPPING.
stop
}
set !lpc #LPC
set #LPC 10000
set !start 1
set !sepcnt 1
set !line_count 0
set !temp !slot , !line_count
set !string * . !temp
set ! . !slot
set !varcnt 0
set !continue #TRUE
while !continue = #TRUE
{
gosub ReadItem !string
if !continue = #TRUE
{
set !nstype #RESULT
gosub ReadItem !string
set !nsname #RESULT
gosub ReadItem !string
set !var #RESULT
gosub ReadItem !string
set !val #RESULT
if std in !nstype
{
set % . !var !val
}
else
{
set ! . !var !val
namespace copy !var to !nstype !nsname
}
set !newval ! . !slot
set ! . !slot !newval , !nstype , , !nsname , , !var ,
set !varcnt !varcnt + 1
}
if !continue = #FALSE
{
set !line_count !line_count + 1
set !temp !slot , !line_count
set !string * . !temp
set !start 1
set !sepcnt 1
if !string <> N/A
set !continue #TRUE ; still more to process
}
}
set #LPC !lpc
namespace pop
set !TM_Function_found #TRUE
return
;--------------------------------------------------------------------
; Used internally
sub ReadItem
str pos %1 !sepcnt
if #STRRES <> 0
{
set !len #STRRES - !start
str mid %1 !start !len
set !start !start + !len + 1
set !sepcnt !sepcnt + 1
return #STRRES
}
set !continue #FALSE
return #TRUE
;--------------------------------------------------------------------
; Used internally
; %1 - string to mung
sub AddUnderscore
namespace push
namespace local AU
set !tempstring %1
AddUnderscore_loop1:
str pos !tempstring #SPC
if #STRRES <> 0
{
set !val #STRRES - 1
str left !tempstring !val
set !left #STRRES
set !val !val + 1
str del !tempstring 1 !val
set !tempstring !left , _ , #STRRES
goto AddUnderscore_loop1
}
set #RESULT !tempstring
namespace pop
return #RESULT
;-------------------------------------------------------------------------------
sub CheckForBagOfSending
if ( #WEIGHT > ( #MAXWEIGHT - 5 ) && ( %use_bos = #TRUE ) )
{
wait 20
set %bos N/A
repeat
finditem CKF C_ , #BACKPACKID
if #FINDCNT > 0
{
for #FINDINDEX 1 #FINDCNT
{
event property #FINDID
if charges in #PROPERTY && charges: , #SPC , 0 notin #PROPERTY
{
set %bos #FINDID
break
}
}
}
until %bos <> N/A || #FINDCNT = 0
if %bos <> N/A
{
finditem %BOS_ITEMS C_ , #BACKPACKID
if #FINDCNT > 0
{
for #FINDINDEX 1 #FINDCNT
{
set #LOBJECTID %bos
set #LTARGETID #FINDID
set #LTARGETKIND 1
event macro 17
target 5s
event macro 22
}
}
}
}
return
;--------------------------------------------------------------------
;---------------- Advanced File System Functions -------------------
;--------------------------------------------------------------------
; TM_NGFS_DoesSaveExist
; %1 - ScriptName
; #RESULT = #TRUE - exists, #FALSE - doesn't exist
; note: this is relative to the current character.
sub TM_NGFS_DoesSaveExist
namespace push
namespace local TM_NGFS , _ , %1
set !lpc #LPC
set #LPC 10000
set !script_name %1
set !args %0
gosub AddUnderscore !script_name
set !script_name #RESULT
if !args = 1
{
gosub AddUnderscore #SHARD
set !tempslot #CHARID , _ , #RESULT , _ , !script_name , _vars
}
else
{
set !tempslot generic , _ , !script_name , _vars
}
set !index 0
set #RESULT #FALSE
while *TM_FS . !index <> N/A
{
if *TM_FS . !index = !tempslot
{
set #RESULT #TRUE
break
}
set !index !index + 1
}
set #LPC !lpc
namespace pop
set !TM_Function_found #TRUE
return #RESULT
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title TrailMyx's Loot'n'Scoot Pro , #SPC , v , %version , #SPC , - , #SPC , #CHARNAME
menu Window Color BtnFace
menu Window Size 507 47
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel1 4 8 List:
menu Text EUOLabel2 348 8 Alt +
menu Text EUOLabel3 348 28 Alt +
menu Text EUOLabel4 396 8 Targeted
menu Text EUOLabel5 396 28 Area
menu Shape EUOShape1 444 4 37 41 3 7 1 Black 7 Lime
menu Font BGColor Window
menu Edit EUOLootList 28 4 301 POF_KYM_QYM_WYM_SYM_PYM_NYM_TYM_HYM_VYM_UYM_RYM_MYM_LYM_JYM_IYM_OYM
menu Edit EUOEditTargeted 372 4 21 F1
menu Edit EUOEditArea 372 24 21 F2
menu Font BGColor BtnFace
menu Check EUOCheckSound 4 28 61 17 #false Sound?
menu Check EUOCheckHide 68 28 101 17 #false Hide Corpses?
menu Check EUOCheckGround 170 28 65 17 #false Ground?
menu Button EUOButtonSave 304 24 39 21 Save
menu Font BGColor Window
menu Edit EUOEditBodies 484 12 21 0
menu Font BGColor BtnFace
menu Check EUOCheckAuto 238 28 49 17 #false Auto?
menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------
-
That's awesome TM, thank you. I'll share whatever I come up with if I think it's remotely useful and polished enough to be worthy.
My personal challenge is going to be pack horse integration, haven't really played with packies before. There isn't much, as in probably NO, wiggle room speed wise vs whatever the other guys are using so thanks for the tips.
-
*whew* None of them fell, I have another 5 hours to get this working :)
What I've got so far
- searches around me for items
- drops items I can reach into my pack
- ignores items I do not want at all
- manages separate ignore lists so that I can reset one list without resetting the others
- if an item cannot be picked up(locked down, out of reach etc) it doesn't stay stuck on that item
Doing now
- Trying to figure out the proper wait times to not trigger errors but unsure about idoc times since, apparently, if you loot too fast you get timed out
To Do
- add packhorse support
I'm open to suggestions, tips, advice as I write this... houses are falling!
-
I keep getting the odd "you are already holding yadda yadda" message and the only way to fix it is to restart the client. The script is snagging in 3 ways.
#1 - It occasionally drops and item and tries to pick up another too quickly. This makes the drop never happen and the next item is stuck in your hands.
#2 - It occasionally picks up an object that is too heavy so the script makes me drop it at my feet but it picks up the next item before the drop is finished, same result as #1
#3 - It tries to pick up an item that cannot be reached and then, by reading the journal, ignores the item but it picks up the next item before the ignore sticks, same result as #1
So obviously I made the wait periods much, much longer. 30 seconds long in fact just for testing but the problem still happens on occasion. I applied a wait loop but it seems like just performing a findid is causing issues. I do have this script checking for objects nearby without interacting with them.
Has this problem been solved for scripts that look for *any* item using finditem G_2 * ??
In the meantime I'm checking out steam and stealth. Steam seems like it's better than razor for looting but the site is gone and updates should not be expected so... Stealth seems like the better program for idocs but the setup is brutal(can't create a profile page without selecting the profile page to create??). I've got a custom made russian idoc script that looks promising, if I can get stealth up and running, but is all setup this tedious with stealth?
I don't mean to sound like I'm complaining, I find all of these scripts fascinating and have ideas on how to improve each, but I don't want to waste too long working on a platform that just won't measure up to the INSANELY fast looters out there. I realize you may be some of those looters and it's not in your best interest to share, and frankly I probably need to earn it, but I really do appreciate all suggestions, tips or advice given for EUO on this EUO related site.
Oh and that idoc yesterday, one guy got good items out of a chest right in front of me as I was picking it up. That's the difference right now, I can't drag the chest as quickly as his script can open and loot from it. Yet :)
-
Yeh, timing of these kinds of scripts can be hard. The "you are already holding.." thing can be solved with journal scanning and then doing a drop. Problem is that on OSI, you can't easily drop onto the ground at your feet.
My 2.0 IDOC looter maintained weights calculated between the various pack animals you had and balances the load. I haven't run that script in years, and no doubt it's broken completely with all the IDOC changes. But it's possible to maintain your weight and not pick up items that are too heavy (i.e. event property to get weight/items and compute accordingly)
-
I'm pausing my work on the script, I've moved over to stealth for now, for idocs. The mapping system is better than I've seen in any application yet and it even places markers on NPCs, players etc. It maps houses too making the search faster. The entire application replaces the client, in fact it IS the client, and so the speed improvement is dramatic.
**EDIT** Crud, I just realized that stealth is already doing what I want. As I said the map marks NPC positions and houses, including vendors inside houses. Well, stop marking the NPC positions and start marking the sign conditions and make the markers change color accordingly just like the npc markers are now(blue for player, yellow for vendor etc). Could that be done or is the map code protected? It doesn't get any faster than not running a script at all, right? :) Just an idea.
-
.... and I'm back, to working on my idoc script for EUO that is. The learning curve with stealth is a bit steep and I need a working solution now, I can upgrade later when I learn more stealth related code or someone posts a working looter there(when pigs fly, right?). I used your looter last year TM, with good success but it's no longer viable since you can't see items to create a list for anymore.
Problem is that on OSI, you can't easily drop onto the ground at your feet.
I noticed that so I now avoid situations that will place something in my hands that I would want to drop to the ground and I have an "oh crap" drop button too, just in case.
I have a question, of course, but I've also made a lot of progress. I solved a few of the issues I had the other night too
This is what I have tested and working so far
- does not require me to provide a list of items to search for
- searches for any item within range
- does not try to pick up items when an item is being dragged(without relying on wait times)
- ignores stacked items(for now, just a preference until I add packhorse support)
- opens and then ignores containers that I could not hold due to weight so that I can see what's inside as script moves on
- multiple ignore lists, one for permanently ignored items, others for temporary conditions
- journal scanning to handle specific idoc situations like cannot reach or cannot get there
- debug file, records the FINDID of anything that caused me a problem. Using this to create a stronger permanent ignore list, THIS PAGE (http://www.easyuo.com/itemdb/index.php?search=search) has been helpful identifying problem items
- a LOT of testing(my house is a mess now) and a LOT of optimizing, reducing code etc
This is still to do
- add packhorse support for trammel(would be simple if the buggers NEVER went more than 2 tiles from me)
- add a wider scan for wanted items and move towards them, while looting on the way(if speed permits)
- See if I can reduce code/steps further, it's at 70 lines right now
- Add a little secret sauce for dealing with situations specific to idocs
One thing that's giving me a hard time right now is the "that is too far" message when an itemid is picked up but I move out of range before the script snags it. I have it degrading well and moving on immediately but I'd like to know how to set up a temporary ignore specific for this situation. ie: Ignore that item for x seconds. Can ignoreitem be set to ignore an item momentarily instead or do I need to set it to a list and manage how long it stays there in another way, perhaps by setting an SCNT + x timer on it? "ignoreitem 3 3" would be ideal, adding the item to list 3 then ignoring it for 3 seconds(example) with just that line of code but alas, doesn't work. I'm considering a hotkey to clear a specific ignore list on command but is there a better way?
-
Create your own ignore list and add a timer... ie
gosub IgnoreMe %SomeID %SomeTimeInMS
gosub IsIgored %SomeID
if #return
display ok i am ignored
gosub KillIgnore %someid
sub IgnoreMe
;some code here
return
;etc