• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our 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] why my Script changes itself ?!?!!!

  • 2
    Posts
    4
    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:
    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]
     
    @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