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

[Archive] Script help thread

Status
Not open for further replies.
61
Posts
15
Years
    • Seen Oct 12, 2012
    Sorry but sombosy can post me link for poket script + 2 patch becouse i don't find it.
    Thank!
     
    5,256
    Posts
    16
    Years
  • What's the givepokemon code for a Horsea. When I do 116, like this:
    Code:
    givepokemon 0x116 0x5 0x0 0x0 0x0 0x0
    I get a Grovyle. Help!

    P.S. If you haven't noticed, I use XSE, not Poket Script.
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    What's the givepokemon code for a Horsea. When I do 116, like this:
    Code:
    givepokemon 0x116 0x5 0x0 0x0 0x0 0x0
    I get a Grovyle. Help!

    P.S. If you haven't noticed, I use XSE, not Poket Script.

    Replace 116 with 74. That should do it.
     
    61
    Posts
    15
    Years
    • Seen Oct 12, 2012
    Sorry but somebody can post me link for poket script + 2 patch becouse i don't find it.
     

    DePokemonMaster1324

    hacker lvl 2
    26
    Posts
    15
    Years
  • using stuff like this givepokemon 0x19 0x5 0x0 0x0 0x0 0x0 uses Hex to find hex go to calculator View-scientific type in your pokemon's dec #(nationaldex #) and hit the Hex button to the left and use that # in the script this can be used in scripts that involve Hex#
    BTW The givepokemon is for a level 5 pikachu

    and also can someone check to see if this script is error free
    Spoiler:

    Zaangoose-thanks
     
    Last edited:

    Thrace

    @tion
    1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Sorry but somebody can post me link for poket script + 2 patch becouse i don't find it.
    Try asking someone who does directly instead of posting that here. D:

    using stuff like this givepokemon 0x19 0x5 0x0 0x0 0x0 0x0 uses Hex to find hex go to calculator View-scientific type in your pokemon's dec #(nationaldex #) and hit the Hex button to the left and use that # in the script this can be used in scripts that involve Hex#
    BTW The givepokemon is for a level 5 pikachu

    and also can someone check to see if this script is error free
    Spoiler:

    Zaangoose-thanks
    Changes in bold. Think I got most of them. Next time try have a go at fixing your problems yourself :D

    Can someone please tell me or give me a guide of how to do an XSE trainerbattle with everything explained?
    Theres one in XSE. Hit F1 and type trainerbattle in the textbox in the window that appears. That should give you all the information you need. The type parameter has two values (as far as simple scripts go) 0 which will simply end the script after you beat the trainer and 1 which allows you to continue the script immediately upon defeat by providing an extra pointer to a follow on script.
     

    Pokepal17

    More cowbell~
    1,519
    Posts
    15
    Years
  • Originally Posted by Pokepal17 [Archive] Script help thread
    Can someone please tell me or give me a guide of how to do an XSE trainerbattle with everything explained?

    Theres one in XSE. Hit F1 and type trainerbattle in the textbox in the window that appears. That should give you all the information you need. The type parameter has two values (as far as simple scripts go) 0 which will simply end the script after you beat the trainer and 1 which allows you to continue the script immediately upon defeat by providing an extra pointer to a follow on script.

    Sorry, but I had a look and I still do not understand.
     

    Thrace

    @tion
    1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Does anyone know how to make the weedle the old man fights a Pikachu
    special 0x9D in a script will trigger this.

    does anyone know how to get the shiny hack to work so that whwn you enter a new area all the pokemon in the area are shiny?
    I haven't tried this out but in theory it should work, simply put the callasm command in a script tile at the entrance of that new area, then call it again when you leave. The only problem is if the trainer faints he'll end up in the last Pokemon Center and every Pokemon encountered in that special area or otherwise will be shiny.

    Originally Posted by Pokepal17 [Archive] Script help thread
    Can someone please tell me or give me a guide of how to do an XSE trainerbattle with everything explained?

    Sorry, but I had a look and I still do not understand.
    trainerbattle 0x0 [trainerNumber] 0x0 [textBefore] [textAfter]
    Use the above for normal trainer battles.

    trainerbattle 0x1 [trainerNumber] 0x0 [textBefore] [textAfter] [scriptAfter]
    Use the above for trainerbattles where you want a script to follow after.
     

    Pokepal17

    More cowbell~
    1,519
    Posts
    15
    Years
  • Okay thanks but how do I choose what Pokemon the trainer has and what type is the trainer e.g. Magma Grunt, Officer. Also how do I choose the trainer's name.
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Can someone show me how special 0x17B(Seagallop boat animation) can be used to transprt you to different locations from the Islands in Fire red? I looked at RHN, but didn't understand it?
    Also, what is buffernumber 0x0 0x800D?

    Thanks in advance.
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    using stuff like this givepokemon 0x19 0x5 0x0 0x0 0x0 0x0 uses Hex to find hex go to calculator View-scientific type in your pokemon's dec #(nationaldex #) and hit the Hex button to the left and use that # in the script this can be used in scripts that involve Hex#
    BTW The givepokemon is for a level 5 pikachu

    There's no need to waste so much time searching dex numbers and so on.
    Here's the more direct way:

    Code:
    givepokemon PKMN_PIKACHU 0x5 0x0 0x0 0x0 0x0

    Note that the code above requires you to include the stdpoke.rbh file.
    To do that, type this at the beggining of your script:

    Code:
    #include stdpoke.rbh

    Don't forget to extract that file from XSE archive of course.
    Here's a couple of other ways:

    Code:
    givepokemon 25 0x5 0 0 0 0
    Code:
    givepokemon 25 5 0 0x0 0x0 0x0

    In fact, using hexadecimal or decimal is pretty much a question of taste.
    You can mix them in all possible ways, as long as you don't get confused.


    I haven't tried this out but in theory it should work, simply put the callasm command in a script tile at the entrance of that new area, then call it again when you leave. The only problem is if the trainer faints he'll end up in the last Pokemon Center and every Pokemon encountered in that special area or otherwise will be shiny.

    First of all that would only works with the buggy, first release of the Shiny Hack. Where the "Shiny Flag" is not cleared automatically.
    But there are other problems anyway. What if the player flies away? A somewhat stable and good solution could be to use a lot of level scripts which would reset the "Shiny Flag" in each map except the Shiny Area one where it should be activated instead, obviously.


    Okay thanks but how do I choose what Pokemon the trainer has and what type is the trainer e.g. Magma Grunt, Officer. Also how do I choose the trainer's name.

    You just can't from a script. You need to use a trainer editor.


    Can someone show me how special 0x17B(Seagallop boat animation) can be used to transprt you to different locations from the Islands in Fire red? I looked at RHN, but didn't understand it?
    Also, what is buffernumber 0x0 0x800D?

    Thanks in advance.

    Code:
    setvar 0x8006 [place]
    setvar 0x8004 [direction]
    special 0x17B

    Place: Vermillion City is 0x0. From 0x1 to 0x7 should be Sevii Islands. Other values are not likely to work.
    Direction: 0x0 for right, 0x1 for left.

    Regarding buffernumber, it's a command used to store the value of a specific variable into a special memory location, called buffer.
    Those buffers can be used into messages, for example. The game have 3 main buffers (from 0x0 to 0x2) which are used for all the buffer-like commands.

    The first parameter is the buffer number. The second is the variable to store into the buffer.
    In your case, those are 0x0 and 0x800D respectively. The first one is [buffer1], the latter is the LASTRESULT variabile.
    For the sake of the example, the buffernumber is used in the original game for the Pokédex appraisal.
     
    Last edited:

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Thanks a lot Hackmew.
    It worked perfectly.
    If I want to use the buffer number in a script, do I write buffernumber (buffer number) (Stored variable)
    or I use the #raw (#raw 0x83 (buffer number) (Stored variable) )(In XSE)

    Thank you for your help.
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    Thanks a lot HackMew.
    It worked perfectly.
    If I want to use the buffer number in a script, do I write buffernumber (buffer number) (Stored variable)
    or I use the #raw (#raw 0x83 (buffer number) (Stored variable) )(In XSE)

    Thank you for your help.

    No, no need to use #raw. XSE has a rich database ;)
     

    Hiche..

     
    979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    lol :P

    I did this script:
    Spoiler:


    This is part of the script. did I place the buffernumber in the correct place? (It's a multi-command)
     

    HackMew

    Mewtwo Strikes Back
    1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    lol :P

    I did this script:
    Spoiler:


    This is part of the script. did I place the buffernumber in the correct place? (It's a multi-command)

    Somehow, yes. But you're wasting space.
    Here's the pre-optimized version:

    Spoiler:


    Why did I say pre-optimized?
    Take a closer look at your script. Did you notice anything?
    Yes, the variable 0x8005 is pretty useless here.
    At the beginning the variable 0x8008 is overwritten with the LASTRESULT (0x800D). And the it's compared to see what choice the user selected.
    Now, since 0x8008 already has the choice info, there's no point using another variable to store (again) the same data.
    Also, due to the nature of your script there's not even need to check if the answer was 0x0, 0x1 or 0x2. In fact, you just need to see if the user pressed B (0x7F) or he/she actually chose something.

    So here's the optimized version:

    Spoiler:
     
    Status
    Not open for further replies.
    Back
    Top