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
  #8326    
Old May 31st, 2013 (6:13 AM).
LusoTrainer's Avatar
LusoTrainer LusoTrainer is offline
     
    Join Date: Mar 2013
    Gender: Male
    Posts: 322
    Quote:
    Originally Posted by karatekid552 View Post
    Setting the flag will not give the bugged message. Here:
    It does to me, when I catch it:



    Also, it seems that after I set the flag, compile and run the game, this part of the code:

    Code:
    #org 0x1A922D
    fadescreen 0x1
    setflag 0x2FF
    hidesprite LASTTALKED
    fadescreen 0x0
    release
    end
    changes to this:

    Code:
    #org 0x1A922D
    fadescreen 0x1
    setflag 0x2FF
    hidesprite LASTTALKED
    fadescreen 0x97
    nop1
    setflag 0x2FF
    hidesprite LASTTALKED
    fadescreen 0x0
    bufferpokemon 0x0 0x8004
    msgbox 0x81A63C4 '"The [buffer1] flew away!"
    callstd 0x4
    release
    end
    And Mew still doesn't disappear when I lose.

    Relevant Advertising!

      #8327    
    Old May 31st, 2013 (6:19 AM).
    karatekid552's Avatar
    karatekid552 karatekid552 is offline
    What happens if I push it?....
       
      Join Date: Nov 2012
      Location: Do you really want to know? Really?
      Gender: Male
      Nature: Bold
      Posts: 1,766
      Quote:
      Originally Posted by LusoTrainer View Post
      It does to me, when I catch it:



      Also, it seems that after I set the flag, compile and run the game, this part of the code:

      Code:
      #org 0x1A922D
      fadescreen 0x1
      setflag 0x2FF
      hidesprite LASTTALKED
      fadescreen 0x0
      release
      end
      changes to this:

      Code:
      #org 0x1A922D
      fadescreen 0x1
      setflag 0x2FF
      hidesprite LASTTALKED
      fadescreen 0x97
      nop1
      setflag 0x2FF
      hidesprite LASTTALKED
      fadescreen 0x0
      bufferpokemon 0x0 0x8004
      msgbox 0x81A63C4 '"The [buffer1] flew away!"
      callstd 0x4
      release
      end
      And Mew still doesn't disappear when I lose.
      I just realized your problem: you are editing scripts that are used for all legendary battles. So, by adding to these scripts, it is affecting others. I would take my script that I posted and change it all to dynamic offsets in the 74000s.
      __________________

      Paired with Simba
        #8328    
      Old May 31st, 2013 (11:34 AM).
      ExitWound's Avatar
      ExitWound ExitWound is offline
      Boggle
         
        Join Date: Aug 2007
        Age: 25
        Posts: 79
        I guess I'll try asking this again because I honestly don't know why this isn't working...
        Game: Emerald

        I need some help. I'm utterly confused at the moment... I have a script where you can battle somebody 3 different times, each time having stronger Pokémon. He should give you 3 different items each time you beat him, until he is rebattle-able. He's suppose to give you Leftovers the first time you beat him, PP Max the second, and a Master ball the third. When rebattle-able, he should give a PP Up each time you beat him. As of right now, he only gives the Leftovers and Master ball. No PP Max and no PP Up. What is going on with this script?

        Code:
        #dynamic 0x6C4340
        
        #org @start
        checkflag 0x850
        if 0x1 goto @start1
        trainerbattle 0x1 0xa1 0x0 @before @after @later
        end
        
        #org @start1
        checkflag 0x851
        if 0x1 goto @start2
        trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
        end
        
        #org @start2
        settrainerflag 0x29d
        trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
        end
        
        #org @later
        setflag 0x850
        msgbox @msg1 0x2
        giveitem 0xc8 0x1 0x0
        release
        end
        
        #org @later1
        setflag 0x851
        msgbox @msg2 0x2
        giveitem 0x47 0x1 0x0
        release
        end
        
        #org @later2
        checkflag 0x852
        if 0x1 goto @beaten
        setflag 0x852
        msgbox @msg3 0x2
        giveitem 0x1 0x1 0x0
        release
        end
        
        #org @beaten
        msgbox @msg4 0x2
        giveitem 0x45 0x1 0x0
        release
        end
        
        #org @before
        = I am legend.
        
        #org @after
        = I... am...\pI'm speechless...
        
        #org @msg1
        = You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.
        
        #org @before1
        = This time, you will not be so\nlucky.
        
        #org @after1
        = How is this possible!?
        
        #org @msg2
        = I promise...\nI will defeat you.
        
        #org @before2
        = This time, you will lose.
        
        #org @after2
        = Again, I am beaten...
        
        #org @msg3
        = You are a King among peasants.
        
        #org @msg4
        = For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
        __________________

        +====================Supports====================+


        +====================Supports====================+
          #8329    
        Old May 31st, 2013 (12:00 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 ExitWound View Post
          I guess I'll try asking this again because I honestly don't know why this isn't working...
          Game: Emerald

          I need some help. I'm utterly confused at the moment... I have a script where you can battle somebody 3 different times, each time having stronger Pokémon. He should give you 3 different items each time you beat him, until he is rebattle-able. He's suppose to give you Leftovers the first time you beat him, PP Max the second, and a Master ball the third. When rebattle-able, he should give a PP Up each time you beat him. As of right now, he only gives the Leftovers and Master ball. No PP Max and no PP Up. What is going on with this script?

          Code:
          #dynamic 0x6C4340
          
          #org @start
          checkflag 0x850
          if 0x1 goto @start1
          trainerbattle 0x1 0xa1 0x0 @before @after @later
          end
          
          #org @start1
          checkflag 0x851
          if 0x1 goto @start2
          trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
          end
          
          #org @start2
          settrainerflag 0x29d
          trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
          end
          
          #org @later
          setflag 0x850
          msgbox @msg1 0x2
          giveitem 0xc8 0x1 0x0
          release
          end
          
          #org @later1
          setflag 0x851
          msgbox @msg2 0x2
          giveitem 0x47 0x1 0x0
          release
          end
          
          #org @later2
          checkflag 0x852
          if 0x1 goto @beaten
          setflag 0x852
          msgbox @msg3 0x2
          giveitem 0x1 0x1 0x0
          release
          end
          
          #org @beaten
          msgbox @msg4 0x2
          giveitem 0x45 0x1 0x0
          release
          end
          
          #org @before
          = I am legend.
          
          #org @after
          = I... am...\pI'm speechless...
          
          #org @msg1
          = You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.
          
          #org @before1
          = This time, you will not be so\nlucky.
          
          #org @after1
          = How is this possible!?
          
          #org @msg2
          = I promise...\nI will defeat you.
          
          #org @before2
          = This time, you will lose.
          
          #org @after2
          = Again, I am beaten...
          
          #org @msg3
          = You are a King among peasants.
          
          #org @msg4
          = For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
          It took me a bit to figure out. You have it in the wrong oder. The "checkflag 0x852" and "if 0x1 goto @beaten" need to be the first lines of your script. @Later2 will only run directly after the trainerbattle, not the next time you talk to him.
          __________________

          Paired with Simba
            #8330    
          Old May 31st, 2013 (12:40 PM). Edited May 31st, 2013 by ExitWound.
          ExitWound's Avatar
          ExitWound ExitWound is offline
          Boggle
             
            Join Date: Aug 2007
            Age: 25
            Posts: 79
            Quote:
            Originally Posted by karatekid552 View Post
            It took me a bit to figure out. You have it in the wrong oder. The "checkflag 0x852" and "if 0x1 goto @beaten" need to be the first lines of your script. @Later2 will only run directly after the trainerbattle, not the next time you talk to him.
            Actually it all runs in the right order. The messages all appear correctly, when I want them to, and the right battles are executed at the right times. The only thing that is wrong is that he wont give the PP Max or the PP Ups and I am unsure why. I understand what you mean, though. But I made it so you can rebattle the trainer the last time and by beating him, you get PP Ups.
            __________________

            +====================Supports====================+


            +====================Supports====================+
              #8331    
            Old May 31st, 2013 (1:04 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 ExitWound View Post
              Actually it all runs in the right order. The messages all appear correctly, when I want them to, and the right battles are executed at the right times. The only thing that is wrong is that he wont give the PP Max or the PP Ups and I am unsure why. I understand what you mean, though. But I made it so you can rebattle the trainer the last time and by beating him, you get PP Ups.
              You don't understand. It wasn't in the right order. Everything up to the last battle was, but your placement of checkflag 0x852 was off.

              Here is the correct script:

              Code:
              #dynamic 0x6C4340
              
              #org @start
              checkflag 0x852
              if 0x1 goto @beaten
              checkflag 0x850
              if 0x1 goto @start1
              trainerbattle 0x1 0xa1 0x0 @before @after @later
              end
              
              #org @start1
              checkflag 0x851
              if 0x1 goto @start2
              trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
              end
              
              #org @start2
              settrainerflag 0x29d
              trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
              end
              
              #org @later
              setflag 0x850
              msgbox @msg1 0x2
              giveitem 0xc8 0x1 0x0
              release
              end
              
              #org @later1
              setflag 0x851
              msgbox @msg2 0x2
              giveitem 0x47 0x1 0x0
              release
              end
              
              #org @later2
              setflag 0x852
              msgbox @msg3 0x2
              giveitem 0x1 0x1 0x0
              release
              end
              
              #org @beaten
              msgbox @msg4 0x2
              giveitem 0x45 0x1 0x0
              release
              end
              
              #org @before
              = I am legend.
              
              #org @after
              = I... am...\pI'm speechless...
              
              #org @msg1
              = You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.
              
              #org @before1
              = This time, you will not be so\nlucky.
              
              #org @after1
              = How is this possible!?
              
              #org @msg2
              = I promise...\nI will defeat you.
              
              #org @before2
              = This time, you will lose.
              
              #org @after2
              = Again, I am beaten...
              
              #org @msg3
              = You are a King among peasants.
              
              #org @msg4
              = For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
              After you battle him the third time, it goes to @later2. However, the next time you talk to him, it it will not. So, you put that check right at the begining and it will work. Give it a try.
              __________________

              Paired with Simba
                #8332    
              Old May 31st, 2013 (1:31 PM).
              ExitWound's Avatar
              ExitWound ExitWound is offline
              Boggle
                 
                Join Date: Aug 2007
                Age: 25
                Posts: 79
                Quote:
                Originally Posted by karatekid552 View Post
                You don't understand. It wasn't in the right order. Everything up to the last battle was, but your placement of checkflag 0x852 was off.

                Here is the correct script:

                Spoiler:
                Code:
                #dynamic 0x6C4340
                
                #org @start
                checkflag 0x852
                if 0x1 goto @beaten
                checkflag 0x850
                if 0x1 goto @start1
                trainerbattle 0x1 0xa1 0x0 @before @after @later
                end
                
                #org @start1
                checkflag 0x851
                if 0x1 goto @start2
                trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
                end
                
                #org @start2
                settrainerflag 0x29d
                trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
                end
                
                #org @later
                setflag 0x850
                msgbox @msg1 0x2
                giveitem 0xc8 0x1 0x0
                release
                end
                
                #org @later1
                setflag 0x851
                msgbox @msg2 0x2
                giveitem 0x47 0x1 0x0
                release
                end
                
                #org @later2
                setflag 0x852
                msgbox @msg3 0x2
                giveitem 0x1 0x1 0x0
                release
                end
                
                #org @beaten
                msgbox @msg4 0x2
                giveitem 0x45 0x1 0x0
                release
                end
                
                #org @before
                = I am legend.
                
                #org @after
                = I... am...\pI'm speechless...
                
                #org @msg1
                = You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.
                
                #org @before1
                = This time, you will not be so\nlucky.
                
                #org @after1
                = How is this possible!?
                
                #org @msg2
                = I promise...\nI will defeat you.
                
                #org @before2
                = This time, you will lose.
                
                #org @after2
                = Again, I am beaten...
                
                #org @msg3
                = You are a King among peasants.
                
                #org @msg4
                = For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.


                After you battle him the third time, it goes to @later2. However, the next time you talk to him, it it will not. So, you put that check right at the begining and it will work. Give it a try.
                That would just make it so if you beat him the 3rd time, you could keep talking to him and get unlimited PP Ups. I didn't want it like that, I wanted to make it so you had to rebattle him for each PP Up that you wanted. But that' doesn't even matter because he doesn't give the PP Up anyway. For some reason, giveitem 0x47 0x1 0x0 and giveitem 0x45 0x1 0x0 do not work. And that is what I'm trying to figure out.
                __________________

                +====================Supports====================+


                +====================Supports====================+
                  #8333    
                Old May 31st, 2013 (11:24 PM).
                Zemekis's Avatar
                Zemekis Zemekis is offline
                The Booze Cruise
                   
                  Join Date: Feb 2013
                  Location: 'Murica
                  Gender: Male
                  Posts: 22
                  Hi, I have applied the following to a script event in Advance Map but when I walk over it NOTHING HAPPENS, but sometimes if I change this or that, my character just gets stuck in place and freezes there. I read in diegoisawesome's Script Tutorial that I need to change the Unknown to 0300 and the Var Number to 4050...but it still lets me walk right over the event.

                  #dynamic 0x71AF2D
                  #org @start
                  checkflag 0xCB
                  if 0x0 goto @playsweettunes
                  checkflag 0xCA
                  if 0x0 goto @getstuff
                  checkflag 0x828
                  if 0x1 goto @done
                  goto @getstuff
                  end

                  #org @playsweettunes
                  playsong 0x7 0x0
                  fadesong 0x7
                  fadesong 0xC
                  fadesong 0x47
                  setflag 0xCB
                  msgbox @wtfwasthat 0x6

                  #org @wtfwasthat
                  = [grey_fr]What was that sound? You should\ninvestigate!

                  #org @done
                  checkflag 0xC9
                  if 0x1 goto @superend
                  lock
                  msgbox @999 0x6
                  setflag 0xC9
                  release
                  end

                  #org @999
                  = [grey_fr]Looks like you have your wallet\nand Pokedex, it's time to get\lgoing!

                  #org @superend
                  end

                  #org @getstuff
                  msgbox @hue 0x6

                  #org @hue
                  = [grey_fr]You should get your wallet and\nPokedex you left on the table\lbefore you leave!
                  applymovement 0xFF @move

                  #org @move
                  #raw 0x1
                  #raw 0x11
                  #raw 0xFE
                    #8334    
                  Old June 1st, 2013 (6:25 AM). Edited June 1st, 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 Zemekis View Post
                    Hi, I have applied the following to a script event in Advance Map but when I walk over it NOTHING HAPPENS, but sometimes if I change this or that, my character just gets stuck in place and freezes there. I read in diegoisawesome's Script Tutorial that I need to change the Unknown to 0300 and the Var Number to 4050...but it still lets me walk right over the event.

                    #dynamic 0x71AF2D
                    #org @start
                    checkflag 0xCB
                    if 0x0 goto @playsweettunes
                    checkflag 0xCA
                    if 0x0 goto @getstuff
                    checkflag 0x828
                    if 0x1 goto @done
                    goto @getstuff
                    end

                    #org @playsweettunes
                    playsong 0x7 0x0
                    fadesong 0x7
                    fadesong 0xC
                    fadesong 0x47
                    setflag 0xCB
                    msgbox @wtfwasthat 0x6

                    #org @wtfwasthat
                    = [grey_fr]What was that sound? You should\ninvestigate!

                    #org @done
                    checkflag 0xC9
                    if 0x1 goto @superend
                    lock
                    msgbox @999 0x6
                    setflag 0xC9
                    release
                    end

                    #org @999
                    = [grey_fr]Looks like you have your wallet\nand Pokedex, it's time to get\lgoing!

                    #org @superend
                    end

                    #org @getstuff
                    msgbox @hue 0x6

                    #org @hue
                    = [grey_fr]You should get your wallet and\nPokedex you left on the table\lbefore you leave!
                    applymovement 0xFF @move

                    #org @move
                    #raw 0x1
                    #raw 0x11
                    #raw 0xFE
                    The fact that nothing happenes at all is usually a flag/var problem. Check this out: http://www.pokecommunity.com/showthread.php?t=302347

                    Quote:
                    Originally Posted by ExitWound View Post
                    That would just make it so if you beat him the 3rd time, you could keep talking to him and get unlimited PP Ups. I didn't want it like that, I wanted to make it so you had to rebattle him for each PP Up that you wanted. But that' doesn't even matter because he doesn't give the PP Up anyway. For some reason, giveitem 0x47 0x1 0x0 and giveitem 0x45 0x1 0x0 do not work. And that is what I'm trying to figure out.
                    Dude, your bag is full. If you look at any script that gives items during it (not just a giveitem like one you find on the ground, but a regular talking script) you will see that it checks how many items you have in your bag and then gives you the item if you have room. Without that check, if the bag is full, nothing happens.
                    __________________

                    Paired with Simba
                      #8335    
                    Old June 1st, 2013 (7:54 AM).
                    Varion Bluefire's Avatar
                    Varion Bluefire Varion Bluefire is offline
                    A.K.A The Glitch
                       
                      Join Date: Apr 2013
                      Age: 22
                      Gender: Male
                      Nature: Naughty
                      Posts: 662
                      So I'm making a multichoice script, just a simple yes/no kind of thing.

                      This is the script; (FR BTW)
                      #dynamic 0x800723
                      #org @start
                      faceplayer
                      msgbox @1 0x6
                      preparemsg @2
                      waitmsg
                      multichoice 0xE 0x0 0x0 0x0
                      copyvar 0x8003 0x8004
                      compare 0x8003 0x0
                      if 0x1 goto @yes
                      compare 0x8003 0x7F
                      if 0x2 goto @no
                      release
                      end

                      #org @yes
                      msgbox @3 0x6
                      fadescreen 0x1
                      fanfare 0x100
                      special 0x0
                      fadescreen 0x0
                      msgbox @4 0x6
                      release
                      end

                      #org @no
                      msgbox @5 0x6
                      release
                      end

                      #org @1
                      = Morning, \v\h01!\nHow are you today?

                      #org @2
                      = Would you like to rest for a bit?

                      #org @3
                      = Oh goodie, here's your room key.

                      #org @4
                      = Have a nice sleep?

                      #org @5
                      = Well, come back anytime.

                      But, Whenever I press no, or cancel it still does option 1 (yes)
                      __________________

                      Just strollin' to my next destination...
                        #8336    
                      Old June 1st, 2013 (11:18 AM).
                      ExitWound's Avatar
                      ExitWound ExitWound is offline
                      Boggle
                         
                        Join Date: Aug 2007
                        Age: 25
                        Posts: 79
                        Quote:
                        Originally Posted by karatekid552 View Post
                        Dude, your bag is full. If you look at any script that gives items during it (not just a giveitem like one you find on the ground, but a regular talking script) you will see that it checks how many items you have in your bag and then gives you the item if you have room. Without that check, if the bag is full, nothing happens.
                        Bahahaha!! Should I shoot myself now or later? I guess I was just confused because he was giving me the Leftovers... I must have only had 1 item slot left until my bag was full. So yeah, I feel like a dumbass now. Thanks anyways, friend.
                        __________________

                        +====================Supports====================+


                        +====================Supports====================+
                          #8337    
                        Old June 1st, 2013 (3:56 PM).
                        DrFuji's Avatar
                        DrFuji DrFuji is offline
                        Heiki Hecchara‌‌
                        • Crystal Tier
                         
                        Join Date: Sep 2009
                        Location: Downia-upside
                        Age: 24
                        Gender: Male
                        Nature: Jolly
                        Posts: 1,328
                        Quote:
                        Originally Posted by Varion View Post
                        So I'm making a multichoice script, just a simple yes/no kind of thing.

                        This is the script; (FR BTW)

                        Spoiler:
                        #dynamic 0x800723
                        #org @start
                        faceplayer
                        msgbox @1 0x6
                        preparemsg @2
                        waitmsg
                        multichoice 0xE 0x0 0x0 0x0
                        copyvar 0x8003 0x8004
                        compare 0x8003 0x0
                        if 0x1 goto @yes
                        compare 0x8003 0x7F
                        if 0x2 goto @no
                        release
                        end

                        #org @yes
                        msgbox @3 0x6
                        fadescreen 0x1
                        fanfare 0x100
                        special 0x0
                        fadescreen 0x0
                        msgbox @4 0x6
                        release
                        end

                        #org @no
                        msgbox @5 0x6
                        release
                        end

                        #org @1
                        = Morning, \v\h01!\nHow are you today?

                        #org @2
                        = Would you like to rest for a bit?

                        #org @3
                        = Oh goodie, here's your room key.

                        #org @4
                        = Have a nice sleep?

                        #org @5
                        = Well, come back anytime.


                        But, Whenever I press no, or cancel it still does option 1 (yes)
                        You're incorrectly copying the variable that holds the answer you selected in the multichoice. The answer is always immediately saved to the variable 0x800D rather than 0x8004. Your compare functions are also a little bit messed up, at this point you are stating 'If it is no (0x0) then go to @yes and if it is greater (0x2) than cancel (0x7F) go to @no'. Here's what your script should look like:

                        Code:
                        #dynamic 0x800000
                        
                        #org @start
                        faceplayer
                        msgbox @1 0x6
                        preparemsg @2
                        waitmsg
                        multichoice 0xE 0x0 0x0 0x0
                        compare 0x800D 0x1 // You are initially checking if the answer is yes. I have also removed the second check for @no so there is no need for the copyvar command as we are only checking 0x800D once
                        if 0x1 goto @yes
                        msgbox @5 0x6
                        release
                        end // @no can be moved up here immediately after the variable check because if the player does not continue to @yes any other answer (0x0/ 0x7F) can be assumed to be no
                        
                        #org @yes
                        msgbox @3 0x6
                        fadescreen 0x1
                        fanfare 0x100
                        special 0x0
                        fadescreen 0x0
                        msgbox @4 0x6
                        release
                        end
                        
                        #org @1
                        = Morning, \v\h01!\nHow are you today?
                        
                        #org @2
                        = Would you like to rest for a bit?
                        
                        #org @3
                        = Oh goodie, here's your room key.
                        
                        #org @4
                        = Have a nice sleep?
                        
                        #org @5
                        = Well, come back anytime.
                        __________________
                          #8338    
                        Old June 2nd, 2013 (1:58 AM).
                        kearnseyboy6's Avatar
                        kearnseyboy6 kearnseyboy6 is offline
                        Aussie's Toughest Mudder
                           
                          Join Date: Dec 2008
                          Posts: 300
                          If I set an overworld to have this script

                          #dynamic 0x800000

                          #org @1
                          msgbox @2 MSG_YESNO
                          closeonkeypress
                          compare LASTRESULT 0x1
                          if 0x1 goto @3
                          end

                          #org @3
                          giveitem 0x8C 0x2 MSG_FIND
                          end


                          #org @2
                          = HEY!\pThere are 2 PSNCURE BERRIES.\nDo you want to pick them?

                          ^Now if I assign a Person ID the script stops it from reappearing, if not it appears again.

                          How does this work?? There is no setflag in the script...
                          __________________
                          HOLIDAYING CURRENTLY!!
                            #8339    
                          Old June 2nd, 2013 (3:28 AM). Edited June 2nd, 2013 by destinedjagold.
                          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 kearnseyboy6 View Post
                          If I set an overworld to have this script

                          #dynamic 0x800000

                          #org @1
                          msgbox @2 MSG_YESNO
                          closeonkeypress
                          compare LASTRESULT 0x1
                          if 0x1 goto @3
                          end

                          #org @3
                          giveitem 0x8C 0x2 MSG_FIND
                          end


                          #org @2
                          = HEY!\pThere are 2 PSNCURE BERRIES.\nDo you want to pick them?

                          ^Now if I assign a Person ID the script stops it from reappearing, if not it appears again.

                          How does this work?? There is no setflag in the script...
                          MSG_FIND is commonly used for Pokeballs holding items in the overworld.
                          If you want an NPC to give an item to the player, then use MSG_OBTAIN instead.
                          __________________


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

                            #8340    
                          Old June 2nd, 2013 (5:31 AM).
                          kearnseyboy6's Avatar
                          kearnseyboy6 kearnseyboy6 is offline
                          Aussie's Toughest Mudder
                             
                            Join Date: Dec 2008
                            Posts: 300
                            Quote:
                            Originally Posted by destinedjagold View Post
                            MSG_FIND is commonly used for Pokeballs holding items in the overworld.
                            If you want an NPC to give an item to the player, then use MSG_OBTAIN instead.
                            Sorry I don't think I explained it properly...

                            When I use person ID 200 the script sets that flag, or if I change it to 201 it sets 201 to stop it from reappearing. Does that make more sense?

                            I want to know how the games script knows to set the correct flag?
                              #8341    
                            Old June 2nd, 2013 (7:10 AM).
                            Xealeos Xealeos is offline
                               
                              Join Date: Jul 2012
                              Gender: Male
                              Posts: 16
                              Hi, I've got a question about a problem I'm having. I increased the number of starters that you can choose from in Oak's lab in FireRed from 3 to 10. So I made extra balls and they all seem to work just fine. But after I go get Oak's Parcel and deliver it, when your rival walks in, his character sprite doesn't show up. You get given the Pokédex and everything, but when the rival leaves, I think he's allowed to walk off the screen, but then the game freezes.

                              I think the person event of your rival isn't loading properly and then it freezes when it tries to unload it, but I'm not sure. Maybe it's trying to load and unload the wrong thing? I think it all worked fine before I increased the number of balls, but I'm not sure. Can anyone help me with this?
                                #8342    
                              Old June 2nd, 2013 (11:15 AM). Edited June 2nd, 2013 by kablam.
                              kablam kablam is offline
                                 
                                Join Date: May 2013
                                Gender: Male
                                Posts: 21
                                So I'm trying to use the pokepic command for Pokescript for three starter Pokemon (on a FIRE RED ROM). It works perfectly fine for Charmander. However, when I test the script for Totodile and Treecko it shows a picture of a Cacnea and question mark respectively. The scripts work perfectly fine for every other part or if I remove the pokescript commands. I have bolded the lines that I believe are causing the problem.

                                Charmander (working fine):
                                Spoiler:
                                #org $script
                                lock
                                faceplayer
                                checkflag 0x828
                                if 0x01 goto $notyours
                                #raw 75 0x04 0x00 0x0A 0x03
                                message $question
                                $question 1 = Inside this Pokeball\n lies Charmander.\pDo you want to\nchoose Charmander?
                                boxset 5
                                compare 0x800D 0x0001
                                if 0x01 goto $yes
                                message $no
                                $no 1 = \v\h01 did not\nreceive Charmander.
                                boxset 6
                                #raw 76
                                release
                                end

                                #org $yes
                                givepokemon 4 5 0
                                message $talk
                                $talk 1 = \v\h01 received Charmander.
                                boxset 6
                                setflag 0x828
                                #raw 76
                                release
                                end

                                #org $notyours
                                message $ha
                                $ha 1 = You already chose\nyour Pokemon.\pSave this for\nsomeone else.
                                boxset 6
                                release
                                end


                                Totodile (displays a Cacnea image):
                                Spoiler:
                                #org $script
                                lock
                                faceplayer
                                checkflag 0x828
                                if 0x01 goto $notyours
                                #raw 75 0x58 0x01 0x0A 0x03
                                message $question
                                $question 1 = Inside this Pokeball\n lies Totodile.\pDo you want to\nchoose Totodile?
                                boxset 5
                                compare 0x800D 0x0001
                                if 0x01 goto $yes
                                message $no
                                $no 1 = \v\h01 did not\nreceive Totodile.
                                boxset 6
                                #raw 76
                                release
                                end

                                #org $yes
                                givepokemon 158 5 0
                                message $talk
                                $talk 1 = \v\h01 received Totodile.
                                boxset 6
                                #raw 76
                                setflag 0x828
                                release
                                end

                                #org $notyours
                                message $ha
                                $ha 1 = You already chose\nyour Pokemon.\pSave this for\nsomeone else.
                                boxset 6
                                release
                                end


                                Treecko (displays a question mark):
                                Spoiler:
                                #org $script
                                lock
                                faceplayer
                                checkflag 0x828
                                if 0x01 goto $notyours
                                #raw 75 0x52 0x02 0x0A 0x03
                                message $question
                                $question 1 = Inside this Pokeball\n lies Treecko.\pDo you want to\nchoose Treecko?
                                boxset 5
                                compare 0x800D 0x0001
                                if 0x01 goto $yes
                                message $no
                                $no 1 = \v\h01 did not\nreceive Treecko.
                                boxset 6
                                #raw 76
                                release
                                end

                                #org $yes
                                givepokemon 252 5 0
                                message $talk
                                $talk 1 = \v\h01 received Treecko.
                                boxset 6
                                #raw 76
                                setflag 0x828
                                release
                                end

                                #org $notyours
                                message $ha
                                $ha 1 = You already chose your\n Pokemon.\pSave this for someone\n else.
                                boxset 6
                                release
                                end


                                Update: So I tested it again and it turns out that I receive Charmander and Totodile (the latter's pokepic is still broken) but I instead of Treecko I receive a question mark Pokemon.
                                  #8343    
                                Old June 2nd, 2013 (12:16 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 Xealeos View Post
                                  Hi, I've got a question about a problem I'm having. I increased the number of starters that you can choose from in Oak's lab in FireRed from 3 to 10. So I made extra balls and they all seem to work just fine. But after I go get Oak's Parcel and deliver it, when your rival walks in, his character sprite doesn't show up. You get given the Pokédex and everything, but when the rival leaves, I think he's allowed to walk off the screen, but then the game freezes.

                                  I think the person event of your rival isn't loading properly and then it freezes when it tries to unload it, but I'm not sure. Maybe it's trying to load and unload the wrong thing? I think it all worked fine before I increased the number of balls, but I'm not sure. Can anyone help me with this?
                                  You can only have a specific number of on screen sprites. Simple as that.
                                  __________________

                                  Paired with Simba
                                    #8344    
                                  Old June 2nd, 2013 (12:42 PM).
                                  Xealeos Xealeos is offline
                                     
                                    Join Date: Jul 2012
                                    Gender: Male
                                    Posts: 16
                                    Using that advice, I managed to fix it. Thanks!
                                      #8345    
                                    Old June 2nd, 2013 (4:46 PM).
                                    vashack's Avatar
                                    vashack vashack is offline
                                       
                                      Join Date: Feb 2013
                                      Gender: Male
                                      Posts: 2
                                      Hello all!
                                      Just a quick question. Does anyone know the offset for trainerbattle 0x3? I want to edit out the text from the battle. Just deleting the text still makes the text box show up, so I wanted to go to the offset in a hex editor and just scrub out the pointers to the texts.
                                        #8346    
                                      Old June 2nd, 2013 (5:13 PM).
                                      Trev's Avatar
                                      Trev Trev is offline
                                      starting my comeback tour
                                         
                                        Join Date: May 2012
                                        Location: anywhere as long as I have dogs
                                        Age: 20
                                        Gender: Male
                                        Nature: Sassy
                                        Posts: 1,221
                                        Quote:
                                        Originally Posted by vashack View Post
                                        Hello all!
                                        Just a quick question. Does anyone know the offset for trainerbattle 0x3? I want to edit out the text from the battle. Just deleting the text still makes the text box show up, so I wanted to go to the offset in a hex editor and just scrub out the pointers to the texts.
                                        That's not a script, it's a command. trainerbattle is a command, 0x3 is a hex code that activates a type of trainerbattle. I'm not even sure what you mean by the offset for it...

                                        If you want to change the text, open the script in XSE, find the offset at the end of the trainerbattle command, delete it and replace it with a different offset, delete the corresponding text string and offset and replace it, and done.
                                          #8347    
                                        Old June 2nd, 2013 (5:21 PM).
                                        vashack's Avatar
                                        vashack vashack is offline
                                           
                                          Join Date: Feb 2013
                                          Gender: Male
                                          Posts: 2
                                          Quote:
                                          Originally Posted by PJBottomz View Post
                                          That's not a script, it's a command. trainerbattle is a command, 0x3 is a hex code that activates a type of trainerbattle. I'm not even sure what you mean by the offset for it...

                                          If you want to change the text, open the script in XSE, find the offset at the end of the trainerbattle command, delete it and replace it with a different offset, delete the corresponding text string and offset and replace it, and done.
                                          I don't want to change the text in the script. I want to find the offset used for the trainerbattle command, and scrub out the text, so your first battle isn't interrupted by Oak talking about how to battle.
                                            #8348    
                                          Old June 2nd, 2013 (6:15 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 vashack View Post
                                            I don't want to change the text in the script. I want to find the offset used for the trainerbattle command, and scrub out the text, so your first battle isn't interrupted by Oak talking about how to battle.
                                            Just make a new battle. You need to learn scripting and just write your own script.
                                            __________________

                                            Paired with Simba
                                              #8349    
                                            Old June 3rd, 2013 (12:44 PM). Edited June 3rd, 2013 by nalacar.
                                            nalacar nalacar is offline
                                               
                                              Join Date: Apr 2013
                                              Gender: Male
                                              Posts: 4
                                              Game: Fire Red
                                              Editor: XSE 1.1.1
                                              Script: De-Leveler

                                              So I thought of an idea for my hack last night. It seems possible, just not quite there yet. Basically a Pokemon De-Leveler that will choose a Poke from the party and reset it to Lv 1. So Charizard gets de-leveled to Lv 1 essentially.

                                              I already know the problem is with the way Im comparing variables in the second check. Just not quite sure how to make it do what I want. The script functions as normal through the second check, but compare always returns 0x0, never 0x1.

                                              A quick explanation of the two specials used and a few others that may work better.
                                              Spoiler:

                                              Used-
                                              09F chooses a pokemon for a purpose and stores its position at 0x8004. works even with eggs

                                              0FF checks pokemon in 0x8004's number and places it in given variable

                                              May Work -
                                              0c1 a "silent hatch" code, hatches an egg in your party indicated by 0x8004, even if not an egg (reset level to 5, changes met location, clears EVs)

                                              147 checks your pokemon in position referenced by 0x8004 and returns to the given variable its pokemon number. returns 0x19c if an egg.

                                              1bb Create a full, party ready pokemon, at the trade slot. 0x8004 = pokemon number, 0x8005 = pokemon level, 0x8006 = item held


                                              Special 0c1 actually does almost everything Im looking for all on its own. Except it doesnt reset the Pokemons attacks. If anyone knows a quick way to reset that data, that might be the simplest way.

                                              Im also unclear as to how to create trades in game. Special 1bb might also work if someone knows how to use that one properly.

                                              The script below is obviously unfinished. The way it is currently set up it will be huge, unless special 0c1 can work for this. I also dont have any framework included yet for taking the original Pokemon away, but that can come later.

                                              I really appreciate the feedback this community always provides.
                                              Spoiler:
                                              '---------------
                                              #org 0x990000
                                              lock
                                              faceplayer
                                              checkflag 0x202
                                              if 0x1 call 0x89901AE
                                              checkflag 0x201
                                              if 0x1 call 0x89901EA
                                              msgbox 0x8990234 MSG_NORMAL '"Hi! Your Pokemon is about to \nget..."
                                              special2 0x8004 0x9F
                                              setflag 0x201
                                              setflag 0x202
                                              release
                                              end

                                              '---------------
                                              #org 0x9901AE
                                              msgbox 0x899025F MSG_NORMAL '"First Check!"
                                              special2 0x8005 0xFF
                                              clearflag 0x202
                                              release
                                              end

                                              '---------------
                                              #org 0x9901EA
                                              msgbox 0x899026E MSG_NORMAL '"Second Check!"
                                              setvar 0x8006 0x3F
                                              compare 0x8005 0x8006
                                              if 0x0 goto 0x899028C
                                              if 0x1 goto 0x899020B
                                              release
                                              end

                                              '---------------
                                              #org 0x99028C
                                              msgbox 0x8990285 MSG_NORMAL '"Fail!"
                                              clearflag 0x201
                                              release
                                              end

                                              '---------------
                                              #org 0x99020B
                                              msgbox 0x899027E MSG_NORMAL '"Here!"
                                              givepokemon 0x3F 0x1 0x0 0x0 0x0 0x0
                                              fanfare 0x13E
                                              waitfanfare
                                              clearflag 0x201
                                              release
                                              end


                                              '---------
                                              ' Strings
                                              '---------
                                              #org 0x990234
                                              = Hi! Your Pokemon is about to \nget weaker

                                              #org 0x99025F
                                              = First Check!

                                              #org 0x99026E
                                              = Second Check!

                                              #org 0x990285
                                              = Fail!

                                              #org 0x99027E
                                              = Here!
                                                #8350    
                                              Old June 3rd, 2013 (7:15 PM).
                                              LocksmithArmy's Avatar
                                              LocksmithArmy LocksmithArmy is offline
                                              Mew!
                                                 
                                                Join Date: Feb 2013
                                                Age: 28
                                                Gender: Male
                                                Posts: 415
                                                How can I check if the player has used FLASH?

                                                I have a simple script idea

                                                check if flashused
                                                if no call random number generator
                                                generate number 1-100
                                                if number is under 5 start poke battle
                                                if flash is used jump "release end"

                                                that way no pokebattles will appear after the player uses flash... i just dont know how to check if flash is used...

                                                really i only want 1 pokemon to be limited... all the other pokes wont care about flash... but thats not the point HOW DO I CHECK IF FLASH USED...
                                                __________________
                                                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 1:02 PM.