View difference between Paste ID: AtMuiVTL and GT8SWCyt
SHOW: | | - or go back to the newest paste.
1
function moveManas()
2
        function move()
3-
		q = Self.ItemCount("mana potion","Jewelled Backpack")
3+
                q = Self.ItemCount("mana potion","Jewelled Backpack")
4-
					if q>100 then
4+
                                        if q>100 then
5-
					q = 100
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
11+
                n = 0
12
        repeat
13
                n = n + 1
14
                move()
15
        until Self.ItemCount("mana potion", "Jewelled Backpack") == 0 or n > 20
16-
16+
 
17
end