Ir para conteúdo
  • 0

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


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
https://xtibia.com/forum/topic/248748-resolvido-addon-n%C3%A3o-some-ao-fazer-pokemon-forma-shiny/
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 ;)

  • 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

  • 0

N estou em casa , mais quando chegar te ajudo, se pudrr mandar o script da shiny stone por favor, ja adianta o trampo , feliz Natal ae

  • 0

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

 

  Mostrar conteúdo oculto

 

  • 0
  Em 25/12/2018 em 18:17, Otpokemonmystic disse:

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

 

  Mostrar conteúdo oculto

 

Expand  

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

  • 0

Tá aqui mano vê se é essa > 

  Mostrar conteúdo oculto

 

  • 0
A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.
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...