• 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] why my Script changes itself ?!?!!!

  • 2
    Posts
    3
    Years
    • Seen Sep 25, 2020
    I wanted to roll random number between 0-2
    and every number will give the player something different
    but the script changes itself and ruin everything

    my script:
    '---------------
    #org 0x850E00
    random 0x3
    compare LASTRESULT 0x0
    if 0x1 goto 0x8234561
    compare LASTRESULT 0x1
    if 0x1 goto 0x8234564
    compare LASTRESULT 0x2
    if 0x1 goto 0x8234567


    '---------------
    #org 0x234561
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    end

    '---------------
    #org 0x234564
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    end

    '---------------
    #org 0x234567
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    end



    The Script that the game gives:
    '---------------
    #org 0x71A46C
    random 0x3
    compare LASTRESULT 0x0
    if 0x1 goto 0x8234561
    compare LASTRESULT 0x1
    if 0x1 goto 0x8234564
    compare LASTRESULT 0x2
    if 0x1 goto 0x8234567
    end

    '---------------
    #org 0x234561
    givepokemon 0x1 0x79 0x4 0x5000779 0x0 0x0
    nop
    nop
    nop
    nop
    nop
    nop

    end

    '---------------
    #org 0x234564
    givepokemon 0x4 0x79 0x7 0x5 0x0 0x0
    nop
    nop
    nop

    end

    '---------------
    #org 0x234567
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    end



    please HELP!!!
     
    Last edited:
  • 760
    Posts
    16
    Years
    • Seen today
    @ronik2014

    From the provided info I can see that both scripts are at completely different offsets. Are you sure you put the correct script offset for the person event/script event in AdvanceMap?
     

    Dr. Seuss

    Will finish GS Chronicles, I swear!
  • 527
    Posts
    10
    Years
    I
    I'm pretty sure you're getting this error because you're giving only 3 bytes to each jump. The givepokemon command requires 9 bytes so you can try this script. This is just a reference. I'm not sure if you have more free space in this cares of your ROM.

    '---------------
    #org 0x850E00
    random 0x3
    compare LASTRESULT 0x0
    if 0x1 goto 0x8234561
    compare LASTRESULT 0x1
    if 0x1 goto 0x823456B
    compare LASTRESULT 0x2
    if 0x1 goto 0x8234575


    '---------------
    #org 0x234561
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    end

    '---------------
    #org 0x23456B
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    end

    '---------------
    #org 0x234575
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    end[/B]
     
  • 2
    Posts
    3
    Years
    • Seen Sep 25, 2020
    @ronik2014

    From the provided info I can see that both scripts are at completely different offsets. Are you sure you put the correct script offset for the person event/script event in AdvanceMap?

    yeah my mistake
    I didn't copy it good
    but it's not the problem

    I
    I'm pretty sure you're getting this error because you're giving only 3 bytes to each jump. The givepokemon command requires 9 bytes so you can try this script. This is just a reference. I'm not sure if you have more free space in this cares of your ROM.

    '---------------
    #org 0x850E00
    random 0x3
    compare LASTRESULT 0x0
    if 0x1 goto 0x8234561
    compare LASTRESULT 0x1
    if 0x1 goto 0x823456B
    compare LASTRESULT 0x2
    if 0x1 goto 0x8234575


    '---------------
    #org 0x234561
    givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
    end

    '---------------
    #org 0x23456B
    givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
    end

    '---------------
    #org 0x234575
    givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
    end[/B]

    so couldn't I do this script from the beginning ?
     
    Last edited:
    Back
    Top