Área incorreta. A área que você postou é destinada à códigos já prontos, e não para pedidos e/ou dúvidas. Portanto, irei mover para a mais adequada - Pedidos e dúvidas - Servidores derivados (por se tratar de um pedido relacionado à pokémon). Mais cuidado da próxima vez.
Anyway, sabe fazer o .xml?
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 to_pos = {x = xxx, y = yyy, z = zzz} --Para onde o jogador será teleportado.
local great_id = 2391 --ID da Great Ball.
if msgcontains(msg, "help") or msgcontains(msg, "mission") then
selfSay("Você gostaria de realizar uma missão? Para isso, você não deverá ter pokeball alguma em sua bag.", cid)
talkState[talkUser] = 1
return true
elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then
if getPlayerItemCount(cid, 2391) >= 1 or getPlayerItemCount(cid, 2394) >= 1 or getPlayerItemCount(cid, 2392) >= 1 or getPlayerItemCount(cid, 2393) >= 1 or getPlayerItemCount(cid, 12617) >= 1 then --estão configurados os IDs das pokeballs do PDA (normal, great, super, ultra e saffari).
selfSay("Desculpe, você possui alguma pokeball em sua mochila. Retire-a, e assim poderei lhe levar para a quest.", cid)
talkState[talkUser] = 0
return true
end
selfSay("Boa sorte! Lhe darei uma Great Ball para lhe auxiliar.", cid)
doPlayerAddItem(cid, great_id, 1)
doTeleportThing(cid, to_pos)
talkState[talkUser] = 0
return true
elseif msgcontains(msg, "no") and talkState[talkUser] == 1 then
selfSay("Tudo bem, então. Até mais!", cid)
talkState[talkUser] = 0
return true
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())





info
Grupo: Campones
Registrado: 12/10/13
Posts: 91
Reputação: +22
Char no Tibia: Nem tenho
Falaa Galerinha do Xtibia
vim pedir uma ajuda a vocês Scripter's gostaria de um Npc Que Teleporta para um Lugar sem poder entrar com ball e ao entrar o Player ganhar 1 Great Ball qm pude ajuda Rep++
Vllw
Obs: O npc sera usado em Poketibia para transportar para uma quest.