Ir para conteúdo

Featured Replies

Postado

Bom dia, boa tarde, boa noite...

 

Breve introdução: estou usando a base "Pkmn Dash Revolution" que baixei aqui no fórum (quando rodo o server ele acusa "Poke Dash Revolution, version 1.0.0 (Team Dash Revoltuion)" ) estou testando, procurando pelo máximo de bugs e tentando aprender a corrigi-los.

 

Isto posto, percebi que existem pokémons que não consigo capturar após matar: já vi acontecer, aleatoriamente, com alguns (aquele erro de "you're not the owner") e sei que ao matar um Krabby não consigo usar a pokebola no cadáver ele. Alguém tem alguma ideia de por onde posso começar?

 

Muito obrigado,

Theo

 

P.S: Desculpem não postar fotos mas se o fizesse seria meio inútil...

  • Respostas 11
  • Visualizações 934
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor

Esse é o meu catch.lua... é mesmo a ele que você se refere?

 

Spoiler

local description = "Contains a %pokename."

local genderFixo = {

    ["Nidoran Male"] = {gender = 4},
    
    ["Nidoran Female"] = {gender = 3},
    
    ["Dragonite"] = {gender = 0},
    
    ["Magneton"] = {gender = 0},

}

function onUse(cid, item, frompos, item2, topos)

    if not getTopCorpse(topos) then
    
        return true
    end
    
local name = getItemNameById(item2.itemid)
local pokeball = pokeballCatch[item.itemid]
local rate = pokeball.rate
local catch = pokeball.catch
local fail = pokeball.fail
local newid = pokeball.ball

local corpse = getTopCorpse(topos).uid
local statusgender = getItemAttribute(corpse, "gender")
local statuslevel = getItemAttribute(corpse, "level")

    for i,x in pairs(pokesCatch) do
        if getItemNameById(item2.itemid):find(i:lower()) then
            if getItemIdByName(name) == pokesCatch.corpse then
                if cid ~= getItemAttribute(item2.uid, "corpseowner") and isInArray({1,8}, getPlayerGroupId(cid)) then
                    doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.")
                return true
                end
                
                if getPlayerStorageValue(cid, SAFFARI_CONFIG.Storages) >= 1 and item.itemid ~= SAFFARI_CONFIG.AddPokeballs[1]then
        
                    return true
                end
        
                
                doRemoveItem(item2.uid, 1)
                
                local pegar = math.random(1, x.chance)
                if pegar <= 1*(rate) then
                    doSendMagicEffect(topos, catch)

                    local nas = {
                    ["%%pokename"] = i
                    }
                    
                    for i,x in pairs(nas) do
                        if description:find(i) then
                            description = description:gsub(i, x)
                        end
                    end

                    local function capturou(params)
                        if not isCreature(params.cid) then
                        return true
                        end
                        
                        if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then
                            doPlayerAddSoul(cid, 1)
                            setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ")
                        end
                        
                        local ballName = getItemNameById(item.itemid)
                        
                        if genderFixo[doCorrectPokemonName(params.nome)] == doCorrectPokemonName(params.nome) then
                
                            statusgender = genderFixo[doCorrectPokemonName(params.nome)].gender
                
                        end
                        
                        icon_on  = false
                        if icons[doCorrectPokemonName(i)] then
                            newid = icons[doCorrectPokemonName(i)].on
                            icon_on  = true
                        else
                            newid = newid
                            icon_on  = false
                        end
                        
                        if #getPlayerPokeballs(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
                            item = doCreateItemEx(newid-1)
                        else
                            item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, newid, 1)
                        end
                        
                        setPokeballInfo(item, i)
                        doItemSetAttribute(item, "gender", statusgender)
                        doItemSetAttribute(item, "level", statuslevel)
                        doItemSetAttribute(item, "happy", 250)
                        doItemSetAttribute(item, "php", 1)
                        doItemSetAttribute(item, "ball", ballName)
                        print(ballName)
                        
                        if (icon_on == true) then
                            doItemSetAttribute(item, "iconsystem", "on")
                        else
                            doItemSetAttribute(item, "iconsystem", "off")
                        end
                        
                        if #getPlayerPokeballs(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
                            doPlayerSendMailByName(getCreatureName(params.cid), item, 1)
                            doPlayerSendTextMessage(cid, 27, "Congratulations, you won a "..i.." ("..GenderTable[statusgender]..") !")
                            doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")
                        else
                            doPlayerSendTextMessage(cid, 27, "Congratulations, you won a "..i.." ("..GenderTable[statusgender]..") !")
                        end
                        
                        doUpdatePokemons(cid)
                        
                        if #getCreatureSummons(cid) >= 1 then
                            doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178)
                        else
                            doSendMagicEffect(getThingPos(cid), 178)
                        end
                    end

                    local description = "Contains a "..i.."."
                    addEvent(capturou, 4000, {cid = cid, poke = i, nome = i, description = description, ball = newid, letter = 2597})
                else
                
                    function ruim(params)
                        if not isCreature(params.cid) then
                        return true
                        end
                        
                        doPlayerSendTextMessage(params.cid, 27, "Sorry, you didn\'t catch that pokemon.")
                        
                        if #getCreatureSummons(params.cid) >= 1 then
                            doSendMagicEffect(getThingPos(getCreatureSummons(params.cid)[1]), 166)
                        else
                            doSendMagicEffect(getThingPos(params.cid), 166)
                        end
                    end
                    
                    addEvent(ruim, 4000, {cid = cid})
                    doSendMagicEffect(topos, fail)
                end
                
                if getPlayerStorageValue(cid, SAFFARI_CONFIG.Storages) >= 1 and getPlayerItemCount(cid, SAFFARI_CONFIG.AddPokeballs[1]) == 1 then
        
                    if #getCreatureSummons(cid) >= 1 then
            
                        local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET)
            
                        doTransformItem(feet.uid, pokeballs[doCorrectPokemonName(i)].on)
            
                    end
        
                    addEvent(saffariBallsEnd, 4007, cid, SAFFARI_CONFIG.Storages, SAFFARI_CONFIG.Saffari_Pos.Exit)
            
                end
                
                doRemoveItem(item.uid, 1)
                
            end
        end
    end
return TRUE
end

 

Lendo o que está aí, não me parece que estamos falando do mesmo arquivo... 

 

Quando dou look no corpinho aparece isso: "11:04 You see a defeated krabby. It is male."

mas ao usar a pokebola nada acontece, não me retorna nem mensagem, sabe?

 

Valeu a força

Postado
  • Autor

Socorro, agora a situação evoluiu... não consigo mais usar a pokebola em nenhum cadáver... Não aparece mensagem nenhuma, na hora que clico com a mira simplesmente nada acontece (mas também não desconta a pokebola da minha mochila)

Postado
Em 11/02/2019 em 14:16, Theoo disse:

Socorro, agora a situação evoluiu... não consigo mais usar a pokebola em nenhum cadáver... Não aparece mensagem nenhuma, na hora que clico com a mira simplesmente nada acontece (mas também não desconta a pokebola da minha mochila)

 

Pega os Pokemon que não dá para captura e registra ele no xml e depois vai em configuration.lua e verifica se o corpo do Pokemon também está lá pode ser isso

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo