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

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
  • Could anyone please help me out? I've got two little problems.

    I'm a beginner in hacking Pokemon games. There's a bug in my hack. When I'm on my re-designed "Route 1" battling wild Pokemon, after the battle a bug comes up. Suddenly I'm a walking cut-tree, and my character is frozen.

    I've made a video of it to make it clear:
    YouTube [ dot ] com /watch?v=c4fw76Vdo8M

    It's a cut tree which I made on my own, but I copied all important information of another cut tree.



    My second problem is that when I open the "PLAYER-button" in the MENU, the game restarts. The screen turns into black, and the opening scene of the game plays again.

    Thanks in advance!

    This belongs in Simple Questions, just FWI.

    1) This is very, very common. I have seen it at least 4 times and I have personally experienced it. There is only one solution I know of, besides completely deleting the map and starting over.

    Solution: Take the sprite which you become, don't change anything about it, but move it to a point on screen which it won't be visible or give it the flag of the pokemon menu (in FR = 828) as the Person I.D. (which is down at the bottom of the settings). This will hide it permanently. Now, just make another cut tree. If you delete the original sprite which has problems, it will just shift to another sprite by random!

    2) You broke it, lol. You must have scripted over or changed the data that deals with loading the players card or you deleted/corrupted at least one of the images on the trainer card.
     
    252
    Posts
    11
    Years
    • Seen Jul 6, 2019
    hi guys i'm having trouble with a script could you guys help me?
    ok so i have a guy at Pos X/Y = 000B 0009, and i want the player to follow him to oak's lab.
    but for some reason it's not working like I want it to. and the guy doesn't disappear correctly.
    The script is:
    #dyn 0x740000
    #org @main
    lock
    faceplayer
    message @talk
    callstd MSG_NORMAL
    compare PLAYERFACING UP
    if == call @up
    compare PLAYERFACING DOWN
    if == call @down
    compare PLAYERFACING RIGHT
    if == call @right
    compare PLAYERFACING LEFT
    if == call @right
    message @seeya
    callstd MSG_NOCLOSE
    pause 0xA
    closemsg
    applymovement 0x4 @walkaway
    applymovement PLAYER @seeaway
    pauseevent 0x0
    fadedefault
    disappear 0x4
    setflag 0x2250
    release
    end

    #org @up
    applymovement 0x4 @leadup
    applymovement PLAYER @followup
    pauseevent 0x0
    return

    #org @down
    applymovement 0x4 @leaddown
    applymovement PLAYER @followdown
    pauseevent 0x0
    return

    #org @right
    applymovement 0x4 @leadright
    applymovement PLAYER @followright
    pauseevent 0x0
    return

    #org @left
    applymovement 0x4 @leadleft
    applymovement PLAYER @followleft
    pauseevent 0x0
    return


    #org @talk
    = Follow me to OAK's lab.

    #org @seeya
    = Here it is. Seeya!

    #org @walkaway
    m walk_right walk_right walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_up end

    #org @seeaway
    m look_right look_right look_right look_right look_right look_right end

    #org @leadup
    m walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right end

    #org @followup
    m walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

    #org @leaddown
    m look_right walk_right walk_down walk_down walk_left walk_down walk_down walk_down look_right walk_right walk_right walk_right walk_right walk_right end

    #org @followdown
    m look_up_delayed long_pause long_pause look_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

    #org @leadright
    m look_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right end

    #org @followright
    m look_left walk_left walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

    #org @leadleft
    m look_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right end

    #org @followleft
    m look_right walk_right walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

    (I'm using pksv-ui by the way)
     
    2
    Posts
    11
    Years
    • Seen May 2, 2013
    Solution: Take the sprite which you become, don't change anything about it, but move it to a point on screen which it won't be visible or give it the flag of the pokemon menu (in FR = 828) as the Person I.D. (which is down at the bottom of the settings). This will hide it permanently. Now, just make another cut tree. If you delete the original sprite which has problems, it will just shift to another sprite by random!

    Thank you for your reply! I'll try it later this day! :)

    2) You broke it, lol. You must have scripted over or changed the data that deals with loading the players card or you deleted/corrupted at least one of the images on the trainer card.

    Is there any way that I can replace the new scripts with the old Fire Red scripts?
    The only programs I used are Advance Map, A-text and a very little bit XSE (but just so that Prof Oak walks in a different way). Non of these programs could have changed the menu script, right? :S
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • Is there any way that I can replace the new scripts with the old Fire Red scripts?
    The only programs I used are Advance Map, A-text and a very little bit XSE (but just so that Prof Oak walks in a different way). Non of these programs could have changed the menu script, right? :S

    There is a possiblity that A-text could have caused it if you replaced/overwrited the wrong stuff. What were you changing?

    A-map also could have bugged out. What version are you using?
     
    5
    Posts
    12
    Years
    • Seen May 17, 2013
    hey guys im newer too scripting, but i have the basics down. im having trouble with a lengthy script im trying to write that gives you a pokemon depending on your personality types all yes/no questions please correct my mistakes and tell me what i did wrong here i really appreciate it.

    #dynamic 0x9C2A2B

    #org @start
    lock
    faceplayer
    checkflag 0x860
    if 0x1 goto @done
    msgbox @question 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @giveduskull
    msgbox @question2 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givechickorita
    msgbox @question3 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givesandshrew
    msgbox @question4 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givewurmple
    msgbox @question5 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givepichu
    msgbox @question6 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givevulpix
    msgbox @question7 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @giveroselia
    msgbox @question8 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @givepoliwag
    msgbox @chandler 0x6
    release
    end

    #org @done
    msgbox @goaway 0x6
    release
    end

    #org @chandler
    msgbox @talk0 0x6
    givepokemon 0x168 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @damnkid 0x06
    waitfanfare
    setflag 0x860
    release
    end

    #org @talk0
    = Okay so you are clearly indecisive\nand cannot make up your mind\lhowever we anticipated this... here\lis you ****** pokemon.

    #org @damnkid
    = Have fun \v\h01 ... (Chandler)

    #org @goaway
    = Damn Kid ! You need to get a life\nbefore I decide to end yours!

    #org @question
    = Hello \v\h01...\nI have been expecting you...\lI have a few Questions please\lanswer them honestly,\lAre you Mischivous?

    #org @giveduskull
    msgbox @talk1 0x6
    givepokemon 0x169 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedduskull 0x6
    waitfanfare
    setflag 0x860
    release
    end

    #org @talk1
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedduskull
    = You Recieved a DUSKULL !

    #org @question2
    = Are you Nice?

    #org @givechickorita
    msgbox @talk2 0x6
    givepokemon 0x98 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedchickorita 0x6
    waitfanfare
    setflag 0x860
    release
    end

    #org @talk2
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedchickorita
    = You Recieved a CHICKORITA !

    #org @question3
    = Are you Shy?

    #org @givesandshrew
    msgbox @talk3 0x6
    givepokemon 0x1B 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedsandshrew 0x6
    waitfanfare
    setflag 0x860
    release
    end

    #org @talk3
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedsandshrew
    = You Recieved a SANDSHREW !

    #org @question4
    = Are you Insecure?

    #org @givewurmple
    msgbox @talk4 0x6
    givepokemon 0x122 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedwurmple 0x6
    waitfanfare
    release
    end

    #org @talk4
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedwurmple
    = You Recieved a WURMPLE !

    #org @question5
    = Are you Eccentric?

    #org @givepichu
    msgbox @talk5 0x6
    givepokemon 0xAC 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedpichu 0x6
    waitfanfare
    release
    end

    #org @talk5
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedpichu
    = You Recieved a PICHU !

    #org @question6
    = Are you Hot-Tempered?

    #org @givevulpix
    msgbox @talk6 0x6
    givepokemon 0x25 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedvulpix 0x6
    waitfanfare
    release
    end

    #org @talk6
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedvulpix
    = You Recieved a VULPIX !

    #org @question7
    = Are you Self-Centered?

    #org @giveroselia
    msgbox @talk7 0x06
    givepokemon 0x16B 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedroselia 0x6
    waitfanfare
    release
    end

    #org @talk7
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedroselia
    = You Recieved a ROSELIA !

    #org @givepoliwag
    msgbox @talk8 0x6
    givepokemon 0x3C 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @recievedpoliwag 0x6
    waitfanfare
    release
    end

    #org @talk8
    = I You and this little Pokemon have\nan attatchment beyond words...\ldefend it with your life...

    #org @recievedpoliwag
    = You Recieved a POLIWAG !
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • hey guys im newer too scripting, but i have the basics down. im having trouble with a lengthy script im trying to write that gives you a pokemon depending on your personality types all yes/no questions please correct my mistakes and tell me what i did wrong here i really appreciate it.

    Spoiler:

    Just scrolling through, I honestly don't see a problem, but I might have missed something. Can you explain what happends when the script runs?
     
    5
    Posts
    12
    Years
    • Seen May 17, 2013
    It either doesn't show the messages and u click A and then gives u the yes/no box, and when u click it it restarts the game, or it flashes into white screen and stays that way.
     

    horcruxrocks

    Pokemon Lover
    12
    Posts
    11
    Years
    • Seen Aug 6, 2016
    hey guys

    i just want to know how to write a map script ..
    I mean like when we play pok. emerald the first thing that happens is we get out of the truck and mom take us inside home.. how can do things like that
    i have searched but couldn't get it.
    Pls help
     

    Shadowraze

    ur mum
    794
    Posts
    11
    Years
  • hey guys

    i just want to know how to write a map script ..
    I mean like when we play pok. emerald the first thing that happens is we get out of the truck and mom take us inside home.. how can do things like that
    i have searched but couldn't get it.
    Pls help

    Making a level script is pretty easy. :3

    Try this tutorial of mine scroll down to the very last part that says level script and try to make one there. :) http://www.pokecommunity.com/showthread.php?t=279345

    If you don't get it in my tutorial try cooley's tutorial on level scripts. http://www.pokecommunity.com/showthread.php?t=141650
     
    5
    Posts
    12
    Years
    • Seen May 17, 2013
    Can anyone help me with my script I posted I really can't figure out what I did wrong :/
     
    11
    Posts
    14
    Years
    • Seen Feb 28, 2016
    can someone help me with this script because there problem is when I get the pokemon in the pokeball the pokeball doesn't disappear, it only disappear when I exit the house or enter a new map.can someone help me to disappear after I get the pokemon. thanks



    POKEMON IN A POKEBALL SCRIPT
    #Dynamic 0x80000
    #org @start
    lock
    faceplayer
    checkflag 0x404
    msgbox @msg 0x02
    if 0x0 goto @give
    release
    end
    #org @give
    lock
    faceplayer
    msgbox @msg2 0x02
    msgbox @textdata 0x5
    compare LASTRESULT 0x0
    if 0x1 goto 0x8AD9557
    waitkeypress
    hidepokepic
    setvar 0x8004 0x4
    countpokemon
    compare LASTRESULT 0x6
    if 0x1 call @fll
    givepokemon 0xEF 0x5 0x0 0x0 0x0 0x0
    fanfare 0x172
    msgbox @given 0x02
    waitfanfare
    waitkeypress
    setflag 0x404
    release
    end
    #org @hold
    waitkeypress
    hidepokepic
    setvar 0x8004 0x4
    lock
    faceplayer
    msgbox @msg 0x02
    release
    end
    #org @fll
    lock
    faceplayer
    msgbox @full 0x02
    release
    end
    #org @msg
    = This POKéBALL holds a POKéMON.
    #org @msg2
    = This POKéBALL seems to have\na POKéMON inside.
    #org @textdata
    = Want to take the ELEKID?
    #org @given
    = \v\h01\ received an ELEKID.
    #org @full
    = You must have a free space in\nyour party to take the Pokémon.
     

    karatekid552

    What happens if I push it?....
    1,771
    Posts
    11
    Years
  • can someone help me with this script because there problem is when I get the pokemon in the pokeball the pokeball doesn't disappear, it only disappear when I exit the house or enter a new map.can someone help me to disappear after I get the pokemon. thanks



    POKEMON IN A POKEBALL SCRIPT
    #Dynamic 0x80000
    #org @start
    lock
    faceplayer
    checkflag 0x404
    msgbox @msg 0x02
    if 0x0 goto @give
    release
    end
    #org @give
    lock
    faceplayer
    msgbox @msg2 0x02
    msgbox @textdata 0x5
    compare LASTRESULT 0x0
    if 0x1 goto 0x8AD9557
    waitkeypress
    hidepokepic
    setvar 0x8004 0x4
    countpokemon
    compare LASTRESULT 0x6
    if 0x1 call @fll
    givepokemon 0xEF 0x5 0x0 0x0 0x0 0x0
    fanfare 0x172
    msgbox @given 0x02
    waitfanfare
    waitkeypress
    setflag 0x404
    release
    end
    #org @hold
    waitkeypress
    hidepokepic
    setvar 0x8004 0x4
    lock
    faceplayer
    msgbox @msg 0x02
    release
    end
    #org @fll
    lock
    faceplayer
    msgbox @full 0x02
    release
    end
    #org @msg
    = This POKéBALL holds a POKéMON.
    #org @msg2
    = This POKéBALL seems to have\na POKéMON inside.
    #org @textdata
    = Want to take the ELEKID?
    #org @given
    = \v\h01\ received an ELEKID.
    #org @full
    = You must have a free space in\nyour party to take the Pokémon.

    Why are you hiding a pokepic? You never used the showpokepic command. If you want the sprite to disappear, use hidesprite 0x[event#] after you set the flag which was put in the pokeball's person ID (404?).
     
    11
    Posts
    14
    Years
    • Seen Feb 28, 2016
    Why are you hiding a pokepic? You never used the showpokepic command. If you want the sprite to disappear, use hidesprite 0x[event#] after you set the flag which was put in the pokeball's person ID (404?).


    ah ok i'll try it thanks. and I will remove the hidepokepic command
     

    LaDestitute

    Razor Sharp
    84
    Posts
    11
    Years
  • I have very little experience with XSE, and I'm still learning. I'm putting together one of those "You don't have any Pokemon, you can't pass" sort of scripts, but I'm having problems. He moves to the player, and does the first part of his movement (including the exclamation mark), and moves to the player, but he doesn't do the rest.

    Here's how I want it to go:
    1. Player steps on script tile.
    2. Depending on whether they stepped on the middle, right, or left script tile, the NPC will move to match their position and face them.
    3. NPC does a exclamation mark and quickly moves to be right in front of the player, with no tiles between them.
    4. NPC says "I can't let you pass because you don't have any Pokemon. It's not safe to go out without at least one."
    5. NPC moves back to original position.
    6. Script repeats if player tries again, but nothing will happen if they meet the conditions to pass.

    Code:
    #dynamic 0x456734
    #org @start
    countpokemon
    compare 0x800D 0x1
    if 0x1 goto @continue
    goto @nopass
    end
    
    #org @continue
    end
    
    #org @nopass
    applymovement 0x1 @move
    end
    
    #org @move
    lock
    #raw 0x62
    #raw 0x1D
    #raw 0x1D
    #raw 0xFE
    msgbox @1 0x6
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    waitmovement 0x1
    end
    
    #org @1
    = I can't let you pass because you\ndon't have any Pokemon. It's \nnot safe to go out without at least one.
    end
    
    #org @move1
    #raw 0x10
    #raw 0xFE
    waitmovement 0x1
    release
    end
     
    5,256
    Posts
    16
    Years
  • I have very little experience with XSE, and I'm still learning. I'm putting together one of those "You don't have any Pokemon, you can't pass" sort of scripts, but I'm having problems. He moves to the player, and does the first part of his movement (including the exclamation mark), and moves to the player, but he doesn't do the rest.

    Here's how I want it to go:
    1. Player steps on script tile.
    2. Depending on whether they stepped on the middle, right, or left script tile, the NPC will move to match their position and face them.
    3. NPC does a exclamation mark and quickly moves to be right in front of the player, with no tiles between them.
    4. NPC says "I can't let you pass because you don't have any Pokemon. It's not safe to go out without at least one."
    5. NPC moves back to original position.
    6. Script repeats if player tries again, but nothing will happen if they meet the conditions to pass.

    Code:
    #dynamic 0x456734
    #org @start
    countpokemon
    compare 0x800D 0x1
    if 0x1 goto @continue
    goto @nopass
    end
    
    #org @continue
    end
    
    #org @nopass
    applymovement 0x1 @move
    end
    
    #org @move
    lock
    #raw 0x62
    #raw 0x1D
    #raw 0x1D
    #raw 0xFE
    msgbox @1 0x6
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    waitmovement 0x1
    end
    
    #org @1
    = I can't let you pass because you\ndon't have any Pokemon. It's not safe to go out without at least one.
    end
    
    #org @move1
    #raw 0x10
    #raw 0xFE
    waitmovement 0x1
    release
    end

    Use the dynamic offset of 0x800000, not some arbitrary number. XSE will automatically compile it to the correct place and you won't corrupt your ROM that way.

    Code:
    #dynamic [B]0x800000[/B]
    
    #org @start
    countpokemon
    compare 0x800D 0x1
    if 0x1 goto @continue
    goto @nopass [B]// I removed the "end" command, it isn't necessary.[/B]
    
    #org @continue
    [B]release[/B]
    end
    
    #org @nopass
    applymovement 0x1 @move1
    [B]waitmovement 0x0
    msgbox @1 0x6
    applymovement 0x1 @move2
    waitmovement 0x0
    release[/B]
    end
    
    #org @move1
    #raw 0x62 // You don't need to add "lock".
    #raw 0x1D
    #raw 0x1D
    #raw 0xFE // You cant have commands halfway through a movement command. You can only dictate which movement will happen in this sections.
    
    #org @move2
    #raw 0x11
    #raw 0x11
    #raw 0xFE
    
    #org @1 // Similarly, text strings can only have text, not extra commands.
    [B]= I can't let you pass because you\ndon't have any Pokémon.\pIt's not safe to go out without\nat least one. [/B]// Use the Text Adjuster (Ctrl + T) so the text doesn't run off the screen.
     
    Status
    Not open for further replies.
    Back
    Top