• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

8.1 aries script.

Joined
Jun 22, 2010
Messages
268
Solutions
1
Reaction score
5
Location
Usa, Utah
I was wondering if someone could help me fix this script i get the error.

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
 
Code:
function onUse(cid, item, frompos, item2, topos)
	if math.random(10) == 1 then
		doPlayerSay(cid, 'Thing to say ' .. math.random(10), 16)
	end
	return 1
end
 
PHP:
  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
end


lil:w00t::w00t::w00t:
 
finally script works but another problem...you gotta click it like 10x for it to work 1x lol.
how about...is it possible to make it say whats does x+x =? and it gives 2 random numbers
 
LUA:
 function onUse(cid, item, frompos, item2, topos) 
       
                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
 
Code:
function onUse(cid, item, frompos, item2, topos)
	return 1, doPlayerSay(cid, 'Thing to say ' .. math.random(10), 16)
end
 

Similar threads

  • Question Question
Replies
0
Views
190
Back
Top