Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • Administrador

Fala galerinha, procurando na web ai achei essa talkaction feita pela equipe do Crystal Server e achei ela bastante interessante e resolvi postar-la aqui, este comando é para os GOD's e não para os Players e os créditos do script estão no final deste tópico.

Vá na pasta do seu otserv data/lib crie um arquivo chamado 025-bless.lua e coloque isto:

BLESS_FIRST = 1
BLESS_ONE = BLESS_FIRST
BLESS_TWO = 2
BLESS_THREE = 3
BLESS_FOUR = 4
BLESS_FIVE = 5
BLESS_SIX = 6
BLESS_ALL = {1, 2, 3, 4, 5, 6}
BLESS_LAST = BLESS_SIX

BLESS_IDS = {
["first"] = BLESS_ONE,
["second"] = BLESS_TWO,
["third"] = BLESS_THREE,
["forth"] = BLESS_FOUR,
["fifth"] = BLESS_FIVE,
["pvp"] = BLESS_SIX,
["all"] = BLESS_ALL
}

Agora vá em data/talkactions/talkactions.xml e adicione a seguinte tag:
<talkaction log="yes" words="/bless" access="5" event="script" value="blessings.lua"/>

Agora vá em data/talkactions/scripts crie um arquivo chamado blessings.lua e coloque isto dentro:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end

local t = string.explode(param, ",")
if(not t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")
return true
end

local pid = getPlayerByNameWildcard(t[1])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
return true
end

t[2] = t[2]:lower()
local blessing = BLESS_IDS[t[2]]
if(not blessing) then
blessing = tonumber(t[2])
if(not blessing or blessing < BLESS_FIRST or blessing > BLESS_LAST) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This bless not found.")
return true
end
end

doPlayerAddBlessing(pid, blessing)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
return true
end

Exemplo de como usar:
/bless nome_do_player, all <-- Adiciona todas as bless ao player.
/bless nome_do_player, first <-- Adiciona a primeira bless ao player.
e asism por diante...

Créditos
and Crystal Server Development Team.

 

dm3o5y8.png
 
Você gostou deste conteúdo!? Este conteúdo te ajudou!? Isso será realmente útil pra você!?
Então, se possível, faça uma doação (de qualquer valor) que estará me ajudando também! :P
 

TibiaKing Team- KingTópicos
www.tibiaking.com

  • 2 weeks later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo