Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
So i've been hacking several flash games lately.
I decompile them, find the variables such as "_level0.mcGame.mcHud.mcTxtScore.txtScore".

I use c# to create the trainer, changing variables works so far however i tried to hack Avatar Arena lately, looked like a simple game to hack for me however im stuck!

I can decompile it so that isnt the problem, however i can't find good variables.
I see stuff like "Variable _global.LifeBar = [function 'LifeBar']".
And when i search further about "Life" i found the following:
"oPlayer:[object #62] {
      mcRef:[movieclip:_level0.mcGame.mcBg.mcPlayer],
      sName:"oPlayer",
      nPosX:-128,
      nPosY:266,
      bPausable:true,
      ...blablabla...
      <b>nMaxlife:100</b>,
      ...blablamorestuff...
"


How do i change nMaxlife now?
Because when i want to change "_level0.mcGame.mcHud.mcTxtScore.txtScore" i simply type in the following:
axShockwaveFlash.SetVariable("_level0.mcGame.mcHud.mcTxtScore.txtScore", "1337");

Where '1337' is the value, so my score would be 1337.
I've tested it and i see my score changing to 1337 so it works i guess.
But my problem is about nMaxlife, i really tried to search along the web but i'm giving up now so i've come here to ask help.

So in short now:
How do i change 'nMaxlife:100' to example 'nMaxlife:999' in C#?

Really thanks in advance!
Posted
Updated 26-Sep-12 14:41pm
v2

1 solution

What have you tried? From what I can tell it looks like nMaxLife is a child of mcPlayer and so I believe the solution would be this:
C#
axShockwaveFlash.SetVariable("_level0.mcGame.mcBg.mcPlayer.nMaxLife", "999");
 
Share this answer
 
Comments
Daniel Breedeveld 27-Sep-12 11:00am    
Ah thanks for trying but that didnt work out, ive tried several things like:
axShockwaveFlash.SetVariable("_level0.mcGame.mcBg.mcPlayer.nMaxLife", "999");
axShockwaveFlash.SetVariable("_level0.mcGame.mcBg.mcPlayer._nMaxLife", "999");
axShockwaveFlash.SetVariable("_level0.mcGame.mcBg.mcPlayer[nMaxLife]", "999");
axShockwaveFlash.SetVariable("_level0.mcGame.mcBg.mcPlayer.__nMaxLife", "999");

And more stuff but all turned out to not work ;/
This game is not encrypted/obfuscated, however i really can't change what i found.
Atleast i don't know how to change it (yet?) so please if someone know's more stuff to try it post your suggestions here and i'll try it!

Thanks for your try though!
Cardon Fry 28-Sep-12 15:28pm    
I haven't worked with flash in a while and don't have the free time right now, but if it isn't answered by the time that I do have some extra time I will check into some of my old flash projects to see if I can be of better help.
Daniel Breedeveld 3-Oct-12 15:00pm    
Hey Cardon Fry,
so far no answers yet. Mind taking a look at your old projects?
I'm still interested in this, haven't figured it out yet too so yeah all help is still welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900