Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Perfect World
You last visited: Today at 01:02

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

Advertisement



Packet Class PW

Discussion on Packet Class PW within the Perfect World forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2014
Posts: 7
Received Thanks: 2
Packet Class PW

Works with PW's packets for reading and writing.

Functions:


For example, you can get role nick by id (see also struct GRoleBase):

PHP Code:
<?
include("packet_class.php");
$GetRoleBase = new WritePacket();
$GetRoleBase -> WriteUInt32(-1); // always
$GetRoleBase -> WriteUInt32(1024); // userid
$GetRoleBase -> Pack(0xBC5);

if (!
$GetRoleBase -> Send("localhost"29400)) // send to gamedbd
return;

$GetRoleBase_Re = new ReadPacket($GetRoleBase); // reading packet from stream
$packetinfo $GetRoleBase_Re -> ReadPacketInfo(); // read opcode and length
$GetRoleBase_Re -> ReadUInt32(); // always
$GetRoleBase_Re -> ReadUInt32(); // retcode
$GetRoleBase_Re -> ReadUByte(); // version
$GetRoleBase_Re -> ReadUInt32(); // id
echo $GetRoleBase_Re -> ReadUString(); // show rolename
?>
Attached Files
File Type: zip packet_class.zip (1.1 KB, 23 views)
Desmond Hume is offline  
Old 04/21/2015, 19:07   #2
 
elite*gold: 0
Join Date: May 2014
Posts: 12
Received Thanks: 0
Why not just use the PacketSend?
auxiliarus is offline  
Old 04/22/2015, 09:11   #3
 
Sᴡoosh's Avatar
 
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 326
auxiliarus, you have not understoof what this is commonly used for. It's for serversided interaction.
Sᴡoosh is offline  
Old 04/24/2015, 19:18   #4
 
elite*gold: 0
Join Date: Sep 2014
Posts: 7
Received Thanks: 2
Quote:
Originally Posted by auxiliarus View Post
Why not just use the PacketSend?
Lol what?

Oh good. Try to write char's data in gamedbd via PacketSend.
And report the results right here.
Desmond Hume is offline  
Reply


Similar Threads Similar Threads
Metin2 Diffie Hellman Class, Packet Encryption
04/09/2018 - Metin2 - 1 Replies
Hello guys, lets think there is a static p, g, q values for Diffie hellman. Server sends to client 256 bytes data and client process it and sends new data with 256 bytes to server: size_t DH2KeyAgreement::Prepare(void* buffer, size_t* length) { #ifdef __THEMIDA__ VM_START #endif
[C#] Generic Packet Class
01/31/2011 - SRO Coding Corner - 9 Replies
At first I have to say I didn't done this for SRO, but offcourse you can use it. You can easily add SRO packet header support -> 2bytes(len) ... Here is it: using System; using System.Collections.Generic; - Packet Class MarshalHelper.Copy is the sample by microsoft (How to: Use Pointers to Copy an Array of Bytes (C#)) You have to allow unsafe code in your compiler.



All times are GMT +1. The time now is 01:04.


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