Qual a versão do script?
Fiz um aqui baseado no 8.54 - não testei
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)local talkState = {} function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction 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 config1 = {cooldown = 82800, } if msgcontains(msg, 'teleport') or msgcontains(msg, 'tp') or msgcontains(msg, 'quest') or msgcontains(msg, 'help') then npcHandler:say('Hahaha, eu posso leva-lo a um local mistico, voce quer ir {transportar}?.', cid)talkState[talkUser] = 2elseif msgcontains(msg, 'transportar') or msgcontains(msg, 'yes') and (talkState[talkUser] == 2) thentalkState[talkUser] = 0if os.time() - getPlayerStorageValue(cid, 28126) >= config1.cooldown then -------- AQUI SÃO OS JOGADORES DO LEVEL 1 A 49if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 49 thenlocal sorte = math.random(1,3)--- POSIÇÃO DOS LOCAIS NO QUAL O JOGADOR SERÁ TELETRANSPORTADOlocal teleport1 = {x=1074, y=654, z=7}local teleport2 = {x=1074, y=654, z=7}local teleport3 = {x=1074, y=654, z=7}if sorte == 1 thennpcHandler:say('Hahaha, boa viagem meu caro.', cid)doTeleportThing(cid, teleport1)talkState[talkUser] = 0elseif sorte == 2 thennpcHandler:say('Hahaha, boa viagem meu caro.', cid)doTeleportThing(cid, teleport2)talkState[talkUser] = 0elseif sorte == 3 thennpcHandler:say('Hahaha, boa viagem meu caro.', cid)doTeleportThing(cid, teleport3)talkState[talkUser] = 0endendend----- #FIM DOS TPS DO JOGADOR LEVEL 1 A49-------- AQUI SÃO OS JOGADORES DO LEVEL 1 A 49if getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 100 thenlocal sorte = math.random(1,3)--- POSIÇÃO DOS LOCAIS NO QUAL O JOGADOR SERÁ TELETRANSPORTADOlocal teleport4 = {x=1074, y=654, z=7}local teleport5 = {x=1074, y=654, z=7}local teleport6 = {x=1074, y=654, z=7}if sorte == 1 thennpcHandler:say('Hahaha, boa viagem meu caro.', cid)doTeleportThing(cid, teleport4)talkState[talkUser] = 0elseif sorte == 2 thennpcHandler:say('Hahaha, boa viagem meu caro.', cid)doTeleportThing(cid, teleport5)talkState[talkUser] = 0elseif sorte == 3 thennpcHandler:say('Hahaha, boa viagem meu caro.', cid)doTeleportThing(cid, teleport6)talkState[talkUser] = 0endend----- #FIM DOS TPS DO JOGADOR LEVEL 1 A49if getPlayerLevel(cid) >= 101 thennpcHandler:say('Somente jogadores entre o nivel 8 a 100 podem utilizar esse servico.', cid)talkState[talkUser] = 0endelsenpcHandler:say('Voce ja foi teletransportado, espere '..(config1.cooldown - (os.time() - getPlayerStorageValue(cid, 28126)))..' segundos para poder ser transportado novamente.')endendnpcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new())




info
Grupo: Visconde
Registrado: 11/04/12
Posts: 328
Reputação: +7
Char no Tibia: ADM MiHawk
olá galerinha do xtibia, queria um script facil que nao sou bom o suficiente para fazer, ele é simples o npc vai teleportar o player para lugar x ou y aleatoriamente tendo 50% de chance para os 2 ou pode ser 3 lugares tambem, a diferença é que esse npc ele checa o level, por exemplo eu quero que o player seja transportado por stage, players do level 50 ao 100 vao ser teleportados aleatoriamente para outro lugar diferente dos players 8 ao 49, tambem gostaria que só pude-se usar esse npc de teleporte a cada 23 horas. desde já agradeço e reputo quem me ajudar com isso!
Editado Abril 9 por JeanCristian