Skip to content
Locked

Help with AoB

-migrated-

9 posts

Help with AoB

Posted Feb 9, 2011 12:18 am

Hi, im a bit confused about AoB hacking. This is a continuation of this topic: viewtopic.php?f=11&t=4073
I just didn't want to litter my questions in the wrong place.

I read through several tutorials and the more i looked though them the more confused I got. For example this tutorial /viewtopic.php?f=30&t=2104 kept changing the game so following along was difficult and by the time we got to step 3, things didn't match up. Or this tutorial http] thats a bit out of date and methods such as flasm arn't useful anymore (at least thats what the other tutorials said).

I have downloaded sothink and this new bundle [url=http://forum.kongregatehack.com/viewtopic.php?f=11&t=4056]/viewtopic.php?f=11&t=4056
.
Im gonna go through all of the steps and I would be extremely appreciative if you correct me along the way.
Also Im hacking from armorgames (that seems to make a difference). If there is a better place then im all ears. Also Im gonna be trying this on Age of Defense 3 (link: http://armorgames.com/play/10475/age-of-defense-3)
1) download the .swf (I used download helper add-on for firefox)
2) drag and drop the .swf into sothink
3) under action scripts, select p-code
4) under resources at the right go to age-of-defense-3-10475 >> Action (200) >> MainMovie
5) Find the code to change

Code: [Select]

function tambahPrada1()
{
    if (cekPause == false)
    {
        punyaPrada = punyaPrada + Math.ceil(3 + pilihVillage / 10);
        if (punyaPrada >= maxPrada)
        {
            punyaPrada = maxPrada;
        } // end if
        punyaPrada = Math.ceil(punyaPrada);
    } // end if
} // End of the function
MainTimeline lines 1999-2010

Code: [Select]

  //9d 02 00 09 00
   _if true goto #583
   //96 04 00 08 3b 08 3c
   _push "punyaPrada" "maxPrada"
   //1c
   _getVariable
   //1d
   _setVariable
#11838-#11845
My questions:
1) What does NOP mean? Number of Parameters?
2) How do you figure out what to change? Or what to change it to?

Thanks, any help will be greatly appreciated

Re: Help with AoB

Posted Feb 9, 2011 1:51 am

NOP stands for "No Operation", It basically tells the computer 'move along, nothing to see here.'

I bet this gets me banned, since ive been warned once already, but here goes...with as little condescension as possible

Figuring out what to change and what to change it to requires insight. there is truly no majik answer. the best way to gain insight though is to not even look at the code. just look at the game and think.

for instance if you wanted to make a no reload hack for a game:

what does the game do?
when gun is fired, ammo count goes down by one. when the ammo is zero i cant shoot any more.
what is the desired behavior?
the gun shouldnt need to be reloaded
what are some things I can do achieve this behavior?
make the ammo count rise, make the ammo count not change, allow negative ammo

now look at the code and see which way is best for you.

you could nop this block, which says if ammo is 0 dont fire

Code: [Select]

if (currentWeapon.ammoInLoad == 0)
                {
                    return;
                }
but personally, I think the better solution is to modify this block, so that when you fire ammo doesnt decrease

Code: [Select]

               var _loc_7:* = currentWeapon;
                var _loc_8:* = currentWeapon.ammoInLoad - 1;
                _loc_7.ammoInLoad = _loc_8;

once you have good insight (of both action script and how the game is working), you will no longer need things like sothink.

happy hacking.

I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

Re: Help with AoB

Posted Feb 9, 2011 3:00 am

eh, sorry I didn't put enough detail in my question.
What I meant by:

Quote
2) How do you figure out what to change? Or what to change it to?

Is in regards to the OP code:
for example, to get max money:
9d 02 00 09 00 96 04 00 08 3b 08 3c 1c 1d =>
02 02 02 02 02 96 04 00 08 3b 08 3c 1c 1d

how do you determine that the ones in bold should be changed and how do you determine what they should be changed to?

Also, I see a lot of bytes being changed to "02" (not just here but in many situations) does it mean something important?

I have seen this explained in one tutorial but that tutorial was limited to a single example and these arrays come in different sizes.

Re: Help with AoB

Posted Feb 9, 2011 3:32 am

ok well briefly,
02 means NOP.
the bytes changed in your code removed the if statement, so when that section runs, no matter what, puntaPrada will be assigned the value of maxPrada.

as far has how you know which ones to change,

Quote from: "kolonelkadat"
just look at the game and think.
what does the game do?
what is the desired behavior?
what are some things I can do achieve this behavior?

I really cant describe it any easier than that. but here is a link to some help I gave another member a while back, Its a different game but the idea is the same. it deals mostly with AoB length and touches on using NOPs
viewtopic.php?f=27&t=3445&p=36514#p36495
theres a couple of pages of back and forth between me and lithergy, I suggest reading all of it.

I may also do a as2 tutorial but i doubt it.

I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

Re: Help with AoB

Posted Feb 9, 2011 10:38 am

is you NOP something like 24 05 to 02 02 then it doesn't exist.

Flash .sol locations
Chrome: \AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\
Normal: \AppData\Roaming\Macromedia\Flash Player\#SharedObjects

Re: Help with AoB

Posted Feb 9, 2011 5:08 pm

oh wow this is beginning to make a lot more sense

Quote from: "temp_man"
9d 02 00 09 00 96 04 00 08 3b 08 3c 1c 1d =>
02 02 02 02 02 96 04 00 08 3b 08 3c 1c 1d
Code: [Select]
  //9d 02 00 09 00
   _if true goto #583
   //96 04 00 08 3b 08 3c
   _push "punyaPrada" "maxPrada"
   //1c
   _getVariable
   //1d
   _setVariable
#11838-#11845

Ok so this is basically controlling the on/off switch. After determining that I dont want to call #583 I will switch everything to 02. This seems like the basic level AoB. Ill worry about the other commands after I get comfortable with this. Thanks ^^

Last question:
how do I give karma? I have received a lot of help around the forum and I haven't been able to give karma.

Re: Help with AoB

Posted Feb 9, 2011 6:38 pm

You need to have a post count > 10, if I'm not wrong

Re: Help with AoB

Posted Feb 9, 2011 8:58 pm

awesome, questions answered thread can be closed now ^^

EDIT: Sweet, now I can!

This topic is locked.