|
You last visited: Today at 17:12
Advertisement
Quest board packets?
Discussion on Quest board packets? within the CO2 Private Server forum part of the Conquer Online 2 category.
04/10/2014, 15:08
|
#16
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
i think pro4never has done most of it
PHP Code:
using System.Collections.Generic; using Albetros.Core.Enum;
namespace Albetros.Game.Packet { public struct QuestData { public const int SIZE = 12;
public uint MissionId; public uint Unknown1; public uint Unknown2; }
public unsafe struct QuestPacket { public QuestAction Action; public ushort Amount; private List<QuestData> _data;
public QuestData GetData(int index) { return _data[index]; }
public void AddData(uint missionId, uint unknown1, uint unknown2) { _data.Add(new QuestData { MissionId = missionId, Unknown1 = unknown1, Unknown2 = unknown2 }); Amount++; }
public static implicit operator QuestPacket(byte* ptr) { var packet = new QuestPacket(); packet.Action = *((QuestAction*) (ptr + 4)); packet.Amount = *((ushort*) (ptr + 6)); packet._data = new List<QuestData>(); for (var i = 0; i < packet.Amount; i++) { var data = new QuestData(); data.MissionId = *((uint*) (ptr + 8 + i * QuestData.SIZE)); data.Unknown1 = *((uint*) (ptr + 12 + i * QuestData.SIZE)); data.Unknown2 = *((uint*) (ptr + 16 + i * QuestData.SIZE)); packet._data.Add(data); } return packet; }
public static implicit operator byte[](QuestPacket packet) { var buffer = new byte[8 + packet.Amount * QuestData.SIZE + 8]; fixed (byte* ptr = buffer) { PacketBuilder.AppendHeader(ptr, buffer.Length, 1134); *((QuestAction*) (ptr + 4)) = packet.Action; *((ushort*) (ptr + 6)) = packet.Amount; for (var i = 0; i < packet.Amount; i++) { var data = packet.GetData(i); *((uint*) (ptr + 8 + i * QuestData.SIZE)) = data.MissionId; *((uint*) (ptr + 12 + i * QuestData.SIZE)) = data.Unknown1; *((uint*) (ptr + 16 + i * QuestData.SIZE)) = data.Unknown2; } } return buffer; } } }
unknow1 = mission state
2 = avilable
0 = accepted
1 = done.
|
|
|
04/10/2014, 19:11
|
#17
|
elite*gold: 0
Join Date: Aug 2010
Posts: 112
Received Thanks: 12
|
Quote:
Originally Posted by abdoumatrix
i think pro4never has done most of it
PHP Code:
using System.Collections.Generic;
using Albetros.Core.Enum;
namespace Albetros.Game.Packet
{
public struct QuestData
{
public const int SIZE = 12;
public uint MissionId;
public uint Unknown1;
public uint Unknown2;
}
public unsafe struct QuestPacket
{
public QuestAction Action;
public ushort Amount;
private List<QuestData> _data;
public QuestData GetData(int index)
{
return _data[index];
}
public void AddData(uint missionId, uint unknown1, uint unknown2)
{
_data.Add(new QuestData { MissionId = missionId, Unknown1 = unknown1, Unknown2 = unknown2 });
Amount++;
}
public static implicit operator QuestPacket(byte* ptr)
{
var packet = new QuestPacket();
packet.Action = *((QuestAction*) (ptr + 4));
packet.Amount = *((ushort*) (ptr + 6));
packet._data = new List<QuestData>();
for (var i = 0; i < packet.Amount; i++)
{
var data = new QuestData();
data.MissionId = *((uint*) (ptr + 8 + i * QuestData.SIZE));
data.Unknown1 = *((uint*) (ptr + 12 + i * QuestData.SIZE));
data.Unknown2 = *((uint*) (ptr + 16 + i * QuestData.SIZE));
packet._data.Add(data);
}
return packet;
}
public static implicit operator byte[](QuestPacket packet)
{
var buffer = new byte[8 + packet.Amount * QuestData.SIZE + 8];
fixed (byte* ptr = buffer)
{
PacketBuilder.AppendHeader(ptr, buffer.Length, 1134);
*((QuestAction*) (ptr + 4)) = packet.Action;
*((ushort*) (ptr + 6)) = packet.Amount;
for (var i = 0; i < packet.Amount; i++)
{
var data = packet.GetData(i);
*((uint*) (ptr + 8 + i * QuestData.SIZE)) = data.MissionId;
*((uint*) (ptr + 12 + i * QuestData.SIZE)) = data.Unknown1;
*((uint*) (ptr + 16 + i * QuestData.SIZE)) = data.Unknown2;
}
}
return buffer;
}
}
}
unknow1 = mission state
2 = avilable
0 = accepted
1 = done.
|
Though isn't complete
|
|
|
04/11/2014, 11:58
|
#18
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
Quote:
Originally Posted by hyperco
Though isn't complete
|
yeah i know
|
|
|
04/12/2014, 20:10
|
#19
|
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
|
Quote:
Originally Posted by hyperco
Though isn't complete
|
But helpful for me.
|
|
|
04/13/2014, 22:43
|
#20
|
elite*gold: 0
Join Date: Apr 2014
Posts: 17
Received Thanks: 0
|
Quote:
Originally Posted by SteveRambo
What source is that, really? What ******* moron thought that "GC" would be a good variable name? 
|
I guess this is vb net... but its no sense compared on this pserver
|
|
|
04/14/2014, 05:49
|
#21
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
|
Quote:
Originally Posted by TomSykes
I guess this is vb net... but its no sense compared on this pserver
|
C#, not VB.NET.
|
|
|
 |
|
Similar Threads
|
TQ's Quest System 99% (With Quest Board)
04/11/2014 - CO2 Private Server - 22 Replies
Hello guys, I'm here to show you my latest project.
Basically it's a Impulse's based source updated to a Recent Version, implemented with cq_action system (cq_action, cq_task, cq_statistic, cq_trap).
So it's a very flexible emulator.
My latest work on it was coding TQ's Quest System. I think there are no much people which have it working very well. I've figured it out and coded my own system, studying 1134 and 1135 Packets. The system is working very fine and it's almost done, only the...
|
AH Board Packets?
12/16/2012 - Shaiya - 0 Replies
Hey guys,
Does anyone know the packets which are sent when you put an item for sale on the auction board ? Just curious because when I used a packet editor and did the steps to see which packets were sent, nothing showed up. So does anyone know the codes or have any idea?
Thanks.
|
Astral Board quest
05/15/2010 - Cabal Online - 3 Replies
Wo bekomme ich die Quest fürs Astralboard rufen.
|
job quest packets
07/10/2009 - General Gaming Discussion - 0 Replies
any1 have wpe pro packets that have job quests coz i wanna make a hawker lvl it 2 50 then use packet 2 send me dealer quest and have a uber hawker dealer with hawker skills. and yes i thought about it my old skill tree will be taken over by dealer tree but i would still have current skill maybe so does any1 have job quest packets?? plzzzz tell me if u do im despereate :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown:...
|
All times are GMT +1. The time now is 17:13.
|
|