• 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!

Function choose (Unseful)

Mock

Mock the bear (MTB)
Joined
Jul 29, 2008
Messages
619
Reaction score
106
Location
Brazil
Add it on 050-functions.lua
(last line)
Lua:
function choose(...) -- by mock
    local arg = {...}
    return arg[math.random(1,#arg)]
end

Lua:
--> lower:
function choose(...) -- by mock
    return ({...})[math.random(1,#arg)]
end
Use like this:
Lua:
doSendMagicEffect(pos,choose(50,29,11,49))
Or:
Lua:
doCreatureSay(cid,'I am '..choose('a bear','a man','a LOL'),1)
 
Last edited:
haha thats cool, and I can think of some scenarios where it would be useful.
 
the best is the title: 'Function choose(Unseful)', but it could be used in some scripts...
 
just use ur imagination for making funny and/or usefull scripts ;)

pd: screenshots...

@diath, I'm agree with u
 
screenshots?
facepalm5.jpg
 
Back
Top