View Full Version : moving potions to supply bp
ohagan
02-29-2016, 08:19 AM
so i am having trouble this script i got keeps glitching out when buying manas/healths and wont bring them to supply bp this is the code could any1 care to either fix it or write me one that will work greatly appreciated
local items = {268, 266, 236, 239, 238, 237, 7643,}
-- mana/health id
local MainBP = MainBP
local PotionsBP = SuppBP
Module.New("Sort Supplies", function()
local bp1 = Container(MainBP)
for spot, item in bp1:iItems() do
if (table.contains(items, item.id)) then
bp1:MoveItemToContainer(spot, Container.New(PotionsBP))
break
end
end
end)
Elvang
02-29-2016, 08:33 AM
local MainBP = MainBP
local PotionsBP = SuppBP
local MainBP = 'Blue Backpack'
local PotionsBP = 'Red Backpack'
You didn't change the backpack names?
ohagan
02-29-2016, 08:39 AM
local MainBP = MainBP
local PotionsBP = SuppBP
local MainBP = 'Blue Backpack'
local PotionsBP = 'Red Backpack'
You didn't change the backpack names?
no no its in the section your not supposed to change its supposed to when buying mana potions/healths move them to my supply bp
ohagan
02-29-2016, 07:11 PM
bump can any1 help me?!
dean015
02-29-2016, 07:18 PM
bump can any1 help me?!
local SuppliesBP = "Jewelled backpack"
Module.New('Shove-pots', function(mod)
local DROP_ITEMS = {"mana potion", "great health potion", "ultimate health potion"}
for i = 0, #Container.GetAll() do -- let's find bps
search = Container.New(i)
cont = Container.New(SuppliesBP)
for spot = 0, cont:ItemCount() do
local item = search:GetItemData(spot)
if cont:isOpen() and search:Name() ~= cont:Name() then
if table.find(DROP_ITEMS, Item.GetName(item.id)) and not cont:isFull() then
search:MoveItemToContainer(spot, cont:Index(), 0, 100) -- just shove to selected bp
end
end
end
end
end)
not mine but it works
ohagan
02-29-2016, 07:25 PM
dean015 that you so much this just made my script that i paid for from not full afk cause hes a noob to full afk your the best
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.