<?xml version="1.0" encoding="UTF-8"?>
<npc name="NOMEDOSEUNPC" script="data/npc/scripts/NOMEDOSEUARQUIVO.lua" walkinterval="5000" floorchange="0">
<health now="100" max="100"/>
<look type="128" head="38" body="39" legs="96" feet="118" addons="3"/>
<parameters>
<parameter key="message_greet" value="Ola, |PLAYERNAME|! Voce quer {sair} de rookguard?"/>
<parameter key="message_farewell" value="Good bye."/>
<parameter key="module_keywords" value="1" />
</parameters>
</npc>
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
local newpos = {x=1,y=1,z=1}
if msgcontains(msg, "sair") then
if getPlayerLevel(cid) >= 8 then
selfSay("Voc\ê quer sair de rookguard?", cid)
talkState[talkUser] = 1
else
selfSay("Voc\ê n\ão tem level 8.", cid)
talkState[talkUser] = 0
end
elseif talkState[talkUser] == 1 and msgcontains(msg, "yes") then
selfSay("Voc\ê tem absoluta certeza disso? N\ão ser\á poss\ível voltar para rookguard.", cid)
talkState[talkUser] = 2
elseif talkState[talkUser] == 2 and msgcontains(msg, "yes") then
doTeleportThing(cid, newpos)
doSendMagicEffect(newpos, 10)
selfSay("Ok. Ent\ão v\á!", cid)
talkState[talkUser] = 0
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())


info
Grupo: Campones
Registrado: 08/09/12
Posts: 73
Reputação: 0
Char no Tibia: palasho
Olá novamente, Gostaria de um npc que Teleporta por level.
Ou um exatamente igual ao THE ORACLE do tibia GLOBA.
Exemplo:
Player:Hi
The Orcle: Ola 'nome do player' você gostaria de sair de rookguard?
Player:Yes
The Oracle: voce tem absolutamente certeza disto? Nao sera possivel voltar novamente a rookguard.
Player:yes
Ai o NPC teleportara ele em tal cordenada.
obrigado.