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

destinedjagold

I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    Okay, so here's my problem: This whole script works perfectly fine, I mean, it's not exactly complicated, but it looks like it never sets the flag to warp you into the ship... any help appreciated!
    Spoiler:

    That is because your script jumped to the other addresses of your code. Your script is unable to reach your "setflag" command because you used "goto", meaning, it'll not return anymore.
    I suggest you try this one...

    Code:
    #dynamic 0x74009B
    #org @start
    checkflag 0x1000
    if 0x1 goto @done
    checkgender
    compare 0x800D 0x0
    if 0x1 [COLOR="red"]call[/COLOR] @solar
    compare 0x800D 0x1
    if 0x1 [COLOR="red"]call[/COLOR] @arial
    setflag 0x1000
    end
    
    #org @solar
    msgbox @1 0x3
    msgbox @3 0x4
    closeonkeypress
    [COLOR="red"]return[/COLOR]
    
    #org @arial
    msgbox @2 0x3
    msgbox @3 0x4
    closeonkeypress
    [COLOR="Red"]return[/COLOR]
    
    #org @done
    warp 0x1 0x5 0x7 0x0 0x0
    end
    
    #org @1
    = Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM SOLAR, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!
    
    #org @2
    = Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM ARIAL, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!
    
    #org @3
    = What?!?\pThey stole my POK\hB1MON?\lI can't believe this!\lI guess I'll have to hope that\lthere are some POK\hB1MON on board\lthat I can borrow until I get my\lold ones back.
     

    CyanCerulean

    Adorables
  • 56
    Posts
    10
    Years
    That is because your script jumped to the other addresses of your code. Your script is unable to reach your "setflag" command because you used "goto", meaning, it'll not return anymore.
    I suggest you try this one
    thank you!^^ I knew I must have been missing something!
     
  • 7
    Posts
    10
    Years
    • Seen Apr 22, 2014
    You have to put a setflag script right after the hidesprites.
    Then in a-map put the flag you used and type it into all 4 of the person id.
    Once you put the setflag you can get rid of the level script.
    About the setflag command, I accidentally pasted the un-edited script in which I didn't put checkflag and setflag (you can se a random #org @done which was the label I needed for when the flag was set).
    And it looks like the problem was that I didn't type the flag into the person IDs. Thank you!
     
  • 55
    Posts
    10
    Years
    • Seen Oct 18, 2014
    So I made this script today, a basic item giveaway. Long story short, after some item managing, I'm going to have mega stones. Can anybody check my work to see if I made a mistake or not? Or to see if I can shorten this up? Here's my first draft:

    #dynamic 0x[offset]

    #org @start
    lock
    faceplayer
    checkflag 0x[flag]
    msgbox @starters
    compare 0x800D 0x1
    if 0x1 goto @yes
    compare 0x800D 0x0
    if 0x0 goto @who
    end

    #org @yes
    msgbox @bulba 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes1
    compare 0x800D 0x0
    if 0x0 goto @no1
    end

    #org @yes1
    msgbox @bulba1 0x6
    giveitem 0x[item1] 0x1 0x0
    release
    end

    #org @no1
    msgbox @char 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes2
    compare 0x800D 0x0
    if 0x0 goto @no2

    #org @yes2
    msgbox @char1 0x6
    compare 0x800D 0x1
    if 0x1 goto @yes3
    compare 0x800D 0x0
    if 0x0 goto @no3

    #org @yes3
    msgbox @charX 0x6
    giveitem 0x[item2X] 0x1 0x0
    release
    end

    #org @no3
    msgbox @charY 0x6
    giveitem 0x[item2Y] 0x1 0x0
    release
    end

    #org @no2
    msgbox @squir 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes3
    compare 0x800D 0x0
    if 0x0 goto @no3

    #org @yes3
    msgbox @squir1 0x6
    giveitem 0x[item3] 0x1 0x0
    release
    end

    #org @no3
    msgbox @who 0x6
    release
    end

    #org @starters
    = Would you tell me who your starter was?

    #org @bulba
    = Was Bulbasaur your starter?

    #org @bulba1
    = Have fun with that Venusaurite!

    #org @char
    = No? So you chose Charmander?

    #org @charX
    = Do you want a Charizardite X?

    #org @charY
    = Do you want a Charizardite Y?

    #org @char1
    = Have fun with that Charizardite!

    #org @squir
    = No? So you chose Squirtle?

    #org @squir1
    = Have fun with that Blastoisite!

    #org @who
    = You're not going to tell me your starter? Shame on you!
     

    Teh Blazer

    Divider of Zero
  • 776
    Posts
    15
    Years
    So I made this script today, a basic item giveaway. Long story short, after some item managing, I'm going to have mega stones. Can anybody check my work to see if I made a mistake or not? Or to see if I can shorten this up? Here's my first draft:

    I think you could actually do quote a bit to clean it up, but it's by no means a bad script. But here are some ideas:

    -You could move the "msgbox @starters" to before the checkflag.
    -You need a place to go to after you check the flag in the beginning.
    -You don't need the "compare 0x800D 0x0/if 0x0 goto @no1" because if you say yes, the game will just go to the next command and instead of creating an entire new command, since no is the only other option you can just use the "goto" command and save one whole line.
    -You forgot the "setflag" command to make sure the player can't loop the script forever.
    -And there's no way to check that the player actually got [insert starter here] as their starter and nothing in your script refrains them from getting a Venesaurite when they chose Squirtle as their starter. A remedy for this would be to set a var when they receive their pokemon in the beginning and then check for that var in this script to confirm that the var is the same as the starter they claim to have. If you're clever enough, you only need one var to do it all. :P
     
  • 10
    Posts
    10
    Years
    • Seen Jan 29, 2017
    My friends and I are making our first hack (FireRed base), and we need to edit the speeches the Gym Leaders give when you talk to them.
    However, the scripts refuse to compile, picking up something that probably shouldn't be an error as an error, usually a "Type Mismatch" involving "compare"

    We're using XSE and only editing what they say.

    I apologize if this is a really basic problem, but I've gone through a couple tutorials and failed to find a solution. Thanks for any help!
     

    destinedjagold

    I do not exist.
  • 8,593
    Posts
    17
    Years
    • Seen May 26, 2024
    My friends and I are making our first hack (FireRed base), and we need to edit the speeches the Gym Leaders give when you talk to them.
    However, the scripts refuse to compile, picking up something that probably shouldn't be an error as an error, usually a "Type Mismatch" involving "compare"

    We're using XSE and only editing what they say.

    I apologize if this is a really basic problem, but I've gone through a couple tutorials and failed to find a solution. Thanks for any help!

    Post your script here so we can see what is wrong.
    Wrap your script around the [CODE][/CODE] tags as well.
     
  • 55
    Posts
    10
    Years
    • Seen Oct 18, 2014
    My friends and I are making our first hack (FireRed base), and we need to edit the speeches the Gym Leaders give when you talk to them.
    However, the scripts refuse to compile, picking up something that probably shouldn't be an error as an error, usually a "Type Mismatch" involving "compare"

    We're using XSE and only editing what they say.

    I apologize if this is a really basic problem, but I've gone through a couple tutorials and failed to find a solution. Thanks for any help!

    Well if you're only editing the text and nothing else, you should use A-Text. It's a lot less complicated than doing the XSE method, plus it tells you when the in-game text box ends.
     
  • 55
    Posts
    10
    Years
    • Seen Oct 18, 2014
    I think you could actually do quote a bit to clean it up, but it's by no means a bad script. But here are some ideas:

    -You could move the "msgbox @starters" to before the checkflag.
    -You need a place to go to after you check the flag in the beginning.
    -You don't need the "compare 0x800D 0x0/if 0x0 goto @no1" because if you say yes, the game will just go to the next command and instead of creating an entire new command, since no is the only other option you can just use the "goto" command and save one whole line.
    -You forgot the "setflag" command to make sure the player can't loop the script forever.
    -And there's no way to check that the player actually got [insert starter here] as their starter and nothing in your script refrains them from getting a Venesaurite when they chose Squirtle as their starter. A remedy for this would be to set a var when they receive their pokemon in the beginning and then check for that var in this script to confirm that the var is the same as the starter they claim to have. If you're clever enough, you only need one var to do it all. :P

    This was my first script ever, and you saying that it wasn't bad was really boosting to my confidence in my game. Now onto the serious stuff.

    With the first four things you listed, should the opening of the script look like this instead? I changed some stuff to make it less confusing for myself.
    #dynamic 0xFFFFFF

    #org @start
    lock
    faceplayer
    checkflag 0x1
    if 0x1 goto @starters
    msgbox @1 0x6
    setflag 0x1
    release
    end

    Now for the variable, I haven't figured out to do that yet. Can you give me an example of the "check starter" variable? I'm sure I could adapt that to my own script in no time if I just knew what I was doing. If you wanna see the entire Draft 2 script, with ALOT of changing and it's not fully complete, here it is below:
    #dynamic 0xFFFFFF

    #org @start
    lock
    faceplayer
    checkflag 0x1
    if 0x1 goto @starters
    msgbox @1 0x6
    setflag 0x1
    release
    end

    #org @starters
    msgbox @[talks about starter] 0x6
    clearflag 0x1
    release
    end

    #org @item <---That is AFTER it reads the starter and you choose "YES."
    giveitem 0x[item] 0x[amount] MSG_OBTAIN

    #org @1
    = Mind if I check your starter?
    Feel free to add whatever is needed, preferably in a different color, to help check a starter and then give a specific item to specific Pokemon. (Ex. Bulbasaur gets the Miracle Seed, Charmander gets Charcoal, etc.)
     
  • 7
    Posts
    10
    Years
    • Seen Apr 22, 2014
    Can you tell me why every time I use applymovement on the main character I can't move him anymore after the end of the animation? For example:
    Spoiler:

    EDIT: Solved. I don't know why, but looks like multiple waitmovement commands interferred with the script, so I only put one applymovement and one waitmovement like this:
    Spoiler:
     
    Last edited:

    C me

    Creator of Pokemon League Of Legends
  • 681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    The following is the script for the Ho-oh battle in pokemon gold. How can I change this so I can have the same script for the other gen 1 and 2 legendaries? What numbers do I change and what are the numbers? I don't want to replace the Ho-oh script by the way.

    Thank you for your help

    Spoiler:


    P.S I use PKSV for editing scripts and Translhextion for a lot of stuff.
     

    Teh Blazer

    Divider of Zero
  • 776
    Posts
    15
    Years
    This was my first script ever, and you saying that it wasn't bad was really boosting to my confidence in my game. Now onto the serious stuff.

    With the first four things you listed, should the opening of the script look like this instead? I changed some stuff to make it less confusing for myself.


    Now for the variable, I haven't figured out to do that yet. Can you give me an example of the "check starter" variable? I'm sure I could adapt that to my own script in no time if I just knew what I was doing. If you wanna see the entire Draft 2 script, with ALOT of changing and it's not fully complete, here it is below:

    Feel free to add whatever is needed, preferably in a different color, to help check a starter and then give a specific item to specific Pokemon. (Ex. Bulbasaur gets the Miracle Seed, Charmander gets Charcoal, etc.)

    Well people tend to give less credit than what they're do and your script was waaay better than my first script by far. :P

    Before I go into details, I'd like to point you to this thread (https://www.pokecommunity.com/showthread.php?t=302347) as it is very helpful in showing new hackers what flags are safe to use and what flags the game uses beforehand so messing with them would be catastrophic to the game.

    Second, I know you know that when you ask a yes or no question, you're going to be using the "msgbox @[blahblah] 0x5" command, not the 0x6 one. Since yo're using the 0x5 command, you know that you're gonna have to be using the "compare 0x800D 0x1/if 0x1 goto @yes" thing for at least one of the answers (if you still don't understand why you don't need it the second time, feel free to ask).

    Thirdly, the dynamic at the top is where the game starts to find free space to put your script in and so when you put "dynamic 0xFFFFFF" you're telling XSE to start insterting your script starting at the space "0xFFFFFF" which is at the very end of the ROM. Free space starts at 0x800000 for Fire Red, so you can just use that instead.

    Fourthly, you placed the setflag 0x1 so that when you activate the script in-game, the NPC will face you, the game will check that the flag was set and since it wasn't it won't do the "goto", the NPC will ask the question, then the game will set the flag and then the script will end. Then once you talk to the NPC again, it will read the flag that you set and then do the goto, but clearly that's not optimal.

    Fifthly, and finally, the setvar for the starters is a bit of a complicated thing because it requires two scripts to get it done, but easy once you see how simple it is. The link I showed you also provided a list of the variables that can be used safely with a few exceptions, so for this demonstration I'll use the first safe var, 4012. Say the player picks a Bulbasaur, then after you do the givepokemon command write "setvar 0x4012 0x1" so now you know that the variable 4012 has been given the number 1 because of the Bulbasaur. If they chose Charmander, then use "setvar 0x4012 0x2" so the number 2 is associated with Charmander. Same with Squirtle, "setvar 0x4012 0x3" right after the givepokemon command and know in your mind that if 4012 is 3 if and only if Squirtle was chosen--as the number would be different for every pokemon.

    (Sorry, had to break this into two paragraphs because one big chunk can be daunting to read)
    Now right after the NPC asks the player what pokemon they got in your script right now, If the player chooses yes (compare 0x800D 0x1/if 0x1 goto @yes) then at the beginning of your new "org @yes" string put the "compare 0x4012 0x1 (or whatever it is, depending on the pokemon the player claims of having) and the "if 0x0 goto @lying" where the "#org @lying" string is the NPC saying they don't believe the player and ending the script. I know I'm not the best at explaining, so I went ahead and fixed the first part of your script for you, but only for Bulbasaur so you can get a feel.

    #dynamic 0xFFFFFF0x800000

    #org @start
    lock
    faceplayer
    checkflag 0x1(anything here that is safe on the thread I showed you)
    if 0x1 goto @starters@finished
    msgbox @1 0x60x5
    setflag 0x1
    compare 0x800D 0x1
    if 0x1 goto @yes

    msgbox @no 0x6
    release
    end

    #org @starters@finished
    msgbox @[talks about you already got your item] 0x6
    clearflag 0x1
    release
    end

    #org @item@yes
    giveitem 0x[item] 0x[amount] MSG_OBTAIN
    msgbox @bulbasaur 0x5
    compare 0x800D 0x1
    if 0x1 goto @yesbulba

    ...(These are the same for
    ...Charmander and Squirtle)
    goto @yes (This makes sure that if the player said no to all of them, the script would loop back to the beginning so they'd have to answer yes sometime)
    end

    #org @yesbulba
    compare 0x4012 0x1
    if 0x0 goto @notbulba
    giveitem 0x[item] 0x1 MSG_OBTAIN
    msgbox @1 0x6
    setflag 0x(Whatever flag you plan to use, just make sure it's the same one you check in the beginning)
    release
    end


    #org @notbulba
    msgbox @bulbanotstarter 0x6
    release
    end


    #org @1
    = Mind if I check your starter?

    #org @6
    = You're not going to tell me your starter? Shame on you!


    #org @bulbasaur
    = Was Bulbasaur your starter?


    #org @1
    = Enjoy your (insert item here)!


    #org @bulbanotstarter
    = Wait a second, I don't think Bulbasaur was your starter. Go away! I have no time for liars!

    Now this edit combined most of what I was talking about, including the right starter check. Things could be done differently, but hopefully you'll understand through all that chaos. One final note I'd like to leave is that the game won't automatically fit your text into the textboxes and if your line is too long it will just run through the text box and look unprofessional. There is a text box adjuster or something like that in XSE that you can put in your words and it will automatically add in the necessary commands to make the words fit in the box, so I'd recommend using that. As usual, if you have any questions, don't hesitate to respond to this thread! Happy hacking!
     
    Last edited:
  • 55
    Posts
    10
    Years
    • Seen Oct 18, 2014
    Well people tend to give less credit than what they're do and your script was waaay better than my first script by far. :P

    Before I go into details, I'd like to point you to this thread (https://www.pokecommunity.com/showthread.php?t=302347) as it is very helpful in showing new hackers what flags are safe to use and what flags the game uses beforehand so messing with them would be catastrophic to the game.

    Second, I know you know that when you ask a yes or no question, you're going to be using the "msgbox @[blahblah] 0x5" command, not the 0x6 one. Since yo're using the 0x5 command, you know that you're gonna have to be using the "compare 0x800D 0x1/if 0x1 goto @yes" thing for at least one of the answers (if you still don't understand why you don't need it the second time, feel free to ask).

    Thirdly, the dynamic at the top is where the game starts to find free space to put your script in and so when you put "dynamic 0xFFFFFF" you're telling XSE to start insterting your script starting at the space "0xFFFFFF" which is at the very end of the ROM. Free space starts at 0x800000 for Fire Red, so you can just use that instead.

    Fourthly, you placed the setflag 0x1 so that when you activate the script in-game, the NPC will face you, the game will check that the flag was set and since it wasn't it won't do the "goto", the NPC will ask the question, then the game will set the flag and then the script will end. Then once you talk to the NPC again, it will read the flag that you set and then do the goto, but clearly that's not optimal.

    Fifthly, and finally, the setvar for the starters is a bit of a complicated thing because it requires two scripts to get it done, but easy once you see how simple it is. The link I showed you also provided a list of the variables that can be used safely with a few exceptions, so for this demonstration I'll use the first safe var, 4012. Say the player picks a Bulbasaur, then after you do the givepokemon command write "setvar 0x4012 0x1" so now you know that the variable 4012 has been given the number 1 because of the Bulbasaur. If they chose Charmander, then use "setvar 0x4012 0x2" so the number 2 is associated with Charmander. Same with Squirtle, "setvar 0x4012 0x3" right after the givepokemon command and know in your mind that if 4012 is 3 if and only if Squirtle was chosen--as the number would be different for every pokemon.

    (Sorry, had to break this into two paragraphs because one big chunk can be daunting to read)
    Now right after the NPC asks the player what pokemon they got in your script right now, If the player chooses yes (compare 0x800D 0x1/if 0x1 goto @yes) then at the beginning of your new "org @yes" string put the "compare 0x4012 0x1 (or whatever it is, depending on the pokemon the player claims of having) and the "if 0x0 goto @lying" where the "#org @lying" string is the NPC saying they don't believe the player and ending the script. I know I'm not the best at explaining, so I went ahead and fixed the first part of your script for you, but only for Bulbasaur so you can get a feel.



    Now this edit combined most of what I was talking about, including the right starter check. Things could be done differently, but hopefully you'll understand through all that chaos. One final note I'd like to leave is that the game won't automatically fit your text into the textboxes and if your line is too long it will just run through the text box and look unprofessional. There is a text box adjuster or something like that in XSE that you can put in your words and it will automatically add in the necessary commands to make the words fit in the box, so I'd recommend using that. As usual, if you have any questions, don't hesitate to respond to this thread! Happy hacking!

    Thank you so much for a correct script! So at pointer @yes, do I create multiple versions of them, each being for a different starter?
     
  • 105
    Posts
    12
    Years
    Hello friends I am making a script such that when i step on a tile my brother[in game] comes and asks me if i m going to start my journey if i say yes it should give me pokeballs if no he will return to his place but when i compile it it says something in a wierd language here is the original script

    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    checkflag 0x1300 
    if 0x1 goto @apologize
    applymovement 0x1 @move
    waitmovement 0x0
    msgbox @are 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes
    compare 0x800D 0x0
    if 0x1 goto @no
    setflag 0x1300
    end
    
    #org @yes
    msgbox @yes 0x6
    giveitem 0x4 0xA 0x0
    msgbox @go 0x6
    applymovement 0x1 @moving
    waitmovement 0x0
    release
    end
    
    #org @no
    msgbox @no 0x6
    applymovement 0x1 @moved
    waitmovement 0x0
    release
    end
    
    #org @apologize
    release
    end
    
    #org @are
    = SAM: Hi bro DAD told me you are\ngoing to start your journey?
    
    #org @blurry
    = SAM: Here is a present for you\nthese ten poke'balls will help you\lon your journey.
    
    #org @go
    = SAM: I am going now.See you!!!
    
    #org @alien
    = SAM: I will be waiting for you\npicking this present.
    
    #org @move
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @moving
    #raw 0x11
    #raw 0x11
    #raw 0x12
    #raw 0x60
    #raw 0x11 
    #raw 0xFE
    
    #org @moved
    #raw 0xC
    #raw 0xC
    #raw 0xC
    #raw 0xFE

    and here is the compiled script

    Code:
    '---------------
    #org 0x80045C
    lock
    checkflag 0x1300
    if 0x1 goto 0x88004D1
    applymovement 0x1 0x88005C0
    waitmovement 0x0
    msgbox 0x88004D4 MSG_YESNO '"SAM: Hi bro DAD told me you are\ng..."
    compare LASTRESULT 0x1
    if 0x1 goto 0x8800493
    compare LASTRESULT 0x0
    if 0x1 goto 0x88004BC
    setflag 0x1300
    end
    
    '---------------
    #org 0x8004D1
    release
    end
    
    '---------------
    #org 0x800493
    msgbox 0x8800493 MSG_NORMAL '"Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì..."
    giveitem 0x4 0xA MSG_OBTAIN
    msgbox 0x8800568 MSG_NORMAL '"SAM: I am going now.See you!!!"
    applymovement 0x1 0x88005C5
    waitmovement 0x0
    release
    end
    
    '---------------
    #org 0x8004BC
    msgbox 0x88004BC MSG_NORMAL '"Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿  \h6CÁ"
    applymovement 0x1 0x88005CC
    waitmovement 0x0
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8004D4
    = SAM: Hi bro DAD told me you are\ngoing to start your journey?
    
    #org 0x800493
    = Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì Ô âÈ\h80ËÌÉ\h4FÀ KÈ\h80Ë¿  \h6CÁ
    
    #org 0x800568
    = SAM: I am going now.See you!!!
    
    #org 0x8004BC
    = Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿  \h6CÁ
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x8005C0
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x8005C5
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x60 'Hide
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x8005CC
    #raw 0xC 'Step Down (Slow)
    #raw 0xC 'Step Down (Slow)
    #raw 0xC 'Step Down (Slow)
    #raw 0xFE 'End of Movements
    
    [CODE/]
     
    Last edited:

    DaisukE

    Just feel it burning ^^
  • 113
    Posts
    11
    Years
    Hello friends I am making a script such that when i step on a tile my brother[in game] comes and asks me if i m going to start my journey if i say yes it should give me pokeballs if no he will return to his place but when i compile it it says something in a wierd language here is the original script

    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    checkflag 0x1300 
    if 0x1 goto @apologize
    applymovement 0x1 @move
    waitmovement 0x0
    msgbox @are 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes
    compare 0x800D 0x0
    if 0x1 goto @no
    setflag 0x1300
    end
    
    #org @yes
    msgbox @yes 0x6
    giveitem 0x4 0xA 0x0
    msgbox @go 0x6
    applymovement 0x1 @moving
    waitmovement 0x0
    release
    end
    
    #org @no
    msgbox @no 0x6
    applymovement 0x1 @moved
    waitmovement 0x0
    release
    end
    
    #org @apologize
    release
    end
    
    #org @are
    = SAM: Hi bro DAD told me you are\ngoing to start your journey?
    
    #org @blurry
    = SAM: Here is a present for you\nthese ten poke'balls will help you\lon your journey.
    
    #org @go
    = SAM: I am going now.See you!!!
    
    #org @alien
    = SAM: I will be waiting for you\npicking this present.
    
    #org @move
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @moving
    #raw 0x11
    #raw 0x11
    #raw 0x12
    #raw 0x60
    #raw 0x11 
    #raw 0xFE
    
    #org @moved
    #raw 0xC
    #raw 0xC
    #raw 0xC
    #raw 0xFE
    and here is the compiled script

    Code:
    '---------------
    #org 0x80045C
    lock
    checkflag 0x1300
    if 0x1 goto 0x88004D1
    applymovement 0x1 0x88005C0
    waitmovement 0x0
    msgbox 0x88004D4 MSG_YESNO '"SAM: Hi bro DAD told me you are\ng..."
    compare LASTRESULT 0x1
    if 0x1 goto 0x8800493
    compare LASTRESULT 0x0
    if 0x1 goto 0x88004BC
    setflag 0x1300
    end
    
    '---------------
    #org 0x8004D1
    release
    end
    
    '---------------
    #org 0x800493
    msgbox 0x8800493 MSG_NORMAL '"Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì..."
    giveitem 0x4 0xA MSG_OBTAIN
    msgbox 0x8800568 MSG_NORMAL '"SAM: I am going now.See you!!!"
    applymovement 0x1 0x88005C5
    waitmovement 0x0
    release
    end
    
    '---------------
    #org 0x8004BC
    msgbox 0x88004BC MSG_NORMAL '"Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿  \h6CÁ"
    applymovement 0x1 0x88005CC
    waitmovement 0x0
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x8004D4
    = SAM: Hi bro DAD told me you are\ngoing to start your journey?
    
    #org 0x800493
    = Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì Ô âÈ\h80ËÌÉ\h4FÀ KÈ\h80Ë¿  \h6CÁ
    
    #org 0x800568
    = SAM: I am going now.See you!!!
    
    #org 0x8004BC
    = Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿  \h6CÁ
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x8005C0
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x8005C5
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x60 'Hide
    #raw 0x11 'Step Up (Normal)
    #raw 0xFE 'End of Movements
    
    #org 0x8005CC
    #raw 0xC 'Step Down (Slow)
    #raw 0xC 'Step Down (Slow)
    #raw 0xC 'Step Down (Slow)
    #raw 0xFE 'End of Movements
    
    [CODE/][/QUOTE]
    
    how come u use blurry and alien there in your script???And you have kept pointers to two place like of yes there are two pointers......In a script there could never be two pointers at a time.
    
    Your mistakes corrected are in bold
    
    
    [SPOILER]
    
    #dynamic 0x71A3AC
    
    #org @start
    lock
    checkflag 0x1300 
    if 0x1 goto @apologize
    applymovement 0x1 @move
    waitmovement 0x0
    msgbox @are 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes
    compare 0x800D 0x0
    if 0x1 goto @no
    setflag 0x1300
    end
    
    #org @yes
    msgbox @[B]yes1[/B] 0x6
    giveitem 0x4 0xA 0x0
    msgbox @go 0x6
    applymovement 0x1 @moving
    waitmovement 0x0
    release
    end
    
    #org @no
    msgbox @[B]no1[/B] 0x6
    applymovement 0x1 @moved
    waitmovement 0x0
    release
    end
    
    #org @apologize
    release
    end
    
    #org @are
    = SAM: Hi bro DAD told me you are\ngoing to start your journey?
    
    #org @[B]yes1[/B]
    = SAM: Here is a present for you\nthese ten poke'balls will help you\lon your journey.
    
    #org @go
    = SAM: I am going now.See you!!!
    
    #org @[B]no1[/B]
    = SAM: I will be waiting for you\npicking this present.
    
    #org @move
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @moving
    #raw 0x11
    #raw 0x11
    #raw 0x12
    #raw 0x60
    #raw 0x11 
    #raw 0xFE
    
    #org @moved
    #raw 0xC
    #raw 0xC
    #raw 0xC
    #raw 0xFE
    [/SPOILER]
    
    Once again asking do anyone know how to bring those images of both the opponent and player like during the elite four matches....plz help
     

    ShyRayq

    Unprofessional Unprofessional
  • 1,856
    Posts
    16
    Years
    • Seen May 21, 2024
    Once again asking do anyone know how to bring those images of both the opponent and player like during the elite four matches....plz help

    Well, I believe they are specifically for Elite Four matches.
    OR, you can take the easy route, insert Jambo's ASM from the Research be Development section to allow Pre-Battle Mugshots. You can do this for any battle and even customize the palette.
     

    Teh Blazer

    Divider of Zero
  • 776
    Posts
    15
    Years
    Thank you so much for a correct script! So at pointer @yes, do I create multiple versions of them, each being for a different starter?

    Yes, at the "#org @yes" place the "..."s that I put there were meant to be the same thing as the bulbasaur check except for charmander and squirtle again. Then you point to anything (for consistency's sake I just use yeschar and yessquirt just so I know which one is which) and do the same thing as the bulbasaur except for the respective pokemon. I didn't write it out in full because, well, you know, it's better if you figure out why I put what goes where to fill in the blanks so next time it'll be easier for you to write a script similar to this one. Enjoy. :)
     
  • 0
    Posts
    10
    Years
    • Seen Mar 18, 2018
    Guys, lately, none of my scripts will compile right, as when I compile then on XSE, they don't show up when I check them. here is my most recent script:
    Spoiler:
     
  • 3
    Posts
    10
    Years
    Guys, lately, none of my scripts will compile right, as when I compile then on XSE, they don't show up when I check them. here is my most recent script:
    Spoiler:
    Spoiler:
     
  • 0
    Posts
    10
    Years
    • Seen Mar 18, 2018
    #dynamic 0x1C5BA8 does not seem to point to a free offset. As a rule of the thumb, the free offsets start from 0x800000. Have you used Free Space Finder?

    Next, you have duplicated your static org (#org 0x1C5BA8 and #org @1C5BA8). You do not need #org 0x1C5BA8. Also, #org @1C5BA8 cannot be labelled with an offset (@1C5BA8). You need to replace @1C5BA8 with a human word such as @start.

    Pokemart normally follows this form (you do not need a type, such as 0x6, in msgintro):

    preparemsg @msgintro
    waitmsg
    pokemart @values
    msgbox @msgbye 0x4

    Finally, you need to define your messages in a similar way uou have defined @items, so for example:

    #org @1
    = Hey, I sell potions and Pokeballs.\pWhat would you like?

    I've marked the corrections in red.

    Spoiler:

    OK, thanks, but I used FSF and I've never gotten anything that's 800000+
    EDIT: The message works fine, but then it freezes. The music still plays but the man doesn't show the items list.
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top