Ir para conteúdo
  • 0

[Resolvido] ADDON não some ao fazer pokemon forma shiny


Otpokemonmystic

Pergunta

  • Exemplo:  Alakazam coloco o Addon roxo nele ai eu vou evoluir ele para shiny ele fica com a sprite do alakazam com o addon roxo eu queria que sumisse o addon e a sprite ficasse normal do " SHINY ALAKAZAM " seguem os exemplos do problema. 

image.png.59c6462931cbab2872ce44809eafcf21.pngimage.png.c46683f1edd36cfc18db9ba53037bb15.png< Eu queria assim                                                        image.png.ca1d0b723d84387aa37bb4f4670b66d2.png                                                                            

Link para o comentário
Compartilhar em outros sites

9 respostass a esta questão

Posts Recomendados

  • 1

@Otpokemonmystic

 

 local effect = 173

PokemonShinys = 
{
    ["Venusaur"] = {name = "Shiny Venusaur", quant = 7},
    ["Electabuzz"] = {name = "Shiny Electabuzz", quant = 6},
    ["Blastoise"] = {name = "Shiny Blastoise", quant = 7},
    ["Metagross"] = {name = "Shiny Metagross", quant = 10},
    ["Tropius"] = {name = "Shiny Tropius", quant = 10},
    ["Alakazam"] = {name = "Shiny Alakazam", quant = 9},
    ["Togekiss"] = {name = "Shiny Togekiss", quant = 8},
    ["Steelix"] = {name = "Shiny Steelix", quant = 9},
    ["Lapras"] = {name = "Shiny Lapras", quant =7},
    ["Abra"] = {name = "Shiny Abra", quant = 1},
    ["Salamence"] = {name = "Shiny Salamence", quant = 7},
    ["Flygon"] = {name = "Shiny Flygon", quant = 7},
    ["Tangrowth"] = {name = "Shiny Tangrowth", quant = 9},
    ["Snorlax"] = {name = "Shiny Snorlax", quant = 7},
    ["Gengar"] = {name = "Shiny Gengar", quant = 7},
    ["Ninetales"] = {name = "Shiny Ninetales", quant = 6},
    ["Raichu"] = {name = "Shiny Raichu", quant = 4},
    ["Charizard"] = {name = "Elder Charizard", quant = 7},
    ["Butterfree"] = {name = "Shiny Butterfree", quant = 3},
    ["Pidgeot"] = {name = "Shiny Pidgeot", quant = 5},
    ["Rattata"] = {name = "Shiny Rattata", quant = 1},
    ["Raticate"] = {name = "Shiny Raticate", quant = 3},
    ["Fearow"] = {name = "Shiny Fearow", quant = 5},
    ["Zubat"] = {name = "Shiny Zubat", quant = 3},
    ["Golbat"] = {name = "Shiny Golbat", quant = 6},
    ["Onix"] = {name = "Shiny Onix", quant =  7},
    ["Oddish"] = {name = "Shiny Oddish", quant = 1},
    ["Paras"] = {name = "Shiny Paras", quant = 1},
    ["Parasect"] = {name = "Shiny Parasect", quant = 3},
    ["Venonat"] = {name = "Shiny Venonat", quant = 2},
    ["Venomoth"] = {name = "Shiny Venomoth", quant = 6},
    ["Growlithe"] = {name = "Shiny Growlithe", quant = 1},
    ["Arcanine"] = {name = "Shiny Arcanine", quant = 6},
    ["Tentacool"] = {name = "Shiny Tentacool", quant = 1},
    ["Tentacruel"] = {name = "Shiny Tentacruel", quant = 6},
    ["Farfetch'd"] = {name = "Shiny Farfetch'd", quant = 1},
    ["Muk"] = {name = "Shiny Muk", quant = 5},
    ["Kingler"] = {name = "Shiny Kingler", quant = 5},
    ["Voltorb"] = {name = "Shiny Voltorb", quant = 2},
    ["Electrode"] = {name = "Shiny Electrode", quant = 3},
    ["Cubone"] = {name = "Shiny Cubone", quant = 2},
    ["Marowak"] = {name = "Shiny Marowak", quant = 4},
    ["Hitmonlee"] = {name = "Shiny Hitmonlee", quant = 5},
    ["Hitmonchan"] = {name = "Shiny Hitmonchan", quant = 5},
    ["Tangela"] = {name = "Shiny Tangela", quant = 3},
    ["Horsea"] = {name = "Shiny Horsea", quant = 1},
    ["Seadra"] = {name = "Shiny Seadra", quant = 3},
    ["Scyther"] = {name = "Shiny Scyther", quant = 6},
    ["Jynx"] = {name = "Shiny Jynx", quant = 7},
    ["Pinsir"] = {name = "Shiny Pinsir", quant = 4},
    ["Magikarp"] = {name = "Shiny Magikarp", quant = 1},
    ["Gyarados"] = {name = "Shiny Gyarados", quant = 7},
    ["Dratini"] = {name = "Shiny Dratini", 1},
    ["Dragonair"] = {name = "Shiny Dragonair", quant = 5},
    ["Dragonite"] = {name = "Shiny Dragonite", quant = 7},
    ["Blissey"] = {name = "Shiny Blissey", quant = 6},
    ["Miltank"] = {name = "Shiny Miltank", quant = 7},
    ["Sceptile"] = {name = "Shiny Sceptile", quant = 7},
    ["Clefable"] = {name = "Shiny Clefable", quant = 7},
    ["Wigglytuff"] = {name = "Shiny Wigglytuff", quant = 7},
    ["Slaking"] = {name = "Shiny Slaking", quant = 7},
    ["Porygon"] = {name = "Shiny Porygon", quant = 6},
    ["Milotic"] = {name = "Shiny Milotic", quant = 7},
    ["Vileplume"] = {name = "Shiny Vileplume", quant = 7},
    ["Gardevoir"] = {name = "Shiny Gardevoir", quant = 8},
    ["Spiritomb"] = {name = "Shiny Spiritomb", quant = 6},
    }

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if not isCreature(itemEx.uid) and isPokeball(itemEx.itemid) then
        if getPlayerSlotItem(cid, 8).uid == itemEx.uid then
            if #getCreatureSummons(cid) <= 0 then
                pokename = doCorrectString(getItemAttribute(itemEx.uid, "poke"))
                if PokemonShinys[pokename] then
                    quant = PokemonShinys[pokename].quant
                    if getPlayerItemCount(cid, item.itemid) >= quant then
                        local newpoke = PokemonShinys[pokename].name
                        doItemSetAttribute(itemEx.uid, "poke", newpoke)
                        doItemSetAttribute(itemEx.uid, "description", "Contains a "..newpoke..".")
                        doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[newpoke])
                        doSendMagicEffect(getThingPos(cid), effect)
                        doPlayerRemoveItem(cid, item.itemid, quant)
                        doItemSetAttribute(itemEx.uid, "offense", pokes[newpoke].offense)
                        doItemSetAttribute(itemEx.uid, "defense", pokes[newpoke].defense)
                        doItemSetAttribute(itemEx.uid, "speed", pokes[newpoke].agility)
                        doItemSetAttribute(itemEx.uid, "specialattack", pokes[newpoke].specialattack)
                        doItemSetAttribute(itemEx.uid, "vitality", pokes[newpoke].vitality)]
            			doItemEraseAttribute(itemEx.uid, "addon")
            			doItemEraseAttribute(itemEx.uid, "addonfly")
           			  	doItemEraseAttribute(itemEx.uid, "addonrider")
            			doItemEraseAttribute(itemEx.uid, "addonsurf")
            			doItemEraseAttribute(itemEx.uid, "addonlook")
           			 	doItemEraseAttribute(itemEx.uid, "current_addon")
                    else
                        doPlayerSendCancel(cid,  "You don't have "..quant.." shiny stones to evolve this ".. pokename .."!")
                    end
                else
                    doPlayerSendCancel(cid,  pokename.." don't have a shiny evolution!")
                end
            else
                doPlayerSendCancel(cid,  "You need call your pokemon!")
            end
        else
            doPlayerSendCancel(cid,  "You need put "..pokename.." in the principal slot!")
        end
    else
        doPlayerSendCancel(cid,  "You need use shiny stone in pokeball!")
    end
    return true
