Ir para conteúdo

Featured Replies

Postado

Ola amigo boa noite, olhe este topico aqui e siga o passo a passo, Boa sorte!

 

http://www.tibiaking.com/forum/topic/38037-npc-que-muda-nome/

 

 

 

Te ajudei? REP+++

Editado por andersonwill (veja o histórico de edições)

Postado

Tenta:

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end

function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

if msgcontains(msg, "trocar nome") then
if getPlayerItemCount(cid, 1010) < 30 then
npcHandler:say("Você não tem a quantidade necessária para trocar seu nome!}", cid)
return TRUE
end
doPlayerRemoveItem(cid, 1010, 30)
npcHandler:releaseFocus(cid)
doAddPlayerBanishment(getPlayerGUID(cid), PLAYERBAN_LOCK)
doRemoveCreature(cid)
return TRUE
end

end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Trocar Nome" script="data/npc/scripts/name.lua" walkinterval="0" speed="0" floorchange="0">
<health now="100" max="100"/>
<look type="240"/>
<parameters>
<parameter key="message_greet" value="Ola |PLAYERNAME|, eu posso {trocar nome} por 30 pontos!" />
</parameters>
</npc>

Editado por Animal Pak (veja o histórico de edições)

Postado
  • Autor

Ola amigo boa noite, olhe este topico aqui e siga o passo a passo, Boa sorte!

 

http://www.tibiaking.com/forum/topic/38037-npc-que-muda-nome/

 

 

 

Te ajudei? REP+++

 

Ta dando erro brother!

15:26 Change Name: Qual deve ser o seu novo nome?
15:26 Oliver Arrow [17]: Oliver Test

 

1APe9YS.png

 

 

 

Tenta:

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end

function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end

function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end

function onThink() npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

if msgcontains(msg, "trocar nome") then

if getPlayerItemCount(cid, 1010) < 30 then

npcHandler:say("Você não tem a quantidade necessária para trocar seu nome!}", cid)

return TRUE

end

doPlayerRemoveItem(cid, 1010, 30)

npcHandler:releaseFocus(cid)

doAddPlayerBanishment(getPlayerGUID(cid), PLAYERBAN_LOCK)

doRemoveCreature(cid)

return TRUE

end

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())<?xml version="1.0" encoding="UTF-8"?>

<npc name="Trocar Nome" script="data/npc/scripts/name.lua" walkinterval="0" speed="0" floorchange="0">

<health now="100" max="100"/>

<look type="240"/>

<parameters>

<parameter key="message_greet" value="Ola |PLAYERNAME|, eu posso {trocar nome} por 30 pontos!" />

</parameters>

</npc>

 

 

Po cara obrigado por tentar ajudar, mas account mananger não rola, os caras vão acabar fazendo meu ot ter lag, usando magebomb e tals, ou logando mais um fake, queria npc mesmo

 

 

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.6k

Informação Importante

Confirmação de Termo