The PokéCommunity Forums Fan Games ROM Hacking
Script Help Thread (DO NOT REQUEST SCRIPTS)

ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Closed Thread
 
Thread Tools
  #8201    
Old May 14th, 2013 (12:07 AM).
horcruxrocks's Avatar
horcruxrocks horcruxrocks is offline
Pokemon Lover
     
    Join Date: May 2012
    Gender: Male
    Nature: Brave
    Posts: 12
    What are the flags and Vars that we should basically use
    One more question Diff b/w Var and flag is that
    Flag lets an event happen once and Var lets it happen acc. to our specifications right?
    And what happens when we use clearflag that means this flag will be cleared?
    And we can use it again?

    One more question related to Truck thing in LITTLEROOT TOWN.
    In A-Map Events tab i deleted the truck event.But when i open my rom i still enter the map through truck what shall i do?

    Relevant Advertising!

      #8202    
    Old May 14th, 2013 (12:45 AM).
    Satoshi Ookami's Avatar
    Satoshi Ookami Satoshi Ookami is offline
    Memento Mori
    • Gold Tier
     
    Join Date: Jul 2008
    Location: Abyss of Time, Great Seal
    Age: 24
    Gender: Male
    Nature: Calm
    Posts: 14,447
    Quote:
    Originally Posted by horcruxrocks View Post
    What are the flags and Vars that we should basically use
    Diego's tutorial has a list of free flags.

    Quote:
    Originally Posted by horcruxrocks View Post
    One more question Diff b/w Var and flag is that
    Flag lets an event happen once and Var lets it happen acc. to our specifications right?
    And what happens when we use clearflag that means this flag will be cleared?
    And we can use it again?
    Yes. Clearflag clears the use of flag so it can be used again.

    Quote:
    Originally Posted by horcruxrocks View Post
    One more question related to Truck thing in LITTLEROOT TOWN.
    In A-Map Events tab i deleted the truck event.But when i open my rom i still enter the map through truck what shall i do?
    You can use Start Map Editor Advance to change the start map.
    __________________
    ROM hacking FAQ - Read before asking how to play a hack.

    Anime List | PSN Trophy List
      #8203    
    Old May 14th, 2013 (1:41 AM).
    horcruxrocks's Avatar
    horcruxrocks horcruxrocks is offline
    Pokemon Lover
       
      Join Date: May 2012
      Gender: Male
      Nature: Brave
      Posts: 12
      It still wont help
      if i change the map the truck wont be shown but the shaking happens.
        #8204    
      Old May 14th, 2013 (2:38 AM).
      karatekid552's Avatar
      karatekid552 karatekid552 is offline
      What happens if I push it?....
         
        Join Date: Nov 2012
        Location: Do you really want to know? Really?
        Gender: Male
        Nature: Bold
        Posts: 1,766
        Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
        Quote:
        Originally Posted by horcruxrocks View Post
        It still wont help
        if i change the map the truck wont be shown but the shaking happens.
        The shaking is removed by truck remover: http://www.pokecommunity.com/showthread.php?t=181369

        (First result on google for "Tuck Remover".)
        __________________

        Paired with Simba
          #8205    
        Old May 14th, 2013 (4:40 AM).
        Gyrath's Avatar
        Gyrath Gyrath is offline
        Pokemon Lurid Creator
           
          Join Date: Apr 2013
          Location: Western Australia.
          Gender: Male
          Nature: Relaxed
          Posts: 23
          Ok, So im having a little problemo here. My script starts but doesnt continue to the next part. Any suggestions? I'm still a beginner.

          #dyn 0x740000
          #org @main
          lock
          faceplayer
          message @intro
          callstd MSG_NORMAL
          setflag 0x2010
          jump @start
          DOESNT GO TO #ORG @START
          #org @start
          lock
          checkflag 0x2025
          if 0x1 jump :end
          setflag FR_POKEMON
          countpokemon
          compare LASTRESULT 6
          if == jump @noroom
          addpokemon EEVEE 0x5 ORANBERRY 0 0 0
          setflag 0x2025
          storepokemon 0 EEVEE
          message @get-msg
          fanfare 0x101
          showmsg
          waitfanfare
          waitbutton
          :end
          release
          end

          #org @noroom
          msgbox @noroom-msg
          callstd MSG_NOCLOSE
          release
          end

          #org @noroom-msg
          = You don't have enough room in your party.

          #org @get-msg
          = You got a \v\h02!\pNow, my Grandson will be waiting\nfor you in Dream City.\pWith him you will find Martin.\pThe legend of Rayquaza might be\ntrue.\pTalk with Martin to find out more.

          #org @intro
          = Hello \v\h01!.\pIt is your 13th birthday and I\npromised that I would give you a...\pPokemon!!
          __________________
          I see a red door and I want it painted black.
            #8206    
          Old May 14th, 2013 (5:07 AM).
          karatekid552's Avatar
          karatekid552 karatekid552 is offline
          What happens if I push it?....
             
            Join Date: Nov 2012
            Location: Do you really want to know? Really?
            Gender: Male
            Nature: Bold
            Posts: 1,766
            Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
            Quote:
            Originally Posted by Gyrath View Post
            Ok, So im having a little problemo here. My script starts but doesnt continue to the next part. Any suggestions? I'm still a beginner.

            #dyn 0x740000
            #org @main
            lock
            faceplayer
            message @intro
            callstd MSG_NORMAL
            setflag 0x2010
            jump @start
            DOESNT GO TO #ORG @START
            #org @start
            lock
            checkflag 0x2025
            if 0x1 jump :end
            setflag FR_POKEMON
            countpokemon
            compare LASTRESULT 6
            if == jump @noroom
            addpokemon EEVEE 0x5 ORANBERRY 0 0 0
            setflag 0x2025
            storepokemon 0 EEVEE
            message @get-msg
            fanfare 0x101
            showmsg
            waitfanfare
            waitbutton
            :end
            release
            end

            #org @noroom
            msgbox @noroom-msg
            callstd MSG_NOCLOSE
            release
            end

            #org @noroom-msg
            = You don't have enough room in your party.

            #org @get-msg
            = You got a \v\h02!\pNow, my Grandson will be waiting\nfor you in Dream City.\pWith him you will find Martin.\pThe legend of Rayquaza might be\ntrue.\pTalk with Martin to find out more.

            #org @intro
            = Hello \v\h01!.\pIt is your 13th birthday and I\npromised that I would give you a...\pPokemon!!
            Put an "end" after the jump @start.
            Remove the "lock" after the @start.
            Don't use flags over 900: refer to this list: http://www.pokecommunity.com/showpost.php?p=6829256&postcount=158
            Change ":end" to @end
            There really isn't a need for the @start section to have it's own label. It would have done fine under the @main label without the need for a jump.
            __________________

            Paired with Simba
              #8207    
            Old May 14th, 2013 (6:12 AM).
            Gyrath's Avatar
            Gyrath Gyrath is offline
            Pokemon Lurid Creator
               
              Join Date: Apr 2013
              Location: Western Australia.
              Gender: Male
              Nature: Relaxed
              Posts: 23
              Quote:
              Originally Posted by karatekid552 View Post
              Put an "end" after the jump @start.
              Remove the "lock" after the @start.
              Don't use flags over 900: refer to this list: http://www.pokecommunity.com/showpost.php?p=6829256&postcount=158
              Change ":end" to @end
              There really isn't a need for the @start section to have it's own label. It would have done fine under the @main label without the need for a jump.
              Thanks! It worked!
              However It only works "once".
              This might be a file problem but when I played the game the script worked fine. I wanted to see my Eevee's nature and it was "hardy". I didn't like it so I closed the game and opened up a fresh.
              But then when I talk to the NPC. He just says the first line and doesn't go on with the script.
              Solutions?
              __________________
              I see a red door and I want it painted black.
                #8208    
              Old May 14th, 2013 (6:35 AM).
              karatekid552's Avatar
              karatekid552 karatekid552 is offline
              What happens if I push it?....
                 
                Join Date: Nov 2012
                Location: Do you really want to know? Really?
                Gender: Male
                Nature: Bold
                Posts: 1,766
                Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                Quote:
                Originally Posted by Gyrath View Post
                Thanks! It worked!
                However It only works "once".
                This might be a file problem but when I played the game the script worked fine. I wanted to see my Eevee's nature and it was "hardy". I didn't like it so I closed the game and opened up a fresh.
                But then when I talk to the NPC. He just says the first line and doesn't go on with the script.
                Solutions?
                Probably the flag you used, which is over 900, which overlaps ram used for other things, which could have been changed by something else.

                No flags over 900!
                __________________

                Paired with Simba
                  #8209    
                Old May 14th, 2013 (3:42 PM).
                thetripplenine's Avatar
                thetripplenine thetripplenine is offline
                999
                   
                  Join Date: Jan 2013
                  Location: California
                  Age: 19
                  Gender: Male
                  Nature: Bold
                  Posts: 98
                  Quote:
                  Originally Posted by karatekid552 View Post
                  You need to set the flag in his person ID and the do a hidesprite command after he walks away. That should do the trick.
                  So I did that but you have to talk to her again in order for her to move and hide, while I just want her to walk away after the script

                  Here's my script:
                  Spoiler:
                  #dynamic 0x9C0000

                  #org @start
                  msgbox @1 0x6
                  applymovement 0x0 @turn
                  waitmovement 0x0
                  msgbox @2 0x6
                  trainerbattle 0x0 0x001 0x0 @go @end
                  applymovement 0x0 @move
                  waitmovement 0x0
                  hidesprite 0x0
                  setflag 0x220
                  release
                  end

                  #org @turn
                  #raw 0x56
                  #raw 0x00
                  #raw 0xFE

                  #org @move
                  #raw 0x18
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x18
                  #raw 0x18
                  #raw 0x18
                  #raw 0xFE

                  (not going to put the messages)
                  __________________
                  Or Nah?
                    #8210    
                  Old May 14th, 2013 (4:23 PM).
                  karatekid552's Avatar
                  karatekid552 karatekid552 is offline
                  What happens if I push it?....
                     
                    Join Date: Nov 2012
                    Location: Do you really want to know? Really?
                    Gender: Male
                    Nature: Bold
                    Posts: 1,766
                    Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                    Quote:
                    Originally Posted by thetripplenine View Post
                    So I did that but you have to talk to her again in order for her to move and hide, while I just want her to walk away after the script

                    Here's my script:
                    Spoiler:
                    #dynamic 0x9C0000

                    #org @start
                    msgbox @1 0x6
                    applymovement 0x0 @turn
                    waitmovement 0x0
                    msgbox @2 0x6
                    trainerbattle 0x0 0x001 0x0 @go @end
                    applymovement 0x0 @move
                    waitmovement 0x0
                    hidesprite 0x0
                    setflag 0x220
                    release
                    end

                    #org @turn
                    #raw 0x56
                    #raw 0x00
                    #raw 0xFE

                    #org @move
                    #raw 0x18
                    #raw 0x15
                    #raw 0x15
                    #raw 0x15
                    #raw 0x15
                    #raw 0x15
                    #raw 0x15
                    #raw 0x15
                    #raw 0x15
                    #raw 0x18
                    #raw 0x18
                    #raw 0x18
                    #raw 0xFE

                    (not going to put the messages)
                    It is the trainerbattle command. You need to use trainerbattle type 3. I can't remember which parameter exactly it is, but when XSE prompts you for a type of battle, use 3. It is the only one that allows the script to continue.
                    __________________

                    Paired with Simba
                      #8211    
                    Old May 14th, 2013 (4:55 PM). Edited May 14th, 2013 by thetripplenine.
                    thetripplenine's Avatar
                    thetripplenine thetripplenine is offline
                    999
                       
                      Join Date: Jan 2013
                      Location: California
                      Age: 19
                      Gender: Male
                      Nature: Bold
                      Posts: 98
                      Quote:
                      Originally Posted by karatekid552 View Post
                      It is the trainerbattle command. You need to use trainerbattle type 3. I can't remember which parameter exactly it is, but when XSE prompts you for a type of battle, use 3. It is the only one that allows the script to continue.
                      I figured out from diegoisawesome's walkthrough that its trainerbattle 0x1 etc, but thanks anyways!
                      __________________
                      Or Nah?
                        #8212    
                      Old May 14th, 2013 (8:14 PM).
                      Prinnykaze's Avatar
                      Prinnykaze Prinnykaze is offline
                         
                        Join Date: May 2013
                        Gender: Male
                        Nature: Jolly
                        Posts: 2
                        Hello! i have a question heres some info first though
                        Hacking: emerald
                        Tools of use: pokescript, XSE, Adv. Map
                        type of event: person script
                        topic of interest: wild/legendary pokemon battles
                        Question: okey, so i've been searching around the net for a few hours because i can't find the right codes to start the wild battle script on my emerald game, cause almost every-
                        where has the FR battle scripts but when i use them, it never starts the battle, the script (i think) would just skip the battle and do the fade in, fade out and then i would be free to move.
                        Spoiler:
                        #org $script
                        lock
                        faceplayer
                        cry 0xA1 404
                        #raw 0x33
                        pause 0x30
                        message $cry
                        $cry 1 = MMEEEOOOWW!
                        boxset 6
                        wildbattle 404 2 1
                        pause 0x70
                        fadescreen 1
                        removesprite 0x800F
                        setflag 0x1200
                        pause 0x10
                        fadescreen 0
                        release
                        end

                        so basicly i just want to know what i am doing wrong, and what to fix. (possibly the right codes to use)
                        thank you, Prinnykaze
                          #8213    
                        Old May 15th, 2013 (2:40 AM). Edited May 15th, 2013 by Gyrath.
                        Gyrath's Avatar
                        Gyrath Gyrath is offline
                        Pokemon Lurid Creator
                           
                          Join Date: Apr 2013
                          Location: Western Australia.
                          Gender: Male
                          Nature: Relaxed
                          Posts: 23
                          Quote:
                          Originally Posted by karatekid552 View Post
                          Probably the flag you used, which is over 900, which overlaps ram used for other things, which could have been changed by something else.

                          No flags over 900!
                          It didn't work, still stall's the second time through.

                          EDIT: FIXED W00T
                          __________________
                          I see a red door and I want it painted black.
                            #8214    
                          Old May 15th, 2013 (9:23 AM).
                          Yudiop Yudiop is offline
                             
                            Join Date: May 2013
                            Gender: Male
                            Posts: 3
                            Ok, so I tried to do a scripted warp and when i try and reach the area I want (Pallet Town (map bank 4,0)) It the screen goes black and 'freezes'. I have tried other areas and they work but not to the intended area.
                            I am using PKSV-UI
                            Pokemon Fire Red v1.0
                            Script Event
                            topic : Scripted Warps

                            Spoiler:
                            #org 0x8740F23
                            '-----------------------------------
                            lock
                            faceplayer
                            message 0x8740F45 ' Cap'n,\nare you read...
                            callstd MSG_YESNO ' Yes/No message
                            compare LASTRESULT YES
                            if == jump 0x8740F81 ' Equal To
                            jump 0x8740F3C

                            #org 0x8740F81
                            '-----------------------------------
                            message 0x8740FBF ' YOU: Yes,\nAce,\pget...
                            callstd MSG_LOCK ' Built-in lock command
                            applymovement PLAYER 0x874108A ' look_up walk_up walk...
                            pause 0x1E
                            message 0x8741091 ' YOU: You Know why yo...
                            callstd MSG_LOCK ' Built-in lock command
                            applymovement PLAYER 0x8741179 ' walk_right walk_righ...
                            pause 0x1E
                            message 0x8741184 ' YOU: There is one pi...
                            callstd MSG_LOCK ' Built-in lock command
                            applymovement PLAYER 0x87412CA ' walk_right walk_righ...
                            pause 0x1E
                            warp 0x4 0x0 0xFF 0x8 0x12
                            release
                            end

                            #org 0x8740F3C
                            '-----------------------------------
                            message 0x8740F64 ' Ok,\ncome back when ...
                            callstd MSG_LOCK ' Built-in lock command
                            release
                            end


                            #org 0x8740F45
                            = Cap'n,\nare you ready to leave?

                            #org 0x8740FBF
                            = YOU: Yes,\nAce,\pget the boat ready in a bit,\nI need to speak to all of you.\lAdmiral Ace: Ok Cap'n,\n I can do that for ye.\pI will gather their attention.\nMercanarys!\pOur great leader would like to speak!

                            #org 0x8741091
                            = YOU: You Know why you are here\ntoday.\pYou are here so that this\nboat reaches the new region of\pDesertusaum.\nThis region is full o' pirates,\pus being mercenarys will\nbe able to handle them,\pthey are thieves, not fighters.\lHowever...

                            #org 0x8741184
                            = YOU: There is one pirate.\nHe sails under the name of\pRasarchi.\nHe is known for being one of the\pbest pirates to have lived.\nHe is notorius.\pHe is like the Flying Dutchman,\nonly appears\pevery so often, and\nwe happen to travel in the season\pwhen he never appears!\nDon't fear the tales,\pwe will reach our destination!

                            #org 0x8740F64
                            = Ok,\ncome back when ye ready.

                            #org 0x874108A
                            M look_up walk_up walk_up look_left look_right look_down end

                            #org 0x8741179
                            M walk_right walk_right walk_right walk_left walk_left walk_left walk_left walk_left walk_left look_up end

                            #org 0x87412CA
                            M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_down walk_down walk_down walk_down end


                            Everything else works except the warp, sorry if this has been answered already but scrolling through 100s of pages seems longer than asking for help :3
                              #8215    
                            Old May 15th, 2013 (10:19 AM).
                            karatekid552's Avatar
                            karatekid552 karatekid552 is offline
                            What happens if I push it?....
                               
                              Join Date: Nov 2012
                              Location: Do you really want to know? Really?
                              Gender: Male
                              Nature: Bold
                              Posts: 1,766
                              Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                              Quote:
                              Originally Posted by Yudiop View Post
                              Ok, so I tried to do a scripted warp and when i try and reach the area I want (Pallet Town (map bank 4,0)) It the screen goes black and 'freezes'. I have tried other areas and they work but not to the intended area.
                              I am using PKSV-UI
                              Pokemon Fire Red v1.0
                              Script Event
                              topic : Scripted Warps

                              Spoiler:
                              #org 0x8740F23
                              '-----------------------------------
                              lock
                              faceplayer
                              message 0x8740F45 ' Cap'n,\nare you read...
                              callstd MSG_YESNO ' Yes/No message
                              compare LASTRESULT YES
                              if == jump 0x8740F81 ' Equal To
                              jump 0x8740F3C

                              #org 0x8740F81
                              '-----------------------------------
                              message 0x8740FBF ' YOU: Yes,\nAce,\pget...
                              callstd MSG_LOCK ' Built-in lock command
                              applymovement PLAYER 0x874108A ' look_up walk_up walk...
                              pause 0x1E
                              message 0x8741091 ' YOU: You Know why yo...
                              callstd MSG_LOCK ' Built-in lock command
                              applymovement PLAYER 0x8741179 ' walk_right walk_righ...
                              pause 0x1E
                              message 0x8741184 ' YOU: There is one pi...
                              callstd MSG_LOCK ' Built-in lock command
                              applymovement PLAYER 0x87412CA ' walk_right walk_righ...
                              pause 0x1E
                              warp 0x4 0x0 0xFF 0x8 0x12
                              release
                              end

                              #org 0x8740F3C
                              '-----------------------------------
                              message 0x8740F64 ' Ok,\ncome back when ...
                              callstd MSG_LOCK ' Built-in lock command
                              release
                              end


                              #org 0x8740F45
                              = Cap'n,\nare you ready to leave?

                              #org 0x8740FBF
                              = YOU: Yes,\nAce,\pget the boat ready in a bit,\nI need to speak to all of you.\lAdmiral Ace: Ok Cap'n,\n I can do that for ye.\pI will gather their attention.\nMercanarys!\pOur great leader would like to speak!

                              #org 0x8741091
                              = YOU: You Know why you are here\ntoday.\pYou are here so that this\nboat reaches the new region of\pDesertusaum.\nThis region is full o' pirates,\pus being mercenarys will\nbe able to handle them,\pthey are thieves, not fighters.\lHowever...

                              #org 0x8741184
                              = YOU: There is one pirate.\nHe sails under the name of\pRasarchi.\nHe is known for being one of the\pbest pirates to have lived.\nHe is notorius.\pHe is like the Flying Dutchman,\nonly appears\pevery so often, and\nwe happen to travel in the season\pwhen he never appears!\nDon't fear the tales,\pwe will reach our destination!

                              #org 0x8740F64
                              = Ok,\ncome back when ye ready.

                              #org 0x874108A
                              M look_up walk_up walk_up look_left look_right look_down end

                              #org 0x8741179
                              M walk_right walk_right walk_right walk_left walk_left walk_left walk_left walk_left walk_left look_up end

                              #org 0x87412CA
                              M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_down walk_down walk_down walk_down end


                              Everything else works except the warp, sorry if this has been answered already but scrolling through 100s of pages seems longer than asking for help :3
                              Try putting a "waitstate" on the line after the warp. If that doesn't work, go and make sure the map isn't corrupt by getting there by other means.
                              __________________

                              Paired with Simba
                                #8216    
                              Old May 15th, 2013 (10:40 AM).
                              Yudiop Yudiop is offline
                                 
                                Join Date: May 2013
                                Gender: Male
                                Posts: 3
                                Quote:
                                Originally Posted by karatekid552 View Post
                                Try putting a "waitstate" on the line after the warp. If that doesn't work, go and make sure the map isn't corrupt by getting there by other means.
                                it seems waitstate is not considered a command on PKSV

                                message which appears in compilers log : Warning: Unknown command "waitstate"

                                Thanks for trying though
                                  #8217    
                                Old May 15th, 2013 (10:47 AM). Edited May 15th, 2013 by Spherical Ice.
                                Spherical Ice's Avatar
                                Spherical Ice Spherical Ice is offline
                                • Moderator
                                • Silver Tier
                                 
                                Join Date: Nov 2007
                                Location: Bristol, UK
                                Age: 19
                                Posts: 5,094
                                To be honest, most people here are much more familiar with XSE's syntax and it is generally seen to be the better script editor - I think you'd have an easier time if you switched to XSE 1.1.1. There's a mega-huge tutorial just waiting for you here, too!

                                This is what your script would look like in XSE's syntax:

                                Code:
                                #dynamic 0x800000
                                
                                //---------------
                                #org @start
                                lock
                                faceplayer
                                msgbox @string1 MSG_YESNO //"Cap'n, are you ready to leave?"
                                compare LASTRESULT 0x1
                                if 0x1 goto @snippet1
                                msgbox @string2 MSG_FACE //"Ok, come back when ye ready."
                                release
                                end
                                
                                //---------------
                                #org @snippet1
                                msgbox @string3 MSG_FACE //"YOU: Yes, Ace, get the boat ready\..."
                                applymovement MOVE_PLAYER @move1
                                waitmovement 0x0
                                msgbox @string4 MSG_FACE //"YOU: You know why you are here\nto..."
                                applymovement MOVE_PLAYER @move1
                                waitmovement 0x0
                                msgbox @string5 MSG_FACE //"YOU: There is one pirate.\pHe sail..."
                                applymovement MOVE_PLAYER @move1
                                waitmovement 0x0
                                warp 0x4 0x0 0xFF 0x8 0x12
                                waitstate
                                release
                                end
                                
                                
                                //---------
                                // Strings
                                //---------
                                #org @string1
                                = Cap'n, are you ready to leave?
                                
                                #org @string2
                                = Ok, come back when ye ready.
                                
                                #org @string3
                                = YOU: Yes, Ace, get the boat ready\nin a bit, I need to speak to all\lof you.\pAdmiral Ace: Ok Cap'n, I can do\nthat for ye.\pI will gather their attention.\pMercanarys!\pOur great leader would like to\nspeak!
                                
                                #org @string4
                                = YOU: You know why you are here\ntoday.\pYou are here so that this boat\nreaches the new region of\lDesertusaum.\pThis region is full o' pirates,\nus being mercenarys will be able\lto handle them, they are thieves,\lnot fighters.\pHowever...
                                
                                #org @string5
                                = YOU: There is one pirate.\pHe sails under the name of\nRasarchi.\pHe is known for being one of the\nbest pirates to have lived.\pHe is notorius.\pHe is like the Flying Dutchman,\nonly appears every so often, and\lwe happen to travel in the season\lwhen he never appears!\pDon't fear the tales, we will\nreach our destination!
                                
                                
                                //-----------
                                // Movements
                                //-----------
                                #org @move1
                                #raw 0x1 //Face Up
                                #raw 0x11 //Step Up (Normal)
                                #raw 0x11 //Step Up (Normal)
                                #raw 0x2 //Face Left
                                #raw 0x3 //Face Right
                                #raw 0x0 //Face Down
                                #raw 0xFE //End of Movements
                                __________________

                                A Pokemon that is discriminated!
                                Support squirtle and make it everyone's favourite.
                                  #8218    
                                Old May 15th, 2013 (1:59 PM).
                                LaDestitute's Avatar
                                LaDestitute LaDestitute is offline
                                Razor Sharp
                                   
                                  Join Date: Apr 2013
                                  Location: West Coast, USA
                                  Gender: Male
                                  Nature: Calm
                                  Posts: 84
                                  I need some help with un-bugging an XSE script I wrote. It's one of those "rival follows player" sort of things, and I'm using setvar/compare as checkpoints, so the rest of the script can continue from separate maps until the destination is reached. The first part (the interaction with your rival in the Professor's lab) works fine, but when I step back outside and activate the second script event, the dialog from the first part (the rival's dialog) is played instead of how I want, where the rival comes out of the door, and follows the player to the exit of the town. A friend even helped me with trying to fix it, but no luck with that.

                                  Code:
                                  #dynamic 0x800000
                                  
                                  //---------------
                                  #org @start
                                  checkflag 0x828
                                  if 0x1 goto @snippet1
                                  compare 0x4001 0x1
                                  if 0x1 goto @snippet2
                                  release
                                  end
                                  
                                  //---------------
                                  #org @snippet1
                                  applymovement 0x7 @move1
                                  waitmovement 0x0
                                  msgbox @string1 MSG_NORMAL //"Hey, where are you going? You're\n..."
                                  applymovement MOVE_PLAYER @move2
                                  waitmovement 0x0
                                  applymovement MOVE_PLAYER @move3
                                  waitmovement 0x0
                                  applymovement 0x7 @move4
                                  waitmovement 0x0
                                  setvar 0x4001 0x1
                                  release
                                  end
                                  
                                  //---------------
                                  #org @snippet2
                                  applymovement MOVE_PLAYER @move5
                                  waitmovement 0x0
                                  applymovement 0x3 @move6
                                  waitmovement 0x0
                                  applymovement MOVE_PLAYER @move7
                                  applymovement 0x3 @move8
                                  waitmovement 0x0
                                  release
                                  end
                                  
                                  
                                  //---------
                                  // Strings
                                  //---------
                                  #org @string1
                                  = Hey, where are you going?\pYou're going to go see Professor\nPine at the Wildlife Reserve,\laren't you?\pI'm coming with you.\pNo ["]if"s or ["]but"s about it!
                                  
                                  
                                  //-----------
                                  // Movements
                                  //-----------
                                  #org @move1
                                  #raw 0x62 //Exclamation Mark (!)
                                  #raw 0x1D //Step Down (Fast)
                                  #raw 0x1D //Step Down (Fast)
                                  #raw 0x1D //Step Down (Fast)
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move2
                                  #raw 0x1 //Face Up
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move3
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move4
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move5
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move6
                                  #raw 0x61 //Show
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move7
                                  #raw 0x10 //Step Down (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0xFE //End of Movements
                                  
                                  #org @move8
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x11 //Step Up (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0x12 //Step Left (Normal)
                                  #raw 0xFE //End of Movements
                                    #8219    
                                  Old May 15th, 2013 (2:05 PM).
                                  TweenyTodd TweenyTodd is offline
                                  Quitting cuz i got a job
                                     
                                    Join Date: Feb 2013
                                    Location: NOYB
                                    Nature: Sassy
                                    Posts: 95
                                    Quote:
                                    Originally Posted by LaDestitute View Post
                                    STUFF
                                    You forgot to set the flag.

                                    Code:
                                    #dynamic 0x800000
                                    
                                    //---------------
                                    #org @start
                                    checkflag 0x828 HERE IS WHERE THE DIVISION IS
                                    if 0x1 goto @snippet1
                                    compare 0x4001 0x1
                                    if 0x1 goto @snippet2
                                    release
                                    end
                                    
                                    //---------------
                                    #org @snippet1
                                    applymovement 0x7 @move1
                                    waitmovement 0x0
                                    msgbox @string1 MSG_NORMAL //"Hey, where are you going? You're\n..."
                                    applymovement MOVE_PLAYER @move2
                                    waitmovement 0x0
                                    applymovement MOVE_PLAYER @move3
                                    waitmovement 0x0
                                    applymovement 0x7 @move4
                                    waitmovement 0x0
                                    setflag 0x828 Or somewhere else before the script is activated a second time.
                                    setvar 0x4001 0x1
                                    release
                                    end
                                    
                                    //---------------
                                    #org @snippet2
                                    applymovement MOVE_PLAYER @move5
                                    waitmovement 0x0
                                    applymovement 0x3 @move6
                                    waitmovement 0x0
                                    applymovement MOVE_PLAYER @move7
                                    applymovement 0x3 @move8
                                    waitmovement 0x0
                                    release
                                    end
                                    
                                    
                                    //---------
                                    // Strings
                                    //---------
                                    #org @string1
                                    = Hey, where are you going?\pYou're going to go see Professor\nPine at the Wildlife Reserve,\laren't you?\pI'm coming with you.\pNo ["]if"s or ["]but"s about it!
                                    
                                    
                                    //-----------
                                    // Movements
                                    //-----------
                                    #org @move1
                                    #raw 0x62 //Exclamation Mark (!)
                                    #raw 0x1D //Step Down (Fast)
                                    #raw 0x1D //Step Down (Fast)
                                    #raw 0x1D //Step Down (Fast)
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move2
                                    #raw 0x1 //Face Up
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move3
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move4
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move5
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move6
                                    #raw 0x61 //Show
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move7
                                    #raw 0x10 //Step Down (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0xFE //End of Movements
                                    
                                    #org @move8
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x11 //Step Up (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0x12 //Step Left (Normal)
                                    #raw 0xFE //End of Movements
                                      #8220    
                                    Old May 15th, 2013 (2:22 PM).
                                    LaDestitute's Avatar
                                    LaDestitute LaDestitute is offline
                                    Razor Sharp
                                       
                                      Join Date: Apr 2013
                                      Location: West Coast, USA
                                      Gender: Male
                                      Nature: Calm
                                      Posts: 84
                                      Edit:
                                      Actually, it's still wrong. I have flag 0x828 being set in a different script.
                                        #8221    
                                      Old May 16th, 2013 (8:51 AM).
                                      ShinyNine's Avatar
                                      ShinyNine ShinyNine is offline
                                         
                                        Join Date: May 2013
                                        Gender: Male
                                        Posts: 2
                                        I need help with a tile script. It's supposed to be a rival battle, which works fine, but afterwards I want him to walk away and then delete the sprite. The first and biggest problem is that after the battle the person I was battling becomes a gray version of my sprite and I end up controling him instead of my actual character. I don't really know how to delete the sprite but I can work around that I think, I just need to know why I'm suddenly changing characters.

                                        My script: (Pokescript)


                                        #org $battle
                                        jingle
                                        message $talk
                                        $talk 1 = WAIT!
                                        boxset 6
                                        applymovement 4 $walk
                                        $walk 1 ; #binary 0x10 0x10 0x10 0xFE
                                        pausemove 0
                                        applymovement 0xFF $walk1
                                        $walk1 1 ; #binary 0x01 0xFE
                                        pausemove 0
                                        setflag 0x1204
                                        trainerbattle 0x01 0x001 $see $win $after
                                        $see 1 = You must be itching for a battle,\nlet's see how good your new POKEMON\lis!
                                        $win 1 = Wow...\lYour pokemon is impressive

                                        #org $after
                                        checkflag 0x1204
                                        if 0x01 goto $leave
                                        release
                                        end

                                        #org $leave
                                        message $talk1
                                        $talk1 1 = You really are a natural...\nI have a feeling you and your\lPOKEMON are going to have quite the\lstory to tell before all is said\land done.
                                        boxset 6
                                        applymovement 4 $gone
                                        $gone 1 ; #binary 0x13 0x10 0x10 0xFE
                                        pausemove 0
                                        applymovement 0xFF $look
                                        $look 1 ; #binary 0x04 0xFE
                                        pausemove 0
                                        applymovement 4 $gone1
                                        $gone1 1 ; #binary 0x10 0x10 0x10 0x60 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE
                                        pausemove 0
                                        setvar 0x6003 0x0001
                                        release
                                        end
                                          #8222    
                                        Old May 16th, 2013 (9:58 AM).
                                        Spherical Ice's Avatar
                                        Spherical Ice Spherical Ice is offline
                                        • Moderator
                                        • Silver Tier
                                         
                                        Join Date: Nov 2007
                                        Location: Bristol, UK
                                        Age: 19
                                        Posts: 5,094
                                        Jesus, how do people still end up using PokéScript?

                                        I think you'd have an easier time if you switched to XSE 1.1.1. There's a mega-huge tutorial just waiting for you here, too!

                                        Your script would then look like this in XSE's syntax:

                                        Code:
                                        #dynamic 0x800000
                                        
                                        //---------------
                                        #org @start
                                        checkflag 0x1204
                                        if 0x1 goto @snippet1
                                        msgbox @string1 MSG_NORMAL //"WAIT!"
                                        applymovement 0x4 @move1
                                        waitmovement 0x0
                                        spriteface 0xFF 0x2
                                        trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
                                        
                                        //---------------
                                        #org @snippet1
                                        release
                                        end
                                        
                                        //---------------
                                        #org @snippet2
                                        setflag 0x1204
                                        msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
                                        applymovement 0x4 @move2
                                        waitmovement 0x0
                                        spriteface 0xFF 0x4
                                        applymovement 0x4 @move3
                                        waitmovement 0x0
                                        setvar 0x6003 0x1
                                        release
                                        end
                                        
                                        
                                        //---------
                                        // Strings
                                        //---------
                                        #org @string1
                                        = WAIT!
                                        
                                        #org @string2
                                        = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
                                        
                                        #org @string3
                                        = Wow...\pYour POKéMON is impressive!
                                        
                                        
                                        //-----------
                                        // Movements
                                        //-----------
                                        #org @move1
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0xFE //End of Movements
                                        
                                        #org @move2
                                        #raw 0x13 //Step Right (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0xFE //End of Movements
                                        
                                        #org @move3
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x60 //Hide
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0xFE //End of Movements
                                        In any case, the variables and flags you have used are unsafe! Try using these instead.

                                        Code:
                                        #dynamic 0x800000
                                        
                                        //---------------
                                        #org @start
                                        checkflag 0x200
                                        if 0x1 goto @snippet1
                                        msgbox @string1 MSG_NORMAL //"WAIT!"
                                        applymovement 0x4 @move1
                                        waitmovement 0x0
                                        spriteface 0xFF 0x2
                                        trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
                                        
                                        //---------------
                                        #org @snippet1
                                        release
                                        end
                                        
                                        //---------------
                                        #org @snippet2
                                        setflag 0x200
                                        msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
                                        applymovement 0x4 @move2
                                        waitmovement 0x0
                                        spriteface 0xFF 0x4
                                        applymovement 0x4 @move3
                                        waitmovement 0x0
                                        setvar 0x4000 0x1
                                        release
                                        end
                                        
                                        
                                        //---------
                                        // Strings
                                        //---------
                                        #org @string1
                                        = WAIT!
                                        
                                        #org @string2
                                        = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
                                        
                                        #org @string3
                                        = Wow...\pYour POKéMON is impressive!
                                        
                                        
                                        //-----------
                                        // Movements
                                        //-----------
                                        #org @move1
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0xFE //End of Movements
                                        
                                        #org @move2
                                        #raw 0x13 //Step Right (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0xFE //End of Movements
                                        
                                        #org @move3
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x10 //Step Down (Normal)
                                        #raw 0x60 //Hide
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0x1F //Step Left (Fast)
                                        #raw 0xFE //End of Movements
                                        As karatekid has said many a time, the only truly safe flags and variables are 0x200 - 0x2FF for flags and 0x4000 to 0x40FF for variables.
                                        __________________

                                        A Pokemon that is discriminated!
                                        Support squirtle and make it everyone's favourite.
                                          #8223    
                                        Old May 16th, 2013 (10:09 AM).
                                        Yudiop Yudiop is offline
                                           
                                          Join Date: May 2013
                                          Gender: Male
                                          Posts: 3
                                          Quote:
                                          Originally Posted by Spherical Ice View Post
                                          To be honest, most people here are much more familiar with XSE's syntax and it is generally seen to be the better script editor - I think you'd have an easier time if you switched to XSE 1.1.1. There' s a mega-huge tutorial just waiting for you here, too!

                                          Spoiler:
                                          This is what your script would look like in XSE's syntax:

                                          Code:
                                          #dynamic 0x800000
                                          
                                          //---------------
                                          #org @start
                                          lock
                                          faceplayer
                                          msgbox @string1 MSG_YESNO //"Cap'n, are you ready to leave?"
                                          compare LASTRESULT 0x1
                                          if 0x1 goto @snippet1
                                          msgbox @string2 MSG_FACE //"Ok, come back when ye ready."
                                          release
                                          end
                                          
                                          //---------------
                                          #org @snippet1
                                          msgbox @string3 MSG_FACE //"YOU: Yes, Ace, get the boat ready\..."
                                          applymovement MOVE_PLAYER @move1
                                          waitmovement 0x0
                                          msgbox @string4 MSG_FACE //"YOU: You know why you are here\nto..."
                                          applymovement MOVE_PLAYER @move1
                                          waitmovement 0x0
                                          msgbox @string5 MSG_FACE //"YOU: There is one pirate.\pHe sail..."
                                          applymovement MOVE_PLAYER @move1
                                          waitmovement 0x0
                                          warp 0x4 0x0 0xFF 0x8 0x12
                                          waitstate
                                          release
                                          end
                                          
                                          
                                          //---------
                                          // Strings
                                          //---------
                                          #org @string1
                                          = Cap'n, are you ready to leave?
                                          
                                          #org @string2
                                          = Ok, come back when ye ready.
                                          
                                          #org @string3
                                          = YOU: Yes, Ace, get the boat ready\nin a bit, I need to speak to all\lof you.\pAdmiral Ace: Ok Cap'n, I can do\nthat for ye.\pI will gather their attention.\pMercanarys!\pOur great leader would like to\nspeak!
                                          
                                          #org @string4
                                          = YOU: You know why you are here\ntoday.\pYou are here so that this boat\nreaches the new region of\lDesertusaum.\pThis region is full o' pirates,\nus being mercenarys will be able\lto handle them, they are thieves,\lnot fighters.\pHowever...
                                          
                                          #org @string5
                                          = YOU: There is one pirate.\pHe sails under the name of\nRasarchi.\pHe is known for being one of the\nbest pirates to have lived.\pHe is notorius.\pHe is like the Flying Dutchman,\nonly appears every so often, and\lwe happen to travel in the season\lwhen he never appears!\pDon't fear the tales, we will\nreach our destination!
                                          
                                          
                                          //-----------
                                          // Movements
                                          //-----------
                                          #org @move1
                                          #raw 0x1 //Face Up
                                          #raw 0x11 //Step Up (Normal)
                                          #raw 0x11 //Step Up (Normal)
                                          #raw 0x2 //Face Left
                                          #raw 0x3 //Face Right
                                          #raw 0x0 //Face Down
                                          #raw 0xFE //End of Movements



                                          OK, Thanks :D I'll start learning this editor now.
                                            #8224    
                                          Old May 16th, 2013 (11:02 AM).
                                          ShinyNine's Avatar
                                          ShinyNine ShinyNine is offline
                                             
                                            Join Date: May 2013
                                            Gender: Male
                                            Posts: 2
                                            Quote:
                                            Originally Posted by Spherical Ice View Post
                                            Jesus, how do people still end up using PokéScript?

                                            *

                                            Your script would then look like this in XSE's syntax:

                                            Code:
                                            #dynamic 0x800000
                                            
                                            //---------------
                                            #org @start
                                            checkflag 0x1204
                                            if 0x1 goto @snippet1
                                            msgbox @string1 MSG_NORMAL //"WAIT!"
                                            applymovement 0x4 @move1
                                            waitmovement 0x0
                                            spriteface 0xFF 0x2
                                            trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
                                            
                                            //---------------
                                            #org @snippet1
                                            release
                                            end
                                            
                                            //---------------
                                            #org @snippet2
                                            setflag 0x1204
                                            msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
                                            applymovement 0x4 @move2
                                            waitmovement 0x0
                                            spriteface 0xFF 0x4
                                            applymovement 0x4 @move3
                                            waitmovement 0x0
                                            setvar 0x6003 0x1
                                            release
                                            end
                                            
                                            
                                            //---------
                                            // Strings
                                            //---------
                                            #org @string1
                                            = WAIT!
                                            
                                            #org @string2
                                            = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
                                            
                                            #org @string3
                                            = Wow...\pYour POKéMON is impressive!
                                            
                                            
                                            //-----------
                                            // Movements
                                            //-----------
                                            #org @move1
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0xFE //End of Movements
                                            
                                            #org @move2
                                            #raw 0x13 //Step Right (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0xFE //End of Movements
                                            
                                            #org @move3
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x60 //Hide
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0xFE //End of Movements
                                            In any case, the variables and flags you have used are unsafe! Try using these instead.

                                            Code:
                                            #dynamic 0x800000
                                            
                                            //---------------
                                            #org @start
                                            checkflag 0x200
                                            if 0x1 goto @snippet1
                                            msgbox @string1 MSG_NORMAL //"WAIT!"
                                            applymovement 0x4 @move1
                                            waitmovement 0x0
                                            spriteface 0xFF 0x2
                                            trainerbattle 0x1 0x1 0x0 @string2 @string3 @snippet2
                                            
                                            //---------------
                                            #org @snippet1
                                            release
                                            end
                                            
                                            //---------------
                                            #org @snippet2
                                            setflag 0x200
                                            msgbox @string3 MSG_NORMAL //"Wow...\pYour POKéMON is impressive..."
                                            applymovement 0x4 @move2
                                            waitmovement 0x0
                                            spriteface 0xFF 0x4
                                            applymovement 0x4 @move3
                                            waitmovement 0x0
                                            setvar 0x4000 0x1
                                            release
                                            end
                                            
                                            
                                            //---------
                                            // Strings
                                            //---------
                                            #org @string1
                                            = WAIT!
                                            
                                            #org @string2
                                            = You must be itching for a battle,\nlet's see how good your new\lPOKéMON is!
                                            
                                            #org @string3
                                            = Wow...\pYour POKéMON is impressive!
                                            
                                            
                                            //-----------
                                            // Movements
                                            //-----------
                                            #org @move1
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0xFE //End of Movements
                                            
                                            #org @move2
                                            #raw 0x13 //Step Right (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0xFE //End of Movements
                                            
                                            #org @move3
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x10 //Step Down (Normal)
                                            #raw 0x60 //Hide
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0x1F //Step Left (Fast)
                                            #raw 0xFE //End of Movements
                                            As karatekid has said many a time, the only truly safe flags and variables are 0x200 - 0x2FF for flags and 0x4000 to 0x40FF for variables.

                                            Well i switched to XSE and tried the changes you gave me but I'm still having the same problem. The trainer i battle turns into a gray/red version of my character and i end up controlling him instead of the actual player. Basically I just want to know if its because my script is messed up somewhere or if its my rom?
                                              #8225    
                                            Old May 16th, 2013 (6:08 PM).
                                            destinedjagold's Avatar
                                            destinedjagold destinedjagold is offline
                                            Oh Hai Thar~
                                            • Silver Tier
                                             
                                            Join Date: May 2007
                                            Location: Philippines
                                            Age: 26
                                            Gender: Male
                                            Nature: Careful
                                            Posts: 8,507
                                            Quote:
                                            Originally Posted by ShinyNine View Post
                                            The trainer i battle turns into a gray/red version of my character and i end up controlling him instead of the actual player.
                                            That is a common bug when editing the NPCs found on a map.
                                            There had been multiple suggestions to try, like for instance, change the direction of the NPC is facing, or remove the NPCs' variable numbers through Advance Map.
                                            __________________


                                            FC: 0061-1111-6462
                                            TSV: 1364(X), 0790(OR)

                                            Closed Thread
                                            Quick Reply

                                            Sponsored Links
                                            Thread Tools

                                            Posting Rules
                                            You may not post new threads
                                            You may not post replies
                                            You may not post attachments
                                            You may not edit your posts

                                            BB code is On
                                            Smilies are On
                                            [IMG] code is On
                                            HTML code is Off

                                            Forum Jump


                                            All times are GMT -8. The time now is 5:03 PM.