• 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.
29
Posts
12
Years
  • I'm attempting to use a rudimentary warping script, but when it gets to the warp, it makes the door sound and then leads to the game crashing and going black. What am I doing wrong?

    Code:
    #dynamic 0x0100003E
    #org @start
    lock
    faceplayer
    msgbox @1 0x6
    msgbox @2 0x5
    compare 0x800D 0x1
    if 0x1 goto @yes
    release
    end
    
    #org @1
    = You open the drawer...\p...\pAnd find a ladder!
    
    #org @2
    = Would you like to\nuse it?
    
    #org @yes
    msgbox @okay 0x6
    fadescreen 0x1 < I've tried it without these
    warp 0x0 0x65 0x0 0x0 0x0 < I've tried it with the params "0x0 0x65 0xFF 0x2 0x2" as well, to no avail.
    fadescreen 0x0 < Again, tried it without these
    release
    end
    
    #org @okay
    = You step down the ladder...
    Could you have switched bank & map ?

    When looking in the XSE command help, you'll see that:
    Warp 0x"bank" 0x"map" 0x"exit" 0x"x" 0x"y"

    My guess is, that you need to do either:
    0x65 0x0 0x0 0x0 0x0
    or
    0x65 0x0 0xFF 0x0 0x0
    since you seem to have tried anything else.

    I'm getting the "Too Less Parameters on Line 8. The correct number is 4." - It's been a while since I've done scripting so I wasn't surprised that it was kind of messed up, can anyone help here?

    Script:
    Spoiler:
    When reading the Trainerbattle XSE command help you should see:
    Trainerbattle 0x"type" 0x"battle#toStart" 0x"reserved" 0x"challengeTextPointer" 0x"defeatTextPointer"

    So what you need to do is:
    Code:
    trainerbattle 0x3 0x5 0x0 @msg1 @defeat
    msgbox @msg2 0x6
     
    8
    Posts
    16
    Years
    • Seen May 13, 2015
    the npc doesn't say anything but just warps me...
    Spoiler:
     
    54
    Posts
    13
    Years
    • Seen Jul 5, 2013
    To my opinion, try to add a lock & release before the warp... Not sure, still new to it.

    Question: How can I change the item(s) stored in my computer? I've searched for hours, I am starting to abandon the idea...
     
    8
    Posts
    16
    Years
    • Seen May 13, 2015
    To my opinion, try to add a lock & release before the warp... Not sure, still new to it.

    Question: How can I change the item(s) stored in my computer? I've searched for hours, I am starting to abandon the idea...

    You're good at this! It worked :D
    Thanks alot Mallowigi.
     

    Smallbirdie

    Lurker Extraordinaire!
    24
    Posts
    13
    Years
  • Woo! I got my basic mindreading script to work! :D It checks if you've got Abra, then allows you to reach the 2nd message.

    My question is, how can I ask it to check for Abra (0x3F), Kadabra (0x40) OR Alakazam (0x41)?

    I appreciate the help, thank you very much!

    '---------------
    #org 0x800400
    lock
    faceplayer
    msgbox 0x8800445 MSG_NORMAL '"Hi! This is my normal talking\nscr..."
    setvar 0x8004 0x3F
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8800422
    release
    end

    '---------------
    #org 0x800422
    msgbox 0x880046D MSG_YESNO '"Mind read?"
    compare LASTRESULT 0x1
    if 0x1 goto 0x8800438
    release
    end

    '---------------
    #org 0x800438
    textcolor 0x2
    msgbox 0x880047A MSG_NORMAL '"What?! You can read my mind?!"
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x800445
    = Hi! This is my normal talking\nscript.

    #org 0x80046D
    = Mind read?

    #org 0x80047A
    = What?! You can read my mind?!
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Woo! I got my basic mindreading script to work! :D It checks if you've got Abra, then allows you to reach the 2nd message.

    My question is, how can I ask it to check for Abra (0x3F), Kadabra (0x40) OR Alakazam (0x41)?

    I appreciate the help, thank you very much!

    Quite simply you add:

    ...
    setvar 0x8004 0x40
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8800422
    setvar 0x8004 0x41
    special2 LASTRESULT 0x17C
    compare LASTRESULT 0x1
    if 0x1 goto 0x8800422
    ...

    Beneath your check for Abra (Or put Alakazam at the top so it checks for that, then Kadabra, then Abra.
     

    Smallbirdie

    Lurker Extraordinaire!
    24
    Posts
    13
    Years
  • @SwiftSign-
    Thank you so much! Popped that in and it worked like a charm :) I didn't realize you could use the same setvar more than once, I thought it would be WAY more complicated! Thanks again!
     

    blue

    gucci
    21,057
    Posts
    16
    Years
  • Thanks for the advice but I'm still getting the same "Too many parameters on Line 8. The correct number is 4"

    Spoiler:


    Can someone correct this script so it will function as a trainer battle movement script please, it would be much appreciated.
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Thanks for the advice but I'm still getting the same "Too many parameters on Line 8. The correct number is 4"

    Spoiler:


    Can someone correct this script so it will function as a trainer battle movement script please, it would be much appreciated.

    You're getting the parameter error because of your trainerbattle type: 0x3 only supports one textbox rather than two so it displays the text that the person says after the battle and neglects the introduction completely. Remove the '@msg1' pointer in the trainerbattle command (since you're saying it beforehand) and it should work perfectly. There is some more information in this thread if you want it.
     
    90
    Posts
    11
    Years
    • Seen Aug 21, 2013
    None of the scripts I made are working. Idk what's wrong.
    Firered hack. It's supposed to be a sign post.

    Spoiler:

    I then compile it and copy the start one which is "7201D8" and paste it where it needs to go. But the script doesn't work
     
    Last edited:

    vladi1q1

    Mapper 7/10
    48
    Posts
    16
    Years
  • I have a person unit which you can talk to and you get your pokemon but when you talk to him in game:

    1st: It displays [player]: Has obtained ????????
    2nd: You can spam it and everytime it gives you a greatball instead of saying "The bag is empty."

    Code:

    Code:
    '---------------
    #org 0x740000
    lock
    checkflag 0x828
    if 0x0 goto 0x87405AA
    if 0x1 goto 0x87405E8
    end
    
    '---------------
    #org 0x7405AA
    msgbox 0x87405F3 0x0 '"My pokemon!\n[player] received EEV..."
    givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
    giveitem 0x4 0x5 0x0
    fadescreen 0x1
    fadescreen 0x0
    setflag 0x828
    release
    end
    
    '---------------
    #org 0x7405E8
    msgbox 0x874062D 0x0 '"The bag is empty."
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x7405F3
    = My pokemon!\n[player] received EEVEE.\p[player] received 5 Pokeballs.
    
    #org 0x74062D
    = The bag is empty.
     
    Last edited:

    RetroRoller

    Trailer Trash
    111
    Posts
    12
    Years
  • Yeah, I need help again ;) I finally have XSE 1.1 so there should be no movement problems.

    Anyway, rather than just locking to the spot like it has happened before... nothing happens. I triple checked all the flags and they're not set, so I have no idea why the script doesn't work. And yes, I have the Var Numbers set to how they should be in A-Map.

    Here's the script, sorry it's hard to work out, I didn't want to rewrite it so I decompiled it.
    Spoiler:
     
    17
    Posts
    12
    Years
    • Seen Aug 1, 2016
    This is my first attempt at a level script, so bear with me.

    Code:
    #dynamic 0x800000
    #org @start
    compare 0x4055 0x5
    if 0x0 goto @pokemanzget
    release
    end
    
    #org @pokemanzget
    applymovement 0x2 @move
    applymovement 0xFF @move1
    applymovement 0x1 @move2
    waitmovement 0x0
    msgbox @msg 0x6
    applymovement 0x1 @move3
    waitmovement 0x0
    msgbox @msg1 0x6
    applymovement 0x1 @move4
    applymovement 0x2 @move5
    waitmovement 0x0
    msgbox @msg2 0x6
    setvar 0x4055 0x5
    release
    end
    
    #org @msg
    = Ahh, you decided to come after\nall, [rival] and [player]!\pBetter late than never, I guess.\pContinuing on, those pokeballs.
    
    #org @msg1
    = They contain the starter Pokemon.\nI wish for you two to take one.
    
    #org @msg2
    = Go ahead, [player], you go first.
    
    #org @move
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x12
    #raw 0x01
    #raw 0xFE
    
    #org @move1
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @move2
    #raw 0x21
    #raw 0xFE
    
    #org @move3
    #raw 0x24
    #raw 0xFE
    
    #org @move4
    #raw 0x21
    #raw 0xFE
    
    #org @move5
    #raw 0x24
    #raw 0xFE
    What happens is the messed up text, except after opening the script from A-Map, the script was left unharmed.
     
    Last edited:
    90
    Posts
    11
    Years
    • Seen Aug 21, 2013
    Xse is broken i swear.

    fire red rom

    so i open xse, type this, save it.

    open rom and compile it copy the one that says start by it and then paste that offset into advanced map in script offset. But it isn't working!


    #dynamic 0x71A23C

    #org @start
    lock
    faceplayer
    msgbox @test 0x6
    release
    end

    #org @test
    = Testing.



    offset it gave me after compile 71A51B
     
    Last edited:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • This is my first attempt at a level script, so bear with me.

    Code:
    #dynamic 0x800000
    #org @start
    compare 0x4055 0x5
    if 0x0 goto @pokemanzget
    release
    end
    
    #org @pokemanzget
    applymovement 0x2 @move
    applymovement 0xFF @move1
    applymovement 0x1 @move2
    waitmovement 0x0
    msgbox @msg 0x6
    applymovement 0x1 @move3
    waitmovement 0x0
    msgbox @msg1 0x6
    applymovement 0x1 @move4
    applymovement 0x2 @move5
    waitmovement 0x0
    msgbox @msg2 0x6
    setvar 0x4055 0x5
    release
    end
    
    #org @msg
    = Ahh, you decided to come after\nall, [rival] and [player]!\pBetter late than never, I guess.\pContinuing on, those pokeballs.
    
    #org @msg1
    = They contain the starter Pokemon.\nI wish for you two to take one.
    
    #org @msg2
    = Go ahead, [player], you go first.
    
    #org @move
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x12
    #raw 0x01
    #raw 0xFE
    
    #org @move1
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @move2
    #raw 0x21
    #raw 0xFE
    
    #org @move3
    #raw 0x24
    #raw 0xFE
    
    #org @move4
    #raw 0x21
    #raw 0xFE
    
    #org @move5
    #raw 0x24
    #raw 0xFE
    What happens is the messed up text, except after opening the script from A-Map, the script was left unharmed.

    You can't see it because the glitched text in't actually present in the script but is a 100% in-game glitch. Did you correctly open the Map Script Offset and edit it like in this tutorial?If you need more help then post with the specifics of your level script (the type of level script you're using, variable, value etc.)

    Xse is broken i swear.

    fire red rom

    so i open xse, type this, save it.

    open rom and compile it copy the one that says start by it and then paste that offset into advanced map in script offset. But it isn't working!


    #dynamic 0x71A23C

    #org @start
    lock
    faceplayer
    msgbox @test 0x6
    release
    end

    #org @test
    = Testing.



    offset it gave me after compile 71A51B

    Are you sure you're using XSE 1.1.1? The earlier versions are somewhat glitchy and can't handle simple scripts at times.
     
    Status
    Not open for further replies.
    Back
    Top