end 

Funcional , testado e comprovado ;)

Link para o comentário
Compartilhar em outros sites

  • 0

actions/scripts/Addon.lua

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if #getCreatureSummons(cid) > 0 then
        doPlayerSendCancel(cid, msgs.return_poke[getPlayerLanguage(cid)])
        return false
    end  
    
    local addonNum = addons[item.itemid].addon_num
    local addon = addons[item.itemid].looktype
    local fly = addons[item.itemid].fly
    local ride = addons[item.itemid].ride
    local surf = addons[item.itemid].surf
    local addonlook = addons[item.itemid].nome
     
    local pb = getPlayerSlotItem(cid, 8).uid
    local pk = addons[item.itemid].pokemon
     
    if getItemAttribute(pb, "poke") ~= pk then
        doPlayerSendCancel(cid, msgs.cant_use[getPlayerLanguage(cid)])
        return false
    end
    
    if getItemAttribute(pb, "pokeballusada") == 0 then
        doRemoveItem(item.uid, 1)
        doSendMagicEffect(fromPosition, 173)
        
        updateAddonAttr(pb, "addon"    , addon    , addonNum)
        updateAddonAttr(pb, "addonfly" , fly      , addonNum)
        updateAddonAttr(pb, "addonride", ride     , addonNum)
        updateAddonAttr(pb, "addonsurf", surf     , addonNum)
        updateAddonAttr(pb, "addonlook", addonlook, addonNum)
        
        if not getItemAttribute(pb, "current_addon") then
            doSetItemAttribute(pb, "current_addon", addonNum)
        end
        return true
    end
    return false
