Skaaven
01-20-2017, 01:37 AM
Hello guys i have an question to ppls which know lua better than me.
There is a script which are working, but when my character sold the loot then my bot is stuck. Cavebot is off.
Could someone edit this script to be correct ?
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Sell") then
setBotEnabled(false)
Self.Say("hi")
sleep(math.random(1500, 2000))
Self.SayToNpc("trade")
sleep(math.random(2000, 2700))
SELL_ITEMS = {"glooth axe", "glooth blade", "rubber cap", "glooth club", "heat core", "glooth cape", "glooth amulet"}
for _, ITEM_NAME in ipairs(SELL_ITEMS) do
if (Self.ShopGetItemSaleCount(ITEM_NAME) > 0) then
Self.ShopSellAllItems(ITEM_NAME)
wait(300, 500)
end
end
end
end
There is a script which are working, but when my character sold the loot then my bot is stuck. Cavebot is off.
Could someone edit this script to be correct ?
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Sell") then
setBotEnabled(false)
Self.Say("hi")
sleep(math.random(1500, 2000))
Self.SayToNpc("trade")
sleep(math.random(2000, 2700))
SELL_ITEMS = {"glooth axe", "glooth blade", "rubber cap", "glooth club", "heat core", "glooth cape", "glooth amulet"}
for _, ITEM_NAME in ipairs(SELL_ITEMS) do
if (Self.ShopGetItemSaleCount(ITEM_NAME) > 0) then
Self.ShopSellAllItems(ITEM_NAME)
wait(300, 500)
end
end
end
end