Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > World of Warcraft > WoW Guides & Templates
You last visited: Today at 20:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



How to write a WoWHackIt Module [ENG] Part2

Discussion on How to write a WoWHackIt Module [ENG] Part2 within the WoW Guides & Templates forum part of the World of Warcraft category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2004
Posts: 222
Received Thanks: 5
I am doing this code snippet all at once because if I broke it up it might become a bit more confusing that what it already is. First the

Code:
Quote:
if (hSpammerThread)
means if the SpammerThread (which is the code we skipped earlier) is not already running then it will execute the code in between the corresponding "{" "}".

Code:
Quote:
hSpammerThread = NewThread((void*)Spammer, 0);
* * * * * * delete pParse;
* * * * * * return TRUE;
This is is saying that hSpammerThread(which again is the code we skipped earlier) is going to start executing. We could have put that code here, but instead to make the code more readable and understandable, we made a new function for it.
This might be a bit hard to understand and comprehend at the moment, but once you make a few modules of your own it will become more clear. The delete pParse will always be at the end of the code of each command along with return true; These are telling the program to end this command.

Code:
Quote:
* * } else {
* * * * * * ConsolePrint (3, "Spamming thread is already running");
* * * * * * delete pParse;
* * * * * * return TRUE;
* * * * }
Again, after every command you will have an else statement, telling the program what to do if the program is already running. It is telling the program to Print to the console the text in the parentheses. Then it is deleting pParse and returning TRUE (which is any number above 1 in this case) which tells the compiler that that command is done. Again, a bit hard to comprehend, but after making a few modules of your own you will be able to understand this with ease.

Code:
Quote:
if (!strcmpi(pParse[1], "stop")
* * * {
* * * * if (hSpammerThread)
* * * * {
* * * * * * KillThread(hSpammerThread);
* * * * * * delete pParse;
* * * * * * return TRUE;
* * * * } else {
* * * * * * ConsolePrint (3, "No spamming thread is running!");
* * * * * * delete pParse;
* * * * * * return TRUE;
* * * * }*
This bit of code is excactly what I just explained except telling the program what to do when the command ".realmgx stop" or ".*your module here* *your command here*. The "KillThread" function you see in teh code tells that program to kill
that thread when the module is stopped! As you can see both delete pParse and return TRUE; are there, along with the else statement.

Code:
Quote:
* * * }
* }
* return TRUE;
}
This is ending the module. Will always be the same besides it mite only contain 2 "}" There will always be a closing bracket after the return TRUE; though.

Now before I end this tutorial I have to explain what the code we skipped did. So let's go back up to it shall we?

Code:
Quote:
void Spammer(void*)
{
* while(1)
* {
* * * ConsoleCommand("script SendChatMessage(\"Visit www.RealmGX.com\");");
* * * Sleep(1000);
* * * ConsoleCommand("script SendChatMessage(\"Home of WoWHackit!\");");
* * * Sleep(1000);
* * * ConsoleCommand("script SendChatMessage(\"Come Get Hacks, Tips, Strategies, Items, and

More!!!\");");
* * * Sleep(1000);
* }
}*
Lets go through this a few lines at a time since it is a bit overwhelming at the first glance.

Code:
Quote:
void Spammer(void*)
{
This is saying that it will return "void" which means nothing. It will not return an integer nor a string or a character, it is only doing what is inside the curly braces. The name of the function is Spammerand as you can see in the parentheses
it shows that it is returning void.

Code:
Quote:
while(1)
* {
This just means that while (1) which means never ending since the default value of a program is (1) unless otherwise specified. This also means that what ever is inside the curly braces it will repeat and repeat until the module is stopped.

Code:
Quote:

ConsoleCommand("script SendChatMessage(\"Visit www.RealmGX.com\");");
* * * Sleep(1000);
* * * ConsoleCommand("script SendChatMessage(\"Home of WoWHackit!\");");
* * * Sleep(1000);
* * * ConsoleCommand("script SendChatMessage(\"Come Get Hacks, Tips, Strategies, Items, and

More!!!\");");
* * * Sleep(1000);
This is what is repeated over and over again. First the ConsoleCommand is telling it to SendChatMessage and sending what ever is in the parentheses. The Sleep() function is telling the module to sleep for 1000 milliseconds, or 1 second.
As you can see there are semi-colons after each command, as in most functions and commands in WowHackit, and C++ in general.

Finally we end this function by ending the while loop with a curly brace and ending the entire function with yet another curly brace.
avatarius is offline  
Reply


Similar Threads Similar Threads
Undetected Module Generator V2
12/08/2007 - WarRock - 4 Replies
wer mir sagt was ich in die lücken schreiben soll bekommt das tool von mir. http://www.bilder-hochladen.net/files/thumbs/4du3 -8.jpg
How to write a WoWHackIt Module [ENG] Part3
01/16/2005 - WoW Guides & Templates - 1 Replies
Here is the entire source code that we just explained for future reference. Code: Yes, if you are wondering this module actually does work.
How to Write a WoWHackTt Module [ENG] Part1
01/16/2005 - WoW Guides & Templates - 0 Replies
Seeing as I am very bored at the moment,and people are obviously interested, I decided to make a tutorial on making modules with WowHackit. First off, before you get started on this I recommend you have knowledge of the c++ language. I will start by teaching you what goes on in my module, then when the Packet Hooks are written, and added with the WoWHackit files I will teach you packet sending and more! First off lets start with what we do at the beginning of every program. Code: ...
WoWHackIt Released
01/15/2005 - WoW Exploits, Hacks, Tools & Macros - 4 Replies
Screen Forum der Dev's



All times are GMT +1. The time now is 20:29.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.