Vá em talkactions/scripts e crie um arquivo.lua com o nome de poketeleport e bote o seguinte script dentro:
function getTime(s)
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end
function onSay(cid, words, param)
local configs = {
needpa = TRUE,
needlvl = {TRUE, level = 50},
}
local cidades = {
["Carlin"] = {x=1000,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 1},
["Thais"] = {x=1002,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 2},
}
teleport = FALSE
if configs.needpa and not isPremium(cid) then
return doPlayerSendCancel(cid, "You need to be a premmium account to use teleport.")
end
if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then
return doPlayerSendCancel(cid, "You need to be level "..configs.needlvl.level.." or higher to use teleport.")
end
if #getCreatureSummons(cid) <= 0 then
return doPlayerSendCancel(cid, "You need to have a monster summoned.")
end
for i,x in pairs(cidades) do
for _,z in pairs(getCreatureSummons(cid)) do
if isInArray(x.pokenames, getCreatureName(z)) then
if param:lower() == "\"" .. i:lower() then
if os.time()-getPlayerStorageValue(cid, 64231) <= x.time*60 then
minutes,seconds = getTime(x.time*60-(os.time()-getPlayerStorageValue(cid, 64231)))
return doPlayerSendCancel(cid, "You need wait " .. minutes .. " minutes and " .. seconds .. " seconds.")
else
doTeleportThing(cid, x)
doTeleportThing(z, x)
setPlayerStorageValue(cid, 64231, os.time())
teleport = TRUE
break
end
end
end
end
end
if not teleport then
return doPlayerSendCancel(cid, "This city don't exists or not is able to go in there with teleport or this monster don't able to use teleport.")
end
return TRUE
end
Depois va em talkactions.xml e bote a seguinte TAG:
<talkaction words="!teleport" event="script" value="poketeleport.lua"/>
Como configurar o script:
Mecha nessas partes:
local configs = {needpa = TRUE,
needlvl = {TRUE, level = 50},
}
local cidades = {
["Carlin"] = {x=1000,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 1},
["Thais"] = {x=1002,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 2},
}
Legendas:
-- Use TRUE ou FALSE --
Vermelho - Se precisa de premmium account para usar a talkaction.
Azul - Se precisa de level, e qual level precisa.
Rosa - As informaçoes sao, respectivamente: A pos pra aonde o teleport vai levar, os nomes dos pokes que podem levar para akele local, o tempo em minutos que demorara para usar novamente o teleport para akele local.
Como adicionar novos locais para teleport:
Copie a ultima linha, no caso:
["Thais"] = {x=1002,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 2},
Em seguida cole logo abaixo ficando assim:
local cidades = {["Carlin"] = {x=1000,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 1},
["Thais"] = {x=1002,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 2},
["Thais"] = {x=1002,y=1000,z=7, pokenames = {"Rat", "Bug"}, time = 2},
}
Depois eh so mudar para as informaçoes que voce queira...
Como usar a talkaction in-game:
Basta voce falar !teleport "NOMEDOLOCAL
Ex: !teleport "carlin
Bem nao deu pra explicar muito bem por causa do meu tempo, espero que voces consigam entender.
De suas opnioes para as proximas versoes do script...
Dica Importante!
Se voce for botar o local de uma parte que for PROTECTION ZONE o seu pokemon ou summon nao ira andar e ficara preso, para que isso nao aconteça va em config.lua e procure por isso (CTRL+F):
teleportPlayerSummons
Se estiver false, mude para true para que o summon seja teleportado ate o player quando ele for para longe.
















