RevScript TalkAction !commands

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Hola a todos,
Hoy por parte de @mamiloski en discord, compartimos el Revscript !commands, que permite mostrar la lista de comandos para los Players,

Antes que nada, deberán de añadir líneas en función de los TalkActions que disponéis en vuestro servidor, aquí el ejemplo del revscript:

Código:
local commands = TalkAction("!commands")
function commands.onSay(player, words, param)
        player:showTextDialog(18559, "PLAYER COMMANDS:" .. "\n"
        
        .. "!food *-* add 100 brownmushrooms" .. "\n"
        .. "!backpack *-* add a brown backpack" .. "\n"
        .. "!spells *-* show all spells on the server" .. "\n"
        .. "!quests *-* show complete and unfinished quests" .. "\n"
        .. "!bless *-* add all blessings" .. "\n"
        .. "!all *-* send a message to the whole server" .. "\n"
        .. "!autoloot *-* add an item dropped automatically" .. "\n"
        .. "!buyhouse *-* buy a house" .. "\n"
        .. "!sellhouse *-* sell a house" .. "\n"
        .. "!eject *-* kick an inactive player out of your house" .. "\n"
        .. "!aol" .. "\n"
        .. "!softs" .. "\n"
        .. "!point" .. "\n"
        .. "!home" .. "\n"
        .. "!autoloot")
        return false
        
    end
commands:register()

En el script la parte que modificaremos sera la siguiente:
Código:
 .. "!food *-* add 100 brownmushrooms" .. "\n"
        .. "!backpack *-* add a brown backpack" .. "\n"
        .. "!spells *-* show all spells on the server" .. "\n"
        .. "!quests *-* show complete and unfinished quests" .. "\n"
        .. "!bless *-* add all blessings" .. "\n"
        .. "!all *-* send a message to the whole server" .. "\n"
        .. "!autoloot *-* add an item dropped automatically" .. "\n"
        .. "!buyhouse *-* buy a house" .. "\n"
        .. "!sellhouse *-* sell a house" .. "\n"
        .. "!eject *-* kick an inactive player out of your house" .. "\n"
        .. "!aol" .. "\n"
        .. "!softs" .. "\n"
        .. "!point" .. "\n"
        .. "!home" .. "\n"
        .. "!autoloot")

Cada Línea , significa 1 TalkAction que disponemos en nuestro servidor, si no tenemos el comando asociado borramos la Línea, podéis también añadir mas comandos, ejemplo, si tenemos el comando !afk, entonces añadiremos:
Código:
        .. "!afk *-* You will be Afk activating this command" .. "\n"
Si no deseamos añadir ningún texto quedaría:
Código:
   .. "!afk" .. "\n"
La ultima Línea, debe obligatoriamente terminar por paréntesis ) , cerrando así el script correctamente.
 
Arriba