Arcade Prehacks

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Sep 2010
    Location
    Programming something else...
    Posts
    894

    Plants vs. Zombies Japanese Version

    Hey, I found a Japanese version of Plants vs Zombies, and am trying to hack it. I found the costs of items, but I do not know how to change them, since it is AS3. Here's the code in AS.
    Code:
     public class HuLuData extends Object
        {
            public static const __data:Array = [{speed:0, live:1500, power:1000, stopTime:3000, money:75}, {speed:3000, live:1100, power:140, stopTime:100, money:50}, {speed:0, live:2600, power:0, stopTime:30000, money:50}, {speed:1000, live:10000, power:2000, stopTime:7500, money:175}, {speed:3000, live:1100, power:140, stopTime:50000, money:150}, {speed:24000, live:1060, power:0, stopTime:7500, money:50}, {speed:10000, live:1600, power:800, stopTime:7500, money:150}];
            private static const __time:Array = [13000, 12000, 12000, 11000, 11000, 11000, 11000];
    
            public function HuLuData()
            {
                return;
            }// end function
    
            public static function money(param1:Number) : Number
            {
                return __data[param1].money;
            }// end function
    And here is it in hex code.
    Code:
    public class HuLuData extends Object
        {
            public static const __data:Array = [{speed:0, live:1500, power:1000, stopTime:3000, money:75}, {speed:3000, live:1100, power:140, stopTime:100, money:50}, {speed:0, live:2600, power:0, stopTime:30000, money:50}, {speed:1000, live:10000, power:2000, stopTime:7500, money:175}, {speed:3000, live:1100, power:140, stopTime:50000, money:150}, {speed:24000, live:1060, power:0, stopTime:7500, money:50}, {speed:10000, live:1600, power:800, stopTime:7500, money:150}];
            private static const __time:Array = [13000, 12000, 12000, 11000, 11000, 11000, 11000];
    
            public function HuLuData()
            {
    //d0 
    _as3_getlocal <0> 
    //30 
    _as3_pushscope 
    //d0 
    _as3_getlocal <0> 
    //49 00 
    _as3_constructsuper (param count:0)
    //47 
    _as3_returnvoid 
            }// end function
    
            public static function money(param1:Number) : Number
            {
    //d0 
    _as3_getlocal <0> 
    //30 
    _as3_pushscope 
    //60 bd 05 
    _as3_getlex __data
    //d1 
    _as3_getlocal <1> 
    //66 9b 06 
    _as3_getproperty {}
    //66 a0 06 
    _as3_getproperty money
    //48 
    _as3_returnvalue 
            }// end function
    
            public static function power(param1:Number) : Number
            {
    //d0 
    _as3_getlocal <0> 
    //30 
    _as3_pushscope 
    //60 bd 05 
    _as3_getlex __data
    //d1 
    _as3_getlocal <1> 
    //66 9b 06 
    _as3_getproperty {}
    //66 9e 06 
    _as3_getproperty power
    //48 
    _as3_returnvalue 
            }// end function
    See my dilemma? I cannot find how to directly change the price of items. Because it won't show me the hex code for them.

  2. #2
    Senior Member
    Join Date
    Jul 2010
    Location
    The Netherlands
    Posts
    1,862

    Re: Plants vs. Zombies Japanese Version

    Those are Public Variables. You can't change those, for as far as I know.
    I've been here before.

  3. #3
    Senior Member
    Join Date
    May 2010
    Location
    Pen Island
    Posts
    3,838

    Re: Plants vs. Zombies Japanese Version

    It would help if you gave us the swf

  4. #4
    Senior Member
    Join Date
    Sep 2010
    Location
    Programming something else...
    Posts
    894

    Re: Plants vs. Zombies Japanese Version

    Sorry, thought we weren't supposed to post .swf's. Here.
    Attached Files Attached Files

  5. #5
    Senior Member
    Join Date
    May 2010
    Location
    Pen Island
    Posts
    3,838

    Re: Plants vs. Zombies Japanese Version

    Everything is free

    2C AB 05 24 4B =>
    2C AB 05 24 00

    2C AB 05 24 32 =>
    2C AB 05 24 00

    2C AB 05 25 AF 01 =>
    2C AB 05 24 00 02

    2C AB 05 25 96 01 =>
    2C AB 05 24 00 02

    Any other hacks you want?

  6. #6
    Senior Member
    Join Date
    Sep 2010
    Location
    Programming something else...
    Posts
    894

    Re: Plants vs. Zombies Japanese Version

    Thanks, but I was really asking how to edit the prices of things.

  7. #7
    Senior Member
    Join Date
    May 2010
    Location
    Pen Island
    Posts
    3,838

    Re: Plants vs. Zombies Japanese Version

    public static const aren't able to be read in sothink,yet they ARE in the swf file.

    I searched '25 b0 ea 01' in HxD.

    '25 b0 ea 01' meaning 30000.

    30000 was one of the stoptimes

    Right next to '25 b0 ea 01' was '2C AB 05 24 32'

    24 32 = 50

    50 is one of the prices.

    Going back,I saw:
    Code:
    money:50
    So,
    '2C AB 05 24 32'

    would mean

    money:50

    The
    Code:
    money:
    is the bytes:
    Code:
    2C AB 05
    I searched '2C AB 05' and after '2C AB 05' were the prices.

    2C AB 05 24 ??

    or

    2C AB 05 25 ?? ??

    There you go.

  8. #8
    Senior Member
    Join Date
    Sep 2010
    Location
    Programming something else...
    Posts
    894

    Re: Plants vs. Zombies Japanese Version

    Thanks, roflmao, you are on team hackers list. Request lockage.

  9. #9
    Senior Member
    Join Date
    May 2010
    Location
    Pen Island
    Posts
    3,838

    Re: Plants vs. Zombies Japanese Version

    Would have been better if there was no recharge time for the items.

    'StopTime' was the variable for that,but whatever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •