Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Alguem me ajuda quero que use esse teleporte quem tem esse storage 880088!

 

Spoiler

local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Porygon2', "Shiny Abra",

"Shiny Alakazam", "Shiny Hypno"}

local etele = 9499 

local cdtele = 1800

 

local config = {

premium = false, -- se precisa ser premium account (true or false)

battle = true -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas

}

 

local places = {

[1] = {name = "Cianwood", id = 12, sto = 897543},
[2] = {name = "Azalea", id = 13, sto = 897544},
[3] = {name = "Goldenrod", id = 14, sto = 897545},
[4] = {name = "Cherrygrove", id = 15, sto = 897546},
[5] = {name = "Ecruteak", id = 16, sto = 897547},
[6] = {name = "New Bark", id = 17, sto = 897548},
[7] = {name = "Violet", id = 18, sto = 897549},
[8] = {name = "Mahogany", id = 19, sto = 897550},
[9] = {name = "Blackthorn", id = 20, sto = 897551},

}

 

function onSay(cid, words, param)

 

if #getCreatureSummons(cid) == 0 then

doPlayerSendCancel(cid, "You need a pokemon to use teleport.")

return true

end

 

if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then

return 0

end

 

if not getPlayerStorageValue(cid, 880088) == 1 then --golden arena

doPlayerSendCancel(cid, "You can't do that while the golden arena!")

return true

end

 

if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6

return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!")

end

 

if getPlayerStorageValue(cid, 52480) >= 1 then

return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v2.6

end

 

if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then

return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v2.7

end

 

if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then

local tempo = tonumber(exhaustion.get(cid, etele)) or 0

local min = math.floor(tempo)

doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.")

return true

end

 

if config.premium and not isPremium(cid) then

doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.")

return true

end

 

if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then

doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")

return true

end

 

if (param == '') then

local str = ""

str = str .. "Places to go :\n\nHouse\n"

for a = 1, #places do

str = str..""..places[a].name.."\n"

end

doShowTextDialog(cid, 7416, str)

return true

end

 

local item = getPlayerSlotItem(cid, ?

local nome = getPokeballName(item.uid)

local summon = getCreatureSummons(cid)[1]

local lastppos = getThingPos(cid)

local lastspos = getThingPos(summon)

local telepos = {}

local myplace = ""

local townid = 0

local citySto = 0 --alterado v2.7

 

if string.lower(param) == "house" then

 

if not getHouseByPlayerGUID(getPlayerGUID(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")

return true

end

 

telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))

myplace = "our home"

 

else

 

for x = 1, #places do

if string.find(string.lower(places[x].name), string.lower(param)) then

townid = places[x].id

myplace = places[x].name

citySto = places[x].sto or -1 --alterado v2.7

end

end

 

if myplace == "" then

doPlayerSendCancel(cid, "That place doesn't exist.")

return true

end

 

end

 

if myplace ~= "" and townid > 0 then

telepos = getTownTemplePosition(townid)

end


 

if getDistanceBetween(getThingPos(cid), telepos) <= 15 then

doPlayerSendCancel(cid, "You are too near to the place you want to go!")

return true

end

 

doSendMagicEffect(getThingPos(summon), 29)

doSendMagicEffect(getThingPos(cid), 29)

 

doTeleportThing(cid, telepos, false)

 

local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH))

 

doTeleportThing(summon, pos2, false)

 

doSendMagicEffect(getThingPos(cid), 29)

 

doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1)

doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos)

doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER)

doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos)

 

doCreatureSetLookDir(cid, SOUTH)

doCreatureSetLookDir(summon, SOUTH)

 

doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT)

exhaustion.set(cid, etele, cdtele)

 

return true

end

 

Link para o post
Compartilhar em outros sites

Testa aí e me fala:

 

Spoiler

local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Porygon2', "Shiny Abra", "Shiny Alakazam", "Shiny Hypno"}
local etele = 9499 
local cdtele = 1800

local config = {
  premium = false, -- se precisa ser premium account (true or false)
  battle = true, -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas
  storage = 880088
}

local places = {
  [1] = {name = "Cianwood", id = 12, sto = 897543},
  [2] = {name = "Azalea", id = 13, sto = 897544},
  [3] = {name = "Goldenrod", id = 14, sto = 897545},
  [4] = {name = "Cherrygrove", id = 15, sto = 897546},
  [5] = {name = "Ecruteak", id = 16, sto = 897547},
  [6] = {name = "New Bark", id = 17, sto = 897548},
  [7] = {name = "Violet", id = 18, sto = 897549},
  [8] = {name = "Mahogany", id = 19, sto = 897550},
  [9] = {name = "Blackthorn", id = 20, sto = 897551},
}

