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
  #1176    
Old May 27th, 2009 (10:54 AM). Edited May 27th, 2009 by RaycrowX.
RaycrowX's Avatar
RaycrowX RaycrowX is offline
Beginning ROM Hacker
     
    Join Date: Apr 2009
    Location: Jenison, MI
    Gender:
    Posts: 36

    onyx97: Try this:

    Spoiler:
    #include stdpoke.rbh

    #dynamic 0x800000

    #org @jessejamesbattle
    trainerbattle 0x1 0x331 0x0 @before @after 'This is a gym leader style battle, where the script will continue execution after the battle is done
    msgbox @defeat MSG_NORMAL
    'Put your flags somewhere around here
    wildbattle PKMN_MEW 70 0 'The Mew battle
    end

    #org @before
    = Little brat,this time MEW goes\nwith US!

    #org @after
    = Not again!!!!!!

    #org @defeat
    = Little brat next time we gonna\nbeat let's retreat!

    Similar to my last post, I cannot help you as much as I would have been able to had you provided more detailed information.

    ------------------------------------------------------------------------

    EDIT: Allegretto: No problem. You will need these preprocesssing directives (see your XSE F2 guide for more info) in the script to make it work correctly, or replace the defined special words in the script.

    Spoiler:
    #include stdpoke.rbh 'Used for PKMN_EEVEE, which gets replaced by 0x85 (decimal 133)

    #define HEALFLAG 0x828
    #define NICKNAMEFUNCTION 0x1A74EB

    ...

    checkflag HEALFLAG 'XSE replaces HEALFLAG with 0x828

    ...

    givepokemon PKMN_EEVEE 5 0 0x0 0x0 0x0 'XSE replaces PKMN_EEVEE with 0x85

    ...

    if B_== call NICKNAMEFUNCTION 'XSE replaces NICKNAMEFUNCTION with 0x1A74EB

    So copy the bolded commands at the top into your script and let XSE do the work for you, or replace them manually yourself. I personally like using define as it makes it more readable for others and also more understandable for myself when I come back to it and try to understand it again. Make sense?


    Relevant Advertising!

      #1177    
    Old May 27th, 2009 (12:42 PM).
    HackChu's Avatar
    HackChu HackChu is offline
    I need a haircut...
    • Silver Tier
     
    Join Date: Jan 2007
    Location: Bankrupt Amerika
    Age: 24
    Gender: Male
    Nature: Modest
    Posts: 673

    Well what im trying to do is make a ow walk to me,battle and walk away.The right tile for the script works fine,but the whole thing itself doesnt work when I step on the left tile.I made that huge script in my spoiler in my previous posts.And I used it as the left tile,I than made a smaller script for the right tile,so that I didn't have to do all that again.(I used the script offset from the left one,than I made the right script "goto (script offset)"But the right tile works fine,should I make another script and use the "@script offset" for the next one I should make?Similar to the one I made for the right tile?

    __________________

    Join us!

    My 'learning how to combine battle scripts' thread:
    http://www.pokecommunity.com/showthread.php?t=183001

    SoulSilver FC:1162 1864 5409
    Name: Ethan

    Black FC: 2666 1354 4379
    Name: Ashton

    White 2 FC: 1120 8065 3049
    Name: Nate

    3DS Friend Code: 1349-4646-2412
    Name: tysonrss

      #1178    
    Old May 27th, 2009 (1:52 PM).
    Nintendoman58 Nintendoman58 is offline
       
      Join Date: May 2009
      Posts: 3

      Can someone help me again? I'm trying to make a script in which the professor appears and talks to you after the first flag appears.

      Code:
      #org $begin
      lock
      faceplayer
      checkflag 0x200
      if b_true goto $pomdude
      applymovement 0x4 $pomdude
      message $chooseone
      $chooseone 1 =Hello!\nSorry I'm late\pI just like staring at the sea\nAnyway I have three Pokemon here.\pYou can only choose one.
      boxset 6
      release
      end
      #org $pomdude
      #raw 0x09
      #raw 0x09
      #raw 0x09
      #raw 0x09
      #raw 0x09
      #raw 0x09

      The problem is that when I step on the spot the game freezes.

      Also, I'm trying to make a script in which the professor gives you the pokedex, but I don't know how to make one. Can someone help me?

        #1179    
      Old May 27th, 2009 (6:59 PM).
      metapod23's Avatar
      metapod23 metapod23 is offline
      Hardened Trainer
         
        Join Date: Mar 2009
        Gender: Male
        Nature: Timid
        Posts: 673

        Quote:
        Originally Posted by Nintendoman58 View Post
        Can someone help me again? I'm trying to make a script in which the professor appears and talks to you after the first flag appears.

        Code:
        #org $begin
        lock
        faceplayer
        checkflag 0x200
        if b_true goto $pomdude
        applymovement 0x4 $pomdude
        message $chooseone
        $chooseone 1 =Hello!\nSorry I'm late\pI just like staring at the sea\nAnyway I have three Pokemon here.\pYou can only choose one.
        boxset 6
        release
        end
        #org $pomdude
        #raw 0x09
        #raw 0x09
        #raw 0x09
        #raw 0x09
        #raw 0x09
        #raw 0x09

        The problem is that when I step on the spot the game freezes.

        Also, I'm trying to make a script in which the professor gives you the pokedex, but I don't know how to make one. Can someone help me?

        You might need to add a setvar and a setflag at the end of the script. setvar should match the variable number for the script (if you don't have one, give it one - so if you make it variable # 5000, at the end of the script write setvar 0x5000) and the setflag should match the ID number of the professor. Without the setvar the game will tend to freeze, from what I've done.

        Someone who knows more about scripting might be able to correct any mistakes I've made.

          #1180    
        Old May 27th, 2009 (8:29 PM).
        onyx79's Avatar
        onyx79 onyx79 is offline
        Red Dead Revolver
           
          Join Date: Jan 2009
          Location: Orange Islands (=
          Gender: Male
          Nature: Modest
          Posts: 503

          raycrow x-your script is not very good it says: "too less parameters on line 3.the correct number is 6."
          and doesn't work.....

            #1181    
          Old May 27th, 2009 (9:37 PM).
          0m3GA ARS3NAL's Avatar
          0m3GA ARS3NAL 0m3GA ARS3NAL is offline
          Im comin' home...
          • Silver Tier
           
          Join Date: Jan 2008
          Location: Superjail Penitentiary
          Age: 24
          Gender: Male
          Nature: Gentle
          Posts: 1,812

          Quote:
          Originally Posted by onyx79 View Post
          raycrow x-your script is not very good it says: "too less parameters on line 3.the correct number is 6."
          and doesn't work.....

          I took the liberty to fix his script.
          The problem is that the script is supposed to have another pointer for 0x1 type battles.

          Here you go

          Spoiler:
          #include stdpoke.rbh

          #dynamic 0x800000

          #org @jessejamesbattle
          trainerbattle 0x1 0x331 0x0 @before @after @afterbattlescript

          #org @afterbattlescript
          lock
          msgbox @defeat MSG_NORMAL
          wildbattle PKMN_MEW 70 0 'The Mew battle
          'Insert Flags, and other script stuff here'
          release
          end

          #org @before
          = Little brat,this time MEW goes\nwith US!

          #org @after
          = Not again!!!!!!

          #org @defeat
          = Little brat next time we gonna\nbeat let's retreat!

          __________________

          >Boot Jailbot
          >Pass *****
          .
          .
          Jailbot OS Ver 1.1.2
          Greetings Warden
          of Superjail Penitentiary
          Awaiting user input...

          >Display User_Info
          ╠══User Info══╣
          Username:
          0m3GA ARS3NAL
          Age: 18
          Sex: Male ♂
          Race: Caucasian
          Quote:
          "What is this
          I don't even..."

          M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
          ╠══End of File══╣
          Awaiting user input...

          >

            #1182    
          Old May 28th, 2009 (2:12 AM).
          Hoshiko Aki's Avatar
          Hoshiko Aki Hoshiko Aki is offline
          Avatar rules
             
            Join Date: Oct 2008
            Posts: 109

            Code:
            #dynamic 0x800000

            #org @main lock faceplayer msgbox @msg1 0x6 checkflag 0x828 givepokemon 0x178 0x5 0x0 0x0 0x0 0x0 setflag 0x828 fadescreen 0x1 hidesprite 0x800F setflag 0x1000 fadescreen 0x0 release end

            #org @msg1 = A finaly you come, I must\ntell something importment\llisten carefully. As you know I\lwork fore the weather station. I\lhave a specail mission now and we\lneed your help! Take this\lcastform, and head the the\lweather station.I will be there!

            probs with the script above.
            the people where you talked fade away ( that;s what i wanted!)
            he works but if i go in a building and thebn outside he is back * that;s not wat i want.

            what do i wrong?

            and the hex number of the pokemon is worng it;s now a absol inplaats van een castform

              #1183    
            Old May 28th, 2009 (3:27 AM).
            onyx79's Avatar
            onyx79 onyx79 is offline
            Red Dead Revolver
               
              Join Date: Jan 2009
              Location: Orange Islands (=
              Gender: Male
              Nature: Modest
              Posts: 503

              this is the rocket script:
              '---------------
              #org 0x80CD5A
              trainerbattle 0x1 0x331 0x0 0x8814D5E 0x8814DB4 0x880D19C
              setflag 0x4E
              release
              end
              '---------------
              #org 0x80D19C
              lock
              msgbox 0x8814DC6 MSG_NORMAL '"Little brat next time we gonna\nbe..."
              release
              end

              '---------
              ' Strings
              '---------
              #org 0x814D5E
              = Little brat,this time MEW goes\nwith US!
              #org 0x814DB4
              = Not again!!!!!!
              #org 0x814DC6
              = Little brat next time we gonna\nbeat you,let's retreat!

              after I beat them they say let's retreat but don't dissaper,what have I done wrong?

                #1184    
              Old May 28th, 2009 (6:02 AM).
              Allegretto Allegretto is offline
                 
                Join Date: May 2009
                Gender:
                Posts: 11

                So i put what you put in bold on top of my script. And al goes well with the givepokemon script. But when you have your eevee, your mom should heal your pokemon from then on. The problem is she doesnt. Anythoughts on that?

                The script as it is now.

                Spoiler:
                #include stdpoke.rbh

                #define HEALFLAG 0x828
                #define NICKNAMEFUNCTION 0x1A74EB

                #dynamic 0x800F5C

                #org @checkhealorgive
                countpokemon
                compare LASTRESULT 0
                if B_== goto @takeornot
                checkflag HEALFLAG
                if B_TRUE goto @heal
                msgbox @6 MSG_FACE
                end

                #org @heal
                msgbox @10 MSG_FACE
                closeonkeypress
                fadescreen 0x1
                fanfare 0x100
                special 0x0
                waitfanfare
                fadescreen 0x0
                msgbox @11 MSG_NORMAL
                end

                #org @takeornot
                lock
                faceplayer
                bufferpokemon 0x0 PKMN_EEVEE
                msgbox @1 MSG_YESNO
                compare LASTRESULT B_YES
                if B_== goto @take
                msgbox @2 MSG_NORMAL
                release
                end

                #org @take
                givepokemon PKMN_EEVEE 5 0 0x0 0x0 0x0
                fanfare 0x13E
                msgbox @3 MSG_KEEPOPEN
                waitfanfare
                msgbox @4 MSG_YESNO
                compare LASTRESULT B_YES
                if B_== call NICKNAMEFUNCTION
                msgbox @5 MSG_NORMAL
                release
                end

                #org @10
                = What wonderful Pokèmon you\nhave there!\pThey look like\nthey could use a long rest.

                #org @11
                = Now they look better!\nDon't forget to visit!

                #org @1
                = MOM: You're going outside?\nYou should take your [buffer1]\pwith you.\nYou've been a team since\pyou learned to walk.\nWant it?

                #org @2
                = It'll be here waiting\nwhenever you need it.

                #org @3
                = [black_fr]You received an [buffer1]!

                #org @4
                = [black_fr]Would you like to give a\nnickname to [buffer1]?

                #org @5
                = [buffer1] looks overjoyed!

                #org @6
                = Your father would have been\nso proud.

                  #1185    
                Old May 28th, 2009 (9:53 AM).
                RaycrowX's Avatar
                RaycrowX RaycrowX is offline
                Beginning ROM Hacker
                   
                  Join Date: Apr 2009
                  Location: Jenison, MI
                  Gender:
                  Posts: 36

                  0m3GA: Thanks for correcting it. I though I knew how it worked, but I guess I didn't. Now I know, thank you.

                  ------------------------------------------------------------------------

                  Quote:
                  Originally Posted by Allegretto View Post
                  So i put what you put in bold on top of my script. And al goes well with the givepokemon script. But when you have your eevee, your mom should heal your pokemon from then on. The problem is she doesnt. Anythoughts on that?

                  The script as it is now.

                  It's supposed to do that because that's what I programmed it to do. Like I said in my original post, you would have to set the HEALFLAG to get her to begin healing your Pokemon, which I thought you could do at Viridian City or something like that. I thought you didn't want her to heal them right away because you had the countpokemon AND the flag. But now I understand what you want and have corrected the script in accordance. Keep in mind this could have been avoided had you specified exactly what you wanted your script to do in the first place.

                  Spoiler:
                  #include stdpoke.rbh

                  #define NICKNAMEFUNCTION 0x1A74EB

                  #dynamic 0x800000

                  #org @checkhealorgive
                  countpokemon
                  compare LASTRESULT 0
                  if B_== goto @takeornot
                  'Healing section
                  msgbox @10 MSG_FACE
                  closeonkeypress
                  fadescreen 0x1
                  fanfare 0x100
                  special 0x0
                  waitfanfare
                  fadescreen 0x0
                  msgbox @11 MSG_NORMAL
                  end

                  #org @takeornot
                  lock
                  faceplayer
                  bufferpokemon 0x0 PKMN_EEVEE
                  msgbox @1 MSG_YESNO
                  compare LASTRESULT B_YES
                  if B_== goto @take
                  msgbox @2 MSG_NORMAL
                  release
                  end

                  #org @take
                  givepokemon PKMN_EEVEE 5 0 0x0 0x0 0x0
                  fanfare 0x13E
                  msgbox @3 MSG_KEEPOPEN
                  waitfanfare
                  msgbox @4 MSG_YESNO
                  compare LASTRESULT B_YES
                  if B_== call NICKNAMEFUNCTION
                  msgbox @5 MSG_NORMAL
                  release
                  end

                  #org @10
                  = What wonderful Pokèmon you\nhave there!\pThey look like\nthey could use a long rest.

                  #org @11
                  = Now they look better!\nDon't forget to visit!

                  #org @1
                  = MOM: You're going outside?\nYou should take your [buffer1]\pwith you.\nYou've been a team since\pyou learned to walk.\nWant it?

                  #org @2
                  = It'll be here waiting\nwhenever you need it.

                  #org @3
                  = [black_fr]You received an [buffer1]!

                  #org @4
                  = [black_fr]Would you like to give a\nnickname to [buffer1]?

                  #org @5
                  = [buffer1] looks overjoyed!\pYour father would have been\nso proud.


                  I wasn't sure when you wanted her to say "Your father would have been so proud" so I just had her say it after you get Eevee.

                    #1186    
                  Old May 28th, 2009 (10:40 AM).
                  LilCo2008's Avatar
                  LilCo2008 LilCo2008 is offline
                     
                    Join Date: May 2009
                    Posts: 7

                    Ok well im working on a Fire Red hack and I have these pokeballs that I want when you click them that you get the pokemon inside.

                    I want you to be able to get all of them.

                    This is the script I used

                    Code:
                    #org 0x880032B
                    '-----------------------------------
                    checkflag 0xEEEE
                    if 0x1 jump 0x8800348 ' Equal To
                    addpokemon 0x229 0x3C 0x1 0x0 0x0 0x0
                    setflag 0xEEEE
                    end

                    #org 0x8800348 '----------------------------------- end

                    Any help?

                    (I wouldnt let me post a picture)

                      #1187    
                    Old May 28th, 2009 (12:37 PM).
                    HackChu's Avatar
                    HackChu HackChu is offline
                    I need a haircut...
                    • Silver Tier
                     
                    Join Date: Jan 2007
                    Location: Bankrupt Amerika
                    Age: 24
                    Gender: Male
                    Nature: Modest
                    Posts: 673

                    Whoa...that setflag looks a bit....just whoa.Anyway someone please help with my script already...

                    __________________

                    Join us!

                    My 'learning how to combine battle scripts' thread:
                    http://www.pokecommunity.com/showthread.php?t=183001

                    SoulSilver FC:1162 1864 5409
                    Name: Ethan

                    Black FC: 2666 1354 4379
                    Name: Ashton

                    White 2 FC: 1120 8065 3049
                    Name: Nate

                    3DS Friend Code: 1349-4646-2412
                    Name: tysonrss

                      #1188    
                    Old May 29th, 2009 (1:33 AM).
                    DarkPrince304's Avatar
                    DarkPrince304 DarkPrince304 is offline
                    Back to Hacking after exams!!!
                       
                      Join Date: May 2009
                      Location: PokeCommunity
                      Gender: Male
                      Nature: Calm
                      Posts: 167

                      Can anyone give me a list of important flags and its functions...
                      I want to make a script like:
                      I begin the game in my room then my mom comes and says " [PLAYER]! Go to sleep you have to get up early tomorrow and choose your starter pokemon"
                      The mom remains on the stairs till I sleep.and then I sleep and the next day arrives and mom is not on the stairs blocking the way

                      __________________

                      I am the creator of Pokemon Gotta Catch em' All! Game.


                      Click on the Banner to go to main thread

                        #1189    
                      Old May 29th, 2009 (6:53 AM).
                      Kolossus's Avatar
                      Kolossus Kolossus is offline
                      Dialouge Master
                         
                        Join Date: May 2009
                        Location: Canada
                        Gender:
                        Posts: 5

                        Hey everyone, sorry for the noob question. I have been looking all morning and have yet to see a simple answet to this. I change some of the script from the game, then I try to save, but it just makes a new file for that script! Then when I close the script and open it again, it opens the old script. I can open mine, but it opens in a new tab. Even when I go 'compile' it still saves as a new file. Any thoughts on how I can implement my script?

                          #1190    
                        Old May 29th, 2009 (8:09 AM).
                        Allegretto Allegretto is offline
                           
                          Join Date: May 2009
                          Gender:
                          Posts: 11

                          Thx for the help with the specialheal givepokemon script combo. Have a problem with the next applymovement script. He dosn't go where he needs to go. Th person should go 3 steps up first then 3 steps left and finally 4 steps up before ending up where he should end up.

                          Here's the script as i compiled it.

                          Spoiler:
                          #dynamic 0x8013D8

                          #org @start
                          checkflag 0x828
                          if 0x1 goto @done
                          msgbox @1 0x6
                          applymovement 0x03 @move
                          waitmovement 0x0
                          applymovement 0xFF @move2
                          pause 0x30
                          msgbox @2 0x6
                          playsong 0x13E 0x0
                          applymovement 0x03 @move3
                          applymovement 0xFF @move3
                          waitmovement 0x0
                          fadesong 0x12C
                          release
                          end

                          #org @done
                          release
                          end

                          #org @move
                          #raw 0x62
                          #raw 0x11
                          #raw 0x11
                          #raw 0x11
                          #raw 0xFE

                          #org @move2
                          #raw 0x03
                          #raw 0xFE

                          #org @move3
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0xFE

                          #org @1
                          = Waaaiiiitttt!!!

                          #org @2
                          = You can't go out there\nwithout your own Pokemon.\pWild Pokemon will hurt you.

                          Can you help?

                            #1191    
                          Old May 29th, 2009 (10:44 AM). Edited May 29th, 2009 by metapod23.
                          metapod23's Avatar
                          metapod23 metapod23 is offline
                          Hardened Trainer
                             
                            Join Date: Mar 2009
                            Gender: Male
                            Nature: Timid
                            Posts: 673

                            Quote:
                            Originally Posted by DarkPrince304 View Post
                            Can anyone give me a list of important flags and its functions...
                            I want to make a script like:
                            I begin the game in my room then my mom comes and says " [PLAYER]! Go to sleep you have to get up early tomorrow and choose your starter pokemon"
                            The mom remains on the stairs till I sleep.and then I sleep and the next day arrives and mom is not on the stairs blocking the way

                            I just made a similar script. Tested and it works.

                            For the mom, place a script at the entranceway. Give the mom the ID 2c and apply a var number to the script. I used 5050 which works fine. Place the mom sprite in the entranceway. Alter the code below to your liking ... (if you use a different number for the var, change the corresponding number in the code - DON'T change 2C - if you're not hacking Fire Red, though, I'm not sure if it will work). You might be able to put this all into one code.

                            Code:
                            '---------------
                            #org 0x800000
                            lockall
                            goto 0x80000c
                            releaseall
                            end

                            '--------------- #org 0x800000 showsprite 0x1 sound 0x9 showsprite 0x1 applymovement MOVE_PLAYER 0x8169B91 applymovement 0x1 0x8169868 waitmovement 0x1 applymovement 0x1 0x81A75E1 textcolor 0x0 msgbox 0x818E272 MSG_KEEPOPEN closeonkeypress applymovement 0x1 0x81A75D1 sound 0x9 waitmovement 0x1 hidesprite 0x1 setflag 0x2C releaseall end

                            '--------- ' Strings '--------- #org 0x18E272 = MOM: [player]! Get to bed!\nIt's 11:00! You should be asleep!\pGo to bed and don't forget to\nchange into your pajamas!

                            '----------- ' Movements '----------- #org 0x169B91 #raw 0x10 'Step Down (Normal) #raw 0x62 'Exclamation Mark (!) #raw 0x1 'Face Up #raw 0xFE 'End of Movements

                            #org 0x169868 #raw 0x13 'Step Right (Normal) #raw 0xFE 'End of Movements

                            #org 0x1A75E1 #raw 0x4A 'Face Player #raw 0xFE 'End of Movements

                            #org 0x1A75D1 #raw 0x12 'Step Left (Normal) #raw 0xFE 'End of Movements

                            Change the movements to match what you want. In mine the mom comes upstairs, so this works best.

                            Then apply a signpost to the bed with this sort of code:

                            Code:
                            '---------------
                            #org 0x800057
                            msgbox 0x818E4CA MSG_KEEPOPEN
                            closeonkeypress
                            fadescreen 0x1
                            pause 0x1E
                            fadescreen 0x0
                            hidesprite 0x1
                            releaseall
                            end

                            '--------- ' Strings '--------- #org 0x18E4CA = [player] went to sleep\nand dreamed of getting your 1st\pPOKéMON!

                            Any questions please ask. The org#s are what I used for mine. Somebody who's better at scripting might be able to help you more as well with an easier way or something ...

                              #1192    
                            Old May 29th, 2009 (12:17 PM).
                            derrick 313 derrick 313 is offline
                               
                              Join Date: May 2009
                              Posts: 9

                              hello iam trying to make a shiny lugia battle similer to the red garydos one and i replaced the shiny sprite with a shadow lugia one and i was wondering how do i use that progam to make the battle shiny every time ?

                                #1193    
                              Old May 29th, 2009 (2:22 PM).
                              Mortifiier's Avatar
                              Mortifiier Mortifiier is offline
                              *blank*
                                 
                                Join Date: May 2009
                                Nature: Careful
                                Posts: 3

                                Hey, I've been at this for a few hours now and can't figure it out. I wrote a script similar to the Gary battle scripts in FireRed (BPRE) using XSE. The actual trainer is a Team Rocket member, though I don't think it matters.

                                Basically, this guy walks on-screen, tells you to stop, then runs up to you and insults you a bit before starting a battle with you. These movements work properly. The battle also starts and finishes correctly. However...

                                ...after the battle finishes, the applymovement code to make this Team Rocket member walk off-screen works, but the camera centers on him. And once the movements are completed (i.e. he would normally be off-screen) the game transfers movement control to this character.

                                I'm no longer the basic red Ash-like sprite. I'm now a Team Rocket sprite that can move around, although the movement permissions go berserk at this point and I can hardly move at all. That's only if I don't include the hidesprite command. If I leave that in there, I become the Team Rocket sprite, move off-screen, and then the sprite gets hidden, so the game freezes and I can't move anything anymore.

                                Here's my code:

                                Spoiler:

                                #dynamic 0x900000

                                'There are two triggers on the map
                                #org @trigger
                                lockall
                                setvar 0x4001 0x0
                                goto @main

                                'Main branch
                                #org @main
                                applymovement 0xC @appear
                                waitmovement 0x0
                                msgbox @message1 0x6
                                applymovement MOVE_PLAYER @exclamation
                                waitmovement 0x0
                                compare 0x4001 0x0
                                if 0x1 call @move1
                                compare 0x4001 0x1
                                if 0x1 call @move2
                                msgbox @message2 0x6
                                trainerbattle 0x1 0x003 0x0 @before @defeat @after
                                end

                                #org @after
                                msgbox @alert 0x6
                                compare 0x4001 0x0
                                if 0x1 call @move3
                                compare 0x4001 0x1
                                if 0x1 call @move4
                                hidesprite 0xC
                                setvar 0x6500 0x1
                                releaseall
                                end

                                #org @message1
                                = Hey, you!\nStop right there!

                                #org @message2
                                = You shouldn't be poking your nose\nwhere it doesn't belong, kid.\pThat's right. TEAM ROCKET has\nbusiness in these tunnels and it\ldoesn't concern you.\pI suggest you turn around now...\pWhat? You won't turn around?\pYou insolent brat!

                                #org @before
                                = I think I'll teach you some manners!

                                #org @defeat
                                = What the...

                                #org @alert
                                = Useless company POKéMON...I should\nhave brought my own.\pI'd better go warn the BOSS...He\ncan't afford to be seen here.\pYou were lucky, so don't think\nyou can beat me twice.

                                #org @move1
                                applymovement 0xC @approach1
                                waitmovement 0x0
                                return

                                #org @move2
                                applymovement 0xC @approach2
                                waitmovement 0x0
                                applymovement MOVE_PLAYER @spin
                                waitmovement 0x0
                                return

                                #org @move3
                                applymovement 0xc @leave1
                                waitmovement 0x0
                                return

                                #org @move4
                                applymovement 0xc @leave2
                                waitmovement 0x0
                                return

                                #org @appear
                                #raw 0x10 'Step Down (Normal)
                                #raw 0x10 'Step Down (Normal)
                                #raw 0x10 'Step Down (Normal)
                                #raw 0xFE 'End of Movements

                                #org @leave1
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0xFE 'End of Movements

                                #org @leave2
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0x1E 'Step Up (Fast)
                                #raw 0xFE 'End of Movements

                                #org @approach1
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x4A 'Face Player
                                #raw 0xFE 'End of Movements

                                #org @approach2
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x1D 'Step Down (Fast)
                                #raw 0x4A 'Face Player
                                #raw 0xFE 'End of Movements

                                #org @spin
                                #raw 0x03 'Face Right
                                #raw 0xFE 'End of Movements

                                #org @exclamation
                                #raw 0x62 'Exclamation
                                #raw 0xFE 'End of Movements

                                Please note:

                                I've tested multiple types of the trainerbattle command. All the Gary battles in the game use 0x3, which is what I tried to do, but I get the same control-transfer problem with 0x0 and 0x1, so please don't suggest that.

                                The scripts squares are set properly on the map, and all the movements to the Team Rocket sprite execute properly.

                                Somehow the trainerbattle command is causing this problem, even though it's coded fine and the actual battle works.

                                Thanks in advance to anyone who can fix this

                                  #1194    
                                Old May 29th, 2009 (2:44 PM).
                                BlitŻ's Avatar
                                BlitŻ BlitŻ is offline

                                guahh my dog is so cute

                                • Crystal Tier
                                 
                                Join Date: Feb 2009
                                Location: Bay Area, Califronia.
                                Age: 22
                                Gender: Male
                                Nature: Jolly
                                Posts: 472

                                hey guys im just wondering what music number do i put in the fanfare command to make that nose like when you open a secret door or a switch, like a *kachunk* noise?

                                __________________

                                  #1195    
                                Old May 29th, 2009 (2:56 PM).
                                HackChu's Avatar
                                HackChu HackChu is offline
                                I need a haircut...
                                • Silver Tier
                                 
                                Join Date: Jan 2007
                                Location: Bankrupt Amerika
                                Age: 24
                                Gender: Male
                                Nature: Modest
                                Posts: 673

                                Heh...maybe its just me,but I really hate being ignored...

                                __________________

                                Join us!

                                My 'learning how to combine battle scripts' thread:
                                http://www.pokecommunity.com/showthread.php?t=183001

                                SoulSilver FC:1162 1864 5409
                                Name: Ethan

                                Black FC: 2666 1354 4379
                                Name: Ashton

                                White 2 FC: 1120 8065 3049
                                Name: Nate

                                3DS Friend Code: 1349-4646-2412
                                Name: tysonrss

                                  #1196    
                                Old May 29th, 2009 (2:59 PM).
                                PlatniumPiano's Avatar
                                PlatniumPiano PlatniumPiano is offline
                                You are now breathing manually
                                   
                                  Join Date: Dec 2008
                                  Location: Yesterday
                                  Gender: Male
                                  Nature: Lax
                                  Posts: 480

                                  Does anybody know the offset for nicknaming a Pokemon in Ruby version?

                                    #1197    
                                  Old May 29th, 2009 (4:27 PM).
                                  TheMantyke TheMantyke is offline
                                  Don't use ThunderBolt
                                     
                                    Join Date: May 2009
                                    Posts: 2

                                    Hi, I'm brand new to hacking and need a bit of help with a very basic component to scripting.

                                    I've scoured this thread and the guides, but I haven't found an explanation as to how you find the dynamic offset in XSE or in any other program. It says that I can find it with a free space finder and that one of those can be found in Advanced Map, but I'm still clueless as to where exactly the offset finder is and how I can use it in my script.

                                    If it will help anyone help me, this is exactly what I'm trying to do. I have a ROM in which pokemon #152-386 can be obtained before the Elite 4. I need to activate the national dex very early in-game, so I've made a script that gives it to you right after you deliver Oak's Parcel... However, it's filled with holes and I don't know which codes correspond to the right offsets, message and flag.

                                    I would really appriciate help here so I could finally get what I'm doing off the ground.

                                    Here's the script I've made that needs to be fixed up.

                                    Quote:
                                    #dynamic 0x$16929F

                                    #org @NPD
                                    lock
                                    faceplayer
                                    checkflag 0x1
                                    if 0x1 goto @done
                                    msgbox @1 0x
                                    setflag 0x829
                                    release
                                    end

                                      #1198    
                                    Old May 29th, 2009 (5:23 PM).
                                    BlitŻ's Avatar
                                    BlitŻ BlitŻ is offline

                                    guahh my dog is so cute

                                    • Crystal Tier
                                     
                                    Join Date: Feb 2009
                                    Location: Bay Area, Califronia.
                                    Age: 22
                                    Gender: Male
                                    Nature: Jolly
                                    Posts: 472

                                    Quote:
                                    Originally Posted by TheMantyke View Post
                                    Hi, I'm brand new to hacking and need a bit of help with a very basic component to scripting.

                                    I've scoured this thread and the guides, but I haven't found an explanation as to how you find the dynamic offset in XSE or in any other program. It says that I can find it with a free space finder and that one of those can be found in Advanced Map, but I'm still clueless as to where exactly the offset finder is and how I can use it in my script.

                                    If it will help anyone help me, this is exactly what I'm trying to do. I have a ROM in which pokemon #152-386 can be obtained before the Elite 4. I need to activate the national dex very early in-game, so I've made a script that gives it to you right after you deliver Oak's Parcel... However, it's filled with holes and I don't know which codes correspond to the right offsets, message and flag.

                                    I would really appriciate help here so I could finally get what I'm doing off the ground.

                                    Here's the script I've made that needs to be fixed up.

                                    Well you get a really good free space finder called free space finder (FSF) in the toolbox thread in the emulation directory where it says Hackmews toolbox, has some tools there that i use frequently. and nobody can really help you if you dont tell us what tool your using i.e. XSE, pokescript (which sucks), etc and what your script is suposed to do exactly. I hope you can get started and i'm expecting to see something in the scrapbox very soon

                                    __________________

                                      #1199    
                                    Old May 29th, 2009 (5:29 PM).
                                    Samike360's Avatar
                                    Samike360 Samike360 is offline
                                    Lover of May
                                       
                                      Join Date: Mar 2009
                                      Location: ATL
                                      Gender:
                                      Nature: Bold
                                      Posts: 396

                                      Hey guys I'm working on making an applymovement script in leafgreen with xse and the script works fine, but I want to make it so that when you come down the stairs (entering the map) the script will run. Instead, I have to step off of the tile and step back on it for the script to work.

                                      What I'm wondering is if I need to make level scripts (if so, is there any tutorials for it?) for it to work, or if a script on a warp just won't work.

                                      Thanks

                                      __________________






                                      Please warm my eggs...I'll be sure to return the favor

                                      From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.

                                        #1200    
                                      Old May 29th, 2009 (5:42 PM).
                                      TheMantyke TheMantyke is offline
                                      Don't use ThunderBolt
                                         
                                        Join Date: May 2009
                                        Posts: 2

                                        Quote:
                                        Originally Posted by jebees View Post
                                        Well you get a really good free space finder called free space finder (FSF) in the toolbox thread in the emulation directory where it says Hackmews toolbox, has some tools there that i use frequently. and nobody can really help you if you dont tell us what tool your using i.e. XSE, pokescript (which sucks), etc and what your script is suposed to do exactly. I hope you can get started and i'm expecting to see something in the scrapbox very soon

                                        Quote:
                                        Originally Posted by TheMantyke View Post
                                        I've scoured this thread and the guides, but I haven't found an explanation as to how you find the dynamic offset in XSE or in any other program. It says that I can find it with a free space finder and that one of those can be found in Advanced Map, but I'm still clueless as to where exactly the offset finder is and how I can use it in my script.

                                        If it will help anyone help me, this is exactly what I'm trying to do. I have a ROM in which pokemon #152-386 can be obtained before the Elite 4. I need to activate the national dex very early in-game, so I've made a script that gives it to you right after you deliver Oak's Parcel... However, it's filled with holes and I don't know which codes correspond to the right offsets, message and flag.

                                        I don't think I forgot those things... :/

                                        But reguardless, that you for the info on FSF, I had overlooked that...

                                        More help is still appreciated from anybody!

                                        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 6:50 AM.