MY
dúvida

teleporte

Por mylorc, 20 de nov. de 2013 em Scripts

teleporte
resolvido
4
745
mylorcM
20 de novembro de 2013 às 18:43

[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

zipter98Z
20 de novembro de 2013 às 19:01

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())
wesleybeekW
20 de novembro de 2013 às 19:29

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..

OmegaO
22 de novembro de 2013 às 01:26

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.