function onSay(cid, words, param)

  if #getCreatureSummons(cid) == 0 then
    doPlayerSendCancel(cid, "You need a pokemon to use teleport.")
    return true
  end

  if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then
    return 0
  end

  if not getPlayerStorageValue(cid, 880088) == 1 then --golden arena
    doPlayerSendCancel(cid, "You can't do that while the golden arena!")
    return true
  end

  if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6
    return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!")
  end

  if getPlayerStorageValue(cid, 52480) >= 1 then
    return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v2.6
  end

  if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then
    return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v2.7
  end

  if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then
    local tempo = tonumber(exhaustion.get(cid, etele)) or 0
    local min = math.floor(tempo)
    doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.")
    return true
  end

  if config.premium and not isPremium(cid) then
    doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.")
    return true
  end

  if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
    doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")
    return true
  end

  if (param == '') then
    local str = ""
    str = str .. "Places to go :\n\nHouse\n"
    for a = 1, #places do
      str = str..""..places[a].name.."\n"
    end
    doShowTextDialog(cid, 7416, str)
    return true
  end

  local item = getPlayerSlotItem(cid, ?
  local nome = getPokeballName(item.uid)
  local summon = getCreatureSummons(cid)[1]
  local lastppos = getThingPos(cid)
  local lastspos = getThingPos(summon)
  local telepos = {}
  local myplace = ""
  local townid = 0
  local citySto = 0 --alterado v2.7

  if string.lower(param) == "house" then
    if not getHouseByPlayerGUID(getPlayerGUID(cid)) then
      doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")
      return true
    end
    telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))
    myplace = "our home"
  else
    for x = 1, #places do

      if string.find(string.lower(places[x].name), string.lower(param)) then
        townid = places[x].id
        myplace = places[x].name
        citySto = places[x].sto or -1 --alterado v2.7
      end
    end

    if myplace == "" then
      doPlayerSendCancel(cid, "That place doesn't exist.")
      return true
    end
  end

  if myplace ~= "" and townid > 0 then
    telepos = getTownTemplePosition(townid)
  end

  if getDistanceBetween(getThingPos(cid), telepos) <= 15 then
    doPlayerSendCancel(cid, "You are too near to the place you want to go!")
    return true
  end

  if getPlayerStorageValue(cid, config.storage) >= 1 then
    doSendMagicEffect(getThingPos(summon), 29)
    doSendMagicEffect(getThingPos(cid), 29)
    doTeleportThing(cid, telepos, false)
    local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH))
    doTeleportThing(summon, pos2, false)
    doSendMagicEffect(getThingPos(cid), 29)
    doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1)
    doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos)
    doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER)
    doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos)
    doCreatureSetLookDir(cid, SOUTH)
    doCreatureSetLookDir(summon, SOUTH)
    doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT)
    exhaustion.set(cid, etele, cdtele)
  end
  return true
end

 

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Muvuka
      Alguem tem anti-nuker igual a esse 
       

       
    • Por Muvuka
      [SQLite] -=[TFS]=- 0.4 8.60 Alguem faz apk mobile pra mim ip: dexsoft.ddns.net
       
      pra mim
       
      https://www.mediafire.com/file/5klqnyy6k7jda0u/OTClientV8.rar/file
       
      TA TUDO AI
    • Por yuriowns
      Salve rapazes, estou precisando de um client próprio para o meu servidor 7.4, preciso que algum programador experiente e com referências faça um client do jeito que eu procuro. Responda aqui para fazermos um orçamento, obrigado!

      Não sei se estou no lugar certo, se não me desculpem e peço que movam por gentileza!
    • Por paulo thush
      Pessoal to com um grande problema, estou com um servidor TFS 1.4x 10.98, recentemente começou dar um problema, sempre quando falava "trade" com o npc dava um erros, com qual quer npc, o erro e o seguinte.
       
       
      me falaram que o problema e nas sourcer que precisava mudar umas coisas me passaram um link no github esse aqui 
      https://github.com/otland/forgottenserver/pull/3996/files
       
      porem eu vi vídeos no youtube ensinando a compilar, já vi muitos tópicos como compilar a sourcer, ai quando vou compilar da esse erro
      já tentei instalar, desinstala muitas coisas, alterar também não vai, minha sourcer e essa 
      https://github.com/otland/forgottenserver
       
       
      Alguém poderia me ajuda com esse erro, ou ate compilar 100% as sourcer. os Tópicos que eu tentei para compilar e esse daqui, se não poder o link me desculpe.
      https://forums.otserv.com.br/index.php?/forums/topic/169234-windowsvc2019-compilando-sources-tfs-14-vcpkg/
       
      alguém me da uma luz por favor kkk
    • Por Ryzek
      Uso tfs 0.4 trunk3884 bem simples.
      Queria acrescentar magic effects para 255 pois o meu só vai até 69. Encontrei um tópico que falava sobre porém parece ter sido removido, não consigo acessar!
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo