Register for your free account! | Forgot your password?

You last visited: Today at 17:58

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

Advertisement



Some Packets ( mostly GM )

Discussion on Some Packets ( mostly GM ) within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1

 
elite*gold: 150
Join Date: Apr 2007
Posts: 2,372
Received Thanks: 6,628
Some Packets ( mostly GM )

Maybe useful for someone

Code:
typedef void (__cdecl* SendPacketType )( char * sendpacket, int packetsize );
SendPacketType sendp = (SendPacketType)address;

void xcall( BYTE fraktion )
{
	// 0 = light 1 = dark
	char packet[3] = {0};
	strcpy_s( packet, "\x18\xFa" );
	memcpy_s( packet, 1, &fraktion, 1 );
	sendp( packet, 3 );
}

void WriteNotice( char* message )
{
	char packet[150] = {0};
	strcpy_s( packet, "\x0B\xF9\x00\x00" );
	char msglen = static_cast<char>( strlen( message ) );
	int psize = strlen( message );
	psize += 6;
	strcpy_s(packet+4, 146, &msglen );
	strcpy_s( packet+5, 145, message );
	sendp( packet, psize );
}

void bMove( float x, float y, short mapid )
{
	char packet[13] = {0};
	strcpy_s( packet, "\x0A\xFA" );
	memcpy_s( packet+2, 11, &x, 4 );
	memcpy_s( packet+6, 7, &y, 4 );
	memcpy_s( packet+10, 3, &mapid, 2 );
	sendp( packet, 0x0C );
}

void CreateNpc( BYTE Type, WORD npcid )
{
	BYTE a = 0x01;
	char packet[6] = {0};
	strcpy_s( packet, "\x0C\xF7" );
	memcpy_s( packet+2, 5, &Type, 1 );
	memcpy_s( packet+3, 4, &npcid, 2 );
	memcpy_s( packet+5, 1, &a, 1 );
	sendp( packet, 6 );
}

void DeleteNpc( BYTE Type, WORD npcid )
{
	BYTE a = 0x01;
	char packet[6] = {0};
	strcpy_s( packet, "\x0D\xF7" );
	memcpy_s( packet+2, 5, &Type, 1 );
	memcpy_s( packet+3, 4, &npcid, 2 );
	memcpy_s( packet+5, 1, &a, 1 );
	sendp( packet, 6 );
}

void CreateMonster( short mobid, BYTE numberofmobs )
{
	char packet[5] = {0};
	strcpy_s( packet, "\x04\xF7" );
	memcpy_s( packet+2, 4, &mobid, 2 );
	memcpy_s( packet+4, 1, &numberofmobs, 1 );
	sendp( packet, 5 );
}

void SendPrivateMessage( char* Message, char* Player )
{
	char Packet[256] = {0};
	// Copy OP Code
	strcpy_s( Packet, 256, "\x02\xF1" );
	// Copy Playername
	strcat_s( Packet, 256, Player );

	// Copy Message Size 

	char msglen = static_cast<char>( strlen( Message ) );
	strcpy_s( Packet+23, 256, &msglen );
	// Copy Message
	strcpy_s( Packet+24, 256, Message );

	// Send Packet

	int packetsize = strlen( Message );
	packetsize += 24;

	sendp( Packet, packetsize );
}
wurstbrot123 is offline  
Thanks
4 Users
Old 08/27/2019, 05:25   #2
 
elite*gold: 0
Join Date: May 2018
Posts: 67
Received Thanks: 4
Quote:
Originally Posted by wurstbrot123 View Post
Maybe useful for someone

Code:
typedef void (__cdecl* SendPacketType )( char * sendpacket, int packetsize );
SendPacketType sendp = (SendPacketType)address;

void xcall( BYTE fraktion )
{
	// 0 = light 1 = dark
	char packet[3] = {0};
	strcpy_s( packet, "\x18\xFa" );
	memcpy_s( packet, 1, &fraktion, 1 );
	sendp( packet, 3 );
}

void WriteNotice( char* message )
{
	char packet[150] = {0};
	strcpy_s( packet, "\x0B\xF9\x00\x00" );
	char msglen = static_cast<char>( strlen( message ) );
	int psize = strlen( message );
	psize += 6;
	strcpy_s(packet+4, 146, &msglen );
	strcpy_s( packet+5, 145, message );
	sendp( packet, psize );
}

void bMove( float x, float y, short mapid )
{
	char packet[13] = {0};
	strcpy_s( packet, "\x0A\xFA" );
	memcpy_s( packet+2, 11, &x, 4 );
	memcpy_s( packet+6, 7, &y, 4 );
	memcpy_s( packet+10, 3, &mapid, 2 );
	sendp( packet, 0x0C );
}

void CreateNpc( BYTE Type, WORD npcid )
{
	BYTE a = 0x01;
	char packet[6] = {0};
	strcpy_s( packet, "\x0C\xF7" );
	memcpy_s( packet+2, 5, &Type, 1 );
	memcpy_s( packet+3, 4, &npcid, 2 );
	memcpy_s( packet+5, 1, &a, 1 );
	sendp( packet, 6 );
}

void DeleteNpc( BYTE Type, WORD npcid )
{
	BYTE a = 0x01;
	char packet[6] = {0};
	strcpy_s( packet, "\x0D\xF7" );
	memcpy_s( packet+2, 5, &Type, 1 );
	memcpy_s( packet+3, 4, &npcid, 2 );
	memcpy_s( packet+5, 1, &a, 1 );
	sendp( packet, 6 );
}

void CreateMonster( short mobid, BYTE numberofmobs )
{
	char packet[5] = {0};
	strcpy_s( packet, "\x04\xF7" );
	memcpy_s( packet+2, 4, &mobid, 2 );
	memcpy_s( packet+4, 1, &numberofmobs, 1 );
	sendp( packet, 5 );
}

void SendPrivateMessage( char* Message, char* Player )
{
	char Packet[256] = {0};
	// Copy OP Code
	strcpy_s( Packet, 256, "\x02\xF1" );
	// Copy Playername
	strcat_s( Packet, 256, Player );

	// Copy Message Size 

	char msglen = static_cast<char>( strlen( Message ) );
	strcpy_s( Packet+23, 256, &msglen );
	// Copy Message
	strcpy_s( Packet+24, 256, Message );

	// Send Packet

	int packetsize = strlen( Message );
	packetsize += 24;

	sendp( Packet, packetsize );
}

Sorry for asking but what is this?
anon112 is offline  
Old 09/01/2019, 00:57   #3

 
elite*gold: 150
Join Date: Apr 2007
Posts: 2,372
Received Thanks: 6,628
Its for Network Communications in Shaiya
wurstbrot123 is offline  
Reply


Similar Threads Similar Threads
[Selling] EUW LvL 30 Acc mostly all Champs and mostly for every Champ 1 Skin
08/07/2016 - League of Legends Trading - 4 Replies
Hello Guys, i wanna sell my LoL EUW Acc. Level:30 Division: S1 unranked, S2 Gold, S3 bronze, S4 silber, S5 bronze Mostly all Champs and mostly for every Champ that I own 1 Skin(+some Riotskins). Much Symbols from 2014/15 (ESL) and Event Symbols. 2 Eyeskins (Football/Riot)
Packets packets packets...
10/06/2012 - CO2 Private Server - 13 Replies
I have been struggling to understand what is a Packet how could i create one with the data i want then send it to my server So please any one tell if as example i want to send some info from my client to my server, then handle them from the server how could i do that : i have my socket server, also i don't wanna copy and paste codes i want to UNDERSTAND. My PacketReader.cs
[REQUEST] packets send list , or anyway to sniff send packets
08/10/2012 - Kal Online - 16 Replies
hey everyone , as mentioned , i wanna know if anyone got a complete send packets lists or anyway i can sniff send packets , thanks in advance
EUW 1550 ELO|10k IP|A lot of skins! some unselled|Mostly all runes|Mostly all champs
05/30/2012 - League of Legends Trading - 13 Replies
Hello and welcome to my post, I'm selling this account. Wich has non-selled skins, 10k IP 1550 ELO, nearly all runes and nearly all champs I'm selling this for a decent price not accepting stupid offers, please just serious offers. Accepting Paypal. Pictures: General Info: general info Skins: skinstext
[Packets] Wie änder ich flyff packets?
07/16/2011 - Flyff Private Server - 19 Replies
HeyHo, Ich würde sehr gerne wissen wie man die Flyff Packets ändert... ich denke mal Zahlen ändern werden nicht ausreichen oder?



All times are GMT +2. The time now is 17:58.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.