Było parę razy w tym temacie, wystarczy przejrzeć.
-- [[ SETTINGS START ]]
local MinMana = 5 -- Amount to buy new potions
local MaxMana = 10 -- Amount to buy up to
local MinCash = 1100 -- Stops is below x gps
local ManaName = "mana potion" -- Name of your mana potion
-- [[ SETTINGS END ]]
function Self.ManaPercent()
local x = math.ceil(math.abs(Self.Mana() / (Self.MaxMana() * 0.01)))
return x
end
function BuyItems(item, count)
wait(900, 1200)
if (Self.ItemCount(item) < count) then
Self.ShopBuyItem(item, (count-Self.ItemCount(item)))
wait(200, 500)
end
end
Module.New('ManaTrain', function(module)
if (Self.ItemCount(Item.GetID(ManaName)) <= MinMana) and (Self.Money() >= MinCash) then
Self.SayToNpc({"hi", "trade"}, 65)
BuyItems(Item.GetID(ManaName), MaxMana)
wait(500)
Self.SayToNpc("bye")
end
module:Delay(1500)
end)
Możesz rozbudować ten skrypt dodając kolejne parametry po | o ile nie ma żadnych warunków i znasz ID.
Użyj tego, bo w tym wyżej po każdym dodanym plecaku musiałbyś edytować linijkę z: Self.OpenMainBackpack(true):OpenChildren({LootBP, true}):OpenChildren({GoldBP, true})
Tutaj wystarczy wpisać liczbę ile plecaków masz otwartych + ich nazwy.
AmountRecntBps = 4
ReconnectBps = {{'Purple Backpack',true} ,{'Buggy Backpack',true}, {'Beach Backpack',true}, {'Demon Backpack',true}}
Module.New('reconnect', function()
if #Container.GetAll() < AmountRecntBps and not Self.isInPz() then
Cavebot.Stop()
Self.CloseContainers()
Self.OpenMainBackpack(true):OpenChildren(unpack(ReconnectBps))
Cavebot.Start()
end
end)