desche188
08-18-2012, 06:07 PM
02:02 XenoScript Error:
Script: ?necro.lua
Line #: 83
Chunk: C:\Program Files?XenoBot?Data?XenoLuaLib.lua
Error: attempt to call method 'format' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
line 83 is in my settings
do i have to do
local mana = 222
or just
mana = 222
?
just opened new tibia and it changed where the problem is here is my full script
--- settings
SpearMax = 20 --- amount to refill
SpearPrice = 15 --- spear price
MinSpear = 10 --- minspear
SpearID = 7378 --- spear id
MPotID = 266 --- mana potion ID
MinMPots = 15 ---- if less then script will exit spawn
MPots = 50 ----- amount to refill
MPotPrice = 50 ---- price of 1 single mana pot
MinCap = 50 --- Cap
Wait Time = 10000, 120000 --- time to wait between going up and down tower in mili secs 1 sec = 1000
GoldBP = Backpack
LootBP = brocade
--- instructions for dpbp setup
--- In this section change to what bp you want the item to go in
--- DpBp1 = 0 is first slot in your Depot
--- DpBp2 = 1 is secont slot in your depot
--- there for 2=3, 3=4, 4=5
--- you can also change them all to be in just one bp
--- i recomend having less rare items in one bp and rares in another
DpBp1 = 1 --- Mystic Turban
DpBp2 = 0 --- Boots Of Haste
DpBp3 = 1 --- Skull Staff
DpBp4 = 1 --- Spellbook Of Warding
DpBp5 = 1 --- Noble Axe
-------------------------------------------------------------------------
---[2854] backpack ------------------------------------------------------
----[9604] moon backpack-------------------------------------------------
-----[2865] green backpack ----------------------------------------------
------[2866] yellow backpack --------------------------------------------
-------[2867] red backpack ----------------------------------------------
--------[2868] purple backpack ------------------------------------------
---------[2869] blue backpack -------------------------------------------
----------[2870] grey backpack ------------------------------------------
-----------[2871] golden backpack ---------------------------------------
------------[9602] orange backpack --------------------------------------
-------------[9605] crown backpack --------------------------------------
--------------[10202] heart backpack ------------------------------------
---------------[10324] expedition backpack ------------------------------
----------------[10326] dragon backpack ---------------------------------
-----------------[10327] minotaur backpack ------------------------------
------------------[10346] santa backpack --------------------------------
-------------------[14248] deepling backpack ----------------------------
--------------------[14249] buggy backpack ------------------------------
---------------------[14674] anniversary backpack -----------------------
----------------------[16099] mushroom backpack -------------------------
-----------------------[16100] crystal backpack -------------------------
------------------------[9601] demon backpack ---------------------------
-------------------------[8860] brocade backpack ------------------------
--------------------------[7342] fur backpack ---------------------------
---------------------------[5949] beach backpack ------------------------
----------------------------[5801] jewelled backpack --------------------
-----------------------------[5926] pirate backpack ---------------------
------------------------------[3244] old and used backpack --------------
-------------------------------[3253] backpack of holding ---------------
--------------------------------[2872] camouflage backpack --------------
-------------------------------------------------------------------------
Backpack = 2854
Moon = 9604
Green = 2865
Yellow = 2866
Red = 2867
Purple = 2868
Blue = 2869
Grey = 2870
Golden = 2871
Orange = 9602
Crown = 9605
Heart = 10202
Expedition = 10324
Dragon = 10326
Minotaur = 10327
Santa = 10346
Deepling = 14248
Buggy = 14249
Anniversary = 14674
Mushroom = 16099
Demon = 9601
Brocade = 8860
Fur = 7342
Beach = 5949
Jewelled = 5801
Pirate = 5926
Old = 3244
BPOH = 3253
Camouflage = 2872
-----------------------------------------------------------------------------------
------------------------------- End Of Settings------------------------------------
-----------------------------------------------------------------------------------
dofile("Forgee.lua")
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "checker") then
if (Self.Cap() < MinCap) or (Self.ItemCount(MPotID) < MinMPots) or (Self.ItemCount(SpearID) < MinSpear) then
gotoLabel("leave")
setWalkerEnabled(true)
else
gotoLabel("Keep Hunting")
setWalkerEnabled(true)
elseif (labelName == "ManaBuy") then
setWalkerEnabled(false)
Self.SayToNpc("hi")
wait(900, 1200)
Self.SayToNpc("trade")
wait(900, 1200)
Self.ShopSellAllItems(285)
wait(900, 1200)
Self.BuyItemsUpTo(MPotID, MPots)
wait(900, 1200)
setWalkerEnabled(true)
elseif (labelName == "SpearBuy") then
setWalkerEnabled(false)
Self.SayToNpc("hi", "trade")
wait(900, 1200)
Self.BuyItemsUpTo(SpearID, SpearMax)
wait(900, 1200)
setWalkerEnabled(true)
elseif (labelName == "reachdpot") then
Self.ReachDepot()
elseif (labelName == "depositing") then
setWalkerEnabled(false)
Self.DepositItems(
{3574, DpBp1}, ---Mystic Turban
{3079, DpBp2}, ---Boots Of Hatse
{3324, DpBp3}, ---Skull Staff
{8073, DpBp4}, ---Spellbook Of Warding
{7456, DpBp5}) ---Noble Axe
wait(1500,1900)
setWalkerEnabled(true)
elseif (labelName == "depositGold") then
local withdrawManas = (MPots-Self.ItemCount(MPotID))*MPotPrice
local withdrawSpears = (Spears-Self.ItemCount(SpearID))*SpearPrice
local amount = (withdrawManas + withdrawSpears)
delayWalker(9000)
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
if (amount > 0) then
Self.SayToNpc({"withdraw " .. amount, "yes", "balance"}, 65)
elseif (labelName == "wait") then
delayWalker('Wait Time')
elseif (labelName == "leave") then
print({"Current Mana Potions: " .. Self.ItemCount(MPotsID)}, --- will tell you amount of Mana Potions
{"Current Spear Amount: " .. Self.ItemCount(SpearID)}, --- will tell you amount of Spears
{"Current Gold Coin count: " .. Self.ItemCount(3031)}, --- will tell you amount of Gold Coins
{"Current Mystic Turban count: " .. Self.ItemCount(3574)}, --- will tell you amount of Mystic Turban
{"Current Boots Of Haste count: " .. Self.ItemCount(3079)}, --- will tell you amount of Boots Of Haste
{"Current Skull Staff count: " .. Self.ItemCount(3324)}, --- will tell you amount of Skull Staff
{"Current Spellbook Of Warding count: " .. Self.ItemCount(8073)}, --- will tell you amount of Spellbook Of Warding
{"Current Noble Axe count: " .. Self.ItemCount(7456)}) --- will tell you amount of Noble Axe
wait(5000)
print({"Current Mana Potions: " .. Self.ItemCount(MPotsID)}, --- will tell you amount of Mana Potions
{"Current Spear Amount: " .. Self.ItemCount(SpearID)}, --- will tell you amount of Spears
{"Current Gold Coin count: " .. Self.ItemCount(3031)}, --- will tell you amount of Gold Coins
{"Current Mystic Turban count: " .. Self.ItemCount(3574)}, --- will tell you amount of Mystic Turban
{"Current Boots Of Haste count: " .. Self.ItemCount(3079)}, --- will tell you amount of Boots Of Haste
{"Current Skull Staff count: " .. Self.ItemCount(3324)}, --- will tell you amount of Skull Staff
{"Current Spellbook Of Warding count: " .. Self.ItemCount(8073)}, --- will tell you amount of Spellbook Of Warding
{"Current Noble Axe count: " .. Self.ItemCount(7456)})
elseif (labelName == "bpOpen") then
setWalkerEnabled(false)
closeBackpacks()
wait(500)
openBackpacks({GoldBP, 0}, {LootBP, 0})
setWalkerEnabled(true)
wait(2000)
end
end
end
end
Script: ?necro.lua
Line #: 83
Chunk: C:\Program Files?XenoBot?Data?XenoLuaLib.lua
Error: attempt to call method 'format' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
line 83 is in my settings
do i have to do
local mana = 222
or just
mana = 222
?
just opened new tibia and it changed where the problem is here is my full script
--- settings
SpearMax = 20 --- amount to refill
SpearPrice = 15 --- spear price
MinSpear = 10 --- minspear
SpearID = 7378 --- spear id
MPotID = 266 --- mana potion ID
MinMPots = 15 ---- if less then script will exit spawn
MPots = 50 ----- amount to refill
MPotPrice = 50 ---- price of 1 single mana pot
MinCap = 50 --- Cap
Wait Time = 10000, 120000 --- time to wait between going up and down tower in mili secs 1 sec = 1000
GoldBP = Backpack
LootBP = brocade
--- instructions for dpbp setup
--- In this section change to what bp you want the item to go in
--- DpBp1 = 0 is first slot in your Depot
--- DpBp2 = 1 is secont slot in your depot
--- there for 2=3, 3=4, 4=5
--- you can also change them all to be in just one bp
--- i recomend having less rare items in one bp and rares in another
DpBp1 = 1 --- Mystic Turban
DpBp2 = 0 --- Boots Of Haste
DpBp3 = 1 --- Skull Staff
DpBp4 = 1 --- Spellbook Of Warding
DpBp5 = 1 --- Noble Axe
-------------------------------------------------------------------------
---[2854] backpack ------------------------------------------------------
----[9604] moon backpack-------------------------------------------------
-----[2865] green backpack ----------------------------------------------
------[2866] yellow backpack --------------------------------------------
-------[2867] red backpack ----------------------------------------------
--------[2868] purple backpack ------------------------------------------
---------[2869] blue backpack -------------------------------------------
----------[2870] grey backpack ------------------------------------------
-----------[2871] golden backpack ---------------------------------------
------------[9602] orange backpack --------------------------------------
-------------[9605] crown backpack --------------------------------------
--------------[10202] heart backpack ------------------------------------
---------------[10324] expedition backpack ------------------------------
----------------[10326] dragon backpack ---------------------------------
-----------------[10327] minotaur backpack ------------------------------
------------------[10346] santa backpack --------------------------------
-------------------[14248] deepling backpack ----------------------------
--------------------[14249] buggy backpack ------------------------------
---------------------[14674] anniversary backpack -----------------------
----------------------[16099] mushroom backpack -------------------------
-----------------------[16100] crystal backpack -------------------------
------------------------[9601] demon backpack ---------------------------
-------------------------[8860] brocade backpack ------------------------
--------------------------[7342] fur backpack ---------------------------
---------------------------[5949] beach backpack ------------------------
----------------------------[5801] jewelled backpack --------------------
-----------------------------[5926] pirate backpack ---------------------
------------------------------[3244] old and used backpack --------------
-------------------------------[3253] backpack of holding ---------------
--------------------------------[2872] camouflage backpack --------------
-------------------------------------------------------------------------
Backpack = 2854
Moon = 9604
Green = 2865
Yellow = 2866
Red = 2867
Purple = 2868
Blue = 2869
Grey = 2870
Golden = 2871
Orange = 9602
Crown = 9605
Heart = 10202
Expedition = 10324
Dragon = 10326
Minotaur = 10327
Santa = 10346
Deepling = 14248
Buggy = 14249
Anniversary = 14674
Mushroom = 16099
Demon = 9601
Brocade = 8860
Fur = 7342
Beach = 5949
Jewelled = 5801
Pirate = 5926
Old = 3244
BPOH = 3253
Camouflage = 2872
-----------------------------------------------------------------------------------
------------------------------- End Of Settings------------------------------------
-----------------------------------------------------------------------------------
dofile("Forgee.lua")
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "checker") then
if (Self.Cap() < MinCap) or (Self.ItemCount(MPotID) < MinMPots) or (Self.ItemCount(SpearID) < MinSpear) then
gotoLabel("leave")
setWalkerEnabled(true)
else
gotoLabel("Keep Hunting")
setWalkerEnabled(true)
elseif (labelName == "ManaBuy") then
setWalkerEnabled(false)
Self.SayToNpc("hi")
wait(900, 1200)
Self.SayToNpc("trade")
wait(900, 1200)
Self.ShopSellAllItems(285)
wait(900, 1200)
Self.BuyItemsUpTo(MPotID, MPots)
wait(900, 1200)
setWalkerEnabled(true)
elseif (labelName == "SpearBuy") then
setWalkerEnabled(false)
Self.SayToNpc("hi", "trade")
wait(900, 1200)
Self.BuyItemsUpTo(SpearID, SpearMax)
wait(900, 1200)
setWalkerEnabled(true)
elseif (labelName == "reachdpot") then
Self.ReachDepot()
elseif (labelName == "depositing") then
setWalkerEnabled(false)
Self.DepositItems(
{3574, DpBp1}, ---Mystic Turban
{3079, DpBp2}, ---Boots Of Hatse
{3324, DpBp3}, ---Skull Staff
{8073, DpBp4}, ---Spellbook Of Warding
{7456, DpBp5}) ---Noble Axe
wait(1500,1900)
setWalkerEnabled(true)
elseif (labelName == "depositGold") then
local withdrawManas = (MPots-Self.ItemCount(MPotID))*MPotPrice
local withdrawSpears = (Spears-Self.ItemCount(SpearID))*SpearPrice
local amount = (withdrawManas + withdrawSpears)
delayWalker(9000)
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
if (amount > 0) then
Self.SayToNpc({"withdraw " .. amount, "yes", "balance"}, 65)
elseif (labelName == "wait") then
delayWalker('Wait Time')
elseif (labelName == "leave") then
print({"Current Mana Potions: " .. Self.ItemCount(MPotsID)}, --- will tell you amount of Mana Potions
{"Current Spear Amount: " .. Self.ItemCount(SpearID)}, --- will tell you amount of Spears
{"Current Gold Coin count: " .. Self.ItemCount(3031)}, --- will tell you amount of Gold Coins
{"Current Mystic Turban count: " .. Self.ItemCount(3574)}, --- will tell you amount of Mystic Turban
{"Current Boots Of Haste count: " .. Self.ItemCount(3079)}, --- will tell you amount of Boots Of Haste
{"Current Skull Staff count: " .. Self.ItemCount(3324)}, --- will tell you amount of Skull Staff
{"Current Spellbook Of Warding count: " .. Self.ItemCount(8073)}, --- will tell you amount of Spellbook Of Warding
{"Current Noble Axe count: " .. Self.ItemCount(7456)}) --- will tell you amount of Noble Axe
wait(5000)
print({"Current Mana Potions: " .. Self.ItemCount(MPotsID)}, --- will tell you amount of Mana Potions
{"Current Spear Amount: " .. Self.ItemCount(SpearID)}, --- will tell you amount of Spears
{"Current Gold Coin count: " .. Self.ItemCount(3031)}, --- will tell you amount of Gold Coins
{"Current Mystic Turban count: " .. Self.ItemCount(3574)}, --- will tell you amount of Mystic Turban
{"Current Boots Of Haste count: " .. Self.ItemCount(3079)}, --- will tell you amount of Boots Of Haste
{"Current Skull Staff count: " .. Self.ItemCount(3324)}, --- will tell you amount of Skull Staff
{"Current Spellbook Of Warding count: " .. Self.ItemCount(8073)}, --- will tell you amount of Spellbook Of Warding
{"Current Noble Axe count: " .. Self.ItemCount(7456)})
elseif (labelName == "bpOpen") then
setWalkerEnabled(false)
closeBackpacks()
wait(500)
openBackpacks({GoldBP, 0}, {LootBP, 0})
setWalkerEnabled(true)
wait(2000)
end
end
end
end