Script

2012-01-26

Auto empty inventory - Advanced

If you use the bot for collecting items it may enter in the 50% status and, as everyone know, when it happen the sp and hp will not naturally restored.

Moreover when the bot becames 89%. will continue to kill mobs without pick up the items...

So to avoid this you can configure the control\items_control or simply using this macro:

# XILERO BOT - http://xilerobot.blogspot.com/

$item = "";
macro mEmptyInventory {
  $id = @inventory($item)
  $qt = @invamount($item)
  log $item: $id - $qt
  if ($id == -1) goto end
    do c @storage
    pause 1
    do storage add $id
    pause 1
    do storage close
  :end
}
automacro autoweight{
  weight > 49%
  call {
    $item = Apple
    call mEmptyInventory
  }
  timeout 30
}
This macro use automacro to call a macro. In this way you can reuse the code to put more than one type of items onto storage just adding 2 lines in the automacro:
# XILERO BOT - http://xilerobot.blogspot.com/

automacro autoweight{
  weight > 49%
  call {
    $item = Apple
    call mEmptyInventory
    $imte = Carrot
    call mEmptyInventory
  }
  timeout 30
}
 Note: the pause 1 commands is to avoid potential lag

8 comments:

  1. Anonymous26/6/12 21:29

    I have added like this to control\items_control, but bot does not use auto-stores..so what should i do?? is the following macro wrong??


    # XILERO BOT - http://xilerobot.blogspot.com/

    $item = "";
    macro mEmptyInventory {
    $id = @inventory($item)
    $qt = @invamount($item)
    log $item: $id - $qt
    if ($id == -1) goto end
    do c @storage
    pause 1
    do storage add $id
    pause 1
    do storage close
    :end
    }
    automacro autoweight{
    weight > 20%
    call {
    $item = Butterfly Wing
    call mEmptyInventory
    $item = fly wing
    call mEmptyInventory
    $item = Authoritative Badge
    call mEmptyInventory
    $item = trunk
    call mEmptyInventory
    $item = Greatest General Card
    call mEmptyInventory
    $item = brigan
    call mEmptyInventory
    $item = Dead Branch
    call mEmptyInventory
    $item = Glass Bead
    call mEmptyInventory
    $item = Nine Tails
    call mEmptyInventory
    $item = Rough Oridecon
    call mEmptyInventory
    $item = Panacea
    call mEmptyInventory
    $item = Old Blue Box
    call mEmptyInventory
    $item = Butterfly Wing
    call mEmptyInventory
    }
    timeout 30
    }

    ReplyDelete
    Replies
    1. They are two different ways for getting the same result.
      You could configure the items_controls.txt OR configuring the macro.txt

      Delete
  2. Anonymous1/7/12 16:55

    is there any macro for auto loot items instead of picking up each item?? that will be very helpful.

    ReplyDelete
  3. Hi Pain, ive tried the above code for storing Pearls when my characters 50%, and it doesnt seem to store, does it work for stackable items ?

    Heres what I have:
    $item = "";
    macro mEmptyInventory {
    $id = @inventory($item)
    $qt = @invamount($item)
    log $item: $id - $qt
    if ($id == -1) goto end
    do c @storage
    pause 1
    do storage add $id
    pause 1
    do storage close
    :end
    }
    automacro autoweight{
    weight > 49%
    call {
    $item = Pearl
    call mEmptyInventory
    }
    timeout 30
    }

    ReplyDelete
    Replies
    1. what is the output of the log instruction?

      Delete
  4. Hey Im new to boting and have managed to set up a bot that waps to prt_maze03 and uses stom gust to kill baphomet jr. for yggdrasil berries.
    My main problem is I cant get my bot to put the yggdrasil berrys into @storage when it reaches 90% weight. Could someone make up a macro for just this?
    I am using a high wizard

    ReplyDelete
    Replies
    1. just use the above macro with $item = 607 in autoweight routine

      Delete
    2. OK so I have been able to get the macro to initiate but I have no clue on how to work it.
      here is what I have:
      $item = "607";
      macro mEmptyInventory {
      $id = @inventory(607)
      $qt = @invamount(607)
      log $item: $id - $qt
      if ($id == -1) goto end
      do c @storage
      pause 1
      do storage add $id
      pause 1
      do storage close
      :end
      }
      automacro autoweight{
      weight > 90%
      call {
      $item = 607
      call mEmptyInventory
      }
      timeout 30
      }

      I do not know what to put for $id and $qt.... I'm sorry but as I said I'm really new to botting and the code confuses me.

      Delete