Open VB 2008 Express and create a new project.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut0.gif[/IMG]
Now name your project. You can choose any name you want but make sure its something you will remember.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut1.gif[/IMG]
Now we need to Make sure we have the Flash component active. Over on the left you will see a list of tools. Scroll down to where you see Common Controls. Now right click on "common controls" and choose Choose Items.....
Now click on the middle tab, COM Components. And search for Shockwave Flash Object.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut2.gif[/IMG]
Now that we have all the components that we need. We can get started.
For this tutorial, I will be hacking the game "Flash Strike". You can get the swf from
http://fpflashfarm.com/FB49PFBFFKJ42BF/6860_test.swf.
Now go back to your VB 2008, and get your "Shockwave Flash Object" tool. And drag it from the top left corner of your form, to the bottom right corner. As seen below.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut3.gif[/IMG]
Now right click on the flash object and choose properties. Set the URL and settings as you see below.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut4.gif[/IMG]
Now hit ok and the game should load up. Now we go looking for Variables. Open the SWF Decompiler of your choice. If your using So Think, then look for your Action Folder and click the "Arrow Sign" sign next to it and click on "Main" And search for the variables that way.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut5.gif[/IMG]
Now if your using Flash Decompiler Trillix its a bit different. Open the swf file in trillix, and look for a scripts folder. Click on that and it will load the files.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut6.gif[/IMG]
Now we search for Variables. Most times a variable can be easily distinguished because its written such as
Code:
_root.kills = 0 or kills = 0
-----------------------------------------------------------------------------------
Ok now that we have our project mostly set up, and we have found some variables. We can now move on the the best part. Making the variables into hacks for our trainer.
We now must go back to our VB2008 and look at the menu on the left again. This time we are looking for "button".
Left click it and then go to your project and Left click where you want your button to be. You can adjust the size of your button while your doing this.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut7.gif[/IMG]
Now that we have our button set up, we need to look to the right at the "Properties" of the button. Look for "Text Button1"
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut8.gif[/IMG]
And change that to "Set Health"
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut9.gif[/IMG]
NOTE In vb6 the Flash object was named "ShockwaveFlash1" in Vb2008 its named "AxShockwaveFlash1"
Now we will go back to our project, and double click on the button, which will bring us to the code page. Now we need our variables we found. Which for health in this game its calculated like
Code:
_root.healthpercent = _root.lives / _root.health * 100 + "%"
So in our code window we will make it just as my next image.
[IMG]http://i270.photobucke*****m/albums/jj87/mizzioninc/tut10.gif[/IMG]
This is basically what the codes mean, Its telling the application to call upon the flash object and "set the variable" which in this case is _root.health and _root.lives to the value we enter.
Now that we have the coding in place we need to test it. So now we hit "f5" on your keyboard and it will launch our project. We go into a game, and get hit. Now click the "Set Health" button and if all goes as planned, it will reset your health up to 100%.
If it set it up as I mentioned, then our button did as it should have.
Now we need to save the project by going to the top of your vb2008 and going "file - Save All". Now you can build this trainer and make it into an .exe.
To build the trainer you will go "Build - Build "ProjectName" ".
The default location that it builds the project is:
Code:
C:\Documents and Settings\<user name>\My Documents\Visual Studio 2008/Projects\FlashStrike\FlashStrike\bin\Release
Inside the release folder you should see FIVE files, the ones you need to include with your trainer are as follows.
Code:
AxInterop.ShockwaveFlashObjects.dll
Interop.ShockwaveFlashObjects.dll
and the EXE in this cash FlashStrike.exe
Now you Zip, or Rar these files together and you have created your first trainer. I hope you enjoyed this tutorial and good luck with making flash trainers.