Ir para conteúdo

Featured Replies

Postado
  • Autor

Substitui tudo em CatchWindow_lib.lua

Por esse:



    -- V1.3 ->Developed by: Tony Araújo (OrochiElf) ~~ www.OTCodes.com ~~
     
    CW_Pokes = {
            ["bulbasaur"] = {DB_Balls = 500001, DB_PK = 900001, ID_Portrait = 11989, P_Experience = 5000},
            ["ivysaur"] = {DB_Balls = 500002, DB_PK = 900002, ID_Portrait = 11990, P_Experience = 10000},
            ["venusaur"] = {DB_Balls = 500003, DB_PK = 900003, ID_Portrait = 11991, P_Experience = 15000},
    }
     
    CW_Balls = {
            ["normal"] = "pb", -- PokeBall
            ["great"] = "gb", -- GreatBall
            ["super"] = "sb", -- SuperBall
            ["ultra"] = "ub", -- UltraBall
    }
     
    -------- Functions ----------
    function CW_Count(cid, pokeName, ball)
            local name = nil
            if tostring(pokeName) then
     
                    name = pokeName:lower()
            else
     
                    name = getCreatureName(pokeName):lower()
            end
     
            local pk = CW_Pokes[name]
     
            if pk then
                    if tonumber(getPlayerStorageValue(cid, pk.DB_Balls)) then
     
                            setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
                    end
     
                    local txt = getPlayerStorageValue(cid, pk.DB_Balls)
                    local change = txt:match(CW_Balls[ball].."=(.-),")
                    local num = tonumber(change)
     
                    local ret = string.gsub(txt, CW_Balls[ball].."="..num, CW_Balls[ball].."="..(num+1))
                    return setPlayerStorageValue(cid, pk.DB_Balls, ret) and true
            end
    end
     
    function CW_Caught(cid, pokeName)
            local name = nil
            if tostring(pokeName) then
     
                    name = pokeName:lower()
            else
     
                    name = getCreatureName(pokeName):lower()
            end
     
            local pk = CW_Pokes[name]
 
            if pk then
            if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then
            doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls))
            setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
            doPlayerAddExp(cid, pk.P_Experience)
            setPlayerStorageValue(cid, pk.DB_PK, 1)
            else if getPlayerStorageValue(cid, pk.DB_PK) > 0 then
            num = 0 
            doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@" ..num.. "@"..getPlayerStorageValue(cid, pk.DB_Balls))
            setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
            setPlayerStorageValue(cid, pk.DB_PK, 1)
            end
            return true
            end

            end
            return true
    end


Cara, você sabe que não ta editando nada né?, Só adicionou uma variavel que é a mesma coisa que nada.

Tony Araújo  ;D 

 

  • Respostas 163
  • Visualizações 21.4k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Não sei se o Orochi já parou de editar esse mod, eu tive a ideia de colocar gifs no lugar da portrait.. Fui procurar em alguns ots no facebook, e já fizeram esse tipo de sistema, séria bem legal o sup

  • Então beleza, semana que vem, provavelmente na próxima sexta feira eu lanço a versão 1.4 do sistema mega atualizado, irei recriar os códigos com novos conhecimentos. Até lá

  • Tem como me passar o catch.lua do PDA, pra eu poder fazer as modificações?... Não é muita coisa pra fazer, só precisa fazer pequenas atualizações no Catch.lua

Posted Images

Postado

Pelo que eu entendi o usuário TsplayerT, pediu que o script funcionasse não só a primeira vez que o player capturasse o pokémon, mas sim todas vez.

Ai coloquei um else na condição e o num=0 foi pra enviar que ganhou 0 de experiencia. Já que não era a primeira vez que ele capturou o pokémon. E aquele jeito que tu colocou não estava funcionando( pelo menos aqui...).

 

Aproveitando a msg, queria dizer que gostei bastante do teu sistema.

Obrigado por postar!

Postado

Substitui tudo em CatchWindow_lib.lua

Por esse:



    -- V1.3 ->Developed by: Tony Araújo (OrochiElf) ~~ www.OTCodes.com ~~
     
    CW_Pokes = {
            ["bulbasaur"] = {DB_Balls = 500001, DB_PK = 900001, ID_Portrait = 11989, P_Experience = 5000},
            ["ivysaur"] = {DB_Balls = 500002, DB_PK = 900002, ID_Portrait = 11990, P_Experience = 10000},
            ["venusaur"] = {DB_Balls = 500003, DB_PK = 900003, ID_Portrait = 11991, P_Experience = 15000},
    }
     
    CW_Balls = {
            ["normal"] = "pb", -- PokeBall
            ["great"] = "gb", -- GreatBall
            ["super"] = "sb", -- SuperBall
            ["ultra"] = "ub", -- UltraBall
    }
     
    -------- Functions ----------
    function CW_Count(cid, pokeName, ball)
            local name = nil
            if tostring(pokeName) then
     
                    name = pokeName:lower()
            else
     
                    name = getCreatureName(pokeName):lower()
            end
     
            local pk = CW_Pokes[name]
     
            if pk then
                    if tonumber(getPlayerStorageValue(cid, pk.DB_Balls)) then
     
                            setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
                    end
     
                    local txt = getPlayerStorageValue(cid, pk.DB_Balls)
                    local change = txt:match(CW_Balls[ball].."=(.-),")
                    local num = tonumber(change)
     
                    local ret = string.gsub(txt, CW_Balls[ball].."="..num, CW_Balls[ball].."="..(num+1))
                    return setPlayerStorageValue(cid, pk.DB_Balls, ret) and true
            end
    end
     
    function CW_Caught(cid, pokeName)
            local name = nil
            if tostring(pokeName) then
     
                    name = pokeName:lower()
            else
     
                    name = getCreatureName(pokeName):lower()
            end
     
            local pk = CW_Pokes[name]
 
            if pk then
            if getPlayerStorageValue(cid, pk.DB_PK) <= 0 then
            doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@"..pk.P_Experience.."@"..getPlayerStorageValue(cid, pk.DB_Balls))
            setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
            doPlayerAddExp(cid, pk.P_Experience)
            setPlayerStorageValue(cid, pk.DB_PK, 1)
            else if getPlayerStorageValue(cid, pk.DB_PK) > 0 then
            num = 0 
            doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@" ..num.. "@"..getPlayerStorageValue(cid, pk.DB_Balls))
            setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
            setPlayerStorageValue(cid, pk.DB_PK, 1)
            end
            return true
            end

            end
            return true
    end


Nao deu cara, nem aconteçe nada

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

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.7k

Informação Importante

Confirmação de Termo