• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

Hidden power checker

  • 16
    Posts
    12
    Years
    • Seen Aug 9, 2012
    On Pokemon black/white, there is a guy in Iccirus city(I think) that tells you what type hidden power would be when you select a pokemon. How could someone do that on essentials?
     
    I copied just the Script from the Debug function in an Event and it works:

    pbChoosePokemon(1,3)

    pkmn=pbGetPokemon(1)

    type=0
    type|=(pkmn.iv[0]&1)
    type|=(pkmn.iv[1]&1)<<1
    type|=(pkmn.iv[2]&1)<<2
    type|=(pkmn.iv[3]&1)<<3
    type|=(pkmn.iv[4]&1)<<4
    type|=(pkmn.iv[5]&1)<<5
    type=(type*15/63).floor
    if hasConst?(PBTypes,:QMARKS)
    type+=1 if type>=PBTypes::QMARKS
    end
    typename=PBTypes.getName(type+1)

    power=0
    power|=(pkmn.iv[0]&2)>>1
    power|=(pkmn.iv[1]&2)
    power|=(pkmn.iv[2]&2)<<1
    power|=(pkmn.iv[3]&2)<<2
    power|=(pkmn.iv[4]&2)<<3
    power|=(pkmn.iv[5]&2)<<4
    power=(power*40/63).floor+30

    Kernel.pbMessage(_INTL("The type is {1}.",typename))
    Kernel.pbMessage(_INTL("The power ist {1}.",power))
     
    Back
    Top