end

Link para o comentário
Compartilhar em outros sites

  • 0

Opa valeu brendo feliz natal para você também. 

 

Spoiler

function onUse(cid, item, frompos, item2, topos)
 
local cfg = {
    eff_one = 18,     --Efeito que irá sair ao evoluir o pokémon (esse efeito aparecerá no pokémon)
    eff_two = 173,    --Efeito que irá sair ao evoluir o pokémon (esse efeito aparecerá no player)
    proibidos = false,  --Terá pokémons proibidos para evoluir? [true/sim] [false/năo]
}
 
    local can_not = {}
    
    if cfg.proibidos == true then
        can_not = {"Espeon", "Umbreon", "Magneton"}    --Pokémons que năo podem evoluir.
    end
    
    if not isMonster(item2.uid) or not isSummon(item2.uid) then
        return true
    end
    
    if not pokes["Shiny "..getCreatureName(item2.uid)] then 
        return doPlayerSendCancel(cid, "Esse pokémon năo possui uma forma shiny.") 
    end
    
    local minlevel = pokes["Shiny "..getCreatureName(item2.uid)].level
    
    if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then
        return doPlayerSendCancel(cid, "Vocę só pode evoluir seu próprio pokémon.")
    end
   
    if getPlayerLevel(cid) < minlevel then
        return doPlayerSendCancel(cid, "Vocę năo tem o level necessário para evoluir esse pokémon. ("..minlevel..").")
    end
    
    if isInArray(can_not, getCreatureName(item2.uid)) then
        return doPlayerSendCancel(cid, "Vocę năo pode evoluir esse pokémon!")
    end
    
    local nome = "Shiny "..getCreatureName(item2.uid)
    local owner = getCreatureMaster(item2.uid)
    local pokeball = getPlayerSlotItem(cid, 8)
    local description = "Contains a "..nome.."."
    local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid)
 
    doItemSetAttribute(pokeball.uid, "hp", pct)
 
    doItemSetAttribute(pokeball.uid, "poke", nome)
    doItemSetAttribute(pokeball.uid, "description", "Contains a "..nome..".")
 
    doPlayerSendTextMessage(cid, 27, "Parabéns! Seu "..getPokeName(item2.uid).." se transformou em um "..nome.."!")
 
    doSendMagicEffect(getThingPos(item2.uid), cfg.eff_one)
    doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[nome])
    doSendMagicEffect(getThingPos(cid), cfg.eff_two)
 
    local oldpos = getThingPos(item2.uid)
    local oldlod = getCreatureLookDir(item2.uid)
    doRemoveCreature(item2.uid)
 
    doSummonMonster(cid, nome)
    local pk = getCreatureSummons(cid)[1]
 
    doTeleportThing(pk, oldpos, false)
    doCreatureSetLookDir(pk, oldlod)
 
   doRemoveItem(item.uid, 1)  
 
    doAddPokemonInOwnList(cid, nome)
 
    local happy = getItemAttribute(pokeball.uid, "happy")
 
    doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution)
 
    if happy + happyGainedOnEvolution > 255 then
        doItemSetAttribute(pokeball.uid, "happy", 255)
    end
 
    adjustStatus(pk, pokeball.uid, true, false)
 
    if useKpdoDlls then
        doUpdateMoves(cid)
    end
    return true
