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

[Script] Can someone help me locate the offset for the old man script in Viridian City.

38
Posts
4
Years
    • Seen Jul 17, 2019
    Im guessing his sprite is invisible by default because he doesn't show on advanced map but it has 9 person events and one 8 visiple sprites (as far as i can tell). Makes it hard for a noob like me to find the script. I am just looking to move him to the middle of the street as i moved it over to the left one so i must move the old man to the left one as well. I'm pretty sure I can copy/edit the script and find new space for it but any help would be appreciated. Pic for attention.
    Nu5WDNk.png
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • The old man is an interesting event as it uses a feature that not many people know of. In Advance Map, he is person event number four - You can find him by clicking at the coordinates 0x15, 0x6 and you'll see that he's using picture number 240 rather than 32 like he should. This picture number is special as any OW with that as their picture number will change to a completely different OW based on the value of variable 0x4010. Another instance of this effect occurring is in Fuchsia City, where the Pokemon in the top-left Pokemon pen will be a Kabuto/ Omanyte depending on which Fossil you took back in Mount Moon. While that doesn't help move him like you want it too, it does help to explain parts of his script that I'll go over.

    The old man's position is changed thanks to a level script in Viridian City which starts at 0x1658D9. Here's what it looks like and I've added some comments:

    Code:
    '---------------
    #org 0x1658D9
    setworldmapflag 0x891 // Allows you to fly to Viridian City when you meet the requirements
    compare 0x4051 0x0 // Checks if you've delivered Oak's Parcel/ got the Pokedex
    if 0x1 call 0x8165920
    compare 0x4051 0x1 // Checks if you haven't been offered to learn how to catch Pokemon by the Old Man when leaving Viridian
    if 0x1 call 0x816590F
    compare 0x4051 0x2 // Checks if you have been offered to learn how to catch Pokemon by the Old Man when leaving Viridian
    if 0x4 call 0x8165909
    compare 0x405A 0x0 // Checks if Viridian Gym is open - Variable is actually set in this script
    if 0x1 call 0x8165931
    end
    
    '---------------
    #org 0x165920
    setvar 0x4010 0x22 // Changes the OW to the Old Man lying down
    movesprite2 0x4 0x15 0xB // Moves him to the spot closer to his daughter
    spritebehave 0x4 0x8 // Makes him look down
    return
    
    '---------------
    #org 0x16590F
    setvar 0x4010 0x20 // Changes the OW to the Old Man standing up
    movesprite2 0x4 0x15 0x8 // Moves him between his daughter and the exit to Route 2
    spritebehave 0x4 0x1 // Makes him look around (this is redundant as he's set to look around anyway)
    return
    
    '---------------
    #org 0x165909
    setvar 0x4010 0x20// Changes the OW to the Old Man standing up
    return
    
    '---------------
    #org 0x165931
    checkflag 0x821
    if 0x0 goto 0x81A77A9
    checkflag 0x822
    if 0x0 goto 0x81A77A9
    checkflag 0x823
    if 0x0 goto 0x81A77A9
    checkflag 0x824
    if 0x0 goto 0x81A77A9
    checkflag 0x825
    if 0x0 goto 0x81A77A9
    checkflag 0x826
    if 0x0 goto 0x81A77A9
    setvar 0x405A 0x1 // Deactivates the script blocking Viridian Gym and gives the nearby Old Man different dialogue
    return
    
    '---------------
    #org 0x1A77A9
    return

    You don't need to rewrite this level script or anything, you just need to change the 'movesprite2' commands so that the Old Man is shifted one tile to the left. You can then place his actual OW wherever you want and it will appear there once he's offered to teach you how to catch Pokemon.
     
    38
    Posts
    4
    Years
    • Seen Jul 17, 2019
    The old man is an interesting event as it uses a feature that not many people know of. In Advance Map, he is person event number four - You can find him by clicking at the coordinates 0x15, 0x6 and you'll see that he's using picture number 240 rather than 32 like he should. This picture number is special as any OW with that as their picture number will change to a completely different OW based on the value of variable 0x4010. Another instance of this effect occurring is in Fuchsia City, where the Pokemon in the top-left Pokemon pen will be a Kabuto/ Omanyte depending on which Fossil you took back in Mount Moon. While that doesn't help move him like you want it too, it does help to explain parts of his script that I'll go over.

    The old man's position is changed thanks to a level script in Viridian City which starts at 0x1658D9. Here's what it looks like and I've added some comments:

    Code:
    '---------------
    #org 0x1658D9
    setworldmapflag 0x891 // Allows you to fly to Viridian City when you meet the requirements
    compare 0x4051 0x0 // Checks if you've delivered Oak's Parcel/ got the Pokedex
    if 0x1 call 0x8165920
    compare 0x4051 0x1 // Checks if you haven't been offered to learn how to catch Pokemon by the Old Man when leaving Viridian
    if 0x1 call 0x816590F
    compare 0x4051 0x2 // Checks if you have been offered to learn how to catch Pokemon by the Old Man when leaving Viridian
    if 0x4 call 0x8165909
    compare 0x405A 0x0 // Checks if Viridian Gym is open - Variable is actually set in this script
    if 0x1 call 0x8165931
    end
    
    '---------------
    #org 0x165920
    setvar 0x4010 0x22 // Changes the OW to the Old Man lying down
    movesprite2 0x4 0x15 0xB // Moves him to the spot closer to his daughter
    spritebehave 0x4 0x8 // Makes him look down
    return
    
    '---------------
    #org 0x16590F
    setvar 0x4010 0x20 // Changes the OW to the Old Man standing up
    movesprite2 0x4 0x15 0x8 // Moves him between his daughter and the exit to Route 2
    spritebehave 0x4 0x1 // Makes him look around (this is redundant as he's set to look around anyway)
    return
    
    '---------------
    #org 0x165909
    setvar 0x4010 0x20// Changes the OW to the Old Man standing up
    return
    
    '---------------
    #org 0x165931
    checkflag 0x821
    if 0x0 goto 0x81A77A9
    checkflag 0x822
    if 0x0 goto 0x81A77A9
    checkflag 0x823
    if 0x0 goto 0x81A77A9
    checkflag 0x824
    if 0x0 goto 0x81A77A9
    checkflag 0x825
    if 0x0 goto 0x81A77A9
    checkflag 0x826
    if 0x0 goto 0x81A77A9
    setvar 0x405A 0x1 // Deactivates the script blocking Viridian Gym and gives the nearby Old Man different dialogue
    return
    
    '---------------
    #org 0x1A77A9
    return

    You don't need to rewrite this level script or anything, you just need to change the 'movesprite2' commands so that the Old Man is shifted one tile to the left. You can then place his actual OW wherever you want and it will appear there once he's offered to teach you how to catch Pokemon.

    Thank you thank you thank you! I'm glad you went into detail I appreciate that a ton. I'm gonna go do that and i'll post a pic when i get it right! And thank you again!

    mKgLIoX.png
     
    Last edited by a moderator:
    Back
    Top