Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 General

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 28.10.2007, 22:00   #4
GMan
Guest
 
Posts: n/a
Default Cached C#

easyest is to use the dll from the petition server NC.Toolnet.dll or something like that name. it has all the packed creating stuff.but you would need to create a receive and send function. heres our send function from our petition client

Code:

Code:
        public void SendPacket(Packer p)
        {
            lock (mSenderMutex)
            {
                byte[] sourceArray = p.ToArray();
                int num = sourceArray.Length - 1;
                byte[] destinationArray = new byte[num + 3];
                destinationArray[0] = (byte)(num & 0xff);
                destinationArray[1] = (byte)((num & 0xff00) >> 8);
                Array.Copy(sourceArray, 0, destinationArray, 2, sourceArray.Length);

                GetStream().Write(destinationArray, 0, destinationArray.Length);
                GetStream().Flush();
            }
        }
so basically what you want to do is


Packer p = new Packer((byte) (PacketType.KICK));

p.addint32(char_id);

p.addstring(GMName);

SendPacket(p);


hope this helps you out

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 29 October 2007. Открыть источник.
 
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:54.