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
  #5826    
Old July 9th, 2011 (11:34 PM).
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,479
Quote:
Originally Posted by Vittorini View Post
---
---
---
What version of XSE do you use?
You see... if you're using 1.1.1 then it's okay, but if you're using older version msgbox commands needs callstd command.
So instead of msgbox @test 0x5
It should be like this:
msgbox @test
callstd 0x5
__________________
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

Relevant Advertising!

  #5827    
Old July 10th, 2011 (4:20 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,185
Quote:
Originally Posted by Spritingyoshi22 View Post
Can someone plaese tell me how to write a script for pokemon sapphire
otherwise I can't continue my pokemon hack and iv'e got an image in my head on what my hack will look like also to be presise i am gonna need to know how to write a wild battle script first, becase theres alot of them.
Try reading diegoisawesome's XSE tutorial.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
  #5828    
Old July 10th, 2011 (4:38 AM).
ubuntupokemoninc's Avatar
ubuntupokemoninc ubuntupokemoninc is offline
Hacker/Programmer
     
    Join Date: Jul 2011
    Gender: Male
    Nature: Serious
    Posts: 7
    I'm useing xse version 1.1.1
      #5829    
    Old July 10th, 2011 (5:21 AM).
    Articuno23's Avatar
    Articuno23 Articuno23 is offline
    Sub-Zero
       
      Join Date: Jul 2011
      Gender: Male
      Nature: Modest
      Posts: 16
      #org 0x71C7CC
      lockall
      setvar 0x7001 0x0
      goto 0x71C830
      end

      '-----------------------
      #org 0x1C830
      textcolor 0x0
      msgbox 0x71CBB0 '"come here message."
      callstd 0x4
      closeonkeypress
      playsong 0x110 0x0
      compare 0x7001 0x0
      if 0x1 call 0x71CC2C
      compare 0x7001 0x1
      if 0x1 call 0x8C458C
      compare 0x7001 0x2
      if 0x1 call 0x8C45F0
      msgbox 0x93788C 'going to boat msg
      callstd 0x4
      closeonkeypress
      applymovement 0x5 0x937760 ‘disappear off screen sequence
      waitmovement 0x0
      fadedefault
      clearflag 0x9000
      releaseall
      end

      '-----------------------
      #org 0x1CC2C ‘nearest tile
      applymovement MOVE_PLAYER 0x7200B0 ‘player move
      waitmovement 0x0
      return

      '-----------------------
      #org 0xC458C ‘2 nearest tile
      applymovement MOVE_PLAYER 0x8C4654 ‘move player
      waitmovement 0x0
      return

      '-----------------------
      #org 0xC45F0 ‘3 tile away
      applymovement MOVE_PLAYER 0x8C471C ‘move player
      waitmovement 0x0
      return


      '-----------
      ' Movements
      #org 0x37760 ‘diasapear
      #raw 12 'Step Left (Normal)
      #raw 10 'Step Down (Normal)
      #raw 10 'Step Down (Normal)
      #raw 13 'Step Right (Normal)
      #raw 13 'Step Right (Normal)
      #raw 13 'Step Right (Normal)
      #raw 10 'Step Down (Normal)
      #raw 10 'Step Down (Normal)
      #raw 10 'Step Down (Normal)
      #raw 10 'Step Down (Normal)
      #raw 10 'Step Down (Normal)
      #raw FE 'End of Movements

      #org 0x200B0 '1 tile
      #raw 11 'Step Up (Normal)
      #raw 12 'Step Left (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 12 'Step Left (Normal)
      #raw 12 'Step Left (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw FE 'End of Movements

      #org 0xC4654 '2 tile
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 12 'Step Left (Normal)
      #raw 12 'Step Left (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw FE 'End of Movements


      #org 0xC471C '3 tile
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 12 'Step Left (Normal)
      #raw 12 'Step Left (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw 12 'Step Left (Normal)
      #raw 12 'Step Left (Normal)
      #raw 11 'Step Up (Normal)
      #raw 11 'Step Up (Normal)
      #raw FE 'End of Movements
      '---------
      ' Messages
      #org 0x1CBB0
      = Hello v\h01, come quick.

      #org 0x3788C
      = I’m heading to the boat now.

      This script I wrote isn't working at all, I have tried to make the player as soon as he enters the building to go up and see prof OAK. But when ever he steps on the green scripting tiles I have set with this code on them the game freezes. I am using XSE version 1.0.0 and AdvancedMap 1.95(Latest version) and running the Rom for testing on VisualBoyAdvanced version 1.72. Please help I have watched several videos, read loads of tutorials but still it doesn't work. I have also analyzed in-game scripts and tried to adapt them but with no success, I would be very, very grateful for any help, and thanks in advance.
        #5830    
      Old July 10th, 2011 (5:32 AM).
      Clam85 Clam85 is offline
         
        Join Date: Aug 2009
        Gender: Male
        Posts: 13
        Quote:
        Originally Posted by ubuntupokemoninc View Post
        Yes that what i set it to, with out that code it reapears after the first step so it works, but when I leave pallet town, and come back It reapears!



        thats because you need
        setflag 0x828
        setflag 0x291
        Alright, I got the give pokemon part working, but now whichever script I make, the text boxes don't show up.
        I made this real quick:
        Spoiler:

        Code:
        #dynamic 0x800000
        
        #org @start
        lock
        faceplayer
        checkflag 0x800
        if 0x1 goto @done
        msgbox @1 0x4
        closeonkeypress
        release
        end
        
        #org @done
        = I see you already have\nyour first very own Pokemon!
        
        #org @1
        = You should get your first\nPokemon from that man\nover there!

        Any idea what I'm doing wrong?
          #5831    
        Old July 10th, 2011 (5:36 AM).
        ~Merlino~'s Avatar
        ~Merlino~ ~Merlino~ is offline
           
          Join Date: Jun 2011
          Location: Rome, Italy
          Gender: Male
          Posts: 4
          Quote:
          Originally Posted by Clam85 View Post
          Alright, I got the give pokemon part working, but now whichever script I make, the text boxes don't show up.
          I made this real quick:
          Spoiler:

          Code:
          #dynamic 0x800000
          
          #org @start
          lock
          faceplayer
          checkflag 0x800
          if 0x1 goto @done
          msgbox @1 0x4
          closeonkeypress
          release
          end
          
          #org @done
          = I see you already have\nyour first very own Pokemon!
          
          #org @1
          = You should get your first\nPokemon from that man\nover there!

          Any idea what I'm doing wrong?
          You must insert the command 'waitmsg' after the msgbox.
            #5832    
          Old July 10th, 2011 (5:41 AM).
          DrFuji's Avatar
          DrFuji DrFuji is offline
          Heiki Hecchara‌‌
          • Crystal Tier
           
          Join Date: Sep 2009
          Location: Downia-upside
          Age: 24
          Gender: Male
          Nature: Jolly
          Posts: 1,328
          Quote:
          Originally Posted by Articuno23 View Post
          #org 0x71C7CC
          lockall
          setvar 0x7001 0x0
          goto 0x71C830
          end

          '-----------------------
          #org 0x1C830
          textcolor 0x0
          msgbox 0x71CBB0 '"come here message."
          callstd 0x4
          closeonkeypress
          playsong 0x110 0x0
          compare 0x7001 0x0
          if 0x1 call 0x71CC2C
          compare 0x7001 0x1
          if 0x1 call 0x8C458C
          compare 0x7001 0x2
          if 0x1 call 0x8C45F0
          msgbox 0x93788C 'going to boat msg
          callstd 0x4
          closeonkeypress
          applymovement 0x5 0x937760 ‘disappear off screen sequence
          waitmovement 0x0
          fadedefault
          clearflag 0x9000
          releaseall
          end

          '-----------------------
          #org 0x1CC2C ‘nearest tile
          applymovement MOVE_PLAYER 0x7200B0 ‘player move
          waitmovement 0x0
          return

          '-----------------------
          #org 0xC458C ‘2 nearest tile
          applymovement MOVE_PLAYER 0x8C4654 ‘move player
          waitmovement 0x0
          return

          '-----------------------
          #org 0xC45F0 ‘3 tile away
          applymovement MOVE_PLAYER 0x8C471C ‘move player
          waitmovement 0x0
          return


          '-----------
          ' Movements
          #org 0x37760 ‘diasapear
          #raw 12 'Step Left (Normal)
          #raw 10 'Step Down (Normal)
          #raw 10 'Step Down (Normal)
          #raw 13 'Step Right (Normal)
          #raw 13 'Step Right (Normal)
          #raw 13 'Step Right (Normal)
          #raw 10 'Step Down (Normal)
          #raw 10 'Step Down (Normal)
          #raw 10 'Step Down (Normal)
          #raw 10 'Step Down (Normal)
          #raw 10 'Step Down (Normal)
          #raw FE 'End of Movements

          #org 0x200B0 '1 tile
          #raw 11 'Step Up (Normal)
          #raw 12 'Step Left (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 12 'Step Left (Normal)
          #raw 12 'Step Left (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw FE 'End of Movements

          #org 0xC4654 '2 tile
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 12 'Step Left (Normal)
          #raw 12 'Step Left (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw FE 'End of Movements


          #org 0xC471C '3 tile
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 12 'Step Left (Normal)
          #raw 12 'Step Left (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw 12 'Step Left (Normal)
          #raw 12 'Step Left (Normal)
          #raw 11 'Step Up (Normal)
          #raw 11 'Step Up (Normal)
          #raw FE 'End of Movements
          '---------
          ' Messages
          #org 0x1CBB0
          = Hello v\h01, come quick.

          #org 0x3788C
          = I’m heading to the boat now.

          This script I wrote isn't working at all, I have tried to make the player as soon as he enters the building to go up and see prof OAK. But when ever he steps on the green scripting tiles I have set with this code on them the game freezes. I am using XSE version 1.0.0 and AdvancedMap 1.95(Latest version) and running the Rom for testing on VisualBoyAdvanced version 1.72. Please help I have watched several videos, read loads of tutorials but still it doesn't work. I have also analyzed in-game scripts and tried to adapt them but with no success, I would be very, very grateful for any help, and thanks in advance.
          Select the green script tile and make sure that the Unknown and Variable Number are set to these:
          __________________
            #5833    
          Old July 10th, 2011 (5:42 AM).
          Clam85 Clam85 is offline
             
            Join Date: Aug 2009
            Gender: Male
            Posts: 13
            Quote:
            Originally Posted by ~Merlino~ View Post
            You must insert the command 'waitmsg' after the msgbox.
            Ah, I'll try it out.
            May I know why I should put that there?

            EDIT: When I try to compile it says: unknown keyword 'waitmsg', I'm using XSE.
              #5834    
            Old July 10th, 2011 (5:59 AM).
            ~Merlino~'s Avatar
            ~Merlino~ ~Merlino~ is offline
               
              Join Date: Jun 2011
              Location: Rome, Italy
              Gender: Male
              Posts: 4
              Quote:
              Originally Posted by Clam85 View Post
              Ah, I'll try it out.
              May I know why I should put that there?

              EDIT: When I try to compile it says: unknown keyword 'waitmsg', I'm using XSE.
              Because the command 'closeonkeypress' close the box with the message, but it must work after the message, so you insert 'waitmsg' that lock the script until the end of the message.
              It's strange, what version of XSE do you use? I use XSE 1.1.1 and I haven't that problem.
                #5835    
              Old July 10th, 2011 (6:07 AM).
              Clam85 Clam85 is offline
                 
                Join Date: Aug 2009
                Gender: Male
                Posts: 13
                Quote:
                Originally Posted by ~Merlino~ View Post
                Because the command 'closeonkeypress' close the box with the message, but it must work after the message, so you insert 'waitmsg' that lock the script until the end of the message.
                It's strange, what version of XSE do you use? I use XSE 1.1.1 and I haven't that problem.
                Ah, I was still using v1, stupid me xD

                EDIT: the link in HackMew's tools factory doesn't seem to work, could you possible provide me with another one?
                  #5836    
                Old July 10th, 2011 (6:26 AM).
                Articuno23's Avatar
                Articuno23 Articuno23 is offline
                Sub-Zero
                   
                  Join Date: Jul 2011
                  Gender: Male
                  Nature: Modest
                  Posts: 16
                  Quote:
                  DrFuji: Select the green script tile and make sure that the Unknown and Variable Number are set to these:
                  i have just tried this however my unknown and varnumber are set out a little bit different as you can see in the screen shot below. So i put the varnumber in but the unknown only lets me put in 2 digit numbers so i put in $03 and $4050 in the varnumber. I did this for all 3 green scripting tiles. 2 of them with the offset of the coding in my post before froze like normal and the music kept playing like normal. However 1 of the tiles when i step on it it asks me if I "Want the fire pokemon charmander" and if i step off it and on it again it keeps asking. Later i noticed the offset was the wrong one for my script i posted before. I changed the offset to the correct one and it keeps freezing. The unknown and varnumbers are $03 and $4050 but it still freezes. However with the script of the "choose pokemon" when stepped on the tiles respond and the game doesn't freeze but i don't want to choose a starting pokemon as soon as i come through the building door :D. Also could you tell me where you got the $4050 from please. I am guessing $03 is just the standard number for unknown. Sorry for messy writing on screen shot (touchpad) Thanks a lot.
                  Attached Images
                  File Type: jpg explination.jpg‎ (144.4 KB, 11 views) (Save to Dropbox)
                    #5837    
                  Old July 10th, 2011 (6:45 AM).
                  Clam85 Clam85 is offline
                     
                    Join Date: Aug 2009
                    Gender: Male
                    Posts: 13
                    Yay! I finally got it to work thanks to ~merlino~, but now I have yet another problem: whenever I enter a battle it gives me the safari zone options instead of the regular battle options O.o

                    EDIT: It doesn't give me the pokemon actually, it just makes me be in a safari, if I press 'retire' in the menu it teleports me to the Fuchsia city safari zone and I have no pokemon nor pokedex. O.o
                      #5838    
                    Old July 10th, 2011 (7:10 AM).
                    Articuno23's Avatar
                    Articuno23 Articuno23 is offline
                    Sub-Zero
                       
                      Join Date: Jul 2011
                      Gender: Male
                      Nature: Modest
                      Posts: 16
                      Yes,thanks to DrFuji i have it working now. I used a different script but the same unknown and varnumber!:
                      #dynamic 0x800000

                      #org @start
                      lock
                      faceplayer
                      checkflag 0x200
                      if 0x1 goto @done
                      msgbox @message1
                      boxset 0x6
                      showsprite 1
                      applymovement 0xFF @follow
                      waitmovement 0x0
                      applymovement 1 @movements
                      waitmovement 0x0
                      pause 0x30
                      msgbox @message
                      boxset 0x6
                      msgbox @message2
                      boxset 0x6
                      applymovement 1 @goboat
                      waitmovement 0x0
                      hidesprite 1
                      setflag 0x200
                      setflag 0x1000
                      release
                      end

                      #org @done
                      release
                      end

                      #org @message1
                      = Hello \v\h01, come quick!
                      #org @message
                      = Hi \v\h01, we must hurry.\pYou're the last one to visit.\nDid you sleep in?\pAnyway we are all heading to the main\nland, but you will need a Pok\h1Bmon!

                      #org @movements
                      #raw 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x10 0x13 0x01 0xFE

                      #org @follow
                      #raw 0x11 0x11 0x12 0x12 0x12 0x12 0x12 0x12 0x01 0xFE

                      #org @message2
                      = There are only 3 Pok\h1Bmon left.\nMake your choice wisely.\pI will meet you on the boat.

                      #org @goboat
                      #raw 0x10 0x13 0x13 0x13 0x13 0x13 0x13 0x10 0xFE

                      However, I have yet another problem. Once the sprite has exited the room his sprite is still at the starting place at the top of the room. I tried starting him off as a Hidden sprite but when i triggered the script it showed the first message and then weirdly it started the game again instead of doing the movements!
                      P.S if DrFuji or anyone else could tell me why the Varnumber works as $4050 i would be very grateful, I really need to know for future scripts in this ROM. Thanks much :D
                        #5839    
                      Old July 10th, 2011 (10:17 AM). Edited July 10th, 2011 by Stash.
                      Stash Stash is offline
                         
                        Join Date: Aug 2010
                        Gender: Male
                        Nature: Adamant
                        Posts: 58
                        In an attempt to learn some scripting, I face a rather annoying and time-consuming problem with a conditional segment. In C/C++ or programming languages in general, you have the option of using if condition in versatile ways.

                        Code:
                        if (x > 5 || y < 2)
                            printf("Something");
                        You have the logical or operator, which pretty much saves time through including multiple conditions in one if statement. My question would be: when using compare and if in XSE, which is similar to the if keyword in C, is it possible to include more than one condition in a single segment? Or include a range (from 0x1 to 0x6)?As such:

                        Code:
                        compare 0x8004 (0x1 or 0x2 or 0x3...)
                            if 0x1 goto @pointer
                        I might just be blabbering for nothing, and it turns out to be an obvious answer. But, any help is appreciated. Thank you in advance.
                          #5840    
                        Old July 10th, 2011 (10:37 AM).
                        Articuno23's Avatar
                        Articuno23 Articuno23 is offline
                        Sub-Zero
                           
                          Join Date: Jul 2011
                          Gender: Male
                          Nature: Modest
                          Posts: 16
                          Could anyone tell me how to work out varnumbers Please need help urgently
                            #5841    
                          Old July 10th, 2011 (10:52 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,185
                          Quote:
                          Originally Posted by Stash View Post
                          In an attempt to learn some scripting, I face a rather annoying and time-consuming problem with a conditional segment. In C/C++ or programming languages in general, you have the option of using if condition in versatile ways.

                          Code:
                          if (x > 5 || y < 2)
                              printf("Something");
                          You have the logical or operator, which pretty much saves time through including multiple conditions in one if statement. My question would be: when using compare and if in XSE, which is similar to the if keyword in C, is it possible to include more than one condition in a single segment? Or include a range (from 0x1 to 0x6)?As such:

                          Code:
                          compare 0x8004 (0x1 or 0x2 or 0x3...)
                              if 0x1 goto @pointer
                          I might just be blabbering for nothing, and it turns out to be an obvious answer. But, any help is appreciated. Thank you in advance.
                          Unfortunately the only way to do this would be, using your example of three possible outcomes:
                          Code:
                          compare 0x8004 0x1
                          if 0x1 goto @pointer1
                          compare 0x8004 0x2
                          if 0x1 goto @pointer2
                          --stuff for pointer 3---
                          __________________

                          A Pokemon that is discriminated!
                          Support squirtle and make it everyone's favourite.
                            #5842    
                          Old July 10th, 2011 (1:21 PM).
                          colcolstyles's Avatar
                          colcolstyles colcolstyles is offline
                          Yours truly
                          • Crystal Tier
                           
                          Join Date: May 2008
                          Location: The Bay Area
                          Gender: Male
                          Nature: Lonely
                          Posts: 1,584
                          Quote:
                          Originally Posted by Stash View Post
                          In an attempt to learn some scripting, I face a rather annoying and time-consuming problem with a conditional segment. In C/C++ or programming languages in general, you have the option of using if condition in versatile ways.

                          Code:
                          if (x > 5 || y < 2)
                              printf("Something");
                          You have the logical or operator, which pretty much saves time through including multiple conditions in one if statement. My question would be: when using compare and if in XSE, which is similar to the if keyword in C, is it possible to include more than one condition in a single segment? Or include a range (from 0x1 to 0x6)?As such:

                          Code:
                          compare 0x8004 (0x1 or 0x2 or 0x3...)
                              if 0x1 goto @pointer
                          I might just be blabbering for nothing, and it turns out to be an obvious answer. But, any help is appreciated. Thank you in advance.
                          The games' scripting language doesn't have any of those nifty high-level tools. You'd have to do it like this for logical or (||):

                          Code:
                          compare VAR1 5
                          if B_> goto @true
                          compare VAR2 2
                          if B_< goto @true
                          And I usually use something like this for logical and (&&):

                          Code:
                          compare VAR1 5
                          if B_> call @check2
                          goto @false
                          
                          #org @check2
                          compare VAR2 2
                          if B_< goto @true
                          return
                          __________________

                          Brother of Vrai
                            #5843    
                          Old July 11th, 2011 (2:45 AM).
                          Stash Stash is offline
                             
                            Join Date: Aug 2010
                            Gender: Male
                            Nature: Adamant
                            Posts: 58
                            Quote:
                            Originally Posted by Spherical Ice View Post
                            Unfortunately the only way to do this would be, using your example of three possible outcomes:
                            Code:
                            compare 0x8004 0x1
                            if 0x1 goto @pointer1
                            compare 0x8004 0x2
                            if 0x1 goto @pointer2
                            --stuff for pointer 3---
                            Quote:
                            Originally Posted by colcolstyles View Post
                            The games' scripting language doesn't have any of those nifty high-level tools. You'd have to do it like this for logical or (||):

                            Code:
                            compare VAR1 5
                            if B_> goto @true
                            compare VAR2 2
                            if B_< goto @true
                            And I usually use something like this for logical and (&&):

                            Code:
                            compare VAR1 5
                            if B_> call @check2
                            goto @false
                            
                            #org @check2
                            compare VAR2 2
                            if B_< goto @true
                            return
                            Oh well. Thank you for the reply.

                            Another simple question: does the free space in a FR ROM start at 0x800000? Or before?
                              #5844    
                            Old July 11th, 2011 (6:40 AM).
                            metapod23's Avatar
                            metapod23 metapod23 is offline
                            Hardened Trainer
                               
                              Join Date: Mar 2009
                              Gender: Male
                              Nature: Timid
                              Posts: 673
                              Quote:
                              Originally Posted by Articuno23 View Post
                              Could anyone tell me how to work out varnumbers Please need help urgently
                              varnumbers are variables. Most variables are set a 0 when the game begins. It is understood that variables from 4050 and above are generally unused by the game and its mechanics, and so are safe to use for hackers.

                              Variables are used to activate scripts. If you set a script's variable # as 4050, and its var value at 0000, then that script will activate when stepped on as long as variable 4050 is set to 0. Since all variables are set to 0 when the game begins, that script will activate whenever you step on it.

                              In order to deactivate the script, you would need to set the variable to a different value in the script itself. So if you wanted the script to only activate the first time you step on it, you would have to put:

                              Code:
                              setvar 0x4050 0x1
                              in the script itself. With variable 4050 set to 0001, the script will not activate again, because you've told it in A-Map to only activate when 4050 is set to 0.

                              For future scripts, it is recommended that you use other variables, unless for some reason the future scripts are dependent on the previous one. For instance, you could have a second script that uses var # 4050 and value 0001. That script will only activate when var 4050 is set to value 0001, which means it will only activate once the first script has been fully executed.

                              I hope that makes it a bit clearer.
                              __________________
                                #5845    
                              Old July 11th, 2011 (8:08 AM).
                              Vittorini's Avatar
                              Vittorini Vittorini is offline
                              Expert Trainer
                                 
                                Join Date: Sep 2009
                                Location: Maryland
                                Age: 25
                                Gender: Male
                                Nature: Quiet
                                Posts: 23
                                Quote:
                                Originally Posted by Ash493 View Post

                                What version of XSE do you use?
                                You see... if you're using 1.1.1 then it's okay, but if you're using older version msgbox commands needs callstd command.
                                So instead of msgbox @test 0x5
                                It should be like this:
                                msgbox @test
                                callstd 0x5

                                No, I'm using the most up to date version of XSE. But what's even stranger, I tried the same script on a different map (same offset and everything) and it working perfectly! The script just did not want to work on a certain map I guess. I really have no idea what happened.
                                __________________
                                  #5846    
                                Old July 11th, 2011 (8:47 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,185
                                Perhaps the map in which it doesn't work has an interefering level script?
                                __________________

                                A Pokemon that is discriminated!
                                Support squirtle and make it everyone's favourite.
                                  #5847    
                                Old July 11th, 2011 (9:00 AM).
                                Vittorini's Avatar
                                Vittorini Vittorini is offline
                                Expert Trainer
                                   
                                  Join Date: Sep 2009
                                  Location: Maryland
                                  Age: 25
                                  Gender: Male
                                  Nature: Quiet
                                  Posts: 23
                                  Quote:
                                  Originally Posted by Spherical Ice View Post
                                  Perhaps the map in which it doesn't work has an interefering level script?
                                  Perhaps, but I doubt it. The map the event was on was Route 1. I don't really have any knowledge of level scripts though. I really think I just have a bad ROM. I might try downloading a different version later.
                                  __________________
                                    #5848    
                                  Old July 11th, 2011 (10:37 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,479
                                  Quote:
                                  Originally Posted by Stash View Post

                                  Another simple question: does the free space in a FR ROM start at 0x800000? Or before?
                                  Not exactly... you see... Free Space in every ROM is practically everywhere.
                                  Though it's very common to use 800000 as main offset.
                                  But you can use also 700000. =)

                                  Quote:
                                  Originally Posted by Vittorini View Post
                                  No, I'm using the most up to date version of XSE. But what's even stranger, I tried the same script on a different map (same offset and everything) and it working perfectly! The script just did not want to work on a certain map I guess. I really have no idea what happened.
                                  That's weird... it really might be your ROM...
                                  __________________
                                  ROM hacking FAQ - Read before asking how to play a hack.

                                  Anime List | PSN Trophy List
                                    #5849    
                                  Old July 12th, 2011 (12:42 AM).
                                  Charizardguy's Avatar
                                  Charizardguy Charizardguy is offline
                                     
                                    Join Date: Jul 2008
                                    Gender:
                                    Posts: 30
                                    What is wrong with this line?

                                    #org 0x87401A4
                                    = \v\h06: Rise and shine \v\h01.\nAbout time you woke up.\pALEX is expecting us at the gym,\nso let's go!

                                    Which makes it say this
                                    "Gary: Rise and shine FIRE.
                                    Ŭ
                                    Alex is expecting us at the gym,
                                    so let's go!"

                                    It then is followed by normality.
                                    __________________
                                    HG/SS FC: 4942 7325 3416
                                      #5850    
                                    Old July 12th, 2011 (2:56 AM).
                                    Sarcastic Prince's Avatar
                                    Sarcastic Prince Sarcastic Prince is offline
                                    Starting anew...
                                       
                                      Join Date: Aug 2007
                                      Location: Kwun Tong Mountains
                                      Gender: Male
                                      Nature: Timid
                                      Posts: 3,066
                                      Quote:
                                      Originally Posted by Charizardguy View Post
                                      What is wrong with this line?

                                      #org 0x87401A4
                                      = \v\h06: Rise and shine \v\h01.\nAbout time you woke up.\pALEX is expecting us at the gym,\nso let's go!

                                      Which makes it say this
                                      "Gary: Rise and shine FIRE.
                                      Ŭ
                                      Alex is expecting us at the gym,
                                      so let's go!"

                                      It then is followed by normality.
                                      Try using [player] and [rival]. Maybe that'll work.

                                      OK, and now for my question.

                                      Spoiler:
                                      #dynamic 0x800000
                                      #org @start
                                      msgbox @1 0x6
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      applymovement 0x7 @pointer
                                      applymovement 0x8 @pointer2
                                      applymovement 0x9 @pointer3
                                      applymovement 0x10 @pointer4
                                      applymovement 0x20 @pointer5
                                      applymovement 0x12 @pointer6
                                      applymovement 0x13 @pointer7
                                      applymovement 0x0 @pointer8
                                      applymovement 0x14 @pointer9
                                      applymovement 0x15 @pointer10
                                      applymovement 0x16 @pointer11
                                      applymovement 0x17 @pointer12
                                      applymovement 0x18 @pointer13
                                      applymovement 0x21 @pointer14
                                      applymovement 0x19 @pointer15
                                      waitmovement 0x0
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      applymovement 0x7 @pointer16
                                      applymovement 0x8 @pointer17
                                      applymovement 0x9 @pointer18
                                      applymovement 0x10 @pointer19
                                      applymovement 0x20 @pointer20
                                      applymovement 0x12 @pointer21
                                      applymovement 0x13 @pointer22
                                      applymovement 0x0 @pointer23
                                      applymovement 0x14 @pointer24
                                      applymovement 0x15 @pointer25
                                      applymovement 0x16 @pointer26
                                      applymovement 0x17 @pointer27
                                      applymovement 0x18 @pointer28
                                      applymovement 0x21 @pointer29
                                      applymovement 0x19 @pointer30
                                      waitmovement 0x0
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      special 0x133
                                      waitstate
                                      pause 0x28
                                      msgbox @1 0x6
                                      release
                                      end

                                      #org @1
                                      =
                                      #org @2
                                      =

                                      #org @pointer
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer2
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer3
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer4
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer5
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer6
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer7
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer8
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer9
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer10
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer11
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer12
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer13
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer14
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer15
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer16
                                      #raw 0x1
                                      #raw 0xFE

                                      #org @pointer17
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer18
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer19
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer20
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer21
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer22
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer23
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer24
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer25
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer26
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer27
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer28
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer29
                                      #raw 0x2
                                      #raw 0xFE

                                      #org @pointer30
                                      #raw 0x2
                                      #raw 0xFE


                                      Only 4 of the 15 OWs follow the "applymovement" command.
                                      They're numbers 13, 14, 15 and 21.

                                      Is something wrong with the script?
                                      __________________
                                      I am now an anime dubber, cover singer and a fan of anime. I can still apply as a translator and grammar corrector, though.
                                      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 8:05 PM.