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
  #6576    
Old March 14th, 2012 (1:57 PM).
Mana's Avatar
Mana Mana is offline
  • Platinum Tier
 
Join Date: Jan 2009
Location: UK
Gender: Female
Posts: 10,005
Quote:
Originally Posted by Rumille View Post
This is the current script that makes it freeze up. I'll go look into the setvar command, haven't used that yet. I'll let you know if it works.

Thanks for the replies!

Quick question about the setvar command (and setflag for that matter). How do you decide which number to use. You told me to use 7000 and the script seems to work (well, the messagebox doesn't but I'll be able to fix that I think), but how do I know what number to use? Are there numbers I cannot use? And if so, why not?
You're missing your message type from your script?

You need to put a quantifier, probably 0x6 or MSG_NORMAL in this case. It goes after the pointer.

msgbox 0x88007D4 MSG_NORMAL '"Hold on!"

Did you edit this decompiled script and take it out by accident maybe?


For flags/variables, the game itself uses many flags and variables for mechanics as well as trainers and events from FR. Whilst it might be a good idea to reuse the ones used in events generally its advantageous to start at a safe point, so you don't overwrite something important.

Flags, start 0x1000 and work your way up.
Variables I've always been told to start at 0x7000 and go up.

Relevant Advertising!

  #6577    
Old March 14th, 2012 (2:05 PM).
Rumille's Avatar
Rumille Rumille is offline
     
    Join Date: Feb 2012
    Gender: Male
    Posts: 72
    Quote:
    Originally Posted by SwiftSign View Post
    You're missing your message type from your script?

    You need to put a quantifier, probably 0x6 or MSG_NORMAL in this case. It goes after the pointer.

    msgbox 0x88007D4 MSG_NORMAL '"Hold on!"

    Did you edit this decompiled script and take it out by accident maybe?


    For flags/variables, the game itself uses many flags and variables for mechanics as well as trainers and events from FR. Whilst it might be a good idea to reuse the ones used in events generally its advantageous to start at a safe point, so you don't overwrite something important.

    Flags, start 0x1000 and work your way up.
    Variables I've always been told to start at 0x7000 and go up.
    First of all, thank you. I didn't add the quantifier. Probably the dumbest mistake I made in my short, very short career as a scripter. Second of all, thank you again, I always have trouble understanding the numbers with those kind of commands.

    My command now works, so I'm happy!

    Quote:
    '-----------------------
    #org 0x800697
    lockall
    setvar 0x7000 0x0
    msgbox 0x88007D4 '"Hold on!"
    callstd 0x2
    applymovement 0x1 0x88007A2
    waitmovement 0x0
    applymovement MOVE_PLAYER 0x88007D1
    pause 0x30
    msgbox 0x88007DE '"You need a Pokémon before you do an..."
    callstd 0x2
    applymovement MOVE_PLAYER 0x8800819
    releaseall
    end


    '-----------
    ' Movements
    '-----------
    #org 0x8007A2
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw 13 'Step Right (Normal)
    #raw FE 'End of Movements

    #org 0x8007D1
    #raw 2 'Face Left
    #raw FE 'End of Movements

    #org 0x800819
    #raw 13 'Step Right (Normal)
    #raw FE 'End of Movements


    '---------
    ' Strings
    '---------
    #org 0x8007D4
    = Hold on!

    #org 0x8007DE
    = You need a Pokémon before you do anything else. Follow me.
    For the people who wonder what I changed, this is the command as it is now.
      #6578    
    Old March 15th, 2012 (4:04 AM). Edited March 15th, 2012 by aljohnston112.
    aljohnston112's Avatar
    aljohnston112 aljohnston112 is offline
       
      Join Date: Jul 2010
      Gender: Male
      Nature: Naughty
      Posts: 25
      [QUOTE=SwiftSign;7083802]M onspot_left is turn left right?

      If that's the case then the problem is quite obviously your pointers - all your pointers are set to 0x8EB0DD0, which is all 'turn left'. You haven't given them another movement option.

      Spoiler:
      #org 0x8EB0C10
      '-----------------------------------
      lock
      checkflag 0x1001
      if true jump 0x8EB0D00 ' Flag is set
      applymovement 0x1 0x8EB0E00 ' onspot_left raw_FF r...
      pause 0x10
      msgbox 0x8EB0E30 ' Dang!\nIt bounced of...
      callstd MSG_NORMAL ' Built-in lock command
      applymovement 0x4 0x8EB0E00 ' onspot_left raw_FF r...
      pause 0x10
      msgbox 0x8EB0E70 ' My turn next!
      callstd MSG_NORMAL ' Built-in lock command
      applymovement 0x1 0x8EB0E00 ' onspot_left raw_FF r...
      pause 0x10
      msgbox 0x8EB0EA0 ' Think you can do it?
      callstd MSG_NORMAL ' Built-in lock command
      applymovement 0x4 0x8EB0E00 ' onspot_left raw_FF r...
      pause 0x10
      msgbox 0x8EB0EE0 ' Be quiet.\nI'm gonna...
      callstd MSG_NORMAL ' Built-in lock command
      applymovement 0x4 0x8EB0FA0 ' onspot_left raw_FF r...
      pause 0x10
      applymovement 0x5 0x8EB0FD0 ' raw_FF raw_FF raw_FF...
      pause 0x30
      checksound
      cry NIDORINO 0x2
      waitcry
      playsound 0x2 0x2
      battle NIDORINO 3 NONE
      special BATTLE_PIXELLATE
      waitspecial
      setflag 0x1001
      special2 0x999 0xB4
      compare LASTRESULT 0x1
      if == jump 0x8EB0D70 ' Equal To
      compare LASTRESULT 0x4
      if == jump 0x8EB0F00 ' Equal To
      release
      end

      #org 0x8EB0D00
      faceplayer
      msgbox 0x8EB0D30 ' I almost had that Ni...
      callstd MSG_NORMAL ' Built-in lock command
      release
      end

      #org 0x8EB0D70
      '-----------------------------------
      msgbox 0x8EB0DC0
      callstd MSG_NORMAL ' Built-in lock command
      fadescreen 0x0
      disappear 0x1
      disappear 0x2
      disappear 0x3
      disappear 0x4
      disappear 0x5
      release
      end

      #org 0x8EB0D30
      = I almost had that Nidorino!

      #org 0x8EB0EE0
      = Be quiet.\nI'm gonna catch this\lpokemon and make it my pet!\lHere goes!\l...\lWh-?\lIt bounced off again...?\lWhat?\lYou think you can do it?\lJust you try!


      #org 0x8EB0E70
      = My turn next!

      #org 0x8EB0E30
      = Dang!\nIt bounced off again!

      #org 0x8EB0EA0
      = Think you can do it?

      #org 0x8EB0DC0
      = That was cool Red!\lAwesome!

      #org 0x8EB0E00
      M onspot_left

      #org 0x8EB0FA0
      M walk_down

      #org 0x8EB0FD0
      M walk_right_fast walk_right_fast walk_right_fast


      Even now after I give them other move options they still don't do the other moves, just their first ones.
      Oh, and it's not turn left, it walk left while in place.
      __________________
      Courage is not the absence of fear. Courage is the overcoming of fear.
        #6579    
      Old March 15th, 2012 (7:52 AM).
      Rumille's Avatar
      Rumille Rumille is offline
         
        Join Date: Feb 2012
        Gender: Male
        Posts: 72
        Ok, I've got the movement script working, I get warped into the room I wanted at the position I wanted. But what I want now, is that the moment I get into that room, I continue walking to the place I have in mind, just like you do in Oak's Lab. Except, I have no idea how to do that. I think I have to use a map script, the one used in the Header, but how do I make sure it doesn't begin every time I enter that particular map? Do I have to use flags, variables or something like that?

        In short: I want a script that starts the second I enter the room, but only activates once. I'm not looking for a complete script, just a few pointers on how to start.

        Thanks in advance!
          #6580    
        Old March 15th, 2012 (8:08 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,181
        Quote:
        Originally Posted by Rumille View Post
        Ok, I've got the movement script working, I get warped into the room I wanted at the position I wanted. But what I want now, is that the moment I get into that room, I continue walking to the place I have in mind, just like you do in Oak's Lab. Except, I have no idea how to do that. I think I have to use a map script, the one used in the Header, but how do I make sure it doesn't begin every time I enter that particular map? Do I have to use flags, variables or something like that?

        In short: I want a script that starts the second I enter the room, but only activates once. I'm not looking for a complete script, just a few pointers on how to start.

        Thanks in advance!
        For a level script to only occur once, at this at the beginning of the script:

        Code:
        #org @setup
        #raw 0x2
        #raw pointer @setup1
        #raw 0x0
        
        #org @setup1
        #raw word 0x7000 //This variable can be whatever you like, but it has to be set to 0x1 sometime in the script.
        #raw word 0x0
        #raw pointer @start
        #raw word 0x0
        
        #org @start
        Then you can add the rest of the script as usual. Make sure you include the "setvar 0x7000 0x1" part in the script, though!

        Compile this script, then paste the offset in the Map Script Offset box in AdvanceMap's Header tab of the map you want the script to take place in. Remember to go into Professional View to find the box (Ctrl+H).
        __________________

        A Pokemon that is discriminated!
        Support squirtle and make it everyone's favourite.
          #6581    
        Old March 15th, 2012 (8:54 AM).
        Hacks0rus's Avatar
        Hacks0rus Hacks0rus is offline
        Monster Raving Looney
           
          Join Date: Jul 2011
          Gender: Male
          Nature: Timid
          Posts: 24
          Quickie: try this link
          http://www.pokecommunity.com/showthread.php?t=191500

          good level script tutorial with all the different types of level script available. For your script you may want to use '04 validates values' instead of the normal '02 validates values', but it will work either way.

          Of course, you'll always want to use spherical ices professional method as posted above, but here's more in depth about that:
          http://www.pokecommunity.com/showthread.php?t=275536
            #6582    
          Old March 16th, 2012 (6:05 AM).
          aljohnston112's Avatar
          aljohnston112 aljohnston112 is offline
             
            Join Date: Jul 2010
            Gender: Male
            Nature: Naughty
            Posts: 25
            I figured out the problem... finally! It turns out I just needed to add an "end" command at the end of the movements! I'm so happy!
            __________________
            Courage is not the absence of fear. Courage is the overcoming of fear.
              #6583    
            Old March 16th, 2012 (6:22 AM).
            iRyahn's Avatar
            iRyahn iRyahn is offline
               
              Join Date: Feb 2012
              Gender: Male
              Nature: Adamant
              Posts: 179
              I really don't understand how to make/fiddle with movement scripts. For example I tried editing Prof.Oak's in the beginning by writing walk_right an extra few times so that he would correctly meet my spot.. but instead he walked down all the way off the screen?
                #6584    
              Old March 16th, 2012 (7:16 AM).
              aljohnston112's Avatar
              aljohnston112 aljohnston112 is offline
                 
                Join Date: Jul 2010
                Gender: Male
                Nature: Naughty
                Posts: 25
                Quote:
                Originally Posted by iRyahn View Post
                I really don't understand how to make/fiddle with movement scripts. For example I tried editing Prof.Oak's in the beginning by writing walk_right an extra few times so that he would correctly meet my spot.. but instead he walked down all the way off the screen?
                There could be multiple problems here. Are you sure the offset pointer is equal to the offset of the script? If so then I'm guessing that you are overwriting the offset at some point. I had this problem before I learned how to read hex. Anyway, another script you wrote, it could have written over the offset you are using changing the desired results. I would suggest learning about hex if that's the case. I'll always be glad to help. To check this just decompile your script after saving it and if it changes then that's probably the problem.
                __________________
                Courage is not the absence of fear. Courage is the overcoming of fear.
                  #6585    
                Old March 16th, 2012 (9:58 AM).
                Mana's Avatar
                Mana Mana is offline
                • Platinum Tier
                 
                Join Date: Jan 2009
                Location: UK
                Gender: Female
                Posts: 10,005
                I've been trying to change the location (and which facing behaviour) of a sprite on the map by writing new bytes over the old data ala:
                ...
                writebytetooffset 0x13 0x87297B4
                writebytetooffset 0x2 0x87297B6
                writebytetooffset 0x8 0x87297B9
                ...

                However it doesn't seem to be working... The address in the compiled script is right, I've double checked everything.

                It comes at the end of a talking script, just for testing purposes, but on leaving/returning to the map the sprite is in exactly the same place.
                  #6586    
                Old March 16th, 2012 (1:34 PM).
                aljohnston112's Avatar
                aljohnston112 aljohnston112 is offline
                   
                  Join Date: Jul 2010
                  Gender: Male
                  Nature: Naughty
                  Posts: 25
                  Quote:
                  Originally Posted by SwiftSign View Post
                  I've been trying to change the location (and which facing behaviour) of a sprite on the map by writing new bytes over the old data ala:
                  ...
                  writebytetooffset 0x13 0x87297B4
                  writebytetooffset 0x2 0x87297B6
                  writebytetooffset 0x8 0x87297B9
                  ...

                  However it doesn't seem to be working... The address in the compiled script is right, I've double checked everything.

                  It comes at the end of a talking script, just for testing purposes, but on leaving/returning to the map the sprite is in exactly the same place.
                  You could go about a different approach. You could create a new sprite just like the one you have now and give it the properties you want, and in an earlier script just set his flag number and instead of doing that you'd just have to clear his flag and set the flag of the person you want to disappear.
                  __________________
                  Courage is not the absence of fear. Courage is the overcoming of fear.
                    #6587    
                  Old March 16th, 2012 (9:10 PM).
                  Rumille's Avatar
                  Rumille Rumille is offline
                     
                    Join Date: Feb 2012
                    Gender: Male
                    Posts: 72
                    Ok, so I added the part to that Spherical Ice gave me and made the following script:
                    Quote:
                    #dynamic 0x800000
                    #org @setup
                    #raw 0x2
                    #raw pointer @setup1
                    #raw 0x0

                    #org @setup1
                    #raw word 0x7005
                    #raw word 0x0
                    #raw pointer @start
                    #raw word 0x0

                    #org @start
                    lockall
                    setvar 0x7005 0x1
                    checkflag 0x1001
                    if 0x0 goto @done
                    msgbox @1 0x6
                    applymovement 0xFF @move1
                    setvar 0x7005 0x1
                    clearflag 0x1001
                    releaseall
                    end

                    #org @done
                    release
                    end

                    #org @1
                    = This way please!

                    #org @move1
                    #raw 0x10
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x10
                    #raw 0x10
                    #raw 0x10
                    #raw 0x10
                    #raw 0x10
                    #raw 0x10
                    #raw 0x10
                    #raw 0x10
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x11
                    #raw 0x11
                    #raw 0x11
                    #raw 0x11
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x13
                    #raw 0x11
                    #raw 0x11
                    #raw 0x11
                    After compiling however, I get 5 offsets, three of which seem to matter:
                    @setup 8002D5
                    @setup1 8002DC
                    @start 8002E7

                    Which one do I put where? And is this script even working? Cause it doesn't seem to respond if I put any of the three on the 'Script Offset 2' box in the Header (script type is 04 Validates Value, Flag=1001, Value:7005).

                    Oh and the Script Offset box is greyed out and has $71A276. The reason I have checkflag 0x1001, is because in the previous movement script that takes me to the map has just set the flag. So what I intended was that if the script starts it just checks to see if the flag is set. If not, just proceed with your business. If it is, the script as mentioned above is set.

                    Have no idea what more I can tell, so if you have any questions about the script, do ask.
                      #6588    
                    Old March 17th, 2012 (1:39 AM).
                    miksy91's Avatar
                    miksy91 miksy91 is offline
                    Dark Energy is back in action! ;)
                       
                      Join Date: Oct 2008
                      Location: A small country in the North
                      Gender: Male
                      Nature: Relaxed
                      Posts: 1,435
                      Quote:
                      Originally Posted by SwiftSign View Post
                      I've been trying to change the location (and which facing behaviour) of a sprite on the map by writing new bytes over the old data ala:
                      ...
                      writebytetooffset 0x13 0x87297B4
                      writebytetooffset 0x2 0x87297B6
                      writebytetooffset 0x8 0x87297B9
                      ...

                      However it doesn't seem to be working... The address in the compiled script is right, I've double checked everything.

                      It comes at the end of a talking script, just for testing purposes, but on leaving/returning to the map the sprite is in exactly the same place.
                      Have those bytes in ram turned back to normal when you re-enter the map ? If so, the game likely reads data from map header ([in ROM]) to 0x8[ROM] area of RAM memory. Basically, what I mean by this is that the map header is accessed to check what happens in the map and re-writes that data in ram memory --> ROM area section.

                      What you could do though is to set a script loaded from map's script header to change the location and facing of that person.
                      __________________
                      My Rom Hack



                      Fixing bugs in a ROM hack
                      CP of encountered pokemon in GO

                      Learn how to hack GB/C games:

                      Check my GameBoy/Color hacking videos in Youtube
                      -The video set uses Pokemon Silver (U) rom for demonstrations
                        #6589    
                      Old March 17th, 2012 (9:48 AM).
                      shadowdragon17's Avatar
                      shadowdragon17 shadowdragon17 is offline
                         
                        Join Date: Mar 2012
                        Gender: Male
                        Posts: 7
                        Hello world.

                        I really want to edit professor Birch's speech right before he gives you your first Pokemon (so not the monologue when he tells you what a Pokemon is at the beginning of the game) but I really don't know how to make him still give you the Pokemon you used before. I doubt I'm the first person to ask this, but with over 200 posts in this thread I don't have time to go through each one. If someone could show me how to write a script on PokeScript for Pokemon Ruby I would be really grateful, or if there is already an answer floating around out there, if someone could point me to it.

                        thanks
                          #6590    
                        Old March 17th, 2012 (11:07 AM).
                        Hacks0rus's Avatar
                        Hacks0rus Hacks0rus is offline
                        Monster Raving Looney
                           
                          Join Date: Jul 2011
                          Gender: Male
                          Nature: Timid
                          Posts: 24
                          Quote:
                          Originally Posted by Rumille View Post
                          Ok, so I added the part to that Spherical Ice gave me and made the following script:


                          After compiling however, I get 5 offsets, three of which seem to matter:
                          @setup 8002D5
                          @setup1 8002DC
                          @start 8002E7

                          Which one do I put where? And is this script even working? Cause it doesn't seem to respond if I put any of the three on the 'Script Offset 2' box in the Header (script type is 04 Validates Value, Flag=1001, Value:7005).

                          Oh and the Script Offset box is greyed out and has $71A276. The reason I have checkflag 0x1001, is because in the previous movement script that takes me to the map has just set the flag. So what I intended was that if the script starts it just checks to see if the flag is set. If not, just proceed with your business. If it is, the script as mentioned above is set.

                          Have no idea what more I can tell, so if you have any questions about the script, do ask.
                          I cant comment on the first part as I dont use spherical ice's method, but what I can say is that the checkflag wont work.
                          For some reason checkflag situations dont work in these scripts, but you can get around that using the setvar command.

                          var's act like the scripts flag, if it is 0x1 it wont play, if its 0x0 it will play. If you setvar 0x(7000 and up) 0x1 at the end of your script, it wont play again unless it is set back to 0x0. remember to put the var number used in the script into the var number box in A-map.

                          therefore you dont need a checkflag, just a setvar at the end.

                          Finally, I recommend re-doing the script to get rid of the wierd bug you had. try both spherical's and the traditional method and see if you get anything different.
                            #6591    
                          Old March 17th, 2012 (11:14 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,181
                          Quote:
                          Originally Posted by Rumille View Post
                          Ok, so I added the part to that Spherical Ice gave me and made the following script:


                          After compiling however, I get 5 offsets, three of which seem to matter:
                          @setup 8002D5
                          @setup1 8002DC
                          @start 8002E7

                          Which one do I put where? And is this script even working? Cause it doesn't seem to respond if I put any of the three on the 'Script Offset 2' box in the Header (script type is 04 Validates Value, Flag=1001, Value:7005).

                          Oh and the Script Offset box is greyed out and has $71A276. The reason I have checkflag 0x1001, is because in the previous movement script that takes me to the map has just set the flag. So what I intended was that if the script starts it just checks to see if the flag is set. If not, just proceed with your business. If it is, the script as mentioned above is set.

                          Have no idea what more I can tell, so if you have any questions about the script, do ask.

                          Then save Amap and test it out. Obviously your offset wouldn't be 123456.
                          __________________

                          A Pokemon that is discriminated!
                          Support squirtle and make it everyone's favourite.
                            #6592    
                          Old March 17th, 2012 (11:43 AM).
                          Rumille's Avatar
                          Rumille Rumille is offline
                             
                            Join Date: Feb 2012
                            Gender: Male
                            Posts: 72
                            Quote:
                            Originally Posted by Hacks0rus View Post
                            I cant comment on the first part as I dont use spherical ice's method, but what I can say is that the checkflag wont work.
                            For some reason checkflag situations dont work in these scripts, but you can get around that using the setvar command.

                            var's act like the scripts flag, if it is 0x1 it wont play, if its 0x0 it will play. If you setvar 0x(7000 and up) 0x1 at the end of your script, it wont play again unless it is set back to 0x0. remember to put the var number used in the script into the var number box in A-map.

                            therefore you dont need a checkflag, just a setvar at the end.

                            Finally, I recommend re-doing the script to get rid of the wierd bug you had. try both spherical's and the traditional method and see if you get anything different.

                            Well I tried, but no succes. Nothing happens. I enter the map as I should in the previous movement script. But then I enter it and nothing happens.


                            Quote:
                            Originally Posted by Spherical Ice View Post

                            Then save Amap and test it out. Obviously your offset wouldn't be 123456.
                            And apparently this does work! Only problem is that the script starts with the messagebox, I do the movement as given and then it freezes up again, as if it's waiting for the script to finish. The music does continue playing.

                            Code:
                            #org 0x80038D
                            lockall
                            msgbox 0x88003B7 '"This way please!"
                            callstd 0x4
                            closeonkeypress
                            applymovement MOVE_PLAYER 0x88003C9
                            waitmovement 0x0
                            msgbox 0x880045B '"Ah, there you are!"
                            callstd 0x4
                            closeonkeypress
                            setvar 0x7005 0x1
                            releaseall
                            end
                            I've tried fiddling with the setvar command, the message command, but no luck. It freezes up the moment before the 'Ah, there you are!' message. I think it has to do something with the waitmovement command. When I change the waitmovement 0x0 into pause 0x250, the 'Ah, there you are!' message DOES play, but it freezes up after that...
                              #6593    
                            Old March 17th, 2012 (11:55 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,181
                            Quote:
                            Originally Posted by Rumille View Post
                            Well I tried, but no succes. Nothing happens. I enter the map as I should in the previous movement script. But then I enter it and nothing happens.




                            And apparently this does work! Only problem is that the script starts with the messagebox, I do the movement as given and then it freezes up again, as if it's waiting for the script to finish. The music does continue playing.

                            Code:
                            #org 0x80038D
                            lockall
                            msgbox 0x88003B7 '"This way please!"
                            callstd 0x4
                            closeonkeypress
                            applymovement MOVE_PLAYER 0x88003C9
                            waitmovement 0x0
                            msgbox 0x880045B '"Ah, there you are!"
                            callstd 0x4
                            closeonkeypress
                            setvar 0x7005 0x1
                            releaseall
                            end
                            I've tried fiddling with the setvar command, the message command, but no luck. It freezes up the moment before the 'Ah, there you are!' message. I think it has to do something with the waitmovement command. When I change the waitmovement 0x0 into pause 0x250, the 'Ah, there you are!' message DOES play, but it freezes up after that...
                            Wow, what version of XSE are you using? It looks outdated.
                            If it's not version 1.1.1, which I', 99% sure it isn't, then download XSE 1.1.1 here:
                            http://www.4shared.com/rar/lcgKM8Q5/XSE_Upload.html?

                            You'd then need to rewrite your script to:
                            Code:
                            #org @setup
                            #raw 0x2
                            #raw pointer @setup1
                            #raw 0x0
                            
                            #org @setup1
                            #raw word 0x7000 'This is the variable you set later on in your script.
                            #raw word 0x0
                            #raw pointer @start
                            #raw word 0x0
                            
                            #org @start
                            lockall
                            msgbox @string1 0x4
                            closeonkeypress
                            applymovement MOVE_PLAYER @move1
                            waitmovement 0x0
                            msgbox @string2 0x4
                            closeonkeypress
                            setvar 0x7005 0x1
                            releaseall
                            end
                            
                            #org @string1
                            = text
                            
                            #org @string2
                            = text
                            
                            #org @move1
                            // movements
                            #raw 0xFE // you need to have #raw 0xfe at the end of movement commands.
                            Then everything should hopefully work.
                            __________________

                            A Pokemon that is discriminated!
                            Support squirtle and make it everyone's favourite.
                              #6594    
                            Old March 17th, 2012 (12:04 PM).
                            Rumille's Avatar
                            Rumille Rumille is offline
                               
                              Join Date: Feb 2012
                              Gender: Male
                              Posts: 72
                              Yeah, I got 1.0.0

                              Might need to get a new version. I apparently deleted 0xFE at the movement part, stupid me. But, this script keeps haunting me. Now it won't stop playing. It loops the script on and on. I can't stop it with a key press or anything, even though I have the setvar 0x7005 0x1 command.
                                #6595    
                              Old March 17th, 2012 (12:06 PM).
                              Spherical Ice's Avatar
                              Spherical Ice Spherical Ice is offline
                              • Moderator
                              • Silver Tier
                               
                              Join Date: Nov 2007
                              Location: Bristol, UK
                              Age: 19
                              Posts: 5,181
                              Quote:
                              Originally Posted by Rumille View Post
                              Yeah, I got 1.0.0

                              Might need to get a new version. I apparently deleted 0xFE at the movement part, stupid me. But, this script keeps haunting me. Now it won't stop playing. It loops the script on and on. I can't stop it with a key press or anything, even though I have the setvar 0x7005 0x1 command.
                              Well first upgrade to 1.1.1 using the link I provided in the post above.

                              And it's doing that because I forgot to edit my updated script to have 7005. So the script should be this:

                              Code:
                              #org @setup
                              #raw 0x2
                              #raw pointer @setup1
                              #raw 0x0
                              
                              #org @setup1
                              #raw word 0x7005
                              #raw word 0x0
                              #raw pointer @start
                              #raw word 0x0
                              
                              #org @start
                              lockall
                              msgbox @string1 0x4
                              closeonkeypress
                              applymovement MOVE_PLAYER @move1
                              waitmovement 0x0
                              msgbox @string2 0x4
                              closeonkeypress
                              setvar 0x7005 0x1
                              releaseall
                              end
                              
                              #org @string1
                              = text
                              
                              #org @string2
                              = text
                              
                              #org @move1
                              // movements
                              #raw 0xFE // you need to have #raw 0xfe at the end of movement commands.
                              Sorry for the typo!
                              __________________

                              A Pokemon that is discriminated!
                              Support squirtle and make it everyone's favourite.
                                #6596    
                              Old March 17th, 2012 (12:16 PM).
                              Rumille's Avatar
                              Rumille Rumille is offline
                                 
                                Join Date: Feb 2012
                                Gender: Male
                                Posts: 72
                                And it now works perfectly.

                                Sir, you have made my week. Thank you so much! I've been shouting and cursing at this script for days now and it finally works. You deserve a medal!
                                  #6597    
                                Old March 17th, 2012 (3:57 PM).
                                aljohnston112's Avatar
                                aljohnston112 aljohnston112 is offline
                                   
                                  Join Date: Jul 2010
                                  Gender: Male
                                  Nature: Naughty
                                  Posts: 25
                                  I'm now having trouble with a script that checks to see if you have a pokemon, but it just freezes. I've tried setting the offset as the map script offset, but it doesn't work.

                                  Spoiler:


                                  #org 0x8EB1240
                                  '-----------------------------------
                                  lock
                                  countpokemon
                                  compare LASTRESULT 0x0
                                  if == jump 0x8EB1420 ' Equal To
                                  release
                                  end

                                  #org 0x8EB1420
                                  '-----------------------------------
                                  msgbox 0x8EB1280 ' Can't forget Poliwhi...
                                  callstd MSG_LOCK ' Built-in lock command
                                  applymovement PLAYER 0x8EB12C0 ' walk_up end
                                  pause 0x10
                                  release
                                  end


                                  #org 0x8EB1280
                                  = Can't forget Poliwhirl!

                                  #org 0x8EB12C0
                                  M walk_up end
                                  __________________
                                  Courage is not the absence of fear. Courage is the overcoming of fear.
                                    #6598    
                                  Old March 17th, 2012 (4:23 PM). Edited March 17th, 2012 by Rumille.
                                  Rumille's Avatar
                                  Rumille Rumille is offline
                                     
                                    Join Date: Feb 2012
                                    Gender: Male
                                    Posts: 72
                                    I have 2 little problem with the movement script I mentioned earlier.
                                    I have made 3 different versions, because eventually you come to a place where you have to go left, up or right.

                                    These are the 3 versions:
                                    Spoiler:
                                    Code:
                                    '---------------
                                    #org 0x800697
                                    lockall
                                    setvar 0x7000 0x0
                                    msgbox 0x88006DF MSG_NORMAL '"Hold on!"
                                    applymovement 0x1 0x880072C
                                    applymovement MOVE_PLAYER 0x8800736
                                    waitmovement 0x0
                                    msgbox 0x8800739 MSG_NORMAL '"You need a Pokémon before you do\n..."
                                    applymovement 0x1 0x8800776
                                    applymovement MOVE_PLAYER 0x880077C
                                    waitmovement 0x0
                                    warp 0x4 0xF 0xFF 0x18 0x2
                                    setvar 0x7000 0x1
                                    hidesprite 0x1
                                    updatecoins 0xE3 0xE0
                                    
                                    '---------
                                    ' Strings
                                    '---------
                                    #org 0x8006DF
                                    = Hold on!
                                    
                                    #org 0x800739
                                    = You need a Pokémon before you do\nanything else. Follow me.
                                    
                                    
                                    '-----------
                                    ' Movements
                                    '-----------
                                    #org 0x80072C
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800736
                                    #raw 0x2 'Face Left
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800776
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x10 'Step Down (Normal)
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x80077C
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x10 'Step Down (Normal)
                                    #raw 0xFE 'End of Movements

                                    Spoiler:
                                    Code:
                                    '---------------
                                    #org 0x800C88
                                    lockall
                                    setvar 0x7001 0x0
                                    msgbox 0x8800CD1 MSG_NORMAL '"Hold on!"
                                    applymovement 0x1 0x8800D19
                                    applymovement MOVE_PLAYER 0x8800D25
                                    waitmovement 0x0
                                    msgbox 0x8800CDC MSG_NORMAL '"You need a Pokémon before you do\n..."
                                    applymovement 0x1 0x8800D28
                                    applymovement MOVE_PLAYER 0x8800D5D
                                    waitmovement 0x0
                                    warp 0x4 0xF 0xFF 0x18 0x2
                                    setvar 0x7001 0x1
                                    hidesprite 0x1
                                    
                                    '---------
                                    ' Strings
                                    '---------
                                    #org 0x800CD1
                                    = Hold on!
                                    
                                    #org 0x800CDC
                                    = You need a Pokémon before you do\nanything else. Follow me.
                                    
                                    
                                    '-----------
                                    ' Movements
                                    '-----------
                                    #org 0x800D19
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800D25
                                    #raw 0x2 'Face Left
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800D28
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x12 'Step Left (Normal)
                                    #raw 0x10 'Step Down (Normal)
                                    #raw 0x10 'Step Down (Normal)
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800D5D
                                    #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 0x10 'Step Down (Normal)
                                    #raw 0x10 'Step Down (Normal)
                                    #raw 0xFE 'End of Movements

                                    Spoiler:
                                    Code:
                                    '---------------
                                    #org 0x800D65
                                    lockall
                                    setvar 0x7002 0x0
                                    msgbox 0x8800DAE MSG_NORMAL '"Hold on!"
                                    applymovement 0x1 0x8800DF6
                                    applymovement MOVE_PLAYER 0x8800E03
                                    waitmovement 0x0
                                    msgbox 0x8800DB9 MSG_NORMAL '"You need a Pokémon before you do\n..."
                                    applymovement 0x1 0x8800E33
                                    applymovement MOVE_PLAYER 0x8800E3B
                                    waitmovement 0x0
                                    warp 0x4 0xF 0xFF 0x18 0x2
                                    setvar 0x7002 0x1
                                    hidesprite 0x1
                                    
                                    '---------
                                    ' Strings
                                    '---------
                                    #org 0x800DAE
                                    = Hold on!
                                    
                                    #org 0x800DB9
                                    = You need a Pokémon before you do\nanything else. Follow me.
                                    
                                    
                                    '-----------
                                    ' Movements
                                    '-----------
                                    #org 0x800DF6
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0x13 'Step Right (Normal)
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800E03
                                    #raw 0x2 'Face Left
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800E33
                                    #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 0x10 'Step Down (Normal)
                                    #raw 0xFE 'End of Movements
                                    
                                    #org 0x800E3B
                                    #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 0x10 'Step Down (Normal)
                                    #raw 0xFE 'End of Movements


                                    The first version works perfectly. However, I can't seem to get the updatecoins line OUT of the code. Deleting and compiling doesn't seem to work, strange enough. Even worse, I can't seem to change anything anymore. I can delete 5 lines out of it and compile, but the next time I open it, the lines are just the way they were before the deleting.

                                    Second of all, the second and third version work almost perfect, except that the sprite that talks to me (0x1) doesn't move. It does in the first one, but it does not in the second and third version. When I look at the place where it stands before the script is called, it's still there, so it's not invisible.

                                    Any help?
                                      #6599    
                                    Old March 17th, 2012 (4:57 PM).
                                    aljohnston112's Avatar
                                    aljohnston112 aljohnston112 is offline
                                       
                                      Join Date: Jul 2010
                                      Gender: Male
                                      Nature: Naughty
                                      Posts: 25
                                      Quote:
                                      Originally Posted by Rumille View Post
                                      I have 2 little problem with the movement script I mentioned earlier.
                                      I have made 3 different versions, because eventually you come to a place where you have to go left, up or right.

                                      These are the 3 versions:
                                      Spoiler:
                                      Code:
                                      '---------------
                                      #org 0x800697
                                      lockall
                                      setvar 0x7000 0x0
                                      msgbox 0x88006DF MSG_NORMAL '"Hold on!"
                                      applymovement 0x1 0x880072C
                                      applymovement MOVE_PLAYER 0x8800736
                                      waitmovement 0x0
                                      msgbox 0x8800739 MSG_NORMAL '"You need a Pokémon before you do\n..."
                                      applymovement 0x1 0x8800776
                                      applymovement MOVE_PLAYER 0x880077C
                                      waitmovement 0x0
                                      warp 0x4 0xF 0xFF 0x18 0x2
                                      setvar 0x7000 0x1
                                      hidesprite 0x1
                                      updatecoins 0xE3 0xE0
                                      
                                      '---------
                                      ' Strings
                                      '---------
                                      #org 0x8006DF
                                      = Hold on!
                                      
                                      #org 0x800739
                                      = You need a Pokémon before you do\nanything else. Follow me.
                                      
                                      
                                      '-----------
                                      ' Movements
                                      '-----------
                                      #org 0x80072C
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800736
                                      #raw 0x2 'Face Left
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800776
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x10 'Step Down (Normal)
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x80077C
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x10 'Step Down (Normal)
                                      #raw 0xFE 'End of Movements

                                      Spoiler:
                                      Code:
                                      '---------------
                                      #org 0x800C88
                                      lockall
                                      setvar 0x7001 0x0
                                      msgbox 0x8800CD1 MSG_NORMAL '"Hold on!"
                                      applymovement 0x1 0x8800D19
                                      applymovement MOVE_PLAYER 0x8800D25
                                      waitmovement 0x0
                                      msgbox 0x8800CDC MSG_NORMAL '"You need a Pokémon before you do\n..."
                                      applymovement 0x1 0x8800D28
                                      applymovement MOVE_PLAYER 0x8800D5D
                                      waitmovement 0x0
                                      warp 0x4 0xF 0xFF 0x18 0x2
                                      setvar 0x7001 0x1
                                      hidesprite 0x1
                                      
                                      '---------
                                      ' Strings
                                      '---------
                                      #org 0x800CD1
                                      = Hold on!
                                      
                                      #org 0x800CDC
                                      = You need a Pokémon before you do\nanything else. Follow me.
                                      
                                      
                                      '-----------
                                      ' Movements
                                      '-----------
                                      #org 0x800D19
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x11 'Step Up (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800D25
                                      #raw 0x2 'Face Left
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800D28
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x12 'Step Left (Normal)
                                      #raw 0x10 'Step Down (Normal)
                                      #raw 0x10 'Step Down (Normal)
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800D5D
                                      #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 0x10 'Step Down (Normal)
                                      #raw 0x10 'Step Down (Normal)
                                      #raw 0xFE 'End of Movements

                                      Spoiler:
                                      Code:
                                      '---------------
                                      #org 0x800D65
                                      lockall
                                      setvar 0x7002 0x0
                                      msgbox 0x8800DAE MSG_NORMAL '"Hold on!"
                                      applymovement 0x1 0x8800DF6
                                      applymovement MOVE_PLAYER 0x8800E03
                                      waitmovement 0x0
                                      msgbox 0x8800DB9 MSG_NORMAL '"You need a Pokémon before you do\n..."
                                      applymovement 0x1 0x8800E33
                                      applymovement MOVE_PLAYER 0x8800E3B
                                      waitmovement 0x0
                                      warp 0x4 0xF 0xFF 0x18 0x2
                                      setvar 0x7002 0x1
                                      hidesprite 0x1
                                      
                                      '---------
                                      ' Strings
                                      '---------
                                      #org 0x800DAE
                                      = Hold on!
                                      
                                      #org 0x800DB9
                                      = You need a Pokémon before you do\nanything else. Follow me.
                                      
                                      
                                      '-----------
                                      ' Movements
                                      '-----------
                                      #org 0x800DF6
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0x13 'Step Right (Normal)
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800E03
                                      #raw 0x2 'Face Left
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800E33
                                      #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 0x10 'Step Down (Normal)
                                      #raw 0xFE 'End of Movements
                                      
                                      #org 0x800E3B
                                      #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 0x10 'Step Down (Normal)
                                      #raw 0xFE 'End of Movements


                                      The first version works perfectly. However, I can't seem to get the updatecoins line OUT of the code. Deleting and compiling doesn't seem to work, strange enough. Even worse, I can't seem to change anything anymore. I can delete 5 lines out of it and compile, but the next time I open it, the lines are just the way they were before the deleting.

                                      Second of all, the second and third version work almost perfect, except that the sprite that talks to me (0x1) doesn't move. It does in the first one, but it does not in the second and third version. When I look at the place where it stands before the script is called, it's still there, so it's not invisible.

                                      Any help?
                                      For the first code, you probably just need an end. It continues to run when it decompiles. The end tells it to stop.
                                      __________________
                                      Courage is not the absence of fear. Courage is the overcoming of fear.
                                        #6600    
                                      Old March 17th, 2012 (5:43 PM). Edited March 17th, 2012 by Rumille.
                                      Rumille's Avatar
                                      Rumille Rumille is offline
                                         
                                        Join Date: Feb 2012
                                        Gender: Male
                                        Posts: 72
                                        Nope. I can delete the script untill I only have

                                        lockall
                                        releaseall
                                        end

                                        But after I enter the script without the other line and with releaseall and end, releaseall/end turns into the updatecoins line.

                                        Edit: Without the setvar 0x7000 0x1 line it works without adding the updatecoins line, but then I have the problem of the script repeating itself everytime I step on the scripttile.
                                        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 3:01 AM.