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

[Archive] Script help thread

Status
Not open for further replies.

Vrai

can you feel my heart?
  • 2,896
    Posts
    15
    Years
    • Age 29
    • Seen Oct 24, 2022
    ok well now the guy moves and hides untill i leave and come back. then hes there again. how do i fix that?

    You have to put a setflag in your script, and then assign that setflag to the Person ID.

    For example:

    Code:
    ...
    if 0x1 goto @end
    [B]setflag 0x1000[/B]
    release
    ...
    And then, in A-Map:

    Code:
    ...
    Script Offset: $800000
    [B]Person ID: 1000[/B]
    Unknown: 00 00
    ...
    Don't pay attention to whatever else I typed in the "script" besides the bold, I just made that up in my head. ^^

    Sorry 'bout the double post, but does anyone know if you can use a fadescreen, then warp, and undo the fadescreen w/o revealing the screen at all?

    I tried, but it faded the screen, showed it before it warped, and faded once more, where it was supposed to warp. I really would like to know if it's possible.

    Thankies much ^^
     
    Last edited:
  • 31
    Posts
    16
    Years
    • Seen Apr 27, 2016
    Lets just say i wanted this to happen:

    talk to him before getting the first badge he says go away.
    talk to him after getting the first badge he says good job and walks away never to be seen again.

    would i do it the same way?
     

    0m3GA ARS3NAL

    Im comin' home...
  • 1,816
    Posts
    16
    Years
    Sorry 'bout the double post, but does anyone know if you can use a fadescreen, then warp, and undo the fadescreen w/o revealing the screen at all?

    I tried, but it faded the screen, showed it before it warped, and faded once more, where it was supposed to warp. I really would like to know if it's possible.

    Thankies much ^^

    Just Warp, when you warp, it automatically fades the screen out.
    Unless you are going for a "White out" Then... I don't know... Sorry...
     
  • 31
    Posts
    16
    Years
    • Seen Apr 27, 2016
    I cant get it to work?? when ever i put the code into XSE it changes it and erases some of the lines. so the script doesnt do what i want it to!!

    Ok well i got it to work....mostly.... now the only problem is that befor i get the badge he doesnt say anything and it only makes the clicking sound...??

    OK nvm lol i got it. i just played around with the script. but thank you very much for helping me!!

    ok no now i do have a problem. i tried to add more movements to my script and they all work untill the last one. then everything just stays frozen like asif someone were talking to me but the guy is gone?
     
    Last edited:

    HackMew

    Mewtwo Strikes Back
  • 1,314
    Posts
    17
    Years
    • Seen Oct 26, 2011
    ok no now i do have a problem. i tried to add more movements to my script and they all work untill the last one. then everything just stays frozen like asif someone were talking to me but the guy is gone?

    Did you actually recompile the dynamic script, or just just added some movements to a decompiled script?
    Because you should never do the latter one. Data gets overwritten easily if you don't pay attention.
     
  • 43
    Posts
    15
    Years
    • Seen Nov 22, 2009
    Script freezes the whole game up, its in XSE if you know what is wrong please tell me, and dont just post the revised correct script, tell me why it was wrong.

    Code:
    #dynamic 0x16649A
    
    #org @start
    lock
    faceplayer
    checkflag 0x800
    if b_true goto @hey
    release
    end
    
    #org @hey
    message @hey1
    boxset 6
    applymovement 0x06 @move
    applymovement 0xFF @move1
    waitmovement 0x0
    goto @next
    release
    end
    
    #org @next
    message @buy
    boxset 4
    message @rollin
    boxset 4 
    goto @mist
    release
    end
    
    #org @mist
    setweather 0x06
    message @fog
    applymovement 0x06 @back
    applymovement 0xFF @follow
    waitmovement 0x0
    goto @pop
    release
    end
    
    #org @pop
    applymovement 0x01 @Ahh
    message @poke
    boxset 6
    cry 0xA1 88
    nop
    nop
    wildbattle 0x88 0x02 0x8B 0x01
    fadescreen 0
    hidesprite 0x01
    goto @handle
    release 
    end
    
    #org @handle
    message @give
    givepokemon 0x252 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    waitfanfare
    message @got
    goto @end
    release
    end
    
    #org @end
    message @endo
    fadescreen 0
    hidesprite 0x06 0x00
    release
    end
    
    #org @Ahh
    #raw 0x62
    #raw 0xFE
    
    #org @move
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0xFE
    
    #org @move1
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0xFE
    
    #org @back
    #raw 0x14
    #raw 0x17
    #raw 0xFE
    
    #org @follow
    #raw 0x14
    #raw 0x17
    #raw 0xFE
    
    #org @endo
    = Captain:Well I better get going\n that was some fight,bye!
    
    #org @got
    = [player] recieved a Ghastly!
    
    #org @give
    = Captain:You handled yourself really\n well back there and I am proud\p to give you this as a token\n of my appreciation.
    
    #org @poke
    = Wild Ghastly Appeared!
    
    #org @fog
    = Captain:There's a fog rolling in we\nbetter get back to the ship.
    
    #org @rollin
    = Alright! \nThat was a lot faster than I\nthought it would be! \p We should get back so \nSteve can start his repairs.
    
    #org @buy
    = Hey! Glad you made it! \nSteve called ahead. \pI've got your part right here \nHere you are. \pTravel safely now! 
    
    #org @hey1
    = Alright lad! We've arrived in Eastport, \ntop shipping town in all of Trophil! \pAh, there's the merchant now.

    Thank you!
     

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Script freezes the whole game up, its in XSE if you know what is wrong please tell me, and dont just post the revised correct script, tell me why it was wrong.

    Code:
    #dynamic 0x16649A
    
    #org @start
    lock
    faceplayer
    checkflag 0x800
    if b_true goto @hey
    release
    end
    
    #org @hey
    message @hey1
    boxset 6
    applymovement 0x06 @move
    applymovement 0xFF @move1
    waitmovement 0x0
    goto @next
    release
    end
    
    #org @next
    message @buy
    boxset 4
    message @rollin
    boxset 4 
    goto @mist
    release
    end
    
    #org @mist
    setweather 0x06
    message @fog
    applymovement 0x06 @back
    applymovement 0xFF @follow
    waitmovement 0x0
    goto @pop
    release
    end
    
    #org @pop
    applymovement 0x01 @Ahh
    message @poke
    boxset 6
    cry 0xA1 88
    nop
    nop
    wildbattle 0x88 0x02 0x8B 0x01
    fadescreen 0
    hidesprite 0x01
    goto @handle
    release 
    end
    
    #org @handle
    message @give
    givepokemon 0x252 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    waitfanfare
    message @got
    goto @end
    release
    end
    
    #org @end
    message @endo
    fadescreen 0
    hidesprite 0x06 0x00
    release
    end
    
    #org @Ahh
    #raw 0x62
    #raw 0xFE
    
    #org @move
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0xFE
    
    #org @move1
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x11
    #raw 0xFE
    
    #org @back
    #raw 0x14
    #raw 0x17
    #raw 0xFE
    
    #org @follow
    #raw 0x14
    #raw 0x17
    #raw 0xFE
    
    #org @endo
    = Captain:Well I better get going\n that was some fight,bye!
    
    #org @got
    = [player] recieved a Ghastly!
    
    #org @give
    = Captain:You handled yourself really\n well back there and I am proud\p to give you this as a token\n of my appreciation.
    
    #org @poke
    = Wild Ghastly Appeared!
    
    #org @fog
    = Captain:There's a fog rolling in we\nbetter get back to the ship.
    
    #org @rollin
    = Alright! \nThat was a lot faster than I\nthought it would be! \p We should get back so \nSteve can start his repairs.
    
    #org @buy
    = Hey! Glad you made it! \nSteve called ahead. \pI've got your part right here \nHere you are. \pTravel safely now! 
    
    #org @hey1
    = Alright lad! We've arrived in Eastport, \ntop shipping town in all of Trophil! \pAh, there's the merchant now.
    Thank you!

    Is this a person event, or a script event (S)? If it is a script event, do not forget to put in Advance map the following; Unknown: 0003, and var number: 5040, or 4050.
     

    -GiЯ

    Banned
  • 119
    Posts
    15
    Years
    • Age 32
    • G IR
    • Earth
    • Seen Nov 30, 2023
    ok i have a script that is supposed to alert someone make them walk to me say somthing then make me follow them then give me a pokemon, i use notepad and pokescript, whenever i put the script in my game all that happens is it puts a ? above hiros head and asks yes or no, either you hit the screen goes pink
    WHAT IS WRONG WITH IT:

    #org $start
    lock
    checkflag 0x217
    if b_true goto $released
    applymovement 0x00 $moveexclam
    pause 0x10
    applymovement 0xFF $moveexclam
    pause 0x10
    applymovement 0x00 $walktome
    pause 0x10
    applymovemt 0x00 $finishwalk
    pause 0x20
    message $yourawake
    boxset 6
    applymovement 0x00 $computerroom
    pause 0x10
    applymovement 0xFF $computerroom
    pause 0x50
    message $pokemon
    boxset 6
    givepokemon 151 5 0
    fanfare 0x13E
    #raw 0x53 0x04 0x00
    setflag 0x209
    setflag 0x828
    setflag 0x217
    message $goodluck
    boxset 6
    release
    end

    #org $released
    release
    end

    #org $moveexclam
    #raw 0x63 0x62 0xFE

    #org $walktome
    #raw 0x1D 0x1F 0x1F 0x1F 0x1F 0x1F 0x1E 0x1E 0x1E
    0x1E 0x1E 0xFE

    #org $finishwalk
    #raw 0x20 0x1E 0x13 0x13 0xFE

    #org $computerroom
    #raw 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x10 0x13 0x13 0x13 0xFE

    #org $yourawake
    $yourawake 1 =Oh! Hey, \v\h01! I see you finnally\ndecided to wake up your DAD\lbrought you something but you wouldnt\lwake up.

    #org $pokemon
    $pokemon 1 =Here \v\h01! this is your 1st POKEMON\nYour DAD wanted you to have it\lYou can start your journey now.

    #org $goodluck
    $goodluck 1 =Good Luck!!\nTo lilfabbro! Okay This should be working\lHowever I may have forgot to\lset some variables.\lI can fix those after a next patch\lOr you can tell me what\lyou think.
     

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    ok i have a script that is supposed to alert someone make them walk to me say somthing then make me follow them then give me a pokemon, i use notepad and pokescript, whenever i put the script in my game all that happens is it puts a ? above hiros head and asks yes or no, either you hit the screen goes pink
    WHAT IS WRONG WITH IT:

    #org $start
    lock
    checkflag 0x217
    if b_true goto $released
    applymovement 0x00 $moveexclam
    pause 0x10
    applymovement 0xFF $moveexclam
    pause 0x10
    applymovement 0x00 $walktome
    pause 0x10
    applymovemt 0x00 $finishwalk
    pause 0x20
    message $yourawake
    boxset 6
    applymovement 0x00 $computerroom
    pause 0x10
    applymovement 0xFF $computerroom
    pause 0x50
    message $pokemon
    boxset 6
    givepokemon 151 5 0
    fanfare 0x13E
    #raw 0x53 0x04 0x00
    setflag 0x209
    setflag 0x828
    setflag 0x217
    message $goodluck
    boxset 6
    release
    end

    #org $released
    release
    end

    #org $moveexclam
    #raw 0x63 0x62 0xFE

    #org $walktome
    #raw 0x1D 0x1F 0x1F 0x1F 0x1F 0x1F 0x1E 0x1E 0x1E
    0x1E 0x1E 0xFE

    #org $finishwalk
    #raw 0x20 0x1E 0x13 0x13 0xFE

    #org $computerroom
    #raw 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x10 0x13 0x13 0x13 0xFE

    #org $yourawake
    $yourawake 1 =Oh! Hey, \v\h01! I see you finnally\ndecided to wake up your DAD\lbrought you something but you wouldnt\lwake up.

    #org $pokemon
    $pokemon 1 =Here \v\h01! this is your 1st POKEMON\nYour DAD wanted you to have it\lYou can start your journey now.

    #org $goodluck
    $goodluck 1 =Good Luck!!\nTo lilfabbro! Okay This should be working\lHowever I may have forgot to\lset some variables.\lI can fix those after a next patch\lOr you can tell me what\lyou think.


    Spoiler:


    Try this. You spelled applymovement once wrong, and there's no such thing as applymovement 0x00. It should be applymovement 0x0<person event number>. I assumed it's 0x04. You also forgot waitfanfare under the fanfare 0x13E.
     
  • 14
    Posts
    15
    Years
    • Seen Jan 24, 2023
    Hey I just started scripting and im trying to use a give pokemon script but its messed up when I talk to the guy it says "This tree looks like it can be cut down" heres the script.

    #org $begin
    lock
    faceplayer
    checkflag 0x232
    if b_true goto $gotit
    message $q
    boxset 6
    givepokemon 410 40 0
    setflag 0x232
    release
    end

    #org $gotit
    message $hi
    boxset 6
    release
    end

    #org $hi
    $hi 1 = Keep it away from me!

    #org $q
    $q 1 = I can't control it anymore\ntake it and get rid of it.

    Can anyone help me?
     

    Hiche..

     
  • 979
    Posts
    16
    Years
    • Seen Dec 27, 2014
    Hey I just started scripting and im trying to use a give pokemon script but its messed up when I talk to the guy it says "This tree looks like it can be cut down" heres the script.

    #org $begin
    lock
    faceplayer
    checkflag 0x232
    if b_true goto $gotit
    message $q
    boxset 6
    givepokemon 410 40 0
    setflag 0x232
    release
    end

    #org $gotit
    message $hi
    boxset 6
    release
    end

    #org $hi
    $hi 1 = Keep it away from me!

    #org $q
    $q 1 = I can't control it anymore\ntake it and get rid of it.

    Can anyone help me?

    When you compiled the script, an offset came up. Did you copy the $offset, and placed it in Advance Map? Read this; Click for more information.
     
  • 43
    Posts
    15
    Years
    • Seen Nov 22, 2009
    Is this a person event, or a script event (S)? If it is a script event, do not forget to put in Advance map the following; Unknown: 0003, and var number: 5040, or 4050.

    It's a person event...
    *filler*
     

    Raizaiel

    Well, I'll be conflabbed!
  • 16
    Posts
    15
    Years
    Ugh. I am sorry for being such a total noob at this, but I cannot get this damned scripting to work for the life of me. I'm also entirely unsure if I'm using XSE correctly, so allow me to throw myself at your mercy and admit my own lack of competence :(

    Okay. So I have this PART of a script I'm working with.

    '-----------------------
    #dynamic 0x801020
    #org @start
    checkflag 0x4000
    if b_true goto @oak1

    #org @oak1
    applymovement MOVE_PLAYER 0x801001

    #org 801001
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 2E 'Face Up (Delayed)
    #raw FE 'End of Movements
    release
    end

    What I'm trying to do exactly is have this character walk into Oak's lab, walk up three spaces and over seven to the left, look up and then talk to him about whatever I choose. Then, select one of the three pokeballs between the two, with that nice little picture popping up and the "DO YOU CHOOSE SO AND SO TO BE YOUR LAWFULLY WEDDED WI--I MEAN POKEMON COMPANION" jazz to go on. However, I can't get the script to work and also, whenever I try to compile it I get two new numbers at the bottom, so I substitute those into the script and then I get two entirely new numbers.

    Also, what would you suggest I should use to check for the unused flags? I don't really know what to use to do that.

    As I said, I used to know what I was doing and now I do not. I've spent hours examining the scripts in the original game to do so, and I've confused myself into scripted oblivion. Help!
     

    /Circa

    a face in the clouds.
  • 881
    Posts
    16
    Years
    I just need a simple command help, I need to know how to MAKE the player surf, because it's early in the game and all the player has to do is get across a river.

    I know how to do everything else, I just don't know what the command is to surf, if anyone understands me :S
     
  • 2
    Posts
    15
    Years
    • Seen May 26, 2022
    Whats wrong with this script?

    #org $start
    checkflag 0x800
    if b_true goto $lets
    message $go
    boxset 6
    applymovement 0x10 $walk1
    pausemove 0x0
    applymovement 0xFF $walk2
    pausemove 0x0
    release
    end

    #org $lets
    message $death
    boxset 6
    release
    end

    #org $go
    $go 1 = Lin: Let's go visit \nDestinycave \v\h01\nfor research.

    #org $death
    $death 1 = Lin: The death of our\ngym leader has our\ltown in despair.

    #org $walk1
    #raw 0x2D 0x2D 0x54 0xFE

    #org $walk2
    #raw 0x2D 0x2D 0xFE
     

    Thrace

    @tion
  • 1,048
    Posts
    16
    Years
    • Seen Oct 2, 2016
    Ugh. I am sorry for being such a total noob at this, but I cannot get this damned scripting to work for the life of me. I'm also entirely unsure if I'm using XSE correctly, so allow me to throw myself at your mercy and admit my own lack of competence :(

    Okay. So I have this PART of a script I'm working with.

    '-----------------------
    #dynamic 0x801020
    #org @start
    checkflag 0x4000
    if b_true goto @oak1

    #org @oak1
    applymovement MOVE_PLAYER 0x801001

    #org 801001
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 11 'Step Up (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 12 'Step Left (Normal)
    #raw 2E 'Face Up (Delayed)
    #raw FE 'End of Movements
    release
    end

    What I'm trying to do exactly is have this character walk into Oak's lab, walk up three spaces and over seven to the left, look up and then talk to him about whatever I choose. Then, select one of the three pokeballs between the two, with that nice little picture popping up and the "DO YOU CHOOSE SO AND SO TO BE YOUR LAWFULLY WEDDED WI--I MEAN POKEMON COMPANION" jazz to go on. However, I can't get the script to work and also, whenever I try to compile it I get two new numbers at the bottom, so I substitute those into the script and then I get two entirely new numbers.

    Also, what would you suggest I should use to check for the unused flags? I don't really know what to use to do that.

    As I said, I used to know what I was doing and now I do not. I've spent hours examining the scripts in the original game to do so, and I've confused myself into scripted oblivion. Help!
    Start with flags starting from 1000. You need "waitmovement 0" after a movement. Theres also no need for that release command you've used, that'll be causing you some problems.

    A good way to learn is to decompile scripts and see how it is done. Try decompiling the PokeBalls in Oak's Lab.

    I just need a simple command help, I need to know how to MAKE the player surf, because it's early in the game and all the player has to do is get across a river.

    I know how to do everything else, I just don't know what the command is to surf, if anyone understands me :S
    special 0x161 activates the surfing OW.
     

    Juan

    Brazilian with a bad English
  • 92
    Posts
    16
    Years
    English:
    Exists some command that reads the byte ofrom a pointer in the RAM, and put in an variable to be able to use later (compare, addvar, subvar, …)?
    I tried loadpointer (0F) and loadbytefrompointer (12) but they had not functioned.

    Portuguese:
    Existe algum comando que lê o byte de um ponteiro na memória RAM, e depois guarda em uma variável para poder usar depois(compare, addvar, subvar, ...)?
    Eu tentei o loadpointer(0F) e o loadbytefrompointer(12) mas eles não funcionaram.
     

    Likewise

    Bye.
  • 724
    Posts
    16
    Years
    #dynamic 0x71ACB8

    #org @start
    faceplayer
    lock
    checkflag 0x1001
    if 0x1 goto @done
    msgbox @text
    boxset 0x6
    fadescreen 0x1
    msgbox @Huh?What?
    boxset 0x5
    if 0x1 goto @Huh?
    if 0x0 goto @What?
    msgbox @Huh?
    boxset 0x5
    if 0x1 goto @Inverse
    if 0x0 goto @Blurry
    msgbox @What?
    boxset 0x5
    if 0x1 goto @Inverse
    if 0x0 goto @Blurry
    msgbox @Inverse
    boxset 0x6
    msgbox @Blurry
    boxset 0x6
    fadescreen 0x0
    release
    end

    #org @text
    = ...............\n...............\lYnitsed on si ereht.

    #org @Huh?What?
    = You are not a hero nor a villian.\p\v\h01:Huh?\pThere is no fate for you nor is\n there ___ for others.

    #org @Huh?
    = You have lots to learn...\nTell me this how do you\l feel in this place?

    #org @What?
    = You have lots to learn...\nTell me this how do you\l feel in this place?

    #org @Inverse
    = I see..this is because that\n feeling is the entity that is me..\lI will see you when A dons stars.

    #org @Blurry
    = I see..this is because that\n feeling is the entity that is me..\lI will see you when A dons stars.

    #org @done
    release
    end

    It resets if the player picks Yes, and freezes if the player pick no, on the first question box.
     
    Status
    Not open for further replies.
    Back
    Top