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

Anselection

Malicious Mapper
174
Posts
14
Years
    • Seen Dec 20, 2011
    I already had the spaces in the script. They just didn't copy over. And I tried taking out the second waitmovement. It still crashed XSE. I thought you were supposed to do a waitmovement after every applymovement so it could wait the appropriate amount of time for the movement? Thanks in advance to whoever can get the answer. /:
     
    1,619
    Posts
    16
    Years
  • I have no idea why it isn't displaying the text :<

    Did you set his person ID to 1000? If you haven't that would explain why his sprite is reappearing. I'm not sure why you put 'clearflag 0x1000' in org @done because that would be allowing you to repeat the script again - It may also have something to to with being able to see him again as well.
    Okay, I've done everything you said. But the text is still not coming up, another thing is that the sprite re-appeared for the second time and once the script activated again, then the sprite disappeared forever and the script wouldn't work again. So, you fixed something I guess, but not all of the problems.
     
    21
    Posts
    14
    Years
    • Seen Mar 26, 2021
    I already had the spaces in the script. They just didn't copy over. And I tried taking out the second waitmovement. It still crashed XSE. I thought you were supposed to do a waitmovement after every applymovement so it could wait the appropriate amount of time for the movement? Thanks in advance to whoever can get the answer. /:

    waitmovement 0x0 makes it so that it will wait just enough time for the applymovement to finish if you wanted it to wait some more you can use pause
     
    21
    Posts
    14
    Years
    • Seen Mar 26, 2021
    Okay, I've done everything you said. But the text is still not coming up, another thing is that the sprite re-appeared for the second time and once the script activated again, then the sprite disappeared forever and the script wouldn't work again. So, you fixed something I guess, but not all of the problems.
    put a pause after the playsong command something like pause 0x5
    and you cleared the 0x1000 flag after checking if it is done.. change it

    Can you answer my question 2 posts above that one?

    edit wait a sec
    btw.. by crash do you meant that your XSE closes when you compile? or it just pops up a dialog box?
     
    Last edited:

    Anselection

    Malicious Mapper
    174
    Posts
    14
    Years
    • Seen Dec 20, 2011
    As in, I click the debug button then it says "XSE has stopped working. Windows is looking for a solution to the problem." -Closes out- But, it doesn't do that for a basic talking script.
     
    21
    Posts
    14
    Years
    • Seen Mar 26, 2021
    As in, I click the debug button then it says "XSE has stopped working. Windows is looking for a solution to the problem." -Closes out- But, it doesn't do that for a basic talking script.
    im just taking a guess but it might be from those apostrophes['] idk why though it should work even with the those in, i removed them from that huge chunk of text and its compiling now.. also one of your dynamic label done needs to be changed to done1

    here's what'd it look like
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x900
    if 0x1 goto @done1
    setflag 0x900
    applymovement 0x01 @move
    waitmovement 0x0
    applymovement 0xFF @move2
    waitmovement 0x0
    checkflag 0x82F
    if 0x1 goto @momma
    msgbox @msg1 0x6
    setflag 0x82F
    release
    end
    
    #org @done1
    release
    end
    
    #org @momma
    msgbox @msg2 0x6
    release
    end
    
    #org @msg2
    = Hey, \v\h01! Did you clean your room\nlike I asked you to earlier?
    
    #org @msg1
    = I have a surprise for you! You\nremember how you ve always\lwanted a Pokémon? Well, I have\ldecided it is time for you to get\lone! Professor John said he will\lbe waiting for you in his lab to\lgive you a choice of\lthree Pokémon! You know, last\lnight I saw a commercial about\lthe Elite Four. Turns out\lthey are doing it one last time.\lThey called it their Swan Song.\lYou should try to join it! I\lthink it would be great! I know\lyou have always wanted to be a\lTrainer. Now is your chance! Oh,\lby the way. I also got you these\lshoes. They might just make your\ljourney easier.
    
    #org @move
    #raw 0x1
    #raw 0xFE
    
    #org @move2
    #raw 0xA
    #raw 0xC
    #raw 0xFE
     
    21
    Posts
    14
    Years
    • Seen Mar 26, 2021


    It still does the same thing. :\

    we've overlooked the biggest thing you're missing.. a setflag.. XD
    also are you sure the pause doesnt work?

    if i were to re-write it, it'd be
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x1000
    if 0x0 goto @next
    release
    end
    
    #org @next
    applymovement 0x04 @move1
    waitmovement 0x0
    playsong 0x0110 0x0
    pause 0x5
    msgbox @1 0x6
    applymovement 0x04 @move2
    waitmovement 0x0
    fadesong 0x12c
    hidesprite 0x04
    setflag 0x1000
    release
    end
    
    #org @move1
    #raw 0x02
    #raw 0x62
    #raw 0xA
    #raw 0xFE
    
    #org @move2
    #raw 0xB
    #raw 0xB
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0xFE
    
    #org @1
    = Hello, [player]. I've found\nsomething really strange near the\llake. Come meet me there, I'll be\lwaiting for you. See ya there!
     

    Anselection

    Malicious Mapper
    174
    Posts
    14
    Years
    • Seen Dec 20, 2011
    For Fire Red. This script is supposed to keep pushing you back until you select a Pokemon, then once you step on the tile again, it's supposed to take you to the Prof. But, it just freezes when I step on it. I set the unknown on A-Map to 0003 and the var number to 4050. Can anyone help me with this? Thanks in advance.

    Spoiler:
     
    1,619
    Posts
    16
    Years
  • we've overlooked the biggest thing you're missing.. a setflag.. XD
    also are you sure the pause doesnt work?

    if i were to re-write it, it'd be
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x1000
    if 0x0 goto @next
    release
    end
    
    #org @next
    applymovement 0x04 @move1
    waitmovement 0x0
    playsong 0x0110 0x0
    pause 0x5
    msgbox @1 0x6
    applymovement 0x04 @move2
    waitmovement 0x0
    fadesong 0x12c
    hidesprite 0x04
    setflag 0x1000
    release
    end
    
    #org @move1
    #raw 0x02
    #raw 0x62
    #raw 0xA
    #raw 0xFE
    
    #org @move2
    #raw 0xB
    #raw 0xB
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0x8
    #raw 0xFE
    
    #org @1
    = Hello, [player]. I've found\nsomething really strange near the\llake. Come meet me there, I'll be\lwaiting for you. See ya there!

    Hm, I've tried it, but it still does the same thing. If I were to send you the ips, would you consider trying to fix it that way?
     

    Satoshi Ookami

    Memento Mori
    14,254
    Posts
    15
    Years
  • For Fire Red. This script is supposed to keep pushing you back until you select a Pokemon, then once you step on the tile again, it's supposed to take you to the Prof. But, it just freezes when I step on it. I set the unknown on A-Map to 0003 and the var number to 4050. Can anyone help me with this? Thanks in advance.

    Spoiler:
    I can see 3 errors in the first 3 lines after @start :D
    Okay, lemme explain a little =)
    1) Use flags that are over 200 (or better 1000). Flag 1 is imo already set for item script.
    2) You must direct (which is goto command) to new string of script, you cannot direct to movement =)
    So in your case it should be like this:
    checkflag 0x1000
    if 0x0 goto @string1
    .
    .
    .
    (continuation of script which is done after flag 1000 is set =))

    #org @string1
    applymovement 0x(number of person in hex) @1
    waitmovement 0x0
    end

    #org @1
    movement

    Etc... =)) I hope you understand what I meant =)
     

    Whispeon

    Newfound Ghosttype Eeveelution
    15
    Posts
    14
    Years
  • I have searched the whole thread and my problem has arisen on a number of times, it's just people don't seem to give them an answer.
    I am using PokeScript (I just find it a lot easier to use) and I am having trouble compiling this script:

    Spoiler:


    Whenever I try to compile. It always says "Run-time error '13': Type mismatch"
    I really need an answer for this. (Before any of you speculate, yes this is the starter script, and yes, the starter is Caterpie. I'm just THAT lame)
     

    Anselection

    Malicious Mapper
    174
    Posts
    14
    Years
    • Seen Dec 20, 2011
    This is also for Fire Red. I made this script for the first rival battle, and when I go to debug or compile it, XSE closes itself out. I've tried redownloading XSE and it didn't work.

    Code:
    #dynamic 0x800000
     
    #org @start
    checkflag 0x1001
    if 0x1 goto @done1
    lock
    applymovement 0x01 @move2
    waitmovement 0x0
    trainerbattle 0x0 0x001 0x0 @before @after
    msgbox 0x6 @BeforeWalkingAway
    applymovement 0x01 @move3
    waitmovement 0x0
    hidesprite 0x800F
    setflag 0x1001
    release
    end
     
    #org @done1
    release
    end
     
    #org @before
    =  Well, hey there stranger.\nWhat are you doing around here in\lthe wild? Oh, you are a Pokémon\ltrainer, too? We should battle!\lYeah, come on!
     
    #org @after
    = Whoa! You're really strong!
     
    #org @BeforeWalkingAway
    = Whoa, that Pokémon is quite\nthe fighter. My name is [RIVAL]. And\lyou are? … Oh, your name is\l[PLAYER]? Look, I can't stay long. I\lgotta go beat the gym leader in\lAsidia City if I wanna become\lthe final Elite Four Champion.\lSee ya!
     
    #org @move2
    #raw 0x62
    #raw 0x11
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0xFE
     
    #org @move3
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F

    So, to whoever can fix this: thank you. SO much.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Age 33
    • Seen Dec 23, 2023
    This is also for Fire Red. I made this script for the first rival battle, and when I go to debug or compile it, XSE closes itself out. I've tried redownloading XSE and it didn't work.

    Code:
    #dynamic 0x800000
     
    #org @start
    checkflag 0x1001
    if 0x1 goto @done1
    lock
    applymovement 0x01 @move2
    waitmovement 0x0
    trainerbattle 0x0 0x001 0x0 @before @after
    msgbox 0x6 @BeforeWalkingAway
    applymovement 0x01 @move3
    waitmovement 0x0
    hidesprite 0x800F
    setflag 0x1001
    release
    end
     
    #org @done1
    release
    end
     
    #org @before
    =  Well, hey there stranger.\nWhat are you doing around here in\lthe wild? Oh, you are a Pokémon\ltrainer, too? We should battle!\lYeah, come on!
     
    #org @after
    = Whoa! You're really strong!
     
    #org @BeforeWalkingAway
    = Whoa, that Pokémon is quite\nthe fighter. My name is [RIVAL]. And\lyou are? … Oh, your name is\l[PLAYER]? Look, I can't stay long. I\lgotta go beat the gym leader in\lAsidia City if I wanna become\lthe final Elite Four Champion.\lSee ya!
     
    #org @move2
    #raw 0x62
    #raw 0x11
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0xFE
     
    #org @move3
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F

    So, to whoever can fix this: thank you. SO much.

    I am not really a FireRed scripter, but somehow, I managed to fix your script.
    The errors I saw in your script are...
    Code:
    #org @move3
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    [COLOR="Red"]#raw 0xFE[/COLOR]
    You forgot the end command which is #raw 0xFE...

    Code:
    #org @BeforeWalkingAway
    = Whoa, that Pokémon is quite\nthe fighter. My name is [RIVAL]. And\lyou are? … Oh, your name is\l[PLAYER]? Look, I can't stay long. I\lgotta go beat the gym leader in\lAsidia City if I wanna become\lthe final Elite Four Champion.\lSee ya!
    This one was weird for me... Somehow, it compiled when I removed the "" and the apostrophe in your "can't" in that text.

    Code:
    ...
    msgbox 0x6 @BeforeWalkingAway
    ...
    And here, it should be "msgbox @BeforeWalkingAway 0x6"...

    Code:
    ...
    trainerbattle 0x0 0x001 0x0 @before @after
    ...
    Here, if you want your script to continue after the battle, it should be "trainerbattle 0x1 <trainer id> 0x0 <text1> <text2> <address where the script continues>"...

    I haven't manage to fix the NPC to disappear, but I guess you can fix that one. Here's the new script.

    Code:
    #dynamic 0x800000
     
    #org @start
    checkflag 0x1001
    if 0x1 goto @done1
    applymovement 0x01 @move2
    waitmovement 0x0
    trainerbattle 0x1 0x001 0x0 @before @after @then
    end
    
    #org @then
    msgbox @BWA 0x6
    applymovement 0x01 @move3
    waitmovement 0x0
    hidesprite 0x800F
    setflag 0x1001
    release
    end
     
    #org @done1
    release
    end
     
    #org @before
    =  Well, hey there stranger.\nWhat are you doing around here in\lthe wild? Oh, you are a Pokémon\ltrainer, too? We should battle!\lYeah, come on!
     
    #org @after
    = Whoa! You're really strong!
     
    #org @BWA
    = Whoa, that Pokémon is quite\nthe fighter. My name is [RIVAL]. And\lyou are?\pOh, your name is \v\h01?\nLook, I cannot stay long.\pI gotta go beat the gym leader in\nAsidia City if I wanna become\lthe final Elite Four Champion.\pSee ya!
     
    #org @move2
    #raw 0x62
    #raw 0x11
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0xFE
     
    #org @move3
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0xFE

    Here's a video of your script...
    Spoiler:
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • This is also for Fire Red. I made this script for the first rival battle, and when I go to debug or compile it, XSE closes itself out. I've tried redownloading XSE and it didn't work.

    Code:
    #dynamic 0x800000
     
    #org @start
    checkflag 0x1001
    if 0x1 goto @done1
    lock
    applymovement 0x01 @move2
    waitmovement 0x0
    trainerbattle [COLOR=red]0x1[/COLOR] 0x001 0x0 @before @after [COLOR=red]@later[/COLOR]
     
    [COLOR=#ff0000]#org @later[/COLOR]
    msgbox @BeforeWalkingAway [COLOR=red]0x6[/COLOR]
    applymovement 0x01 @move3
    waitmovement 0x0
    hidesprite [COLOR=red]0x1[/COLOR]
    setflag 0x1001
    release
    end
     
    #org @done1
    release
    end
     
    #org @before
    =  Well, hey there stranger.\nWhat are you doing around here in\lthe wild? Oh, you are a Pokémon\ltrainer, too? We should battle!\lYeah, come on!
     
    #org @after
    = Whoa! You're really strong!
     
    #org @BeforeWalkingAway
    = Whoa, that Pokémon is quite\nthe fighter. My name is [RIVAL]. And\lyou are? … Oh, your name is\l[PLAYER]? Look, I can't stay long. I\lgotta go beat the gym leader in\lAsidia City if I wanna become\lthe final Elite Four Champion.\lSee ya!
     
    #org @move2
    #raw 0x62
    #raw 0x11
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0x11
    #raw 0xFE
     
    #org @move3
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    [COLOR=red]#raw 0xFE[/COLOR]

    So, to whoever can fix this: thank you. SO much.

    Corrections in red.

    Since you want the script to continue after you've had a trainer battle, you need to change the trainerbattle type to 0x1 and add a new address where the script can continue from.

    EDIT: Beaten ;_;
     
    Status
    Not open for further replies.
    Back
    Top