typedef struct
{
DWORD id;
int monster_group;
int monster_type;
int name_id;
int location_id;
int race;
int grp;
int transform_level;
int level;
float size;
float scale;
float target_fx_size;
int walk_type;
int slant_type;
int visible_range;
int chase_range;
int magic_type;
union
{
unsigned int attack_flags;
struct
{
unsigned int f_first_attack:1;
unsigned int f_group_first_attack:1;
unsigned int f_response_casting:1;
unsigned int f_response_race:1;
unsigned int f_response_battle:1;
};
};
int hp;
int mp;
int attack_point;
int magic_point;
int defence;
int magic_defence;
int attack_speed;
int magic_speed;
int zero;
int accuracy;
int avoid;
int magic_accuracy;
int magic_avoid;
int taming_id;
float taming_percentage;
float taming_exp_mod;
int exp;
int jp;
int monster_skill_link_id;
int stat_id;
int ability;
int standard_walk_speed;
int standard_run_speed;
int walk_speed;
int run_speed;
int attack_range;
int hidesense_range;
int gold_drop_percentage;
int gold_min;
int gold_max;
int chaos_drop_percentage;
int chaos_min;
int chaos_max;
int exp_2;
int jp_2;
int gold_min_2;
int gold_max_2;
int chaos_min_2;
int chaos_max_2;
int drop_table_link_id;
int texture_group;
int local_flag;
char model[256];
int motion_file_id;
int weapon_type;
int camera_x;
int camera_y;
int camera_z;
float target_x;
float target_y;
float target_z;
int material;
int attack_motion_speed;
int fight_type;
} SMonsterData , *PMonsterData , *LPMonsterData;
public class scramble_map
{
public scramble_map()
{
int v3;
int i;
byte v5;
for (i = 0; i < 32; ++i)
{
map[i] = (byte)i;
}
v3 = 3;
for (i = 0; i < 32; ++i)
{
v5 = map[i];
if (v3 >= 32)
v3 += -32 * (v3 >> 5);
map[i] = map[v3];
map[v3] = v5;
v3 += i + 3;
}
for (i = 0; i < 32; ++i)
{
dmap[map[i]] = (byte)i;
}
}
public byte[] map = new byte[32];
public byte[] dmap = new byte[32];
}
private static scramble_map map = new scramble_map();
private static int bits_scramble(int c)
{
int result;
uint v2;
result = 0;
v2 = 0;
do
{
if ((((uint)1 << (int)v2) & c) != 0)
result |= 1 << map.map[v2];
++v2;
}
while (v2 < 32);
return result;
}
private static int bits_descramble(int c)
{
int result;
uint v2;
result = 0;
v2 = 0;
do
{
if ((((uint)1 << (int)v2) & c) != 0)
result |= 1 << map.dmap[v2];
++v2;
}
while (v2 < 32);
return result;
}
Code:
int t2 = Convert.ToInt32(this.monster_id);
binaryWriter.Write(BitConverter.GetBytes(bits_scramble(t2)));
[Release] +5500 Packets structure , client/packets constants 10/07/2012 - CO2 PServer Guides & Releases - 10 Replies edit : if u know nothing about packets go to this post first
explaining what is packets , and explaining a packet with details and everything
http://www.elitepvpers.com/forum/co2-pserver-disc ussions-questions/2162344-packets-packets-packets. html#post19074533
i start making my very own packet structure to use them on my new proxy but i thought of ripping them from the source
so yeah the following packets is ripped of trinity base source
right now im just providing the packets structure...
[Release] Enemy packet structure 05/08/2011 - CO2 PServer Guides & Releases - 2 Replies yo!
at the current patch the enemies aren't send by the friends packet, its a packet with ID 1041...
here is the struct/packet:
case 1041:
{
MemoryStream Stream = new MemoryStream();
BinaryWriter Writer = new BinaryWriter(Stream);
[Release] Arena Info Packet Structure 02/21/2011 - CO2 PServer Guides & Releases - 12 Replies Heya!
I hope this become an usefull release for who use an source with arena...
and i would really apreciate any help to end the other 4 packets ....
(2208,2205,2206,2207);
so... this is the structure... only... if u get it working you will see something like this in game:
http://b.imagehost.org/0760/19240804.jpg
[Release] Packet encryption / structure 10/26/2010 - General Gaming Discussion - 13 Replies =============================================
========= FANTASY TENNIS PACKET SYSTEM ========
============== by AnotherCoder ==============
=============================================
1. ENCRYPTION
2. PACKET STRUCTURE
[Release] Basic Structure for Cloud Saint's Jar 08/19/2009 - CO2 PServer Guides & Releases - 1 Replies I don't use LOTF or CoEmu but I know the quest has been release. This structure of the item packet is for the Jar. You have to find the method for adding a soul in the jar. I'm on the older client, I don't want to take the time to search...
Length -> UInt16 //I think it's 36 like the other
Type -> UInt16 //0x3F0 or 1008
UniqId -> UInt32 //Random Number
ItemId -> UInt32 //750000 for the Jar
ToKill -> UInt16 //0 to 65535
Type -> UInt16 //1 to 20 (Monster)
SubType -> UInt16 //0x01 ->...