|
|
المشاركات 1,941 |
+التقييم 0.96 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل windows 7 |
رقم العضوية 1 |
case 59558:
#region RebirthMaster
case 59558:
{
dialog.Avatar(67);
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("I devote all my life to the research of eternity. And finally I know the secret of rebirth! Well, anything I can help you with?");
dialog.Option("1st~Rebirth.", 1);
dialog.Option("2nd~Rebirth.", 4);
dialog.Option("Reincarnation.", 5);
dialog.Option("Reallot~my~Attribute~Points.", 8);
dialog.Option("Buy~Oblivion~Dew~100~k~CPs)", 10);
dialog.Option("Just~passing~by.", 255);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.Reborn == 0 && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 & client.Entity.Class % 10 == 5))
{
if (client.Inventory.Contains(721259, 1) || client.Inventory.Contains(721259, 1))
{
dialog.Text("There are two kinds of reborns. One is the normal one and the second one is blessed.");
dialog.Text("The normal reborn will give you the chance to get a Super Gem and the blessed reborn will set a -1 into one of your equipment that you wear during the reborn. What do you chose?");
dialog.Option("Normal reborn.", 2);
dialog.Option("Blessed reborn.", 3);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(67);
dialog.Send();
}
else
{
dialog.Text("Sorry, you don't have CelestialStone.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
}
else
{
dialog.Text("You~haven`t~reached~the~highest~rank~yet.~Please~work~harder. You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
break;
}
case 2:
{
dialog.Text("Select the super gem you desire.");
dialog.Option("SuperPhoenixGem.", 203);
dialog.Option("SuperDragonGem.", 213);
dialog.Option("SuperFuryGem.", 223);
dialog.Option("SuperRainbowGem.", 233);
dialog.Option("SuperVioletGem.", 253);
dialog.Option("SuperMoonGem.", 254);
dialog.Option("SuperKylinGem", 243);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(67);
dialog.Send();
break;
}
case 203:
case 213:
case 223:
case 233:
case 253:
case 254:
case 243:
{
if (client.Entity.Reborn == 0)
{
client.RebornGem = (uint)(npcRequest.OptionID % 100);
if (client.RebornGem == 254)
client.RebornGem = 263;
}
dialog.Text("Select the class you want to reborn in.");
dialog.Option("Trojan.", 11);
dialog.Option("Warrior.", 21);
dialog.Option("Archer.", 41);
dialog.Option("WaterTaoist.", 132);
dialog.Option("FireTaoist.", 142);
dialog.Option("Ninja.", 51);
dialog.Option("Monk", 61);
dialog.Option("Pirate", 71);
dialog.Option("Dragon~Warrior", 81);
dialog.Option("WindWalker", 161);
dialog.Option("Thunder T.striker", 91);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(67);
dialog.Send();
break;
}
case 3:
{
dialog.Text("Select the class you want to reborn in.");
dialog.Option("Trojan.", 11);
dialog.Option("Warrior.", 21);
dialog.Option("Archer.", 41);
dialog.Option("WaterTaoist.", 132);
dialog.Option("FireTaoist.", 142);
dialog.Option("Ninja.", 51);
dialog.Option("Monk", 61);
dialog.Option("Pirate", 71);
dialog.Option("Dragon~Warrior", 81);
dialog.Option("WindWalker", 161);
dialog.Option("Thunder T.striker", 91);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(67);
dialog.Send();
break;
}
case 11:
case 21:
case 41:
case 132:
case 142:
case 51:
case 161:
case 61:
case 81:
case 71:
case 91:
{
if (!client.Inventory.HaveSpace(4))
{
dialog.Text("Sorry, but you need atleast 4 free spaces in your inventory.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
break;
}
if (client.Entity.Reborn == 0 && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 & client.Entity.Class % 10 == 5))
{
if (client.Inventory.Contains(721259, 1))
{
client.Inventory.Remove(721259, 1);
if (client.RebornGem != 0)
{
client.Inventory.Add((uint)(700000 + client.RebornGem), 0, 1);
client.RebornGem = 0;
ConquerItem hand = client.Equipment.TryGetItem(5);
if (hand != null)
{
client.Equipment.Remove(5);
client.CalculateHitPoint();
client.CalculateMana();
client.LoadItemStats();
client.SendScreen(client.Entity.PlayerProto(client.Entity), false);
}
hand = client.Equipment.TryGetItem(4);
if (hand != null)
{
client.Equipment.Remove(4);
client.CalculateHitPoint();
client.CalculateMana();
client.LoadItemStats();
client.SendScreen(client.Entity.PlayerProto(client.Entity), false);
}
}
else
{
foreach (var item in client.Equipment.Objects)
{
if (item != null)
{
if (item.Position != ConquerItem.Steed || item.Position != ConquerItem.Wing)
{
if (item.Bless == 0)
{
item.Bless = 1;
item.Mode = Enums.ItemMode.Update;
item.Send(client);
break;
}
}
}
}
}
switch (npcRequest.OptionID)
{
case 161:
case 11:
case 21:
case 51:
case 61:
case 71:
case 81:
case 91:
{
client.Inventory.Add(410077, Enums.ItemEffect.Poison);
break;
}
case 41:
{
client.Inventory.Add(410077, Enums.ItemEffect.Poison);
break;
}
case 132:
case 142:
{
client.Inventory.Add(421077, Enums.ItemEffect.MP);
break;
}
}
using (var rec = new ServerSockets.RecycledPacket())
{
var stream = rec.GetStream();
Program.RebornInfo.Reborn(client.Entity, npcRequest.OptionID, stream);
}
}
else
{
dialog.Text("Sorry, you don't have CelatialStone.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
}
else if (client.Entity.Reborn == 1 && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 & client.Entity.Class % 10 == 5))
{
if (client.Inventory.Contains(723701, 1))
{
client.Inventory.Remove(723701, 1);
using (var rec = new ServerSockets.RecycledPacket())
{
var stream = rec.GetStream();
Program.RebornInfo.Reborn(client.Entity, npcRequest.OptionID, stream);
}
}
else
{
dialog.Text("Sorry, you don't have ExemptionToken.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
}
break;
}
case 4:
{
if (client.Entity.Reborn == 1 && (client.Entity.Level >= 110 && client.Entity.Class == 135 || client.Entity.Level >= 120 & client.Entity.Class % 10 == 5))
{
if (client.Inventory.Contains(723701, 1))
{
dialog.Text("You don't worry, it's not gonna hurt you a bit when getting the third life. You just need an exemption token and it's all going to be fine.");
dialog.Option("Here is the ExemptionToken.", 3);
dialog.Option("I`ll~think~about~it.", 255);
dialog.Avatar(67);
dialog.Send();
}
else
{
dialog.Text("Sorry, you don't have ExemptionToken.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
}
else
{
dialog.Text("Sorry,~you~are~ineligible~for~second~rebirth.~Please~wait~until~you~are~a~level~120~reborn~person.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
break;
}
case 5:
{
dialog.Text("From now on, have total control of your life! If you've been Reborn twice and are at least Level 110, just bring me some Oblivion Dew and I'll help you become Reincarnated! After the Reincarnation, your class skills will revert to level 0,");
dialog.Text("~but they`ll return to their previous levels when you reach Level 110, again. If your classes have been the same for all three lives, including your current one, you can learn the Pure Skills from your class trainer,");
dialog.Text("~in the job center.");
dialog.Option("I~want~to~get~Reincarnated.", 6);
dialog.Option("Where~can~I~get~the~Dew?", 7);
dialog.Avatar(67);
dialog.Send();
break;
}
case 6:
{
if (client.Entity.Reborn == 2 && client.Inventory.Contains(711083, 1))
{
MsgActionProto Action = new MsgActionProto();
Action.ID = MsgActionEmulator.OpenWindow;
Action.UID = client.Entity.UID;
Action.dwParam = (uint)MsgActionEmulator.WindowCommands.Reincarnation;
Action.TimeStamp = (uint)Time32.Now.GetHashCode();
Action.wParam1 = client.Entity.X;
Action.wParam2 = client.Entity.Y;
client.Send(MsgActionEmulator.SendPacket(Action));
}
else
{
dialog.Text("You have not been Reborn twice. I`m afraid you will not withstand the power of the Oblivion Dew. Come to me when you get stronger.");
dialog.Option("Got~it!~Thanks!", 255);
dialog.Avatar(67);
dialog.Send();
}
break;
}
case 7:
{
dialog.Text("Oblivion Dew is available in the Honor Store and the Horse Race Store. You can use your Honor Points or Horse Race Points to purchase one.");
dialog.Option("Got~it!~Thanks!", 255);
dialog.Avatar(67);
dialog.Send();
break;
}
case 8:
{
dialog.Text("Reborn~level~70+~players~can~redistribute~their~attribute~points~at~the~cost~of~a~dragonball.");
dialog.Option("I~will~reallot~my~points.", 9);
dialog.Option("Let~me~think~it~over.", 255);
dialog.Avatar(67);
dialog.Send();
break;
}
case 9:
{
if (client.Entity.Level >= 70)
{
if (client.Inventory.Contains(1088000, 1))
{
client.Inventory.Remove(1088000, 1);
client.Entity.Agility = 0;
client.Entity.Strength = 0;
client.Entity.Vitality = 1;
client.Entity.Spirit = 0;
client.MessageBox("You have successfully reloaded your attribute points.");
if (client.Entity.Reborn == 0)
{
client.Entity.Atributes = 0;
Kernel.AtributeStatus.ResetStatsNonReborn(client.Entity);
if (Database.AtributesStatus.IsWater(client.Entity.Class))
{
if (client.Entity.Level > 110)
client.Entity.Atributes = (ushort)((client.Entity.Level - 110) * 3 + client.Entity.ExtraAtributes + client.Entity.MysteryFruit);
}
else
{
if (client.Entity.Level > 120)
client.Entity.Atributes = (ushort)((client.Entity.Level - 120) * 3 + client.Entity.ExtraAtributes + client.Entity.MysteryFruit);
}
}
else if (client.Entity.Reborn == 1)
{
client.Entity.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass)
+ 52 + 3 * (client.Entity.Level - 15) + client.Entity.ExtraAtributes + client.Entity.MysteryFruit);
}
else
{
if (client.Entity.SecondRebornLevel == 0)
client.Entity.SecondRebornLevel = 130;
client.Entity.Atributes = (ushort)(Program.RebornInfo.ExtraAtributePoints(client.Entity.FirstRebornLevel, client.Entity.FirstRebornClass) +
Program.RebornInfo.ExtraAtributePoints(client.Entity.SecondRebornLevel, client.Entity.SecondRebornClass) + 52 + 3 * (client.Entity.Level - 15) + client.Entity.ExtraAtributes + client.Entity.MysteryFruit);
}
using (var rec = new ServerSockets.RecycledPacket())
{
var stream = rec.GetStream();
client.Entity.SendUpdate(stream, client.Entity.Strength, Game.MsgServer.MsgUpdate.DataType.Strength);
client.Entity.SendUpdate(stream, client.Entity.Agility, Game.MsgServer.MsgUpdate.DataType.Agility);
client.Entity.SendUpdate(stream, client.Entity.Spirit, Game.MsgServer.MsgUpdate.DataType.Spirit);
client.Entity.SendUpdate(stream, client.Entity.Vitality, Game.MsgServer.MsgUpdate.DataType.Vitality);
client.Entity.SendUpdate(stream, client.Entity.Atributes, Game.MsgServer.MsgUpdate.DataType.Atributes);
}
}
else
{
dialog.Text("Sorry, you don't have one DragonBall.");
dialog.Option("I~see.", 255);
dialog.Avatar(67);
dialog.Send();
}
}
else
{
dialog.Text("You~cannot~reallot~your~ability~points~unless~you~are~reborn~and~above~level~70.");
dialog.Option("I~see", 255);
dialog.Avatar(67);
dialog.Send();
}
break;
}
case 10:
{
if (client.Entity.ConquerPoints >= 100000)
{
client.Entity.ConquerPoints -= 100000;
client.Inventory.Add(711083, 0, 1);
}
else
{
dialog.Text("You~need~100~k~Cps");
dialog.Send();
}
break;
}
}
break;
}
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Code.Game.MsgServer
{
public static class MsgReincarnation
{
public static void GetReincarnation(this ServerSockets.Packet msg, out uint ToClass, out uint ToBody)
{
int timerstamp = msg.ReadInt32();
ToClass = msg.ReadUInt32();
ToBody = msg.ReadUInt32();
}
//[PacketAttribute(Game.GamePackets.Reincarnation)]
public unsafe static void Proces(Client.GameState user, ServerSockets.Packet stream)
{
uint ToClass;
uint ToBody;
stream.GetReincarnation(out ToClass, out ToBody);
if (ToClass == 11 || ToClass == 21 || ToClass == 41 || ToClass == 51 || ToClass == 61 || ToClass == 71 || ToClass == 81 || ToClass == 132 || ToClass == 142 || ToClass == 91 || ToClass == 161)
{
if (user.Inventory.Contains(711083, 1))
{
if (user.Entity.Level >= 110 && user.Entity.Reborn == 2)
{
if (Network.PacketHandler.IsBoy(user.Entity.Body))
{
switch (ToBody)
{
case 1:
user.Entity.Body = 1003;
break;
case 2:
user.Entity.Body = 1004;
break;
}
}
else
{
switch (ToBody)
{
case 1:
user.Entity.Body = 2001;
break;
case 2:
user.Entity.Body = 2002;
break;
}
}
user.Inventory.Remove(711083, 1);
Program.RebornInfo.Reborn(user.Entity, (byte)ToClass, stream);
}
else
user.MessageBox("You have not been Reborn twice or you are not level 110 ++");
}
}
}
}
}
|
الذين يشاهدون محتوى الموضوع الآن : 3 ( الأعضاء 0 والزوار 3) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اضافة الشخصية الجديده لسورس البروتوا كامل | محمد ياسر | تطوير سيرفرات كونكر | 94 | 2024-02-10 02:57 PM |
اضافة ابيك القرصان كامل | محمد ياسر | تطوير سيرفرات كونكر | 28 | 2023-09-10 08:59 PM |
عايز اضافت البرتو كامل | ElSaher | الطلبات المدفوعه | 2 | 2020-03-06 12:19 AM |
اضافة المونك كامل | محمد ياسر | تطوير سيرفرات كونكر | 7 | 2020-02-15 10:59 PM |
npc ترقيات الشخصية الجديده كامل | محمد ياسر | تطوير سيرفرات كونكر | 3 | 2019-08-18 08:20 PM |