• 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] Script Help PLEASE!

9
Posts
10
Years
    • Seen Feb 27, 2021
    Hello,

    Iv used the Flag, and Variable expansion files and also the Japaneses patch so that those files would run. But now Im just trying to write a simple givepokemon script

    Script
    #dynamic 0x800000
    #org @start
    lock
    faceplayer
    msgbox @t1 0x6
    givepokemon 0x01 0x63 0x68 0x0 0x0 0x0
    setflag 0x828
    release
    end

    #org @t1
    = Hey here's a starter for you. The\nprofessor's will be a whimp\lcompared!

    When I go into Advance Map and open the script from there is opens into something gamefreak made. An only plays a sound and nothing after. Can someone give me a hand?
     
    Last edited:

    Droark236

    Derek
    12
    Posts
    4
    Years
  • I've had issues with the "givepokemon" command as well and there are a lot of moving parts here, however, I'll breakdown what I know:

    Assuming your flag expand is working here is useful info:

    So remember that the numbers you're working with are using the expanded number system and it works like this: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. In this way, Not sure if you want your Poke at 63 or you already know this, but I like to be thorough. Same goes for the item code (I assume you know that, though as the lists already have this in place).

    Code that should work (if your flag expand thing is working):

    #dynamic 0x800000
    #org @start
    lock
    faceplayer
    checkflag 0x828
    if 0x1 goto @alreadyreceived
    msgbox @t1 0x6
    givepokemon 0x01 0x3F 0x68 0x0 0x0 0x0
    setflag 0x828
    release
    end

    #org @alreadyreceived
    @t2 msgbox 0x6
    release
    end

    #org @t2
    = Bro, I just gave it to you!

    #org @t1
    = Here's a Pokemon, my dude

    ---------------------------------------------------------
    Finally, these are the "duh, how did I make that mistake" problems but they both tripped me up in the past.
    1. You're batch compiling to the wrong file. You're copying the correct offset and pasting the correct offset but the code is on another game.
    2. If your offset doesn't fill every space available in the offset section, be sure to add 00 at the start. Otherwise, the game will add something like 80 to the end of your correct offset and you'll go to a random offset that's not yours.
     
    Last edited:
    9
    Posts
    10
    Years
    • Seen Feb 27, 2021
    Thank you for responding I'll try this when I get home. I believe it's the adding 00!
     
    Back
    Top