Ir para conteúdo

Featured Replies

  • Respostas 7
  • Visualizações 349
  • Created
  • Última resposta

Top Posters In This Topic

Postado
  • Autor
10 minutos atrás, Noob II disse:

 

Vou pedir pra ele editar e adicionar tudo certo ^^

Quando Reloga com o pokemon solto ta bugando e o poke buga e não sai mais da ball sabe um solução?

Postado
21 minutos atrás, Gustavo Ntos disse:

Quando Reloga com o pokemon solto ta bugando e o poke buga e não sai mais da ball sabe um solução?

 

Troca por esse e ver se está acontecendo o bug ainda:

 


function onLogout(cid)
    
    if #getCreatureSummons(cid) == 1 then
        if getPlayerStorageValue(cid, 61204) >= 1 and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 62314) <= 0 then
            local owner = getCreatureMaster(cid)
            local pokeballinfo = getPokeballInfo(getPlayerSlotItem(owner, 8).uid)
            local summom = getCreatureSummons(cid)
            local maxh = (pokes[pokeballinfo.name].vida)
            local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1])))
            local vids = ((getCreatureHealth(summom[1])) - 2)
            doCreatureAddHealth(summom[1], -vids)
            setCreatureMaxHealth(summom[1], maxh)
            doCreatureAddHealth(summom[1], ((maxh) * (pct2)))
            
            local health = getCreatureHealth(summom[1])
            local maxhealth = getCreatureMaxHealth(summom[1])
            setPlayerStorageValue(cid, 61205, health)
            setPlayerStorageValue(cid, 61206, maxhealth)
            setPlayerStorageValue(cid, 61204, 0)
            setPlayerStorageValue(cid, 61207, 1)
            setPlayerStorageValue(cid, 1, 0)
            if getPlayerGroupId(cid) == 8 then
                setPlayerGroupId(cid, 1)
            end
        end
    end
    return TRUE
end

function onLogin(cid)
    local pokes = {
        ["Dragon"] = {lookType=267, speed = 1500},
        ["Rat"] = {lookType=267, speed = 500},
    }
    
    local pokesfly = {
        ["Dragon"] = {lookType = 216, speed = 500},
    }
    
    local pokesride = {
        ["Dragon Lord"] = {lookType=4, speed = 3000},
        ["Dragon"] = {lookType=4, speed = 500},
    }
    
    if getPlayerStorageValue(cid, 62314) >= 1 then
        doCreateTile(460, {x=getPlayerStorageValue(cid, 61941), y=getPlayerStorageValue(cid, 61942), z=getPlayerStorageValue(cid, 61943)})
        doTeleportThing(cid, {x=getPlayerStorageValue(cid, 61941), y=getPlayerStorageValue(cid, 61942), z=getPlayerStorageValue(cid, 61943)}) 
        for i = 1,8 do
            doItem(getPosDirs(getCreaturePosition(cid), i), 65119+i)
        end
        local item = getPokeOutLive(cid)[1]
        local a = getItemAttribute(item, "poke"):match("This is (.-)'s pokeball.")
        doSetCreatureOutfit(cid, pokesfly[tostring(a)], -1)
        doChangeSpeed(cid, pokesfly[tostring(a)].speed)
        registerCreatureEvent(cid, "PlayerPokeDeath") 
    end
    
    if getPlayerStorageValue(cid, 63215) >= 1 then
        local item = getPokeOutLive(cid)[1]
        local a = getItemAttribute(item, "poke"):match("This is (.-)'s pokeball.")
        doSetCreatureOutfit(cid, pokes[tostring(a)], -1)
        doChangeSpeed(cid, pokes[tostring(a)].speed)
        registerCreatureEvent(cid, "PlayerPokeDeath")
    end
    
    if getPlayerStorageValue(cid, 59987) >= 1 then
        local item = getPokeOutLive(cid)[1]
        local a = getItemAttribute(item, "poke"):match("This is (.-)'s pokeball.")
        doSetCreatureOutfit(cid, pokesride[tostring(a)], -1)
        doChangeSpeed(cid, pokesride[tostring(a)].speed)
        registerCreatureEvent(cid, "PlayerPokeDeath")
    end
    
    if getPlayerStorageValue(cid, 61207) >= 1 then
        local item = getPokeOutLive(cid)[1]
        doTransformItem(item, pokein)
        doRemoveCondition(cid, CONDITION_OUTFIT)
        doItemSetAttribute(item, "poke", getItemAttribute(item, "poke"):sub(#getItemAttribute(item, "poke")) ~= "]" and getItemAttribute(item, "poke") .. " HP = ["..getPlayerStorageValue(cid, 61205).."/"..getPlayerStorageValue(cid, 61206).."]" or getItemAttribute(item, "poke"))
        setPlayerStorageValue(cid, 61207, 0)
    end
    
    return TRUE
end

function onDeath(cid, deathList)
    local owner = getCreatureMaster(cid)
    doPlayerSendTextMessage(owner, 22, "Your pokemon died.")
    
    for slot = CONST_SLOT_FIRST, CONST_SLOT_LAST do
        local item = getPlayerSlotItem(owner, slot)
        if isContainer(item.uid) then
            local items = getItemsInContainerById(item.uid, pokeout)
            for _, ui in pairs(items) do
                if getItemAttribute(ui, "poke"):sub(#getItemAttribute(ui, "poke")) == "." then
                    local maxh = tonumber(getItemAttribute(ui, "poke"):match("/(.+)]"))
                    doItemSetAttribute(ui, "poke", getItemAttribute(ui, "poke"):sub(1, findLetter(getItemAttribute(ui, "poke"), ".")) .. " HP = [0/"..getCreatureMaxHealth(cid).."]")
                end
            end
        end
        
        if item.itemid == pokeout then
            if getItemAttribute(item.uid, "poke"):sub(#getItemAttribute(item.uid, "poke")) == "." then
                local maxh = tonumber(getItemAttribute(item.uid, "poke"):match("/(.+)]"))
                doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = [0/"..getCreatureMaxHealth(cid).."]")
            end
        end
    end
    doRemoveCreature(cid)
    setPlayerStorageValue(owner, 61207, 0)
    setPlayerStorageValue(owner, 61204, 0)
    return FALSE
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