本文整理汇总了C#中FrameWork.PacketOut.WritePacketString方法的典型用法代码示例。如果您正苦于以下问题:C# PacketOut.WritePacketString方法的具体用法?C# PacketOut.WritePacketString怎么用?C# PacketOut.WritePacketString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameWork.PacketOut
的用法示例。
在下文中一共展示了PacketOut.WritePacketString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendInteract
public override void SendInteract(Player Plr, InteractMenu Menu)
{
Plr.QtsInterface.HandleEvent(Objective_Type.QUEST_SPEACK_TO, Spawn.Entry, 1);
if (!IsDead)
{
switch (InteractType)
{
case GameData.InteractType.INTERACTTYPE_DYEMERCHANT:
{
string Text = WorldMgr.GetCreatureText(Spawn.Entry);
if (Menu.Menu == 9) // List des objets a vendre
WorldMgr.SendVendor(Plr, Spawn.Entry);
else if (Menu.Menu == 11) // Achat d'un item
WorldMgr.BuyItemVendor(Plr, Menu, Spawn.Entry);
else if (Menu.Menu == 14) // Vend un Item
Plr.ItmInterface.SellItem(Menu);
else if (Menu.Menu == 36) // Rachette un item
Plr.ItmInterface.BuyBackItem(Menu);
else
{
PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE);
Out.WriteByte(0);
Out.WriteUInt16(Oid);
Out.WriteUInt16(0);
Out.WriteByte(0x40); // Dye
Out.WriteByte(0x22); // Vendors
Out.WriteByte(0);
Out.WritePascalString(Text);
Out.WriteByte(0);
Plr.SendPacket(Out);
}
} break;
case GameData.InteractType.INTERACTTYPE_FLIGHT_MASTER:
{
byte[] data = new byte[62]
{
0x01,0xF4,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x42,0x39,0x00,0x00,0x00,0xC0,0xE3,
0x03,0x39,0xA0,0xD1,0x6F,0x00,0xC8,0xA8,0x1D,0x37,0x28,0x94,0x79,0x33,0xB2,0x24,
0x32,0x44,0xDB,0xD7,0x1C,0x5D,0x18,0x5D,0xDD,0x1C,0xA4,0x0D,0x00,0x00,0xA8,0x6B,
0x21,0x36,0x11,0x00,0x00,0x00,0xC8,0xD0,0xAF,0x3A,0x78,0xD1,0x6F,0x00
};
UInt16 Counts = 1;
PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE);
Out.WriteUInt16(0x0A12);
foreach (Zone_Taxi Taxi in WorldMgr.GetTaxis(Plr))
{
Out.WriteUInt16(Counts);
Out.WriteByte(2);
Out.WriteUInt16(Taxi.Info.Price);
Out.WriteUInt16(Taxi.Info.ZoneId);
Out.WriteByte(1);
++Counts;
}
Out.Write(data);
Plr.SendPacket(Out);
}break;
case GameData.InteractType.INTERACTTYPE_TRAINER:
{
if (Menu.Menu == 7)
{
PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE);
Out.WriteByte(5);
Out.WriteByte(0x0F);
Out.WriteByte(6);
Out.WriteUInt16(0);
Plr.SendPacket(Out);
}
else
{
PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE);
Out.WriteByte(0);
Out.WriteUInt16(Oid);
if (Plr.Realm == GameData.Realms.REALMS_REALM_ORDER)
{
Out.WritePacketString(@"|00 00 00 21 00 94 48 61 69 6C |.........!..Hail|
|20 64 65 66 65 6E 64 65 72 20 6F 66 20 74 68 65 | defender of the|
|20 45 6D 70 69 72 65 21 20 20 59 6F 75 72 20 70 | Empire! Your p|
|65 72 66 6F 72 6D 61 6E 63 65 20 69 6E 20 62 61 |erformance in ba|
|74 74 6C 65 20 69 73 20 74 68 65 20 6F 6E 6C 79 |ttle is the only|
|20 74 68 69 6E 67 20 74 68 61 74 20 6B 65 65 70 | thing that keep|
|73 20 74 68 65 20 68 6F 72 64 65 73 20 6F 66 20 |s the hordes of |
|43 68 61 6F 73 20 61 74 20 62 61 79 2E 20 4C 65 |Chaos at bay. Le|
|74 27 73 20 62 65 67 69 6E 20 79 6F 75 72 20 74 |t's begin your t|
|72 61 69 6E 69 6E 67 20 61 74 20 6F 6E 63 65 21 |raining at once!|
|00 |. |");
}
else
{
Out.WritePacketString(@"|00 00 00 21 00 AA 4C 65 61 72 |.........!..Lear|
|6E 20 74 68 65 73 65 20 6C 65 73 73 6F 6E 73 20 |n these lessons |
|77 65 6C 6C 2C 20 66 6F 72 20 67 61 69 6E 69 6E |well, for gainin|
|67 20 74 68 65 20 66 61 76 6F 72 20 6F 66 20 74 |g the favor of t|
|68 65 20 52 61 76 65 6E 20 67 6F 64 20 73 68 6F |he Raven god sho|
//.........这里部分代码省略.........
示例2: SendXpTable
public void SendXpTable()
{
PacketOut Out = new PacketOut((byte)Opcodes.F_EXPERIENCE_TABLE);
Out.WritePacketString(@"|1C 00 00 00 0A 96 00 00 00 18 C4 00 00 |................|
|00 28 F0 00 00 00 39 EE 00 00 00 4F B0 00 00 00 |.(....9....O....|
|65 FE 00 00 00 82 32 00 00 00 9E C0 00 00 00 BE |e.....2.........|
|96 00 00 00 E2 04 03 00 00 00 00 00 00 01 05 0E |................|
|00 00 01 30 24 03 00 00 00 00 00 00 01 5A CC 00 |...0$........Z..|
|00 01 89 84 03 00 00 00 00 00 00 01 BC 88 00 00 |................|
|01 EE 74 03 00 00 00 00 00 00 02 29 CA 00 00 02 |..t........)....|
|63 90 03 00 00 00 00 00 00 02 A0 BC 04 00 00 00 |c...............|
|00 00 00 02 D2 6C 03 00 00 00 00 00 00 03 09 62 |.....l.........b|
|03 00 00 00 00 00 00 03 51 2E 03 00 00 00 00 00 |........Q.......|
|00 03 9F 80 03 00 00 00 00 00 00 03 EC 38 03 00 |.............8..|
|00 00 00 00 00 04 3E 04 03 00 00 00 00 00 00 04 |......>.........|
|88 64 03 00 00 00 00 00 00 04 FA 1A 03 00 00 00 |.d..............|
|00 00 00 05 9A 24 03 00 00 00 00 00 00 06 44 24 |.....$........D$|
|03 00 00 00 00 04 00 00 00 00 00 00 06 FC 2A 03 |..............*.|
|00 00 00 00 00 00 07 CE C0 03 00 00 00 00 00 00 |................|
|08 A1 9C 03 00 00 00 00 00 00 09 7F E0 03 00 00 |................|
|00 00 00 00 0A B3 42 03 00 00 00 00 00 00 0B 6E |......B........n|
|A4 03 00 00 00 00 00 00 0C 2E 02 03 00 00 00 00 |................|
|00 00 0D 00 FC 03 00 00 00 00 00 00 0D CC 8A 03 |................|
|00 00 00 00 00 00 0E A1 96 03 00 00 00 00 04 00 |................|
|00 00 00 05 00 00 00 0A 06 00 00 00 00 05 00 00 |................|
|00 50 06 00 00 00 00 05 00 00 00 E6 06 00 00 00 |.P..............|
|00 05 00 00 01 B8 06 00 00 00 00 05 00 00 02 DA |................|
|06 00 00 00 00 05 00 00 04 38 06 00 00 00 00 05 |.........8......|
|00 00 05 DC 06 00 00 00 00 05 00 00 07 D0 06 00 |................|
|00 00 00 05 00 00 0A 00 06 00 00 00 00 05 00 00 |................|
|0C 76 06 00 00 00 00 04 00 00 00 00 05 00 00 0F |.v..............|
|32 06 00 00 00 00 05 00 00 12 2A 06 00 00 00 00 |2.........*.....|
|05 00 00 15 72 06 00 00 00 00 05 00 00 18 F6 06 |....r...........|
|00 00 00 00 05 00 00 1C B6 06 00 00 00 00 05 00 |................|
|00 20 BC 06 00 00 00 00 05 00 00 25 08 06 00 00 |. .........%....|
|00 00 05 00 00 29 90 06 00 00 00 00 05 00 00 2E |.....)..........|
|54 06 00 00 00 00 05 00 00 33 5E 06 00 00 00 00 |T........3^.....|
|04 00 00 00 00 05 00 00 38 A4 06 00 00 00 00 05 |........8.......|
|00 00 3E 30 06 00 00 00 00 05 00 00 43 EE 06 00 |..>0........C...|
|00 00 00 05 00 00 49 F2 06 00 00 00 00 05 00 00 |......I.........|
|50 32 06 00 00 00 00 05 00 00 56 AE 06 00 00 00 |P2........V.....|
|00 05 00 00 5D 66 06 00 00 00 00 05 00 00 64 64 |....]f........dd|
|06 00 00 00 00 05 00 00 6B 94 06 00 00 00 00 05 |........k.......|
|00 00 73 00 06 00 00 00 00 04 00 00 00 00 05 00 |..s.............|
|00 7A A8 06 00 00 00 00 05 00 00 82 8C 06 00 00 |.z..............|
|00 00 05 00 00 8A A2 06 00 00 00 00 05 00 00 92 |................|
|FE 06 00 00 00 00 05 00 00 9B 8C 06 00 00 00 00 |................|
|05 00 00 A4 4C 06 00 00 00 00 05 00 00 AD 52 06 |....L.........R.|
|00 00 00 00 05 00 00 B6 8A 06 00 00 00 00 05 00 |................|
|00 BF F4 06 00 00 00 00 05 00 00 C9 9A 06 00 00 |................|
|00 00 03 00 00 00 00 05 00 00 D3 72 06 00 00 00 |...........r....|
|00 05 00 00 DD 86 06 00 00 00 00 05 00 00 E7 CC |................|
|06 00 00 00 00 05 00 00 F2 44 06 00 00 00 00 05 |.........D......|
|00 00 FC F8 06 00 00 00 00 04 00 00 00 00 05 00 |................|
|01 07 D4 06 00 00 00 00 05 00 01 12 EC 06 00 00 |................|
|00 00 05 00 01 1E 36 06 00 00 00 00 05 00 01 29 |......6........)|
|BC 06 00 00 00 00 05 00 01 35 6A 06 00 00 00 00 |.........5j.....|
|03 00 00 00 00 05 00 01 41 4A 06 00 00 00 00 05 |........AJ......|
|00 01 4E CE 06 00 00 00 00 05 00 01 5E 1E 06 00 |..N.........^...|
|00 00 00 05 00 01 6F 4E 06 00 00 00 00 05 00 01 |......oN........|
|82 90 06 00 00 00 00 05 00 01 98 16 06 00 00 00 |................|
|00 05 00 01 B0 12 06 00 00 00 00 05 00 01 CA AC |................|
|06 00 00 00 00 05 00 01 E8 20 06 00 00 00 00 05 |......... ......|
|00 02 08 A0 06 00 00 00 00 03 00 00 00 00 05 00 |................|
|02 2C 68 06 00 00 00 00 05 00 02 53 A0 06 00 00 |.,h........S....|
|00 00 05 00 02 7E 84 06 00 00 00 00 05 00 02 AD |.....~..........|
|5A 06 00 00 00 00 05 00 02 E0 54 06 00 00 00 00 |Z.........T.....|
|04 00 00 00 00 05 00 03 17 C2 06 00 00 00 00 05 |................|
|00 03 53 CC 06 00 00 00 00 05 00 03 94 B8 06 00 |..S.............|
|00 00 00 05 00 03 DA D6 06 00 00 00 00 05 00 04 |................|
|26 62 06 00 00 00 00 03 00 00 00 00 05 00 04 77 |&b.............w|
|A2 06 00 00 00 00 05 00 04 CE DC 06 00 00 00 00 |................|
|05 00 05 2C 56 06 00 00 00 00 05 00 05 90 6A 06 |...,V.........j.|
|00 00 00 00 05 00 05 FB 54 06 00 00 00 00 04 00 |........T.......|
|00 00 00 05 00 06 6D 6E 06 00 00 00 00 05 00 06 |......mn........|
|E6 FE 06 00 00 00 00 05 00 07 68 54 06 00 00 00 |..........hT....|
|00 05 00 07 F1 CA 06 00 00 00 00 05 00 08 83 BA |................|
|06 00 00 00 00 04 00 00 00 00 05 00 0A 47 3D 06 |.............G=.|
|00 00 00 00 05 00 0A D4 41 06 00 00 00 00 05 00 |........A.......|
|0B 61 43 06 00 00 00 00 05 00 0B EE 46 06 00 00 |.aC.........F...|
|00 00 04 00 00 00 00 05 00 0C 7B 48 06 00 00 00 |..........{H....|
|00 05 00 0D 08 4A 06 00 00 00 00 05 00 0D 95 4C |.....J.........L|
|06 00 00 00 00 05 00 0E 22 4F 06 00 00 00 00 04 |........O......|
|00 00 00 00 05 00 0E AF 51 06 00 00 00 00 05 00 |........Q.......|
|0F 3C 53 06 00 00 00 00 05 00 0F C9 55 06 00 00 |.<S.........U...|
|00 00 05 00 10 56 58 06 00 00 00 00 04 00 00 00 |.....VX.........|
|00 05 00 10 E3 5A 06 00 00 00 00 05 00 11 70 5C |.....Z........p\|
|06 00 00 00 00 05 00 11 FD 5F 06 00 00 00 00 05 |........._......|
|00 12 8A 61 06 00 00 00 00 04 00 00 00 00 05 00 |...a............|
|13 17 63 06 00 00 00 00 05 00 13 A4 65 06 00 00 |..c.........e...|
|00 00 05 00 14 31 68 06 00 00 00 00 05 00 14 BE |.....1h.........|
|6A 06 00 00 00 00 04 00 00 00 00 00 00 00 00 00 |j...............|
|00 |. |");
SendPacket(Out);
}