// Use Item
void useitem(BYTE page, BYTE slot)
{
char *useitembuffer = new char[4];
memcpy(useitembuffer, "\x0A\x05", 2);
memcpy(useitembuffer+2, &page, 1);
memcpy(useitembuffer+3, &slot, 1);
injectcts(useitembuffer, 4);
delete []useitembuffer;
}
// Cast a Buff
void buff(BYTE skillid, DWORD target)
{
char *usebuff = new char[7];
memcpy(usebuff, "\x11\x05", 2);
memcpy(usebuff+2, &skillid, 1);
memcpy(usebuff+3, &target, 4);
injectcts(usebuff, 7);
delete []usebuff;
}
// Cast a Skill
void skill(BYTE skillid, DWORD target)
{
char *skilluse = new char[7];
memcpy(skilluse, "\x17\x05", 2);
memcpy(skilluse+2, &skillid, 1);
memcpy(skilluse+3, &target, 4);
injectcts(skilluse, 7);
delete []skilluse;
}
// Sell an Item
void sellitem(BYTE page, BYTE place, BYTE count)
{
char *sellpacket = new char[5];
memcpy(sellpacket, "\x03\x07", 2);
memcpy(sellpacket+2, &page, 1);
memcpy(sellpacket+3, &place, 1);
memcpy(sellpacket+4, &count, 1);
injectcts(sellpacket, 5);
delete []sellpacket;
}
// Buy an Item
void buyitem( BYTE shopslot, BYTE amount, BYTE npcid, BYTE mapid )
{
char *buypacket = new char[8];
memcpy( buypacket, "\x02\x07", 2 );
memcpy( buypacket+2, &npcid, 1);
memcpy( buypacket+3, &mapid, 1);
memcpy( buypacket+4, "\x00\x00", 2);
memcpy( buypacket+6, &shopslot, 1 );
memcpy( buypacket+7, &amount, 1 );
injectcts( buypacket, 8 );
delete []buypacket;
}
// Pickup Item
void pickitem(DWORD itemid)
{
char *x = new char[6];
memcpy(x, "\x05\x02", 2);
memcpy(x+2, &itemid, 4);
injectcts(x, 6);
delete []x;
}
// Repair Equipment
void repaireq()
{
injectcts("\x54\x05\xFF\xFF", 4);
}
// Sitdown
void sitdown()
{
injectcts("\x06\x05\x01", 3);
}
// Standup
void standup()
{
injectcts("\x06\x05\x00", 3);
}
// Recall
void backtotown()
{
injectcts("\x06\x55", 3);
}
// Attacktarget
void attacktarget(DWORD id)
{
char *packet = new char[7];
memcpy(packet, "\x03\x05", 2);
memcpy(packet+2, &id, 4);
injectcts(packet, 6);
delete []packet;
}
// Targetmonster
void targetmonster(DWORD id)
{
injectcts("\x12\x02", 2);
char *p = new char[6];
memcpy(p, "\x05\x03", 2);
memcpy(p+2, &id, 4);
injectcts(p, 6);
delete []p;
attacktarget(id);
}
injectcts is my Inject Client to Server function.
Everyone who wants to do something with Packets
should be able to write his own one. Small tipp:
Trace back from send and youll find a Function that takes
the Packetbuffer ( not encrypted ) and the Packetsize as Arguments.
You could also reverse the Encryption of course.
If you like, Post your own ones in this Thread.






