CrazyClient: Full source and setup tutorial

Posts 115 of 51 · Page 1 of 4
CrazyClient: Full source and setup tutorial
I originally wanted to release the source after my vacation was over but because of Riigged's release I am giving out the full source to my client now. You can find it in my github SometimesRain/crazyclient. All contributions are welcome.

Setup tutorial

Download and install FlashDevelop. It will ask which SDKs you would like to install at some point of the installation or when first time opening the program. You'll only need Flex SDK.

When the program is open choose "Open an existing project" on the project window. Choose WebMain.as3proj. Now you need to choose Project menu option on the top row and make sure the platform is Flash Player 11.2.

If you want to debug the project get a debug projector and go to Tools -> Program Settings -> Plugins -> FlashViewer and set the external player path to the debug projector. Now when you want to debug you select "Debug" on the dropdown menu and press the green run button. When you want a release build, it's better to press the cog and run the client from your bin folder. This way the slower debug projector will only be used for debugging.

When debugging the projector will attach to the IDE. If the projector crashes, the IDE will show you the function that failed. You can view all variable values by hovering your mouse over them. I'm hoping someone finds a fix to that never loading to nexus bug.

Important classes

HUDView.as - HUD elements
Player.as - Player code
Projectile.as - Projectiles and status effects
Parameters.as - Default hotkeys (They need to be set)
MapUserInput.as - Custom hotkeys
Options.as - Custom options
GameServerConnectionConcrete.as - Packet related stuff
TextHandler.as - Chat triggered functionality
ParseChatMessageCommand.as - Custom commands

ActionScript oddities

var obj:Object = param1 || new Object();
Sets obj to param1 if param1 != null else creates a new Object.

boolean && doSomething();
Calls the function if boolean is true. Decompiler language.

Use vectors instead of arrays
var vect:Vector.<int> = new <int>[1,2,3];

Clearing a vector
vect.length = 0;
I am not joking. This is the best way to clear a vector. Applies to arrays as well.

No block scope
Code:
if (bool) {
    var str:String = "Enabled";
}
trace(str); //prints the value, undefined if bool = false
A good practice is to define variables in the beginning of a function and reuse them when possible

Integers are booleans (0 = false, other values = true)
Code:
var i:int = 0;
if (i) {
    trace("not called");
}
No function overloading (this causes compiler error)
Code:
private function add(a:Number, b:Number):Number {
    return a+b;
}

private function add(a:String, b:String):int {
    return parseInt(a)+parseInt(b);
}
Dictionaries are a total nightmare, try to avoid them. Looping through them causes trouble and they don't even have a length/size field.

IDE tips

If you need an import, start declaring a variable. If you want to import com.company.assembleegameclient.objects.Player you could write the following:
var p:Play
Now you're given a list of options to import. Select the correct one and remove the line you just wrote if it's unnecessary.

If you ever need to find a specific piece of code it's better to use a grepping software such as AstroGrep to go through the source.
sorry about that lol but thanks, been wanting to play around with the client and add some of my own modifications to it;p
since mine is somewhat bugged and this is official, mine shall be deleted @059 @Ahl http://www.mpgh.net/forum/showthread.php?t=1241634

- - - Updated - - -


a wonderful release thanks
This deserves all the thanks in the world. I respect you, good job!
CrazyJani, You have no idea how much you help to the hacking community. The stuff you do are just amazing. The stuff you do are actually the biggest RotMG hacks there are.
I have a question. If I want to decompile a flash file, how do I do that? In JPEXS I only know how to edit it and save it, not how to "extract" all the files into a folder.
Quote Originally Posted by lolization View Post
CrazyJani, You have no idea how much you help to the hacking community. The stuff you do are just amazing. The stuff you do are actually the biggest RotMG hacks there are.
I have a question. If I want to decompile a flash file, how do I do that? In JPEXS I only know how to edit it and save it, not how to "extract" all the files into a folder.
if youre looking to decompile his client, no need to, he just released the source in this thread
if youre looking to decompile any other client, then yeah, use jpexs and right click scripts folder and export it, or even better use AS3 sorcerer (find a crack) and export it with that because jpexs messes with the code and causes 10x more errors than as3 sorcerer would

- - - Updated - - -

Mind listing a full list of all currently known bugs? @CrazyJani
I opened up the project, tried to run it without any change (pressed the "test project" button that is the Blue arrow) and it says "[Fault] exception, information=TypeError: Error #2007: Parameter type must be non-null." Have I done something wrong?
Quote Originally Posted by lolization View Post
I opened up the project, tried to run it without any change (pressed the "test project" button that is the Blue arrow) and it says "[Fault] exception, information=TypeError: Error #2007: Parameter type must be non-null." Have I done something wrong?
Select "Release" on the dropdown menu and press the cog to build. Run the client from your bin folder.
Oh shit, I have a tutorial for cracking Flash Develop. It may come in handy now :O
Quote Originally Posted by SlickEashy View Post
Oh shit, I have a tutorial for cracking Flash Develop. It may come in handy now :O
FlashDevelop is free.
Quote Originally Posted by CrazyJani View Post
FlashDevelop is free.
Premium isn't

- - - Updated - - -

OMFG IM RETARDED I WAS THINKING OF FLASH BUILDER

WHICH ISNT FREE
trying to do an anti pet stasis hack, can someone help me ?
Quote Originally Posted by Cybermariow View Post
trying to do an anti pet stasis hack, can someone help me ?
This is already implemented.
well i "fixed" character deletion if its even considered fixing, was just a bunch of code commented out n whatnot

works how its supposed to, checked same acc logged into appspot and character was shown deleted on their as well so ya lol
button just pretty much should be repositioned if anything















update currently doing
Quote Originally Posted by Riigged View Post
well i "fixed" character deletion if its even considered fixing, was just a bunch of code commented out n whatnot

works how its supposed to, checked same acc logged into appspot and character was shown deleted on their as well so ya lol
button just pretty much should be repositioned if anything















update currently doing
i want that
Quote Originally Posted by Riigged View Post
well i "fixed" character deletion if its even considered fixing, was just a bunch of code commented out n whatnot
Hmm? Now how do you imagine that'd look if I had a character with a long name.

 
Answer

Not very good.


Quote Originally Posted by Riigged View Post
update currently doing
I've seen that on private servers and I don't think that's a very good idea. It'll be a pain to manage and not very helpful. Not to claim that all my additions are terribly helpful either...
Posts 115 of 51 · Page 1 of 4

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?