Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

TrollandToad.com
Closed Thread
 
Thread Tools
  #376    
Old June 19th, 2009 (5:57 PM).
Samike360's Avatar
Samike360 Samike360 is offline
Lover of May
     
    Join Date: Mar 2009
    Location: ATL
    Gender:
    Nature: Bold
    Posts: 397
    ^Nope, do it this way:

    You messed up when you got this:
    $2E9804
    $2E9868
    $2E98CC
    $2E9930
    $2E9994

    Go back to the magnifying glass. Do you see where it says $6B0000 in a text-box? Change it to $800000. Then get your offsets and replace the @start with one of the five that you choose.
    __________________





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

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

    Relevant Advertising!

      #377    
    Old June 19th, 2009 (6:11 PM).
    darkninja333's Avatar
    darkninja333 darkninja333 is offline
       
      Join Date: Jun 2009
      Gender: Male
      Posts: 4
      Okay I went back and did that then i get...

      Spoiler:

      $85D5B4
      $869630
      $8699D0
      $869A34
      $86A13C


      So im gonna use $85D5B4

      I put in the script offset

      Spoiler:
      #org 0x885D4B4
      '-----------------------------------
      comparevars2 0x3233 0x2233
      comparevars2 0x1121 0xF010
      setvar 0xFF0F 0xEFEF
      #raw 0xEF
      #raw 0xEF
      #raw 0xEF
      #raw 0xFF
      #raw 0xFF
      #raw 0xF0
      writebytetooffset 0x11 0x11112111
      writebytetooffset 0x10 0xFFFF0000
      loadpointer 0xF0 0xFF0FFF
      'Pointer not in ROM area
      nop1 ' #raw 0x1
      loadpointer 0xF1 0x33031723
      'Pointer not in ROM area
      compare 0xFE11 0xEDDD
      #raw 0xDE
      #raw 0xDE
      #raw 0xEE
      #raw 0xEF
      #raw 0xEF
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      writebytetooffset 0x11 0x12121212
      loadbytefrompointer 0x11 0xFF0F1011
      CMD_FE 0xFF
      #raw 0xFF
      #raw 0xEF
      #raw 0xF0
      #raw 0xF0
      #raw 0xF8
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop1 ' #raw 0x1
      writebytetooffset 0x10 0x10101111
      writebytetooffset 0xF 0xDCEE1100
      #raw 0xDD
      #raw 0xEE
      #raw 0xFF
      loadbytefrompointer 0x23 0x22323232
      comparevars2 0x1111 0xFF00
      #raw 0xFF
      #raw 0xFF
      #raw 0xEF
      if 0xF jump 0xFFEFEFEF ' Unknown IF condition
      'Jump not in ROM area
      nop0 ' #raw 0x0
      nop1 ' #raw 0x1
      writebytetooffset 0x11 0x11111112
      setbyte2 0x0 0x0
      loadpointer 0xFF 0xFFFF00F
      'Pointer not in ROM area
      loadpointer 0xF0 0x12FF0001
      'Pointer not in ROM area
      playsound 0x2243 0x11
      playsound 0xED0F 0xDE
      #raw 0xDE
      #raw 0xDE
      #raw 0xEE
      #raw 0xEE
      #raw 0xFF
      #raw 0xFF
      #raw 0xF1
      setbyte2 0x11 0x11
      compare 0x1212 0x1112
      writebytetooffset 0x11 0xFEFFFF1F
      #raw 0xFF
      #raw 0xFF
      #raw 0xFF
      #raw 0xF0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      writebytetooffset 0xFC 0x1111100
      nop1 ' #raw 0x1
      setbyte2 0x0 0x0
      nop0 ' #raw 0x0
      #raw 0xFF
      #raw 0xEE
      #raw 0xEE
      #raw 0xEE
      #raw 0xFF
      nop1 ' #raw 0x1
      loadbytefrompointer 0x12 0x11212121
      writebytetooffset 0x10 0xF0F0000
      #raw 0xFF
      loadpointer 0xFF 0xFB0FFF
      'Pointer not in ROM area
      #raw 0xF1
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop1 ' #raw 0x1
      setbyte2 0x11 0x1
      nop0 ' #raw 0x0
      setbyte2 0x0 0x0
      nop0 ' #raw 0x0
      msgbox 0xFF000
      'Pointer not in ROM area
      #raw 0xF0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop1 ' #raw 0x1
      nop1 ' #raw 0x1
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      comparefarbytetobyte 0x10 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      #raw 0xF0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      setbyte2 0x0 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop0 ' #raw 0x0
      nop1 ' #raw 0x1
      end


      Thats what i got

      Should i try the script generator again or is something still wrong? Im really srry im bad at his lol.

      Thx for the help so far also.
        #378    
      Old June 19th, 2009 (6:13 PM).
      Samike360's Avatar
      Samike360 Samike360 is offline
      Lover of May
         
        Join Date: Mar 2009
        Location: ATL
        Gender:
        Nature: Bold
        Posts: 397
        ^Hmm..that's strange....no don't use the script gen, instead try downloading HackMew's FreeSpaceFinder and using that to find some offsets. Or maybe since it is a small script set the bytes needed to 10. I'll pm you another piece of advice.
        __________________





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

        From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.
          #379    
        Old June 20th, 2009 (7:37 AM).
        score_under's Avatar
        score_under score_under is offline
        I program the *other* ASM.
        • Crystal Tier
         
        Join Date: Aug 2005
        Location: Hertfordshire, England
        Age: 24
        Nature: Rash
        Posts: 525
        Something is very wrong there - opening PKSV where AdvanceMap detects free space should result in #raw 0xFF repeatedly.

        If you compiled to that offset beginning with 2E, it's likely you messed up some vital data in your ROM too, so it's best to re-download it.
        __________________
        Plz not to PM me, I don't come here often enough. Email if you need me
          #380    
        Old June 21st, 2009 (10:53 AM). Edited June 21st, 2009 by darkninja333.
        darkninja333's Avatar
        darkninja333 darkninja333 is offline
           
          Join Date: Jun 2009
          Gender: Male
          Posts: 4
          Do you mean it should look like this?

          Spoiler:
          #org 0x8E3CF93
          '-----------------------------------
          checkobedience 0xD1C9
          #raw 0xC8
          nop0 ' #raw 0x0
          hidecoins 0xD3 0xC7
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          #raw 0xFF
          'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)


          Okay nvm i did figure out what i was doing wrong i got it to where all it says is #RAW OxFF i had the bytes to look for set to 00 instead of FF. Now im trying to get it to complile right lol

          EDIT AGAIN: I finally got everything working right. I made a new event and it works nothings messed up lol. Thanks alot everyone.
            #381    
          Old June 22nd, 2009 (5:55 PM).
          IIMarckus's Avatar
          IIMarckus IIMarckus is offline
             
            Join Date: Oct 2007
            Gender:
            Posts: 402
            score_under, do you plan on releasing PKSV (the command‐line version, at least) for Linux and similar operating systems? I hear it works with Wine, but that option isn’t available for all platforms, including mine.
            __________________
            iimarck.us / hax.iimarck.us

            If you want me, please contact me by email. [email protected]

            If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

            Pokémon Red disassembly project

            Rules that should be rethought: 25charlimit, bumping.
            Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
            Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
              #382    
            Old June 23rd, 2009 (5:08 AM). Edited June 23rd, 2009 by score_under.
            score_under's Avatar
            score_under score_under is offline
            I program the *other* ASM.
            • Crystal Tier
             
            Join Date: Aug 2005
            Location: Hertfordshire, England
            Age: 24
            Nature: Rash
            Posts: 525
            Quote:
            Originally Posted by IIMarckus View Post
            score_under, do you plan on releasing PKSV (the command‐line version, at least) for Linux and similar operating systems? I hear it works with Wine, but that option isn’t available for all platforms, including mine.
            PKSV has a SVN repository - if you get the source code from there, you should be able to compile it with little problem.

            If you do run into a problem, tell me.

            I've also now compiled a new version of PKSV, look at the decompile dialog So much improvement it's not even funny, haha... also, the AssociateShell.bat bug has been fixed.

            Chinese version is lagging behind in resources (seriously!), so moved that into "mlpksvui.exe" instead of the main "pksvui.exe".
            __________________
            Plz not to PM me, I don't come here often enough. Email if you need me
              #383    
            Old June 23rd, 2009 (6:14 AM).
            IIMarckus's Avatar
            IIMarckus IIMarckus is offline
               
              Join Date: Oct 2007
              Gender:
              Posts: 402
              Quote:
              Originally Posted by score_under View Post
              If you do run into a problem, tell me.
              Code:
              …
              #include 
              #include 
              HANDLE LogFile;
              #include "pokedef.h"
              #include "golddef.h"
              #include "textproc.h"
              …
              A lot of code uses it as well.
              __________________
              iimarck.us / hax.iimarck.us

              If you want me, please contact me by email. [email protected]

              If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

              Pokémon Red disassembly project

              Rules that should be rethought: 25charlimit, bumping.
              Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
              Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
                #384    
              Old June 23rd, 2009 (2:46 PM).
              score_under's Avatar
              score_under score_under is offline
              I program the *other* ASM.
              • Crystal Tier
               
              Join Date: Aug 2005
              Location: Hertfordshire, England
              Age: 24
              Nature: Rash
              Posts: 525
              Quote:
              Originally Posted by IIMarckus View Post
              Code:
              …
              #include 
              #include 
              HANDLE LogFile;
              #include "pokedef.h"
              #include "golddef.h"
              #include "textproc.h"
              …
              A lot of code uses it as well.
              Hehe, I could have sworn I removed that...

              Ah yes, you have to compile pksv2.c, not pksv.c... sorry.
              __________________
              Plz not to PM me, I don't come here often enough. Email if you need me
                #385    
              Old June 24th, 2009 (11:26 AM).
              IIMarckus's Avatar
              IIMarckus IIMarckus is offline
                 
                Join Date: Oct 2007
                Gender:
                Posts: 402
                Turns out I was using an old version anyway. Just checked out version 2.0.4 from the SVN, and got these results:
                Code:
                $ gcc -o pksv.out pksv2.c
                In file included from pksv2.c:26:
                /usr/include/malloc.h:4:2: warning: #warning " is obsolete, use "
                In file included from sulib.h:4,
                                 from pksv2.c:34:
                /usr/include/malloc.h:4:2: warning: #warning " is obsolete, use "
                In file included from pksv2.c:55:
                codeproc.h:370:21: gba_asm.h: No such file or directory
                In file included from codeproc.h:371,
                                 from pksv2.c:55:
                decompiler.h: In function `DecodeProcLevel':
                decompiler.h:3985: error: `VersionOverride' undeclared (first use in this function)
                decompiler.h:3985: error: (Each undeclared identifier is reported only once
                decompiler.h:3985: error: for each function it appears in.)
                decompiler.h:4106: error: `asm_buf' undeclared (first use in this function)
                decompiler.h: In function `DecodeProc':
                decompiler.h:4135: error: `VersionOverride' undeclared (first use in this function)
                decompiler.h:4221: error: `asm_buf' undeclared (first use in this function)
                decompiler.h: In function `DecodeProcASM':
                decompiler.h:4248: error: `VersionOverride' undeclared (first use in this function)
                decompiler.h:4285: error: `asm_buf' undeclared (first use in this function)
                $ gcc -v
                Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.5/3.3.5/specs
                Configured with: 
                Thread model: single
                gcc version 3.3.5 (propolice)
                $
                Platform: OpenBSD i386
                __________________
                iimarck.us / hax.iimarck.us

                If you want me, please contact me by email. [email protected]

                If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

                Pokémon Red disassembly project

                Rules that should be rethought: 25charlimit, bumping.
                Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
                Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
                  #386    
                Old June 24th, 2009 (3:14 PM).
                score_under's Avatar
                score_under score_under is offline
                I program the *other* ASM.
                • Crystal Tier
                 
                Join Date: Aug 2005
                Location: Hertfordshire, England
                Age: 24
                Nature: Rash
                Posts: 525
                Okay, NOT my lucky day I forgot to add one of the files to the SVN - will do that now.

                EDIT-Done. Tell me if I missed yet more XD
                __________________
                Plz not to PM me, I don't come here often enough. Email if you need me
                  #387    
                Old June 24th, 2009 (7:41 PM).
                IIMarckus's Avatar
                IIMarckus IIMarckus is offline
                   
                  Join Date: Oct 2007
                  Gender:
                  Posts: 402
                  It does compile fine now. What are the command‐line options?
                  __________________
                  iimarck.us / hax.iimarck.us

                  If you want me, please contact me by email. [email protected]

                  If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

                  Pokémon Red disassembly project

                  Rules that should be rethought: 25charlimit, bumping.
                  Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
                  Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
                    #388    
                  Old June 25th, 2009 (11:47 AM). Edited July 26th, 2009 by score_under.
                  score_under's Avatar
                  score_under score_under is offline
                  I program the *other* ASM.
                  • Crystal Tier
                   
                  Join Date: Aug 2005
                  Location: Hertfordshire, England
                  Age: 24
                  Nature: Rash
                  Posts: 525
                  They're pretty much strictly fixed, but here they are:
                  Code:
                  pksv -e ScriptFile.txt RomFile.gba        -- Debug compile
                  pksv -r ScriptFile.txt RomFile.gba        -- Compile
                  pksv RomFile.gba HexOffset OutputFile.txt -- Decompile
                  Yes, this means that before I used a DLL, PKSVUI would just read the file, "_d_.pks.tmp"...

                  Even though you compiled it as command-line, I've done as much as I can to make it work just as well as PKSV in Windows (dynamic offsets, THUMB, pokemarts ...)

                  EDIT: - Slightly unrelated This script will work in the soon-to-come v2.0.5, it's a slightly modified version of the "move-to-place" script I mentioned earlier:
                  Code:
                  #dyn 0x800000
                  #define safe-val 0x100
                  'Safe-val is a value definitely larger than the X and Y coords on the map, which is to avoid unsigned integer overflow.
                  #org @start
                  lockall
                  getplayerxy 0x8000 0x8001
                  addvar 0x8000 safe-val
                  addvar 0x8001 safe-val
                  subtractvar 0x8000 0xA ' Position X to move to
                  subtractvar 0x8001 0x9 ' Position Y to move to - try this one in Pallet Town.
                  compare 0x8000 safe-val
                  if < jump :loop2
                  :loop
                  if == jump :loop3_s
                  applymovement PLAYER @run-left
                  pauseevent 0x0
                  subtractvar 0x8000 1
                  compare 0x8000 safe-val
                  jump :loop
                  :loop2
                  compare 0x8000 safe-val
                  if == jump :loop3_s
                  applymovement PLAYER @run-right
                  pauseevent 0x0
                  addvar 0x8000 1
                  jump :loop2
                  :loop3_s
                  compare 0x8001 safe-val
                  if < jump :loop4
                  :loop3
                  if == jump :endloops
                  applymovement PLAYER @run-up
                  pauseevent 0x0
                  subtractvar 0x8001 1
                  compare 0x8001 safe-val
                  jump :loop3
                  :loop4
                  compare 0x8001 safe-val
                  if == jump :endloops
                  applymovement PLAYER @run-down
                  pauseevent 0x0
                  addvar 0x8001 1
                  jump :loop4
                  :endloops
                  releaseall
                  end
                  
                  #org @run-left
                  m run_left end
                  #org @run-right
                  m run_right end
                  #org @run-up
                  m run_up end
                  #org @run-down
                  m run_down end
                  Edit - "Soon to come"? What the hell was I talking about?
                  __________________
                  Plz not to PM me, I don't come here often enough. Email if you need me
                    #389    
                  Old June 25th, 2009 (1:31 PM).
                  iTAIYO iTAIYO is offline
                     
                    Join Date: Jun 2009
                    Gender: Male
                    Nature: Relaxed
                    Posts: 5
                    MY code messed up please help

                    i put in this code
                    Code:
                    #org 0x8800638
                    '-----------------------------------
                    checkflag 0x9999
                    if 0x1 jump 0x88006F6 ' Equal To
                    msgbox 0x8800657 ' I found this helples...
                    callstd MSG_NORMAL ' Normal message
                    addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
                    setflag 0x9999
                    
                    #org 0x88006F6
                    '-----------------------------------
                    msgbox 0x88006FF ' Please take it away.
                    callstd MSG_NORMAL ' Normal message
                    end
                    
                    
                    #org 0x8800657
                    = take this Charmander.
                    
                    #org 0x88006FF
                    = Please take it away.
                    Then it turned into this after i compiled it
                    Code:
                    #org 0x8800638
                    '-----------------------------------
                    checkflag 0x9999
                    if 0x1 jump 0x88006F6 ' Equal To
                    msgbox 0x8800657 ' I found this helples...
                    callstd MSG_NORMAL ' Normal message
                    addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
                    nop0 ' #raw 0x0
                    #raw 0xDA
                    #raw 0xE3
                    #raw 0xE9
                    #raw 0xE2
                    #raw 0xD8
                    nop0 ' #raw 0x0
                    #raw 0xE8
                    #raw 0xDC
                    #raw 0xDD
                    #raw 0xE7
                    nop0 ' #raw 0x0
                    #raw 0xDC
                    #raw 0xD9
                    #raw 0xE0
                    #raw 0xE4
                    #raw 0xE0
                    #raw 0xD9
                    #raw 0xE7
                    #raw 0xE7
                    CMD_FE 0x0
                    #raw 0xBD
                    updatecoins 0xBB 0xCC
                    textcolor 0xBB 'Sets text color (Fire Red).
                    #raw 0xC8
                    #raw 0xBE
                    #raw 0xBF
                    checkobedience 0x0 0xE0D5
                    #raw 0xE3
                    #raw 0xE2
                    #raw 0xD9
                    CMD_FB 0xE2DD00
                    #raw 0xE9
                    #raw 0xE4
                    nop0 ' #raw 0x0
                    #raw 0xDC
                    #raw 0xD9
                    #raw 0xE6
                    #raw 0xD9
                    setdoorclosed 0xC300 0xE800
                    #raw 0xDC
                    #raw 0xDD
                    #raw 0xE2
                    #raw 0xDF
                    CMD_FE 0x0
                    #raw 0xDD
                    #raw 0xE8
                    nop0 ' #raw 0x0
                    #raw 0xDA
                    #raw 0xD9
                    #raw 0xE0
                    #raw 0xE0
                    nop0 ' #raw 0x0
                    #raw 0xDA
                    #raw 0xE6
                    #raw 0xE3
                    #raw 0xE1
                    nop0 ' #raw 0x0
                    #raw 0xE9
                    #raw 0xE4
                    nop0 ' #raw 0x0
                    #raw 0xDC
                    #raw 0xD9
                    #raw 0xE6
                    #raw 0xD9
                    setdoorclosed 0xC3FB 0xE7E8
                    nop0 ' #raw 0x0
                    #raw 0xDC
                    #raw 0xD9
                    #raw 0xD5
                    #raw 0xE0
                    #raw 0xE8
                    #raw 0xDC
                    #raw 0xED
                    nop0 ' #raw 0x0
                    #raw 0xE4
                    #raw 0xE0
                    #raw 0xD9
                    #raw 0xD5
                    #raw 0xE7
                    #raw 0xD9
                    nop0 ' #raw 0x0
                    #raw 0xE8
                    #raw 0xD5
                    #raw 0xDF
                    #raw 0xD9
                    nop0 ' #raw 0x0
                    #raw 0xDD
                    #raw 0xE8
                    CMD_FE 0x0
                    #raw 0xEB
                    #raw 0xDD
                    #raw 0xE8
                    #raw 0xDC
                    nop0 ' #raw 0x0
                    #raw 0xED
                    #raw 0xE3
                    #raw 0xE9
                    setdoorclosed 0xCAFF 0xD9E0
                    #raw 0xD5
                    #raw 0xE7
                    #raw 0xD9
                    nop0 ' #raw 0x0
                    #raw 0xDB
                    #raw 0xDD
                    #raw 0xEA
                    #raw 0xD9
                    nop0 ' #raw 0x0
                    #raw 0xBD
                    updatecoins 0xBB 0xCC
                    textcolor 0xBB 'Sets text color (Fire Red).
                    #raw 0xC8
                    #raw 0xBE
                    #raw 0xBF
                    checkobedience 0x0 0xD5FE
                    nop0 ' #raw 0x0
                    #raw 0xDB
                    #raw 0xE3
                    #raw 0xE3
                    #raw 0xD8
                    nop0 ' #raw 0x0
                    #raw 0xDC
                    #raw 0xE3
                    #raw 0xE1
                    #raw 0xD9
                    setdoorclosed 0xFFF 0xFF00
                    if 0x80 jump 0x2060908 ' Unknown IF condition
                              'Jump not in ROM area
                    msgboxsign
                    #raw 0xE0
                    #raw 0xD9
                    #raw 0xD5
                    #raw 0xE7
                    #raw 0xD9
                    nop0 ' #raw 0x0
                    #raw 0xE8
                    #raw 0xD5
                    #raw 0xDF
                    #raw 0xD9
                    nop0 ' #raw 0x0
                    #raw 0xDD
                    #raw 0xE8
                    nop0 ' #raw 0x0
                    #raw 0xD5
                    #raw 0xEB
                    #raw 0xD5
                    #raw 0xED
                    setdoorclosed 0xFFFF 0xFFFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    #raw 0xFF
                    'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)
                    
                    #org 0x88006F6
                    '-----------------------------------
                    msgbox 0x88006FF ' Please take it away.
                    callstd MSG_NORMAL ' Normal message
                    end
                    
                    
                    #org 0x8800657
                    = I found this helpless\n CHARMANDER alone\p in up here. I think\n it fell from up here.\pIts healthy please take it\n with you.
                    
                    #org 0x88006FF
                    = Please take it away.
                      #390    
                    Old June 25th, 2009 (9:44 PM).
                    Scythe_Ironclaw's Avatar
                    Scythe_Ironclaw Scythe_Ironclaw is offline
                    Shrouded Heart - Zorua & Sylveon Trainer
                       
                      Join Date: Oct 2007
                      Location: Dyvania Provence
                      Age: 27
                      Gender: Male
                      Nature: Quirky
                      Posts: 55
                      Wow, this could become very useful to me and my Gen III hackings.
                      I'm gonna download this now and give it a try!
                      __________________
                      This signature has been disabled.
                      spoiler tags are not allowed in signatures
                      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.
                        #391    
                      Old June 26th, 2009 (2:52 AM). Edited June 26th, 2009 by score_under.
                      score_under's Avatar
                      score_under score_under is offline
                      I program the *other* ASM.
                      • Crystal Tier
                       
                      Join Date: Aug 2005
                      Location: Hertfordshire, England
                      Age: 24
                      Nature: Rash
                      Posts: 525
                      Quote:
                      Originally Posted by iTAIYO View Post
                      MY code messed up please help

                      i put in this code
                      Code:
                      #org 0x8800638
                      '-----------------------------------
                      checkflag 0x9999
                      if 0x1 jump 0x88006F6 ' Equal To
                      msgbox 0x8800657 ' I found this helples...
                      callstd MSG_NORMAL ' Normal message
                      addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
                      setflag 0x9999
                      
                      #org 0x88006F6
                      '-----------------------------------
                      msgbox 0x88006FF ' Please take it away.
                      callstd MSG_NORMAL ' Normal message
                      end
                      
                      
                      #org 0x8800657
                      = take this Charmander.
                      
                      #org 0x88006FF
                      = Please take it away.
                      Then it turned into this after i compiled it
                      5 problems with that code:
                      • 0x9999 is not a valid flag, if I recall correctly. Try 0x200, 0x500, 0x250, or something similar.
                      • Your #orgs are too close together - first erase the script by replacing all #org with #eorg and compiling the original script, then replace all #eorg with #org again and use dynamic offsets instead.
                      • You're missing an "end" after the setflag
                      • He says "Please take it away" if you talk to him *after* you take it away.
                      • No Lock/Faceplayer/Release


                      The script to erase your current script:
                      Code:
                      #eorg 0x8800638
                      '-----------------------------------
                      checkflag 0x9999
                      if 0x1 jump 0x88006F6 ' Equal To
                      msgbox 0x8800657 ' I found this helples...
                      callstd MSG_NORMAL ' Normal message
                      addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
                      setflag 0x9999
                      
                      #eorg 0x88006F6
                      '-----------------------------------
                      msgbox 0x88006FF ' Please take it away.
                      callstd MSG_NORMAL ' Normal message
                      end
                      
                      
                      #eorg 0x8800657
                      = take this Charmander.
                      
                      #eorg 0x88006FF
                      = Please take it away.
                      The script with dynamic offsets:
                      Code:
                      #dynamic 0x800000
                      #org @start
                      '-----------------------------------
                      lock
                      faceplayer
                      checkflag 0x251
                      if true jump @already-have
                      msgbox @take-this
                      callstd MSG_NORMAL
                      addpokemon CHARMANDER 0xB 0x0 0x0 0x0000000 0x00000000
                      setflag 0x251
                      release
                      end
                      
                      #org @already-have
                      '-----------------------------------
                      msgbox @take-it-away
                      callstd MSG_NORMAL
                      release
                      end
                      
                      
                      #org @take-this
                      = take this Charmander.
                      
                      #org @take-it-away
                      = Please take it away.
                      Notice that you can also use "CHARMANDER" in "addpokemon".

                      It would be better if you checked if you had enough party space first, and changed the "Please take it away" message to "How's my CHARMANDER doing?" or something.
                      If this is the first pokémon you get in the game, you have to add another setflag, "setflag FR_POKEMON" (if you're hacking fire red) or "setflag RS_POKEMON" (if you're hacking R/S). This tells the game that you are allowed to access the "Pokémon" item on the pause menu.
                      __________________
                      Plz not to PM me, I don't come here often enough. Email if you need me
                        #392    
                      Old June 26th, 2009 (7:41 AM).
                      IIMarckus's Avatar
                      IIMarckus IIMarckus is offline
                         
                        Join Date: Oct 2007
                        Gender:
                        Posts: 402
                        Quote:
                        Originally Posted by score_under View Post
                        They're pretty much strictly fixed, but here they are:
                        Code:
                        pksv -e ScriptFile.txt RomFile.gba        -- Debug compile
                        pksv -r ScriptFile.txt RomFile.gba        -- Compile
                        pksv RomFile.gba HexOffset OutputFile.txt -- Decompile
                        It might be a good idea to make these display when run with no arguments (or --help). Also, the program segfaults when called with any fewer arguments—you might want to fix that. A -v flag for checking the version would be nice too.

                        I do prefer the command‐line version, because I already have a text editor.

                        You mentioned THUMB—are you planning support for GB‐Z80 in the future?
                        __________________
                        iimarck.us / hax.iimarck.us

                        If you want me, please contact me by email. [email protected]

                        If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

                        Pokémon Red disassembly project

                        Rules that should be rethought: 25charlimit, bumping.
                        Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
                        Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
                          #393    
                        Old June 26th, 2009 (9:50 AM).
                        score_under's Avatar
                        score_under score_under is offline
                        I program the *other* ASM.
                        • Crystal Tier
                         
                        Join Date: Aug 2005
                        Location: Hertfordshire, England
                        Age: 24
                        Nature: Rash
                        Posts: 525
                        Quote:
                        Originally Posted by IIMarckus View Post
                        It might be a good idea to make these display when run with no arguments (or --help). Also, the program segfaults when called with any fewer arguments—you might want to fix that. A -v flag for checking the version would be nice too.

                        I do prefer the command‐line version, because I already have a text editor.

                        You mentioned THUMB—are you planning support for GB‐Z80 in the future?
                        No, I was only planning to implement THUMB and ARM. Would it be desirable to implement GB-Z80?
                        Oh, and the SVN source supports the ":label" syntax already
                        __________________
                        Plz not to PM me, I don't come here often enough. Email if you need me
                          #394    
                        Old June 26th, 2009 (12:20 PM).
                        IIMarckus's Avatar
                        IIMarckus IIMarckus is offline
                           
                          Join Date: Oct 2007
                          Gender:
                          Posts: 402
                          Quote:
                          Originally Posted by score_under View Post
                          No, I was only planning to implement THUMB and ARM. Would it be desirable to implement GB-Z80?
                          It would be for me, as the GBA games are the ones I don’t hack.
                          __________________
                          iimarck.us / hax.iimarck.us

                          If you want me, please contact me by email. [email protected]

                          If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

                          Pokémon Red disassembly project

                          Rules that should be rethought: 25charlimit, bumping.
                          Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
                          Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
                            #395    
                          Old June 27th, 2009 (3:33 PM).
                          ProClifo's Avatar
                          ProClifo ProClifo is offline
                          The Village Pirate Cat
                             
                            Join Date: Sep 2008
                            Location: Norway
                            Age: 20
                            Gender: Male
                            Nature: Lonely
                            Posts: 90
                            I am a beginner to scripting but I just don't get it! Can someone make a video about everything about how to get the scrpit in the game? Please?
                            __________________
                            Click to visit Jiggmin's Village
                              #396    
                            Old June 27th, 2009 (3:57 PM).
                            Samike360's Avatar
                            Samike360 Samike360 is offline
                            Lover of May
                               
                              Join Date: Mar 2009
                              Location: ATL
                              Gender:
                              Nature: Bold
                              Posts: 397
                              ^Read scripting tutorials in the Documents and Tutorials section.
                              __________________





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

                              From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.
                                #397    
                              Old July 6th, 2009 (3:00 PM).
                              Hacker_Noobie Hacker_Noobie is offline
                                 
                                Join Date: Jul 2009
                                Gender: Male
                                Posts: 2
                                Ive made a new script with this prog. and how can i give this script now in the pokemon game?
                                Its the first time ive done any script :D
                                  #398    
                                Old July 7th, 2009 (7:58 AM).
                                score_under's Avatar
                                score_under score_under is offline
                                I program the *other* ASM.
                                • Crystal Tier
                                 
                                Join Date: Aug 2005
                                Location: Hertfordshire, England
                                Age: 24
                                Nature: Rash
                                Posts: 525
                                Quote:
                                Originally Posted by Hacker_Noobie View Post
                                Ive made a new script with this prog. and how can i give this script now in the pokemon game?
                                Its the first time ive done any script :D
                                Make sure that it's either using a clean offset or a #dynamic offset, and then load it and the ROM into the script editor (you can do both via drag'n'drop) then press F9 inside PKSV.
                                __________________
                                Plz not to PM me, I don't come here often enough. Email if you need me
                                  #399    
                                Old July 7th, 2009 (10:57 AM). Edited July 7th, 2009 by Hacker_Noobie.
                                Hacker_Noobie Hacker_Noobie is offline
                                   
                                  Join Date: Jul 2009
                                  Gender: Male
                                  Posts: 2
                                  Thx
                                  How can i figure the flag number of my pokemon out?

                                  When i press F9 it shows this text:

                                  Opened file.
                                  #ORG
                                  -> 0x0
                                  CHECKFLAG
                                  -> 0x800
                                  IF
                                  Unknown value in IF (Value must be integer)

                                  Whats wrong with my script?
                                  I copied a script from this forum to check if my script is wrong and it also shows this text
                                    #400    
                                  Old July 8th, 2009 (10:11 PM).
                                  Torosiken's Avatar
                                  Torosiken Torosiken is offline
                                  The angst is in the bloodline
                                     
                                    Join Date: Oct 2008
                                    Location: Littleroot town
                                    Age: 21
                                    Nature: Naive
                                    Posts: 194
                                    nice! but I still confused... *Shot myself*
                                    __________________

                                    Serve your Kyogre right
                                    Closed Thread

                                    Quick Reply

                                    Join the conversation!

                                    Create an account to post a reply in this thread, participate in other discussions, and more!

                                    Create a PokéCommunity Account

                                    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 8:40 AM.