Hey Guys!
I'm finally doing my tutorial on the loader that my team is using!
I will give you a fairly standard loader lay-out, because it's quite easy to customize it.
You can find really much source codes on the internet if you want to!
![=]](/forum/images/emotions/=].gif)
I hope you know a little bit more about the coding language and my loader!
Let's get started!
Step 1
The coding language that we will use is called: AutoIt!
Download the .rar file in the attachments.
Then open up AutoIt.exe and install that program.
After that, install SciTE.exe!
Step 2
If you're running Windows Vista or 7 then do this: (For Windows XP or lower, go to Step 3!)
Go to the Windows start menu and find "SciTE".
Right-click on that one and click on "Properties".
Go to the tab "Compatibility" and click on the checkbox "Run as Administrator". This one has to be checked!
![=]](/forum/images/emotions/=].gif)
Then just click on "OK"
Step 3
Find a place where you want to create the loader. Right-click there with you're mouse.
Click on "New", then on "AutoIt V3 Script".
Give the file a name. (Like "Loader")
Then right-click on the new created file and click on "Edit Script". (If you get a UAC pop-up, just click on "Yes")
First, delete all the things that are in the file, so that you have a completely empty file!
Then, find the hack .dll file you want to use! Copy that file to the same location as your script.
Also create a background or download one from the internet. The size can be whatever you want, as long as it's an .jpg file!
Last, find an icon file. I just choose the standard CrossFire icon. You can find this in your CrossFire Folder! Copy that one to your loader location to!
Then you're good to go!
Step 4
Take a little bit of time and decide for wich type of CrossFire you're going to make the loader.
Why is that quite important?
I'll explain it:
For CrossFire NA: First, the location of the CrossFire folder is different. Second, u have to use mlang.dll.
For CrossFire Europe: Again, the location is different and u can use sxs.dll.
Also: I have different names for the loaders, so you can easily tell for witch version of CrossFire it is, and wich version of the hack it is!

