Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: Lua  |  size: 0.71 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function moveManas()
  2.         function move()
  3.                 q = Self.ItemCount("mana potion","Jewelled Backpack")
  4.                                         if q>100 then
  5.                                         q = 100
  6.                 mainContainer = Container.GetByName("Jewelled Backpack")
  7.                 destContainer = Container.GetByName("Moon Backpack")
  8.                 local slot = findSlot(Item.GetID("mana potion"),mainContainer)
  9.                 mainContainer:MoveItemToContainer(slot, destContainer:Index(), 1, q)
  10.         end
  11.                 n = 0
  12.         repeat
  13.                 n = n + 1
  14.                 move()
  15.         until Self.ItemCount("mana potion", "Jewelled Backpack") == 0 or n > 20
  16.  
  17. end