Ir para conteúdo

My Primer Aporte :)


jhon44370

Posts Recomendados

good here I bring you my first post: D

Teleport Sytems:

 

 

put your server / / data / / actions / / scripts

create a archivo.lua:

 

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 = {

["Saffron"] = {x=1054,y=1050,z=7, pokenames = {"Abra", "Alakazam", "Kadabra", "Drowzee", "Hypno", "Kadabra", "Mr.Mime", "Porygon", "shiny abra"}, time = 1},

}

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

 

 

xml gently place in actions:

 

<talkaction words="!h" event="script" value="poketeleport.lua"/>

 

 

and ready and we hope sytems nuetras teleport like that;)

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...