using Conquer_Online_Server.Client;
using System;
namespace Conquer_Online_Server.Network.GamePackets
{
public class chi : Writer
{
private byte[] Buffer = new byte[47];
public uint Chi
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 10);
}
set
{
Writer.WriteUInt32(value, 10, this.Buffer);
}
}
public uint open
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 18);
}
set
{
Writer.WriteUInt32(value, 18, this.Buffer);
}
}
public uint type
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 22);
}
set
{
Writer.WriteUInt32(value, 22, this.Buffer);
}
}
public uint type1
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 30);
}
set
{
Writer.WriteUInt32(value, 30, this.Buffer);
}
}
public uint strik
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 31);
}
set
{
Writer.WriteUInt32(value, 31, this.Buffer);
}
}
public uint pstrik
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 35);
}
set
{
Writer.WriteUInt32(value, 35, this.Buffer);
}
}
public uint phattak
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 23);
}
set
{
Writer.WriteUInt32(value, 23, this.Buffer);
}
}
public uint hp
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 27);
}
set
{
Writer.WriteUInt32(value, 27, this.Buffer);
}
}
public chi(uint clientID)
{
Writer.WriteUInt16(39, 0, this.Buffer);
Writer.WriteUInt16(2534, 2, this.Buffer);
this.Buffer[25] = 10;
Writer.WriteUInt32(clientID, 6, this.Buffer);
}
public void Send(GameState client)
{
client.Send(this.ToArray());
}
public byte[] ToArray()
{
return this.Buffer;
}
}
}
Code:
using System;
using System.Collections.Generic;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public class ChiInfo : Writer, Interfaces.IPacket
{
public enum ChiAction
{
Unlock = 0,
QueryInfo = 1,
Study = 2,
BuyStrength = 3,
}
public enum ChiPowerType
{
None = 0,
Dragon = 1,
Phoenix = 2,
Tiger = 3,
Turtle = 4
}
public enum ChiAttribute
{
None = 0,
CriticalRate,
MagicCriticalRate,
AntiMagicCriticalRate,
CrashAttack,
CrashDefense,
MaxLife,
AddAttack,
AddMagicAttack,
AddMagicDefense,
FinalAttack,
FinalMagicAttack,
FinalDefense,
FinalMagicDefense
}
byte[] Buffer;
public ChiInfo(bool Create)
{
if (Create)
{
Buffer = new byte[168 + 8];
WriteUInt16(168, 0, Buffer);
WriteUInt16(2533, 2, Buffer);
}
Strings = new List<string>();
}
public uint Type
{
get { return BitConverter.ToUInt32(Buffer, 4); }
set { WriteUInt32(value, 4, Buffer); }
}
public ulong dwParam
{
get { return BitConverter.ToUInt64(Buffer, 8); }
set { WriteUInt64(value, 8, Buffer); }
}
public ushort wParam1
{
get { return BitConverter.ToUInt16(Buffer, 8); }
set { WriteUInt16(value, 8, Buffer); }
}
public ushort wParam2
{
get { return BitConverter.ToUInt16(Buffer, 10); }
set { WriteUInt16(value, 10, Buffer); }
}
public uint dwParam2
{
get { return BitConverter.ToUInt32(Buffer, 16); }
set { WriteUInt32(value, 16, Buffer); }
}
public uint dwParam3
{
get { return BitConverter.ToUInt32(Buffer, 20); }
set { WriteUInt32(value, 20, Buffer); }
}
public uint dwParam4
{
get { return BitConverter.ToUInt32(Buffer, 24); }
set { WriteUInt32(value, 24, Buffer); }
}
//Thanks to ImmuneOne, who fixed the strings offsets, I managed to get nobility done.
public byte StringCount
{
get { return Buffer[32]; }
set { Buffer[32] = value; }
}
public List<string> DecodedStrings
{
get
{
List<string> list = new List<string>(StringCount);
int offset = 33;
for (int count = 0; count < StringCount; count++)
{
byte stringLength = Buffer[offset]; offset++;
string String = Encoding.UTF7.GetString(Buffer, offset, stringLength);
offset += stringLength;
list.Add(String);
}
return list;
}
}
public List<string> Strings;
public void UpdateString(Game.ConquerStructures.NobilityInformation info)
{
string buildString = info.EntityUID + " " + info.Donation + " " + (byte)info.Rank + " " + info.Position;
buildString = (char)buildString.Length + buildString;
Strings.Add(buildString);
}
public void ListString(Game.ConquerStructures.NobilityInformation info)
{
string buildString = info.EntityUID + " " + info.Gender + " 0 " + info.Name + " " + info.Donation + " " + (byte)info.Rank + " " + info.Position;
buildString = (char)buildString.Length + buildString;
Strings.Add(buildString);
}
public void Send(Client.GameState client)
{
client.Send(ToArray());
}
public byte[] ToArray()
{
if (Strings.Count == 0)
return Buffer;
string theString = "";
for (int count = 0; count < Strings.Count; count++)
{
theString += Strings[count];
}
byte[] newBuffer = new byte[168 + 8 + theString.Length];
Buffer.CopyTo(newBuffer, 0);
WriteUInt16((ushort)(newBuffer.Length - 8), 0, newBuffer);
newBuffer[34] = (byte)Strings.Count;
WriteString(theString, 35, newBuffer);
return newBuffer;
}
public void Deserialize(byte[] buffer)
{
Buffer = buffer;
}
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public enum ChiGate // byte
{
Dragon = 1,
Tiger = 2,
Phoneix = 3,
Turtle = 4 //build
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
class ChiInfoStruct2
{
public ChiInfo.ChiPowerType Type { get; set; }
public int Attrib1 { get; set; }
public int Attrib2 { get; set; }
public int Attrib3 { get; set; }
public int Attrib4 { get; set; }
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public class ChiStats : Writer, Interfaces.IPacket
{
byte[] mData;
public ChiGate ChiGate
{
get
{
return (ChiGate)mData[22];
}
set
{
mData[22] = (byte)value;
}
}
public uint ChiPoints
{
get
{
return BitConverter.ToUInt32(mData, 10);
}
set
{
WriteUInt32(value, 10, mData);
}
}
public uint Identifier
{
get
{
return BitConverter.ToUInt32(mData, 6);
}
set
{
WriteUInt32(value, 6, mData);
}
}
public ushort Unknown1
{
get
{
return BitConverter.ToUInt16(mData, 4);
}
set
{
WriteUInt16(value, 4, mData);
}
}
public uint Unknown2
{
get
{
return BitConverter.ToUInt32(mData, 14);
}
set
{
WriteUInt32(value, 14, mData);
}
}
public uint Unknown3
{
get
{
return BitConverter.ToUInt32(mData, 18);
}
set
{
WriteUInt32(value, 18, mData);
}
}
public uint Val1
{
get
{
return BitConverter.ToUInt32(mData, 24);
}
set
{
WriteUInt32(value, 24, mData);
}
}
public uint Val2
{
get
{
return BitConverter.ToUInt32(mData, 28);
}
set
{
WriteUInt32(value, 28, mData);
}
}
public uint Val3
{
get
{
return BitConverter.ToUInt32(mData, 32);
}
set
{
WriteUInt32(value, 32, mData);
}
}
public uint Val4
{
get
{
return BitConverter.ToUInt32(mData, 36);
}
set
{
WriteUInt32(value, 36, mData);
}
}
/* public static implicit operator byte[](ChiStats d)
{
return d.mData;
}*/
public ChiStats()
{
mData = new byte[39 + 8];
WriteUInt16(39, 0, mData);
WriteUInt16(2534, 2, mData);
}
public static ChiStats ChiStats22(byte[] d)
{
var packet = new ChiStats();
packet.mData = d;
return packet;
}
public byte[] ToArray()
{
return mData;
}
public void Send(Client.GameState client)
{
client.Send(mData);
}
public void Deserialize(byte[] buffer)
{
mData = buffer;
}
} // class ChiStats
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public class ChiSystem : Writer, Interfaces.IPacket
{
byte[] mData;
public ChiSystem()
{
mData = new byte[16];
WriteUInt16((ushort)mData.Length, 0, mData);
WriteUInt16(2533, 2, mData);
}
public uint Identifier
{
get
{
return BitConverter.ToUInt32(mData, 4);
}
set
{
Writer.WriteUInt32(value, 4, mData);
}
}
public byte StudyFlag
{
get
{
return mData[11];
}
set
{
mData[11] = value;
}
}
public enum ChiSystemType : ushort
{
Unlock = 0,
Open = 1,
Study = 2,
CPFillChi = 3
}
public ChiSystemType Type
{
get
{
return (ChiSystemType)BitConverter.ToUInt16(mData, 8);
}
set
{
Writer.WriteUInt32((ushort)value, 8, mData);
}
}
public byte Unknown1
{
get
{
return mData[10];
}
set
{
mData[10] = value;
}
}
public uint Unknown2
{
get
{
return BitConverter.ToUInt32(mData, 12);
}
set
{
Writer.WriteUInt32(value, 12, mData);
}
}
/* public static implicit operator byte[](ChiSystem d)
{
return d.mData;
}*/
public ChiSystem(byte[] d)
{
mData = new byte[d.Length];
d.CopyTo(mData, 0);
}
public byte[] ToArray()
{
return mData;
}
public void Send(Client.GameState client)
{
client.Send(mData);
}
public void Deserialize(byte[] buffer)
{
mData = buffer;
}
} // class ChiSystem
}
using Conquer_Online_Server.Client;
using System;
namespace Conquer_Online_Server.Network.GamePackets
{
public class chi : Writer
{
private byte[] Buffer = new byte[47];
public uint Chi
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 10);
}
set
{
Writer.WriteUInt32(value, 10, this.Buffer);
}
}
public uint open
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 18);
}
set
{
Writer.WriteUInt32(value, 18, this.Buffer);
}
}
public uint type
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 22);
}
set
{
Writer.WriteUInt32(value, 22, this.Buffer);
}
}
public uint type1
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 30);
}
set
{
Writer.WriteUInt32(value, 30, this.Buffer);
}
}
public uint strik
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 31);
}
set
{
Writer.WriteUInt32(value, 31, this.Buffer);
}
}
public uint pstrik
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 35);
}
set
{
Writer.WriteUInt32(value, 35, this.Buffer);
}
}
public uint phattak
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 23);
}
set
{
Writer.WriteUInt32(value, 23, this.Buffer);
}
}
public uint hp
{
get
{
return Conquer_Online_Server.BitConverter.ToUInt32(this.Buffer, 27);
}
set
{
Writer.WriteUInt32(value, 27, this.Buffer);
}
}
public chi(uint clientID)
{
Writer.WriteUInt16(39, 0, this.Buffer);
Writer.WriteUInt16(2534, 2, this.Buffer);
this.Buffer[25] = 10;
Writer.WriteUInt32(clientID, 6, this.Buffer);
}
public void Send(GameState client)
{
client.Send(this.ToArray());
}
public byte[] ToArray()
{
return this.Buffer;
}
}
}
Code:
using System;
using System.Collections.Generic;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public class ChiInfo : Writer, Interfaces.IPacket
{
public enum ChiAction
{
Unlock = 0,
QueryInfo = 1,
Study = 2,
BuyStrength = 3,
}
public enum ChiPowerType
{
None = 0,
Dragon = 1,
Phoenix = 2,
Tiger = 3,
Turtle = 4
}
public enum ChiAttribute
{
None = 0,
CriticalRate,
MagicCriticalRate,
AntiMagicCriticalRate,
CrashAttack,
CrashDefense,
MaxLife,
AddAttack,
AddMagicAttack,
AddMagicDefense,
FinalAttack,
FinalMagicAttack,
FinalDefense,
FinalMagicDefense
}
byte[] Buffer;
public ChiInfo(bool Create)
{
if (Create)
{
Buffer = new byte[168 + 8];
WriteUInt16(168, 0, Buffer);
WriteUInt16(2533, 2, Buffer);
}
Strings = new List<string>();
}
public uint Type
{
get { return BitConverter.ToUInt32(Buffer, 4); }
set { WriteUInt32(value, 4, Buffer); }
}
public ulong dwParam
{
get { return BitConverter.ToUInt64(Buffer, 8); }
set { WriteUInt64(value, 8, Buffer); }
}
public ushort wParam1
{
get { return BitConverter.ToUInt16(Buffer, 8); }
set { WriteUInt16(value, 8, Buffer); }
}
public ushort wParam2
{
get { return BitConverter.ToUInt16(Buffer, 10); }
set { WriteUInt16(value, 10, Buffer); }
}
public uint dwParam2
{
get { return BitConverter.ToUInt32(Buffer, 16); }
set { WriteUInt32(value, 16, Buffer); }
}
public uint dwParam3
{
get { return BitConverter.ToUInt32(Buffer, 20); }
set { WriteUInt32(value, 20, Buffer); }
}
public uint dwParam4
{
get { return BitConverter.ToUInt32(Buffer, 24); }
set { WriteUInt32(value, 24, Buffer); }
}
//Thanks to ImmuneOne, who fixed the strings offsets, I managed to get nobility done.
public byte StringCount
{
get { return Buffer[32]; }
set { Buffer[32] = value; }
}
public List<string> DecodedStrings
{
get
{
List<string> list = new List<string>(StringCount);
int offset = 33;
for (int count = 0; count < StringCount; count++)
{
byte stringLength = Buffer[offset]; offset++;
string String = Encoding.UTF7.GetString(Buffer, offset, stringLength);
offset += stringLength;
list.Add(String);
}
return list;
}
}
public List<string> Strings;
public void UpdateString(Game.ConquerStructures.NobilityInformation info)
{
string buildString = info.EntityUID + " " + info.Donation + " " + (byte)info.Rank + " " + info.Position;
buildString = (char)buildString.Length + buildString;
Strings.Add(buildString);
}
public void ListString(Game.ConquerStructures.NobilityInformation info)
{
string buildString = info.EntityUID + " " + info.Gender + " 0 " + info.Name + " " + info.Donation + " " + (byte)info.Rank + " " + info.Position;
buildString = (char)buildString.Length + buildString;
Strings.Add(buildString);
}
public void Send(Client.GameState client)
{
client.Send(ToArray());
}
public byte[] ToArray()
{
if (Strings.Count == 0)
return Buffer;
string theString = "";
for (int count = 0; count < Strings.Count; count++)
{
theString += Strings[count];
}
byte[] newBuffer = new byte[168 + 8 + theString.Length];
Buffer.CopyTo(newBuffer, 0);
WriteUInt16((ushort)(newBuffer.Length - 8), 0, newBuffer);
newBuffer[34] = (byte)Strings.Count;
WriteString(theString, 35, newBuffer);
return newBuffer;
}
public void Deserialize(byte[] buffer)
{
Buffer = buffer;
}
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public enum ChiGate // byte
{
Dragon = 1,
Tiger = 2,
Phoneix = 3,
Turtle = 4 //build
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
class ChiInfoStruct2
{
public ChiInfo.ChiPowerType Type { get; set; }
public int Attrib1 { get; set; }
public int Attrib2 { get; set; }
public int Attrib3 { get; set; }
public int Attrib4 { get; set; }
}
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public class ChiStats : Writer, Interfaces.IPacket
{
byte[] mData;
public ChiGate ChiGate
{
get
{
return (ChiGate)mData[22];
}
set
{
mData[22] = (byte)value;
}
}
public uint ChiPoints
{
get
{
return BitConverter.ToUInt32(mData, 10);
}
set
{
WriteUInt32(value, 10, mData);
}
}
public uint Identifier
{
get
{
return BitConverter.ToUInt32(mData, 6);
}
set
{
WriteUInt32(value, 6, mData);
}
}
public ushort Unknown1
{
get
{
return BitConverter.ToUInt16(mData, 4);
}
set
{
WriteUInt16(value, 4, mData);
}
}
public uint Unknown2
{
get
{
return BitConverter.ToUInt32(mData, 14);
}
set
{
WriteUInt32(value, 14, mData);
}
}
public uint Unknown3
{
get
{
return BitConverter.ToUInt32(mData, 18);
}
set
{
WriteUInt32(value, 18, mData);
}
}
public uint Val1
{
get
{
return BitConverter.ToUInt32(mData, 24);
}
set
{
WriteUInt32(value, 24, mData);
}
}
public uint Val2
{
get
{
return BitConverter.ToUInt32(mData, 28);
}
set
{
WriteUInt32(value, 28, mData);
}
}
public uint Val3
{
get
{
return BitConverter.ToUInt32(mData, 32);
}
set
{
WriteUInt32(value, 32, mData);
}
}
public uint Val4
{
get
{
return BitConverter.ToUInt32(mData, 36);
}
set
{
WriteUInt32(value, 36, mData);
}
}
/* public static implicit operator byte[](ChiStats d)
{
return d.mData;
}*/
public ChiStats()
{
mData = new byte[39 + 8];
WriteUInt16(39, 0, mData);
WriteUInt16(2534, 2, mData);
}
public static ChiStats ChiStats22(byte[] d)
{
var packet = new ChiStats();
packet.mData = d;
return packet;
}
public byte[] ToArray()
{
return mData;
}
public void Send(Client.GameState client)
{
client.Send(mData);
}
public void Deserialize(byte[] buffer)
{
mData = buffer;
}
} // class ChiStats
}
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Network.GamePackets
{
public class ChiSystem : Writer, Interfaces.IPacket
{
byte[] mData;
public ChiSystem()
{
mData = new byte[16];
WriteUInt16((ushort)mData.Length, 0, mData);
WriteUInt16(2533, 2, mData);
}
public uint Identifier
{
get
{
return BitConverter.ToUInt32(mData, 4);
}
set
{
Writer.WriteUInt32(value, 4, mData);
}
}
public byte StudyFlag
{
get
{
return mData[11];
}
set
{
mData[11] = value;
}
}
public enum ChiSystemType : ushort
{
Unlock = 0,
Open = 1,
Study = 2,
CPFillChi = 3
}
public ChiSystemType Type
{
get
{
return (ChiSystemType)BitConverter.ToUInt16(mData, 8);
}
set
{
Writer.WriteUInt32((ushort)value, 8, mData);
}
}
public byte Unknown1
{
get
{
return mData[10];
}
set
{
mData[10] = value;
}
}
public uint Unknown2
{
get
{
return BitConverter.ToUInt32(mData, 12);
}
set
{
Writer.WriteUInt32(value, 12, mData);
}
}
/* public static implicit operator byte[](ChiSystem d)
{
return d.mData;
}*/
public ChiSystem(byte[] d)
{
mData = new byte[d.Length];
d.CopyTo(mData, 0);
}
public byte[] ToArray()
{
return mData;
}
public void Send(Client.GameState client)
{
client.Send(mData);
}
public void Deserialize(byte[] buffer)
{
mData = buffer;
}
} // class ChiSystem
}
sms billing implementation 01/22/2013 - SRO Private Server - 1 Replies Hey guys im working with a new sro server and we have a moneybookers and paypal set up but i wanted to set up a Fortumo or something like tht for our pinoy players and the others who dnt use playpal.
I have never set up sms b4 to work with my server so i would really appreciate help figuring this out. A link to a guide or something thatll get me thru this pain in the ass siutation.
You can reply here or add me to Skype if you able to help....thanks
[HELP] Problems with new map implementation 09/09/2012 - Metin2 Private Server - 0 Replies Hy,
I'm having some problems in implementing new maps. Everything is done right but i can only warp to the new map with one character. Each time I try to warp with a different character I am warped to map1/village. And I get the following error in syserr:
SYSERR: Sep 9 18:21:04 :: Entergame: !GetMovablePosition (name TestWarp 1243200x1243300 map 195 changed to 1273200x1274000)
I don't think that it is an implementation error because there is 1 character i can warp there. But I made 10...
Blowfish CFB64 (C++ implementation) 05/04/2012 - CO2 PServer Guides & Releases - 6 Replies In a project I have (not CO2 related), I use Blowfish with the Cipher Feedback (CFB64) mode. So, I made a C++ implementation. As the project will be open-source at some point. I don't care of releasing my implementation.
Header:
// * ************************************************** **********
// * * START: blowfish.h *
// * ************************************************** **********
// *...
Zoom Hack [implementation] 01/22/2010 - GW Exploits, Hacks, Bots, Tools & Macros - 34 Replies Just a small Zoom Hack.
How to do:
1. Run Guild Wars (you won't be able to run the hack without running instance of Guild Wars)
2. choose an Value (69-75).*
3. press 'Freeze'.