painless2
07-28-2012, 02:35 AM
hello i tried make script but when i wanna executa he gimme errormessage:
XenoScript Error:
Script: Dara Rots Refiller.Lua
Line #: 453
Chunk: J:?Programme?XenoBot?Data?XenoLuaLib.lua
Error: attempt to index global 'Container' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
and please if someone can fix it please add to make spears in hand after buying them that whould be rlly nice :S
heres the script:
--[[
MinCap = 10 --
SpearsToLeave = 1 --
SpearID = 3277 --
WantedSpears = 12 --
---------------------------------------------------------------------
-----------------------------------------------------------------------
---------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
dofile("Forgee.lua")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
delayWalker(1000)
setWalkerEnabled(false)
if (Self.Cap() < 10) or ((Self.ItemCount(3277) < 1)) then
gotoLabel("Gobank")
setWalkerEnabled(true)
else
gotoLabel("Start")
setWalkerEnabled(true)
end
elseif (labelName == "Bank") then
setWalkerEnabled(false)
delayWalker(5000) --a
Self.Say("hi")
sleep(math.random(700, 1400)) --b
Self.SayToNpc("deposit all")
sleep(math.random(400, 1000))
Self.SayToNpc("yes")
wait(15000,19000)
setWalkerEnabled(true)
elseif (labelName == "Loot") then
Self.DepositItems({10275,1},{9692,1})
elseif (labelName == "BuySpears") then
setWalkerEnabled(false)
delayWalker(7000) --h
Self.Say("hi")
sleep(math.random(800, 1700)) --i
Self.SayToNpc("trade")
sleep(math.random(2000, 2400)) --j
buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(3277, (12-Self.ItemCount(3277)))
setWalkerEnabled(true)
elseif (labelName == "backpacks") then
setWalkerEnabled(false)
resetBackpacks()
wait(1500,1900)
setWalkerEnabled(true)
end
end
function buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopBuyItem(item, amnt) == 0)then
return printf("ERROR: failed to buy item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count <= 0
end
]]--
XenoScript Error:
Script: Dara Rots Refiller.Lua
Line #: 453
Chunk: J:?Programme?XenoBot?Data?XenoLuaLib.lua
Error: attempt to index global 'Container' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
and please if someone can fix it please add to make spears in hand after buying them that whould be rlly nice :S
heres the script:
--[[
MinCap = 10 --
SpearsToLeave = 1 --
SpearID = 3277 --
WantedSpears = 12 --
---------------------------------------------------------------------
-----------------------------------------------------------------------
---------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
dofile("Forgee.lua")
function onWalkerSelectLabel(labelName)
if (labelName == "Check") then
delayWalker(1000)
setWalkerEnabled(false)
if (Self.Cap() < 10) or ((Self.ItemCount(3277) < 1)) then
gotoLabel("Gobank")
setWalkerEnabled(true)
else
gotoLabel("Start")
setWalkerEnabled(true)
end
elseif (labelName == "Bank") then
setWalkerEnabled(false)
delayWalker(5000) --a
Self.Say("hi")
sleep(math.random(700, 1400)) --b
Self.SayToNpc("deposit all")
sleep(math.random(400, 1000))
Self.SayToNpc("yes")
wait(15000,19000)
setWalkerEnabled(true)
elseif (labelName == "Loot") then
Self.DepositItems({10275,1},{9692,1})
elseif (labelName == "BuySpears") then
setWalkerEnabled(false)
delayWalker(7000) --h
Self.Say("hi")
sleep(math.random(800, 1700)) --i
Self.SayToNpc("trade")
sleep(math.random(2000, 2400)) --j
buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(3277, (12-Self.ItemCount(3277)))
setWalkerEnabled(true)
elseif (labelName == "backpacks") then
setWalkerEnabled(false)
resetBackpacks()
wait(1500,1900)
setWalkerEnabled(true)
end
end
function buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopBuyItem(item, amnt) == 0)then
return printf("ERROR: failed to buy item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count <= 0
end
]]--