appears this on console
23:03:48 error in Cavebot script Refiller:
["or ($cap <= '150')"]:Globals:115 attempt to compare number with string
stack traceback:
["if table.find({"Hunt"}, $wptsection) and needrefill() and no..."]:Refiller:2 in user script
my action refiller is:
auto(1000)
if table.find({"Hunt"}, $wptsection) and needrefill() and not $trapped then
palarm("no")
onlyiftrapped("yes")
gotolabel(0, "Refiller")
end
my global action is:
init start
SCRIPT_NAME = "Krailos Brimstone Bugs"
SCRIPT_VOCATION = "EK"
SCRIPT_VERSION = "1.0.0"
SCRIPT_AUTHOR = "Diaxy"
SAFELIST = {"Diaxy"}
MONSTERS = {"Giant Spider", "Brimstone Bug", "Wailing Widow"}
table.lower(MONSTERS)
table.lower(SAFELIST)
init end
mainbp = getuseroption('MainBP')
suppbp = getuseroption('SupplyBP')
lootbp = getuseroption('LootBP')
goldbp = getuseroption('GoldBP')
extrabp = getuseroption('ExtraBP')
maindpbp = getuseroption('MainDPBP')
stackdpbp = getuseroption('StackDPBP')
lootdpbp = getuseroption('LootDPBP')
opengoldbp = getuseroption('LootGP')
openextrabp = getuseroption('UseExtraBP')
function palarm(yesno)
if getuseroption('PlayerAlarm') then
setsetting("Alerts/PlayerOnScreen/PlaySound", yesno)
else
setsetting("Alerts/PlayerOnScreen/PlaySound", no)
end
end
function sayhi()
if ischannel('NPCs') then
npcsay('hi')
waitping()
else
say('hi')
wait(2200, 2500)
end
end
function onlyiftrapped(yesno)
for k, v in ipairs(MONSTERS) do
for i=1, 2 do
setsetting('Targeting/Creatures/'..v..'/Setting'..i..'/OnlyIfTrapped', yesno)
end
end
end
function retroserv()
local worlds = {'dolera', 'chrona', 'inferna', 'morta', 'mortera', 'calva', 'calvera', 'eldera'}
table.lower(worlds)
if table.find(worlds, $worldname:lower()) then
return true
end
return false
end
function _travel(npc, city)
if (getcreature(npc).dist > 3) then
reachcreature(npc,1)
end
sayhi()
if npc == "Scrutinon" then
npcsay("passage")
waitping(3,4)
npcsay(city)
waitping(3,4)
else
npcsay(city)
waitping(3,4)
npcsay("yes")
waitping(3,4)
end
end
function opendepobps()
setsetting("Alerts/PlayerOnScreen/PlaySound", "no")
while windowcount(lootbp) ~= 1 do
closewindows()
wait(700,1200)
openitem(0, "back", false)
wait(700,1200)
resizewindows()
openitem(lootbp,0, false)
wait(700,1200)
end
while itemcount(lootbp, lootbp) > 0 do
openitem(lootbp, lootbp, false)
wait(400,550)
end
end
function needrefill()
local random = math.random(-10, 20)
local HealthName = getuseroption('HealthName')
local MinHealth = tonumber(getuseroption('MinHealth'))
local ManaName = getuseroption('ManaName')
local MinMana = tonumber(getuseroption('MinMana'))
local AmmoName = getuseroption('AmmoName')
local MinAmmo = tonumber(getuseroption('MinAmmo'))
local RuneName = getuseroption('SDName')
local MinRunes = tonumber(getuseroption('MinSDRunes'))
return (itemcount(ManaName) <= MinMana + random)
or $vocation == 'knight' and (itemcount(HealthName) <= MinHealth + random)
or $vocation == 'paladin' and (itemcount(HealthName) <= MinHealth + random)
or $vocation == 'paladin' and (itemcount(AmmoName) <= MinAmmo + random)
or getuseroption('BuySDS') and $vocation == 'druid' and (itemcount(RuneName) <= MinRunes + random)
or getuseroption('BuySDS') and $vocation == 'sorcerer' and (itemcount(RuneName) <= MinRunes + random)
or ($cap <= '150')
end
function _healing(yesno)
setsetting("SpellHealer/Enabled", yesno)
setsetting("PotionHealer/Enabled", yesno)
end
function _looting(yesno)
setsetting('Looting/Enabled', yesno)
end
function openhuntbps1()
while windowcount(mainbp) == 0 or windowcount(lootbp) == 0 do
closewindows()
waitping()
openitem(0, "back", true)
waitping()
resizewindows()
waitping()
openitem(lootbp,0,true)
waitping()
resizewindows()
waitping()
end
while opengoldbp and windowcount(goldbp) == 0 and itemcount(goldbp) > 0 do
openitem(goldbp,0,true)
waitping()
resizewindows()
waitping()
end
while openextrabp and windowcount(extrabp) == 0 and itemcount(extrabp) > 0 do
openitem(extrabp,0,true)
waitping()
resizewindows()
end
setsetting('Looting/OpenNextBP', 'yes')
end
function openhuntbps2()
while windowcount(mainbp) == 0 or windowcount(suppbp) == 0 do
closewindows()
waitping()
openitem(0, "back", true)
waitping()
resizewindows()
waitping()
openitem(suppbp,0,true)
waitping()
resizewindows()
waitping()
end
while windowcount(lootbp) == 0 and itemcount(lootbp) > 0 do
openitem(lootbp,0,true)
waitping()
resizewindows()
waitping()
end
while opengoldbp and windowcount(goldbp) == 0 and itemcount(goldbp) > 0 do
openitem(goldbp,0,true)
waitping()
resizewindows()
waitping()
end
while openextrabp and windowcount(extrabp) == 0 and itemcount(extrabp) > 0 do
openitem(extrabp,0,true)
waitping()
resizewindows()
end
setsetting('Looting/OpenNextBP', 'yes')
end
function opencitybps1()
setsetting("Looting/OpenNextBP", "no")
while windowcount(mainbp) ~= 1 do
closewindows()
waitping()
openitem(0, "back", true)
waitping()
resizewindows()
waitping()
end
if openextrabp and windowcount(suppbp) ~= 1 then
openitem(suppbp, mainbp, true)
waitping()
resizewindows()
waitping()
end
end
function opencitybps2()
setsetting("Looting/OpenNextBP", "no")
while windowcount(suppbp) ~= 1 or windowcount(mainbp) ~= 1 and not useextra do
closewindows()
waitping()
openitem(0, "back", true)
waitping()
resizewindows()
waitping()
openitem(suppbp, mainbp, true)
waitping()
resizewindows()
end
while openextrabp and windowcount(extrabp) ~= 1 do
openitem(extrabp,0,true)
waitping()
resizewindows()
waitping(2,3)
end
end
this is the cavebot settings. the stamina check is 14hr but my stamina is 34hr
I got this script in 2015 i think, when diaxy released all scripts for free then i stop play tibia and back again in this month so i tried use this script and i got stuck in a loop: bank and logout i have deleted the part of stamina check on the global action and its work but the refill check is not working anymore. someone can help me with this?
ps: sorry for my bad english, i'm brazilian
pt: consegui esse script em 2015 acho, quando diaxy liberou todos os scripts de graça e alguns meses depois eu parei de jogar. Voltei agora em abril/2017 e tentei usar esse script no hexera so que ele nao saia da parte do banco, simplesmente retirava o dinheiro e deslogava então eu apaguei a parte que checa a stamina no global action e tava dando tudo certo so que na hunt a action de refill não funciona mais e aparece esse erro que coloquei no começo do post.