Sabe fazer o XML?
data/npc/scripts
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 cfg = {
level = 100, --Level necessário para ser teleportado.
to_go = {x = xxx, y = yyy, z = zzz}, --Para onde o player será teleportado.
}
if msgcontains(msg, 'teleport') then
if getPlayerLevel(cid) >= cfg.level then
selfSay("Boa viagem!", cid)
doTeleportThing(cid, cfg.to_go)
talkState[talkUser] = 0
return true
else
selfSay("Você precisa estar, no mínimo, level "..cfg.level.." para ser teleportado!", cid)
talkState[talkUser] = 0
return true
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())






info
Grupo: Artesão
Registrado: 01/08/10
Posts: 108
Reputação: 0
Char no Tibia: mylorc
[Resolvido]Olá galera,preciso de um npc que teleporte,porém teleporte apenas players de level 100 para cima.
Alguém pode ajudar?
Obrigado.
Editado Novembro 21 por mylorc