PDA

View Full Version : need help for change it



Paulinka123
12-14-2015, 05:48 PM
its posible to change this script for faster move potions ammo to bp? i need for my lua config . sorry for my english plx help




-- Move Supply to backpack
Module.New("ManaToBp", function(module)
if (Self.ItemCount(ManaID) >= 1) then
local MainBp = Container.GetFirst()
local DestinationBp = Container.GetByName(PotionBP)
for spot = 0, MainBp:ItemCount() do
local item = MainBp:GetItemData(spot)
if (item.id == ManaID)then
MainBp:MoveItemToContainer(spot, DestinationBp:Index(), 1)
module:Delay(500)
break
end
module:Delay(200)
end
end
end)

jollebollen
12-14-2015, 06:33 PM
hello, try using this, change name of item to move and color of bp ;)



--- Make sure your "manabp" is another color from your other backpacks.
---
ManaBp = "Grey Backpack"

ManaPotID = Item.GetID("strong mana potion")
SDID = Item.GetID("great health potion")

while true do

if (Self.ItemCount(ManaPotID) >= 1) or (Self.ItemCount(SDID) >=1) or (Self.ItemCount(SHPID) >=1) or (Self.ItemCount(GHPID) >=1) then
local MainBp = Container.GetFirst()
local DestinationBp = Container.GetByName(ManaBp)
for spot = 0, MainBp:ItemCount() do
local item = MainBp:GetItemData(spot)
if (item.id == ManaPotID) or (item.id == SDID) or (item.id == SHPID) or (item.id == GHPID) then
MainBp:MoveItemToContainer(spot, DestinationBp:Index(), 0)
wait(500)
break
end
end
end
wait(200)
end