If you have decided all these things, make sure you keep these things in mind, so you do it right in the coding part!
Step 5
The real coding work!
First, let's make sure that the script will ALWAYS run as Administrator! Add this code to the beginning:
Then, let's get the files - that we have made ready for use - inside the script:
Code:
DirCreate(@AppDataDir & "/myLoaderCache") ;This creates the location to store the files we are going to use! It creates it in the appdata dir. As good as no-one will look there!:D
FileSetAttrib(@AppDataDir & "/myLoaderCache","+H") ;This makes this folder hidden, so no-one is going to mess it up
FileInstall("./sxs.dll",@AppDataDir & "\myLoaderCache\sxs.dll") ;This Copy's the hack dll(This one is for CrossFire Europe. mlang.dll is for CrossFire NA. If you want a CrossFire NA loader, change ALL the sxs.dll words to mlang.dll
FileInstall("./background.jpg",@AppDataDir & "\myLoaderCache\background.jpg") ;This Copy's the Background image
Sleep(1000) ;You have to wait with starting up the program, otherwise the background won't show up on the slower computers!
After you have done that, let's create our CrossFire location selection form!
Code:
$loc1 = FileSelectFolder("Select Your CrossFire Europe Folder","",0,"C:\SG Interactive\Crossfire Europe") ;Selecting our CrossFire folder, and storing it into a variable so whe can use it later! Change the locations for use with CrossFire NA!
If @error = 1 Then
error1() ;If he closes the box or click's on cancel, the loader will exit, and clean up the files. We will explain this function later.
EndIf
Now it's finally time to create our MAIN GUI! (Graphical User Interface):
It work's this way:
The GuiCreate statement work's like this: GuiCreate("Name",Width,Height{,Left,Top}) (Left and Top are not really needed! Without them, it will center in the middle!

)
The GuiCtrlCreate... statement work's like this: GuiCtrlCreate...("Name",Distance From Left,Distance From Right,Width,Height)
Keep that in mind while you're coding!
Code:
GuiCreate("Our CrossFire Europe Hack V1 Loader",600,420) ;Create a GUI. Make this one exactly as big as your image PLUS 20 pixels for the menu!
$pic1 = GUICtrlCreatePic(@AppDataDir & "\myLoaderCache\background.jpg",0,0,0,0); This creates the background image.
GUICtrlSetState($pic1, $GUI_DISABLE) ;This turn's the image of, so it is in the background, and NOT over the controls!
$button1 = GuiCtrlCreateButton("Activate",25,25,220,150) ;The activate button
$button2 = GuiCtrlCreateButton("Deactivate",300,25,220,150) ;The deactivate button
$button3 = Guictrlcreatebutton("Start CrossFire Europe",190,280,220,30) ;The button to start CrossFire Europe
$menu1 = GUICtrlCreateMenu("File") ;This creates a menu called "File"
$menu2 = GUICtrlCreateMenu("Help") ;This creates a menu called "Help"
$menuoption1 = GUICtrlCreateMenuItem("Exit",$menu1) ;This creates the option "Exit" in the menu "File"
$menuoption2 = GUICtrlCreateMenuItem("Help",$menu2) ;This creates the option "Help" in the menu "Help"
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($button1), "wstr", 0, "wstr", 0) ;This is to remove all the current lay-out of the buttons, so we can change it.
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($button2), "wstr", 0, "wstr", 0) ;Some of you might start thinking: "Why? It's possible witout!" Yes, but not on all systems!
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($button3), "wstr", 0, "wstr", 0) ;And the one for the last button!:)
GUICtrlSetBkColor($button1, 0x333333) ;Setting the Background Color For the buttons
GUICtrlSetBkColor($button2, 0x333333) ;Enter the Color in Hex! How that works:
GUICtrlSetBkColor($button3, 0x333333) ;Pick your Color in RGB and add 0x at the beginning!
GUICtrlSetColor($button1, 0xffffff) ;Seting the text color of the buttons!
GUICtrlSetColor($button2, 0xffffff) ;It uses the same system as the background colors!
GUICtrlSetColor($button3, 0xffffff) ;Final one!
GuiSetState(@SW_SHOW) ;Set the GUI state to visable!
Now, make it possible for the user to do something:
Code:
While 1 ;Let our GUI react to the users input! So that something happens if he clicks a button. And to make that our GUI is going to stay on the screen, and not directly going away!
$msg = GuiGetMsg() ;Getting the users input from the GUI that we created.
If $msg = $GUI_EVENT_CLOSE Then stop() ;If the user want's to close the GUI, then the function stop() will be done!
If $msg = $button1 Then button1() ;If the Activate button is clicked, the function button1() will be executed.
If $msg = $button2 Then button2() ;Same here for the button Deactivate
If $msg = $button3 Then button3() ;Starting CrossFire Europe
If $msg = $menuoption1 Then option1() ;This is our "Exit" option in the menu "File"
If $msg = $menuoption2 Then option2() ;This is our "Help" option in the menu "Help"
Wend ; End that While statement. Time to add our Functions!
Now we will add the functions for our loader!
Code:
Func button1() ;The function for the activate button!
FileCopy(@AppDataDir & "\myLoaderCache\sxs.dll",$loc1 & "\sxs.dll",1) ;This copies the hack file to your CrossFire location!
MsgBox(64,"Hack Activated","The Hack Is Succesfully Activated!") ;Let's the user know that the hack is activated!
EndFunc ;End of the activate function
Func button2() ;The function for the deactivate button!
FileDelete($loc1 & "\sxs.dll") ;Remove the hack file from the CrossFire location!
MsgBox(64,"Hack Deactivated","The hack Is Deactivated!") ;Gives the user a message box, saying that the hack is deactivated!
EndFunc ;End of the deactivate function
Func stop() ;The function to stop the launcher!
DirRemove(@AppDataDir & "\myLoaderCache",1) ;Removes the folder that we use to store the files that we need!
MsgBox(0,"Your Name Here!","Thanks For using!") ;Gives the user a messagebox, saying "Thanks For Using!"
Exit ;Exit's the launcher!
EndFunc ;End of the stop function!
Func option1() ;The function for the menu option "Exit" in the menu "File"!
stop() ;This just executes the function stop()
EndFunc ;End of the function for the menu option "Exit"
Func option2() ;The function for the menu option "Help" in the menu "Help"
ShellExecute("http://www.mpgh.net/forum/members/590240-berryh.html") ;Give the user a message box, let them go to your profile, or whatever you want!
EndFunc ;End of the function for the menu option "Help"
Func error1() ;This is the function for the "Select CrossFire Location" Dialog!
DirRemove(@AppDataDir & "\myLoaderCache",1) ;Just removes the folder we created to store our things!
Exit ;This just exit's the loader!
EndFunc ;End of the function for the "Select CrossFire Location" Dialog!
Func button3() ;This is the function for the button "Start CrossFire Europe"
Beep(1000,1000) ;This is the frustrating beep!:D
ShellExecute("patcher_cf","",$loc1) ;This executes patcher_cf.exe in the CrossFire Europe location that we have selected!
DirRemove(@AppDataDir & "\myLoaderCache",1) ;Remove the Folder that we created to store our files that we needed!
Exit ;This just exit's the loader
EndFunc ;End of the function for the "Start CrossFire Europe" Button!
Step 6
Create an .exe file out of this!
Click on the menu "Tools" in the SciTE editor.
Then click on "Compile".
Click on the button at the end of the option "Target x86" and choose the destination to save the .exe file to!
Then click on the button at the end of the option icon, and select your .ico file. We have saved that one in our loader location!
Then go to the tab "Resource Update" and type in the things you want to, like the "FileVersion"
Then click on the button "Compile Script" to make an .exe file out of it!
That's about it! Thank you for reading it!
There is a complete example in the attachment file that you have downloaded!
All the files used are in the map "Loader" in the attachment file!
Good luck with the code! If you have any questions, just mail me at
berryhmpgh@hotmail.com or send me a PM!
Virusscans:
VirusTotal
Sorry, only ONE virusscan this time! The other virusscanners like Jotti and VirScan are freaking me out, because they can't really handle files this big!
The viruses are again false positives! The are in the installer files i tought. I'm serious, that's not going to do anything to you! Just false positives!
Fast Approval should be great!

A Sticky to!
Greetings,
@berryh