
Untitled
By: a guest on
Jun 21st, 2012 | syntax:
Lua | size: 0.71 KB | hits: 15 | expires: Never
function moveManas()
function move()
q = Self.ItemCount("mana potion","Jewelled Backpack")
if q>100 then
q = 100
mainContainer = Container.GetByName("Jewelled Backpack")
destContainer = Container.GetByName("Moon Backpack")
local slot = findSlot(Item.GetID("mana potion"),mainContainer)
mainContainer:MoveItemToContainer(slot, destContainer:Index(), 1, q)
end
n = 0
repeat
n = n + 1
move()
until Self.ItemCount("mana potion", "Jewelled Backpack") == 0 or n > 20
end