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
  #8051    
Old March 20th, 2013 (9:03 AM). Edited March 20th, 2013 by karatekid552.
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
     
    Join Date: Nov 2012
    Location: Do you really want to know? Really?
    Gender: Male
    Nature: Bold
    Posts: 1,766
    Quote:
    Originally Posted by TheMightyShin View Post
    Yo, I'm having trouble with some flags. The basic set-up is that there's an NPC who won't fight you. However, once talking to a signpost event, talking to this NPC will trigger a battle. I'm doing this via a setflag, which only seems to work on the same map. I'm not sure if I'm doing something wrong, or if flags only apply to the same map. I'm using pksv if that means anything

    Code:
    #org 0x87408D6
    '-----------------------------------
    lock
    faceplayer
    msgbox 0x87408EB ' Howdy, youngster!\pD...
    callstd MSG_LOCK ' Built-in lock command
    checkflag 0x911
    if true jump 0x87406E3 ' Flag is set
    release
    end
    
    #org 0x87406E3
    '-----------------------------------
    trainerbattle 0x0 0x14F 0x0 0x8740703 0x874077D
    msgbox 0x87407F6 ' FILLER FILLER FILLER...
    callstd MSG_LOCK ' Built-in lock command
    checkflag 0x912
    if false jump 0x87406C9 ' Flag is unset
    end
    
    #org 0x87406C9
    '-----------------------------------
    checkflag 0x912
    if true jump 0x87406E1 ' Flag is set
    copyvarifnotzero 0x8000 SECRETKEY
    copyvarifnotzero 0x8001 0x1
    callstd MSG_OBTAIN ' Obtained the XXXXXX!
    setflag 0x912
    end
    
    #org 0x87406E1
    '-----------------------------------
    end
    The answer to your problem is something I have said 1000 times answering questions: NO flags over 900. They overwrite the RAM used for vars 4000 and up as well as PC box space. Flags 900-90F exist in var 4000, and flags 910-91F exist within var 4001. (Flags are stored in bits, and each var is 16 bits). These vars are temporary and are reset after leaving the map. Read these two posts and learn:

    http://www.pokecommunity.com/showpost.php?p=6829256&postcount=158
    http://www.pokecommunity.com/showpost.php?p=6902344&postcount=183

    Quote:
    Originally Posted by TweenyTodd View Post
    I've done exactly that and it STILL doesn't work. I used a clean ROM and re-placed all the characters, set up their flags, and put in the script. I made sure it was script 1 not script 0, and I made sure all the offscripts match. I don't understand whats wrong...
    I am going to go test this myself right now. This should be working.

    Edit: I compiled it and it worked just fine. Here, let me post a screenshot.

    Screen:
    Spoiler:
    __________________

    Paired with Simba

    Relevant Advertising!

      #8052    
    Old March 20th, 2013 (9:22 AM).
    TheMightyShin's Avatar
    TheMightyShin TheMightyShin is offline
       
      Join Date: Mar 2013
      Gender: Female
      Posts: 6
      Thanks for the reply. Fortunately I managed to figure it out myself but thanks for the clarification. Funny, pksv said those would be safe .
        #8053    
      Old March 20th, 2013 (10:52 PM).
      ProfessorBeeching's Avatar
      ProfessorBeeching ProfessorBeeching is offline
      Professor Of Fail
         
        Join Date: Mar 2013
        Location: Sol 3, MW Galaxy, Universe-1
        Age: 21
        Gender: Male
        Nature: Quirky
        Posts: 20
        Quote:
        Originally Posted by TBar View Post
        I cannot make the most simple script work. I compiled it and inserted it to a character, but when I interatct with the sprite, it makes the clicking sound and nothing happens.
        The game does not freeze. The rom is clean.
        That's more or less the problem I've been having. Main difference being sometimes the person makes a clicking noise with nothing happening and sometimes I get a glitchy shop menu. I should probably screenshot or video it to make it clearer to understand...
          #8054    
        Old March 21st, 2013 (12:39 AM).
        Kurapika's Avatar
        Kurapika Kurapika is offline
        Grudgebearer
           
          Join Date: Feb 2013
          Location: Lavendar Town - Morocco
          Gender: Male
          Nature: Naughty
          Posts: 406
          Double-click the person you gave the script to see if it was properly compiled. Also, make you sure you made no mistake in pointers and that the script was inserted in a free space.
          Make also sure that you have XSE v1.1.1 (latest version). (You can download a French version here)
          __________________
            #8055    
          Old March 23rd, 2013 (8:15 AM).
          ProfessorBeeching's Avatar
          ProfessorBeeching ProfessorBeeching is offline
          Professor Of Fail
             
            Join Date: Mar 2013
            Location: Sol 3, MW Galaxy, Universe-1
            Age: 21
            Gender: Male
            Nature: Quirky
            Posts: 20
            Quote:
            Originally Posted by Kurapika View Post
            Double-click the person you gave the script to see if it was properly compiled. Also, make you sure you made no mistake in pointers and that the script was inserted in a free space.
            Make also sure that you have XSE v1.1.1 (latest version). (You can download a French version here)
            Double-clicking gives me a 'No Script Editor Defined" error. As for my XSE version, I believe it's the up-to-date one (just with the config file included because of the aforementioned subscript 9 error).
              #8056    
            Old March 23rd, 2013 (9:01 AM).
            TweenyTodd TweenyTodd is offline
            Quitting cuz i got a job
               
              Join Date: Feb 2013
              Location: NOYB
              Nature: Sassy
              Posts: 95
              Quote:
              Originally Posted by karatekid552 View Post
              I compiled it and it worked just fine. Here, let me post a screenshot.

              Screen:
              Spoiler:
              But, did you test it out in game? The same compile screen appeared for me, but all 4 people appeared for each gender. I want 2 to appear for either gender.
                #8057    
              Old March 23rd, 2013 (12:34 PM). Edited March 23rd, 2013 by karatekid552.
              karatekid552's Avatar
              karatekid552 karatekid552 is offline
              What happens if I push it?....
                 
                Join Date: Nov 2012
                Location: Do you really want to know? Really?
                Gender: Male
                Nature: Bold
                Posts: 1,766
                Quote:
                Originally Posted by TweenyTodd View Post
                But, did you test it out in game? The same compile screen appeared for me, but all 4 people appeared for each gender. I want 2 to appear for either gender.
                The problem you had was the script crashing. Mine didn't crash, and I know it worked because the spritefacing command worked. This means that (most likely) the flags were set too, but I didn't actually check.

                The most important part here, is not the compile log, but the offsets given. Those settings in A-map: they are settings for my Map Script. Notice, they have the same offset as the compiler log. Those are what I was trying to show you. The only reason XSE was in the picture was so you could see how things lined up.

                Quote:
                Originally Posted by ProfessorBeeching View Post
                Double-clicking gives me a 'No Script Editor Defined" error. As for my XSE version, I believe it's the up-to-date one (just with the config file included because of the aforementioned subscript 9 error).
                If XSE was on your computer, and you didn't know, and no one ever told you to use it: would you ever think to use it? No. Which is why this isn't working. You never told A-map to use XSE. Go into one of the top menus (Options, I think) and choose "Define Script Editor" or "Choose Script Editor" (can't remember which, but it is at the bottom of one of the top menus.
                __________________

                Paired with Simba
                  #8058    
                Old March 24th, 2013 (5:10 PM). Edited March 24th, 2013 by newpick.
                newpick's Avatar
                newpick newpick is offline
                   
                  Join Date: Mar 2013
                  Gender: Male
                  Posts: 2
                  First post straight to you guys! tried searching high and lo-tad for it.

                  Here it is: I want to remove HM05 "Flash" from the game in favor of an item that Oak gives you at the start.

                  I understand how to make an item given an empty space and have oak give it to you but don't know how to instigate an item into acting as a HM. Help? Thanks!

                  edit: I could just not have caves :\
                    #8059    
                  Old March 24th, 2013 (7:05 PM).
                  itman itman is offline
                  Back to ROM hacking. :D
                     
                    Join Date: May 2007
                    Age: 23
                    Nature: Adamant
                    Posts: 100
                    Quote:
                    Originally Posted by newpick View Post
                    First post straight to you guys! tried searching high and lo-tad for it.

                    Here it is: I want to remove HM05 "Flash" from the game in favor of an item that Oak gives you at the start.

                    I understand how to make an item given an empty space and have oak give it to you but don't know how to instigate an item into acting as a HM. Help? Thanks!

                    edit: I could just not have caves :\
                    I'm pretty sure if you use JPAN's hacked engine, it's a feature, and it's explained in the word document that comes with the patch.
                      #8060    
                    Old March 25th, 2013 (2:51 AM).
                    karatekid552's Avatar
                    karatekid552 karatekid552 is offline
                    What happens if I push it?....
                       
                      Join Date: Nov 2012
                      Location: Do you really want to know? Really?
                      Gender: Male
                      Nature: Bold
                      Posts: 1,766
                      Quote:
                      Originally Posted by newpick View Post
                      First post straight to you guys! tried searching high and lo-tad for it.

                      Here it is: I want to remove HM05 "Flash" from the game in favor of an item that Oak gives you at the start.

                      I understand how to make an item given an empty space and have oak give it to you but don't know how to instigate an item into acting as a HM. Help? Thanks!

                      edit: I could just not have caves :\
                      I know how to make an item that would have the same effect as flash: ie A flashlight, if that is the type of thing you are referring to.

                      As itman said, there is a way in JPAN's engine to create items that run scripts. However, this is not required to be used with JPAN's engine, as you are probably not using it already. In that case, see this thread for a routine which will run a script in an item: http://www.pokecommunity.com/showthread.php?t=281573

                      Now, if you wanted to make an HM type item which teaches a pokemon Flash, that will be much more difficult.
                      __________________

                      Paired with Simba
                        #8061    
                      Old March 25th, 2013 (4:02 AM).
                      newpick's Avatar
                      newpick newpick is offline
                         
                        Join Date: Mar 2013
                        Gender: Male
                        Posts: 2
                        Thank you both! I could see why even complex searching wouldn't have yielded that. I could really see this more generalized hack being useful for more things than i could come up with right now!
                          #8062    
                        Old March 25th, 2013 (8:33 AM).
                        TweenyTodd TweenyTodd is offline
                        Quitting cuz i got a job
                           
                          Join Date: Feb 2013
                          Location: NOYB
                          Nature: Sassy
                          Posts: 95
                          Quote:
                          Originally Posted by karatekid552 View Post
                          The problem you had was the script crashing. Mine didn't crash, and I know it worked because the spritefacing command worked. This means that (most likely) the flags were set too, but I didn't actually check.

                          The most important part here, is not the compile log, but the offsets given. Those settings in A-map: they are settings for my Map Script. Notice, they have the same offset as the compiler log. Those are what I was trying to show you. The only reason XSE was in the picture was so you could see how things lined up.
                          I think the offsets line up right, and im sure of the script. But the spriteface script doesn't work.
                          Spoiler:
                            #8063    
                          Old March 25th, 2013 (2:37 PM).
                          Bolens's Avatar
                          Bolens Bolens is offline
                          Soul Hacker
                          • Gold Tier
                           
                          Join Date: Jan 2010
                          Location: PA
                          Age: 23
                          Gender: Male
                          Nature: Mild
                          Posts: 359
                          Game: Firered Type: Level Script Editor: XSE Script:
                          Spoiler:
                          #dynamic 0x745500

                          #org @start
                          lockall
                          msgbox @1 0x6
                          special 0x113
                          applymovement 0x7F @move
                          waitmovement 0x0
                          setvar 0x7002 0x1
                          msgbox @2 0x6
                          applymovement 0x2 @3
                          applymovement 0x3 @4
                          applymovement 0x5 @5
                          applymovement 0x7 @6
                          applymovement 0x8 @7
                          applymovement 0x9 @8
                          waitmovement 0x0
                          hidesprite 0x3
                          hidesprite 0x2
                          hidesprite 0x5
                          hidesprite 0x7
                          hidesprite 0x8
                          hidesprite 0x9
                          applymovement 0x7F @9
                          waitmovement 0x0
                          special 0x114
                          setflag 0x1005
                          releaseall
                          end

                          #org @1
                          = Mom: Help!!!!

                          #org @move
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0xFE

                          #org @2
                          = Mom: Somebody please help me!\pGrunt 1: Stop screaming, we run\nthis city so no one can help\lyou.\pGrunt 2: Alright everyone,\nlet’s move out. The boss wants us\lto be in Yann Town in a couple of\lhours.\pGrunts: Yes sir!

                          #org @3
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE

                          #org @4
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE

                          #org @5
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE

                          #org @6
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE

                          #org @7
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE

                          #org @8
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE

                          #org @9
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE


                          Problem: XSE crashes whenever I try to compile this into my ROM. Hopefully someone can help, thanks guys.

                          ~Bolens
                            #8064    
                          Old March 25th, 2013 (2:45 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,179
                          Huh, I split up @2 into separate strings and now it compiles perfectly. I really dunno why, but here you go:

                          Code:
                          #dynamic 0x745500
                          
                          #org @start
                          lockall
                          msgbox @1 0x6
                          special 0x113
                          applymovement 0x7F @move
                          waitmovement 0x0
                          setvar 0x7002 0x1
                          msgbox @2 0x6
                          msgbox @string1 0x6
                          msgbox @string3 0x6
                          applymovement 0x2 @3
                          applymovement 0x3 @4
                          applymovement 0x5 @5
                          applymovement 0x7 @6
                          applymovement 0x8 @7 
                          applymovement 0x9 @8
                          waitmovement 0x0
                          hidesprite 0x3
                          hidesprite 0x2 
                          hidesprite 0x5
                          hidesprite 0x7
                          hidesprite 0x8
                          hidesprite 0x9
                          applymovement 0x7F @9
                          waitmovement 0x0
                          special 0x114
                          setflag 0x1005
                          releaseall
                          end
                          
                          #org @1
                          = Mom: Help!!!!
                          
                          #org @move
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0xFE
                          
                          #org @2
                          = Mom: Somebody please help me!
                          
                          #org @string1
                          = Grunt 1: Stop screaming, we run\nthis city so no one can help you.
                          
                          #org @string3
                          = Grunt 2: Alright everyone, let's\nmove out.\pThe boss wants us to be in Yann\nTown in a couple of hours.\pGrunts: Yes sir!
                          
                          #org @3
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @4
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @5
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @6
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @7
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @8
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @9
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          __________________

                          A Pokemon that is discriminated!
                          Support squirtle and make it everyone's favourite.
                            #8065    
                          Old March 25th, 2013 (3:03 PM).
                          Bolens's Avatar
                          Bolens Bolens is offline
                          Soul Hacker
                          • Gold Tier
                           
                          Join Date: Jan 2010
                          Location: PA
                          Age: 23
                          Gender: Male
                          Nature: Mild
                          Posts: 359
                          Quote:
                          Originally Posted by Spherical Ice View Post
                          Huh, I split up @2 into separate strings and now it compiles perfectly. I really dunno why, but here you go:

                          Code:
                          #dynamic 0x745500
                          
                          #org @start
                          lockall
                          msgbox @1 0x6
                          special 0x113
                          applymovement 0x7F @move
                          waitmovement 0x0
                          setvar 0x7002 0x1
                          msgbox @2 0x6
                          msgbox @string1 0x6
                          msgbox @string3 0x6
                          applymovement 0x2 @3
                          applymovement 0x3 @4
                          applymovement 0x5 @5
                          applymovement 0x7 @6
                          applymovement 0x8 @7 
                          applymovement 0x9 @8
                          waitmovement 0x0
                          hidesprite 0x3
                          hidesprite 0x2 
                          hidesprite 0x5
                          hidesprite 0x7
                          hidesprite 0x8
                          hidesprite 0x9
                          applymovement 0x7F @9
                          waitmovement 0x0
                          special 0x114
                          setflag 0x1005
                          releaseall
                          end
                          
                          #org @1
                          = Mom: Help!!!!
                          
                          #org @move
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0xFE
                          
                          #org @2
                          = Mom: Somebody please help me!
                          
                          #org @string1
                          = Grunt 1: Stop screaming, we run\nthis city so no one can help you.
                          
                          #org @string3
                          = Grunt 2: Alright everyone, let's\nmove out.\pThe boss wants us to be in Yann\nTown in a couple of hours.\pGrunts: Yes sir!
                          
                          #org @3
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @4
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @5
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @6
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @7
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @8
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          
                          #org @9
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0xFE
                          Thanks so much! It is weird why XSE can be stubborn sometimes, many thanks.
                            #8066    
                          Old March 25th, 2013 (4:32 PM).
                          Crocky's Avatar
                          Crocky Crocky is offline
                          SuperScarlet!
                             
                            Join Date: Feb 2009
                            Posts: 95
                            I wanted to add headbutt trees to my hack, and I found this script by google. It works until after you use headbutt, then the game just doesn't allow you to move, like it's missing somthing. How can this be fixed and actually produce a headbutt encounter?

                            Spoiler:
                            #dynamic 0x800000

                            #org @headbutt
                            checkattack 0x1D
                            compare 0x800D 0x06
                            if 0x1 jump @could
                            setanimation 0x00 0x800D
                            bufferpartypokemon 0x00 0x800D
                            bufferattack 0x01 0x1D
                            message @question MSG_YESNO
                            compare 0x800D 0x00
                            if 0x1 jump @end
                            message @used MSG_NORMAL
                            closeonkeypress
                            doanimation 0x25
                            waitstate
                            goto 0x1Be06F

                            #org @could
                            message @you MSG_NORMAL
                            release
                            end

                            #org @end
                            release
                            end

                            #org @question
                            = This tree could have a Pokemon\nin it. Use HEADBUTT?

                            #org @used
                            = [buffer1] used [buffer2]!

                            #org @you
                            = This tree could be HEADBUTTed!
                              #8067    
                            Old March 25th, 2013 (4:38 PM).
                            karatekid552's Avatar
                            karatekid552 karatekid552 is offline
                            What happens if I push it?....
                               
                              Join Date: Nov 2012
                              Location: Do you really want to know? Really?
                              Gender: Male
                              Nature: Bold
                              Posts: 1,766
                              Quote:
                              Originally Posted by TweenyTodd View Post
                              I think the offsets line up right, and im sure of the script. But the spriteface script doesn't work.
                              Spoiler:
                              It is perfect (except the image looks like it is setting flag 0x001 on the last line instead of 0x801, just an image problem I hope.) The only thing I can think of is you are not starting a new game when you test your script. This script will only run on a completely brand new game start because the variable is changed as soon as the game starts preventing the map script from running again.
                              __________________

                              Paired with Simba
                                #8068    
                              Old March 25th, 2013 (4:39 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,179
                              Quote:
                              Originally Posted by Crocky View Post
                              I wanted to add headbutt trees to my hack, and I found this script by google. It works until after you use headbutt, then the game just doesn't allow you to move, like it's missing somthing. How can this be fixed and actually produce a headbutt encounter?

                              Spoiler:
                              #dynamic 0x800000

                              #org @headbutt
                              checkattack 0x1D
                              compare 0x800D 0x06
                              if 0x1 jump @could
                              setanimation 0x00 0x800D
                              bufferpartypokemon 0x00 0x800D
                              bufferattack 0x01 0x1D
                              message @question MSG_YESNO
                              compare 0x800D 0x00
                              if 0x1 jump @end
                              message @used MSG_NORMAL
                              closeonkeypress
                              doanimation 0x25
                              waitstate
                              goto 0x1Be06F

                              #org @could
                              message @you MSG_NORMAL
                              release
                              end

                              #org @end
                              release
                              end

                              #org @question
                              = This tree could have a Pokemon\nin it. Use HEADBUTT?

                              #org @used
                              = [buffer1] used [buffer2]!

                              #org @you
                              = This tree could be HEADBUTTed!
                              It says to go to 0x1be06f, but that might be corrupt in you ROM. Here's what the script meant to say:

                              Code:
                              #dynamic 0x800000
                              
                              #org @headbutt
                              checkattack 0x1D
                              compare 0x800D 0x06
                              if 0x1 jump @could
                              setanimation 0x00 0x800D
                              bufferpartypokemon 0x00 0x800D
                              bufferattack 0x01 0x1D
                              message @question MSG_YESNO
                              compare 0x800D 0x00
                              if 0x1 jump @end
                              message @used MSG_NORMAL
                              closeonkeypress
                              doanimation 0x25
                              waitstate
                              goto @snippet2
                              
                              #org @could
                              message @you MSG_NORMAL
                              release
                              end
                              
                              #org @end
                              release
                              end
                              
                              #org @question
                              = This tree could have a Pokemon\nin it. Use HEADBUTT?
                              
                              #org @used
                              = [buffer1] used [buffer2]!
                              
                              #org @you
                              = This tree could be HEADBUTTed!
                              
                              #org @snippet2
                              applymovement LASTTALKED @move1
                              waitmovement 0x0
                              hidesprite LASTTALKED
                              special 0xAB
                              compare LASTRESULT 0x0
                              if 0x1 goto @snippet2
                              waitstate
                              releaseall
                              end
                              
                              //---------------
                              #org @snippet2
                              releaseall
                              end
                              
                              
                              //-----------
                              // Movements
                              //-----------
                              #org @move1
                              #raw 0x68 //mov68
                              #raw 0xFE //End of Movements
                              __________________

                              A Pokemon that is discriminated!
                              Support squirtle and make it everyone's favourite.
                                #8069    
                              Old March 25th, 2013 (4:43 PM).
                              karatekid552's Avatar
                              karatekid552 karatekid552 is offline
                              What happens if I push it?....
                                 
                                Join Date: Nov 2012
                                Location: Do you really want to know? Really?
                                Gender: Male
                                Nature: Bold
                                Posts: 1,766
                                Spoiler:
                                Quote:
                                Originally Posted by Crocky View Post
                                I wanted to add headbutt trees to my hack, and I found this script by google. It works until after you use headbutt, then the game just doesn't allow you to move, like it's missing somthing. How can this be fixed and actually produce a headbutt encounter?

                                Spoiler:
                                #dynamic 0x800000

                                #org @headbutt
                                checkattack 0x1D
                                compare 0x800D 0x06
                                if 0x1 jump @could
                                setanimation 0x00 0x800D
                                bufferpartypokemon 0x00 0x800D
                                bufferattack 0x01 0x1D
                                message @question MSG_YESNO
                                compare 0x800D 0x00
                                if 0x1 jump @end
                                message @used MSG_NORMAL
                                closeonkeypress
                                doanimation 0x25
                                waitstate
                                goto 0x1Be06F

                                #org @could
                                message @you MSG_NORMAL
                                release
                                end

                                #org @end
                                release
                                end

                                #org @question
                                = This tree could have a Pokemon\nin it. Use HEADBUTT?

                                #org @used
                                = [buffer1] used [buffer2]!

                                #org @you
                                = This tree could be HEADBUTTed!
                                Animation 0x25 is the rock smash animation.... Oh, that is how it calls the pokemon. Does it freeze after or before you call the pokemon?

                                Also, could you post the script that is at 0x1Be06F? I have a feeling that is where your problem lies.


                                Spherical Ice, why do you have to be so fast?:p
                                __________________

                                Paired with Simba
                                  #8070    
                                Old March 25th, 2013 (5:07 PM).
                                Crocky's Avatar
                                Crocky Crocky is offline
                                SuperScarlet!
                                   
                                  Join Date: Feb 2009
                                  Posts: 95
                                  Quote:
                                  Originally Posted by karatekid552 View Post
                                  Spoiler:


                                  Animation 0x25 is the rock smash animation.... Oh, that is how it calls the pokemon. Does it freeze after or before you call the pokemon?

                                  Also, could you post the script that is at 0x1Be06F? I have a feeling that is where your problem lies.


                                  Spherical Ice, why do you have to be so fast?:p
                                  @Spherical Ice, i',m getting a duplicate dynamic label in XSE.

                                  @karatekid552
                                  Spoiler:
                                  '---------------
                                  #org 0x1BE06F
                                  applymovement LASTTALKED 0x81BE08F
                                  waitmovement 0x0
                                  hidesprite LASTTALKED
                                  special 0xAB
                                  compare LASTRESULT 0x0
                                  if 0x1 goto 0x81BE08D
                                  waitstate
                                  releaseall
                                  end

                                  '---------------
                                  #org 0x1BE08D
                                  releaseall
                                  end


                                  '-----------
                                  ' Movements
                                  '-----------
                                  #org 0x1BE08F
                                  #raw 0x68 'mov68
                                  #raw 0xFE 'End of Movements
                                    #8071    
                                  Old March 25th, 2013 (5:12 PM).
                                  karatekid552's Avatar
                                  karatekid552 karatekid552 is offline
                                  What happens if I push it?....
                                     
                                    Join Date: Nov 2012
                                    Location: Do you really want to know? Really?
                                    Gender: Male
                                    Nature: Bold
                                    Posts: 1,766
                                    Quote:
                                    Originally Posted by Crocky View Post
                                    @Spherical Ice, i',m getting a duplicate dynamic label in XSE.

                                    @karatekid552
                                    Spoiler:
                                    '---------------
                                    #org 0x1BE06F
                                    applymovement LASTTALKED 0x81BE08F
                                    waitmovement 0x0
                                    hidesprite LASTTALKED
                                    special 0xAB
                                    compare LASTRESULT 0x0
                                    if 0x1 goto 0x81BE08D
                                    waitstate
                                    releaseall
                                    end

                                    '---------------
                                    #org 0x1BE08D
                                    releaseall
                                    end


                                    '-----------
                                    ' Movements
                                    '-----------
                                    #org 0x1BE08F
                                    #raw 0x68 'mov68
                                    #raw 0xFE 'End of Movements
                                    He used @snippit2 twice. Now, to compare his and the original scripts....

                                    They are the same, it should have worked. Can you explain where exactly it freezes and what you have attached this script to?
                                    __________________

                                    Paired with Simba
                                      #8072    
                                    Old March 25th, 2013 (5:33 PM).
                                    Crocky's Avatar
                                    Crocky Crocky is offline
                                    SuperScarlet!
                                       
                                      Join Date: Feb 2009
                                      Posts: 95
                                      Quote:
                                      Originally Posted by karatekid552 View Post
                                      He used @snippit2 twice. Now, to compare his and the original scripts....

                                      They are the same, it should have worked. Can you explain where exactly it freezes and what you have attached this script to?
                                      I found the fix haha. I had it on a sign instead of person event. I put it on a Cut Tree and now when I use the headbutt, it shows the cut animation and it looks kind of odd, but it works. Is there any way to change it/remove the cut animation altogether for headbutt trees?
                                        #8073    
                                      Old March 25th, 2013 (5:38 PM).
                                      karatekid552's Avatar
                                      karatekid552 karatekid552 is offline
                                      What happens if I push it?....
                                         
                                        Join Date: Nov 2012
                                        Location: Do you really want to know? Really?
                                        Gender: Male
                                        Nature: Bold
                                        Posts: 1,766
                                        Quote:
                                        Originally Posted by Crocky View Post
                                        I found the fix haha. I had it on a sign instead of person event. I put it on a Cut Tree and now when I use the headbutt, it shows the cut animation and it looks kind of odd, but it works. Is there any way to change it/remove the cut animation altogether for headbutt trees?
                                        Yes, you could attach it to regular trees which won't be animated because they aren't OWs, but rather tiles. The best and most efficient way would be to create a new behavior byte. I recently saw a tut in the tutorials section for it, and I know that JPAN's Hacked Engine has it. I also remember a thread somewhere in R&D or in the tutorial section specifically pertaining to headbutt trees. This should help you find your answer.
                                        __________________

                                        Paired with Simba
                                          #8074    
                                        Old March 25th, 2013 (10:04 PM).
                                        crystalmole crystalmole is offline
                                           
                                          Join Date: Nov 2012
                                          Gender: Male
                                          Posts: 8
                                          This script should be a script that allows you to buy TMs from a NPC. Instead it freezes the game. Does anyone know what i did wrong? And also is there a tool that allows me to change the price of an item's in game worth, such as an ultra ball costing 600?


                                          #dynamic 0x800000

                                          #org @start
                                          lock
                                          faceplayer
                                          msgbox @1 0x6
                                          pokemart @values
                                          release
                                          end

                                          @org @1
                                          = I sell TMs.

                                          #org @values
                                          #raw word 0x14B
                                          #raw word 0x14D
                                          #raw word 0x13C
                                          #raw word 0x13A
                                          #raw word 0x14A
                                          #raw word 0x0
                                            #8075    
                                          Old March 25th, 2013 (10:13 PM).
                                          destinedjagold's Avatar
                                          destinedjagold destinedjagold is offline
                                          Oh Hai Thar~
                                          • Silver Tier
                                           
                                          Join Date: May 2007
                                          Location: Philippines
                                          Age: 26
                                          Gender: Male
                                          Nature: Careful
                                          Posts: 8,507
                                          Quote:
                                          Originally Posted by crystalmole View Post
                                          This script should be a script that allows you to buy TMs from a NPC. Instead it freezes the game. Does anyone know what i did wrong? And also is there a tool that allows me to change the price of an item's in game worth, such as an ultra ball costing 600?


                                          #dynamic 0x800000

                                          #org @start
                                          lock
                                          faceplayer
                                          msgbox @1 0x6
                                          pokemart @values
                                          release
                                          end

                                          @org @1
                                          = I sell TMs.

                                          #org @values
                                          #raw word 0x14B
                                          #raw word 0x14D
                                          #raw word 0x13C
                                          #raw word 0x13A
                                          #raw word 0x14A
                                          #raw word 0x0

                                          Error in color red.
                                          Also, I've heard that sometimes it glitches if you'll use a number as an address, which is colored blue.
                                          Though I couldn't really be sure of that, since I've not yet encountered such problems.

                                          Anyway, for your second question, I believe thethethethe's item editing tool can do that. Not sure though.
                                          __________________


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

                                          Closed Thread
                                          Quick Reply

                                          Sponsored Links
                                          Thread Tools

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

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

                                          Forum Jump


                                          All times are GMT -8. The time now is 7:36 PM.