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

[REQUEST] Talkaction script

Yaze

Well-Known Member
Joined
Sep 15, 2014
Messages
382
Reaction score
61
Dear otlanders,

Right now my open tibia server http://www.xanteria.hopto.org
is running and i would like to add a talkaction for my players.
Iam using 0.3.6 8.6.

If you need more informations please ask me.

The talkaction should work like,

players should be able to broadcast something but with exhausted like 30 minutes.
But of course they should not be able to broadcast anything they like,

they should only be able to broadcast like they say

/warevent,10vs10,thaismap
then it should broadcast: [playername] wants to make a war event at [10vs10] on [THAIS-MAP]

/warevent,10vs10,naturemap
then it should broadcast: [playername] wants to make a war event at [10vs10] on [NATURE-MAP]

other possible broadcasts
/warevent,10vs10,snowmap
/warevent,5vs5,thaismap
/warevent,5vs5,naturemap
/warevent,5vs5,snowmap




Thanks !
 
Code:
local levelReq = 5
local useExhaust = TRUE
local storageValue = 12388
local words = "test"
local exhaustTime = 300
function onSay(cid, words, param)
    if getPlayerLevel(cid) < levelReq then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sorry, you need to be at least level " .. levelReq .. " to use this command.")
    return true
    end
    if (useExhaust == TRUE) and exhaustion.check(cid,storageValue) == true then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you need to wait "..exhaustion.get(cid,storageValue).." seconds before broadcasting another message.")
    return true
    end
    if doPlayerRemoveMoney(cid, broadcastPrice) == FALSE then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you ain't got enough money!")
    else  
     doBroadcastMessage(getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "] wants to make a war event at [10vs10] on [THAIS-MAP]")
            setPlayerStorageValue(cid, storageValue, 1)
        exhaustion.set(cid,storageValue,exhaustTime)
        return true
    end
return true
end

You edit it to w/e u want ;)
 
Back
Top