• 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.
34
Posts
13
Years
  • I went to edit the script for the Mt. Moon Helix Fossil in FireRed to change "HELIX FOSSIL" to "Helix Fossil" but when I try to compile it, a message pops up saying "Error 13 'Type mismatch' on line 12. Missing #define or parameter. Line: giveitem2 0x165 0x1 0x13E" and it won't let me compile the script. Any way to fix this? The same thing happens whenever I try to edit any script that involves giving an item. All the .rbh's are in the proper place.
     
    154
    Posts
    11
    Years
    • Seen Jan 8, 2017
    Okay, I have no idea what's going on, but for all of my scripts in route 1 of FR that have applymovement in them, none of the characters are moving when the script activates, everything else is going fine, just no movement...
    here are the scripts.
    Spoiler:

    Spoiler:
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • I went to edit the script for the Mt. Moon Helix Fossil in FireRed to change "HELIX FOSSIL" to "Helix Fossil" but when I try to compile it, a message pops up saying "Error 13 'Type mismatch' on line 12. Missing #define or parameter. Line: giveitem2 0x165 0x1 0x13E" and it won't let me compile the script. Any way to fix this? The same thing happens whenever I try to edit any script that involves giving an item. All the .rbh's are in the proper place.

    Doesn't give item require 3 0x0's on the end as fillers? Or is that just give Pokemon? Search it in the command database on XSE. (F1)

    Just checking in cause I haven't posted in a whole day, omagurd

    Was this really necessary? Really?

    Okay, I have no idea what's going on, but for all of my scripts in route 1 of FR that have applymovement in them, none of the characters are moving when the script activates, everything else is going fine, just no movement...
    here are the scripts.
    Spoiler:

    Spoiler:

    Most likely, you forgot to change 12 into 0xC. Check your person event numbers and make sure to translate them to hex from A-map.
     
    Last edited:
    154
    Posts
    11
    Years
    • Seen Jan 8, 2017
    Doesn't give item require 3 0x0's on the end as fillers? Or is that just give Pokemon? Search it in the command database on XSE. (F1)



    Was this really necessary? Really?



    Most likely, you forgot to change 12 into 0xC. Check your person event numbers and make sure to translate them to hex from A-map.
    I actually didn't do that, so I'm assuming that would work, but that still doesn't explain why the second one would work, since it's using 0x03, which would be the Se either way.
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • I actually didn't do that, so I'm assuming that would work, but that still doesn't explain why the second one would work, since it's using 0x03, which would be the Se either way.

    Yes, I did notice that. Just to make sure, you are using the person event number that you can change, correct? You wouldn't be the first to mess that up, myself included.

    Just a trick, open it up after you compiled it. Does it look like it should?

    Also, it is not necessary to specify the person event number on waitmovement. Waitmovement 0x0 will halt all execution until all preceding applymovement scripts have completed.
     
    154
    Posts
    11
    Years
    • Seen Jan 8, 2017
    Yes, I did notice that. Just to make sure, you are using the person event number that you can change, correct? You wouldn't be the first to mess that up, myself included.

    Just a trick, open it up after you compiled it. Does it look like it should?

    Also, it is not necessary to specify the person event number on waitmovement. Waitmovement 0x0 will halt all execution until all preceding applymovement scripts have completed.
    Haha, wow, so it turns out, changing it to 0x0C worked, I assumed that was the problem, as for the other, I actually did set it to 3, when the event number was 4, so now everthing is working. xD
    Also, I didn't know that about the waitmovement, that'll be nice to not have to worry about! Thanks for the help!
     

    thetripplenine

    tripple.
    98
    Posts
    11
    Years
  • So I have a problem with a script, when i step on the green script tile the game freezes, (of course).

    Spoiler:


    So I'm basically trying to make a guy block you from entering unless you have the Pokemon menu.
    (He lets you pass if you do)
     
    Last edited:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • So I have a problem with a script, when i step on the green script tile the game freezes, (of course).

    Spoiler:


    So I'm basically trying to make a guy block you from entering unless you have the Pokemon menu.
    (He lets you pass if you do)

    First of all, let me tell you what's wrong with this part:
    applymovement 0x0 @move
    applymovement 0xFF @turn
    applymovement 0x0 @moveback
    waitmovement 0x0
    waitmovement 0x0
    There are two things wrong with what you have done here. The first thing is that two wait movement commands should never be together, you only need one. The second thing is that your applymovements will not work as you planned. Something more to this would get the desired effect:

    applymovement 0x0 @move
    applymovement 0xFF @turn
    waitmovement 0x0
    applymovement 0x0 @moveback
    waitmovement 0x0

    That's not why the script isn't running though, you're using the wrong flag (if this is Fire Red). You should be checking flag 0x828.
     

    thetripplenine

    tripple.
    98
    Posts
    11
    Years
  • First of all, let me tell you what's wrong with this part:

    There are two things wrong with what you have done here. The first thing is that two wait movement commands should never be together, you only need one. The second thing is that your applymovements will not work as you planned. Something more to this would get the desired effect:

    applymovement 0x0 @move
    applymovement 0xFF @turn
    waitmovement 0x0
    applymovement 0x0 @moveback
    waitmovement 0x0

    That's not why the script isn't running though, you're using the wrong flag (if this is Fire Red). You should be checking flag 0x828.

    I think it's the right flag for the Pokemon menu because i'm hacking emerald.

    EDIT:
    I think the problem is that when you open the emulator you do not see the sprite that's supposed to move..
     
    Last edited:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • So I have a problem with a script, when i step on the green script tile the game freezes, (of course).

    Spoiler:


    So I'm basically trying to make a guy block you from entering unless you have the Pokemon menu.
    (He lets you pass if you do)

    I think it's the right flag for the Pokemon menu because i'm hacking emerald.

    EDIT:
    I think the problem is that when you open the emulator you do not see the sprite that's supposed to move..

    OK, you're using the right flag, but incorrect logic in your script. Checking a flag then comparing it to 0x1 checks if it is true. So you don't even need the @done. Try this:

    #dynamic 0x9C0000

    #org @start
    checkflag 0x860
    if 0x1 goto @hey
    release
    end

    #org @hey
    msgbox @youcant 0x6
    applymovement 0x0 @move
    waitmovement 0x0
    applymovement 0xFF @turn
    waitmovement 0x0
    applymovement 0x0 @moveback
    waitmovement 0x0
    release
    end

    #org @done
    release
    end

    #org @move
    #raw 0x0B
    #raw 0x00
    #raw 0xFE

    #org @moveback
    #raw 0x0A
    #raw 0x00
    #raw 0xFE

    #org @turn
    #raw 0x56
    #raw 0x08
    #raw 0x01
    #raw 0xFE

    #org @youcant
    = You cannot enter until you take a\nPokémon.


    As for the sprite that doesn't appear, change it's personID to 0000. I think a level script is keeping the said person form appearing, just change his person id in advance map.
     

    thetripplenine

    tripple.
    98
    Posts
    11
    Years
  • OK, you're using the right flag, but incorrect logic in your script. Checking a flag then comparing it to 0x1 checks if it is true. So you don't even need the @done. Try this:

    #dynamic 0x9C0000

    #org @start
    checkflag 0x860
    if 0x1 goto @hey
    release
    end

    #org @hey
    msgbox @youcant 0x6
    applymovement 0x0 @move
    waitmovement 0x0
    applymovement 0xFF @turn
    waitmovement 0x0
    applymovement 0x0 @moveback
    waitmovement 0x0
    release
    end

    #org @done
    release
    end

    #org @move
    #raw 0x0B
    #raw 0x00
    #raw 0xFE

    #org @moveback
    #raw 0x0A
    #raw 0x00
    #raw 0xFE

    #org @turn
    #raw 0x56
    #raw 0x08
    #raw 0x01
    #raw 0xFE

    #org @youcant
    = You cannot enter until you take a\nPokémon.


    As for the sprite that doesn't appear, change it's personID to 0000. I think a level script is keeping the said person form appearing, just change his person id in advance map.

    Well, it worked, but what happened was when I got the pokemon menu it blocked me, if you don't have the pokemon menu it doesn't block you, but what i want to happen is in reverse.
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years



  • Oh, ok thanks it worked, did exactly what i wanted it to do. Btw do you know how to make a boat script, for example mr. Briney accept only one destination both ways?

    I suggest you decompile his script and learn about the commands used.
    I'll give you a pseudo code layout:

    message happens -Want to set sail?
    If yes jump @takeoff
    message happens - OK, tell me when.
    release
    end

    @takeoff
    message happens - Alrighty, prepare to set sail
    applymovement player & briney - Walk into the boat
    boat animation special
    warp script
    release
    end

    Hope that helps!
     

    thetripplenine

    tripple.
    98
    Posts
    11
    Years
  • I suggest you decompile his script and learn about the commands used.
    I'll give you a pseudo code layout:

    message happens -Want to set sail?
    If yes jump @takeoff
    message happens - OK, tell me when.
    release
    end

    @takeoff
    message happens - Alrighty, prepare to set sail
    applymovement player & briney - Walk into the boat
    boat animation special
    warp script
    release
    end

    Hope that helps!

    I don't get why there's a warp script, and what boat animation special... lol (sorry for asking so many questions)
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years


  • I don't get why there's a warp script, and what boat animation special... lol (sorry for asking so many questions)

    The warp script is to actually get you to the next island. The animation is you know...the boat animation lol. It happens when you get on the ferry to go somewhere (not sure if it's in emerald).
    I'm talking about this:
    boat.png
     

    thetripplenine

    tripple.
    98
    Posts
    11
    Years
  • The warp script is to actually get you to the next island. The animation is you know...the boat animation lol. It happens when you get on the ferry to go somewhere (not sure if it's in emerald).
    I'm talking about this:
    boat.png

    Ya, but can't I just use applymovement instead of warp?
    and oh i get the special now.

     
    Status
    Not open for further replies.
    Back
    Top