ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Crisis on January 05, 2014, 03:20:31 PM

Title: Help with another dumping sub please
Post by: Crisis on January 05, 2014, 03:20:31 PM
I am trying to get this sub to time out for 3 minutes if the trash barrel is full. It ends up sticking there and I cannot figure out what I missed.

Code: [Select]
sub ClearPackGarbage
  menu delete scriptstatus
  menu Font BGColor Black
  menu Font Color Lime
  menu text scriptstatus 95 100 Clearing Pack of Garbage
  _cleargarbageloop:
  {
  finditem %Garbage C_ , #backpackid
  if #findcnt > 0
  }
  for %ItemToDump 1 #findcnt
  {
    Set #FindIndex %ItemToDump
    exevent drag #findid #findstack
    wait 20
    exevent dropc %trashbarrel
    wait 20
  }
  gosub TM_AdvJournalScan BOWCRAFTING VALID_ADVANCE that_container_cannot_hold_more_weight
  if #result = #true
  {
    menu delete scriptstatus
    menu Font BGColor Black
    menu Font Color Lime
    menu text scriptstatus 95 100 Clearing Pack of Garbage
    wait 180s
    goto _cleargarbageloop
  }
return

Is it the wait I have in there? Should it be written in another way to wait for 3 minutes? It also take a while for it to read the journal and stop trying to dump things.  :(
Title: Re: Help with another dumping sub please
Post by: MeWonUo on January 05, 2014, 04:02:29 PM
Unless something has changed in the past few months...

You can completely avoid the weight limitation in trash cans simply by securing them.  This would effectively remove the need for you to bother with watching the weight of the container.

And if memory still serves.  When the can gets to 125 items, it auto deletes everything in the barrel. 

If these things still hold true, your script just got a whole lot easier to create. :)
Title: Re: Help with another dumping sub please
Post by: Crisis on January 05, 2014, 04:56:20 PM
YouWinUO is right! Thank you for the heads up, it worked perfectly. I secured it and it was able to take the weight and emptied at 125.  ;D
Title: Re: Help with another dumping sub please
Post by: MeWonUo on January 05, 2014, 05:06:50 PM
YouWinUO is right! Thank you for the heads up, it worked perfectly. I secured it and it was able to take the weight and emptied at 125.  ;D

Glad I could help Crisis!  :)  Keep the good stuff coming!!