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

Bolens

Soul Hacker
359
Posts
14
Years
    • Age 30
    • PA
    • Seen Aug 22, 2016
    Whenever I try to Compile this Script with XSE...it crashes the program :/ Any help?

    Code:
    #dynamic 0x740100
    
    #org @start
    lock
    applymovement 0xFF @1
    waitmovement 0x0
    msgbox @2 0x6
    msgbox @4 0x6
    applymovement 0x2 @3
    waitmovement 0x0
    msgbox @5 0x6
    msgbox @6 0x6
    applymovement 0x1 @7
    waitmovement 0x0
    setflag 0x829
    msgbox @8 0x6
    setvar 0x7001 0x1
    release
    end
    
    #org @1
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @2
    = PROF. CYPRESS: Thanks for coming.\nNow, I—
    
    #org @3
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @4
    = [RIVAL]: Professor!
    
    #org @5
    = [RIVAL]: You can't hide them from\nme anymore.\pPROF. CYPRESS: I take it you're\nhere to make another one of your\ldemands?\p[RIVAL]: You think? Come on,\nProfessor. They're right there on\lthe table. Can I just have one\lalready?
    
    #org 6
    = PROF. CYPRESS: You know what? I\nthink today might be your lucky\lday after all. This job is better\loff being done by two people,\lanyway.\p[RIVAL]: What job?\pPROF. CYPRESS: Ah, right. I\nforgot that I was interrupted.\l[PLAYER], that's what I brought you\lhere to ask you about. As I'm\lsure you both know, I study the\lbiological organization of\lPokémon here in Kleeto, but as\lmuch as I enjoy a good trek in\lthe wilderness, a lot of my work\lrequires me to be in this lab. My\lhope is that the two of you would\lbe willing to help me catalogue\levery species of Pokémon in\lKleeto by traveling the region\lwith these Pokédexes. Here.
    
    #org @7
    #raw 0x10
    #raw 0x13
    #raw 0x0
    #raw 0xFE
    
    #org @8
    = [RIVAL]: Oh, fine. I guess I can do\nit.\pPROF. CYPRESS: And you too,\n[PLAYER]? Great! I really\lappreciate your help. You can now\lchoose a Pokémon to bring with\lyou on your journey.
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Age 29
    • Seen Apr 7, 2014
    Strictly speaking, it's better than the alternative. "@1" tells you jack squat about what's at that address.
    I just find it more manageable and less confusing. I respect your point and our views may differ, but that's just how I do it. :/
    No one's obliged to do the same; whatever you're comfortable with. :]
    Whenever I try to Compile this Script with XSE...it crashes the program :/ Any help?

    Code:
    #dynamic 0x740100
    
    #org @start
    lock
    applymovement 0xFF @1
    waitmovement 0x0
    msgbox @2 0x6
    msgbox @4 0x6
    applymovement 0x2 @3
    waitmovement 0x0
    msgbox @5 0x6
    msgbox @6 0x6
    applymovement 0x1 @7
    waitmovement 0x0
    setflag 0x829
    msgbox @8 0x6
    setvar 0x7001 0x1
    release
    end
    
    #org @1
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @2
    = PROF. CYPRESS: Thanks for coming.\nNow, I—
    
    #org @3
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x12
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @4
    = [RIVAL]: Professor!
    
    #org @5
    = [RIVAL]: You can't hide them from\nme anymore.\pPROF. CYPRESS: I take it you're\nhere to make another one of your\ldemands?\p[RIVAL]: You think? Come on,\nProfessor. They're right there on\lthe table. Can I just have one\lalready?
    
    #org 6
    = PROF. CYPRESS: You know what? I\nthink today might be your lucky\lday after all. This job is better\loff being done by two people,\lanyway.\p[RIVAL]: What job?\pPROF. CYPRESS: Ah, right. I\nforgot that I was interrupted.\l[PLAYER], that's what I brought you\lhere to ask you about. As I'm\lsure you both know, I study the\lbiological organization of\lPokémon here in Kleeto, but as\lmuch as I enjoy a good trek in\lthe wilderness, a lot of my work\lrequires me to be in this lab. My\lhope is that the two of you would\lbe willing to help me catalogue\levery species of Pokémon in\lKleeto by traveling the region\lwith these Pokédexes. Here.
    
    #org @7
    #raw 0x10
    #raw 0x13
    #raw 0x0
    #raw 0xFE
    
    #org @8
    = [RIVAL]: Oh, fine. I guess I can do\nit.\pPROF. CYPRESS: And you too,\n[PLAYER]? Great! I really\lappreciate your help. You can now\lchoose a Pokémon to bring with\lyou on your journey.
    Does it give you an error code, or does it just.. crash?
     

    Alomar

    Follow me on Twitter @Daubs
    58
    Posts
    13
    Years
  • So i'm having some trouble grasping the random command (#raw 0x8F)
    trying to make random weather. I can't see what i'm missing? my script just does the first option always.


    Code:
    #raw 0x8F 0x0A 0x00
    compare 0x800D 0x0
    if 0x1 goto $1
    compare 0x800D 0x1
    if 0x1 goto $2
    compare 0x800D 0x2
    if 0x1 goto $3
    compare 0x800D 0x3
    if 0x1 goto $4
    compare 0x800D 0x4
    if 0x1 goto $5
    compare 0x800D 0x5
    if 0x1 goto $6
    compare 0x800D 0x6
    if 0x1 goto $7
    compare 0x800D 0x7
    if 0x1 goto $8
    compare 0x800D 0x8
    if 0x1 goto $9
    compare 0x800D 0x9
    if 0x1 goto $10
    
    #org $1
    setweather 0x3
    #raw 0x00
    doweather
    release
    end
    
    #org $2
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $3
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $4
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $5
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $6
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $7
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $8
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    #org $9
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $10
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
     
    29
    Posts
    13
    Years
    • Seen Sep 9, 2014
    Code:
    #org 165441
    message $talk
    $talk 1 = '"[PLAYER]: Are you sure it's here,\nBrock?\pBrock: It says so on the map.\pAsh: Boy, I'm tired\nMax: Me too."
    boxset 6
    release
    end
    Why doesn't this code work? I tried it, it was from the scripting tutorial.

    I'm putting this script on the map of Pallet Town, and when I compile it, it says "Too less parameters on line 2. The correct number is 2.

    I don't know what to do...
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Age 33
    • Seen Dec 23, 2023
    Code:
    #org 165441
    message $talk
    $talk 1 = '"[PLAYER]: Are you sure it's here,\nBrock?\pBrock: It says so on the map.\pAsh: Boy, I'm tired\nMax: Me too."
    boxset 6
    release
    end
    Why doesn't this code work? I tried it, it was from the scripting tutorial.

    I'm putting this script on the map of Pallet Town, and when I compile it, it says "Too less parameters on line 2. The correct number is 2.

    I don't know what to do...

    you are probably using the scripting tool XSE and using the scripting language PokeScript.
    XSE isn't compatible with PokeScript formatted scripts.
    Therefore, you should read tutorials that uses XSE-formatted scripts if you are using XSE as your script editor.

    I will convert your script into XSE format...
    Code:
    #dynamic 0x800000
    
    #org @start
    message @talk 0x6
    release
    end
    
    #org @talk
    = [PLAYER]: Are you sure it's here,\nBrock?\pBrock: It says so on the map.\pAsh: Boy, I'm tired\nMax: Me too.
     

    Alomar

    Follow me on Twitter @Daubs
    58
    Posts
    13
    Years
  • So i'm having some trouble grasping the random command (#raw 0x8F)
    trying to make random weather. I can't see what i'm missing? my script just does the first option always.


    Code:
    #raw 0x8F 0x0A 0x00
    compare 0x800D 0x0
    if 0x1 goto $1
    compare 0x800D 0x1
    if 0x1 goto $2
    compare 0x800D 0x2
    if 0x1 goto $3
    compare 0x800D 0x3
    if 0x1 goto $4
    compare 0x800D 0x4
    if 0x1 goto $5
    compare 0x800D 0x5
    if 0x1 goto $6
    compare 0x800D 0x6
    if 0x1 goto $7
    compare 0x800D 0x7
    if 0x1 goto $8
    compare 0x800D 0x8
    if 0x1 goto $9
    compare 0x800D 0x9
    if 0x1 goto $10
    
    #org $1
    setweather 0x3
    #raw 0x00
    doweather
    release
    end
    
    #org $2
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $3
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $4
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $5
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $6
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $7
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $8
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    #org $9
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $10
    setweather 0x0
    #raw 0x00
    doweather
    release
    end

    can i get some help here lol, im using pokescript btw
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Age 29
    • Seen Apr 7, 2014

    Yes...Script specific :/ I don't know what to do...
    Try compiling the script in a new offset.

    So i'm having some trouble grasping the random command (#raw 0x8F)
    trying to make random weather. I can't see what i'm missing? my script just does the first option always.


    Code:
    #raw 0x8F 0x0A 0x00
    compare 0x800D 0x0
    if 0x1 goto $1
    compare 0x800D 0x1
    if 0x1 goto $2
    compare 0x800D 0x2
    if 0x1 goto $3
    compare 0x800D 0x3
    if 0x1 goto $4
    compare 0x800D 0x4
    if 0x1 goto $5
    compare 0x800D 0x5
    if 0x1 goto $6
    compare 0x800D 0x6
    if 0x1 goto $7
    compare 0x800D 0x7
    if 0x1 goto $8
    compare 0x800D 0x8
    if 0x1 goto $9
    compare 0x800D 0x9
    if 0x1 goto $10
    
    #org $1
    setweather 0x3
    #raw 0x00
    doweather
    release
    end
    
    #org $2
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $3
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $4
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $5
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $6
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $7
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $8
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    #org $9
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $10
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    You've missed the most essential parts (in bold):
    Code:
    [B]#org $start[/B]
    #raw 0x8F 0x0A 0x00
    compare 0x800D 0x0
    if 0x1 goto $1
    compare 0x800D 0x1
    if 0x1 goto $2
    compare 0x800D 0x2
    if 0x1 goto $3
    compare 0x800D 0x3
    if 0x1 goto $4
    compare 0x800D 0x4
    if 0x1 goto $5
    compare 0x800D 0x5
    if 0x1 goto $6
    compare 0x800D 0x6
    if 0x1 goto $7
    compare 0x800D 0x7
    if 0x1 goto $8
    compare 0x800D 0x8
    if 0x1 goto $9
    compare 0x800D 0x9
    if 0x1 goto $10
    [B]end[/B]
    
    #org $1
    setweather 0x3
    #raw 0x00
    doweather
    release
    end
    
    #org $2
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $3
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $4
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $5
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $6
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $7
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $8
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    #org $9
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    
    #org $10
    setweather 0x0
    #raw 0x00
    doweather
    release
    end
    Yeah, it's just going to start from $1 if you don't have a pointer for the first set of commands (and an end).
     
    Last edited:
    29
    Posts
    13
    Years
    • Seen Sep 9, 2014


    you are probably using the scripting tool XSE and using the scripting language PokeScript.
    XSE isn't compatible with PokeScript formatted scripts.
    Therefore, you should read tutorials that uses XSE-formatted scripts if you are using XSE as your script editor.

    I will convert your script into XSE format...
    Code:
    #dynamic 0x800000
    
    #org @start
    message @talk 0x6
    release
    end
    
    #org @talk
    = [PLAYER]: Are you sure it's here,\nBrock?\pBrock: It says so on the map.\pAsh: Boy, I'm tired\nMax: Me too.
    Woah, thanks! You're a good coder!
     
    29
    Posts
    13
    Years
    • Seen Sep 9, 2014
    Woah, thanks! You're a good coder!
    Um
    I just opened the script right now and it wasn't there. So I made a new offset number$.

    I added script 2 to "..." ... is supposed to be Pallet Town. But when I made a new script after I compiled it, I went to 'save map scripts'

    It tells me
    "ERROR: (ERepointError) No empty space of size 50 found.
    (Searching: $FF between $6B00000 and end of file)"

    So I went to FSF FreeSpaceFinder. In needed bytes, I put fifty, and in search from offset "6B0000". It gave me 71A24E. I went to AM and in script 2 offset I put that number. I put in the script in the Open Script, and I compiled it. I went to save script, and got the same error.

    Help, anyone?
     

    redriders180

    Mastermind of Pokemon Glazed
    314
    Posts
    13
    Years
  • I dont know if this is considered requesting a script, but here goes:

    How can I make a script that checks if you have a certain Pokemon? I'm sure it's possible...In game trades do it all the time. But I can't figure out where that happens in the program.

    I want to make a script that activates a certain event if you have a certain Pokemon in your party. And I'm using Ruby.
     
    185
    Posts
    16
    Years
  • One quick question: how do I properly script rebattles? I looked for it in other trainers' scripts, but I'm not sure how it's gonna work out.

    What I found is:
    Spoiler:


    This is what confuses me: The next trainerbattle is 0x5 and it's the same trainer number (0x221). However, the rebattles exist in other numbers (in this case, 0x224-227), so my question is, does the game automatically recognize what battle is coming next?
    And also, how long does it take to get these rebattles? Is it about the same time as regular rebattles would occur?
     
    25
    Posts
    14
    Years
    • Seen Dec 28, 2013
    hey there,
    i came across this problem when scripting wondering if i can get some help. i have included the code and a screenshot of the problem. hes the written explination...(jus to let you no i have only just started scripting so sorry if the code is a bit bad)

    jus after the character moves where i want him to go, the next message wont come up and you cant do anything else. see the screen shot which is take before and after the movement. i dont think it froze properly because the music was still playing

    Code:
    #dyn 0x740000
    #org @start
    clearflag 0x1002
    if true jump @start2
    message @mom1
    boxset 6
    applymovement 0xFF @heromove
    pause 0x30
    message @mom2
    boxset 6
    setflag 0x1002
    setvar 0x6000 0x0001
    release
    end
    
    #org @mom1
    = Mom: Hi \v\h01!\pCome over here quickly!
    
    #org @heromove
    #raw 0x12 0x12 0x10
    
    #org @mom2
    = Mom: I just got a call from Proff.Oak!\pHe said you can start your training\ntoday. You should head over there\lright now.\pHis new lab is over at Route 1.\pSee you later \v\h01!
    
    
    #org @start2
    lockall
    message @healmsg
    showmsg
    waitbutton
    fadescreen 1
    closemsg
    special 0
    fadescreen 0
    msgbox @bettermsg
    callstd MSG_NORMAL
    releaseall
    end
    
    #org @healmsg
    = Your POKéMON look tired[.]\nYou should give them a rest.
    
    #org @bettermsg
    = There. All better now!

    any help would be much appriciated
     

    Binary

    え?
    3,977
    Posts
    16
    Years
    • Age 29
    • Seen Apr 7, 2014
    hey there,
    i came across this problem when scripting wondering if i can get some help. i have included the code and a screenshot of the problem. hes the written explination...(jus to let you no i have only just started scripting so sorry if the code is a bit bad)

    jus after the character moves where i want him to go, the next message wont come up and you cant do anything else. see the screen shot which is take before and after the movement. i dont think it froze properly because the music was still playing

    Code:
    #dyn 0x740000
    #org @start
    clearflag 0x1002
    if true jump @start2
    message @mom1
    boxset 6
    applymovement 0xFF @heromove
    pause 0x30
    message @mom2
    boxset 6
    setflag 0x1002
    setvar 0x6000 0x0001
    release
    end
    
    #org @mom1
    = Mom: Hi \v\h01!\pCome over here quickly!
    
    #org @heromove
    #raw 0x12 0x12 0x10
    
    #org @mom2
    = Mom: I just got a call from Proff.Oak!\pHe said you can start your training\ntoday. You should head over there\lright now.\pHis new lab is over at Route 1.\pSee you later \v\h01!
    
    
    #org @start2
    lockall
    message @healmsg
    showmsg
    waitbutton
    fadescreen 1
    closemsg
    special 0
    fadescreen 0
    msgbox @bettermsg
    callstd MSG_NORMAL
    releaseall
    end
    
    #org @healmsg
    = Your POKéMON look tired[.]\nYou should give them a rest.
    
    #org @bettermsg
    = There. All better now!

    any help would be much appriciated

    Code:
    #dynamic 0x740000
    
    #org @start
    [B]checkflag 0x1002[/B]   [I]'I'm pretty sure it should be a checkflag, otherwise, the script will just repeat itself.[/I]
    if 0x1 goto @start2
    message @mom1 0x6   [I]'or omit the parameter and use boxset 6; I don't know which version of XSE [/I]you're using.
    applymovement 0xFF @heromove
    pause 0x30  
    message @mom2 0x6   [I]'same as above.[/I]
    setflag 0x1002
    setvar 0x6000 [B]0x1[/B]   [I]'You're assigning 0x1 to 0x6000.[/I]
    release
    end
    
    #org @mom1
    = Mom: Hi \v\h01!\pCome over here quickly!
    
    #org @heromove
    #raw 0x12 0x12 0x10 [B]0xFE [/B] 
    
    #org @mom2
    = Mom: I just got a call from Proff.Oak!\pHe said you can start your training\ntoday. You should head over there\lright now.\pHis new lab is over at Route 1.\pSee you later \v\h01!
    
    
    #org @start2
    lockall
    message @healmsg
    showmsg
    waitbutton
    fadescreen 1
    closemsg
    special 0
    fadescreen 0
    msgbox @bettermsg
    callstd MSG_NORMAL
    releaseall
    end
    
    #org @healmsg
    = Your POKéMON look tired[.]\nYou should give them a rest.
    
    #org @bettermsg
    = There. All better now!
    Fixes in bold.

    How would you activate the national dex? It there a script command for that?
    For which game? Use Special 0x16F; for FR/LG.

    I dont know if this is considered requesting a script, but here goes:

    How can I make a script that checks if you have a certain Pokemon? I'm sure it's possible...In game trades do it all the time. But I can't figure out where that happens in the program.

    I want to make a script that activates a certain event if you have a certain Pokemon in your party. And I'm using Ruby.
    Hmmm, I've never really done it myself, but try decompiling an in-game script and analyze the script.
     
    Last edited:
    25
    Posts
    14
    Years
    • Seen Dec 28, 2013
    thanks alot binary!

    it fixed the freeze problem, but the second message (mom2 after the move) still wont appear? any ideas?

    EDIT: theres also something else, im not requesting a script as such jus one word or line. i was wondering how you stop the play as soon as you touch the script tile. in the previous scripting i used to do, i used to use the word 'jingle'? if it helps in using pksv
     
    Last edited:
    185
    Posts
    16
    Years
  • thanks alot binary!

    it fixed the freeze problem, but the second message (mom2 after the move) still wont appear? any ideas?

    EDIT: theres also something else, im not requesting a script as such jus one word or line. i was wondering how you stop the play as soon as you touch the script tile. in the previous scripting i used to do, i used to use the word 'jingle'? if it helps in using pksv

    For your first problem, try adding waitmovement 0xFF after the applymovement.
    For the second one, frankly, I have no idea..
     
    Status
    Not open for further replies.
    Back
    Top