The PokéCommunity Forums Fan Games ROM Hacking
Script Help Thread (DO NOT REQUEST SCRIPTS)

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
  #8151    
Old May 7th, 2013 (8:35 AM).
LaDestitute's Avatar
LaDestitute LaDestitute is offline
Razor Sharp
     
    Join Date: Apr 2013
    Location: West Coast, USA
    Gender: Male
    Nature: Calm
    Posts: 84
    Quote:
    Originally Posted by Spherical Ice View Post
    You need to set the Unknown on the Script tile to 0300 (or just 03 in 1.9.5) in Advance Map and the Var number to an unused variable - I tend to use 4050.
    Okay, thanks, it worked fine. :D

    Although, some questions.
    What does the Unknown value do?
    How do I get the NPC to actually move to the player's front position, say if they step on the left or right script event instead of the middle one? It looks a bit odd with the NPC moving to the middle, otherwise. I could just have one script event, though, I guess. That works too, I'm just curious.

    Relevant Advertising!

      #8152    
    Old May 7th, 2013 (8:57 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
      Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
      Quote:
      Originally Posted by LaDestitute View Post
      Okay, thanks, it worked fine. :D

      Although, some questions.
      What does the Unknown value do?
      How do I get the NPC to actually move to the player's front position, say if they step on the left or right script event instead of the middle one? It looks a bit odd with the NPC moving to the middle, otherwise. I could just have one script event, though, I guess. That works too, I'm just curious.
      The unknown is just a staple. I never use it and things usually work fine, but it is something that Game Freak used on theirs as far as I know.

      There is a command called playerfacing(?). That will get the players direction and you can run different scripts based on it or you could force the player to look in the direction of the person that is moving.
      __________________

      Paired with Simba
        #8153    
      Old May 7th, 2013 (9:08 AM).
      Spherical Ice's Avatar
      Spherical Ice Spherical Ice is offline
      • Moderator
      • Silver Tier
       
      Join Date: Nov 2007
      Location: Bristol, UK
      Age: 19
      Posts: 5,104
      Yeah, the unknown is just there for consistency's sake - it is also used in warps.
      __________________

      A Pokemon that is discriminated!
      Support squirtle and make it everyone's favourite.
        #8154    
      Old May 7th, 2013 (9:26 AM).
      hinkage's Avatar
      hinkage hinkage is offline
      Everyone currently in an argument with this member: I really suggest you stop.
      • Gold Tier
       
      Join Date: Aug 2010
      Age: 21
      Posts: 378
      Quote:
      Originally Posted by LaDestitute View Post
      Okay, thanks, it worked fine. :D

      Although, some questions.
      What does the Unknown value do?
      How do I get the NPC to actually move to the player's front position, say if they step on the left or right script event instead of the middle one? It looks a bit odd with the NPC moving to the middle, otherwise. I could just have one script event, though, I guess. That works too, I'm just curious.
      If you have multiple scriptboxes and want the NPC to walk up to you... uh, it's just easier to show through example:

      Spoiler:
      #org @set
      lock
      setvar 0x4001 0xX (1 for first scriptbox, 2 for second, etc. this is a temp var, it resets after leaving the map.)
      jump @main (your main script)

      #org @main
      compare 0x4001 0x1
      if == call @comp1 (if 0x1 is set then call this. "comp1" stands for "comparison 1")
      compare 0x4001 0x2
      if == call @comp2 (if 0x2 is set...)
      compare 0x4001 0x3
      if == call @comp3 (if 0x3 is set... and on and on, for each scriptbox you have)
      pauseevent 0x0
      --your script ---
      release
      end

      #org @comp1
      applymovement 0xX @move1 (should move sprite X to put sprite in front of player according to the first scriptbox -- you have to define @move1, @move2, @move3, etc., yourself)
      return

      #org @comp2
      applymovement 0xX @move2 (should move sprite X to put sprite in front of player according to the second scriptbox)
      return

      #org @comp3
      applymovement 0xX @move3 (same as other two)
      return


      Check out your rival's scripts. They do it too, and it might be easier for you to understand if you actually see it in action.
      __________________
      (ღ˘⌣˘ღ)
        #8155    
      Old May 7th, 2013 (9:50 AM).
      Overheat's Avatar
      Overheat Overheat is offline
      burning dragon
         
        Join Date: May 2013
        Location: Scotland
        Gender: Male
        Nature: Serious
        Posts: 5
        Since I don't have the patience to read through 327 pages of questions I don't know if this has been asked yet but How do you give the player character the National dex early in the game?
          #8156    
        Old May 7th, 2013 (10:00 AM).
        LaDestitute's Avatar
        LaDestitute LaDestitute is offline
        Razor Sharp
           
          Join Date: Apr 2013
          Location: West Coast, USA
          Gender: Male
          Nature: Calm
          Posts: 84
          Another question, how do I make it so with the givepokemon command, have the Pokemon given have a specific OT and IDno (or is the IDno randomly generated? Not sure) and/or nickname?

          Edit - Overheat, please use the search function next time, before asking.
          To award the national dex, use this:
          special 0x16F
            #8157    
          Old May 7th, 2013 (10:49 AM).
          Spherical Ice's Avatar
          Spherical Ice Spherical Ice is offline
          • Moderator
          • Silver Tier
           
          Join Date: Nov 2007
          Location: Bristol, UK
          Age: 19
          Posts: 5,104
          It involves ASM, using data found in this thread in R&D. I'm not very good at ASM but I could maybe do this.
          __________________

          A Pokemon that is discriminated!
          Support squirtle and make it everyone's favourite.
            #8158    
          Old May 7th, 2013 (11:19 AM).
          LaDestitute's Avatar
          LaDestitute LaDestitute is offline
          Razor Sharp
             
            Join Date: Apr 2013
            Location: West Coast, USA
            Gender: Male
            Nature: Calm
            Posts: 84
            Can someone proof-check this for me? I'm using a compare variable to set different NPC movement depending on variable value (with the three script events sharing the same variable, but different values) but it's not working as I thought.

            Code:
            #dynamic 0x800000
            
            #org @start
            countpokemon
            compare 0x800D 0x1
            if 0x1 goto @continue
            goto @nopokemon
            
            #org @nopokemon
            compare 0x4000 0x1
            if 0x1 goto @nopass0
            if 0x2 goto @nopass1
            if 0x3 goto @nopass2
            
            #org @continue
            release
            end
            
            #org @nopass0
            applymovement 0x1 @move3
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move4
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @nopass1
            applymovement 0x1 @move1
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move2
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @nopass2
            applymovement 0x1 @move5
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move6
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @move1
            #raw 0x62 
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move2
            #raw 0x11
            #raw 0x11
            #raw 0xFE
            
            #org @move3
            #raw 0x62 
            #raw 0x0A
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move4
            #raw 0x11
            #raw 0x11
            #raw 0x0B
            #raw 0xFE
            
            #org @move5
            #raw 0x62 
            #raw 0x0B
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move6
            #raw 0x11
            #raw 0x11
            #raw 0x0A
            #raw 0xFE
            
            #org @1
            = I can't let you pass because you\ndon't have any Pokémon.\pIt's not safe to go out without\nat least one.
              #8159    
            Old May 7th, 2013 (12:09 PM).
            Spherical Ice's Avatar
            Spherical Ice Spherical Ice is offline
            • Moderator
            • Silver Tier
             
            Join Date: Nov 2007
            Location: Bristol, UK
            Age: 19
            Posts: 5,104
            Quote:
            Originally Posted by LaDestitute View Post
            Can someone proof-check this for me? I'm using a compare variable to set different NPC movement depending on variable value (with the three script events sharing the same variable, but different values) but it's not working as I thought.

            Code:
            #dynamic 0x800000
            
            #org @start
            countpokemon
            compare 0x800D 0x1
            if 0x1 goto @continue
            goto @nopokemon
            
            #org @nopokemon
            compare 0x4000 0x1
            if 0x1 goto @nopass0
            if 0x2 goto @nopass1
            if 0x3 goto @nopass2
            
            #org @continue
            release
            end
            
            #org @nopass0
            applymovement 0x1 @move3
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move4
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @nopass1
            applymovement 0x1 @move1
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move2
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @nopass2
            applymovement 0x1 @move5
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move6
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @move1
            #raw 0x62 
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move2
            #raw 0x11
            #raw 0x11
            #raw 0xFE
            
            #org @move3
            #raw 0x62 
            #raw 0x0A
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move4
            #raw 0x11
            #raw 0x11
            #raw 0x0B
            #raw 0xFE
            
            #org @move5
            #raw 0x62 
            #raw 0x0B
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move6
            #raw 0x11
            #raw 0x11
            #raw 0x0A
            #raw 0xFE
            
            #org @1
            = I can't let you pass because you\ndon't have any Pokémon.\pIt's not safe to go out without\nat least one.
            Code:
            #dynamic 0x800000
            
            #org @start
            countpokemon
            compare 0x800D 0x1
            This means the script will only not activate if the player has one Pokémon in their party - use checkflag 0x828 instead.

            Code:
            if 0x1 goto @continue
            goto @nopokemon
            
            #org @nopokemon
            compare 0x4000 0x1
            if 0x1 goto @nopass0
            if 0x2 goto @nopass1
            if 0x3 goto @nopass2
            You need to add the compare line everytime.

            Code:
            #org @continue
            release
            end
            
            #org @nopass0
            applymovement 0x1 @move3
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move4
            waitmovement 0x0
            release
            setflag 0x200
            end
            Release always goes before end, without any commands in between.

            Code:
            #org @nopass1
            applymovement 0x1 @move1
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move2
            waitmovement 0x0
            release
            setflag 0x200
            end
            
            #org @nopass2
            applymovement 0x1 @move5
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move6
            waitmovement 0x0
            release
            setflag 0x200
            end
            Again, release goes directly before end.
            Code:
            #org @move1
            #raw 0x62 
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move2
            #raw 0x11
            #raw 0x11
            #raw 0xFE
            
            #org @move3
            #raw 0x62 
            #raw 0x0A
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move4
            #raw 0x11
            #raw 0x11
            #raw 0x0B
            #raw 0xFE
            
            #org @move5
            #raw 0x62 
            #raw 0x0B
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move6
            #raw 0x11
            #raw 0x11
            #raw 0x0A
            #raw 0xFE
            
            #org @1
            = I can't let you pass because you\ndon't have any Pokémon.\pIt's not safe to go out without\nat least one.
            So, the fixed script would look like this:

            Code:
            #dynamic 0x800000
            
            #org @start
            checkflag 0x828
            if 0x1 goto @continue
            goto @nopokemon
            
            #org @nopokemon
            compare 0x4000 0x1
            if 0x1 goto @nopass0
            compare 0x4000 0x1
            if 0x2 goto @nopass1
            compare 0x4000 0x1
            if 0x3 goto @nopass2
            goto @continue
            
            #org @continue
            release
            end
            
            #org @nopass0
            applymovement 0x1 @move3
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move4
            waitmovement 0x0
            setflag 0x200
            release
            end
            
            #org @nopass1
            applymovement 0x1 @move1
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move2
            waitmovement 0x0
            setflag 0x200
            release
            end
            
            #org @nopass2
            applymovement 0x1 @move5
            waitmovement 0x0
            msgbox @1 0x6
            applymovement 0x1 @move6
            waitmovement 0x0
            setflag 0x200
            release
            end
            
            #org @move1
            #raw 0x62 
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move2
            #raw 0x11
            #raw 0x11
            #raw 0xFE
            
            #org @move3
            #raw 0x62 
            #raw 0x0A
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move4
            #raw 0x11
            #raw 0x11
            #raw 0x0B
            #raw 0xFE
            
            #org @move5
            #raw 0x62 
            #raw 0x0B
            #raw 0x1D
            #raw 0x1D
            #raw 0xFE
            
            #org @move6
            #raw 0x11
            #raw 0x11
            #raw 0x0A
            #raw 0xFE
            
            #org @1
            = I can't let you pass because you\ndon't have any Pokémon.\pIt's not safe to go out without\nat least one.
            To be honest, you could save a lot of space by using the call command for the nopass parts but this will work.
            __________________

            A Pokemon that is discriminated!
            Support squirtle and make it everyone's favourite.
              #8160    
            Old May 7th, 2013 (12:15 PM).
            LaDestitute's Avatar
            LaDestitute LaDestitute is offline
            Razor Sharp
               
              Join Date: Apr 2013
              Location: West Coast, USA
              Gender: Male
              Nature: Calm
              Posts: 84
              I tried using the call command, but I kept getting errors from debug.
                #8161    
              Old May 7th, 2013 (4:56 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
                Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                Quote:
                Originally Posted by Overheat View Post
                Since I don't have the patience to read through 327 pages of questions I don't know if this has been asked yet but How do you give the player character the National dex early in the game?
                There is a nice little search feature up in the top right hand corner. Search this and the Simple Questions thread since it has been answered..... Far too many times.
                __________________

                Paired with Simba
                  #8162    
                Old May 9th, 2013 (5:03 AM). Edited May 9th, 2013 by Varion Bluefire.
                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: 663
                  C+P'd from RHO.

                  So, I'm trying my hands at scripting, using XSE

                  This is my script:

                  "#dynamic 0x2A28C8
                  #org @start
                  lock
                  faceplayer
                  msgbox @1 0x6
                  release
                  end

                  #org @1
                  = Hello world!"

                  I've put the offset 2A28C8 which i got from FSF into aMap on the event person i desire.

                  When talking to this person, nothing happens.

                  What do? :/
                  __________________

                  Just strollin' to my next destination...
                    #8163    
                  Old May 9th, 2013 (6:40 AM).
                  DrFuji's Avatar
                  DrFuji DrFuji is online now
                  Heiki Hecchara‌‌
                  • Crystal Tier
                   
                  Join Date: Sep 2009
                  Location: Downia-upside
                  Age: 24
                  Gender: Male
                  Nature: Jolly
                  Posts: 1,326
                  Quote:
                  Originally Posted by Varion View Post
                  C+P'd from RHO.

                  So, I'm trying my hands at scripting, using XSE

                  This is my script:

                  "#dynamic 0x2A28C8
                  #org @start
                  lock
                  faceplayer
                  msgbox @1 0x6
                  release
                  end

                  #org @1
                  = Hello world!"

                  I've put the offset 2A28C8 which i got from FSF into aMap on the event person i desire.

                  When talking to this person, nothing happens.

                  What do? :/
                  It sounds like you're using an outdated version of XSE. Try using version 1.1.1 which was the most recent update.
                  __________________
                    #8164    
                  Old May 9th, 2013 (6:50 AM).
                  Spherical Ice's Avatar
                  Spherical Ice Spherical Ice is offline
                  • Moderator
                  • Silver Tier
                   
                  Join Date: Nov 2007
                  Location: Bristol, UK
                  Age: 19
                  Posts: 5,104
                  On another note, you could save space by doing this:

                  Code:
                  #dynamic 0x800000
                  
                  #org @start
                  msgbox @string1 0x2
                  end
                  
                  #org @string1
                  = Hello world!
                  msgbox 0x2 automatically includes the lock, faceplayer and release.
                  __________________

                  A Pokemon that is discriminated!
                  Support squirtle and make it everyone's favourite.
                    #8165    
                  Old May 10th, 2013 (3:07 AM).
                  horcruxrocks's Avatar
                  horcruxrocks horcruxrocks is offline
                  Pokemon Lover
                     
                    Join Date: May 2012
                    Gender: Male
                    Nature: Brave
                    Posts: 12
                    Guys read this script
                    Quote:
                    #dynamic 0x800000

                    #org @start
                    lockall
                    faceplayer
                    checkflag 0x828
                    if 0x1 goto @done
                    msgbox @talk1 0x6
                    givepokemon 0x4 0x8 0x0 0x0 0x0 0x0
                    giveitem 0x3F 0x1 0x0
                    setflag 0x828
                    releaseall
                    end

                    #org @done
                    msgbox @talk2 0x0
                    release
                    end

                    #org @talk1
                    = Erik obtained a CHARMANDER!

                    #org @talk2
                    = Sorry you got your item!
                    I inserted it to an event and when i checked it out its not working
                    Just a msgbox appears with no text.Any help would be appreciated
                    Also can any one teach me abt these cmmands as i have not understood completely :
                    Quote:
                    checkflag 0x828
                    if 0x1 goto @done
                    msgbox @talk1 0x6
                    givepokemon 0x4 0x8 0x0 0x0 0x0 0x0
                    giveitem 0x3F 0x1 0x0
                    setflag 0x828
                    releaseall
                    end

                    #org @done
                    msgbox @talk2 0x0
                    release
                    end

                    #org @talk1
                    = Erik obtained a CHARMANDER!

                    #org @talk2
                    = Sorry you got your item!
                    Thank you

                    -Horcrux
                      #8166    
                    Old May 10th, 2013 (3:55 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
                      Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                      Quote:
                      Originally Posted by horcruxrocks View Post
                      Guys read this script


                      I inserted it to an event and when i checked it out its not working
                      Just a msgbox appears with no text.Any help would be appreciated
                      Also can any one teach me abt these cmmands as i have not understood completely :

                      Thank you

                      -Horcrux
                      It sounds like you are using an old version of XSE. You need to have v1.1.1. Also, what commands exactly need an explanation?
                      __________________

                      Paired with Simba
                        #8167    
                      Old May 10th, 2013 (4:01 AM).
                      horcruxrocks's Avatar
                      horcruxrocks horcruxrocks is offline
                      Pokemon Lover
                         
                        Join Date: May 2012
                        Gender: Male
                        Nature: Brave
                        Posts: 12
                        Quote:
                        Originally Posted by karatekid552 View Post
                        It sounds like you are using an old version of XSE. You need to have v1.1.1. Also, what commands exactly need an explanation?
                        checkflag 0x828
                        if 0x1 goto @done
                          #8168    
                        Old May 10th, 2013 (4:06 AM).
                        Aryan143's Avatar
                        Aryan143 Aryan143 is offline
                        The Fennekin Fan!
                           
                          Join Date: Jul 2012
                          Location: Delhi, India
                          Age: 16
                          Gender: Male
                          Nature: Modest
                          Posts: 756
                          Quote:
                          Originally Posted by horcruxrocks View Post
                          checkflag 0x828
                          if 0x1 goto @done
                          This checks that if the flag 828 is set or not. If yes, it continues onto @done
                          __________________
                          Check out my gaming company:

                            #8169    
                          Old May 10th, 2013 (4:21 AM). Edited May 10th, 2013 by horcruxrocks.
                          horcruxrocks's Avatar
                          horcruxrocks horcruxrocks is offline
                          Pokemon Lover
                             
                            Join Date: May 2012
                            Gender: Male
                            Nature: Brave
                            Posts: 12
                            Quote:
                            Originally Posted by Aryan143 View Post
                            This checks that if the flag 828 is set or not. If yes, it continues onto @done
                            one more question when i am adding an event in a map that person is not showing in the map when i play.It does not appear when i load rom and load a saved game.But when i start a new game it appears
                              #8170    
                            Old May 10th, 2013 (4:47 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
                              Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                              Quote:
                              Originally Posted by horcruxrocks View Post
                              one more question when i am adding an event in a map that person is not showing in the map when i play.It does not appear when i load rom and load a saved game.But when i start a new game it appears
                              Then the flag in the person's A-map Person ID is set.
                              __________________

                              Paired with Simba
                                #8171    
                              Old May 10th, 2013 (5:44 AM).
                              hinkage's Avatar
                              hinkage hinkage is offline
                              Everyone currently in an argument with this member: I really suggest you stop.
                              • Gold Tier
                               
                              Join Date: Aug 2010
                              Age: 21
                              Posts: 378
                              Wait is it true that using flags above 0x8FF overwrite vars? And what about vars above 0x40FF? Because in old hacks I did those things and never had a problem -- I'm guessing it's cuz I never used whatever vars and stuff got corrupted, but it would be good to know a definite window of stuff that's usable. (I searched this myself too and found nothing really).

                              Ty Karatekid who will probably end up answering this :I
                              __________________
                              (ღ˘⌣˘ღ)
                                #8172    
                              Old May 10th, 2013 (7:42 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
                                Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552
                                Quote:
                                Originally Posted by hinkage View Post
                                Wait is it true that using flags above 0x8FF overwrite vars? And what about vars above 0x40FF? Because in old hacks I did those things and never had a problem -- I'm guessing it's cuz I never used whatever vars and stuff got corrupted, but it would be good to know a definite window of stuff that's usable. (I searched this myself too and found nothing really).

                                Ty Karatekid who will probably end up answering this :I
                                Flags- Yes. There is actually a formula I came up with at the end of R&D to see which flag will corrupt which var and vice versa.

                                Vars- These take up PC box space and such.


                                Basically, the best flags are 200-2FF (about) and vars are 4000-40FF. Knizz did release a hack which relocates the 7000(?) vars to some nice free RAM space for use.

                                You're welcome, you know it! Haha
                                __________________

                                Paired with Simba
                                  #8173    
                                Old May 10th, 2013 (10:25 AM).
                                ~Anbuja's Avatar
                                ~Anbuja ~Anbuja is offline
                                Let's Keep It Simple
                                   
                                  Join Date: Oct 2010
                                  Location: In Snorlax Stomach
                                  Gender: Male
                                  Nature: Lonely
                                  Posts: 321
                                  Hi!
                                  I need help with this.
                                  I've applied Jpans engine to my ROM, and tried to recompile the nurse joy script.
                                  Everything works fine, until the part when the nurse joy comes to the part shes supposed to say "We hope to see you again!" then my screen turns into 3 different colors and the rom image crushes.
                                  I suck at scripting so I don't have a clue what else to do, I hope someone can help me there :>
                                  Spoiler:

                                  Quote:
                                  #Dynamic 0x740000
                                  '---------------
                                  #org @start
                                  lock
                                  faceplayer
                                  call @one
                                  release
                                  end

                                  '---------------
                                  #org @one
                                  special 0x187
                                  compare LASTRESULT 0x2
                                  if 0x1 goto @nope
                                  preparemsg @text1 '"Welcome to our POKéMON CENTER!\pWo..."
                                  waitmsg
                                  multichoice 0x13 0x8 0x0 0x2
                                  copyvar 0x8000 LASTRESULT
                                  compare 0x8000 0x0
                                  if 0x1 goto @A1A65B8
                                  compare 0x8000 0x1
                                  if 0x1 goto @A1A6663
                                  compare 0x8000 0x7F
                                  if 0x1 goto @A1A6663
                                  end

                                  '---------------
                                  #org @nope
                                  release
                                  end

                                  '---------------
                                  #org @A1A65B8
                                  cmdc3 0xF
                                  preparemsg @text2 '"Okay, I'll take your POKéMON for a..."
                                  waitmsg
                                  call @A1A65CE
                                  special 0x169
                                  goto @A1A65EC

                                  '---------------
                                  #org @A1A6663
                                  msgbox @again MSG_KEEPOPEN '"We hope to see you again!"
                                  return

                                  '---------------
                                  #org @A1A65CE
                                  applymovement LASTTALKED 0x81A75E7
                                  waitmovement 0x0
                                  doanimation 0x19
                                  checkanimation 0x19
                                  applymovement LASTTALKED @A1A75ED
                                  waitmovement 0x0
                                  special 0x0
                                  return

                                  '---------------
                                  #org @A1A65EC
                                  special2 LASTRESULT 0x1B1
                                  compare LASTRESULT 0x0
                                  if 0x1 goto @A1A661D
                                  special2 LASTRESULT 0x183
                                  copyvar 0x8008 LASTRESULT
                                  compare 0x8008 0x0
                                  if 0x1 goto @A1A661D
                                  compare 0x8008 0x1
                                  if 0x1 goto @A1A6636
                                  end

                                  '---------------
                                  #org @A1A661D
                                  preparemsg @TY '"Thank you for waiting.\nWe've rest..."
                                  waitmsg
                                  applymovement LASTTALKED @A1A666C
                                  waitmovement 0x0
                                  msgbox @again MSG_KEEPOPEN '"We hope to see you again!"
                                  return

                                  '---------------
                                  #org @A1A6636
                                  checkflag 0x842
                                  if 0x1 goto @A1A661D
                                  msgbox @TY MSG_KEEPOPEN '"Thank you for waiting.\nWe've rest..."
                                  setflag 0x842
                                  preparemsg @Playing '"It appears as if [buffer1] is play..."
                                  waitmsg
                                  applymovement LASTTALKED @A1A666C
                                  waitmovement 0x0
                                  msgbox @again MSG_KEEPOPEN '"We hope to see you again!"
                                  return


                                  '---------
                                  ' Strings
                                  '---------
                                  #org @text1
                                  = [black_fr]Welcome to our [blue_fr]POKéMON CENTER!\p[black_fr]Would you like me to heal your\n[blue_fr]POKéMON [black_fr]back to perfect health?

                                  #org @text2
                                  = [black_fr]Okay, I'll take your [blue_fr]POKéMON [black_fr]for a\nfew seconds.

                                  #org @again
                                  = We hope to see you again!

                                  #org @TY
                                  = [black_fr]Thank you for waiting.\nWe've restored your [blue_fr]POKéMON [black_fr]to\lfull health.

                                  #org @Playing
                                  = It appears as if [buffer1] is playing\nright now.\lGo for it!


                                  '-----------
                                  ' Movements
                                  '-----------
                                  #org @A1A75E7
                                  #raw 0x2F 'Face Left (Delayed)
                                  #raw 0xFE 'End of Movements

                                  #org @A1A75ED
                                  #raw 0x2D 'Face Down (Delayed)
                                  #raw 0xFE 'End of Movements

                                  #org @A1A666C
                                  #raw 0x5B 'mov5B
                                  #raw 0x1A 'Delay3
                                  #raw 0xFE 'End of Movements

                                  Thanks in advantage!
                                  __________________
                                    #8174    
                                  Old May 10th, 2013 (2:55 PM).
                                  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: 663
                                    I'm trying to do a script for the prof's lab I've got this.

                                    Quote:
                                    '---------------
                                    #org 0x71BBEF
                                    checkflag 0x828
                                    if 0x1 goto 0x71BFAE
                                    msgbox 0x871BC71 MSG_NORMAL '"Mazort: Ah! There you are.\nCome h..."
                                    applymovement MOVE_PLAYER 0x871BED4
                                    waitmovement 0x0
                                    applymovement 0x8 0x871BEDD
                                    waitmovement 0x0
                                    msgbox 0x871BCA8 MSG_NORMAL '"[rival]: Woah!\nWhy are they here?..."
                                    msgbox 0x871BCF3 MSG_NORMAL '"Mazort: Shush now child!\nYou're b..."
                                    applymovement MOVE_PLAYER 0x871BEE2
                                    applymovement 0x8 0x871BEE6
                                    waitmovement 0x0
                                    msgbox 0x871BD99 MSG_NORMAL '"[rival]: What?"
                                    applymovement MOVE_PLAYER 0x871BEEA
                                    applymovement 0x8 0x871BEED
                                    waitmovement 0x0
                                    applymovement 0x4 0x871BEF0
                                    waitmovement 0x0
                                    msgbox 0x871BDA5 MSG_NORMAL '"Mazort: You two can have a healthy..."
                                    applymovement 0x4 0x871BEF3
                                    waitmovement 0x0
                                    msgbox 0x871BE01 MSG_NORMAL '"Mazort: Now then!\nOnto business.\..."
                                    setvar 0x4055 0x2
                                    release
                                    end

                                    '---------
                                    ' Strings
                                    '---------

                                    #org 0x71BC71
                                    = Mazort: Ah! There you are.\nCome here, why don't you?

                                    #org 0x71BCA8
                                    = [rival]: Woah!\nWhy are they here?\pI thought I was getting a Pokémon\lnot them.

                                    #org 0x71BCF3
                                    = Mazort: Shush now child!\nYou're both getting a Pokémon\lSince you both have the same goal.\pTo become a Champion.\nIt seems perfect that\lyou both want the same thing.

                                    #org 0x71BD99
                                    = [rival]: What?

                                    #org 0x71BDA5
                                    = Mazort: You two can have a healthy \nrivalry.\pHeh, that's how it was done\nback in the day.

                                    #org 0x71BE01
                                    = Mazort: Now then!\nOnto business.\l[player], on that table is three Pokéballs.\pIn each is one Pokémon, of a different type.\pGo ahead and pick one.\nBut pick carefully, each type has\lit's own weaknesses and advantages.

                                    '-----------
                                    ' Movements
                                    '-----------
                                    #org 0x71BED4
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0x11 'Step Up (Normal)
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEDD
                                    #raw 0x53 'Jump in Place (Facing Up)
                                    #raw 0x53 'Jump in Place (Facing Up)
                                    #raw 0x53 'Jump in Place (Facing Up)
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEE2
                                    #raw 0x2 'Face Left
                                    #raw 0x63 'Question Mark (?)
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEE6
                                    #raw 0x3 'Face Right
                                    #raw 0x63 'Question Mark (?)
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEEA
                                    #raw 0x1 'Face Up
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEED
                                    #raw 0x1 'Face Up
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEF0
                                    #raw 0x1 'Face Up
                                    #raw 0xFE 'End of Movements

                                    #org 0x71BEF3
                                    #raw 0x0 'Face Down
                                    #raw 0xFE 'End of Movements


                                    #org 0x71BFAE
                                    release
                                    end
                                    Everything works fine up until

                                    'That's how it was done, back in the day'
                                    After that the script stops, and releases the player.

                                    It stopped the next bit after i put in the flag check for after having a pokemon. :\
                                    __________________

                                    Just strollin' to my next destination...
                                      #8175    
                                    Old May 10th, 2013 (3:41 PM).
                                    DrFuji's Avatar
                                    DrFuji DrFuji is online now
                                    Heiki Hecchara‌‌
                                    • Crystal Tier
                                     
                                    Join Date: Sep 2009
                                    Location: Downia-upside
                                    Age: 24
                                    Gender: Male
                                    Nature: Jolly
                                    Posts: 1,326
                                    Quote:
                                    Originally Posted by Anbuja's_BlooDY View Post
                                    Hi!
                                    I need help with this.
                                    I've applied Jpans engine to my ROM, and tried to recompile the nurse joy script.
                                    Everything works fine, until the part when the nurse joy comes to the part shes supposed to say "We hope to see you again!" then my screen turns into 3 different colors and the rom image crushes.
                                    I suck at scripting so I don't have a clue what else to do, I hope someone can help me there :>
                                    Spoiler:


                                    Thanks in advantage!
                                    Yeah I've always found JPAN's engine to have a problem with Nurse Joy's script. This is because it doesn't like the command 'special2 0x800D 0x183' which checks if somebody is in the WiFi Room. If you change the part of the script to something like this (where red = delete) then it should be fine:

                                    Code:
                                    //---------------
                                    #org 0x1A65EC
                                    special2 LASTRESULT 0x1B1
                                    compare LASTRESULT 0x0
                                    if 0x1 goto 0x81A661D
                                    special2 LASTRESULT 0x183
                                    copyvar 0x8008 LASTRESULT
                                    compare 0x8008 0x0
                                    if 0x1 goto 0x81A661D
                                    compare 0x8008 0x1
                                    if 0x1 goto 0x81A6636
                                    end
                                    You can also delete this entire section of the script and repoint the parts that point to 0x1A65EC so that they point to 0x1A661D. I just didn't want to post the entire script here :P

                                    Quote:
                                    Originally Posted by Varion View Post
                                    I'm trying to do a script for the prof's lab I've got this.



                                    Everything works fine up until

                                    'That's how it was done, back in the day'
                                    After that the script stops, and releases the player.

                                    It stopped the next bit after i put in the flag check for after having a pokemon. :\
                                    You do realise that you've used the end command right? Your script is ending there because you have told it to finish, unless this is an XSE glitch or it has merged with an old script. Could we see the un-compiled version of your script if it is different to what you've shown us?
                                    __________________
                                    Closed Thread
                                    Quick Reply

                                    Sponsored Links
                                    Thread Tools

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

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

                                    Forum Jump


                                    All times are GMT -8. The time now is 12:02 AM.