Ir para conteúdo

Featured Replies

Postado

@Edit

Cara, n deu erro, porem n aconteçeu nada que tem no Script

e agr?

Bota assim:

            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

Editado por NoturnoBRN (veja o histórico de edições)

  • 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

Bota assim:

            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

Cara eu substitui isso ai por isso aki:

     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)         end

 

e deu esse erro no console:

 

[19/12/2014 09:44:51] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>'
[19/12/2014 09:44:51] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[19/12/2014 09:44:53] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>'
[19/12/2014 09:44:53] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[19/12/2014 09:44:53] [Error - LuaScriptInterface::loadFile] cannot open data/movements/scripts/pisolevel.lua: No such file or directory
[19/12/2014 09:44:53] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/pisolevel.lua)
[19/12/2014 09:44:53] cannot open data/movements/scripts/pisolevel.lua: No such file or directory
[19/12/2014 09:44:54] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>'
[19/12/2014 09:44:54] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[19/12/2014 09:44:55] [Error - LuaScriptInterface::loadFile] data/lib/CatchWindow_lib.lua:71: 'end' expected (to close 'function' at line 42) near '<eof>'[19/12/2014 09:44:55] [Warning - LuaScriptInterface::initState] Cannot load data/lib/ 

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%

 

Postado
  • Autor

Altera o arquivo "CatchWindow_lib.lua" por este aqui.

 

-- 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)
        end
        
        doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@0@"..getPlayerStorageValue(cid, pk.DB_Balls))
        setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")
    end
    return true
end

Editado por Orochi Elf (veja o histórico de edições)

Tony Araújo  ;D 

 

Postado

 

Altera o arquivo "CatchWindow_lib.lua" por este aqui.

 

-- 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)

        end

        

        doPlayerSendCancel(cid, "%#CatcherWindow@"..getItemInfo(pk.ID_Portrait).clientId.."@"..pokeName.."@0@"..getPlayerStorageValue(cid, pk.DB_Balls))

        setPlayerStorageValue(cid, pk.DB_Balls, "pb=0,gb=0,sb=0,ub=0,")

    end

    return true

end

 

Cara eu substitui mas não nada.... nem erro e nem um sinal que tem o script

 

Por Favor, me ajude até conseguir, please

Editado por TsplayerT (veja o histórico de edições)

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%

 

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


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