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
  #2851    
Old January 8th, 2010 (1:04 PM).
arpeejajo's Avatar
arpeejajo arpeejajo is offline
King Of Muay Thai
     
    Join Date: Mar 2008
    Location: Woodbridge, ON
    Gender: Male
    Nature: Jolly
    Posts: 36
    Quote:
    Originally Posted by Quickster View Post
    Hmm,it is in a different offset.Can you tell me the steps you are doing everything in fot the original?
    So I started by placing the script on the map and filling out the variables and made the offset. Then I added the person event on the map that will be part of the script and filled out the unknown.
    I put in this code and compiled it.
    Code:
    '---------------
    #org 0x800008
    lock
    msgbox 0x8800027 0x6 '"Hmm. Where am I?"
    closeonkeypress
    applymovement 0x1 0x880003A
    waitmovement 0x0
    setvar 0x7000 0x2
    release
    end
    
    
    '---------
    ' Strings
    '---------
    #org 0x800027
    = Hmm. Where am I?
    
    
    '-----------
    ' Movements
    '-----------
    #org 0x80003A
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0xFE 'End of Movements
    After that I added your code that you gave me to a new offset and compiled it.
    Code:
    #dynamic 0x800044
    
    #org @start
    compare 0x7000 0x2
    if 0x1 goto @end
    setvar 0x7000 0x1
    release
    end
    
    #org @end
    release
    end
    Save, test, nothing.

    Relevant Advertising!

      #2852    
    Old January 8th, 2010 (1:06 PM).
    Quickster's Avatar
    Quickster Quickster is offline
    Dream or Drop?
       
      Join Date: Oct 2007
      Gender: Male
      Nature: Quiet
      Posts: 351
      Quote:
      Originally Posted by arpeejajo View Post
      So I started by placing the script on the map and filling out the variables and made the offset. Then I added the person event on the map that will be part of the script and filled out the unknown.
      I put in this code and compiled it.
      Code:
      '---------------
      #org 0x800008
      lock
      msgbox 0x8800027 0x6 '"Hmm. Where am I?"
      closeonkeypress
      applymovement 0x1 0x880003A
      waitmovement 0x0
      setvar 0x7000 0x2
      release
      end
      
      
      '---------
      ' Strings
      '---------
      #org 0x800027
      = Hmm. Where am I?
      
      
      '-----------
      ' Movements
      '-----------
      #org 0x80003A
      #raw 0x13 'Step Right (Normal)
      #raw 0x13 'Step Right (Normal)
      #raw 0x13 'Step Right (Normal)
      #raw 0x13 'Step Right (Normal)
      #raw 0x10 'Step Down (Normal)
      #raw 0x10 'Step Down (Normal)
      #raw 0x10 'Step Down (Normal)
      #raw 0xFE 'End of Movements
      After that I added your code that you gave me to a new offset and compiled it.
      Code:
      #dynamic 0x800044
      
      #org @start
      compare 0x7000 0x2
      if 0x1 goto @end
      setvar 0x7000 0x1
      release
      end
      
      #org @end
      release
      end
      Save, test, nothing.

      Hmm,maybe can you send me an ips file in a pm and I can take a look at it?
      __________________
      I laugh looking at this.

      But sometimes I want to come back to it...

        #2853    
      Old January 8th, 2010 (2:20 PM).
      Shiny_Noctowl Shiny_Noctowl is offline
         
        Join Date: Dec 2008
        Age: 22
        Gender: Male
        Posts: 39
        Quote:
        Originally Posted by Congratulations, I Hate You View Post
        there. try that, special 0x8E resets the map for it to work.
        Now the tiles change, but they reset when I leave the map.
          #2854    
        Old January 8th, 2010 (2:25 PM).
        NarutoActor's Avatar
        NarutoActor NarutoActor is offline
        The rocks cry out to me
        • Silver Tier
         
        Join Date: Jan 2009
        Location: Brooklyn/Marlboro
        Age: 23
        Gender: Female
        Nature: Bashful
        Posts: 1,979
        Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
        you need a level map (set map tile) I knew that you where going to ask this. what you should do is after the script put setvar 0x5000 0x1 and add a level script like this
        '---------------
        #org @levelscript
        #raw 0x1
        #raw pointer @example
        #raw 0x0

        '---------------
        #org @example
        compare 0x5000 0x1
        if 0x1 goto @map
        release
        end

        '---------------
        #org @map
        setmaptile 0x33 0x2B 0x299 0x1
        setmaptile 0x34 0x2B 0x299 0x1
        setmaptile 0x35 0x2B 0x299 0x1
        setmaptile 0x36 0x2B 0x299 0x1
        setmaptile 0x33 0x2A 0x2E1 0x1
        setmaptile 0x34 0x2A 0x2E1 0x1
        setmaptile 0x35 0x2A 0x2E1 0x1
        setmaptile 0x36 0x2A 0x2E1 0x1
        return
        __________________
        ~There are those people who understand hex, F the rest
          #2855    
        Old January 8th, 2010 (4:26 PM).
        arpeejajo's Avatar
        arpeejajo arpeejajo is offline
        King Of Muay Thai
           
          Join Date: Mar 2008
          Location: Woodbridge, ON
          Gender: Male
          Nature: Jolly
          Posts: 36
          So my script has a givepokemon but when I get the Pokemon and press start, the Pokemon option is not there.

          Also, how do I get a script to activate only once?
            #2856    
          Old January 8th, 2010 (4:35 PM).
          Incineroar's Avatar
          Incineroar Incineroar is online now
          the spirit of the fighter
          • Moderator
          • Platinum Tier
          • Developer
           
          Join Date: May 2009
          Location: Iki Town
          Age: 22
          Gender: Male
          Nature: Brave
          Posts: 13,338
          Quote:
          Originally Posted by arpeejajo View Post
          So my script has a givepokemon but when I get the Pokemon and press start, the Pokemon option is not there.

          Also, how do I get a script to activate only once?
          If I'm correct, the offset is 0x828, I'm sure of it. Also, to make a script activate once, use a checkflag and a setflag.
          __________________
            #2857    
          Old January 8th, 2010 (4:47 PM).
          arpeejajo's Avatar
          arpeejajo arpeejajo is offline
          King Of Muay Thai
             
            Join Date: Mar 2008
            Location: Woodbridge, ON
            Gender: Male
            Nature: Jolly
            Posts: 36
            How would I add it to my script?
              #2858    
            Old January 8th, 2010 (6:11 PM). Edited January 8th, 2010 by Incineroar.
            Incineroar's Avatar
            Incineroar Incineroar is online now
            the spirit of the fighter
            • Moderator
            • Platinum Tier
            • Developer
             
            Join Date: May 2009
            Location: Iki Town
            Age: 22
            Gender: Male
            Nature: Brave
            Posts: 13,338
            Quote:
            Originally Posted by arpeejajo View Post
            How would I add it to my script?
            Here's a sample script. I'm not sure where the offset for the POKEMON menu goes.

            Here's a basic talking script with a checkflag/setflag:
            Spoiler:
            #org $test
            lock
            checkflag 0x200
            if 0x01 goto $done
            message $test 1=This is a sample script. Understand?
            setflag 0x200
            release
            end

            #org $done
            $1 1 =I told you what this is? OK?
            release
            end

            There is also a third command called clearflag that checks for flag 0x200 in the sample script above and removes it, allowing the script to be activated again. It wouldn't be useful in some cases, but there are some practical uses for it.
            __________________
              #2859    
            Old January 8th, 2010 (6:25 PM).
            Shiny_Noctowl Shiny_Noctowl is offline
               
              Join Date: Dec 2008
              Age: 22
              Gender: Male
              Posts: 39
              With a scripted warp, is there any way to change the direction that the character is facing? Normally, the character is automatically facing down, regardless of the direction he was facing before.
                #2860    
              Old January 8th, 2010 (6:36 PM). Edited January 8th, 2010 by arpeejajo.
              arpeejajo's Avatar
              arpeejajo arpeejajo is offline
              King Of Muay Thai
                 
                Join Date: Mar 2008
                Location: Woodbridge, ON
                Gender: Male
                Nature: Jolly
                Posts: 36
                Quote:
                Originally Posted by Team Fail View Post
                Here's a sample script. I'm not sure where the offset for the POKEMON menu goes.

                Here's a basic talking script with a checkflag/setflag:
                Spoiler:
                #org $test
                lock
                checkflag 0x200
                if 0x01 goto $done
                message $test 1=This is a sample script. Understand?
                setflag 0x200
                release
                end

                #org $done
                $1 1 =I told you what this is? OK?
                release
                end

                There is also a third command called clearflag that checks for flag 0x200 in the sample script above and removes it, allowing the script to be activated again. It wouldn't be useful in some cases, but there are some practical uses for it.
                Thank you very much, that helped a lot and it worked perfectly.
                I also need to know how you call the 0x828 to my script and how to make a person disappear. Please and thank you.
                  #2861    
                Old January 8th, 2010 (7:23 PM).
                Incineroar's Avatar
                Incineroar Incineroar is online now
                the spirit of the fighter
                • Moderator
                • Platinum Tier
                • Developer
                 
                Join Date: May 2009
                Location: Iki Town
                Age: 22
                Gender: Male
                Nature: Brave
                Posts: 13,338
                Quote:
                Originally Posted by arpeejajo View Post
                Thank you very much, that helped a lot and it worked perfectly.
                I also need to know how you call the 0x828 to my script and how to make a person disappear. Please and thank you.
                I can't remember how to place in a flag, I'm figuring that out myself. As well, I don't know how to remove a sprite after you're done interacting with it. Check this AMAZING scripting thread, it may answer this and many more of your questions.
                HTML Code:
                http://www.pokecommunity.com/showthread.php?t=128887
                All credits go to thethethethe for the tutorial.
                __________________
                  #2862    
                Old January 8th, 2010 (7:46 PM).
                arpeejajo's Avatar
                arpeejajo arpeejajo is offline
                King Of Muay Thai
                   
                  Join Date: Mar 2008
                  Location: Woodbridge, ON
                  Gender: Male
                  Nature: Jolly
                  Posts: 36
                  Quote:
                  Originally Posted by Team Fail View Post
                  I can't remember how to place in a flag, I'm figuring that out myself. As well, I don't know how to remove a sprite after you're done interacting with it. Check this AMAZING scripting thread, it may answer this and many more of your questions.
                  HTML Code:
                  http://www.pokecommunity.com/showthread.php?t=128887
                  All credits go to thethethethe for the tutorial.
                  I cannot thank you enough. I got the Pokemenu to show, and I got the person to disappear. That tutorial is amazing.
                    #2863    
                  Old January 8th, 2010 (7:56 PM).
                  Quickster's Avatar
                  Quickster Quickster is offline
                  Dream or Drop?
                     
                    Join Date: Oct 2007
                    Gender: Male
                    Nature: Quiet
                    Posts: 351
                    Quote:
                    Originally Posted by arpeejajo View Post
                    I cannot thank you enough. I got the Pokemenu to show, and I got the person to disappear. That tutorial is amazing.
                    Just to let you know, diegoisawesome translated that tutorial to XSE. Its in the doucuments section.
                    __________________
                    I laugh looking at this.

                    But sometimes I want to come back to it...

                      #2864    
                    Old January 8th, 2010 (8:18 PM).
                    Incineroar's Avatar
                    Incineroar Incineroar is online now
                    the spirit of the fighter
                    • Moderator
                    • Platinum Tier
                    • Developer
                     
                    Join Date: May 2009
                    Location: Iki Town
                    Age: 22
                    Gender: Male
                    Nature: Brave
                    Posts: 13,338
                    Quote:
                    Originally Posted by arpeejajo View Post
                    I cannot thank you enough. I got the Pokemenu to show, and I got the person to disappear. That tutorial is amazing.
                    No problem. That's what I used to learn how to script. It is such a lifesaver for new scripters!
                    __________________
                      #2865    
                    Old January 8th, 2010 (8:34 PM). Edited January 9th, 2010 by trebornosliw.
                    trebornosliw's Avatar
                    trebornosliw trebornosliw is offline
                    Learning
                       
                      Join Date: Jul 2009
                      Age: 24
                      Gender: Male
                      Nature: Adamant
                      Posts: 523
                      So Special 0x8E is a must for all setmaptile scripts, then?
                      Also, thanks to NarutoActor for his explanation of the setmaptile level script, I was looking for a description of how to do that.

                      Update to my question. Here are the scripts I've made for an event on what used to be the Route 5 FR map. I'm just double-checking to make sure I didn't forget anything. The first script is the actual encounter, the second is my level script.

                      Spoiler:

                      #org @done1
                      checkflag 0x1012
                      if 0x1 goto @done2
                      msgbox @tele2 0x5
                      compare LASTRESULT 0x1
                      if 0x1 goto @warp2
                      msgbox @verywell 0x6
                      releaseall
                      end
                      #org @warp2
                      warp 1 81 0xFF 0x2F 0x1C
                      releaseall
                      end
                      #org @done2
                      releaseall
                      end
                      #org @huh
                      #raw 0x62 0xFE
                      #org @bii1
                      = [player], your path is not\nto be that way.\pI wish you to see something,\nsomething that has laid in\lsecrecy for a decade.\pFor some, it is a tragedy.\nFor you, [player], it is\la warning;\pa warning of the transcience\nof bliss and of the coming\lapocalypse.\p...Your partners are hurt,\nallow me to heal them, and\lthen I will show you[.]
                      #org @bii2
                      = And now, [player], I ask\nyou to see, and to understand.\pThis knowledge will serve\nyou well in your near future[.]\pCome[.]see, and understand[.]\n[.][.][.][.]
                      #org @tele2
                      = [player], do you wish to return\nto mankind's greatest vanity?
                      #org @verywell
                      = Very well[.]

                      Spoiler:

                      #dynamic 0x800000
                      #org @levelbii
                      #raw 0x1
                      #raw pointer @changemap
                      #raw 0x0
                      #org @changemap
                      compare 0x9001 0x1
                      if 0x1 goto @now
                      release
                      end
                      #org @now
                      setmaptile 0x2D 0x14 0x23 0x1
                      setmaptile 0x2D 0x13 0x1B 0x1
                      setmaptile 0x2D 0x12 0x13 0x0
                      return
                      __________________
                      Credit for my avatar goes to the Lego company.
                        #2866    
                      Old January 9th, 2010 (7:55 AM).
                      NarutoActor's Avatar
                      NarutoActor NarutoActor is offline
                      The rocks cry out to me
                      • Silver Tier
                       
                      Join Date: Jan 2009
                      Location: Brooklyn/Marlboro
                      Age: 23
                      Gender: Female
                      Nature: Bashful
                      Posts: 1,979
                      Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
                      add setvar 0x9001 0x1 to the first script after you want it to become perminate.
                      __________________
                      ~There are those people who understand hex, F the rest
                        #2867    
                      Old January 9th, 2010 (4:52 PM).
                      trebornosliw's Avatar
                      trebornosliw trebornosliw is offline
                      Learning
                         
                        Join Date: Jul 2009
                        Age: 24
                        Gender: Male
                        Nature: Adamant
                        Posts: 523
                        Oops, actually I forgot to include the first half of the script :\
                        Here it is
                        Spoiler:

                        #dynamic 0x800000
                        #org @teleport
                        lockall
                        compare 0x9001 0x1
                        if 0x1 goto @done1
                        setmaptile 0x2D 0x14 0x23 0x1
                        setmaptile 0x2D 0x13 0x1B 0x1
                        setmaptile 0x2D 0x12 0x13 0x0
                        special 0x8E
                        setvar 0x9001 0x1
                        applymovement 0xFF @huh
                        waitmovement 0x0
                        msgbox @bii1 0x6
                        fadescreen 0x1
                        special 0x0
                        fadescreen 0x0
                        msgbox @bii2 0x6
                        warp 1 81 0xFF 0x2F 0x1C
                        releaseall
                        end
                        #org @done1
                        checkflag 0x1012
                        if 0x1 goto @done2
                        msgbox @tele2 0x5
                        compare LASTRESULT 0x1
                        if 0x1 goto @warp2
                        msgbox @verywell 0x6
                        releaseall
                        end
                        #org @warp2
                        warp 1 81 0xFF 0x2F 0x1C
                        releaseall
                        end
                        #org @done2
                        releaseall
                        end
                        #org @huh
                        #raw 0x62 0xFE
                        #org @bii1
                        = [player], your path is not\nto be that way.\pI wish you to see something,\nsomething that has laid in\lsecrecy for a decade.\pFor some, it is a tragedy.\nFor you, [player], it is\la warning;\pa warning of the transcience\nof bliss and of the coming\lapocalypse.\p...Your partners are hurt,\nallow me to heal them, and\lthen I will show you...
                        #org @bii2
                        = And now, [player], I ask\nyou to see, and to understand.\pThis knowledge will serve\nyou well in your near future...\pCome...see, and remember...\n...................
                        #org @tele2
                        = [player], do you wish to return\nto mankind's greatest vanity?
                        #org @verywell
                        = Very well...
                        __________________
                        Credit for my avatar goes to the Lego company.
                          #2868    
                        Old January 9th, 2010 (4:55 PM).
                        NarutoActor's Avatar
                        NarutoActor NarutoActor is offline
                        The rocks cry out to me
                        • Silver Tier
                         
                        Join Date: Jan 2009
                        Location: Brooklyn/Marlboro
                        Age: 23
                        Gender: Female
                        Nature: Bashful
                        Posts: 1,979
                        Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
                        okay, so what's wrong with it.
                        __________________
                        ~There are those people who understand hex, F the rest
                          #2869    
                        Old January 9th, 2010 (7:38 PM).
                        Engimal Engimal is offline
                           
                          Join Date: Jan 2010
                          Gender: Male
                          Posts: 19
                          How do I get an offset from my code in PKSV?
                            #2870    
                          Old January 9th, 2010 (8:44 PM).
                          trebornosliw's Avatar
                          trebornosliw trebornosliw is offline
                          Learning
                             
                            Join Date: Jul 2009
                            Age: 24
                            Gender: Male
                            Nature: Adamant
                            Posts: 523
                            Quote:
                            Originally Posted by NarutoActor View Post
                            okay, so what's wrong with it.
                            Lol, well, that wasn't the question. Still, you've already told me what I wanted to know, I guess. I was just making sure I had it right. Thanks for your help!
                            @Enigma, do you mean, how do you find an offset to write it to, or how do you find the offset after you've inserted it?
                            __________________
                            Credit for my avatar goes to the Lego company.
                              #2871    
                            Old January 10th, 2010 (11:45 AM). Edited January 10th, 2010 by Quickster.
                            Quickster's Avatar
                            Quickster Quickster is offline
                            Dream or Drop?
                               
                              Join Date: Oct 2007
                              Gender: Male
                              Nature: Quiet
                              Posts: 351
                              This should be easy ebough to answer,but I dont know what Im doing wrong.
                              I give a person an id of 1001.
                              I set the flag in one script so hes not visible in the map he is in.
                              Next,in another map,I clear the flag 1001. He still is not visible.
                              I want him to be visible,so what do i do?

                              EDIT: I fixed this.-_-
                              I changed the flags from 1001 to 201.But for future refrences,why didnt this work with 1001?
                              __________________
                              I laugh looking at this.

                              But sometimes I want to come back to it...

                                #2872    
                              Old January 10th, 2010 (5:51 PM).
                              trebornosliw's Avatar
                              trebornosliw trebornosliw is offline
                              Learning
                                 
                                Join Date: Jul 2009
                                Age: 24
                                Gender: Male
                                Nature: Adamant
                                Posts: 523
                                Quote:
                                Originally Posted by Quickster View Post
                                This should be easy ebough to answer,but I dont know what Im doing wrong.
                                I give a person an id of 1001.
                                I set the flag in one script so hes not visible in the map he is in.
                                Next,in another map,I clear the flag 1001. He still is not visible.
                                I want him to be visible,so what do i do?

                                EDIT: I fixed this.
                                I changed the flags from 1001 to 201.But for future refrences,why didnt this work with 1001?
                                ...wow. How did you set the hideflag, exactly? I know that can be done, but I've never tried it before. Do I just type hidesprite 0x201, setflag 0x201 in a different map, or is it more complicated than that?
                                As for your question, I've heard that only specific flags can be used for that kind of hidesprite, but as you may have guessed, I'm not exactly an authority in this area.
                                __________________
                                Credit for my avatar goes to the Lego company.
                                  #2873    
                                Old January 10th, 2010 (6:01 PM).
                                Quickster's Avatar
                                Quickster Quickster is offline
                                Dream or Drop?
                                   
                                  Join Date: Oct 2007
                                  Gender: Male
                                  Nature: Quiet
                                  Posts: 351
                                  Quote:
                                  Originally Posted by trebornosliw View Post
                                  ...wow. How did you set the hideflag, exactly? I know that can be done, but I've never tried it before. Do I just type hidesprite 0x201, setflag 0x201 in a different map, or is it more complicated than that?
                                  As for your question, I've heard that only specific flags can be used for that kind of hidesprite, but as you may have guessed, I'm not exactly an authority in this area.
                                  Well,all I basically did was give a sprite a person id of 201. In a script I setflag 0x201.Its that simple. And if you were to hide a person in a script while in the map, you would hidesprite 0xwhatever and then setflag 0x201.
                                  __________________
                                  I laugh looking at this.

                                  But sometimes I want to come back to it...

                                    #2874    
                                  Old January 10th, 2010 (7:41 PM).
                                  NarutoActor's Avatar
                                  NarutoActor NarutoActor is offline
                                  The rocks cry out to me
                                  • Silver Tier
                                   
                                  Join Date: Jan 2009
                                  Location: Brooklyn/Marlboro
                                  Age: 23
                                  Gender: Female
                                  Nature: Bashful
                                  Posts: 1,979
                                  Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
                                  O.o Yeah hidesprites are super easy but I never tryed to un hide them But my guess is try adding the special that reloads the map. The one used for setmaptile.
                                  __________________
                                  ~There are those people who understand hex, F the rest
                                    #2875    
                                  Old January 10th, 2010 (8:41 PM).
                                  TB Pro's Avatar
                                  TB Pro TB Pro is offline
                                  Old-timer
                                     
                                    Join Date: Nov 2004
                                    Location: Midwestern USA
                                    Age: 22
                                    Gender: Male
                                    Posts: 2,739
                                    Quote:
                                    Originally Posted by Quickster View Post
                                    This should be easy ebough to answer,but I dont know what Im doing wrong.
                                    I give a person an id of 1001.
                                    I set the flag in one script so hes not visible in the map he is in.
                                    Next,in another map,I clear the flag 1001. He still is not visible.
                                    I want him to be visible,so what do i do?

                                    EDIT: I fixed this.
                                    I changed the flags from 1001 to 201.But for future refrences,why didnt this work with 1001?
                                    Showsprite 0x[people number]
                                    Clearflag 0x[ID no.]
                                    __________________
                                    --I'm a creepin'..
                                    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 10:22 AM.