Tormented Being
Member
I was wondering if someone could help me fix this script i get the error.
heres the script, it makes it so when you click on item x it says 1 of 10 things basically.
Code:
lua
data/actions/scripts/botcheck.lua:25: 'end' expected (to close 'if' at line 2) n
ear '<eof>'
heres the script, it makes it so when you click on item x it says 1 of 10 things basically.
LUA:
function onUse(cid, item, frompos, item2, topos)
if math.random(1,10) == 1 then
message = math.random(1,10)
if message == 1 then
doPlayerSay(cid,"Thing to say 1",16)
elseif message == 2 then
doPlayerSay(cid,"Thing to say 2",16)
elseif message == 3 then
doPlayerSay(cid,"Thing to say 3",16)
elseif message == 4 then
doPlayerSay(cid,"Thing to say 4",16)
elseif message == 5 then
doPlayerSay(cid,"Thing to say 5",16)
elseif message == 6 then
doPlayerSay(cid,"Thing to say 6",16)
elseif message == 7 then
doPlayerSay(cid,"Thing to say 7",16)
elseif message == 8 then
doPlayerSay(cid,"Thing to say 8",16)
elseif message == 9 then
doPlayerSay(cid,"Thing to say 9",16)
else
doPlayerSay(cid,"Thing to say 10",16)
end
return 1
end