View Full Version : These damn refillers
mjmackan
08-18-2012, 01:52 AM
Well you probably got a clue what i am talking about, if you don't keep on reading..
Here is the error:
03:51 XenoScript Error:
Script: [Laguna] CapCheck.lua
Line #: 41
Chunk: ...pley\Documents\XenoBot\Scripts\[Laguna] CapCheck.lua
Error: attempt to call field 'BuyItemsUpTo' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
Here is the script:
elseif (labelName == "BuyPotions") then
setWalkerEnabled(false)
Self.SayToNpc("hi")
sleep(math.random(2000, 3000))
Self.SayToNpc("trade")
sleep(math.random(2400, 3000))
Self.BuyItemsUpTo(PotID, Pots)
sleep(math.random(3400, 4800))
Self.SayToNpc("bye")
setWalkerEnabled(true)
and..
--[[--
NAME: LAGUNA FOR KNIGHTS
AUTHOR: MJMACKAN
CREATE DATE: 18.08.2012
--]]--
--Settings---------------------------------------
PotCost = 45
Pots = 100
-------------------------------------------------
--END OF SETTINGS--------------------------------
Xeno Scripts
08-18-2012, 02:01 AM
elseif (labelName == "BuyPotions") then
setWalkerEnabled(false)
Self.SayToNpc("hi")
wait(2000,3000)
Self.SayToNpc("trade")
wait(2400, 3000)
Self.ShopBuyItem(PotID,(Pots-Self.ItemCount(PotID)))
wait(3400, 4800)
setWalkerEnabled(true)
Xeno Scripts
08-18-2012, 02:02 AM
Sorry, double post!
mjmackan
08-18-2012, 12:53 PM
Thanks just lovely, now it works fine.
Edit: Reputation doesn't exist?
Xeno Scripts
08-18-2012, 12:56 PM
Thanks just lovely, now it works fine.
Edit: Reputation doesn't exist?
Nop, there is no reputation :)
mjmackan
08-18-2012, 05:18 PM
Is there any;
'If playerAttack then
gotoLabel("Safezone")' ?
If so, whats the correct name of it?
Petit Ours
08-18-2012, 05:48 PM
Is there any;
'If playerAttack then
gotoLabel("Safezone")' ?
If so, whats the correct name of it?
This one is supposed to work :D
while (true) do
for index = CREATURES_LOW, CREATURES_HIGH do
local creature = Creature.GetFromIndex(index)
if (creature:isValid()) then
if (creature:isOnScreen() and creature:isVisible() and creature:isAlive()) then
if (creature:Skull() ~= 0) then
gotoLabel("RUN!!!")
break
end
end
end
end
end
zAEBBE
08-19-2012, 08:25 AM
Can some1 check my script aswell?
The error:
10:23 XenoScript Error:
Script: Rotworms_Check.lua
Line #:
Chunk:
Error:
This is an error with user-input and should not be reported as a bug with XenoBot.
The script:
dofile ("SyntaxLuaLib.lua")
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "check") then
delayWalker(10000)
if (count(268) < 10) then
gotoLabel("leave")
else
gotoLabel("check1")
end
elseif (labelName == "check1") then
delayWalker(10000)
if (Self.Cap() < 50) then
gotoLabel("leave")
else
gotoLabel("continue")
end
end
end
Second error:
10:23 XenoScript Error:
Script: Rotworms_Settings.lua
Line #:
Chunk:
Error:
This is an error with user-input and should not be reported as a bug with XenoBot.
The script:
dofile("SyntaxLuaLib.lua")
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "bank") then
delayWalker(10000)
Self.Say("hi")
sleep(math.random(1000, 2000))
Self.SayToNpc("deposit all")
sleep(math.random(1000, 2000))
Self.SayToNpc("yes")
sleep(math.random(1000, 2000))
elseif (labelName == "deposit") then
local itemlist = {
["Blue Backpack"] = { -- Backpack with loot item ( in your main bp )
depotSlot = 0, -- will deposit in first backpack of depot
items= {9692, 10275, 12600} -- Items with X ID will be deposited
}
}
depositItems(SOUTH, itemlist) -- this depot is south of the players pos
elseif (labelName == "withdraw") then
delayWalker(3000)
setWalkerEnabled(false)
local depot = Container.GetByName("Depot Chest")
for spot = 0, depot:ItemCount() do
local item = depot:GetItemData(spot)
if (item.id == 268) then
depot:MoveItemToContainer(spot, "Brown Backpack", 0)
setWalkerEnabled(true)
break
end
end
end
end
Infernal Bolt
08-19-2012, 09:31 AM
zAEBBE
You are using a really outdated script and it seems like you don't have SyntaxLuaLib.lua (which is not needed these days since syntax is the one handling the XenoLuaLib)
The withdraw script is not really used anymore due to the fact that you can buy manas from npc now.
This script should work though, combined both of them into one lua.
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "check") then
if (Self.ItemCount(268) < 10 or Self.Cap() < 50) then
gotoLabel("leave")
else
gotoLabel("continue")
end
elseif (labelName == "bank") then
setWalkerEnabled(false)
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
wait(2000)
setWalkerEnabled(true)
elseif (labelName == "deposit") then
Self.DepositItems(9692, 10275, 12600)
elseif (labelName == "withdraw") then
setWalkerEnabled(false)
local depot = Container.GetByName("Depot Chest")
for spot = 0, depot:ItemCount() do
local item = depot:GetItemData(spot)
if (item.id == 268) then
depot:MoveItemToContainer(spot, "Brown Backpack", 0)
setWalkerEnabled(true)
break
end
end
end
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.