Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
basic d2hackit module making turturial
#1
Basic Information:

Packets - A piece of information sent to and from the server.
Byte - A packet, "XX" (2) is referred as a byte.
Word - A packet, "XXXX" (4), a Word is 2 bytes.
DWORD A packet, "XXXXXXXX" ( a DWORD is 4 bytes and 2 words, this is the packet most commenly used for sending packets, (ids, if packets, etc)
Flags - Very important and useful when using "if" commands.
Comments - I probably wont be using them because Ill have the help information somewhere near it, to use the Comment trigger you type "//" then the msg - Example // Welcome to D2Hackit Module Maker.

Thats about it. lol..

First off, ~!ALL!~ D2Hackit modules use the "Source\ClientCore.cpp", I dont have the link from it, but when Starfish reads this sometime.. He'll link you .. To include ClientCore into your d2hackit files, allowing you to use the custom made commands you type.

Code:
#include "Directory\Source\ClientCore.cpp" // {with the ""}

This code goes in all of your d2 hackit modules, at the beginning of all modules. My directory is "Source\ClientCore.cpp" which means your text written CPP {C++} files are saved in the same directory as Source\ClientCore.

After that, if you dont want commands in your module, so that when you load your modules it will automatically do the shit you would put:
Code:
MODULECOMMANDSTRUCT ModuleCommands[]=
{

{NULL}
};


ModuleCommandStruct is what sets up the commands in d2hackit, such as .module 'start' / .module 'go' / .module 'stop' / etc, {NULL} means end of commands, Since there are no commands in this program you would automatically put {NULL} after MODULECOMMANDSTRUCT ModuleCommands[]= {

To use commands, ~After~ #include "Directory\Source\ClientCore.cpp"
Under it you would type

Code:

BOOL PRIVATE OnGameCommand{commandname}(char** argv, int argc); { with ";" and no {} and OnGameCommand, Example: BOOL PRIVATE OnGameCommandEnd(char** argv, int argc); }


You would make one of those for each command you want, all of them have different names, the names of them do not matter, it will not be viewed by the users.

After that, for the MODULECOMMANDSTRUCT ModuleCommands[]=, you would put:

Code:

MODULECOMMANDSTRUCT ModuleCommands[]=
{
{
"help",
OnGameCommandHelp,
},

//You do not have to setup OnGameCommandHelp, its already setup without needing to do it, for the rest of the commands you will though.

{
"end",
OnGameCommandEnd,
},

// The "end," is what they view when they type .module help, the OnGameCommandEnd is setup by you which is displayed above.

{NULL}
};

//Those two commands end the commands, to add more commands it would look something like this:

{
"commandname",
OnGameCommandName,
},
{
"commandname",
OnGameCommandName,
},
{NULL}
};

//No two OnGameCommandNames can be used twice, the same for flags/packets, once again, the {NULL} }; ends the command list.



But, AFTER 'BOOLing' the commands and AFTER #include "Directory\Source\ClientCore.cpp", BEFORE MODULECOMMANDSTRUCT, comes the ClientInfo, this is the information displayed when you load the module.

Code:

CLIENTINFO
1,0,
(
"Author", // (With The "" and the , { What is typed into this box will be displayed as 'Module' was created by "Author" })
"", // (Leave blank, useless, with the "" and the ,)
"ModuleName", // (With the "" and the , Same thing as the "Author" part that was displayed above, just with the 'Module' part, not "Author"
"" // ( Leave blank, useless, with the "" and no , )
)
// The ) ends the clientinfo




After this comes the module command struct, after all of that, it should look something like this:

Code:

#include "Source\Clientcore.cpp"

BOOL PRIVATE OnGameCommandStart(char** argv, int argc);

CLIENTINFO
(
1,0,
"RiZaeL",
"",
"Funny",
""
)
MODULECOMMANDSTRUCT ModuleCommands[]=
{
{
"help",
OnGameCommandHelp,
"Displays Help Text"
},

{
"start",
OnGameCommandStart,
"Starts Module"
},
{NULL}
};



Usually it would have your own settings, but overall, it would look like that.

After all of that, would come up the ClientStart, which would do a list of chosen commands when the module is loaded.

Code:

BOOL EXPORT OnClientStart()
{
//Setup your commands here, to display a clientside message:
server->GamePrintInfo("msg"); // The ; ends the command
return TRUE; //Ends the ClientStart module, you could add more information if you want, but in the end, thats what would end it.
} // Also that..... :p



To have it do a list of commands when the module is unloaded:
Code:

BOOL EXPORT OnClientStop()
{
server->GamePrintInfo("you exited the module"); // Just a message, customize it yourself.
returns TRUE; //Ends the ClientStop
} // That too [Image: icon_razz.gif]



To do DWORD If packets, you would use something like this:
Code:

DWORD EXPORT OnGamePacketBeforeSent(BYTE* aPacket, DWORD aLen) // Sets up the aPacket and the ending of the command, the aLen (you'll see))
{
if ( aPacket[0] == 0x03 ) // Meaning, if the packet {03} has happened, begin doing commands, packet 03 is the "run" packet.
{
server->GameCommandLine("say hi"); //GameCommandLine is a thing which will allow you to use built in d2hackit commands, without the .)
} // Ends the If statement
return aLen;
} // Ends Packet Sniffing



Ummm, I think that explained the basics, if you have any questions or want more information on something post here.

Hopefully someone will sticky this
[SIGPIC]http://yfrog.com/mhskidudecopyg[/SIGPIC]
#2
Nice tutorial. Why don't you sticky it since you obviously have the points?
#3
i was hopen a mod would do it 4 me

(hint hint)
[SIGPIC]http://yfrog.com/mhskidudecopyg[/SIGPIC]
#4
oic
#5
i need mephbot hack for version 1.11 if someone can send me the link i will be thx to you

This has totally nothing related to d2hackit. I can see this is your first post and you ask for a "mephbot hack for version 1.11". Im assuming that you mean a bot that can run meph bot-kukobot can do that..check that out on mmbot.net. Version im assuming means patch 1.11...kukobot can do that.

~Taters
#6
this thread was from 2004 please don't post in old threads

-closed-eek:
[SIGPIC]http://yfrog.com/mhskidudecopyg[/SIGPIC]


Possibly Related Threads…
Thread Author Replies Views Last Post
  .nip files is "# # [MaxQuantity] == X" possible with Basic NTbot Akao 3 243 02-05-2012, 07:04 AM
Last Post: comper
  How do I change the interval between making ng? arkheios 0 225 08-12-2011, 08:41 AM
Last Post: arkheios
  OLD d2hackit and compiling problem skyf 0 197 05-23-2011, 08:36 AM
Last Post: skyf
  Lenght between making games XsatsujinX 0 168 05-06-2011, 11:23 AM
Last Post: XsatsujinX
  Neeed Basic help with d2 NT Manager 3.1..help! drewtx84 0 330 06-16-2010, 12:53 AM
Last Post: drewtx84
  Making a return to D2 telebofh 0 237 06-09-2009, 05:53 AM
Last Post: telebofh
  Basic Itemz 4 needed!! WJWJ 2 370 01-12-2008, 01:02 AM
Last Post: WJWJ
  i need help making a script rafael1234 4 374 11-18-2007, 03:21 AM
Last Post: Sjix
  Making multiple D2 windows with different CD keys? lvlindless 1 363 07-28-2007, 01:26 AM
Last Post: slashbomb
  How d2hackit works !? Giggles 1 426 03-10-2007, 11:01 AM
Last Post: spartand117

Forum Jump:


Users browsing this thread: 1 Guest(s)