Ir para conteúdo

Posts Recomendados

Teste nao testei nao sei se e funcional!

 

Crie um Arquivo Chamado tele na pasta talkactions/script

 

function onSay(cid, words, param)
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end
local configs = {
needpa = TRUE,
needlvl = {TRUE, level = 50}, --lvl do player
}

local tps = {
["Vip"] = {x=1054,y=1050,z=7 , time = 15}, --coloca a posiçao da area vip
["Trainer"] = {x=1060,y=903,z=7, time = 15}, --coloca a posiçao da area trainer
["Templo"] = {x=1204,y=1046,z=7, time = 15},  --coloca a posiçao da area templo
}
teleport = FALSE

if configs.needpa and not isPremium(cid) then
return doPlayerSendCancel(cid, "Voce nao tem premium account para teleportar.")
end

if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then
return doPlayerSendCancel(cid, "voce nao tem level "..configs.needlvl.level.." ou superior para usar teletransporte.")
end

for i,x in pairs(cidades) do
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, "voce tem que espera " .. minutes .. " minutos e " .. seconds .. " segundos.")
else
doTeleportThing(cid, x)
doTeleportThing(z, x)
setPlayerStorageValue(cid, 64231, os.time())
teleport = TRUE
break
end
end
end

 

Depois coloque essa tag:

 

	<talkaction words="!go" event="script" value="tele.lua"/>

 

 

Rep++

Editado por mulizeu
Link para o comentário
https://xtibia.com/forum/topic/165276-pedido-comando-go/#findComment-1087130
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...