end

 

Link para o comentário
Compartilhar em outros sites

  • 0
9 horas atrás, Otpokemonmystic disse:

Opa valeu brendo feliz natal para você também. 

 

  Mostrar conteúdo oculto

function onUse(cid, item, frompos, item2, topos)
 
local cfg = {
    eff_one = 18,     --Efeito que irá sair ao evoluir o pokémon (esse efeito aparecerá no pokémon)
    eff_two = 173,    --Efeito que irá sair ao evoluir o pokémon (esse efeito aparecerá no player)
    proibidos = false,  --Terá pokémons proibidos para evoluir? [true/sim] [false/năo]
}
 
    local can_not = {}
    
    if cfg.proibidos == true then
        can_not = {"Espeon", "Umbreon", "Magneton"}    --Pokémons que năo podem evoluir.
    end
    
    if not isMonster(item2.uid) or not isSummon(item2.uid) then
        return true
    end
    
    if not pokes["Shiny "..getCreatureName(item2.uid)] then 
        return doPlayerSendCancel(cid, "Esse pokémon năo possui uma forma shiny.") 
    end
    
    local minlevel = pokes["Shiny "..getCreatureName(item2.uid)].level
    
    if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then
        return doPlayerSendCancel(cid, "Vocę só pode evoluir seu próprio pokémon.")
    end
   
    if getPlayerLevel(cid) < minlevel then
        return doPlayerSendCancel(cid, "Vocę năo tem o level necessário para evoluir esse pokémon. ("..minlevel..").")
    end
    
    if isInArray(can_not, getCreatureName(item2.uid)) then
        return doPlayerSendCancel(cid, "Vocę năo pode evoluir esse pokémon!")
    end
    
    local nome = "Shiny "..getCreatureName(item2.uid)
    local owner = getCreatureMaster(item2.uid)
    local pokeball = getPlayerSlotItem(cid, 8)
    local description = "Contains a "..nome.."."
    local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid)
 
    doItemSetAttribute(pokeball.uid, "hp", pct)
 
    doItemSetAttribute(pokeball.uid, "poke", nome)
    doItemSetAttribute(pokeball.uid, "description", "Contains a "..nome..".")
 
    doPlayerSendTextMessage(cid, 27, "Parabéns! Seu "..getPokeName(item2.uid).." se transformou em um "..nome.."!")
 
    doSendMagicEffect(getThingPos(item2.uid), cfg.eff_one)
    doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[nome])
    doSendMagicEffect(getThingPos(cid), cfg.eff_two)
 
    local oldpos = getThingPos(item2.uid)
    local oldlod = getCreatureLookDir(item2.uid)
    doRemoveCreature(item2.uid)
 
    doSummonMonster(cid, nome)
    local pk = getCreatureSummons(cid)[1]
 
    doTeleportThing(pk, oldpos, false)
    doCreatureSetLookDir(pk, oldlod)
 
   doRemoveItem(item.uid, 1)  
 
    doAddPokemonInOwnList(cid, nome)
 
    local happy = getItemAttribute(pokeball.uid, "happy")
 
    doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution)
 
    if happy + happyGainedOnEvolution > 255 then
        doItemSetAttribute(pokeball.uid, "happy", 255)
    end
 
    adjustStatus(pk, pokeball.uid, true, false)
 
    if useKpdoDlls then
        doUpdateMoves(cid)
    end
    return true
