• 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 Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Binary

え?
3,977
Posts
16
Years
    • Seen Apr 7, 2014
    What is the special number for a move camera script in r\s?
    A move-camera script would look something like this.
    Spoiler:

    It's a portion of my script..
    'lockall' locks all the OWs in the map. After 'lockall' you need special 0x113.
    A special 0x114 after the movements, then 'releaseall'. Pretty simple, eh?
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Game: Fire Red(US)

    Okay I'm back..now with a movement script problem. Here is my script:

    Spoiler:


    I want the message box to show up when the player steps on a tile, then move up one. The message box shows up but the player doesn't move :/
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Game: Fire Red(US)

    Okay I'm back..now with a movement script problem. Here is my script:

    Spoiler:


    I want the message box to show up when the player steps on a tile, then move up one. The message box shows up but the player doesn't move :/

    you need waitmovement 0x0 after the applymovement.
     

    dr4g0n12

    Δράκος
    173
    Posts
    14
    Years
  • I do not understand why this doesnt work. When I talk to the sprite, it does the message, makes the player dissapear, then freezes. Can someone explain why this doesn't work?
    Code:
    #dynamic 0x803372
    #org @fly
    lock
    faceplayer
    msgbox @holdon 0x6
    release
    applymovement 0xFF @hide
    waitmovement 0x0
    applymovement 0x2 @flight
    waitmovement 0x0
    setflag 0x2B3
    warp 0x0 0x64 0x0 0xF 0x14
    end
     
    #org @holdon
    = Hold on tight!
     
    #Org @hide
    #raw 0x54
    #raw 0xFE
     
    #Org @flight
    #raw 0x4 
    #raw 0x3A
    #raw 0x4 
    #raw 0x4
    #raw 0x4 
    #raw 0x4 
    #raw 0x4
    #raw 0x4 
    #raw 0x4 
    #raw 0x4 
    #raw 0x4 
    #raw 0x4
    #raw 0x4 
    #raw 0x4 
    #raw 0x4 
    #raw 0x4
    #raw 0x4 
    #raw 0x4
    #raw 0x4
    #raw 0x4
    #raw 0xFE
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Thanks again Swift :)

    And another question.. How can you change what song a certain type of Trainer plays? (Eg: CHAMPION plays the champion theme and GYM LEADERs play the gym leader theme)

    Edit: To the above: Did you make sure the warp is correct? Also, try removing that "release", it changes nothing with it being there anyway.

    Also, if you want to save that tiny bit of extra text, remove the end after the warp. Warping automatically ends a script anyway.
     
    Last edited:
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Dragon12:

    warp 0x0 0x64 0xFF 0xF 0x14

    Nikolai Fox:

    I think you can do that in A-Trainer?

    DawnGold:

    You can use Shinyzer (In HackMew's thread) or the FireRed hacked engine here.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Nah swift you can only change the intro music it plays when you interact with their overworlds in A-Trainer =/

    What I mean is, when you select a Trainer in A-Trainer, you can give Trainers a tag like "BUG CATCHER", which plays the default Trainer battle music, or "LEADER" which plays the Gym Leader music in battle. I'm wondering if there's away you can get a list of these Trainer "types", and make it for example all Pokemon with the tag BUG CATCHER play the Gym Leader music.


    And another question. How do I set someone a map, and have them hidden until I set a flag on another map?
     
    Last edited:

    Jordy San

    The fire-breathing Dutch-Boy
    292
    Posts
    15
    Years
  • Hello guys.
    i recently got into scripting again, and I screwed up somehwere in this code:
    Code:
    #dynamic 0x800FD8
    
    #org @start
    checkflag 0x1003
    if 0x1 goto @rocket
    end
    
    #org @rocket
    playsong 0x112 0x0
    applymovement 0x04 @1
    applymovement 0x05 @2
    waitmovement 0x0
    msgbox @10 0x2
    applymovement 0xFF @3
    waitmovement 0x0
    applymovement 0x04 @4
    applymovement 0x05 @5
    msgbox @11 0x2
    Showsprite 0x05
    msgbox @12 0x2
    setflag 0x828
    givepokemon 0x19 0x5 0x0 0x0 0x0 0x0 
    trainerbattle 0x0 0x15F 0x0 @before @after
    fadescreen 0x1
    setflag 0x2000
    hidesprite 0x04
    hidesprite 0x03
    hidesprite 0x05
    fadescreen 0x0
    
    
    
    #org @1
    #raw 0x65
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0xFE
    
    #org @2
    #raw 0x65
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0xFE
    
    #org @3
    #raw 0x10
    
    #org @4
    #raw 0x13
    #raw 0x00
    
    #org @5
    #raw 0x00
    
    
    
    #org @10
    = Guy: Ok kid, hand over the egg!\pGirl: Do it now!
    
    #org @11
    = Guy: What's that?
    
    #org @12
    = Girl: The egg hatched!\pGuy: Well, we have no other choise\nthen to  battle you for it.
    
    #org @before
    = Hand that PIKACHU over!
    
    #org @after
    = How could we lose?
    When I step on the tile the script uses, the player just gets locked. I know the flag is correct... soo.. Where did I screw up (this time) :\
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    ^
    Maybe add a "nop" command after your playsong command?
    not sure though. Haven't used the playsong command for a while now.
    Or maybe you need to set the Unknown numbers on your script tile on A-Map.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Jordy, did you give your script a variable number in Advance Map?


    And another question. How do I set someone a map, and have them hidden until I set a flag on another map?
     
    Last edited:

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Seen Apr 7, 2014
    @Nikolai Fox: Make a level script that checks the flag and shows the sprite if it is set.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Thanks Binary, how do I make a level script?

    Also, what is wrong with this script?

    Spoiler:


    It should give me a pikachu (i copied it from my other script), but when i save it, it replaces release and end with
    nop
    braille2 0xoffset

    And just freezes if I try it ingame :/
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Seen Apr 7, 2014
    Thanks Binary, how do I make a level script?

    Also, what is wrong with this script?

    Spoiler:


    It should give me a pikachu (i copied it from my other script), but when i save it, it replaces release and end with
    nop
    braille2 0xoffset

    And just freezes if I try it ingame :/
    A good level-script tutorial would be here.

    Try decompiling and replacing the
    nop
    braille2 0xoffset
    part with release end. Or maybe compile again in a free offset.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    I tried compiling it in a free offset, but it still froze. It kept the release and end though. Is it as simple as just using the "givepokemon" script?
    It is the first pokemon as well, if that makes a difference.

    (thanks for the link)
     

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • If it's the first Pokemon, a certain flag has to be set to receive it, I had a similar problem when writing my hack's starter script. I just dug up my script and found that if you're hacking FireRed, you need to precede the givepokemon command with setflag 0x828 and setflag 0x291. (or at least, that's what I have in my working script) Hope this works for you. Also, I've found that those issues where commands get changed to weird non-working things happens a lot in PKSV (I don't know if this is what you're using or not), which is why I switched over to XSE. A lot fewer bugs in compiling.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    EDIT: Okay next problem. I tried out that level script, and here it is:

    '---------------
    #org 0x160AA7
    checkflag 0x104
    if 0x1 goto 0x8160B0C
    hidesprite 0x2
    end

    '---------------
    #org 0x160B0C
    showsprite 0x2
    end

    I have the person's person ID set to 2, I'm assuming that should work? I used the script type on entering map/not on menu close :/
     
    Last edited:

    PeregrineFig

    Starting Pokémon Obsidian
    202
    Posts
    14
    Years
  • EDIT: Okay next problem. I tried out that level script, and here it is:

    '---------------
    #org 0x160AA7
    checkflag 0x104
    if 0x1 goto 0x8160B0C
    hidesprite 0x2
    end

    '---------------
    #org 0x160B0C
    showsprite 0x2
    end

    I have the person's person ID set to 2, I'm assuming that should work? I used the script type on entering map/not on menu close :/

    Person ID is used for flags. It would actually be far easier for you to set person ID to 0104 and delete the level script, that way if flag 104 is set the person vanishes. Hidesprite won't permanently hide it, as soon as you walk off the tile the script took place on the sprite reappears.
     
    202
    Posts
    14
    Years
    • Seen Jan 6, 2017
    Wow thanks peregrinfig. Now how would I make her re-appear? I've not used this method before.

    Also: Is there a script to make music fade in? playmusic 0x000 just makes it burst straight in. Sounds quite sloppy =/
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top