[XenoScript] Rook chain armor.lua: unexpected symbol near 'then'
PHP Code:
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
MPotID = 7876 --- mana potion ID
MinMPots = 10 ---- if less then script will exit spawn
MPots = 20 ----- amount to refill
MPotprice = 50 ---- price of 1 single mana pot
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "Checker") then
if (Self.Cap() < MinCap) or ((Self.ItemCount(MPotID) < MinMPots)) then<- this one
gotoLabelz(Leave)
else
gotoLabel('Keep Hunting')
end
elseif (labelName == "Sell") then
delayWalker(5000)
Self.Say("hi")
sleep(math.random(700, 1400))
Self.ShopSellItem(item, sell)
sleep(math.random(700, 1400))
end
end
elseif (labelName == "potions") then
setWalkerEnabled(false)
wait(900, 1200)
Self.ShopSellItem(285, sell)
wait(900, 1200)
buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(MPotID, (MPots-Self.ItemCount(MPotID)))
wait(900, 1200)
setWalkerEnabled(true)
end
end