Ir para conteúdo
  • 0

[Pedido] Talkaction De Teleport


kriller12

Pergunta

3 respostass a esta questão

Posts Recomendados

  • 0

data/talkactions/scripts, duplica um nomeia para "tp_player" sem as aspas e nele cole:

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 #t ~= 4 then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Param invalid.")
       return true
   end

   local player = getPlayerByNameWildcard(tostring(t[1]))
   local postp = {x=tonumber(t[2]), y=tonumber(t[3]), z=tonumber(t[4])}
   local effect = 30


   if(not isPlayer(player)) then
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.")
       return true
   end


   doTeleportThing(player, postp)
   doSendMagicEffect(getCreaturePosition(player), effect)    
   return true
end

 

agora em talkactions.xml cole a tag:

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

 

Fiz rapidinho e nem testei, qualquer erro me fala.

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...