UOS: Not finding an object in a container?

General discussion pertaining to the Demise shard. Off-topic posts will be moderated.
Post Reply
Vampire337
Posts: 47
Location: Cincinnati, Ohio

UOS: Not finding an object in a container?

Post by Vampire337 »

And now for a little Schrödinger's Cat exercise in UOSteam. Here is a snip from a larger script I've written to gather BODs and put them into common storage:

Code: Select all

while @findtype '0x2258' '1102' 'backpack'
  @setalias 'BOD' 'found'
  if @property 'Small Bulk Order' 'BOD'
    headmsg 'Found small smithing bulk order.' 91
    if @findobject 'LBOD Book' 'any' 'backpack'
      headmsg 'Returning LBOD Book to storage' 91
      moveitem! 'LBOD Book' 'DropChest' 118 123 0 1
      pause 1000
    endif
    if @findobject 'Tailor SBOD Book' 'any' 'backpack'
      headmsg 'Returning Tailor SBOD Book to storage' 91
      moveitem! 'Tailor SBOD Book' 'DropChest' 118 123 0 1
      pause 1000
    endif
    headmsg 'Looking in drop chest...' 91
    @useobject 'DropChest'
    pause 3000
    waitforcontents 'DropChest' 5000
    if findobject 'Smith SBOD Book' 'any' 'DropChest'
      headmsg 'Getting Smith SBOD Book from storage' 91
      moveitem! 'Smith SBOD Book' 'Backpack' 45 65 0 1
      pause 1500
    endif
    if @findobject 'Smith SBOD Book' 'any' 'backpack'
      headmsg 'Placing SBOD into book' 91
      moveitem 'BOD' 'Smith SBOD Book'
      waitforgump 0x54f555df 1000
      replygump 0x54f555df 0
      pause 1000
    else
      headmsg 'Smith SBOD book not found in backpack!' 33
      stop
    endif
The output I get from this is as follows:
Screenshot 2020-12-13 122228.jpg
Screenshot 2020-12-13 122228.jpg (13.82 KiB) Viewed 647 times
This confirms that there is a grey bulk order deed in 'backpack', and the script is in fact checking the 'DropBox' and the findobject command is not finding the 'Smith SBOD Book'. The LBOD and Tailor SBOD books are in the DropBox, so no headmsg text identifies them as being moved. Problem is, the BOD book is most certainly in the 'DropBox' container, and if I run the script a second time it finds it with no issue and moves it to 'backpack'.

I have tried adding waitforcontents; I have tried using useobject to refresh the contents of the chest; I have added ridiculous pauses to see if it just needs more time to catch up. Nothing seem to trigger a rescan of the container, outside of failing and restarting the script. Any advice on how to get UOSteam to 'see' an object in a container? This seems like it should be simple.
Post Reply