Author Topic: open container, unload, get  (Read 6119 times)

0 Members and 1 Guest are viewing this topic.

Offline camotbikTopic starter

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
open container, unload, get
« on: August 10, 2011, 03:47:44 PM »
0
Code: [Select]
; Purpose: to open up a container
; usage: gosub open_container ID
; gosub open_container %storage
sub open_container
  set #lobjectid %1
  while #contID <> %1
  {
    event macro 17
    wait 20
  }
return

; Purpose: unload stuff from specific container to specific container
; usage: gosub unload Type ID ID
; gosub unload %loot #backpackid %storage
; gosub unload %loot %lootbag %storage
sub unload
  finditem %1 C_ , %2
    while #findcnt > 0
    {
      Exevent Drag #findid #findstack
      Exevent Dropc %3
      wait 20
      finditem %1 C_ , %2
    }
return


; Purpose: grab stuff from specific container
; usage: gosub get type ID ammount
; gosub get %pickaxe %storage 10
; gosub get %bandages %storage 100
sub get
  for %i 1 %3
  {
    finditem %1 C_ , %2
    if #findcnt > 0
    {
      if #findstack > 1
      {
        Exevent Drag #findid %3
        Exevent Dropc #backpackid
        wait 20
        return
      }
      else
      {
        Exevent Drag #findid #findstack
        Exevent Dropc #backpackid
        wait 20
      }
    }
  }
return
« Last Edit: August 11, 2011, 02:34:01 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline camotbikTopic starter

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: open container, unload, get
« Reply #1 on: August 11, 2011, 04:09:40 AM »
0
A little addition. You could use unload as a primitive looter as well. for example
Code: [Select]
set %loot POF

_loop:
while ( #weight < ( #maxweight - 100 ) ) && #charghost = no
{
repeat
 wait 10
until #contname = container_gump && #conttype = YFM
set %body #contid
wait 10
gosub unload %loot %body #backpackid
}
goto _loop

sub unload
  finditem %1 C_ , %2
    while #findcnt > 0
    {
      Exevent Drag #findid #findstack
      Exevent Dropc %3
      wait 20
      finditem %1 C_ , %2
    }
return

« Last Edit: August 11, 2011, 05:29:42 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Tags: