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
  #7176    
Old August 10th, 2012 (7:34 PM).
EHero70's Avatar
EHero70 EHero70 is offline
     
    Join Date: Jul 2012
    Location: Connecticut
    Gender: Male
    Nature: Bold
    Posts: 39
    Hey I need help with this script im working on. It seems like there shouldn't be any problems. It compiles fine but when I step on the square that has the script event nothing happens. But when I walk back onto without exciting the room my game freezes up and I can't do anything. I know my rom isn't corrupted because every othe script works fine but this one. Here is my script (I am using XSE and Pokemon Ruby)
    Spoiler:

    #dynamic 0x1C6DE5
    #org @start
    checkflag 0x201
    if 0x01 goto @done
    applymovement 0x00 @move
    waitmovement 0x0
    msgbox @1 0x6
    trainerbattle 0x0 0x2B6 0x0 @intro @defeat
    applymovement 0x0 @move2
    msgbox @3 0x6
    applymovement 0x1 @move4
    waitmovement 0x0
    msgbox @2 0x6
    applymovement 0x0 @move5
    waitmovement 0x0
    msgbox @4 0x6
    setflag 0x201
    release
    end
    #org @done
    release
    end
    #org @move
    #raw 0x02
    #raw 0x56
    #raw 0x00
    #raw 0x08
    #raw 0x02
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x01
    #raw 0xFE
    #org @move2
    #raw 0x56
    #raw 0x15
    #raw 0x15
    #raw 0x15
    #raw 0xFE
    #org @move4
    #raw 0x56
    #raw 0x01
    #raw 0x16
    #raw 0x16
    #raw 0x02
    #raw 0x17
    #raw 0x17
    #raw 0x17
    #raw 0x01
    #raw 0xFE
    #org @move5
    #raw 0x09
    #raw 0x09
    #raw 0x09
    #raw 0xFE
    #org @1
    = WHO ARE YOU AND WHAT ARE YOU DOING\nIN MY ROOM!?\pPOLYGON GO!!
    #org @2
    = FELIX: Hold on a minute there\nbuddy!\pMove one step and I will have\nmy Baltoy personaly drag you down\lto the police station!\pNow everybody just calm down!\nWho are you?\land where did you come from?\pWAIT WHAT??\pOh my goodness we are soo sorry!\pPaige!!\pThis is our new neighbor who just\nmoved here!\p
    #org @3
    = FELIX DO SOMETHING!!!
    #org @4
    = PAIGE: I am very sorry! I didn't\nmean to make a scene.\pLet me introduce myself properly.\nMy name is PAIGE and this is my\lbrother FELIX.\pWe are both Pokemon Trianers\nourselves.\pYou see we already have our\nPokemon. We got them yesterday\lfrom the Professer.\pMy is obviously a Porygon as you\nsaw.\pAnd my brother has a Baltoy.\pWe have been training hard because\nwe are going to get all 8 Gym\lBadges and take on the Pokemon\lLeague!\pBefore you came we were actually\ngetting ready to set off on our\ljourney.\pWait! I know! How about we have a\nlittle competition!\pWhoever get's the first badge\nbefore the other wins!\pSo as you see there is no time to\nloose!\pCome on FELIX let's get there\nfirst!\pBye!\nI'll see you soon!
    #org @intro
    = I DON"T KNOW WHAT YOU ARE DOING\nHERE BUT IM CALLING THE COPS\lAFTER THIS BATTLE!!
    #org @defeat
    = HOW DID I LOOSE TO A CRIMINAL LIKE\nYOU?!?!?


    Relevant Advertising!

      #7177    
    Old August 11th, 2012 (1:44 AM).
    tajaros's Avatar
    tajaros tajaros is offline
    Hi I'm dawg
       
      Join Date: Apr 2012
      Location: Philippines
      Age: 18
      Gender: Male
      Nature: Timid
      Posts: 857
      Quote:
      Originally Posted by EHero70 View Post
      Hey I need help with this script im working on. It seems like there shouldn't be any problems. It compiles fine but when I step on the square that has the script event nothing happens. But when I walk back onto without exciting the room my game freezes up and I can't do anything. I know my rom isn't corrupted because every othe script works fine but this one. Here is my script (I am using XSE and Pokemon Ruby)
      Spoiler:

      #dynamic 0x1C6DE5
      #org @start
      checkflag 0x201
      if 0x01 goto @done
      applymovement 0x00 @move
      waitmovement 0x0
      msgbox @1 0x6
      trainerbattle 0x0 0x2B6 0x0 @intro @defeat
      applymovement 0x0 @move2
      msgbox @3 0x6
      applymovement 0x1 @move4
      waitmovement 0x0
      msgbox @2 0x6
      applymovement 0x0 @move5
      waitmovement 0x0
      msgbox @4 0x6
      setflag 0x201
      release
      end
      #org @done
      release
      end
      #org @move
      #raw 0x02
      #raw 0x56
      #raw 0x00
      #raw 0x08
      #raw 0x02
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x01
      #raw 0xFE
      #org @move2
      #raw 0x56
      #raw 0x15
      #raw 0x15
      #raw 0x15
      #raw 0xFE
      #org @move4
      #raw 0x56
      #raw 0x01
      #raw 0x16
      #raw 0x16
      #raw 0x02
      #raw 0x17
      #raw 0x17
      #raw 0x17
      #raw 0x01
      #raw 0xFE
      #org @move5
      #raw 0x09
      #raw 0x09
      #raw 0x09
      #raw 0xFE
      #org @1
      = WHO ARE YOU AND WHAT ARE YOU DOING\nIN MY ROOM!?\pPOLYGON GO!!
      #org @2
      = FELIX: Hold on a minute there\nbuddy!\pMove one step and I will have\nmy Baltoy personaly drag you down\lto the police station!\pNow everybody just calm down!\nWho are you?\land where did you come from?\pWAIT WHAT??\pOh my goodness we are soo sorry!\pPaige!!\pThis is our new neighbor who just\nmoved here!\p
      #org @3
      = FELIX DO SOMETHING!!!
      #org @4
      = PAIGE: I am very sorry! I didn't\nmean to make a scene.\pLet me introduce myself properly.\nMy name is PAIGE and this is my\lbrother FELIX.\pWe are both Pokemon Trianers\nourselves.\pYou see we already have our\nPokemon. We got them yesterday\lfrom the Professer.\pMy is obviously a Porygon as you\nsaw.\pAnd my brother has a Baltoy.\pWe have been training hard because\nwe are going to get all 8 Gym\lBadges and take on the Pokemon\lLeague!\pBefore you came we were actually\ngetting ready to set off on our\ljourney.\pWait! I know! How about we have a\nlittle competition!\pWhoever get's the first badge\nbefore the other wins!\pSo as you see there is no time to\nloose!\pCome on FELIX let's get there\nfirst!\pBye!\nI'll see you soon!
      #org @intro
      = I DON"T KNOW WHAT YOU ARE DOING\nHERE BUT IM CALLING THE COPS\lAFTER THIS BATTLE!!
      #org @defeat
      = HOW DID I LOOSE TO A CRIMINAL LIKE\nYOU?!?!?

      Let me guess, you placed the script box in front of the door right after you warped right? Well everything seems fine but, did you placed a setvar in the scriptbox? If you haven't then input something, and for future scripting it will be much nicer if you input spaces in every pointer...

      Here's the much better looking script...
      Quote:
      #dynamic 0x1C6DE5
      #org @start
      checkflag 0x201
      if 0x01 goto @done
      applymovement 0x00 @move
      waitmovement 0x0
      msgbox @1 0x6
      trainerbattle 0x0 0x2B6 0x0 @intro @defeat
      applymovement 0x0 @move2
      msgbox @3 0x6
      applymovement 0x1 @move4
      waitmovement 0x0
      msgbox @2 0x6
      applymovement 0x0 @move5
      waitmovement 0x0
      msgbox @4 0x6
      setflag 0x201
      release
      end

      #org @done
      release
      end

      #org @move
      #raw 0x02
      #raw 0x56
      #raw 0x00
      #raw 0x08
      #raw 0x02
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x0A
      #raw 0x01
      #raw 0xFE

      #org @move2
      #raw 0x56
      #raw 0x15
      #raw 0x15
      #raw 0x15
      #raw 0xFE

      #org @move4
      #raw 0x56
      #raw 0x01
      #raw 0x16
      #raw 0x16
      #raw 0x02
      #raw 0x17
      #raw 0x17
      #raw 0x17
      #raw 0x01
      #raw 0xFE

      #org @move5
      #raw 0x09
      #raw 0x09
      #raw 0x09
      #raw 0xFE

      #org @1
      = WHO ARE YOU AND WHAT ARE YOU DOING\nIN MY ROOM!?\pPOLYGON GO!!

      #org @2
      = FELIX: Hold on a minute there\nbuddy!\pMove one step and I will have\nmy Baltoy personaly drag you down\lto the police station!\pNow everybody just calm down!\nWho are you?\land where did you come from?\pWAIT WHAT??\pOh my goodness we are soo sorry!\pPaige!!\pThis is our new neighbor who just\nmoved here!

      #org @3
      = FELIX DO SOMETHING!!!

      #org @4
      = PAIGE: I am very sorry! I didn't\nmean to make a scene.\pLet me introduce myself properly.\nMy name is PAIGE and this is my\lbrother FELIX.\pWe are both Pokemon Trianers\nourselves.\pYou see we already have our\nPokemon. We got them yesterday\lfrom the Professer.\pMy is obviously a Porygon as you\nsaw.\pAnd my brother has a Baltoy.\pWe have been training hard because\nwe are going to get all 8 Gym\lBadges and take on the Pokemon\lLeague!\pBefore you came we were actually\ngetting ready to set off on our\ljourney.\pWait! I know! How about we have a\nlittle competition!\pWhoever get's the first badge\nbefore the other wins!\pSo as you see there is no time to\nloose!\pCome on FELIX let's get there\nfirst!\pBye!\nI'll see you soon!

      #org @intro
      = I DON"T KNOW WHAT YOU ARE DOING\nHERE BUT IM CALLING THE COPS\lAFTER THIS BATTLE!!

      #org @defeat
      = HOW DID I LOOSE TO A CRIMINAL LIKE\nYOU?!?!?
      Also if you wan't the script to happen instantly when you warped to the place use a level script instead of a script box...
      __________________
        #7178    
      Old August 11th, 2012 (3:17 AM).
      EHero70's Avatar
      EHero70 EHero70 is offline
         
        Join Date: Jul 2012
        Location: Connecticut
        Gender: Male
        Nature: Bold
        Posts: 39
        Thanks and ya I put the script box right outside the door. Is that a bad thing? Oh and about the setvar thing i don't really get how to use them so if you can explain or put one in there for me it would be great. One more thing what is the difference between a level script and a regular script?
          #7179    
        Old August 11th, 2012 (4:14 AM). Edited August 11th, 2012 by YogiBerra.
        YogiBerra YogiBerra is offline
           
          Join Date: Oct 2010
          Gender: Male
          Posts: 48
          Hello. I'm having a problem with the below script. It is meant to stop the player, have a sprite walk over to him and tell him one message if he hasn't already stepped on the script, and another if he has stepped on it once before. Then the sprite is supposed to walk back to his original position and turn around. It works fine until the last part, where the sprite will walk back two spaces instead of the three that he needs to in order to return to his position and he won't turn around. I'm using Pokemon FireRed and XSE.

          Code:
          //---------------
          #org 0x801E24
          applymovement 0x3 0x8801F96
          applymovement MOVE_PLAYER 0x8801F9B
          waitmovement 0x0
          compare 0x4002 0x1
          if 0x1 call 0x8801E6F
          compare 0x4002 0x1
          if 0x0 call 0x8801E5F
          applymovement 0x3 0x8801F9E
          applymovement MOVE_PLAYER 0x8801FA4
          waitmovement 0x0
          release
          end
          
          //---------------
          #org 0x801E6F
          msgbox 0x8801F76 MSG_KEEPOPEN //"You heard me! Oak's Lab, now!"
          return
          
          //---------------
          #org 0x801E5F
          msgbox 0x8801E7A MSG_KEEPOPEN //"Shhhh! Don't say anything.\nPreten..."
          waitmsg
          setvar 0x4002 0x1
          return
          
          
          //---------
          // Strings
          //---------
          #org 0x801F76
          = You heard me! Oak's Lab, now!
          
          #org 0x801E7A
          = Shhhh! Don't say anything.\nPretend we're having a harmless\lconversation. I'm undercover,\lhiding from Team Rocket. You're\lprobably wondering how you know\lyou can trust me. You can't. Just\lgo to the lab before you go to\lViridian, Oak needs to see you.
          
          
          //-----------
          // Movements
          //-----------
          #org 0x801F96
          #raw 0x12 //Step Left (Normal)
          #raw 0x12 //Step Left (Normal)
          #raw 0x12 //Step Left (Normal)
          #raw 0xFE //End of Movements
          
          #org 0x801F9B
          #raw 0x3 //Face Right
          #raw 0xFE //End of Movements
          
          #org 0x801F9E
          #raw 0x13 //Step Right (Normal)
          #raw 0x13 //Step Right (Normal)
          #raw 0x13 //Step Right (Normal)
          #raw 0x2 //Face Left
          #raw 0xFE //End of Movements
          
          #org 0x801FA4
          #raw 0x10 //Step Down (Normal)
          #raw 0xFE //End of Movements
            #7180    
          Old August 11th, 2012 (4:19 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,477
          Quote:
          Originally Posted by EHero70 View Post
          Thanks and ya I put the script box right outside the door. Is that a bad thing?
          Of course. Because player would need to return to that exact spot to activate the script.

          Quote:
          Originally Posted by EHero70 View Post
          One more thing what is the difference between a level script and a regular script?
          Level script is the only possibility how to activate script right after player steps out of the door.
          I'm not using the definition with "right after player walks to another map" because in routes you can simulate level script with normal tile script.
          __________________
          ROM hacking FAQ - Read before asking how to play a hack.

          Anime List | PSN Trophy List
            #7181    
          Old August 11th, 2012 (4:44 AM).
          EHero70's Avatar
          EHero70 EHero70 is offline
             
            Join Date: Jul 2012
            Location: Connecticut
            Gender: Male
            Nature: Bold
            Posts: 39
            oh ok so if i am using a level script i wouldn't need the script event little green box right? I just set my regular script as the level script instead?
              #7182    
            Old August 11th, 2012 (6:39 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,477
            Quote:
            Originally Posted by EHero70 View Post
            oh ok so if i am using a level script i wouldn't need the script event little green box right? I just set my regular script as the level script instead?
            Yes. Level scripts are in header view of the map.
            It's best to read some tutorials first, cooley's is pretty good.
            __________________
            ROM hacking FAQ - Read before asking how to play a hack.

            Anime List | PSN Trophy List
              #7183    
            Old August 11th, 2012 (11:15 AM).
            EHero70's Avatar
            EHero70 EHero70 is offline
               
              Join Date: Jul 2012
              Location: Connecticut
              Gender: Male
              Nature: Bold
              Posts: 39
              ok I am still kind of confused. I don't really understand setvar and don't know how to use it. If I do use it to I have to take out check flag and setflag? And will this event only happen once right?
                #7184    
              Old August 11th, 2012 (2:35 PM).
              tajaros's Avatar
              tajaros tajaros is offline
              Hi I'm dawg
                 
                Join Date: Apr 2012
                Location: Philippines
                Age: 18
                Gender: Male
                Nature: Timid
                Posts: 857
                Quote:
                Originally Posted by EHero70 View Post
                ok I am still kind of confused. I don't really understand setvar and don't know how to use it. If I do use it to I have to take out check flag and setflag? And will this event only happen once right?
                Ok so you already used a checkflag in your script right?, then you don't need to input a setvar in your script unless your going to do a Level Script...

                Ok this is what you have to do...
                In A-map click on the script box where your script is there's a textbox there that says variable if you haven't put anything on it it should have $0000, then change that number to maybe 3500, (I don't know if this variable is safe but try it out! xD) After that save and test it out, if nothing happens when you walk on the script box then change the 3500, then test it out again...

                For level scripts uhhh, it's really hard to explain but now you have to include the setvar in your script, maybe read some scripting tutorials it would help you a lot...
                __________________
                  #7185    
                Old August 11th, 2012 (2:50 PM). Edited August 11th, 2012 by EHero70.
                EHero70's Avatar
                EHero70 EHero70 is offline
                   
                  Join Date: Jul 2012
                  Location: Connecticut
                  Gender: Male
                  Nature: Bold
                  Posts: 39
                  Quote:
                  Originally Posted by tajaros View Post

                  Ok so you already used a checkflag in your script right?, then you don't need to input a setvar in your script unless your going to do a Level Script...

                  Ok this is what you have to do...
                  In A-map click on the script box where your script is there's a textbox there that says variable if you haven't put anything on it it should have $0000, then change that number to maybe 3500, (I don't know if this variable is safe but try it out! xD) After that save and test it out, if nothing happens when you walk on the script box then change the 3500, then test it out again...

                  For level scripts uhhh, it's really hard to explain but now you have to include the setvar in your script, maybe read some scripting tutorials it would help you a lot...
                  But i don't understand if I have both setflag and checkflag in my script already then where do I include my setvar?

                  Quote:
                  Originally Posted by tajaros View Post

                  Ok so you already used a checkflag in your script right?, then you don't need to input a setvar in your script unless your going to do a Level Script...

                  Ok this is what you have to do...
                  In A-map click on the script box where your script is there's a textbox there that says variable if you haven't put anything on it it should have $0000, then change that number to maybe 3500, (I don't know if this variable is safe but try it out! xD) After that save and test it out, if nothing happens when you walk on the script box then change the 3500, then test it out again...

                  For level scripts uhhh, it's really hard to explain but now you have to include the setvar in your script, maybe read some scripting tutorials it would help you a lot...
                  Can you actually fix up my script with using the setvar to make it a level script? So basically what i am asking is if you can use my script and include the setvar and fix my script up or something then tell me how to put it into my game as a level script?
                  Code:
                  #dynamic 0x1C6DE5
                  #org @start
                  checkflag 0x201
                  if 0x1 goto @done
                  applymovement 0x01 @move
                  waitmovement 0x0
                  msgbox @1 0x6 
                  trainerbattle 0x0 0x2B6 0x0 @intro @defeat
                  applymovement 0x1 @move2
                  msgbox @3 0x6
                  applymovement 0x2 @move4
                  waitmovement 0x0
                  msgbox @2 0x6
                  applymovement 0x1 @move5
                  waitmovement 0x0
                  msgbox @4 0x6
                  setflag 0x201
                  release
                  end
                  #org @done
                  release
                  end
                  #org @move
                  #raw 0x02
                  #raw 0x56
                  #raw 0x00
                  #raw 0x08
                  #raw 0x02
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x01
                  #raw 0xFE
                  #org @move2
                  #raw 0x56
                  #raw 0x00
                  #raw 0x08
                  #raw 0x08
                  #raw 0x08
                  #raw 0x01
                  #raw 0xFE
                  #org @move4
                  #raw 0x56
                  #raw 0x01
                  #raw 0x16
                  #raw 0x16
                  #raw 0x02
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x01
                  #raw 0xFE
                  #org @move5
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0xFE
                  #org @1
                  = WHO ARE YOU AND WHAT ARE YOU DOING\nIN MY ROOM!?\pPORYGON GO!!
                  #org @2
                  = FELIX: Hold on a minute there\nbuddy!\pMove one step and I will have\nmy Baltoy personaly drag you down\lto the police station!\pNow everybody just calm down!\nWho are you?\land where did you come from?\pWAIT WHAT??\pOh my goodness we are soo sorry!\pPaige!!\pThis is our new neighbor who just\nmoved here!\p
                  #org @3
                  = FELIX DO SOMETHING!!!
                  #org @4
                  = PAIGE: I am very sorry! I didn't\nmean to make a scene.\pLet me introduce myself properly.\nMy name is PAIGE and this is my\lbrother FELIX.\pWe are both Pokemon Trianers\nourselves.\pYou see we already have our\nPokemon. We got them yesterday\lfrom the Professer.\pMy is obviously a Porygon as you\nsaw.\pAnd my brother has a Baltoy.\pWe have been training hard because\nwe are going to get all 8 Gym\lBadges and take on the Pokemon\lLeague!\pBefore you came we were actually\ngetting ready to set off on our\ljourney.\pWait! I know! How about we have a\nlittle competition!\pWhoever get's the first badge\nbefore the other wins!\pSo as you see there is no time to\nloose!\pCome on FELIX let's get there\nfirst!\pBye!\nI'll see you soon!
                  #org @intro
                  = I DON"T KNOW WHAT YOU ARE DOING\nHERE BUT IM CALLING THE COPS\lAFTER THIS BATTLE!!
                  #org @defeat
                  = HOW DID I LOOSE TO A CRIMINAL LIKE\nYOU?!?!?
                  Besides my other question which I still don't understand

                  I have one more small simple question. In my othe script (level script) once the script finishes and the guy disapears (like he is supposed to) when I go into a new town, route, etc. in game and come back the guy is standing back in his original spot. To make it simple. Once he disapears and I leave the town and come back he comes back into the map when he is supposed to be gone for ever. Here is my script.

                  Code:
                  #dynamic 0x800000
                  #org @start
                  setvar 0x4033 0x1
                  applymovement 0x3 @move
                  waitmovement 0x0
                  msgbox @1 0x6
                  applymovement 0x3 @move2
                  applymovement 0xFF @move2
                  waitmovement 0x0
                  msgbox @2 0x6
                  applymovement 0x3 @move3
                  applymovement 0xFF @move3
                  waitmovement 0x0
                  msgbox @3 0x6
                  applymovement 0x3 @move4
                  applymovement 0xFF @move4
                  waitmovement 0x0
                  msgbox @4 0x6
                  applymovement 0x3 @move5
                  waitmovement 0x0
                  msgbox @5 0x6
                  applymovement 0x3 @move6
                  waitmovement 0x0
                  hidesprite 0x03
                  release
                  end
                  #org @move
                  #raw 0x08
                  #raw 0x08
                  #raw 0xFE
                  #org @move2
                  #raw 0x01
                  #raw 0x03
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x01
                  #raw 0xFE
                  #org @move3
                  #raw 0x02
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x0A 
                  #raw 0x01
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0x02
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x0A
                  #raw 0x01
                  #raw 0x09
                  #raw 0x09 
                  #raw 0x09 
                  #raw 0x01
                  #raw 0xFE
                  #org @move4
                  #raw 0x03
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x01
                  #raw 0x09
                  #raw 0x09
                  #raw 0x09
                  #raw 0x09
                  #raw 0x09
                  #raw 0x09
                  #raw 0x03
                  #raw 0x0B 
                  #raw 0x0B 
                  #raw 0x0B 
                  #raw 0x00
                  #raw 0x08 
                  #raw 0x08 
                  #raw 0x08 
                  #raw 0x08 
                  #raw 0x03
                  #raw 0x0B
                  #raw 0x0B
                  #raw 0x01
                  #raw 0xFE
                  #org @move5
                  #raw 0x56
                  #raw 0x02
                  #raw 0xFE
                  #org @move6
                  #raw 0x02
                  #raw 0x17
                  #raw 0x17
                  #raw 0x17
                  #raw 0x01
                  #raw 0x16
                  #raw 0x16
                  #raw 0x02
                  #raw 0x17
                  #raw 0x17
                  #raw 0x17
                  #raw 0x00
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x15
                  #raw 0x02
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0x17 
                  #raw 0xFE
                  #org @1
                  = [PLAYER]! It's me dad!\pBefore you say anything abut my\nhair! The hair dresser screwed up\land gave me this emo cut!\pAnyway, i'm back! It is so nice to\nsee you [PLAYER]!\pI don't have much time but let me\nshow you around a little bit!\pFollow me.
                  #org @2 
                  = This in front of us is the\nPokemart.\pIn here you can buy and sell\nthings.\pThere is one of theese in almost\nevery town, city, or villige.
                  #org @3 
                  = This is the Pokemon Center.\pHere you can heal up all of your\ntired or fainted Pokemon back to\lfull health.\pIn the upstairs part of the\nPokemon center you can trade and\lconnect with people world wide!
                  #org @4 
                  = Right in front of us is a Pokemon\nGym.\pGym's consit of trainers that you\nmust battle to challenge the Gym\lLeader.\pThe Gym leader is a very powerful\ntrainer.\pEach gym usses a different type.\pFor example a ggym might only use\nFighting types.\pOr a gym might use all electric\ntypes.\pWhen you beat a gym leader they\nwill usually give you a new TM.\lAnd shall always give you a badge\lto show you beat them.\pWhen you get all 8 badges you can\nenter the Pokemon League.\pThere you can battle the Elite 4\nand the champion.\pThey are the strongest trainers in\nall of the Arorian Region.\pIf you can beat the Elite 4 and\nthe champion without losing all\lyour Pokemon then your are truely\lthe Pokemon champion.
                  #org @5
                  = Will you look at the time! I got\nto hurry. I am not going back to\lmy gym yet but I have to go visit\lsomeone.\pBye [PLAYER]!\nI'll see you later!
                  Most of the script is jus movements.
                    #7186    
                  Old August 12th, 2012 (1:35 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,477
                  Quote:
                  Originally Posted by EHero70 View Post
                  But i don't understand if I have both setflag and checkflag in my script already then where do I include my setvar?
                  Whenever you want. Because we, scripters, are lazy (every programmer is) we just put it at the beginning so we don't need to care about it anymore.


                  Quote:
                  Originally Posted by EHero70 View Post
                  I have one more small simple question. In my othe script (level script) once the script finishes and the guy disapears (like he is supposed to) when I go into a new town, route, etc. in game and come back the guy is standing back in his original spot. To make it simple. Once he disapears and I leave the town and come back he comes back into the map when he is supposed to be gone for ever. Here is my script.
                  Because you forgot to set the flag.
                  __________________
                  ROM hacking FAQ - Read before asking how to play a hack.

                  Anime List | PSN Trophy List
                    #7187    
                  Old August 12th, 2012 (2:21 AM).
                  EHero70's Avatar
                  EHero70 EHero70 is offline
                     
                    Join Date: Jul 2012
                    Location: Connecticut
                    Gender: Male
                    Nature: Bold
                    Posts: 39
                    Quote:
                    Originally Posted by Ash493 View Post
                    Whenever you want. Because we, scripters, are lazy (every programmer is) we just put it at the beginning so we don't need to care about it anymore.



                    Because you forgot to set the flag.
                    So if I set the flag I wouldn't need a checkflag because it is a level script it will only happen once right? Oh and with the other script it works but it repeats the same parts like 2 in a row sometimes.
                      #7188    
                    Old August 12th, 2012 (3:57 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,477
                    Quote:
                    Originally Posted by EHero70 View Post
                    So if I set the flag I wouldn't need a checkflag because it is a level script it will only happen once right?
                    That's precisly right.
                    Checkflag is globally pretty useless command if you ask me...
                    It's useful only if you need another event to happen only after another.
                    __________________
                    ROM hacking FAQ - Read before asking how to play a hack.

                    Anime List | PSN Trophy List
                      #7189    
                    Old August 12th, 2012 (4:10 AM). Edited August 12th, 2012 by EHero70.
                    EHero70's Avatar
                    EHero70 EHero70 is offline
                       
                      Join Date: Jul 2012
                      Location: Connecticut
                      Gender: Male
                      Nature: Bold
                      Posts: 39
                      Quote:
                      Originally Posted by Ash493 View Post
                      That's precisly right.
                      Checkflag is globally pretty useless command if you ask me...
                      It's useful only if you need another event to happen only after another.


                      Ok thanks! So if I am doing this right my script should look like this now
                      Code:
                      #dynamic 0x6D2A3C
                      #org @start
                      setvar 0x4033 0x1
                      setflag 0x201
                      applymovement 0x3 @move
                      waitmovement 0x0
                      msgbox @1 0x6
                      applymovement 0x3 @move2
                      applymovement 0xFF @move2
                      waitmovement 0x0
                      msgbox @2 0x6
                      applymovement 0x3 @move3
                      applymovement 0xFF @move3
                      waitmovement 0x0
                      msgbox @3 0x6
                      applymovement 0x3 @move4
                      applymovement 0xFF @move4
                      waitmovement 0x0
                      msgbox @4 0x6
                      applymovement 0x3 @move5
                      waitmovement 0x0
                      msgbox @5 0x6
                      applymovement 0x3 @move6
                      waitmovement 0x0
                      movesprite 0x03 0x25 0x12
                      release
                      end
                      #org @move
                      #raw 0x08
                      #raw 0x08
                      #raw 0xFE
                      #org @move2
                      #raw 0x01
                      #raw 0x03
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x01
                      #raw 0xFE
                      #org @move3
                      #raw 0x02
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x0A 
                      #raw 0x01
                      #raw 0x09 
                      #raw 0x09 
                      #raw 0x09 
                      #raw 0x09 
                      #raw 0x09 
                      #raw 0x02
                      #raw 0x0A
                      #raw 0x0A
                      #raw 0x0A
                      #raw 0x01
                      #raw 0x09
                      #raw 0x09 
                      #raw 0x09 
                      #raw 0x01
                      #raw 0xFE
                      #org @move4
                      #raw 0x03
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x01
                      #raw 0x09
                      #raw 0x09
                      #raw 0x09
                      #raw 0x09
                      #raw 0x09
                      #raw 0x09
                      #raw 0x03
                      #raw 0x0B 
                      #raw 0x0B 
                      #raw 0x0B 
                      #raw 0x00
                      #raw 0x08 
                      #raw 0x08 
                      #raw 0x08 
                      #raw 0x08 
                      #raw 0x03
                      #raw 0x0B
                      #raw 0x0B
                      #raw 0x01
                      #raw 0xFE
                      #org @move5
                      #raw 0x56
                      #raw 0x02
                      #raw 0xFE
                      #org @move6
                      #raw 0x02
                      #raw 0x17
                      #raw 0x17
                      #raw 0x17
                      #raw 0x01
                      #raw 0x16
                      #raw 0x16
                      #raw 0x02
                      #raw 0x17
                      #raw 0x17
                      #raw 0x17
                      #raw 0x00
                      #raw 0x15
                      #raw 0x15
                      #raw 0x15
                      #raw 0x15
                      #raw 0x02
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0x17 
                      #raw 0xFE
                      #org @1
                      = [PLAYER]! It's me dad!\pBefore you say anything abut my\nhair! The hair dresser screwed up\land gave me this emo cut!\pAnyway, i'm back! It is so nice to\nsee you [PLAYER]!\pI don't have much time but let me\nshow you around a little bit!\pFollow me.
                      #org @2 
                      = This in front of us is the\nPokemart.\pIn here you can buy and sell\nthings.\pThere is one of theese in almost\nevery town, city, or villige.
                      #org @3 
                      = This is the Pokemon Center.\pHere you can heal up all of your\ntired or fainted Pokemon back to\lfull health.\pIn the upstairs part of the\nPokemon center you can trade and\lconnect with people world wide!
                      #org @4 
                      = Right in front of us is a Pokemon\nGym.\pGym's consit of trainers that you\nmust battle to challenge the Gym\lLeader.\pThe Gym leader is a very powerful\ntrainer.\pEach gym usses a different type.\pFor example a ggym might only use\nFighting types.\pOr a gym might use all electric\ntypes.\pWhen you beat a gym leader they\nwill usually give you a new TM.\lAnd shall always give you a badge\lto show you beat them.\pWhen you get all 8 badges you can\nenter the Pokemon League.\pThere you can battle the Elite 4\nand the champion.\pThey are the strongest trainers in\nall of the Arorian Region.\pIf you can beat the Elite 4 and\nthe champion without losing all\lyour Pokemon then your are truely\lthe Pokemon champion.
                      #org @5
                      = Will you look at the time! I got\nto hurry. I am not going back to\lmy gym yet but I have to go visit\lsomeone.\pBye [PLAYER]!\nI'll see you later!
                      About to test now.

                      Nope tha code I just posted didn't work. I left odale town then came back he was right back into his original spot
                        #7190    
                      Old August 12th, 2012 (5:56 AM).
                      atangerine's Avatar
                      atangerine atangerine is offline
                         
                        Join Date: Aug 2011
                        Location: MI
                        Gender: Male
                        Posts: 16
                        Quote:
                        Originally Posted by Mr.KoolAid View Post
                        I was having trouble with scripting, so i got some help. This other person made a script that works perfectly for them. No problems occurred in the rom we were working on for him. But when i run the rom stuff goes wrong. The scrip that was made (which is only supposed to occur once) occurs twice for me. Multiple times I tried and I can do the script twice over, no more, no less. Also when I go to other maps (like from a town to a route) everything goes weird, it will show random sprites and building pieces that I did not put there, this has always happened, on any rom I change. I downloaded Amap 1.92 (i was having worse problems with 1.95) from this site.

                        Does anyone know how I can fix these problems? It is making it near impossible to make a rom hack.
                        For the first part, I think that you didn't set a var value. If you do, then your event will only happen once.

                        For the second part, I believe you have a map connections problem. In that case, I have no idea how do help you. Go look at the Advance Map Tutorial at this site.
                          #7191    
                        Old August 12th, 2012 (10:41 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,477
                        Quote:
                        Originally Posted by EHero70 View Post
                        Nope tha code I just posted didn't work. I left odale town then came back he was right back into his original spot
                        And does the OW have 201 as ID?
                        __________________
                        ROM hacking FAQ - Read before asking how to play a hack.

                        Anime List | PSN Trophy List
                          #7192    
                        Old August 12th, 2012 (11:07 PM). Edited August 12th, 2012 by EHero70.
                        EHero70's Avatar
                        EHero70 EHero70 is offline
                           
                          Join Date: Jul 2012
                          Location: Connecticut
                          Gender: Male
                          Nature: Bold
                          Posts: 39
                          Quote:
                          Originally Posted by Ash493 View Post
                          And does the OW have 201 as ID?
                          Haha i can't belive I forgot that! Thank you sooo much. Now if only I can figure out why that other script is repeating some parts in the middle of the script.

                          Also does anyone know why I get this message while trying to compile my script?

                          Message I get:
                          No #org/#seek directives were found. Can't compile script.
                            #7193    
                          Old August 13th, 2012 (10:33 AM).
                          destinydownloads's Avatar
                          destinydownloads destinydownloads is offline
                             
                            Join Date: Jan 2012
                            Location: London
                            Gender: Male
                            Posts: 37
                            Quote:
                            Originally Posted by EHero70 View Post
                            Haha i can't belive I forgot that! Thank you sooo much. Now if only I can figure out why that other script is repeating some parts in the middle of the script.

                            Also does anyone know why I get this message while trying to compile my script?

                            Message I get:
                            No #org/#seek directives were found. Can't compile script.
                            You might want to show us the script so we can take a look
                              #7194    
                            Old August 13th, 2012 (2:59 PM).
                            Spacewarrior Spacewarrior is offline
                               
                              Join Date: Aug 2012
                              Gender: Male
                              Posts: 2
                              Hello all, I have a problem about Pokemon Emerald Hacking. I want to make a new person and make him talk. I made a person but I can't make him talk because I don't know which offset use(empty offset). How to find an empty offset for this? Can someone tell me or show me how?
                                #7195    
                              Old August 13th, 2012 (9:44 PM).
                              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 Spacewarrior View Post
                                Hello all, I have a problem about Pokemon Emerald Hacking. I want to make a new person and make him talk. I made a person but I can't make him talk because I don't know which offset use(empty offset). How to find an empty offset for this? Can someone tell me or show me how?
                                Download a hex editor (any will do) and open the rom with it. Look for area where there is free space (marked as FF FF FF FF...) and use that as the offset of your script.
                                __________________
                                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
                                  #7196    
                                Old August 14th, 2012 (2:09 PM).
                                thanethane98's Avatar
                                thanethane98 thanethane98 is offline
                                Self Proclaimed Expert
                                   
                                  Join Date: Jun 2012
                                  Nature: Relaxed
                                  Posts: 83
                                  Quote:
                                  Originally Posted by Spacewarrior View Post
                                  Hello all, I have a problem about Pokemon Emerald Hacking. I want to make a new person and make him talk. I made a person but I can't make him talk because I don't know which offset use(empty offset). How to find an empty offset for this? Can someone tell me or show me how?
                                  An alternative to the hex editor would be using HackMew's Free Space Finder tool, which can find an empty offset for you. Either way will work though.
                                  __________________
                                  Back and ROM hacking again!
                                    #7197    
                                  Old August 14th, 2012 (3:35 PM).
                                  RedDog RedDog is offline
                                     
                                    Join Date: Jun 2012
                                    Gender: Male
                                    Posts: 6
                                    Game: Pokémon Ruby
                                    Type: Person Movement
                                    Editor: Pokéscript
                                    Spoiler:
                                    #org $script
                                    lock
                                    faceplayer
                                    applymovement 1 $move
                                    $move 1 ; #binary 0x05 0x17 0x04 0x2F 0x06 0x09 0x07 0xFE
                                    pausemove 0x0000
                                    release
                                    end

                                    I am having a problem where whenever i talk to the person, they move the direction they're supposed to, but only one space per 0x00, and when they walk left or right, the movement is very sped up and glitchy. I am rather new to scripting, but i cant tell what ive done wrong at all. I've shortened the script to this, but the result is the same.
                                      #7198    
                                    Old August 14th, 2012 (8:22 PM).
                                    EHero70's Avatar
                                    EHero70 EHero70 is offline
                                       
                                      Join Date: Jul 2012
                                      Location: Connecticut
                                      Gender: Male
                                      Nature: Bold
                                      Posts: 39
                                      Ok I have yet another problem. In my givepokemon script when he gives me the Pokemon and I say yes to give him a nickname the nickname screen wont show up and the box stays there till i continue and then since I still recieve the squirtle even if I dont give it a nickname it has absoulutely no name at all. also I put it to be level 15 but its level 21 instead. Here is my script:
                                      Code:
                                      #dynamic 0x39D4EE
                                      #org @start
                                      checkflag 0x202
                                      if 0x1 goto @done
                                      msgbox @1 0x5
                                      compare LASTRESULT 0x1
                                      if 0x1 goto @take
                                      msgbox @2 0x6
                                      release
                                      end
                                      #org @take
                                      givepokemon 0x7 0x15 0x0 0x0 0x0 0x0
                                      fanfare 0x13E
                                      msgbox @3 0x4
                                      waitfanfare
                                      closeonkeypress
                                      setflag 0x828
                                      msgbox @4 0x5
                                      compare LASTRESULT 0x1
                                      if 0x1 gosub @name
                                      msgbox @5 0x6
                                      setflag 0x202
                                      release
                                      end
                                      #org @name
                                      call 0x1A74EB
                                      return
                                      #org @done
                                      msgbox @6 0x6
                                      release
                                      end
                                      
                                      #org @1
                                      = Hello there youngling. Would you\ndo me a kind favor?\pMy Squirtle hasn't been listening\nto me anymore.\pWill you be kind enough to take it\nfor me?
                                      #org @2
                                      = Oh, I see you can't take my\nSquirtle for me.
                                      #org @3
                                      = [black_fr]You received a Squirtle!
                                      #org @4
                                      = [black_fr]Would you like to give a\nnickname to Squirtle?
                                      #org @5
                                      = I trust in you that you will take\ncare of my Squirtle.
                                      #org @6
                                      = You are taking good care of\nSquirtle right?
                                        #7199    
                                      Old August 14th, 2012 (10:20 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,477
                                      Quote:
                                      Originally Posted by RedDog View Post
                                      Game: Pokémon Ruby
                                      Type: Person Movement
                                      Editor: Pokéscript
                                      Spoiler:
                                      #org $script
                                      lock
                                      faceplayer
                                      applymovement 1 $move
                                      $move 1 ; #binary 0x05 0x17 0x04 0x2F 0x06 0x09 0x07 0xFE
                                      pausemove 0x0000
                                      release
                                      end

                                      I am having a problem where whenever i talk to the person, they move the direction they're supposed to, but only one space per 0x00, and when they walk left or right, the movement is very sped up and glitchy. I am rather new to scripting, but i cant tell what ive done wrong at all. I've shortened the script to this, but the result is the same.
                                      Because you are using Pokescript.
                                      It's outdated, buggy etc... use XSE

                                      @EHero: Because 15 is 21 in hex.
                                      To get the result you want you need to convert number of level to hex.
                                      15 to hex is F. So instead of 0x15 you need to input 0xF.
                                      __________________
                                      ROM hacking FAQ - Read before asking how to play a hack.

                                      Anime List | PSN Trophy List
                                        #7200    
                                      Old August 14th, 2012 (10:44 PM).
                                      EHero70's Avatar
                                      EHero70 EHero70 is offline
                                         
                                        Join Date: Jul 2012
                                        Location: Connecticut
                                        Gender: Male
                                        Nature: Bold
                                        Posts: 39
                                        Quote:
                                        Originally Posted by Ash493 View Post
                                        Because you are using Pokescript.
                                        It's outdated, buggy etc... use XSE

                                        @EHero: Because 15 is 21 in hex.
                                        To get the result you want you need to convert number of level to hex.
                                        15 to hex is F. So instead of 0x15 you need to input 0xF.
                                        Thanks but when he asks to give it a nickname and I hit yes nothing happensI just have to continue the talking like usualy and then he gives me the pokemon but it has no name. Even when I don't give it a a nickname it has no name!
                                        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 12:56 AM.