Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
  • Autor
1 hora atrás, Adriano SwaTT disse:
  Mostrar conteúdo oculto


--[[
    Protect Locker System
    Author: MaXwEllDeN
    Version: 1.0
]]
function doFindItemInPos(ids,pos) -- By Undead Slayer
    local results = {}

    for _ = 0, 255 do
       local findPos = {x = pos.x, y = pos.y, z = pos.z, stackpos = _}
       if isInArray(ids, getThingFromPos(findPos).itemid) then
          table.insert(results, getThingfromPos(findPos))
       end
    end

    return results
    end

    function isItemInRange(cp, range, ids)
    local extr1 = {x = cp.x - range, y = cp.y -range, z = cp.z}
    local extr2 = {x = cp.x + range, y = cp.y + range, z = cp.z}
    for i = 1, (extr2.y-extr1.y)+1 do
        for s = 1, (extr2.x-extr1.x)+1 do
            local f = {x=extr1.x+s-1, y=extr1.y+i-1, z=extr1.z, stackpos=0}
            local posz = doFindItemInPos(ids, f)
            if (#posz > 0) then
               return true
            end
        end
     end
    return false
    end

    function onSay(cid, words, param)
    
    local help = "Max Locker Protect System ~~\n\n* Criando uma senha: \nPara criar uma senha digite: ".. words .." pass, senha. Substituindo senha pela senha que você quer criar!\n\n*Modificando uma senha: ".. words .." passchange senhaantiga, nova. Substituindo senhaantiga pela sua senha antiga e nova pela sua nova senha.\n\n*Removendo sua senha \n Para remover sua senha digite: ".. words .. " remove, senha(substituindo senha pela sua senha atual)."
    
    local param2 = string.explode(param, ",")
    if not(isItemInRange(getThingPos(cid), 1, {2589, 2590, 2591, 2592})) then
      return doPlayerSendCancel(cid, "Você deve estar perto de um locker para poder usar o sistema.")
    end
    if not(param2[1]) then
    elseif (param2[1] == "pass") then -- CRIANDO SENHA
      if (getPlayerStorageValue(cid, 96474) ~= -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você já estabeleceu uma senha para seu locker!")
      end
      if not(param2[1]) then
         return doShowTextDialog(cid, 2591, help)
      end
      setPlayerStorageValue(cid, 96474, tostring(param2[2]))
      return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha é: ".. tostring(param2[2]))

    elseif (param2[1]:lower() == tostring(getPlayerStorageValue(cid, 96474))) then
      local tile = getThingPos(cid)
      tile.stackpos = 0
      local tile = getThingFromPos(tile)
      doItemSetAttribute(tile.uid, "aid", 96475)
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Seu locker está aberto.")
      return setPlayerStorageValue(cid, 96475, param)
      
      
    elseif (param2[1]:lower() == "passchange") then -- MUDANDO SUA SENHA
      if not (param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (tostring(param2[2]) ~= tostring(getPlayerStorageValue(cid, 96474))) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi alterada de ".. getPlayerStorageValue(cid, 96474) .." para ".. param2[3] ..".")
      return setPlayerStorageValue(cid, 96474, tostring(param2[3]))


    elseif (param2[1]:lower() == "remove") then -- REMOVENDO SUA SENHA
      if (getPlayerStorageValue(cid, 96474) == -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você não tem senha para remover!")
      end
      if not (param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (param2[2] ~= getPlayerStorageValue(cid, 96474)) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi removida!")
      return setPlayerStorageValue(cid, 96474, -1)
    end

return doShowTextDialog(cid, 2591, help)
end

 

 

 

Teste assim

Tou usando de boa *-* só mais uma coisa... kk tem como por para não aceitar senha com letra maiúscula e números? (Utilize apenas letras minusculas)  

                                                                             1535210279_tumblr_o9b6yoxM1Z1tco8kto1_500(3).gif.f527686e19da738322c39555244decac.gif

                                                             Meus tópicos         

                                                         Se ajudei você deixe seu Rep! para fortalecer a amizade ^^

                                                                              Vamos ajudar o fórum a crescer mais.

                                                                          1641206641_gif-escudo-fla-3d(1).gif.a5d3c0c24824d5272a181aa91c5eda0c.gif

                                                                                                Mengão porra! . .

                                                                     tumblr_oxm8eriUeU1sqwgnro2_400.gif.22e347b2fc58fdfd88dbf84f4bdaa1bc.gif

                                                                                ----- NPC que vende informação -----

                                                                           -----Baú Que dá Outfit se tiver Level -----

                                                                     ----- [Npc] Que vende Stones (itens) por diamonds -----

 

 

                                                                       

                       

  • Respostas 12
  • Visualizações 680
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Adriano SwaTT
    Adriano SwaTT

    Então, vou dar uma olhada nas funções LUA.. porque até agora sempre usei para tornar frases maiusculas e/ou minusculas e tals.. Tem que ver quais funções a distro nos libera para criar.  

Postado
Spoiler


--[[
    Protect Locker System
    Author: MaXwEllDeN
    Version: 1.0
]]
function doFindItemInPos(ids,pos) -- By Undead Slayer
    local results = {}

    for _ = 0, 255 do
       local findPos = {x = pos.x, y = pos.y, z = pos.z, stackpos = _}
       if isInArray(ids, getThingFromPos(findPos).itemid) then
          table.insert(results, getThingfromPos(findPos))
       end
    end

    return results
    end

    function isItemInRange(cp, range, ids)
    local extr1 = {x = cp.x - range, y = cp.y -range, z = cp.z}
    local extr2 = {x = cp.x + range, y = cp.y + range, z = cp.z}
    for i = 1, (extr2.y-extr1.y)+1 do
        for s = 1, (extr2.x-extr1.x)+1 do
            local f = {x=extr1.x+s-1, y=extr1.y+i-1, z=extr1.z, stackpos=0}
            local posz = doFindItemInPos(ids, f)
            if (#posz > 0) then
               return true
            end
        end
     end
    return false
    end

    function onSay(cid, words, param)
    
    local help = "Max Locker Protect System ~~\n\n* Criando uma senha: \nPara criar uma senha digite: ".. words .." pass, senha. Substituindo senha pela senha que você quer criar!\n\n*Modificando uma senha: ".. words .." passchange senhaantiga, nova. Substituindo senhaantiga pela sua senha antiga e nova pela sua nova senha.\n\n*Removendo sua senha \n Para remover sua senha digite: ".. words .. " remove, senha(substituindo senha pela sua senha atual)."
    
    local param2 = string.explode(param, ",")
    if not(isItemInRange(getThingPos(cid), 1, {2589, 2590, 2591, 2592})) then
      return doPlayerSendCancel(cid, "Você deve estar perto de um locker para poder usar o sistema.")
    end
    if not(param2[1]) then
    elseif (param2[1] == "pass") then -- CRIANDO SENHA
      if (getPlayerStorageValue(cid, 96474) ~= -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você já estabeleceu uma senha para seu locker!")
      end
      if not(param2[1]) then
         return doShowTextDialog(cid, 2591, help)
      end
      setPlayerStorageValue(cid, 96474, tostring(param2[2]:upper()))
      return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha é: ".. tostring(param2[2]))

    elseif (param2[1]:upper() == tostring(getPlayerStorageValue(cid, 96474))) then
      local tile = getThingPos(cid)
      tile.stackpos = 0
      local tile = getThingFromPos(tile)
      doItemSetAttribute(tile.uid, "aid", 96475)
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Seu locker está aberto.")
      return setPlayerStorageValue(cid, 96475, param)
      
      
    elseif (param2[1]:lower() == "passchange") then -- MUDANDO SUA SENHA
      if not (param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if isNumber(param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (tostring(param2[2]:upper()) ~= tostring(getPlayerStorageValue(cid, 96474))) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi alterada de ".. getPlayerStorageValue(cid, 96474) .." para ".. param2[3] ..".")
      return setPlayerStorageValue(cid, 96474, tostring(param2[3]:upper()))


    elseif (param2[1]:lower() == "remove") then -- REMOVENDO SUA SENHA
      if (getPlayerStorageValue(cid, 96474) == -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você não tem senha para remover!")
      end
      if not (param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (param2[2] ~= getPlayerStorageValue(cid, 96474)) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi removida!")
      return setPlayerStorageValue(cid, 96474, -1)
    end

return doShowTextDialog(cid, 2591, help)
end

 

Teste.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Postado
  • Autor
1 hora atrás, Adriano SwaTT disse:
  Mostrar conteúdo oculto


--[[
    Protect Locker System
    Author: MaXwEllDeN
    Version: 1.0
]]
function doFindItemInPos(ids,pos) -- By Undead Slayer
    local results = {}

    for _ = 0, 255 do
       local findPos = {x = pos.x, y = pos.y, z = pos.z, stackpos = _}
       if isInArray(ids, getThingFromPos(findPos).itemid) then
          table.insert(results, getThingfromPos(findPos))
       end
    end

    return results
    end

    function isItemInRange(cp, range, ids)
    local extr1 = {x = cp.x - range, y = cp.y -range, z = cp.z}
    local extr2 = {x = cp.x + range, y = cp.y + range, z = cp.z}
    for i = 1, (extr2.y-extr1.y)+1 do
        for s = 1, (extr2.x-extr1.x)+1 do
            local f = {x=extr1.x+s-1, y=extr1.y+i-1, z=extr1.z, stackpos=0}
            local posz = doFindItemInPos(ids, f)
            if (#posz > 0) then
               return true
            end
        end
     end
    return false
    end

    function onSay(cid, words, param)
    
    local help = "Max Locker Protect System ~~\n\n* Criando uma senha: \nPara criar uma senha digite: ".. words .." pass, senha. Substituindo senha pela senha que você quer criar!\n\n*Modificando uma senha: ".. words .." passchange senhaantiga, nova. Substituindo senhaantiga pela sua senha antiga e nova pela sua nova senha.\n\n*Removendo sua senha \n Para remover sua senha digite: ".. words .. " remove, senha(substituindo senha pela sua senha atual)."
    
    local param2 = string.explode(param, ",")
    if not(isItemInRange(getThingPos(cid), 1, {2589, 2590, 2591, 2592})) then
      return doPlayerSendCancel(cid, "Você deve estar perto de um locker para poder usar o sistema.")
    end
    if not(param2[1]) then
    elseif (param2[1] == "pass") then -- CRIANDO SENHA
      if (getPlayerStorageValue(cid, 96474) ~= -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você já estabeleceu uma senha para seu locker!")
      end
      if not(param2[1]) then
         return doShowTextDialog(cid, 2591, help)
      end
      setPlayerStorageValue(cid, 96474, tostring(param2[2]:upper()))
      return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha é: ".. tostring(param2[2]))

    elseif (param2[1]:upper() == tostring(getPlayerStorageValue(cid, 96474))) then
      local tile = getThingPos(cid)
      tile.stackpos = 0
      local tile = getThingFromPos(tile)
      doItemSetAttribute(tile.uid, "aid", 96475)
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Seu locker está aberto.")
      return setPlayerStorageValue(cid, 96475, param)
      
      
    elseif (param2[1]:lower() == "passchange") then -- MUDANDO SUA SENHA
      if not (param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if isNumber(param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (tostring(param2[2]:upper()) ~= tostring(getPlayerStorageValue(cid, 96474))) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi alterada de ".. getPlayerStorageValue(cid, 96474) .." para ".. param2[3] ..".")
      return setPlayerStorageValue(cid, 96474, tostring(param2[3]:upper()))


    elseif (param2[1]:lower() == "remove") then -- REMOVENDO SUA SENHA
      if (getPlayerStorageValue(cid, 96474) == -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você não tem senha para remover!")
      end
      if not (param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (param2[2] ~= getPlayerStorageValue(cid, 96474)) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi removida!")
      return setPlayerStorageValue(cid, 96474, -1)
    end

return doShowTextDialog(cid, 2591, help)
end

 

Teste.

Amigo ta tenso kk veja 

Spoiler

Usando letra Maiuscula:

13:44 Sua senha é: Ayron --- cria normal
13:44 Seu locker está aberto.--- diz que está aberto mas não abre o DP, mas se eu colocar AYRON ele abre .-. 
13:47 Digite a sua senha atual corretamente! --- ao tentar remover ela(não remove) se eu colocar pr remover AYRON ele remove .-. 

Usando numeros: 

13:49 Sua senha é: 123 --- cria normal
13:49 Seu locker está aberto.--- abre o Dp
13:50 Digite a sua senha atual corretamente! --- ao tentar remover ela(não remove)

E ainda da pr criar senha mista tipo: ayron2, Ayron2 kk 

 

Caso a senha mista criando ela ayron123 quando vai abrir o DP ele diz que está aberto mas não abre... se eu colocar AYRON123 ele abre .-.  pequenos conflitos eu acho. 

Dá pr simplificar? e colocar para criar senhas apenas com letras minusculas? se tentar com letra maiuscula cancela, com numeros cancela, mista cancela ^^ 

Estou incomodando muito, Não tenha pressa kk 

                                                                             1535210279_tumblr_o9b6yoxM1Z1tco8kto1_500(3).gif.f527686e19da738322c39555244decac.gif

                                                             Meus tópicos         

                                                         Se ajudei você deixe seu Rep! para fortalecer a amizade ^^

                                                                              Vamos ajudar o fórum a crescer mais.

                                                                          1641206641_gif-escudo-fla-3d(1).gif.a5d3c0c24824d5272a181aa91c5eda0c.gif

                                                                                                Mengão porra! . .

                                                                     tumblr_oxm8eriUeU1sqwgnro2_400.gif.22e347b2fc58fdfd88dbf84f4bdaa1bc.gif

                                                                                ----- NPC que vende informação -----

                                                                           -----Baú Que dá Outfit se tiver Level -----

                                                                     ----- [Npc] Que vende Stones (itens) por diamonds -----

 

 

                                                                       

                       

Postado

Então, vou dar uma olhada nas funções LUA.. porque até agora sempre usei para tornar frases maiusculas e/ou minusculas e tals..

Tem que ver quais funções a distro nos libera para criar.

 

Sobre criar com número.

 

Mas teste:

Spoiler


--[[
    Protect Locker System
    Author: MaXwEllDeN
    Version: 1.0
]]
function doFindItemInPos(ids,pos) -- By Undead Slayer
    local results = {}

    for _ = 0, 255 do
       local findPos = {x = pos.x, y = pos.y, z = pos.z, stackpos = _}
       if isInArray(ids, getThingFromPos(findPos).itemid) then
          table.insert(results, getThingfromPos(findPos))
       end
    end

    return results
    end

    function isItemInRange(cp, range, ids)
    local extr1 = {x = cp.x - range, y = cp.y -range, z = cp.z}
    local extr2 = {x = cp.x + range, y = cp.y + range, z = cp.z}
    for i = 1, (extr2.y-extr1.y)+1 do
        for s = 1, (extr2.x-extr1.x)+1 do
            local f = {x=extr1.x+s-1, y=extr1.y+i-1, z=extr1.z, stackpos=0}
            local posz = doFindItemInPos(ids, f)
            if (#posz > 0) then
               return true
            end
        end
     end
    return false
    end

    function onSay(cid, words, param)
    
    local help = "Max Locker Protect System ~~\n\n* Criando uma senha: \nPara criar uma senha digite: ".. words .." pass, senha. Substituindo senha pela senha que você quer criar!\n\n*Modificando uma senha: ".. words .." passchange senhaantiga, nova. Substituindo senhaantiga pela sua senha antiga e nova pela sua nova senha.\n\n*Removendo sua senha \n Para remover sua senha digite: ".. words .. " remove, senha(substituindo senha pela sua senha atual)."
    
    local param2 = string.explode(param, ",")
    if not(isItemInRange(getThingPos(cid), 1, {2589, 2590, 2591, 2592})) then
      return doPlayerSendCancel(cid, "Você deve estar perto de um locker para poder usar o sistema.")
    end
    if not(param2[1]) then
    elseif (param2[1] == "pass") then -- CRIANDO SENHA
      if (getPlayerStorageValue(cid, 96474) ~= -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você já estabeleceu uma senha para seu locker!")
      end
      if not(param2[1]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if isNumber(param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      setPlayerStorageValue(cid, 96474, tostring(param2[2]:upper()))
      return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha é: ".. tostring(param2[2]:upper()))

    elseif (param2[1]:upper() == tostring(getPlayerStorageValue(cid, 96474):upper())) then -- ACESSANDO LOCKER
      local tile = getThingPos(cid)
      tile.stackpos = 0
      local tile = getThingFromPos(tile)
      doItemSetAttribute(tile.uid, "aid", 96475)
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Seu locker está aberto.")
      return setPlayerStorageValue(cid, 96475, param)
      
      
    elseif (param2[1]:lower() == "passchange") then -- MUDANDO SUA SENHA
      if not (param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if isNumber(param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (tostring(param2[2]:upper()) ~= tostring(getPlayerStorageValue(cid, 96474))) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi alterada de ".. getPlayerStorageValue(cid, 96474) .." para ".. param2[3] ..".")
      return setPlayerStorageValue(cid, 96474, tostring(param2[3]:upper()))


    elseif (param2[1]:lower() == "remove") then -- REMOVENDO SUA SENHA
      if (getPlayerStorageValue(cid, 96474) == -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você não tem senha para remover!")
      end
      if not (param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (param2[2] ~= getPlayerStorageValue(cid, 96474)) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi removida!")
      return setPlayerStorageValue(cid, 96474, -1)
    end

return doShowTextDialog(cid, 2591, help)
end

 

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Postado
  • Autor
22 horas atrás, Adriano SwaTT disse:

Então, vou dar uma olhada nas funções LUA.. porque até agora sempre usei para tornar frases maiusculas e/ou minusculas e tals..

Tem que ver quais funções a distro nos libera para criar.

 

Sobre criar com número.

 

Mas teste:

  Mostrar conteúdo oculto


--[[
    Protect Locker System
    Author: MaXwEllDeN
    Version: 1.0
]]
function doFindItemInPos(ids,pos) -- By Undead Slayer
    local results = {}

    for _ = 0, 255 do
       local findPos = {x = pos.x, y = pos.y, z = pos.z, stackpos = _}
       if isInArray(ids, getThingFromPos(findPos).itemid) then
          table.insert(results, getThingfromPos(findPos))
       end
    end

    return results
    end

    function isItemInRange(cp, range, ids)
    local extr1 = {x = cp.x - range, y = cp.y -range, z = cp.z}
    local extr2 = {x = cp.x + range, y = cp.y + range, z = cp.z}
    for i = 1, (extr2.y-extr1.y)+1 do
        for s = 1, (extr2.x-extr1.x)+1 do
            local f = {x=extr1.x+s-1, y=extr1.y+i-1, z=extr1.z, stackpos=0}
            local posz = doFindItemInPos(ids, f)
            if (#posz > 0) then
               return true
            end
        end
     end
    return false
    end

    function onSay(cid, words, param)
    
    local help = "Max Locker Protect System ~~\n\n* Criando uma senha: \nPara criar uma senha digite: ".. words .." pass, senha. Substituindo senha pela senha que você quer criar!\n\n*Modificando uma senha: ".. words .." passchange senhaantiga, nova. Substituindo senhaantiga pela sua senha antiga e nova pela sua nova senha.\n\n*Removendo sua senha \n Para remover sua senha digite: ".. words .. " remove, senha(substituindo senha pela sua senha atual)."
    
    local param2 = string.explode(param, ",")
    if not(isItemInRange(getThingPos(cid), 1, {2589, 2590, 2591, 2592})) then
      return doPlayerSendCancel(cid, "Você deve estar perto de um locker para poder usar o sistema.")
    end
    if not(param2[1]) then
    elseif (param2[1] == "pass") then -- CRIANDO SENHA
      if (getPlayerStorageValue(cid, 96474) ~= -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você já estabeleceu uma senha para seu locker!")
      end
      if not(param2[1]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if isNumber(param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      setPlayerStorageValue(cid, 96474, tostring(param2[2]:upper()))
      return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha é: ".. tostring(param2[2]:upper()))

    elseif (param2[1]:upper() == tostring(getPlayerStorageValue(cid, 96474):upper())) then -- ACESSANDO LOCKER
      local tile = getThingPos(cid)
      tile.stackpos = 0
      local tile = getThingFromPos(tile)
      doItemSetAttribute(tile.uid, "aid", 96475)
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Seu locker está aberto.")
      return setPlayerStorageValue(cid, 96475, param)
      
      
    elseif (param2[1]:lower() == "passchange") then -- MUDANDO SUA SENHA
      if not (param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if isNumber(param2[3]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (tostring(param2[2]:upper()) ~= tostring(getPlayerStorageValue(cid, 96474))) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi alterada de ".. getPlayerStorageValue(cid, 96474) .." para ".. param2[3] ..".")
      return setPlayerStorageValue(cid, 96474, tostring(param2[3]:upper()))


    elseif (param2[1]:lower() == "remove") then -- REMOVENDO SUA SENHA
      if (getPlayerStorageValue(cid, 96474) == -1) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você não tem senha para remover!")
      end
      if not (param2[2]) then
         return doShowTextDialog(cid, 2591, help)
      end
      if (getPlayerStorageValue(cid, 96474) ~= -1) and (param2[2] ~= getPlayerStorageValue(cid, 96474)) then
         return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Digite a sua senha atual corretamente!")
      end
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua senha foi removida!")
      return setPlayerStorageValue(cid, 96474, -1)
    end

return doShowTextDialog(cid, 2591, help)
end

 

Então brother, tá pegando legal aqui ^^ Obg pela ajuda.

Sobre o sistema de recuperação de senha, tem algo em mente? ou seria impossível nesse caso? 

 

                                                                             1535210279_tumblr_o9b6yoxM1Z1tco8kto1_500(3).gif.f527686e19da738322c39555244decac.gif

                                                             Meus tópicos         

                                                         Se ajudei você deixe seu Rep! para fortalecer a amizade ^^

                                                                              Vamos ajudar o fórum a crescer mais.

                                                                          1641206641_gif-escudo-fla-3d(1).gif.a5d3c0c24824d5272a181aa91c5eda0c.gif

                                                                                                Mengão porra! . .

                                                                     tumblr_oxm8eriUeU1sqwgnro2_400.gif.22e347b2fc58fdfd88dbf84f4bdaa1bc.gif

                                                                                ----- NPC que vende informação -----

                                                                           -----Baú Que dá Outfit se tiver Level -----

                                                                     ----- [Npc] Que vende Stones (itens) por diamonds -----

 

 

                                                                       

                       

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo