Ir para conteúdo
  • 0

Global event que da um reload nas actions


BrenoNeto

Pergunta

5 respostass a esta questão

Posts Recomendados

  • 0

va em data / talkactions / scripts / renome algum arquivo para reload é adicione .

 

local reloadInfo = {
{RELOAD_ACTIONS, "actions", "action"},
{RELOAD_CHAT, "chat", "channels"},
{RELOAD_CONFIG, "config", "configuration"},
{RELOAD_CREATUREEVENTS, "creatureevents", "creature events", "creaturescripts", "creature scripts", "creatureevent", "creature event", "creature script", "creaturescript"},
{RELOAD_GAMESERVERS, "gameservers", "game servers", "servers"},
{RELOAD_GLOBALEVENTS, "globalevents", "global events", "globalevent", "global event"},
{RELOAD_GROUPS, "groups", "playergroups", "group"},
{RELOAD_HIGHSCORES, "highscores", "scores", "highscore", "score"},
{RELOAD_HOUSEPRICES, "houseprices", "house prices", "prices"},
{RELOAD_ITEMS, "items", "item"},
{RELOAD_MONSTERS, "monsters", "monster"},
{RELOAD_MOVEEVENTS, "moveevents", "move events", "movements", "move", "movement"},
{RELOAD_NPCS, "npcs", "npc"},
{RELOAD_OUTFITS, "outfits", "outfit"},
{RELOAD_QUESTS, "quests", "quest"},
{RELOAD_RAIDS, "raids", "raid"},
{RELOAD_SPELLS, "spells", "spell"},
{RELOAD_STAGES, "stages", "experience"},
{RELOAD_TALKACTIONS, "talkactions", "talk actions", "talk", "commands", "talkaction", "talk action"},
{RELOAD_VOCATIONS, "vocations", "vocation"},
{RELOAD_WEAPONS, "weapons", "weapon"},
{RELOAD_MODS, "mods", "modifications"},
{RELOAD_ALL, "all", "everything"}
}
function onSay(cid, words, param, channel)
if(param == '') then
 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
 return true
end
param = param:lower()
local str = "Reload type not found."
for _, v in ipairs(reloadInfo) do
 if(table.isStrIn(param, v)) then
  doReloadInfo(v[1], cid)
  str = "Reloading " .. v[2] .. "..."
  break
 end
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
return true
end

 

em talkactions.xml

 

<talkaction log="yes" words="/reload" access="4" event="script" value="reload.lua"/>

Link para o comentário
Compartilhar em outros sites

  • 0

@sky vc realmente n intendeu oq ele quer ;/

 

@topic

 

function onThink(interval, lastExecution, thinkInterval)
doReloadInfo(RELOAD_ACTIONS)
return true
end

 

 

tag:

<globalevent name="reload_ac" interval="60" event="script" value="reload_ac.lua"/>

 

ps: nao testei, mas o /reload utiliza essa funçao, entao deve da certo...

ps²: vai da o reload a cada 1h... se quiser mudar eh soh mudar ali em interval="60"...

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...