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

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
  • I forgot I had that up there, but it still does the same thing, weird. I would imagine it wouldn't message at all now that I notice that I had that first one.

    Hmm... that is odd...
    I actually can't think of anything that could be making this script NOT work...
    Try changing it from B_TRUE to B_FALSE... I know it might seem unorthadox, but it is the only thing I can think of...
    (Also, does the game freeze when you try the script?)
     
    38
    Posts
    15
    Years
    • Seen Nov 26, 2023
    This is very strange; after changing it to false, it still displays the message. No, it doesn't freeze. This is what happens: I walk on to the tile, the message pops up, then I can continue walking, instead of getting pushed back.
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • This is very strange; after changing it to false, it still displays the message. No, it doesn't freeze. This is what happens: I walk on to the tile, the message pops up, then I can continue walking, instead of getting pushed back.

    Wait... what game are you hacking?
    If you are hacking Fire Red/Leaf Green version, then this is baffling, but if you are hacking R/S/E then you are probably using the incorrect movement command!

    (I don't have the list anymore, but I am sure you can find it somewhere here on the forums.)
     
    38
    Posts
    15
    Years
    • Seen Nov 26, 2023
    Could it be my rom, or would there be other symptoms? Everything else seems to work fine for me, just not movements.
     

    ExitWound

    Boggle
    79
    Posts
    16
    Years
    • Seen Sep 22, 2016
    Don't worry about your applymovement, it is fine.
    The thing is, you can't use a clearflag to make him appear like that so easily.
    INSTEAD, use the showsprite command.

    If you don't want him to hide, remove the hidesprite command I added at the bottom of the script.
    Be sure to post back here with the results.
    (Edits are in the quote, BOLD RED.

    Well, I thought that would work... But unfortunately it didn't. Any more suggestions?
     

    pressedlee

    Dark-Souled Hacker
    12
    Posts
    16
    Years
  • Hello everyone. I am new to all these mapping, spriting, and scripting things, but my hack ("Pokemon: Clear Orb" for those that wish to know :)) seems to be progressing quite nicely.

    I thought I would try my hand at scripting, and I seem to have bitten off more than I can chew.

    I am scripting the beginning of the game at which the player receives his or her first Pokemon. From what I have seen, originality is liked within hacks, so I thought I would try a completely new idea. Instead of forcing the player to choose from three Pokemon of the Grass, Water, or Fire types, I want to give the player the option of choosing from 17 different Pokemon, one from each of the types.

    The best way that I have seen to do this would be to attempt a multichoice script. However, when I attempted to learn how to do such a script by looking at a XSE Scripting guide, I was disheartened to see many, many lines of many, many commands that I simply do not understand.

    Scripting Guide seen here:
    Spoiler:


    I can do the basic Talking and Give Pokemon scripts, but that is where my knowledge ends. I am lost when it comes to flags, movement, and appearing and disappearing sprite scripts, and the mysterious compare, copyvar, multichoice, preparemsg, and waitmsg commands sprinkled throughout the multichoice script I found certainly are not for a beginner to attack alone.

    I believe I require a bit of help. I do not know where to start with this monster of a script.

    The end result should include a message box appearing in-game with the seventeen types listed...if such a feat is possible...

    I thank you all in-advance for the help I shall (hopefully) receive.
     

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • A script gone wrong

    I am trying to make an equivalent of the cycling road script, but with two squares instead of 5 and with it checking pokemon instead of a bike. I thought I had it right, but I was wrong. I set the Unknown and VarNumber correctly, but it just freezes the game. All I wanted was for if you had one pokemon you were allowed through, but if you had no pokemon, you were pushed back one to the left.

    Anyways, here is the script, I used XSE:

    Spoiler:
     
    33
    Posts
    14
    Years
    • Seen Jan 4, 2017
    Can someone please help me with this script. Been trying for ages =[

    #dynamic 0xoffset

    #org @start
    lock
    faceplayer
    msgbox @yesno
    callstd 0x5
    if 0x1 goto @yes
    if 0x1 goto @no
    release
    end

    #org @yes
    msgbox @yes2
    callstd 0x6
    release
    end

    #org @no
    msgbox @no2
    callstd 0x6
    release
    end

    #org @yesno
    = Yes or no?

    #org @yes2
    = You pressed Yes!

    #org @no2
    = You pressed No!

    Just can't get it to work =S
     

    Curt_09

    Also known as Chozo
    557
    Posts
    15
    Years
  • I am trying to make an equivalent of the cycling road script, but with two squares instead of 5 and with it checking pokemon instead of a bike. I thought I had it right, but I was wrong. I set the Unknown and VarNumber correctly, but it just freezes the game. All I wanted was for if you had one pokemon you were allowed through, but if you had no pokemon, you were pushed back one to the left.

    Anyways, here is the script, I used XSE:

    Spoiler:

    What the deuce?...
    Are you using XSE?

    For the text, you need to use "msgbox 0x(whatever kind of msgbox you want) @pointer", and then at the bottom "#org @pointer", drop a line and enter "= Your text."
    Also, you can't just insert movements as like that. #raw on its own is actually a command, like lock, faceplayer, applymovement, etc. You need applymovement 0xperson number of person you're moving, in this case the hero, which is FF, then @pointer which you then put #org @pointer, drop a line and then enter your #raw movements. Be sure to finish with the end movement #raw 0xFE, or your game will freeze up.

    Here, I'll fix it for you to see. I took away the real pointers and added new ones, XSE will automatically repoint them.
    See diegoisawesome's tut for info on msgbox numbers and apply and waitmovement.
    Spoiler:
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • Can someone please help me with this script. Been trying for ages =[

    #dynamic 0xoffset

    #org @start
    lock
    faceplayer
    msgbox @yesno 0x5
    if 0x1 goto @yes
    msgbox @no2 0x6
    release
    end


    #org @yes
    msgbox @yes2 0x6
    release
    end

    #org @no


    #org @yesno
    = Yes or no?

    #org @yes2
    = You pressed Yes!

    #org @no2
    = You pressed No!

    Just can't get it to work =S

    Fixed in the quote (In BOLD RED.)
    (XSE does not use Boxset or callstd... that is a pokescript habit...
    Also, when you are putting this script on a person, be sure that the first unknown value of that person is 03.

    ALSO, when you are doing simple Y/N stuff, just put the No selection below the 'if b_true goto thing)
     

    NintendoWalkthrudude

    Creator of Pokemon Ninja!
    49
    Posts
    14
    Years
  • What the deuce?...
    Are you using XSE?

    For the text, you need to use "msgbox 0x(whatever kind of msgbox you want) @pointer", and then at the bottom "#org @pointer", drop a line and enter "= Your text."
    Also, you can't just insert movements as like that. #raw on its own is actually a command, like lock, faceplayer, applymovement, etc. You need applymovement 0xperson number of person you're moving, in this case the hero, which is FF, then @pointer which you then put #org @pointer, drop a line and then enter your #raw movements. Be sure to finish with the end movement #raw 0xFE, or your game will freeze up.

    Here, I'll fix it for you to see. I took away the real pointers and added new ones, XSE will automatically repoint them.
    See diegoisawesome's tut for info on msgbox numbers and apply and waitmovement.
    Spoiler:
    Okay, I did what you said, however I encountered this error in XSE:

    Error 6 "Overflow" on line 11 Wrong Parameter Type

    I do not understand what I did wrong!

    Anyways here is the script:
    Spoiler:
     
    33
    Posts
    14
    Years
    • Seen Jan 4, 2017
    Fixed in the quote (In BOLD RED.)
    (XSE does not use Boxset or callstd... that is a pokescript habit...
    Also, when you are putting this script on a person, be sure that the first unknown value of that person is 03.

    ALSO, when you are doing simple Y/N stuff, just put the No selection below the 'if b_true goto thing)

    Thanks. But now, no matter what I press it says "You pressed no" =S
     

    0m3GA ARS3NAL

    Im comin' home...
    1,816
    Posts
    16
    Years
  • Okay, I did what you said, however I encountered this error in XSE:

    Error 6 "Overflow" on line 11 Wrong Parameter Type

    I do not understand what I did wrong!

    Anyways here is the script:
    Spoiler:
    I organized, fixed, and optimized your script.

    Code:
    #dynamic 0x8000000 (don't know what to put here so I just put it that way)
    
    #org @start
    [B][COLOR="Red"]checkflag 0x3FFF
    if b_true goto @done[/COLOR][/B]
    countpokemon
    compare LASTRESULT 0x2
    if 0x1 goto @havepokemon
    lock
    applymovement [B][COLOR="Red"]0x[Sprite ID][/COLOR][/B] @faceplayer
    waitmovement [B][COLOR="Red"]0x0[/COLOR][/B]
    msgbox [B][COLOR="Red"]@nopassage 0x4[/COLOR][/B]
    closeonkeypress
    applymovement 0xFF @goleft
    waitmovement [B][COLOR="Red"]0x0[/COLOR][/B]
    release
    end
    
    #org @havepokemon
    lock
    applymovement [B][COLOR="Red"]0x[Sprite ID][/COLOR][/B] @faceplayer
    waitmovement [B][COLOR="Red"]0x0[/COLOR][/B]
    msgbox [B][COLOR="Red"]@gothru 0x4[/COLOR][/B]
    [B][COLOR="Red"]setflag 0x3FFF[/COLOR][/B]
    closeonkeypress
    release
    end
    
    [B][COLOR="Red"]#org @done
    lock
    msgbox @gothru 0x6
    release
    end[/COLOR][/B]
    
    #org @gothru
    = Okay go on through.
    
    #org @nopassage
    = No pokemon? No passage!
    
    #org @faceplayer
    #raw 0x12 0xFE
    
    #org @goleft
    #raw 0x12 0x2 0xFE

    I gotta tell you, there were A LOT of things wrong here.
    For starters, message boxes should be written as;
    msgbox @text 0x[Box Type]
    NOT
    msgbox 0x[boxtype] @text

    Next, if you are using a compare function, you have to use 2 compares, you cant just have it say;
    compare LASTRESULT 0x2
    if 0x1 goto @text
    if 0x0 goto @text2

    It MUST be

    compare LASTRESULT 0x2
    if 0x1 goto @text
    compare LASTRESULT 0x2
    if 0x0 goto @text2

    Finally, Applymovements;
    When you are using an applymovent, you have to have it set up like this;

    applymovement 0x[Sprite ID] @movements

    You had it built like a pointer.
    (The Sprite ID is the ID number of the sprite in A-Map, you can find it at the top of the RIGHT SIDE of A-Map, when you have a sprite highlighted.)

    Also, waitmovement should be 0x0, until you know become a better scripter, but for now, 0x0 will work perfectly

    FINALLY, if you are going to have this script on a TILE (Like step on a certain spot and it activates.) Be sure to set it up as
    'Unknown 00 03'
    'Var Number 40 50'
    In A-Map

    If this script is a Person script (Like talk to the person, and it activates)
    Be sure to have the FIRST unknown thing in Advance Map, set to 03
    Do all this, and that script will work perfectly.
    (You will notice the script would normally repeat itself, I added an extra part to the script preventing this.)

    All of the changes I made are in BOLD RED.
     

    trebornosliw

    Learning
    516
    Posts
    14
    Years
    • Seen Jul 22, 2012
    Thanks again Om3ga_Ars3nal, that was kind of a stupid mistake for me to make with the hidesprite...
    I appreciate it.
     
    Status
    Not open for further replies.
    Back
    Top