|
public class Reincarnate
public class Reincarnate
{
private Client.GameState _client ;
public static void Reincarnation(Client.GameState client, byte new_class)
{
if (client.Entity.Level < 120)
return;
if (Kernel.ReincarnatedCharacters.ContainsKey(client.Entity.UID)) return;
Database.ReincarnationTable.NewReincarnated(client.Entity);
Game.Features.Reincarnation.ReincarnateInfo info = new Game.Features.Reincarnation.ReincarnateInfo();
info.UID = client.Entity.UID;
info.Level = client.Entity.Level;
info.Experience = client.Entity.Experience;
Kernel.ReincarnatedCharacters.Add(info.UID, info);
Database.MagicTypeOP.Reborn(client, new_class);
client.Entity.FirstRebornClass = client.Entity.SecondRebornClass;
client.Entity.SecondRebornClass = client.Entity.Class;
client.Entity.Class = new_class;
client.Entity.SecondRebornLevel = client.Entity.Level;
client.Entity.Level = 140;
client.Entity.Experience = 0;
client. Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 0;
client.Entity.Spirit = 0;
client.Entity.Atributes = 900;
#region Low level items
for (byte i = 1; i < 9; i++)
{
if (i != 7)
{
ConquerItem item = client.Equipment.TryGetItem(i);
if (item != null && item.ID != 0)
{
try
{
Database.ConquerItemInformation cii =
new Database.ConquerItemInformation(item.ID, item.Plus);
item.ID =
cii.LowestID(
ItemMinLevel(ItemPosition(item.ID)));
item.Mode = Game.Enums.ItemMode.Update;
item.Send(client);
client.LoadItemStats();
Database.ConquerItemTable.UpdateItemID(item, client);
}
catch
{
}
}
}
}
ConquerItem hand = client.Equipment.TryGetItem(5);
if (hand != null)
{
client.Equipment.Remove(5);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
hand = client.Equipment.TryGetItem(25);
if (hand != null)
{
client.Equipment.Remove(25);
client.CalculateStatBonus();
client.CalculateHPBonus();
}
client.LoadItemStats();
client.SendScreen(client.Entity.SpawnPacket, false);
#endregion
Database.DataHolder.GetStats(client.Entity.Class, client.Entity.Level, client);
client.CalculateStatBonus();
client.CalculateHPBonus();
client.GemAlgorithm();
client.SendStatMessage();
foreach (var Entity in Kernel.GamePool.Values)
Entity.Send(new Message(client.Entity.Name + " has been Reincarnation!", System.Drawing.Color.White, Message.Talk));
Database.EntityTable.SaveEntity(client);
#region ProdectSkills
if (client.Entity.SecondRebornClass == 25 && !client.Spells.ContainsKey(3060))
{
client.AddSpell(new Spell(true) { ID = 3060 });
}
if (client.Spells.ContainsKey(12300) && !client.Entity.PureLeeLong())
{
client.RemoveSpell(new Spell(true) { ID = 12300 });
}
if (client.Spells.ContainsKey(12200) && !client.Entity.x2LeeLong())
{
client.RemoveSpell(new Spell(true) { ID = 12200 });
}
if (client.Spells.ContainsKey(11040) && !client.Entity.PurePirate())
{
client.RemoveSpell(new Spell(true) { ID = 11040 });
}
#endregion
}
}
#region Jiang Npc
case 88855:
{
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 Messi Jiang Seller.");
for (int i = 0; i < client.Entity.MyJiang.Stagers.Length; i++)
{
var stage = client.Entity.MyJiang.Stagers[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.JiangHu.CultivateStatus[(byte)mStage])
{
dialog.Option(((Game.JiangHu.JiangStages.AtributesType)item).ToString(), (byte)((item * 10) + mStage));
}
}
else
{
var typex = mStage / 10;
mStage = mStage % 10;
byte stageno = (byte)Math.Min(9, mStage);
byte level = 6;
var type = (Game.JiangHu.JiangStages.AtributesType)Math.Min(15, typex);
if (client.Entity.MyJiang.Stagers.Length >= stageno)
{
var stage = client.Entity.MyJiang.Stagers[(stageno - 1)];
for (byte i = 1; i < stage.Stars.Length + 1; i++)
{
client.Entity.MyJiang.MyNewStart = new Game.JiangHu.GetNewStar();
client.Entity.MyJiang.MyNewStart.PositionStar = i;
client.Entity.MyJiang.MyNewStart.Stage = stageno;
client.Entity.MyJiang.MyNewStart.Star = new Game.JiangHu.JiangStages.Star();
client.Entity.MyJiang.MyNewStart.Star.Activate = true;
client.Entity.MyJiang.MyNewStart.Star.Level = level;
client.Entity.MyJiang.MyNewStart.Star.Typ = type;
client.Entity.MyJiang.MyNewStart.Star.UID = client.Entity.MyJiang.ValueToRoll(client.Entity.MyJiang.MyNewStart.Star.Typ, client.Entity.MyJiang.MyNewStart.Star.Level);
Network.GamePackets.JiangHuUpdate upd = new Network.GamePackets.JiangHuUpdate();
upd.Atribute = client.Entity.MyJiang.MyNewStart.Star.UID;
upd.FreeCourse = client.Entity.MyJiang.FreeCourse;
upd.Stage = stageno;
upd.Star = i;
upd.FreeTimeTodeyUsed = (byte)client.Entity.MyJiang.FreeTimeTodeyUsed;
upd.RoundBuyPoints = client.Entity.MyJiang.RoundBuyPoints;
client.Send(upd.ToArray());
client.Entity.MyJiang.ApplayNewStar(client);
}
if (client.Entity.MyJiang != null)
client.Entity.MyJiang.SendStatus(client, client);
}
}
break;
}
}
break;
}
#endregion
#region System InnerPower +items-Check
case 1547:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hey [" + client.Entity.Name + "] I can sell Items InnerPower. all you have to choose and Check your Points.");
dialog.Text("Your~InnerPower~Count~is: ");
dialog.Text("<tip color=d7ff41 desc=Inner#Power>[" + client.Entity.InnerPower.Potency + "]</tip>: \n");
dialog.Option("UniversalConcept(A)&(B) For " + CPanal.itemsInnerPower + " CPS", 1);
dialog.Option("SecretofBreath(A)&(B) For " + CPanal.itemsInnerPower + " CPS", 2);
dialog.Option("DragonTactics(A)&(B) For " + CPanal.itemsInnerPower + " CPS", 3);
dialog.Option("DoctrineofDeity(A)(B)(C) For " + CPanal.itemsInnerPower + " CPS", 4);
dialog.Option("DemonRider(A)(B) For " + CPanal.itemsInnerPower + " CPS", 5);
dialog.Option("BoundlessHeart(A)(B)(C) For " + CPanal.itemsInnerPower + " CPS", 6);
dialog.Option("PuzzleofLife(A)(B)(C) For " + CPanal.itemsInnerPower + " CPS", 7);
dialog.Option("Points Inner For " + CPanal.itemsInnerPower + " CPS", 8);
dialog.Option("Let~me~think.", 255);
break;
}
#region UniversalConcept(A)&(B)
case 1:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3005365, 0, 1);
client.Inventory.AddBoundItem(3005366, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a UniversalConcept(A)(B) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region SecretofBreath(A)&(B)
case 2:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3005395, 0, 1);
client.Inventory.AddBoundItem(3005396, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a SecretofBreath(A)(B) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region DragonTactics(A)&(B)
case 3:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3005397, 0, 1);
client.Inventory.AddBoundItem(3005398, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a DragonTactics(A)(B) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region DoctrineofDeity(A)(B)(C)
case 4:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3005399, 0, 1);
client.Inventory.AddBoundItem(3005400, 0, 1);
client.Inventory.AddBoundItem(3005401, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a DoctrineofDeity(A)(B)(C) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region DemonRider(A)(B)
case 5:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3007113, 0, 1);
client.Inventory.AddBoundItem(3007114, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a DemonRider(A)(B) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region BoundlessHeart(A)(B)(C)
case 6:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3007115, 0, 1);
client.Inventory.AddBoundItem(3007116, 0, 1);
client.Inventory.AddBoundItem(3007117, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a BoundlessHeart(A)(B)(C) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region PuzzleofLife(A)(B)(C)
case 7:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3007230, 0, 1);
client.Inventory.AddBoundItem(3007231, 0, 1);
client.Inventory.AddBoundItem(3007232, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a PuzzleofLife(A)(B)(C) in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
#region PackPointsInner
case 8:
{
if (client.Entity.ConquerPoints >= CPanal.itemsInnerPower)
{
client.Entity.ConquerPoints -= CPanal.itemsInnerPower;
client.Inventory.AddBoundItem(3007110, 0, 1);
_String str = new _String(true);
str.UID = client.Entity.UID;
str.Type = _String.Effect;
str.Texts.Add("eidolon");
str.TextsCount = 1;
client.Entity.SendScreen(str);
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "Congratz you got a PackPointsInner in your inventory.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
else
{
Network.GamePackets.NpcReply npc = new Network.GamePackets.NpcReply(6, "You don't have Enough [" + CPanal.itemsInnerPower + "] Cps.");
npc.OptionID = 255;
client.Send(npc.ToArray());
}
break;
}
#endregion
}
break;
}
#endregion
[booth7]
ID=70000095
Name=InnerPower
Mesh=2512
Map=11511
Type=16
X=61
Y=42
ItemAmount=18
Item1=3007110@@10000
Item2=3005365@@10000
Item3=3005366@@20000
Item4=3005395@@10000
Item5=3005396@@20000
Item6=3005397@@10000
Item7=3005398@@20000
Item8=3005399@@10000
Item9=3005400@@20000
Item10=3005401@@30000
Item11=3007113@@10000
Item12=3007114@@20000
Item13=3007115@@10000
Item14=3007116@@20000
Item15=3007117@@30000
Item16=3007230@@10000
Item17=3007231@@20000
Item18=3007232@@30000
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
راجل مظبوط من بتوع زمان دول الى معروفة يعنى عايز اشترى سورس نضيف 3d | Zayn Muhammed | الطلبات المدفوعه | 5 | 2020-03-17 07:50 AM |
بعد ازن اى راجل جدع يخش مشكلة فى الكلينت | Zayn Muhammed | مشكلات السيرفيرات كونكر الشخصيه | 8 | 2020-02-22 08:26 PM |
راجل يديك الاجنحه وا التيتل بي الاشكال الجديده | ElSaher | تطوير سيرفرات كونكر | 0 | 2019-09-10 12:30 PM |
محتاج راجل جدع يجي يمسك اللعبه بتاعتي معايا | ElSaher | اعلانات السيرفيرات الشخصية | 5 | 2019-08-21 11:10 PM |
عايز راجل محترم | ElSaher | مشكلات السيرفيرات كونكر الشخصيه | 7 | 2019-07-22 06:54 PM |