• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our next favorite protagonist poll is now up, this time for the Almia region from Pokémon Ranger 2! This poll is only lasting 2 days, so don't forget to cast your vote for your favorite protagonist!
  • 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