How to "hack" a flash game.
Introduction.
What we'll be doing.
Steps:
- Acquiring the programs and files we need to make a trainer.
- Decompiling the game and locating the variables.
- Making the actual trainer.
Result.
Introduction:
Hello, my name is Helios, and today I'll show you how to "hack" a flash game. You can choose to read the whole tutorial (that's what I recommend) or you can simply watch a video.
I'm not finished editing the video, so the written tutorial will have to do for now.
I wont post the program code as typing out the code will help your programming skills.
What we'll be doing:
What we'll be doing is,- finding a game, decompiling it, looking for some variables and then changing them via Visual Basic.
Steps:
Acquiring the programs and files we need to make a trainer:
Sothink SWF Decompiler:
1. Go to this website Click Me and download the Sothink SWF Decompiler.
2. Install the SWF Decompiler.
Visual Basic:
1. If you don't already have Visual Basic, you can find the link to the program below this line.
- Visual Basic: Click Me.
Getting the SWF file from the game:
Now we'll need to find the game we want to hack. I've chosen to hack Penguin Massacre. You can choose whatever game you want, but know this,- the variables aren't always stored the same place, so you might have to search in alternative places for your game.
1. Find a flash game. I recommend going to y8.com, as they have a large amount of games.
2. I'm using FireFox, so all I have to do is right click the webpage and choose "View Page Info".
What we'll be doing.
Steps:
- Acquiring the programs and files we need to make a trainer.
- Decompiling the game and locating the variables.
- Making the actual trainer.
Result.
Introduction:
Hello, my name is Helios, and today I'll show you how to "hack" a flash game. You can choose to read the whole tutorial (that's what I recommend) or you can simply watch a video.
I'm not finished editing the video, so the written tutorial will have to do for now.
I wont post the program code as typing out the code will help your programming skills.
What we'll be doing:
What we'll be doing is,- finding a game, decompiling it, looking for some variables and then changing them via Visual Basic.
Steps:
Acquiring the programs and files we need to make a trainer:
Sothink SWF Decompiler:
1. Go to this website Click Me and download the Sothink SWF Decompiler.
2. Install the SWF Decompiler.
Visual Basic:
1. If you don't already have Visual Basic, you can find the link to the program below this line.
- Visual Basic: Click Me.
Getting the SWF file from the game:
Now we'll need to find the game we want to hack. I've chosen to hack Penguin Massacre. You can choose whatever game you want, but know this,- the variables aren't always stored the same place, so you might have to search in alternative places for your game.
1. Find a flash game. I recommend going to y8.com, as they have a large amount of games.
2. I'm using FireFox, so all I have to do is right click the webpage and choose "View Page Info".
Spoiler: Picture
3. Click the Media image and then look for the link with an "swf" at the end of it, in the address window.
Spoiler: Picture
4. When you've found it, simply click "Save As..." and save it. You'll need to save the SWF link because we will need it later on.
Now you should have all the programs needed to make a trainer for your flash game.
Decompiling the game and locating the variables:
What is a variable? You could call a variable a storage facility,- because variables store information.
Before we start finding variables our self, there's something a lot easier you can do,- a google search. A lot of people have already found and posted the variables online, so there's really no need to do a lot of work if you can find it in 2 seconds.
1. Drag the SWF file onto the SWF Decompiler.
Spoiler: Picture
2. Now look to the right on the screen, you'll see a window with different folders and other maximize-able items. In there you'll need to maximize the "Action" folder, and then it all comes down to the game. In Penguin Massacre, it's the "MainMovie" file (that's where we find the variables),- in others it could be a file called "GameData" or whatever the game creator decided to name the file.
Spoiler: Picture
3. Now you'll need to look at the code window. One of the most common variables to look for is the health variable, the variable name doesn't necessarily have to be named "health", but it most likely will be.
Spoiler: Picture
4. When you've found your variables copy and save them. Now we'll need to create the Visual Basic project.
Making the actual trainer:
1. You can call your project whatever you want, I'm going to call mine "Trainer Tutorial".
Spoiler: Picture
2. Since most people don't use the flash object control in visual basic and since it's not already in the toolbox, we'll have to add the control. Start by right clicking in the toolbox and choose "Choose Items...", next you want to click the "COM Components" tab and in the box look for a control called "Shockwave Flash Object", now click the OK button.
Spoiler: Picture
Spoiler: Picture
3. Now you'll need to add the control "Shockwave Flash Object" to the form. I normally name my controls after what they are and what they do (you'll be able to see that in the pictures). I'll just be calling my component "Flash".
- Example: If it's a button and what it does is log your account into the program, I would name it "btnlogin".
Spoiler: Picture
4. Now you'll need to find the swf link I told you to save in a notepad earlier. Take that swf link and click the "Shockwave Flash Object" you added to your form earlier, then paste the link at the "Movie" property.
Spoiler: Picture
If you don't want the game to load as soon as you open the program, you can add a button or a timer and give it this code: Flash.Movie = "SWF file link, for example: http://armorgames.com/files/games/penguin-massacre-4964.swf"
5. Add a button to the form.
Spoiler: Picture
6. Add a textbox to the form.
Spoiler: Picture
7. Add a Combobox to the form, and add all the variables you've found to the combo-box list. As you can see on the second picture the items I've added don't look like the game variables, they still have the same name, but they look different. That's completely okay we'll make it work in the code.
Spoiler: Picture
Spoiler: Picture
8. Now it's time for the code. Right click the Form in the "Solution Explorer" (Top right), and click "View code" or press F7.
Spoiler: Picture
9. The first thing we need to do is make a "String" variable.
Spoiler: Picture
10. Now go back to the Form design and double click the button we added earlier. What we will be doing now is writing the code that will change the variables. Other than that we'll add two checks to the code.
1. We need to check if the user has selected a variable, and if he hasn't we want him to know that.
2. Since there is a health and a maxHealth variable, we'll need to change both of them. Changing the health variable is actually enough, but it will look prettier if we change both of the variables.
Spoiler: Picture
11. Now go back to the Form design again and double click the combo-box. What we will be doing now is whenever the combo-box item change, we need the variable we created earlier to change too.
Spoiler: Picture
Result:
The result will vary depending on what game you chose. This is the result for the Penguin Massacre game.
I've added some code (hotkeys), so don't worry about not having the exact same code as me.
[youtube]http://youtu.be/mw3pmboFawc?hd=1[/youtube]
If you have any questions or problems, just post and I'll hopefully be able to help you.
0 comments: