Register for your free account! | Forgot your password?

You last visited: Today at 16:11

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

Advertisement



C++ Packet Functions

Discussion on C++ Packet Functions within the Shaiya Hacks, Bots, Cheats & Exploits forum part of the Shaiya category.

Reply
 
Old   #1

 
elite*gold: 150
Join Date: Apr 2007
Posts: 2,394
Received Thanks: 6,644
C++ Packet Functions

// 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.
wurstbrot123 is offline  
Thanks
11 Users
Reply


Similar Threads Similar Threads
All Quest Functions Over 670 functions
06/08/2013 - Metin2 PServer Guides & Strategies - 21 Replies
Gretings this is very simple tut ther is all organized quest functions based on last pub rev 2089 If you know some quest functions is not ther let me know "if valid function of corse" addimage addmapsignal add_bgm_info



All times are GMT +1. The time now is 16:12.


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.