osama
2019-06-19, 01:40 PM
يجماعة كل لما اجى ابلص +12 اخر البلص فى كل ايتمز الشخصية الجناح والتور والفانة وكذالك اخرهم +8 ومش عاوز يحط استون تانى اية الحل
ارجو المساعدة من فضلكو
osamamand
2019-06-19, 01:41 PM
انا اسف مختش بالى من مكان نشر الموضوع بعد ازنك استاذ حازم تنقل الموضوع لقسم المشاكل من فضلك وبجد بجد انا مختش بالى والله
osamamand
2019-06-19, 03:29 PM
شكرا حازم تم حل المشكلة بنجاح
محمد ياسر
2019-06-19, 04:46 PM
تمام ياريت تنزل الحل بقا
علشان نقفل الموضوع
osamamand
2019-06-19, 09:08 PM
تمام الحل انك هتروح لى PacketHandler
وهتبحث عن
#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.NameChange Action.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.SE LECT).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.Up date);
// 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)
وكدة المشكلة اتحلت
اما بتاع التحويل لود او بنت
هتبحث فى باكيت Npc
هنعمل سرش على دى
#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
اعمل موضوع بئة فى قسم التطويرات ونسث الموضوع فية
والف شكر على اى مساعدة من حضرتك
^_^
محمد ياسر
2019-06-19, 09:34 PM
لو تنزل الموضوع انت ايكون احسن ويكون ليك مشاركه في قسم التطوير
osamamand
2019-06-19, 11:10 PM
لو تنزل الموضوع انت ايكون احسن ويكون ليك مشاركه في قسم التطوير
حاضر هنزل الموضوع
osamamand
2019-06-19, 11:11 PM
لو تنزل الموضوع انت ايكون احسن ويكون ليك مشاركه في قسم التطوير
حاضر هنزل الموضوع انهردة انشاء الله بوكر هتلقية فى قسم التطويرات