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

Help Channel: exhausted for normal players but not for tutors or higher group

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,764
Solutions
1
Reaction score
227
Location
Chile, Santiago
Like topic name, I need to make help channel with delay (30 sec) easy to set, but tutor or higher groups shouldnt have exhausted and also talk in orange (flag).

I rep`+++ thanks!
 
Look at the example script at the bottom of that thread;

Code:
function onWriteToChannel(cid, channelId, text)
    if(text:lower() == 'fuck') then
        doPlayerSendChannelMessage(cid, "", "Swearings are not allowed here!", TALKTYPE_CHANNEL_RN, channelId)
        return false -- this will make his text dont appear!
    end
    return true
end

Just change
Code:
if(text:lower() == 'fuck') then
to
Code:
 if getCreatureStorage(cid, 9001) < 0 then

Agreed, I could compile all those codes, but how to make it works? I mean, if you add the storage 9001 = 1, then how to change after X seconds to 0, it would lag a lot the OT if it checks it every second... Any suggestion?
 
LUA:
function onWriteToChannel(cid, channelId, text)
    if exhaustion.check(cid, 9001) == false then
        exhaustion.set(cid, 9001, 30)
        return true
    else
    doPlayerSendCancel(cid, "you can place your next message in "..exhaustion.get(cid, 9001).." seconds.")
        return false
    end
    return true
end
 
Back
Top