end

 

Essa n e a script certa, procure por sh Stone.lua

Link para o comentário
Compartilhar em outros sites

  • 0

Tá aqui mano vê se é essa > 

Spoiler

local effect = 173

PokemonShinys = 
{
    ["Venusaur"] = {name = "Shiny Venusaur", quant = 7},
    ["Electabuzz"] = {name = "Shiny Electabuzz", quant = 6},
    ["Blastoise"] = {name = "Shiny Blastoise", quant = 7},
    ["Metagross"] = {name = "Shiny Metagross", quant = 10},
    ["Tropius"] = {name = "Shiny Tropius", quant = 10},
    ["Alakazam"] = {name = "Shiny Alakazam", quant = 9},
    ["Togekiss"] = {name = "Shiny Togekiss", quant = 8},
    ["Steelix"] = {name = "Shiny Steelix", quant = 9},
    ["Lapras"] = {name = "Shiny Lapras", quant =7},
    ["Abra"] = {name = "Shiny Abra", quant = 1},
    ["Salamence"] = {name = "Shiny Salamence", quant = 7},
    ["Flygon"] = {name = "Shiny Flygon", quant = 7},
    ["Tangrowth"] = {name = "Shiny Tangrowth", quant = 9},
    ["Snorlax"] = {name = "Shiny Snorlax", quant = 7},
    ["Gengar"] = {name = "Shiny Gengar", quant = 7},
    ["Ninetales"] = {name = "Shiny Ninetales", quant = 6},
    ["Raichu"] = {name = "Shiny Raichu", quant = 4},
    ["Charizard"] = {name = "Elder Charizard", quant = 7},
    ["Butterfree"] = {name = "Shiny Butterfree", quant = 3},
    ["Pidgeot"] = {name = "Shiny Pidgeot", quant = 5},
    ["Rattata"] = {name = "Shiny Rattata", quant = 1},
    ["Raticate"] = {name = "Shiny Raticate", quant = 3},
    ["Fearow"] = {name = "Shiny Fearow", quant = 5},
    ["Zubat"] = {name = "Shiny Zubat", quant = 3},
    ["Golbat"] = {name = "Shiny Golbat", quant = 6},
    ["Onix"] = {name = "Shiny Onix", quant =  7},
    ["Oddish"] = {name = "Shiny Oddish", quant = 1},
    ["Paras"] = {name = "Shiny Paras", quant = 1},
    ["Parasect"] = {name = "Shiny Parasect", quant = 3},
    ["Venonat"] = {name = "Shiny Venonat", quant = 2},
    ["Venomoth"] = {name = "Shiny Venomoth", quant = 6},
    ["Growlithe"] = {name = "Shiny Growlithe", quant = 1},
    ["Arcanine"] = {name = "Shiny Arcanine", quant = 6},
    ["Tentacool"] = {name = "Shiny Tentacool", quant = 1},
    ["Tentacruel"] = {name = "Shiny Tentacruel", quant = 6},
    ["Farfetch'd"] = {name = "Shiny Farfetch'd", quant = 1},
    ["Muk"] = {name = "Shiny Muk", quant = 5},
    ["Kingler"] = {name = "Shiny Kingler", quant = 5},
    ["Voltorb"] = {name = "Shiny Voltorb", quant = 2},
    ["Electrode"] = {name = "Shiny Electrode", quant = 3},
    ["Cubone"] = {name = "Shiny Cubone", quant = 2},
    ["Marowak"] = {name = "Shiny Marowak", quant = 4},
    ["Hitmonlee"] = {name = "Shiny Hitmonlee", quant = 5},
    ["Hitmonchan"] = {name = "Shiny Hitmonchan", quant = 5},
    ["Tangela"] = {name = "Shiny Tangela", quant = 3},
    ["Horsea"] = {name = "Shiny Horsea", quant = 1},
    ["Seadra"] = {name = "Shiny Seadra", quant = 3},
    ["Scyther"] = {name = "Shiny Scyther", quant = 6},
    ["Jynx"] = {name = "Shiny Jynx", quant = 7},
    ["Pinsir"] = {name = "Shiny Pinsir", quant = 4},
    ["Magikarp"] = {name = "Shiny Magikarp", quant = 1},
    ["Gyarados"] = {name = "Shiny Gyarados", quant = 7},
    ["Dratini"] = {name = "Shiny Dratini", 1},
    ["Dragonair"] = {name = "Shiny Dragonair", quant = 5},
    ["Dragonite"] = {name = "Shiny Dragonite", quant = 7},
    ["Blissey"] = {name = "Shiny Blissey", quant = 6},
    ["Miltank"] = {name = "Shiny Miltank", quant = 7},
    ["Sceptile"] = {name = "Shiny Sceptile", quant = 7},
    ["Clefable"] = {name = "Shiny Clefable", quant = 7},
    ["Wigglytuff"] = {name = "Shiny Wigglytuff", quant = 7},
    ["Slaking"] = {name = "Shiny Slaking", quant = 7},
    ["Porygon"] = {name = "Shiny Porygon", quant = 6},
    ["Milotic"] = {name = "Shiny Milotic", quant = 7},
    ["Vileplume"] = {name = "Shiny Vileplume", quant = 7},
    ["Gardevoir"] = {name = "Shiny Gardevoir", quant = 8},
    ["Spiritomb"] = {name = "Shiny Spiritomb", quant = 6},
    }

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if not isCreature(itemEx.uid) and isPokeball(itemEx.itemid) then
        if getPlayerSlotItem(cid, 8).uid == itemEx.uid then
            if #getCreatureSummons(cid) <= 0 then
                pokename = doCorrectString(getItemAttribute(itemEx.uid, "poke"))
                if PokemonShinys[pokename] then
                    quant = PokemonShinys[pokename].quant
                    if getPlayerItemCount(cid, item.itemid) >= quant then
                        local newpoke = PokemonShinys[pokename].name
                        doItemSetAttribute(itemEx.uid, "poke", newpoke)
                        doItemSetAttribute(itemEx.uid, "description", "Contains a "..newpoke..".")
                        doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[newpoke])
                        doSendMagicEffect(getThingPos(cid), effect)
                        doPlayerRemoveItem(cid, item.itemid, quant)
                        doItemSetAttribute(itemEx.uid, "offense", pokes[newpoke].offense)
                        doItemSetAttribute(itemEx.uid, "defense", pokes[newpoke].defense)
                        doItemSetAttribute(itemEx.uid, "speed", pokes[newpoke].agility)
                        doItemSetAttribute(itemEx.uid, "specialattack", pokes[newpoke].specialattack)
                        doItemSetAttribute(itemEx.uid, "vitality", pokes[newpoke].vitality)
                    else
                        doPlayerSendCancel(cid,  "You don't have "..quant.." shiny stones to evolve this ".. pokename .."!")
                    end
                else
                    doPlayerSendCancel(cid,  pokename.." don't have a shiny evolution!")
                end
            else
                doPlayerSendCancel(cid,  "You need call your pokemon!")
            end
        else
            doPlayerSendCancel(cid,  "You need put "..pokename.." in the principal slot!")
        end
    else
        doPlayerSendCancel(cid,  "You need use shiny stone in pokeball!")
    end
    return true
end

 

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...