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

[TFS 1.3+] /commands - add your commands by urself

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,864
Solutions
82
Reaction score
1,967
Location
Germany
Nothing to crazy but many ots missing :D

1711820769940.png

Lua:
local talk = TalkAction("!commands", "/commands")

local commandsTable = {}
local timeUseAgain = 10

function talk.onSay(player, words, param)
    local playerGuid = player:getGuid()
    local timeAmount = commandsTable[playerGuid]
    if timeAmount and timeAmount > os.time() then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must wait " .. (timeAmount - os.time()) .. " seconds.")
        return true
    end
    player:showTextDialog(1977, "[Server Talkaction's]\
    [Talkaction - Information]\
    !aol    -    Buy amulet of loss\
    !bless    -    Buy all blessings\
    !backpack    -    Buy backpack\
    !spells    -    See all your rebirth spells\
    ", false, 150)
    commandsTable[playerGuid] = os.time() + timeUseAgain
    return false
end
    
talk:register()
 
Last edited:
Back
Top