Vamos Nessa ! ! !
Vá em PastadoServer/Data/TalkActions/Scripts, copie um arquivo qualquer e renomeie-o com o nome de poketeleport, abra-o com o Bloco de Notas e apague tudo o que estiver escrito, após apagar tudo digite:
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 = 10},
}
local cidades = {
["Teste"] = {x=1204,y=1045,z=7, pokenames = {"Alakazam", "Kadabra", "Abra", "Hypno", "Drowzee", "Jynx"}, time = 60},
["Saffron"] = {x=1053,y=1049,z=7, pokenames = {"Alakazam", "Kadabra", "Abra", "Hypno", "Drowzee", "Jynx"}, time = 60},
["Cerulean"] = {x=1060,y=903,z=7, pokenames = {"Alakazam", "Kadabra", "Abra", "Hypno", "Drowzee", "Jynx"}, time = 60},
["Pewter"] = {x=717,y=857,z=6, pokenames = {"Alakazam", "Kadabra", "Abra", "Hypno", "Drowzee", "Jynx"}, time = 60},
["Viridian"] = {x=705,y=1089,z=7, pokenames = {"Alakazam", "Kadabra", "Abra", "Hypno", "Drowzee", "Jynx"}, time = 60},
["Fuchsia"] = {x=1213,y=1324,z=7, pokenames = {"Alakazam", "Kadabra", "Abra", "Hypno", "Drowzee", "Jynx"}, time = 60},
}
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
salve e Fexe
Explicação:
Cor Vermelha: City para qual o pokemon Será teletransportado
Cor Azul: Posição que você irá após teletransportar-se (recomendo colocar a position do CP)
Cor Verde: Pokemon que o pleyer usará para se transportar
Cor Amarela: Tempo Que você poderá utilizar o comando novamente (regulado por segundos)
Terminando ! ! !
Vá em PastadoServer/Data/TalkActions, abra o arquivo TalkActions.xml e em qualquer lugar digite:
<talkaction words="h" event="script" value="poketeleport.lua"/>
Salve e Fexe
Explicação:
Cor Vermelha: Comando que será utilizado para transportar o player (no meu caso utilizarei (h "cerulean) pois aqui modifique a seu gosto)
Cor Azul: local onde se encontra a Script (se você seguiu os passos corretamente não mexa)
Té mais Galera XTIBIANA ! ! !
Caso tenha algum erro de Ortografia avisa ae.
Ajudei? REP+ não custa nada :button_ok: