• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Adding a hold item that gives a secondary Typing

37
Posts
7
Years
    • Seen Jan 21, 2021
    Only for a certain evolution line. I'm getting a syntax error when attempting to put in this script, just before the Shellos scripting for Multiple forms. All these Pokemon are monotyped, but I'm thinking the issue is that I'm not defining the individual Pokemon in the "then type2" line?

    if (isConst?(pokemon.species,PBSpecies,:ELEMBABY) || (isConst?(pokemon.species,PBSpecies,:FIRASTER) || (isConst?(pokemon.species,PBSpecies,:HIELOREX) &&
    if hasConst?(PBItems,:DRAGONBONE)
    then type2==getConst(PBTypes,:DRAGON)

    Any help is much appreciated.
     
    465
    Posts
    7
    Years
    • Seen May 9, 2024
    What you'd have to do is that when it holds the dragon bone; it changes form; (not sure if your using v17.2 so not sure if its different for 17.2)

    would be;

    Code:
    MultipleForms.register(:ELEMBABY,{
    "getForm"=>proc{|pokemon|
        if isConst?(pokemon.item,PBItems,:DRAGONBONE)
          next 1
        end
    },
    "type2"=>proc{|pokemon|
    next if pokemon.form==0
    next getID(PBTypes,:DRAGON)
    }
    })
    
    MultipleForms.copy(:ELEMBABY,:FIRESTER,:HEILOREX)
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • If some of them is a evolution for a pokemon (Like Rockruff to Lycanroc, we have 3 differents forms), you need to change 'getForm' to 'getFormOnCreation'.
     
    Back
    Top