|
المشاركات 504 |
+التقييم 0.26 |
تاريخ التسجيل Jun 2019 |
الاقامة المنوفية |
نظام التشغيل windows Server 2012R2 |
رقم العضوية 325 |
#region ChangeName (2080)
#region ChangeName (2080)
case 0x820:
COServer.Network.GamePackets.NameChange change = new COServer.Network.GamePackets.NameChange(false);
change.Deserialize(packet);
if (change.Action == COServer.Network.GamePackets.NameChange.NameChangeAction.Request)
{
string name = Encoding.Default.GetString(packet, 10, 0x10).TrimEnd(new char[1]);
packet[6] = (byte)client.namechanges;
packet[8] = (byte)(100 - client.namechanges);
change.Send(client);
client.Send(change);
if ((name != "") && (name != ""))
{
if (!Npcs.InvalidCharacters(name) || !Npcs.InvalidCharacters3(name) || name.Contains("[") || name.Contains("]"))
{
NpcReply reply = new NpcReply(6, "im sorry not allowed now close the dialog and try again");
reply.OptionID = 0xff;
client.Send(reply.ToArray());
return;
}
Database.MySqlReader reader = new Database.MySqlReader(new Database.MySqlCommand(Database.MySqlCommandType.SELECT).Select("entities").Where("name", name));
if (reader.Read())
{
packet[4] = 2;
change.Send(client);
client.Send(change);
return;
}
if (client.Entity.ConquerPoints >= rates.ChangeName)
{
client.Entity.ConquerPoints -= rates.ChangeName;
// Database.MySqlCommand command3 = new Database.MySqlCommand(Database.MySqlCommandType.Update);
// command3.Update("entities").Set("namechange", name).Where("UID", (long)client.Entity.UID).Execute();
client.NewName = name;
COServer.Console.WriteLine(client.Entity.Name + ", Changed hes Name to : " + name);
Kernel.SendWorldMessage(new COServer.Network.GamePackets.Message(client.Entity.Name + ", Changed He's/Hers Name to " + name + ", Will be affected after Maint.", System.Drawing.Color.Red, 0x7d0), Program.Values);
client.namechanges += 1;
packet[4] = 1;
change.Send(client);
client.Send(change);
NpcReply reply = new NpcReply(6, "Your new name is : " + name + ", After server Restart You will get your new name.")
{
OptionID = 0xff
};
client.Send(reply.ToArray());
client.ChangeName(client);
}
else
{
NpcReply reply = new NpcReply(6, "Come back when you have " + rates.ChangeName + " CPS.")
{
OptionID = 0xff
};
client.Send(reply.ToArray());
}
}
}
return;
#endregion ChangeName (2080)
#region Change Sex
#region Change Sex
case 11002:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello my friend " + client.Player.Name + " . I can help you to Change your Sex , this change for 1075 CPs , need to change ?");
dialog.Option("Yes Please.", 1);
dialog.Option("I don't care..", 255);
dialog.Avatar(110);
dialog.Send();
break;
}
case 1:
{
dialog.Text("Please choose now , need change from boy to girl ? or girl to boy ?");
dialog.Option("Boy To Girl.", 3);
dialog.Option("Girl To Boy.", 2);
dialog.Avatar(110);
dialog.Send();
break;
}
case 2:
{
dialog.Text("Please choose now , need size of your email big or small boy?");
dialog.Option("Small Boy.", 5);
dialog.Avatar(110);
dialog.Send();
break;
}
case 3:
{
dialog.Text("Please choose now , need size of your email big or small girl?");
dialog.Option("Big Girl.", 6);
dialog.Option("Small Girl.", 7);
dialog.Avatar(110);
dialog.Send();
break;
}
case 4:
{
if (client.Player.ConquerPoints >= 1075)
{
if (client.Player.Body == 2001 || client.Player.Body == 2002)
{
client.Equipment.Remove(9);
if (client.Equipment.Objects[9] != null)
client.Equipment.Objects[9] = null;
ClientEquip equips = new ClientEquip();
equips.DoEquips(client);
client.Send(equips);
client.NobilityInformation.Gender = 1;
client.Player.Spouse = "None";
client.Player.ConquerPoints -= 1075;
client.Player.Body = 1004;
client.NobilityInformation.Mesh = client.Player.Mesh;
client.Equipment.UpdateEntityPacket();
Database.EntityTable.SaveEntity(client);
client.Disconnect();
}
else
{
dialog.Text("Error");
}
}
else
{
dialog.Text("Sorry you Don't Have 1075 Cps?");
dialog.Option("Alright, Thank you.", 255);
}
break;
}
case 5:
{
if (client.Player.ConquerPoints >= 1075)
{
if (client.Player.Body == 2001 || client.Player.Body == 2002)
{
client.Equipment.Remove(9);
if (client.Equipment.Objects[9] != null)
client.Equipment.Objects[9] = null;
ClientEquip equips = new ClientEquip();
equips.DoEquips(client);
client.Send(equips);
client.NobilityInformation.Gender = 1;
client.Player.Spouse = "None";
client.Player.ConquerPoints -= 1075;
client.Player.Body = 1003;
client.NobilityInformation.Mesh = client.Player.Mesh;
client.Equipment.UpdateEntityPacket();
Database.EntityTable.SaveEntity(client);
client.Disconnect();
}
else
{
dialog.Text("Error");
}
}
else
{
dialog.Text("Sorry you Don't Have 1075 Cps?");
dialog.Option("Alright, Thank you.", 255);
}
break;
}
case 6:
{
if (client.Player.ConquerPoints >= 1075)
{
if (client.Player.Body == 1003 || client.Player.Body == 1004)
{
client.Equipment.Remove(9);
if (client.Equipment.Objects[9] != null)
client.Equipment.Objects[9] = null;
ClientEquip equips = new ClientEquip();
equips.DoEquips(client);
client.Send(equips);
client.NobilityInformation.Gender = 0;
client.Player.Spouse = "None";
client.Player.ConquerPoints -= 1075;
client.Player.Body = 2002;
client.NobilityInformation.Mesh = client.Player.Mesh;
client.Equipment.UpdateEntityPacket();
Database.EntityTable.SaveEntity(client);
client.Disconnect();
}
else
{
dialog.Text("Error");
}
}
else
{
dialog.Text("Sorry you Don't Have 1075 Cps?");
dialog.Option("Alright, Thank you.", 255);
}
break;
}
case 7:
{
if (client.Player.ConquerPoints >= 1075)
{
if (client.Player.Body == 1003 || client.Player.Body == 1004)
{
client.Equipment.Remove(9);
if (client.Equipment.Objects[9] != null)
client.Equipment.Objects[9] = null;
ClientEquip equips = new ClientEquip();
equips.DoEquips(client);
client.Send(equips);
client.NobilityInformation.Gender = 0;
client.Player.Spouse = "None";
client.Player.ConquerPoints -= 1075;
client.Player.Body = 2002;
client.NobilityInformation.Mesh = client.Player.Mesh;
client.Equipment.UpdateEntityPacket();
Database.EntityTable.SaveEntity(client);
client.Disconnect();
}
else
{
dialog.Text("Error");
}
}
else
{
dialog.Text("Sorry you Don't Have 1075 Cps?");
dialog.Option("Alright, Thank you.", 255);
}
break;
}
}
break;
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 2 ( الأعضاء 0 والزوار 2) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
ازاي اوقف البلص عند 8 سورس اليكس | Peter | مشكلات السيرفيرات كونكر الشخصيه | 9 | 2023-08-13 05:49 AM |
مشكلة بخصوص البلص | body2020 | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2020-05-05 06:06 AM |
مشكلة في الاتاك حل ضروري لان السرفر مفتوح وعملالي مشاكل | Abod ayman | مشكلات السيرفيرات كونكر الشخصيه | 4 | 2020-04-04 11:36 PM |
مشكلة في السرفر | salahsayed | مشكلات السيرفيرات كونكر الشخصيه | 3 | 2019-09-07 10:58 PM |
مشكلة بخصوص السرفر | osama | مشكلات السيرفيرات كونكر الشخصيه | 10 | 2019-07-14 02:44 AM |