teleporte

mylorc
Por mylorc
em Scripts

mylorc

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/08/10Posts: 108Char 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.

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

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())

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.

wesleybeek

SoulNTO Online
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 15/11/12Posts: 124Char no Tibia: Xtibia Soul

O Tópico acima lhe ajudou ? /\
Se Não manda PM, eu faço um tutorial tenho um Npc que teleporta por lvl, Premium etc..

                                                       i4eu.png

                                        tmbn.gif

Omega

o/
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 17/06/07Posts: 1165Gênero: MasculinoChar no Tibia: Nenhum

Cara, já te alertei e avisei de novo, já excluí esse mesmo tópico hoje e você continua fazendo a mesma coisa. Vou te dar um alerta e até mover pra você. Mas essa é a última vez.

Por favor, preste atenção e leia as regras.


Tópico movido para a seção de dúvidas e pedidos resolvidos.