So my error is 02:12:03 (Action: depositWithdrawCash) Couldn't find item named ' '. Future warnings for this script will be shown in the Debug Script Log.
Whats wrong with the script....
Here Is Cave Bot Settings Screen:
Here is Persistant Settings :PHP Code:
{
"type":"group",
"name":"Supplies Settings",
"column":1,
"children":[
{
"type":"combobox",
"name":"nameManaPot",
"description":"Name of mana potion to use.",
"text":"Name of mana potion to use:",
"items":[
"Strong Mana Potion",
"Mana Potion",
"Great Mana Potion"
]
},
{
"type":"spinbox",
"name":"maxManaPot",
"description":"Maximum amount of mana potions to carry.",
"text":"Maximum amount of mana potions to carry:",
"suffix" : " potions",
"max":10000,
"value":300
},
{
"type":"spinbox",
"name":"minManaPot",
"description":"Minimum amount of mana potions to carry.",
"text":"Minimum amount of mana potions to carry:",
"suffix" : " potions",
"max":10000,
"min":-1,
"value":80
},
{
"type":"separator"
},
{
"type":"combobox",
"name":"nameHealthPot",
"description":"Name of health potion to use.",
"text":"Name of health potion to use:",
"items":[
"Great Spirit Potion",
"Health Potion",
"Strong Health Potion",
"Great Health Potion",
"Ultimate Health Potion"
]
},
{
"type":"spinbox",
"name":"maxHealthPot",
"description":"Maximum amount of health potions to carry.",
"text":"Maximum amount of health potions to carry:",
"suffix" : " potions",
"max":10000,
"value":0
},
{
"type":"spinbox",
"name":"minHealthPot",
"description":"Minimum amount of health potions to carry.",
"text":"Minimum amount of health potions to carry:",
"suffix" : " potions",
"max":10000,
"min":-1,
"value":-1
},
{
"type":"group",
"name":"Bank Settings",
"column":1,
"children":[
{
"type":"spinbox",
"name":"priceManaPot",
"description":"Price of single mana potion.",
"text":"Price of single mana potion:",
"suffix" : " gps",
"max":10000,
"min":-1,
"value":50
},
{
"type":"spinbox",
"name":"priceHealthPot",
"description":"Price of single health potion.",
"text":"Price of single health potion:",
"suffix" : " gps",
"max":10000,
"min":-1,
"value":45
},
{
"type":"spinbox",
"name":"extraCash",
"description":"Extra amount to withdraw (for trips, etc).",
"text":"Extra amount to withdraw (for trips, etc):",
"suffix" : " gps",
"max":999999999,
"min":-1,
"value":2000
}
]
}
]
}
and here is Action Script in Cave Bot Waypoints:PHP Code:
--Supplies Settings Variables: nameManaPot = getuseroption("nameManaPot")
maxManaPot = getuseroption("maxManaPot")
minManaPot = getuseroption("minManaPot")
nameHealthPot = getuseroption("nameHealthPot")
maxHealthPot = getuseroption("maxHealthPot")
minHealthPot = getuseroption("minHealthPot")
nameAmmo = getuseroption("nameAmmo")
maxAmmo = getuseroption("maxAmmo")
minAmmo = getuseroption("minAmmo")
minCapacity = getuseroption("minCapacity")
whats the verdict??? and how do i fix it???PHP Code:
local totalMPotToCalc = (maxManaPot) local nameMPotToCalc = (nameManaPot)
local priceMPotToCalc = (priceManaPot)
local totalHPotToCalc = (maxHealthPot)
local nameHPotToCalc = (nameHealthPot)
local priceHPotToCalc = (priceHealthPot)
local totalAmmoToCalc = (maxAmmo)
local nameAmmoToCalc = (nameAmmo)
local priceAmmoToCalc = (priceAmmo)
local nameItemToCalc = ("worn soft boots")
local priceItemToCalc = 10000
local countItemToCalc = itemcount(nameItemToCalc, 'all')
local countMPotToCalc = itemcount(nameMPotToCalc, 'all')
local countHPotToCalc = itemcount(nameHPotToCalc, 'all')
local countAmmoToCalc = itemcount(nameAmmoToCalc, 'all')
[FONT=Courier New]
[/FONT]
local totalToWithdraw = positive((totalMPotToCalc-countMPotToCalc)*priceMPotToCalc) + positive((totalHPotToCalc-countHPotToCalc)*priceHPotToCalc) + positive((totalAmmoToCalc-countAmmoToCalc)*priceAmmoToCalc) + positive(countItemToCalc*priceItemToCalc) + (extraCash)
[FONT=Courier New]
[/FONT]
if (getcreature("Finarfin").dist <= 3)
then
say("hi")
wait(1500,2500)
npcsay("deposit all")
wait(1200,1300)
npcsay("yes")
wait(1200,1300)
[FONT=Courier New]
[/FONT]
if (totalToWithdraw > 0)
then
npcsay("withdraw "..totalToWithdraw)
wait(1200,1300)
npcsay("yes")
wait(1200,1300)
end
[FONT=Courier New]
[/FONT]
npcsay("balance")
wait(1200,1300)
end
[FONT=Courier New]
[/FONT]
if (((itemcount("gold coin", 'all')) + (itemcount("platinum coin", 'all')*100) + (itemcount("crystal coin", 'all')*10000)) < totalToWithdraw)
then
gotolabel("go_bank")
end