• 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!
  • 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] Emerald - Creating an egg move tutor

McPaul

On my way to become a controversial and hated memb
  • 289
    Posts
    7
    Years
    Hey yo!

    I'm currently hacking Pokémon Emerald version and I want to insert and egg move tutor.

    So I thought it was a good idea to copy the levelup move tutor script (the one asking Heart Scales) and edit it to make the script teach egg moves instead.

    This is the orinignal script:

    '---------------
    #org 0x201383
    lockall
    applymovement 0x1 0x827259E
    waitmovement 0x0
    checkflag 0x1
    if 0x1 goto 0x82013A8
    msgbox 0x820145C 0x4 '"I'm the MOVE TUTOR.\pI know all th..."
    setflag 0x1
    goto 0x82013A8

    '---------------
    #org 0x2013A8
    checkitem 0x6F 0x1
    compare 0x800D 0x0
    if 0x1 goto 0x8201452
    msgbox 0x8201541 0x5 '"Oh! That's it! That's an honest to..."
    copyvar 0x8000 0x800D
    compare 0x8000 0x0
    if 0x1 goto 0x8201452
    goto 0x82013D6

    '---------------
    #org 0x201452
    msgbox 0x8201653 0x4 '"If your POKéMON need to learn a mo..."
    releaseall
    end

    '---------------
    #org 0x2013D6
    msgbox 0x82015A5 0x4 '"Which POKéMON needs tutoring?"
    special 0xDE
    waitstate
    compare 0x8004 0xFF
    if 0x1 goto 0x8201452
    special 0x14A
    compare 0x800D 0x1
    if 0x1 goto 0x8201444
    compare 0x8005 0x0
    if 0x1 goto 0x8201436
    goto 0x820140C

    '---------------
    #org 0x201444
    msgbox 0x8201697 0x4 '"Hunh? There isn't a single move th..."
    goto 0x82013D6

    '---------------
    #org 0x201436
    msgbox 0x82015DE 0x4 '"Sorry[.]\pIt doesn't appear as if ..."
    goto 0x82013D6

    '---------------
    #org 0x20140C
    msgbox 0x82015C3 0x4 '"Which move should I teach?"
    special 0xE3
    waitstate
    compare 0x8004 0x0
    if 0x1 goto 0x82013D6
    msgbox 0x8201627 0x4 '"[player] handed over one HEART SCA..."
    removeitem 0x6F 0x1
    goto 0x8201452


    '---------
    ' Strings
    '---------
    #org 0x20145C
    = I'm the MOVE TUTOR.\pI know all the moves that POKéMON\nlearn--every one of them--and I can\lteach POKéMON those moves.\pI can teach a move to a POKéMON\nof yours if you'd like.\pI'll do it for a HEART SCALE.\nI'm collecting those now.

    #org 0x201541
    = Oh! That's it! That's an honest to\ngoodness HEART SCALE!\pLet me guess, you want me to teach\na move?

    #org 0x201653
    = If your POKéMON need to learn a move,\ncome back with a HEART SCALE.

    #org 0x2015A5
    = Which POKéMON needs tutoring?

    #org 0x201697
    = Hunh? There isn't a single move that\nI can teach an EGG.

    #org 0x2015DE
    = Sorry[.]\pIt doesn't appear as if I have any move\nI can teach that POKéMON.

    #org 0x2015C3
    = Which move should I teach?

    #org 0x201627
    = [player] handed over one HEART SCALE\nin exchange.


    '-----------
    ' Movements
    '-----------
    #org 0x27259E
    #raw 0x3E 'Face Player
    #raw 0xFE 'End of Movements

    I won't have any problem to edit text and the item asked, but how to find the offset leading to egg moves instead of levelup moves? I think it all happens in the "special 0xE3" part.

    Can anyone give me some modest help with it? Thnak you very much!
     
    Back
    Top