lolek188
05-09-2015, 04:47 PM
18:45 XenoScript Error:
Script: Sea Serpent By Kumandos.lua
Line #: 67
Chunk: D:?Users?Lukas?DOCUME?1?XenoBot?Scripts??SEASER?1. LUA
Error: 'end' expected (to close 'function' at line 51) near 'elseif'
This is an error with user-input and should not be reported as a bug with XenoBot.
lua :
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
setTargetingEnabled(true)
setLooterEnabled(true)
function onWalkerSelectLabel(labelName)
if (labelName == "Start") then
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HPID) <= MinHP) then
gotoLabel("GoBank")
else
gotoLabel("GoHunt")
end
end
if (labelName == "CheckSupp") then
if (Self.Cap() <= MinCap) or (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HPID) <= MinHP) then
gotoLabel("LeaveHunt")
else
gotoLabel("Hunt")
end
end
elseif (labelName == "Bank") then
local cashmana = math.abs((MaxMana-Self.ItemCount(ManaID))*ManaPrice)
local cashhp = math.abs((MaxHP-Self.ItemCount(HPID ))*HPPrice)
local cashextra = 5000
local withdrawcash = cashmana + cashhp + cashextra
setWalkerEnabled(false)
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
if withdrawcash > 0 then
Self.SayToNpc({"withdraw " .. withdrawcash, "yes"}, 65)
end
if ((SoftBoots == true)) and ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) then
Self.WithdrawMoney((10000*(Self.ItemCount(6530)))+ 500)
wait(500)
end
Self.SayToNpc({"balance"}, 65)
setWalkerEnabled(true)
wait(2000)
elseif (labelName == "CheckSofts") then
delayWalker(1000)
setWalkerEnabled(false)
if ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) and ((SoftBoots == true)) then
gotoLabel("ToVenore")
setWalkerEnabled(true)
else
gotoLabel("GoPots")
setWalkerEnabled(true)
end
elseif (labelName == "Pots") then
setWalkerEnabled(false)
wait(math.random(2000,2400))
Self.Say("hi")
wait(math.random(800,1700))
Self.SayToNpc("vials")
wait(math.random(800,1700))
Self.SayToNpc("yes")
wait(math.random(800,1700))
Self.SayToNpc("yes")
wait(math.random(800,1700))
Self.SayToNpc("trade")
wait(math.random(2000,2400))
wait(900, 1200)
Self.ShopBuyItemsUpTo(ManaID, MaxMana)
wait(900, 1200)
Self.ShopBuyItemsUpTo(HPID, MaxHP)
wait(200, 500)
setWalkerEnabled(true)
if (labelName == "GoCheckSupp") then
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HPID) <= MinHP) then
gotoLabel("Start")
else
gotoLabel("GoHunt")
end
end
elseif (labelName == "SoftsOn") then
delayWalker(1500)
Self.Equip(6529, "feet")
elseif (labelName == "SoftsOff") then
delayWalker(1500)
Self.Equip(3079, "feet")
elseif (labelName == "ResetBps") then
setWalkerEnabled(false)
Self.CloseContainers()
repeat
wait(900)
until (Self.UseItemFromEquipment("backpack") > 0)
wait(1000)
Container.GetFirst():OpenChildren(Item.GetID(MainB P), Item.GetID(PotBPBP), Item.GetID(StackBP), Item.GetID(ShitBP), Item.GetID(LootBP), Item.GetID(GoldBP))
setWalkerEnabled(true)
end
Anyone can help me ?
Script: Sea Serpent By Kumandos.lua
Line #: 67
Chunk: D:?Users?Lukas?DOCUME?1?XenoBot?Scripts??SEASER?1. LUA
Error: 'end' expected (to close 'function' at line 51) near 'elseif'
This is an error with user-input and should not be reported as a bug with XenoBot.
lua :
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
setTargetingEnabled(true)
setLooterEnabled(true)
function onWalkerSelectLabel(labelName)
if (labelName == "Start") then
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HPID) <= MinHP) then
gotoLabel("GoBank")
else
gotoLabel("GoHunt")
end
end
if (labelName == "CheckSupp") then
if (Self.Cap() <= MinCap) or (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HPID) <= MinHP) then
gotoLabel("LeaveHunt")
else
gotoLabel("Hunt")
end
end
elseif (labelName == "Bank") then
local cashmana = math.abs((MaxMana-Self.ItemCount(ManaID))*ManaPrice)
local cashhp = math.abs((MaxHP-Self.ItemCount(HPID ))*HPPrice)
local cashextra = 5000
local withdrawcash = cashmana + cashhp + cashextra
setWalkerEnabled(false)
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
if withdrawcash > 0 then
Self.SayToNpc({"withdraw " .. withdrawcash, "yes"}, 65)
end
if ((SoftBoots == true)) and ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) then
Self.WithdrawMoney((10000*(Self.ItemCount(6530)))+ 500)
wait(500)
end
Self.SayToNpc({"balance"}, 65)
setWalkerEnabled(true)
wait(2000)
elseif (labelName == "CheckSofts") then
delayWalker(1000)
setWalkerEnabled(false)
if ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) and ((SoftBoots == true)) then
gotoLabel("ToVenore")
setWalkerEnabled(true)
else
gotoLabel("GoPots")
setWalkerEnabled(true)
end
elseif (labelName == "Pots") then
setWalkerEnabled(false)
wait(math.random(2000,2400))
Self.Say("hi")
wait(math.random(800,1700))
Self.SayToNpc("vials")
wait(math.random(800,1700))
Self.SayToNpc("yes")
wait(math.random(800,1700))
Self.SayToNpc("yes")
wait(math.random(800,1700))
Self.SayToNpc("trade")
wait(math.random(2000,2400))
wait(900, 1200)
Self.ShopBuyItemsUpTo(ManaID, MaxMana)
wait(900, 1200)
Self.ShopBuyItemsUpTo(HPID, MaxHP)
wait(200, 500)
setWalkerEnabled(true)
if (labelName == "GoCheckSupp") then
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HPID) <= MinHP) then
gotoLabel("Start")
else
gotoLabel("GoHunt")
end
end
elseif (labelName == "SoftsOn") then
delayWalker(1500)
Self.Equip(6529, "feet")
elseif (labelName == "SoftsOff") then
delayWalker(1500)
Self.Equip(3079, "feet")
elseif (labelName == "ResetBps") then
setWalkerEnabled(false)
Self.CloseContainers()
repeat
wait(900)
until (Self.UseItemFromEquipment("backpack") > 0)
wait(1000)
Container.GetFirst():OpenChildren(Item.GetID(MainB P), Item.GetID(PotBPBP), Item.GetID(StackBP), Item.GetID(ShitBP), Item.GetID(LootBP), Item.GetID(GoldBP))
setWalkerEnabled(true)
end
Anyone can help me ?