Quote:
Originally Posted by Fаng
Code:
// PORTAL USE:
Packet 4 -- TQClient -- Length: 38 | 46 -- Type: 10010
26 00 1A 27 2F 86 15 00 62 02 6A 03 00 00 00 00 ; & '/† bj
CF 0A E4 06 55 00 07 00 62 02 6A 03 00 00 00 00 ; Ï äU bj
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74 ; ÿÿÿÿ TQClient
//TELEPORT:
Packet 6 -- TQServer -- Length: 38 | 46 -- Type: 10010
26 00 1A 27 2F 86 15 00 33 04 00 00 00 00 00 00 ; & '/† 3
00 00 00 00 56 00 00 00 68 01 0A 00 00 00 00 00 ; V h
00 00 00 00 00 00 54 51 53 65 72 76 65 72 ; TQServer
You could always look at other sources for examples too.
|
Hum ok, but no have this code in this source =/ Where do I add this??
I think the error may be here!
private void AppendPortal(GameClient Client, DataPacket* DPacket, byte[] Packet)
{
ushort X = 0, Y = 0;
fixed (byte* Buffer = Packet)
{
X = *(ushort*)(Buffer + 12);
Y = *(ushort*)(Buffer + 14);
}
if (Database.LoadPortal(Client, X, Y))
Client.Teleport(Client.Entity.MapID, Client.Entity.X, Client.Entity.Y);
else
{
Client.Speak(Color.Turquoise, ChatType.TopLeft, "Invalid Portal MapID: " + Client.Entity.MapID + " X: " + Client.Entity.X + " Y: " + Client.Entity.Y + " Please report this.");
Client.Teleport(1002, 430, 380);
}
}