• 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!
  • 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.

[Script] [Pokeruby/Pokeemerald] Script to let Pokémon use HM without knowing them

I think you should focus your attention on src/pokemon_menu.c, more specifically this function:
Spoiler:
The code that seems to deal with adding "CUT" or "SURF" or whatever to that list seems to be this part:
Code:
u16 moveID, tableID;
        for (moveID = 0; moveID < 4; moveID++) // 4, max number of possible field moves
        {
            for (tableID = 0; sPokeMenuFieldMoves[tableID] != sFieldMovesTerminator; tableID++)
            {
                if (GetMonData(&gPlayerParty[gLastFieldPokeMenuOpened], MON_DATA_MOVE1 + moveID) == sPokeMenuFieldMoves[tableID])
                {
                    u8 fieldID = tableID + POKEMENU_FIRST_FIELD_MOVE_ID;
                    AppendToList(sPokeMenuOptionsOrder, &sPokeMenuOptionsNo, fieldID);
                    break;
                }
            }
        }

Ok thank you very much! I'll study that and see if I'm able to reach an outcome. I'm currently working on adding Egg Moves at the Move Relearner.
 
Hello, thanks a lot! Exploring this might be a key to the solution!

I had just about solved this the other day too, then I messed up and lost my data.

just went back and reimplemented stuff, but the last thing to consider for trying get this working, (that I still haven't figured out yet)

is figuring out how to prevent adding the same move to the list more than once,
and also keep the list from growing beyond 4 moves.
 
Back
Top