Postado Julho 29, 2015 9 anos Alguém pode me passar um script ou fazer ou me dar uma base de um NPC que troca seu nome por 30 itens do id 1010
Postado Julho 29, 2015 9 anos 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 Julho 29, 2015 9 anos por andersonwill (veja o histórico de edições)
Postado Julho 29, 2015 9 anos 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 Julho 29, 2015 9 anos por Animal Pak (veja o histórico de edições)
Postado Julho 29, 2015 9 anos 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 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
Postado Julho 29, 2015 9 anos Irei tentar resolver aqui adicionar no meu ai vou testar, se funfar eu te mando ela completa.
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.