Shifu-Hacks Blog


Basic Variable Hacking

Posted by compactwater on August3 2007

This is where Neopets comes in. By modifying ‘variables’ you can change what happens in the game. If you’re used to Borland Delphi (děl’fī’) or Visual Basic, this will be easy for you. Modifying variables can be done a few ways, and one is quite simple. By adding ‘?’ at the end of a swf url, you can change variables.


But the effects would be temporary, if they were re-set during game-play, it would not work. That’s where Delphi (Or VB) comes in. With Delphi, you can use the ActiveX ShockwaveFlash element to modify variables during game-play, and also do some other neat tricks, but for now, keeping it simple.

To install, click ‘Components’ and ‘Import ActiveX Control’. Note: You must have Adobe Shockwave/Flash installed, or it will not be available, and if you install it after running Delphi, you may need to re-start. Now, find Shockwave Flash and Install it.Delphi Shockwave Flash

After installing, you can find it in the ‘ActiveX’ tab. Double-click it to add the control to your project. Note: The graphics will be messed. The Shockwave Flash control’s name will automatically be ‘ShockwaveFlash1’, if you want to change it, just remember what you name it.

In order to load a game, you must know it’s exact url. To find the url, you must look at the page’s source. In Firefox, press Ctrl+U to view the page’s source, then Ctrl+F to search for ‘.swf’. If you don’t find anything, you could be looking at a frame, or the page has loaded through an IFRAME.

When you find the url, goto Delphi and add a button to your project. Double-click on it and type: Shockwaveflash1.LoadMovie(0, ‘‘);

That will load the game into your ShockwaveFlash control. Changing variables can be just as simple, but you may need to decompile the game. For this, I recommend Sothink SWF Decompiler. To download the game from the Internet, you may want to use wget (Requires Perl) FlashGet, or a custom download method.

After downloading the game, open it with Sothink SWF Decompiler. Search in the ‘action-script’ on ‘Main Movie’ and find where it says ‘var’, or anyother obvious things, such as ‘health’ and ‘ammo’. That is where you will find what you need to hack the game. Note: Some games are encrypted, and are harder, but not impossible, to hack.

In order to change a variable, you must know what the variable’s name is (duh). To do so, it’s another simple 1-line command.

ShockwaveFlash1.SetVariable(‘Variable_Name’, ‘Value’);
ShockwaveFlash1.SetVariable(‘health’, ‘1000’);

When setting a variable, everything is considered a string, even if it is an integer. A common compile error is Incompatible types: ‘WideString’ and ‘Integer’. You cannot set a string to an integer, you must use ‘ and ‘ around the number, to make it a string. If you wanted the user to be able to set the variable, make an edit box, and then use:
ShockwaveFlash1.SetVariable(‘health’, Edit1.Text);

That will let the user set the variable to whatever they like.


One Response to “Basic Variable Hacking”

  1. Godfather said

    I ended up double clicking on the TShockwaveFlash object that I placed on my form and nothing happened. Nothing changed and no On”Event” thing happened… should I reinstall the component or something?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: