Author Topic: Help with another dumping sub please  (Read 2216 times)

0 Members and 1 Guest are viewing this topic.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3016
  • Activity:
    3.6%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +206
  • Referrals: 2
    • View Profile
Help with another dumping sub please
« on: January 05, 2014, 03:20:31 PM »
0
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.  :(

Offline MeWonUo

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: Help with another dumping sub please
« Reply #1 on: January 05, 2014, 04:02:29 PM »
0
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. :)

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 3016
  • Activity:
    3.6%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +206
  • Referrals: 2
    • View Profile
Re: Help with another dumping sub please
« Reply #2 on: January 05, 2014, 04:56:20 PM »
0
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

Offline MeWonUo

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: Help with another dumping sub please
« Reply #3 on: January 05, 2014, 05:06:50 PM »
0
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!! 

Tags: