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
  #8901    
Old October 19th, 2013 (11:03 PM).
ep!c ep!c is offline
Banned
     
    Join Date: Mar 2013
    Gender: Male
    Posts: 124
    You need to find the ASM-Routine, which runs the intro, and change something there..
    Doesn't fit into the Script-thread tho.

    Relevant Advertising!

      #8902    
    Old October 20th, 2013 (1:01 AM).
    Rezordaxx's Avatar
    Rezordaxx Rezordaxx is offline
    Asks many questions!
       
      Join Date: Aug 2013
      Location: The Netherlands
      Age: 18
      Gender: Male
      Nature: Relaxed
      Posts: 290
      Quote:
      Originally Posted by ep!c View Post
      You need to find the ASM-Routine, which runs the intro, and change something there..
      Doesn't fit into the Script-thread tho.
      I asked it several times in the simpel questions forum but i got no answer

      Could you pm me how to find a ASM routine or link me a tutorial cause i am new to ASM

      Thanks
      __________________

      My hack
        #8903    
      Old October 20th, 2013 (10:28 AM).
      Kaabii can't hack's Avatar
      Kaabii can't hack Kaabii can't hack is offline
         
        Join Date: Oct 2013
        Posts: 6
        Firered
        When i talk to the person the script runs though but when i re-enter the map he reappears, i have set his person Id on a-map to 0900

        Spoiler:
        #dynamic 0x800000

        #org @start
        lock
        faceplayer
        checkflag 0x900
        if 0x0 goto @main
        if 0x1 goto @nothere
        release
        end

        #org @main
        message @mess 0x2
        applymovement 0xFF @move1
        waitmovement 0x0
        applymovement 0x6 @move2
        waitmovement 0x0
        hidesprite 0x6
        setflag 0x900
        release
        end

        #org @nothere
        hidesprite 0x6
        release
        end

        #org @mess
        = I'm too old to go up there and\nsave that pokemon, [player] can you\lgo in my place and stop whats\lgoing on?\lMeet me in my house and i will\lgive you something to help you.

        #org @move1
        #raw 0x13
        #raw 0xFE

        #org @move2
        #raw 0x10
        #raw 0x10
        #raw 0x10
        #raw 0x10
        #raw 0x12
        #raw 0x12
        #raw 0x12
        #raw 0x12
        #raw 0x12
        #raw 0x12
        #raw 0x12
        #raw 0x12
        #raw 0xFE
          #8904    
        Old October 20th, 2013 (12:57 PM).
        awipe1's Avatar
        awipe1 awipe1 is offline
           
          Join Date: Aug 2012
          Gender: Male
          Posts: 215
          Quote:
          Originally Posted by Kaabii can't hack View Post
          Firered
          When i talk to the person the script runs though but when i re-enter the map he reappears, i have set his person Id on a-map to 0900

          Spoiler:
          #dynamic 0x800000

          #org @start
          lock
          faceplayer
          checkflag 0x900
          if 0x0 goto @main
          if 0x1 goto @nothere
          release
          end

          #org @main
          message @mess 0x2
          applymovement 0xFF @move1
          waitmovement 0x0
          applymovement 0x6 @move2
          waitmovement 0x0
          hidesprite 0x6
          setflag 0x900
          release
          end

          #org @nothere
          hidesprite 0x6
          release
          end

          #org @mess
          = I'm too old to go up there and\nsave that pokemon, [player] can you\lgo in my place and stop whats\lgoing on?\lMeet me in my house and i will\lgive you something to help you.

          #org @move1
          #raw 0x13
          #raw 0xFE

          #org @move2
          #raw 0x10
          #raw 0x10
          #raw 0x10
          #raw 0x10
          #raw 0x12
          #raw 0x12
          #raw 0x12
          #raw 0x12
          #raw 0x12
          #raw 0x12
          #raw 0x12
          #raw 0x12
          #raw 0xFE
          I think you should use a different flag, I think it will work if you use a different flag. Use flag 40 or something, but 900 is TOOO high. Use this as a guide to what flags you should be using: http://www.pokecommunity.com/showpost.php?p=6829256&postcount=158

          Also you don't need to check flag command. If flag 900 is already set, then you won't be able to see that sprite anyway. He will dissapear and you can't talk to him anymore. So you don't need that first checkflag command, just make it go straight to @main
          __________________
          Check out my Pokemon Rom! Click the Image Below!
            #8905    
          Old October 20th, 2013 (11:21 PM).
          AluminiumOxide's Avatar
          AluminiumOxide AluminiumOxide is offline
          Aka Ansirent
             
            Join Date: Sep 2013
            Location: India
            Gender: Male
            Nature: Gentle
            Posts: 874
            Quote:
            Originally Posted by ep!c View Post
            @Rhytham:

            Hey dude, making callstd 0x5 pop ups a Yes/No-box.
            But you cant just make a message, then callstd 5 and its fine..
            You need to compare, whether you answered Yes or No.
            This works like that:

            msgbox @blabla
            callstd 0x5
            compare LASTRESULT 0x1
            if 0x1 call @yes
            if 0x0 call @no

            #org @yes
            ... do something

            #org @no
            ... do something

            @up

            The command is "closeonkeypress" and not "closeonpresskey"
            sorry but i didn't even understand a word

            what is @up and you didn't wrote Closeonkeypress in the script and ahh... Please write a script then give me the example i mean don't use etc blabla or ...do something give me a real example thax and sorry
            __________________

            My Club |Paired With IndianCharizard |
            "I CAN'T LET YOU TOUCH MY FAMILY!!!!!"

              #8906    
            Old October 21st, 2013 (1:39 AM).
            mf91 mf91 is offline
               
              Join Date: Sep 2013
              Posts: 30
              Does anyone know where I can find - or how I can edit the scripts for entering the Regi caves?

              - Or how a new such script can be made for a new cave?
                #8907    
              Old October 21st, 2013 (2:08 AM).
              ep!c ep!c is offline
              Banned
                 
                Join Date: Mar 2013
                Gender: Male
                Posts: 124
                A "levelscript" decides, whether the cave is opened or not.
                As soon as specific conditions are fulfilled, the script calls a setmaptile-command
                or something and the cave is opened
                  #8908    
                Old October 21st, 2013 (3:05 AM).
                mf91 mf91 is offline
                   
                  Join Date: Sep 2013
                  Posts: 30
                  Ow right, "levelscript".. What would I have to do to make "my own" regi chamber? I want the player to have certain Unown pokemon in his team (pretty much like what you have to do to open the caves in the first place). If I could just open the R/S/E script on this chamber, I ithink I could manage to make my own.. But I dont know where to find it. Advance Map have no scripts in this map.
                    #8909    
                  Old October 21st, 2013 (6:05 AM).
                  AluminiumOxide's Avatar
                  AluminiumOxide AluminiumOxide is offline
                  Aka Ansirent
                     
                    Join Date: Sep 2013
                    Location: India
                    Gender: Male
                    Nature: Gentle
                    Posts: 874
                    Anyone ?????? please help me please !! Epic the post your write i didn't understand correctly (Apologise for some junk of problem solution i ask )
                    __________________

                    My Club |Paired With IndianCharizard |
                    "I CAN'T LET YOU TOUCH MY FAMILY!!!!!"

                      #8910    
                    Old October 21st, 2013 (6:14 AM).
                    ep!c ep!c is offline
                    Banned
                       
                      Join Date: Mar 2013
                      Gender: Male
                      Posts: 124
                      Dude, in fact this isnt a thread to request script.
                      But as it may help you to understand the YES/NO box, I write an example.

                      Code:
                      #dynamic 0x800000
                      #org @start
                      lock
                      faceplayer
                      msgbox @ask
                      callstd 0x5
                      compare LASTRESULT 0x1
                      if 0x1 call @yes
                      msgbox @gotnot
                      callstd 0x6
                      release
                      end
                      
                      #org @yes
                      msgbox @got
                      callstd 0x6
                      release
                      end
                      
                      #org @ask
                      = Do you have a Pokémon?
                      
                      #org @gotnot
                      = A pity you don't have one!
                      
                      #org @got
                      = It's nice to have a Pokémon!
                      If you have a YES/NO box, you must CHECK whether you answered YES or NO.
                      You do that with:

                      COMPARE LASTRESULT 0x1
                      IF 0x1 CALL @POINTER

                      Then you make another textbox which gives the player an answer to his choice.

                      Edit: That closeonkeypress doesnt matter to you. I wrote that to another person!
                      Edit2: @Kurapika: That wasnt meant to be for Rhytham but for mf91
                        #8911    
                      Old October 21st, 2013 (6:16 AM).
                      Kurapika's Avatar
                      Kurapika Kurapika is offline
                      Grudgebearer
                         
                        Join Date: Feb 2013
                        Location: Lavendar Town - Morocco
                        Gender: Male
                        Nature: Naughty
                        Posts: 406
                        Rhytham, if youwant to know what he meant by Level Script and setmaptile command, refer to dieagoisawesome's MEGA HUGE XSE scripting tutorial in the Tutorials forum.
                        __________________
                          #8912    
                        Old October 21st, 2013 (6:25 AM).
                        mf91 mf91 is offline
                           
                          Join Date: Sep 2013
                          Posts: 30
                          Quote:
                          Originally Posted by Kurapika View Post
                          Rhytham, if youwant to know what he meant by Level Script and setmaptile command, refer to dieagoisawesome's MEGA HUGE XSE scripting tutorial in the Tutorials forum.
                          That was probably ment for me. I will do that, thanks
                            #8913    
                          Old October 21st, 2013 (10:02 AM).
                          Edward Newgate's Avatar
                          Edward Newgate Edward Newgate is offline
                          Everyone is a child of the sea
                          • Crystal Tier
                           
                          Join Date: Jun 2011
                          Location: The Netherlands
                          Age: 21
                          Gender: Male
                          Nature: Relaxed
                          Posts: 274
                          Okay, so I am screwing around with level scripts, since these for some reason never worked for me..

                          I got this now:
                          Spoiler:
                          Code:
                          #dynamic 0x840000
                          
                          #org @start
                          setvar 0x4050 0x1
                          msgbox @hey
                          callstd 0x6
                          applymovement 0x3 @walk
                          waitmovement 0x0
                          msgbox @nopoke
                          callstd 0x6
                          applymovement 0x3 @wait
                          waitmovement 0x0
                          msgbox @want
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 gosub @why
                          msgbox @knew
                          callstd 0x6
                          fanfare 0x13E
                          givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
                          msgbox @receive
                          callstd 0x6
                          waitfanfare
                          msgbox @travel
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 gosub @why2
                          msgbox @thanks
                          callstd 0x6
                          closeonkeypress
                          applymovement 0x3 @walkaway
                          waitmovement 0x0
                          release
                          end
                          
                          #org @why
                          msgbox @aww
                          callstd 0x6
                          msgbox @want
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 goto @why
                          return
                          end
                          
                          #org @why2
                          msgbox @aww2
                          callstd 0x6
                          msgbox @travel
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 goto @why2
                          return
                          end
                          
                          #org @walk
                          #raw 0x61
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0x12
                          #raw 0xFE
                          
                          #org @wait
                          #raw 0x62
                          #raw 0xFE
                          
                          #org @walkaway
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x10
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x13
                          #raw 0x11
                          #raw 0x11
                          #raw 0x60
                          #raw 0xFE
                          
                          #org @hey
                          = HEY! WAIT UP!
                          
                          #org @nopoke
                          = Oak: I see you don't have a pokèmon\nyet!\pI am in need of a trainer, willing\lto help me.\punfortunately, I can't find one...
                          
                          #org @want
                          = Oak: Wait! You are 12, right?\nGood, good...\pSay, do you want a pokèmon?
                          
                          #org @aww
                          = Oak: Oh.. You don't?\nYou sure?\pC'mon!
                          
                          #org @knew
                          = Oak: Hah! I knew it!\pGood!, here you go!
                          
                          #org @receive
                          = [player] Received a pokèmon!
                          
                          #org @travel
                          = Oak: Ok. So, can you do me a favor?\pI'm in need of a special item at\nthe Pokèmon Mart. Can you get it\lfor me?
                          
                          #org @aww2
                          = Oak: C'mon, don't spoil it.
                          
                          #org @thanks
                          = Oak: Thank you very much!\pCome see me in my lab when you have\nthe item.


                          And I put it in the level script thing as this:
                          Spoiler:


                          When the script finishes, this comes up (I know this is in lots of tutorials, but this isn't my problem yet):
                          Spoiler:


                          The problem is this:
                          In all the tutorials i've read so far (which includes the popular ones, like Thethethethe's and Diegoisawesome's tutorials) they said that when I go to advanced map header > map script offset,
                          and paste that offset in XSE, and enable the level script button, it should come up with #raw word 0xFFFF.
                          The problem is that it's not. There's a perfectly normal #raw word 0x0 like there's supposed to be.
                          (This is the whole thing):
                          Spoiler:
                          Code:
                          '-----------------------
                          #org 0x71A24C
                          #raw 02
                          #raw pointer 0x871A252
                          #raw 00
                          
                          '-----------------------
                          #org 0x71A252
                          #raw word 0x4050
                          #raw word 0x0
                          #raw pointer 0x8840000
                          #raw word 0x0 => It's not 0xFFFF, just 0x0
                          
                          '-----------------------
                          #org 0x840000
                          msgbox 0x88400E9 '"HEY! WAIT UP!"
                          callstd 0x6
                          applymovement 0x3 0x88400C4
                          waitmovement 0x0
                          msgbox 0x88400F8 '"Oak: I see you don't have a pokèmon..."
                          callstd 0x6
                          applymovement 0x3 0x88400D2
                          waitmovement 0x0
                          msgbox 0x8840178 '"Oak: Wait! You are 12, right?\nGood..."
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 call 0x8840088
                          msgbox 0x88401EC '"Oak: Hah! I knew it!\pGood!, here y..."
                          callstd 0x6
                          fanfare 0x13E
                          givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
                          msgbox 0x8840217 '"[player] Received a pokèmon!"
                          callstd 0x6
                          waitfanfare
                          msgbox 0x8840235 '"Oak: Ok. So, can you do me a favor?..."
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 call 0x88400A6
                          msgbox 0x88402C4 '"Oak: Thank you very much!\pCome see..."
                          callstd 0x6
                          closeonkeypress
                          applymovement 0x3 0x88400D5
                          waitmovement 0x0
                          setvar 0x4050 0x1
                          release
                          end
                          
                          '-----------------------
                          #org 0x840088
                          msgbox 0x88401C3 '"Oak: Oh.. You don't?\nYou sure?\pC'..."
                          callstd 0x6
                          msgbox 0x8840178 '"Oak: Wait! You are 12, right?\nGood..."
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 goto 0x8840088
                          return
                          
                          '-----------------------
                          #org 0x8400A6
                          msgbox 0x88402A7 '"Oak: C'mon, don't spoil it."
                          callstd 0x6
                          msgbox 0x8840235 '"Oak: Ok. So, can you do me a favor?..."
                          callstd 0x5
                          compare LASTRESULT 0x0
                          if 0x1 goto 0x88400A6
                          return
                          
                          
                          '-----------
                          ' Movements
                          '-----------
                          #org 0x8400C4
                          #raw 61 'Show
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 12 'Step Left (Normal)
                          #raw 12 'Step Left (Normal)
                          #raw 12 'Step Left (Normal)
                          #raw 12 'Step Left (Normal)
                          #raw FE 'End of Movements
                          
                          #org 0x8400D2
                          #raw 62 'Exclamation Mark (!)
                          #raw FE 'End of Movements
                          
                          #org 0x8400D5
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 10 'Step Down (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 13 'Step Right (Normal)
                          #raw 11 'Step Up (Normal)
                          #raw 11 'Step Up (Normal)
                          #raw 60 'Hide
                          #raw FE 'End of Movements
                          
                          
                          '---------
                          ' Strings
                          '---------
                          #org 0x8400E9
                          = HEY! WAIT UP!
                          
                          #org 0x8400F8
                          = Oak: I see you don't have a pokèmon\nyet!\pI am in need of a trainer, willing\lto help me.\punfortunately, I can't find one...
                          
                          #org 0x840178
                          = Oak: Wait! You are 12, right?\nGood, good...\pSay, do you want a pokèmon?
                          
                          #org 0x8401EC
                          = Oak: Hah! I knew it!\pGood!, here you go!
                          
                          #org 0x840217
                          = [player] Received a pokèmon!
                          
                          #org 0x840235
                          = Oak: Ok. So, can you do me a favor?\pI'm in need of a special item at\nthe Pokèmon Mart. Can you get it\lfor me?
                          
                          #org 0x8402C4
                          = Oak: Thank you very much!\pCome see me in my lab when you have\nthe item.
                          
                          #org 0x8401C3
                          = Oak: Oh.. You don't?\nYou sure?\pC'mon!
                          
                          #org 0x8402A7
                          = Oak: C'mon, don't spoil it.


                          See my problem? it shows up as the glitchy 0xFFFF error, but the #raw word is just 0x0 like it's supposed to be...

                          I really hope somebody can help me with this, since it's kinda getting annoying, not knowing what the solution is since i'm still a rookie at scripting.

                          Thanks in advance,
                          Mr.Alpha
                          __________________
                          This signature has been disabled.
                          Exceeds signature height limit
                          Please review and fix the issues by reading the signature rules.

                          You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                          Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                            #8914    
                          Old October 21st, 2013 (10:07 AM).
                          ep!c ep!c is offline
                          Banned
                             
                            Join Date: Mar 2013
                            Gender: Male
                            Posts: 124
                            hey, no need to worry.
                            You just need to re-compile it.
                            Means you decompile the script, press this levelscript-button, and
                            then the gear again
                              #8915    
                            Old October 21st, 2013 (10:16 AM).
                            Kaabii can't hack's Avatar
                            Kaabii can't hack Kaabii can't hack is offline
                               
                              Join Date: Oct 2013
                              Posts: 6
                              Me again
                              Game firered, using JPANs hacked engine
                              Spoiler:
                              #org @start
                              lock
                              faceplayer
                              checkflag 0x828
                              if 0x0 goto @none
                              if 0x1 goto @heal
                              release
                              end

                              #org @none
                              msgbox @mess 0x2
                              sethealingplace 0x1
                              setvar 0x405a 0x402
                              setvar 0x405B 0x8
                              setvar 0x405C 0x5
                              release
                              end

                              #org @heal
                              msgbox @mess2 0x2
                              fanfare 0x100
                              special 0x0
                              waitfanfare
                              fadescreen 0x0
                              msgbox @mess3 0x2
                              sethealingplace 0x1
                              setvar 0x405a 0x402
                              setvar 0x405B 0x8
                              setvar 0x405C 0x5
                              release
                              end



                              #org @mess
                              = Have fun on your adventure.

                              #org @mess2
                              = Your pokemon seem to be hurt\nI'll heal them quickly.

                              #org @mess3
                              = There, your pokemon are happy and\nhealthy.


                              It heals fine, but when i faint in the wild i don't get teleported back here but instead end up at different locations such as the link cable place.
                              Am i missing something important or what?
                                #8916    
                              Old October 21st, 2013 (11:11 AM).
                              ep!c ep!c is offline
                              Banned
                                 
                                Join Date: Mar 2013
                                Gender: Male
                                Posts: 124
                                sethealingplace must be set in a level-script, not at joy's script.
                                  #8917    
                                Old October 21st, 2013 (11:18 AM).
                                Kaabii can't hack's Avatar
                                Kaabii can't hack Kaabii can't hack is offline
                                   
                                  Join Date: Oct 2013
                                  Posts: 6
                                  Quote:
                                  Originally Posted by ep!c View Post
                                  sethealingplace must be set in a level-script, not at joy's script.
                                  Oh okay that makes sense
                                  Would i use setvar in that? I'm not too familiar with level scripts

                                  Or would it just be

                                  Spoiler:
                                  #org @start
                                  sethealingplace 0x1
                                  setvar 0x405a 0x402
                                  setvar 0x405B 0x8
                                  setvar 0x405C 0x5
                                  release
                                  end
                                    #8918    
                                  Old October 21st, 2013 (8:17 PM).
                                  ep!c ep!c is offline
                                  Banned
                                     
                                    Join Date: Mar 2013
                                    Gender: Male
                                    Posts: 124
                                    No no, you need to set a [03]-type-levelscript.
                                    The script is simply:

                                    Code:
                                    #org @start
                                    sethealingplace 0xXY
                                    end
                                      #8919    
                                    Old October 21st, 2013 (10:01 PM).
                                    AluminiumOxide's Avatar
                                    AluminiumOxide AluminiumOxide is offline
                                    Aka Ansirent
                                       
                                      Join Date: Sep 2013
                                      Location: India
                                      Gender: Male
                                      Nature: Gentle
                                      Posts: 874
                                      Thanks Epic and Kurapika for both of your suggestion And epic i apologies for any wrong thing happen
                                      __________________

                                      My Club |Paired With IndianCharizard |
                                      "I CAN'T LET YOU TOUCH MY FAMILY!!!!!"

                                        #8920    
                                      Old October 21st, 2013 (11:08 PM).
                                      surfer treecko surfer treecko is offline
                                      help, how do I...?
                                         
                                        Join Date: Aug 2012
                                        Posts: 21
                                        Spoiler:
                                        '---------------
                                        #dynamic 0x800000
                                        #org @start
                                        showmoney 0x00 0x00 0x00
                                        msgbox @question 0x5
                                        compare LASTRESULT 0x1
                                        if 0x1 goto @PC
                                        if 0x0 goto @back
                                        end

                                        #org @question
                                        = Would you like to use the PC?\nIt costs \hB7850.

                                        #org @back
                                        applymovement 0xFF @moveback
                                        waitmovement 0x0
                                        hidemoney 0x00 0x00
                                        end

                                        #org @PC
                                        checkmoney 0x352 0x00
                                        compare 0x800D 0x1
                                        if 0x4 goto @continue
                                        msgbox @notenough 0x2
                                        goto @back
                                        end

                                        #org @continue
                                        paymoney 0x352 0x00
                                        hidemoney 0x00 0x00

                                        #org @notenough
                                        = You don't have enough money...

                                        #org @moveback
                                        #raw 0xC
                                        #raw 0xFE


                                        This rather hastily made script doesn't work. What it's supposed to do is bring up a textbox asking if you want to pay if you step on a tile in front of a PC, taking money from you if you say yes and forcing you backwards if you say no or don't have enough. However when you say yes it just brings up the money prompt again, and if you say no the textboxes act weird.


                                        If you say no this happens until you talk to someone or leave.


                                        Not having enough money also causes the box displaying your money to act weirdly
                                          #8921    
                                        Old October 22nd, 2013 (2:36 AM).
                                        ep!c ep!c is offline
                                        Banned
                                           
                                          Join Date: Mar 2013
                                          Gender: Male
                                          Posts: 124
                                          Try this

                                          Code:
                                            '---------------
                                          #dynamic 0x800000
                                          #org @start
                                          showmoney 0x00 0x00 0x00
                                          msgbox @question 0x5
                                          compare LASTRESULT 0x1
                                          if 0x1 goto @PC
                                          if 0x0 goto @back
                                          end
                                          
                                          #org @question
                                          = Would you like to use the PC?\nIt costs \hB7850.
                                          
                                          #org @back
                                          hidemoney 0x00 0x00 '--- moved it before applymovement
                                          applymovement 0xFF @moveback
                                          waitmovement 0x0
                                          end
                                          
                                          #org @PC
                                          checkmoney 0x352 0x00 '--- removed the compare LASTRESULT, as its not needed.
                                          if 0x4 goto @continue
                                          msgbox @notenough 0x6 '-- changed to 0x6 as it might bug -> "0x2 = lock + faceplayer + 0x6"
                                          goto @back
                                          end
                                          
                                          #org @continue
                                          paymoney 0x352 0x00
                                          hidemoney 0x00 0x00
                                          end '-- added end
                                          
                                          #org @notenough
                                          = You don't have enough money...
                                          
                                          #org @moveback
                                          #raw 0xC
                                          #raw 0xFE
                                          I would also strongly recommend you adding a temporary variable such as 0x8000 to the script.
                                          It resets at every map-load:

                                          1. it bugs less
                                          2. its better if you leave the field accidently, you musnt pay again.
                                            #8922    
                                          Old October 22nd, 2013 (4:34 AM).
                                          Kurapika's Avatar
                                          Kurapika Kurapika is offline
                                          Grudgebearer
                                             
                                            Join Date: Feb 2013
                                            Location: Lavendar Town - Morocco
                                            Gender: Male
                                            Nature: Naughty
                                            Posts: 406
                                            @surfer treecko, first I advice you use a signpost script on the PC instead of a walking script.
                                            secondly, the @continue part lacks the calls and special that boot the PC as well as the End command.
                                            Also, do by ep!c's advice and use a temporary variable that will be used so that the player won't pay again if he didn't leave the PokéCenter.

                                            Here, I'll share with you the code I'm using in my hack, it is cmplete:
                                            Spoiler:

                                            Code:
                                            '---------------
                                            #org @main
                                            lockall
                                            checkflag 0x841
                                            if 0x1 goto @noservices
                                            setvar 0x8004 0x1B
                                            special 0x17D
                                            setvar 0x8004 0x0
                                            special 0xD6
                                            sound 0x4
                                            msgbox @msgbooted MSG_SIGN '"[darknavyblue_fr][player][black_fr..."
                                            compare 0x4001 0xFC
                                            if 0x0 goto @moneycheck
                                            goto @PC
                                            
                                            '---------------
                                            #org @noservices
                                            msgbox @msgnoservicez MSG_NORMAL '"The usual PC services are\nnot ava..."
                                            releaseall
                                            end
                                            
                                            '---------------
                                            #org @moneycheck
                                            showmoney 0x0 0x0 0x0
                                            msgbox @msgpay MSG_YESNO '"Pay [$]30 to access this service?"
                                            closeonkeypress
                                            compare LASTRESULT 0x1
                                            if 0x1 goto @yespay
                                            hidemoney 0x0 0x0
                                            goto @exit
                                            
                                            '---------------
                                            #org @PC
                                            setvar 0x4001 0xFC
                                            goto 0x81A6998
                                            
                                            '---------------
                                            #org @yespay
                                            checkmoney 0x1E 0x0
                                            compare LASTRESULT 0x1
                                            if 0x4 call @payed
                                            msgbox @msgnotenough MSG_NORMAL '"[lightgreen_fr]Error[black_fr]: Ac..."
                                            hidemoney 0x0 0x0
                                            goto @exit
                                            
                                            '---------------
                                            #org @exit
                                            setvar 0x8004 0x0
                                            sound 0x3
                                            special 0xD7
                                            special 0x190
                                            releaseall
                                            end
                                            
                                            '---------------
                                            #org 0x1A6998
                                            preparemsg 0x81A508A '"Which PC should be accessed?"
                                            waitmsg
                                            special 0x106
                                            waitstate
                                            goto 0x81A69A8
                                            
                                            '---------------
                                            #org @payed
                                            hidemoney 0x0 0x0
                                            paymoney 0x1E 0x0
                                            showmoney 0x0 0x0 0x0
                                            msgbox @msgpayed MSG_SIGN '"[darknavyblue_fr][player][black_fr..."
                                            goto @PC
                                            
                                            '---------------
                                            #org 0x1A69A8
                                            copyvar 0x8000 LASTRESULT
                                            compare 0x8000 0x0
                                            if 0x1 goto 0x81A6A05
                                            compare 0x8000 0x1
                                            if 0x1 goto 0x81A69F0
                                            compare 0x8000 0x2
                                            if 0x1 goto 0x81A6A7A
                                            compare 0x8000 0x3
                                            if 0x1 goto 0x81A6A56
                                            compare 0x8000 0x4
                                            if 0x1 goto 0x81A6A46
                                            compare 0x8000 0x7F
                                            if 0x1 goto 0x81A6A46
                                            end
                                            
                                            '---------------
                                            #org 0x1A6A05
                                            sound 0x2
                                            checkflag 0x834
                                            if 0x0 call 0x81A6A34
                                            checkflag 0x834
                                            if 0x1 call 0x81A6A3D
                                            msgbox 0x81A50BE MSG_KEEPOPEN '"Pokémon Storage System opened."
                                            special 0x3C
                                            waitstate
                                            setvar 0x8004 0x1B
                                            special 0x17D
                                            goto 0x81A6998
                                            
                                            '---------------
                                            #org 0x1A69F0
                                            sound 0x2
                                            msgbox 0x81A50DD MSG_KEEPOPEN '"Accessed [player]'s PC."
                                            special 0xFA
                                            waitstate
                                            goto 0x81A6998
                                            
                                            '---------------
                                            #org 0x1A6A7A
                                            checkflag 0x829
                                            if 0x0 goto 0x81A6A46
                                            sound 0x2
                                            msgbox 0x81A5BC6 MSG_KEEPOPEN '"Accessed Prof. Oak's PC[.]\pAccess..."
                                            msgbox 0x81A5C03 MSG_YESNO '"Would you like to have your\nPokéd..."
                                            compare LASTRESULT 0x0
                                            if 0x1 goto 0x81A6AB2
                                            setflag 0x2FF
                                            call 0x81A73E0
                                            clearflag 0x2FF
                                            goto 0x81A6AB2
                                            
                                            '---------------
                                            #org 0x1A6A56
                                            checkflag 0x82C
                                            if 0x0 goto 0x81A6A46
                                            sound 0x2
                                            setvar 0x8004 0x1F
                                            special 0x17E
                                            special 0x17D
                                            special 0x107
                                            waitstate
                                            special 0x17F
                                            goto 0x81A69A8
                                            
                                            '---------------
                                            #org 0x1A6A34
                                            msgbox 0x81A50A7 MSG_KEEPOPEN '"Accessed Someone's PC."
                                            return
                                            
                                            '---------------
                                            #org 0x1A6A3D
                                            msgbox 0x81A50EF MSG_KEEPOPEN '"Accessed Bill's PC."
                                            return
                                            
                                            '---------------
                                            #org 0x1A6AB2
                                            msgbox 0x81A5C2E MSG_KEEPOPEN '"Closed link to Prof. Oak's PC."
                                            goto 0x81A6998
                                            
                                            '---------------
                                            #org 0x1A73E0
                                            waitmsg
                                            yesnobox 0x14 0x8
                                            return
                                            
                                            
                                            '---------
                                            ' Strings
                                            '---------
                                            #org @msgbooted
                                            = [darknavyblue_fr][player][black_fr] booted up the PC.
                                            
                                            #org @msgnoservices
                                            = The usual PC services are\nnot available[.]
                                            
                                            #org @msgpay
                                            = Pay [$]30 to access this service?
                                            
                                            #org @msgnotenough
                                            = [lightgreen_fr]Error[black_fr]: Action aborted.\nReason: Not enough money.
                                            
                                            #org 0x1A508A
                                            = Which PC should be accessed?
                                            
                                            #org @msgpayed
                                            = [darknavyblue_fr][player][black_fr] payed [$]30.
                                            
                                            #org 0x1A50BE
                                            = Pokémon Storage System opened.
                                            
                                            #org 0x1A50DD
                                            = Accessed [player]'s PC.
                                            
                                            #org 0x1A5BC6
                                            = Accessed Prof. Oak's PC[.]\pAccessed the Pokédex Rating\nSystem[.]
                                            
                                            #org 0x1A5C03
                                            = Would you like to have your\nPokédex rated?
                                            
                                            #org 0x1A50A7
                                            = Accessed Someone's PC.
                                            
                                            #org 0x1A50EF
                                            = Accessed Bill's PC.
                                            
                                            #org 0x1A5C2E
                                            = Closed link to Prof. Oak's PC.

                                            I am using the variable 0x4001 as the temporary variable (variable 0x8000, 0x8004, and 0x800D are already used by the original PC script).
                                            I am using a level script of the 03 (On entering map/not on menu close [03]) in the Pokémon Center, this level script simply sets my temporary variable to 0x0.
                                            Code:
                                            setvar 0x4001 0x0
                                            release
                                            end
                                            If the player payed the variable is set to 0xFC (I could simply set it to 0x1, or even use a temporary flag instead of a variable)
                                            __________________
                                              #8923    
                                            Old October 22nd, 2013 (12:38 PM).
                                            Electrobuzz334 Electrobuzz334 is offline
                                               
                                              Join Date: Aug 2013
                                              Gender: Male
                                              Posts: 5
                                              Okay so I'm trying to script an event where someone sees you then checks for a flag and if you have the flag you can go through but if you don't you can't. I had it working except you could just walk right past him(i.e. he didn't see you and stop you you had to talk to him) but then I wanted to make sure it would work if you had the flag so I put someone in to give it to you and from then on he thought you always had the flag even if you didn't. How do I fix it?
                                                #8924    
                                              Old October 22nd, 2013 (3:00 PM).
                                              Kurapika's Avatar
                                              Kurapika Kurapika is offline
                                              Grudgebearer
                                                 
                                                Join Date: Feb 2013
                                                Location: Lavendar Town - Morocco
                                                Gender: Male
                                                Nature: Naughty
                                                Posts: 406
                                                @Electrobuzz334, I don't quite understand your problem.
                                                You're apparently putting the script in the person, you should make a walking script or several walking scripts (depending on your map), in order to make someone "see" you like people "see" you when they want to battle you.
                                                Also, some screenshots and your script will help us assit you better.
                                                __________________
                                                  #8925    
                                                Old October 24th, 2013 (5:27 AM).
                                                TheUltimateG.J's Avatar
                                                TheUltimateG.J TheUltimateG.J is offline
                                                   
                                                  Join Date: Oct 2011
                                                  Location: Bihar,Darbhanga
                                                  Age: 18
                                                  Gender: Male
                                                  Nature: Jolly
                                                  Posts: 105
                                                  hey i have made this script whts the problem with it?

                                                  '---------------
                                                  #org 0x8012B6
                                                  lock
                                                  faceplayer
                                                  checkflag 0x828
                                                  if 0x1 goto 0x88013CF
                                                  msgbox 0x88013E7 MSG_YESNO '"DAD: So [player] are you going to ..."
                                                  compare LASTRESULT 0x1
                                                  if 0x1 goto 0x88012E1
                                                  compare LASTRESULT 0x0
                                                  if 0x1 goto 0x880133A
                                                  end

                                                  '---------------
                                                  #org 0x8013CF
                                                  msgbox 0x88015A7 MSG_NORMAL '"DAD: [player],best of luck my son...."
                                                  applymovement 0x1 0x8801613
                                                  waitmovement 0x0
                                                  setflag 0x8C6
                                                  release
                                                  end

                                                  '---------------
                                                  #org 0x8012E1
                                                  applymovement 0x2 0x8801609
                                                  waitmovement 0x0
                                                  hidesprite 0x3
                                                  setflag 0x8C5
                                                  applymovement 0x2 0x880160E
                                                  waitmovement 0x0
                                                  givepokemon 0x11 0xA 0xD2 0x0 0x0 0x0
                                                  fanfare 0x13E
                                                  msgbox 0x88014C3 MSG_KEEPOPEN '"[player] received a Pidgeotto\nfro..."
                                                  waitfanfare
                                                  setflag 0x828
                                                  msgbox 0x88014E8 MSG_YESNO '"Would you like to give your\nPokém..."
                                                  compare LASTRESULT 0x1
                                                  if 0x1 goto 0x88013A5
                                                  compare LASTRESULT 0x0
                                                  if 0x1 goto 0x88013BD
                                                  end

                                                  '---------------
                                                  #org 0x80133A
                                                  msgbox 0x8801419 MSG_NORMAL '"DAD: Oh,I see you must be kidding\..."
                                                  applymovement 0x1 0x8801606
                                                  waitmovement 0x0
                                                  applymovement 0x2 0x8801609
                                                  waitmovement 0x0
                                                  hidesprite 0x3
                                                  setflag 0x8C5
                                                  applymovement 0x2 0x880160E
                                                  waitmovement 0x0
                                                  givepokemon 0x11 0xA 0xD2 0x0 0x0 0x0
                                                  fanfare 0x13E
                                                  msgbox 0x88014C3 MSG_KEEPOPEN '"[player] received a Pidgeotto\nfro..."
                                                  waitfanfare
                                                  setflag 0x828
                                                  msgbox 0x88014E8 MSG_YESNO '"Would you like to give your\nPokém..."
                                                  compare LASTRESULT 0x1
                                                  if 0x1 goto 0x88013A5
                                                  compare LASTRESULT 0x0
                                                  if 0x1 goto 0x88013BD
                                                  end

                                                  '---------------
                                                  #org 0x8013A5
                                                  setvar 0x8004 0x0
                                                  call 0x88013B5
                                                  goto 0x88013C4

                                                  '---------------
                                                  #org 0x8013BD
                                                  closeonkeypress
                                                  goto 0x88013C4

                                                  '---------------
                                                  #org 0x8013B5
                                                  fadescreen 0x1
                                                  special 0x9E
                                                  waitstate
                                                  return

                                                  '---------------
                                                  #org 0x8013C4
                                                  msgbox 0x880151D MSG_NORMAL '"DAD: Please take care of this\ndoc..."
                                                  release
                                                  end


                                                  '---------
                                                  ' Strings
                                                  '---------
                                                  #org 0x8013E7
                                                  = DAD: So [player] are you going to start\nyour journey?

                                                  #org 0x8015A7
                                                  = DAD: [player],best of luck my son.I have\nto go to Saffron city due to some\limportant work.Bye now!

                                                  #org 0x8014C3
                                                  = [player] received a Pidgeotto\nfrom DAD.\l

                                                  #org 0x8014E8
                                                  = Would you like to give your\nPokémon a nickname?

                                                  #org 0x801419
                                                  = DAD: Oh,I see you must be kidding\nam I right? This is the best day\lin any trainer's life.SO,I have\lsomething for you.Cubone can you\lbring the pokeball?\lpresent there?\l

                                                  #org 0x80151D
                                                  = DAD: Please take care of this\ndocile Pidgeotto I have caught and\ltrained it till the time it was a\lPidgey just for this auspicious\lday.


                                                  '-----------
                                                  ' Movements
                                                  '-----------
                                                  #org 0x801613
                                                  #raw 0x12 'Step Left (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #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 0x60 'Hide
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0xFE 'End of Movements

                                                  #org 0x801609
                                                  #raw 0x11 'Step Up (Normal)
                                                  #raw 0x11 'Step Up (Normal)
                                                  #raw 0x13 'Step Right (Normal)
                                                  #raw 0xFE 'End of Movements

                                                  #org 0x80160E
                                                  #raw 0x12 'Step Left (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0x10 'Step Down (Normal)
                                                  #raw 0xFE 'End of Movements

                                                  #org 0x801606
                                                  #raw 0x62 'Exclamation Mark (!)
                                                  #raw 0xFE 'End of Movements
                                                  __________________


                                                  A lover of Pokemon and their Hacks this is no other than?

                                                  Only he can be----->G.J
                                                  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:31 PM.