|
المشاركات 1,940 |
+التقييم 0.95 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل windows 7 |
رقم العضوية 1 |
#region Chi Npc super
case 44441:
{
dialog.Avatar(218);
switch (npcRequest.OptionID)
{
case 0:
{
if (client.ChiPowers.Count == 0)
{
dialog.Text("Sorry But You Don't Have chi Yet.");
dialog.Option("I'll think about it!", 255);
dialog.Send();
return;
}
dialog.Text("Hello I'M Chi Seller.");
for (int i = 0; i < client.ChiPowers.Count; i++)
{
var stage = client.ChiPowers[i];
dialog.Option(((Game.Enums.ChiPowerType)(i + 1)).ToString(), (byte)(i + 1));
}
dialog.Option("I'll think about it!", 255);
dialog.Send();
break;
}
default:
{
int mStage = npcRequest.OptionID;
if (mStage >= 1 && mStage <= 4)
{
client.Entity.SelectedStage = mStage;
dialog.Text("You Choose " + ((Game.Enums.ChiPowerType)mStage).ToString() + " stage. please select Attribute you want to change ");
for (int i = 0; i < 4; i++)
{
dialog.Option("Attribute [" + (byte)(i + 1) + "]", (byte)(i + 1 + 4));
}
dialog.Option("Back", 0);
dialog.Option("I'll think about it!", 255);
dialog.Send();
break;
}
else if (mStage >= 4 && mStage <= 8)
{
try
{
client.Entity.SelectedAttribute = mStage - 4;
var mychiattribute = new List<Enums.ChiAttribute>();
var powers = client.ChiPowers[(int)client.Entity.SelectedStage - 1];
for (int i = 0; i < powers.Attributes.Length; i++)
{
if (client.Entity.ConquerPoints >= 100000)
{
client.Entity.ConquerPoints -= 25000;//
var Attribute = powers.Attributes[i];
mychiattribute.Add(Attribute.Type);
}
}
dialog.Text("You Choose Attribute [" + client.Entity.SelectedAttribute + "] please select AttributeType you want to change ");
for (int i = 0; i < (int)Enums.ChiAttribute.MagicDamageDecrease; i++)
{
var type = ((Enums.ChiAttribute)(i + 1));
if (!mychiattribute.Contains(type))
dialog.Option(type.ToString(), (byte)(((i + 1) * 10)));
}
dialog.Option("Back", (byte)client.Entity.SelectedStage);
dialog.Option("I'll think about it!", 255);
dialog.Send();
}
catch
{
}
break;
}
else
{
var typex = mStage / 10;
var Mode = client.Entity.SelectedStage;
var pos = client.Entity.SelectedAttribute - 1;
var powers = client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
foreach (var attr in attributes)
{
if (attr.Type == (Enums.ChiAttribute)typex)
{
client.MessageBox("Sorry you can't muliplay stats", null, null);
return;
}
}
attributes[pos].Type = (Enums.ChiAttribute)typex;
attributes[pos].Value = (ushort)Game.Enums.ChiMedValues(attributes[pos].Type);
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
client.Send(new ChiPowers(true).Query(client));
#region Update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
// make it public instead of private
PacketHandler.SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(client);
}
break;
}
}
break;
}
#endregion
#region Chi Npc super
case 44441:
{
dialog.Avatar(218);
switch (npcRequest.OptionID)
{
case 0:
{
if (client.ChiPowers.Count == 0)
{
dialog.Text("Sorry But You Don't Have chi Yet.");
dialog.Option("I'll think about it!", 255);
dialog.Send();
return;
}
dialog.Text("Hello I'M Chi Seller.");
for (int i = 0; i < client.ChiPowers.Count; i++)
{
var stage = client.ChiPowers[i];
dialog.Option(((Game.Enums.ChiPowerType)(i + 1)).ToString(), (byte)(i + 1));
}
dialog.Option("I'll think about it!", 255);
dialog.Send();
break;
}
default:
{
int mStage = npcRequest.OptionID;
if (mStage >= 1 && mStage <= 4)
{
client.Entity.SelectedStage = mStage;
dialog.Text("You Choose " + ((Game.Enums.ChiPowerType)mStage).ToString() + " stage. please select Attribute you want to change ");
for (int i = 0; i < 4; i++)
{
dialog.Option("Attribute [" + (byte)(i + 1) + "]", (byte)(i + 1 + 4));
}
dialog.Option("Back", 0);
dialog.Option("I'll think about it!", 255);
dialog.Send();
break;
}
else if (mStage >= 4 && mStage <= 8)
{
try
{
client.Entity.SelectedAttribute = mStage - 4;
var mychiattribute = new List<Enums.ChiAttribute>();
var powers = client.ChiPowers[(int)client.Entity.SelectedStage - 1];
for (int i = 0; i < powers.Attributes.Length; i++)
{
if (client.Entity.ConquerPoints >= 100000)
{
client.Entity.ConquerPoints -= 25000;//
var Attribute = powers.Attributes[i];
mychiattribute.Add(Attribute.Type);
}
}
dialog.Text("You Choose Attribute [" + client.Entity.SelectedAttribute + "] please select AttributeType you want to change ");
for (int i = 0; i < (int)Enums.ChiAttribute.MagicDamageDecrease; i++)
{
var type = ((Enums.ChiAttribute)(i + 1));
if (!mychiattribute.Contains(type))
dialog.Option(type.ToString(), (byte)(((i + 1) * 10)));
}
dialog.Option("Back", (byte)client.Entity.SelectedStage);
dialog.Option("I'll think about it!", 255);
dialog.Send();
}
catch
{
}
break;
}
else
{
var typex = mStage / 10;
var Mode = client.Entity.SelectedStage;
var pos = client.Entity.SelectedAttribute - 1;
var powers = client.ChiPowers[Mode - 1];
var attributes = powers.Attributes;
foreach (var attr in attributes)
{
if (attr.Type == (Enums.ChiAttribute)typex)
{
client.MessageBox("Sorry you can't muliplay stats", null, null);
return;
}
}
attributes[pos].Type = (Enums.ChiAttribute)typex;
attributes[pos].Value = (ushort)Game.Enums.ChiMedValues(attributes[pos].Type);
powers.CalculatePoints();
Database.ChiTable.Sort((Enums.ChiPowerType)Mode);
powers.Power = (Enums.ChiPowerType)Mode;
client.Send(new ChiPowers(true).Query(client));
#region Update ranking
Database.ChiTable.ChiData[] array = null;
switch ((Enums.ChiPowerType)Mode)
{
case Game.Enums.ChiPowerType.Dragon:
array = Database.ChiTable.Dragon;
break;
case Game.Enums.ChiPowerType.Phoenix:
array = Database.ChiTable.Phoenix;
break;
case Game.Enums.ChiPowerType.Tiger:
array = Database.ChiTable.Tiger;
break;
case Game.Enums.ChiPowerType.Turtle:
array = Database.ChiTable.Turtle;
break;
}
foreach (var chiData in array)
{
if (Kernel.GamePool.ContainsKey(chiData.UID))
{
var pClient = Kernel.GamePool[chiData.UID];
if (pClient == null) continue;
if (pClient.ChiData == null) continue;
// make it public instead of private
PacketHandler.SendRankingQuery(new GenericRanking(true) { Mode = GenericRanking.QueryCount }, pClient, GenericRanking.Chi + (uint)Mode, pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode), pClient.ChiData.SelectPoints((Enums.ChiPowerType)Mode));
if (pClient.Entity.UID == client.Entity.UID || pClient.ChiData.SelectRank((Enums.ChiPowerType)Mode) < 50)
pClient.LoadItemStats();
}
}
#endregion
Database.ChiTable.Save(client);
}
break;
}
}
break;
}
#endregion
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
Play Super Conquer | مجدى | اعلانات السيرفيرات الشخصية | 3 | 2020-02-26 07:57 PM |
Npc Jiang super | MRonlineGvrix | تطوير سيرفرات كونكر | 1 | 2020-02-05 10:43 AM |
خلي الجاينج يدي Epic,Super | محمد ياسر | تطوير سيرفرات كونكر | 8 | 2019-07-28 12:46 AM |