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

GlobalEvent Fastfinger Talkaction& Globalevent

RoHaN-OTs

RoHaN-OTs.com
Joined
Jul 28, 2010
Messages
1,594
Reaction score
82
Location
Sweden
Found this script in my very old datapack and saw it wasn't released so..(correct me if i'm wrong :ninja: )
Globalevent
Code:
local letters = {}
for i = 1, 26 do
   letters[i] = string.char(i+64)
end
function onThink(interval, lastExecution)
    local randomstring = ""
    local presentstring = ""
    for i = 1, 10 do
        local rand = math.random(1, 26)
        randomstring = randomstring..letters[rand]
        presentstring = presentstring..":"..letters[rand]
    end
    presentstring = presentstring..":"
    setGlobalStorageString(1337, randomstring)
    setGlobalStorageValue(1337, 1)
    doBroadcastMessage('Fastest finger, first to type "!fastest '..presentstring..'" without the colons wins!', MESSAGE_EVENT_ORANGE)
    return TRUE
end
Talkaction
Code:
function onSay(cid, words, param, channel)
    local text = "Wait for a new round to start."
    if getGlobalStorageValue(1337) == 1 then
        text = "Incorrect, try again!"
        if param == getGlobalStorageString(1337) then
            text = "Congratulations! You are the fastest typer for this round. Enjoy your reward."
			doPlayerAddItem(cid, 2160, 1)
            setGlobalStorageValue(1337, 0)
            doBroadcastMessage('We have a winner! '..getCreatureName(cid)..' was the first to type it and wins a crystal coin!' , MESSAGE_EVENT_ORANGE)

        end
    end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, text)
    return TRUE
end
enjoy :p
 
It's a random event, sometimes theres a broadcast message that says: Fastest finger, first to type "!fastest 'LOL'" without the colons wins!
And if you type: !fastest LOL
you win a crystal coin ^^
 
Sorry, it doesn't works. You have to fix many things. Globalevent and even Talkaction have issues.
 
Back
Top