محمد ياسر
2019-04-18, 10:51 AM
NPC الجاينج السوبر
يلا بينا ندخل علي الاكواد
#region Jiang Npc s
case 888544:
{
switch (npcRequest.OptionID)
{
case 0:
{
if (client.Entity.MyJiang == null)
{
dialog.Text("Sorry But You Don't Have Jiang Yet.");
dialog.Option("I'll think about it!", 255);
dialog.Send();
return;
}
dialog.Text("Hello Server Jiang Seller.");
for (int i = 0; i < client.Entity.MyJiang.Stages.Length; i++)
{
var stage = client.Entity.MyJiang.Stages[i];
if (stage.Activate)
dialog.Option("Stage [" + (byte)(i + 1) + "]", (byte)(i + 1));
}
dialog.Option("I'll think about it!", 255);
dialog.Send();
break;
}
default:
{
int mStage = npcRequest.OptionID;
if (mStage >= 1 && mStage <= 9)
{
foreach (var item in Database.JiangHuTable.CultivateStatus[(byte)mStage])
{
dialog.Option(((Game.JiangClient.JiangStages.Atrib utesType)item).ToString(), (byte)((item * 10) + mStage));
}
}
else
{
if (client.Entity.ConquerPoints < 10)
{
dialog.Text("Sorry But You Don't Have 1 cps ");
dialog.Option("I'll think about it!", 255);
dialog.Send();
return;
}
client.Entity.ConquerPoints -= 10;
var typex = mStage / 10;
mStage = mStage % 10;
byte stageno = (byte)Math.Min(9, mStage);
var type = (Game.JiangClient.JiangStages.AtributesType)Math.M in(15, typex);
if (client.Entity.MyJiang.Stages.Length >= stageno)
{
var stages = client.Entity.MyJiang.Stages[(stageno - 1)];
for (int x = 0; x < 9; x++)
{
var Star = stages.Stars[x];
Star.Activate = true;
Star.UID = (ushort)(type + (6 * 256));
Star.Type = (JiangClient.AtributesType)type;
Star.Level = 5;
client.Entity.MyJiang.Stages[stageno - 1] = stages;
client.Entity.MyJiang.Stages[stageno - 1].Stars[x] = Star;
client.Entity.MyJiang.ArrayStudy(client, (byte)type, 6);
client.Entity.MyJiang.FixedStage((byte)(stageno - 1));
client.LoadItemStats();
client.Entity.MyJiang.AllToArray(client);
Database.JiangHuTable.FullSave(client);
}
}
}
break;
}
}
break;
}
#endregion
يلا بينا ندخل علي الاكواد
#region Jiang Npc s
case 888544:
{
switch (npcRequest.OptionID)
{
case 0:
{
if (client.Entity.MyJiang == null)
{
dialog.Text("Sorry But You Don't Have Jiang Yet.");
dialog.Option("I'll think about it!", 255);
dialog.Send();
return;
}
dialog.Text("Hello Server Jiang Seller.");
for (int i = 0; i < client.Entity.MyJiang.Stages.Length; i++)
{
var stage = client.Entity.MyJiang.Stages[i];
if (stage.Activate)
dialog.Option("Stage [" + (byte)(i + 1) + "]", (byte)(i + 1));
}
dialog.Option("I'll think about it!", 255);
dialog.Send();
break;
}
default:
{
int mStage = npcRequest.OptionID;
if (mStage >= 1 && mStage <= 9)
{
foreach (var item in Database.JiangHuTable.CultivateStatus[(byte)mStage])
{
dialog.Option(((Game.JiangClient.JiangStages.Atrib utesType)item).ToString(), (byte)((item * 10) + mStage));
}
}
else
{
if (client.Entity.ConquerPoints < 10)
{
dialog.Text("Sorry But You Don't Have 1 cps ");
dialog.Option("I'll think about it!", 255);
dialog.Send();
return;
}
client.Entity.ConquerPoints -= 10;
var typex = mStage / 10;
mStage = mStage % 10;
byte stageno = (byte)Math.Min(9, mStage);
var type = (Game.JiangClient.JiangStages.AtributesType)Math.M in(15, typex);
if (client.Entity.MyJiang.Stages.Length >= stageno)
{
var stages = client.Entity.MyJiang.Stages[(stageno - 1)];
for (int x = 0; x < 9; x++)
{
var Star = stages.Stars[x];
Star.Activate = true;
Star.UID = (ushort)(type + (6 * 256));
Star.Type = (JiangClient.AtributesType)type;
Star.Level = 5;
client.Entity.MyJiang.Stages[stageno - 1] = stages;
client.Entity.MyJiang.Stages[stageno - 1].Stars[x] = Star;
client.Entity.MyJiang.ArrayStudy(client, (byte)type, 6);
client.Entity.MyJiang.FixedStage((byte)(stageno - 1));
client.LoadItemStats();
client.Entity.MyJiang.AllToArray(client);
Database.JiangHuTable.FullSave(client);
}
}
}
break;
}
}
break;
}
#endregion