PDA

View Full Version : if royal spear < x then x-log



konishyapl
08-13-2016, 09:48 PM
Spear = "Royal Spear"

SpearMin = 10



Module.New('NoSpearExit' function()

if Self.ItemCount(Spear) < SpearMin then

os.exit()

else

return

end

end)


for sure function is wrong, but i dont know correct, can someone fix it and how can i get all xenobot funtions?

konishyapl
08-13-2016, 09:51 PM
Weapon = "Royal Spear"

SpearMin = 10



Module.New('NoWeaponExit' function()

if Self.ItemCount(Weapon) < SpearMin then

os.exit()

else

return

end

end)

?? :D

Zingron
08-13-2016, 10:12 PM
You missed a comma

Replace


Module.New('NoWeaponExit' function()


With this


Module.New('NoWeaponExit', function()


I would also add a wait at the end of the Module.

e.g


wait(2000)
end)

konishyapl
08-14-2016, 08:53 AM
great, thx ;)