Beispiel #1
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("Welcome to Requiem World, Do not Hesitate to Contact the [GM] if you have any questions ");
                AddText("Please use the /report command to tell us about bugs. Enjoy your free starter pack! ");
                AddOption("Thanks ", 2);
                AddOption("Newbie Quest ", 3);
                break;

            case 2:

                if (_client.Level <= 25)
                {
                    if (_client.Inventory.Count < 33)
                    {
                        if (_client.ProfessionType == Enum.ProfessionType.Taoist)
                        {
                            _client.CreateItem(421009);     //wep
                            _client.CreateItem(134009);     // armor
                            _client.CreateItem(114009);     // helmet
                            _client.CreateItem(152019);     // ring
                            _client.CreateItem(121009);     // necklace
                            _client.CreateItem(160019);     // boots
                            AddText("Have Fun! ");
                            AddOption("I will", 255);
                            break;
                        }
                        if (_client.ProfessionType == Enum.ProfessionType.Trojan)
                        {
                            _client.CreateItem(480019);     //wep
                            _client.CreateItem(130009);     // armor
                            _client.CreateItem(118009);     // helmet
                            _client.CreateItem(150019);     // ring
                            _client.CreateItem(120009);     // necklace
                            _client.CreateItem(160019);     // boots
                            AddText("Have Fun! ");
                            AddOption("I will", 255);
                            break;
                        }
                        if (_client.ProfessionType == Enum.ProfessionType.Warrior)
                        {
                            _client.CreateItem(561019);     //wep
                            _client.CreateItem(131009);     // armor
                            _client.CreateItem(111009);     // helmet
                            _client.CreateItem(150019);     // ring
                            _client.CreateItem(120009);     // necklace
                            _client.CreateItem(160019);     // boots
                            AddText("Have Fun! ");
                            AddOption("I will", 255);
                            break;
                        }
                        if (_client.ProfessionType == Enum.ProfessionType.Archer)
                        {
                            _client.CreateItem(500009);     //wep
                            _client.CreateItem(133009);     // armor
                            _client.CreateItem(113009);     // helmet
                            _client.CreateItem(150019);     // ring
                            _client.CreateItem(120009);     // necklace
                            _client.CreateItem(160019);     // boots
                            _client.CreateItem(1050000);    // arrows
                            AddText("Have Fun! ");
                            AddOption("I will.", 255);
                            break;
                        }

                        else
                        {
                            AddText("");
                        }
                        break;
                    }
                    else
                    {
                        _client.SendMessage("You have no space in your inventory.");
                        AddText("Free some space in you bag before you can claim Requiem gift");
                    }
                }
                else
                {
                    AddText("I am sorry i can only help new players under lvl 25. Maybe you can too!");
                    AddOption("got it!", 255);
                }
                break;

            case 3:
                AddText("Do you really want to start the newbie quest?");
                AddOption("Give it to me!", 4);
                AddOption("Not for me!", 5);

                break;

            case 4:
                AddText("So you need to kill 10 Pheasants just outside of Twin City");
                AddOption("This sounds pretty easy!", 5);
                AddOption("I dont want to make any quests", 255);

                break;

            case 5:
                if (_client.Level <= 25)
                {
                    _client.MonsterStart(1, 10);

                    break;
                }
                break;
            }

            AddFinish();
            Send();
        }
Beispiel #2
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                if (!_client.Tasks.ContainsKey(TaskType.Lottery))
                {
                    _client.Tasks.TryAdd(TaskType.Lottery, new Task(_client.UID, TaskType.Lottery,
                                                                    DateTime.Now.AddHours(24)));
                }
                if (_client.Tasks[TaskType.Lottery].Count >= 10)
                {
                    AddText("I'm afraid you already played the lottery 10 times today");
                    AddOption("i was just getting started!", 255);
                    break;
                }
                else if (!_client.HasItem(710212))
                {
                    AddText("You do not have a lottery ticket! I cannot help you unless you have one.");
                    AddText("You can buy one from LadyLuck in the Market.");
                    AddOption("No, thanks.", 255);
                }
                else
                {
                    _client.Tasks[TaskType.Lottery].Count++;
                    _client.DeleteItem(710212);
                    var ItemInfo = Common.QurryLotteryItem();
                    var item     = ItemInfo.Item1;
                    item.SetOwner(_client);
                    if (_client.AddItem(item))
                    {
                        _client.Send(ItemInformationPacket.Create(item));
                    }
                    else
                    {
                        _client.SendMessage("Error adding item");
                    }
                    string pre = "";
                    switch (ItemInfo.Item3)
                    {
                    case LotteryItemType.Elite1Socket:
                        pre = " Elite 1 socket ";
                        break;

                    case LotteryItemType.Elite2Socket:
                        pre = " Elite 2 socket ";
                        break;

                    case LotteryItemType.ElitePlus8:
                        pre = " Elite +8 ";
                        break;

                    case LotteryItemType.Super1Socket:
                        pre = " Super 1 socket ";
                        break;

                    case LotteryItemType.SuperNoSocket:
                        pre = " Super ";
                        break;
                    }

                    /*AddText("Here is some info about the item. ");
                     * AddText("Character: " + _client.Name + " - Item1: " + ItemInfo.Item1 + " - Item2: " + ItemInfo.Item2 + " - Item3: " + ItemInfo.Item3 + " ");
                     * AddText("Just item: " + item + " - UniqueID: " + item.UniqueID);
                     * AddOption("Close window", 255);*/
                    PlayerManager.SendToServer(new TalkPacket(ChatType.GM, _client.Name + " was so lucky and won a/an " + pre + ItemInfo.Item2 + " in the lottery"));
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Beispiel #3
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                if (_client.Inventory.Count < 39)
                {
                    if (!_client.Tasks.ContainsKey(TaskType.Lottery))
                    {
                        _client.Tasks.TryAdd(TaskType.Lottery, new Task(_client.UID, TaskType.Lottery,
                                                                        DateTime.Now.AddHours(24)));
                    }
                    if (_client.Tasks[TaskType.Lottery].Count >= 10)
                    {
                        AddText("I'm afraid you already played the lottery 10 times today");
                        AddOption("i was just getting started!", 255);
                        break;
                    }
                    else if (!_client.HasItem(710212))
                    {
                        AddText("Sorry i can't help you unless you buy a ticket!");
                        AddOption("No thanks", 255);
                        break;
                    }
                    else
                    {
                        if (_client.HasItem(710212))
                        {
                            var ItemInfo = Common.QurryLotteryItem();
                            var ItemID   = ItemInfo.Item1;
                            var ItemName = ItemInfo.Item3;
                            ItemID.SetOwner(_client);



                            if (_client.HasItem(710212) && _client.AddItem(ItemID))
                            {
                                _client.Tasks[TaskType.Lottery].Count++;
                                _client.DeleteItem(710212);
                                _client.Send(ItemInformationPacket.Create(ItemID));
                            }
                            else
                            {
                                _client.SendMessage("Error adding item");
                            }

                            _client.Save();


                            string pre = "";
                            switch (ItemInfo.Item3)
                            {
                            case LotteryItemType.Elite1Socket:
                                pre = " Elite 1 socket ";

                                break;

                            case LotteryItemType.Elite2Socket:
                                pre = " Elite 2 socket ";
                                break;

                            case LotteryItemType.ElitePlus8:
                                pre = " Elite +8 ";
                                break;

                            case LotteryItemType.Super1Socket:
                                pre = " Super 1 socket ";
                                break;

                            case LotteryItemType.SuperNoSocket:
                                pre = " Super ";
                                break;
                            }
                            PlayerManager.SendToServer(new TalkPacket(ChatType.GM, _client.Name + " was so lucky and won a/an " + pre + ItemInfo.Item2 + " in the lottery"));
                        }
                    }
                }
                else
                {
                    AddText("I'm afraid your Inventory is full, please free some space..");
                    AddOption("Thank you i will", 255);
                    break;
                }
                break;
            }
            }
            AddFinish();
            Send();
            _client.Save();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)

            {
            case 0:
            {
                AddText("This is the final step in your quest to second reborn, defeat Satan and you shall be worthy of getting second reborn!You need and SquamaBead to call him into this world! ");
                AddOption("Bring that devil here!", 1);
                AddOption("No , I shall leave now.", 255);

                break;
            }

            case 1:
            {
                if (_client.HasItem(722727, 1))
                {
                    if (_client.Character.SecondQuest != 0)
                    {
                        AddText("Already second");
                        AddOption("I see.", 255);
                    }
                    else
                    {
                        _RebFlag = 1;

                        //_client.ChangeMap(1002, 430, 380);


                        _client.DeleteItem(722727);


                        Database.Domain.DbMonstertype monster = new Database.Domain.DbMonstertype();



                        int K = 1500000;
                        monster.Life        = (ushort)K;
                        monster.Level       = 150;
                        monster.Mesh        = 166;
                        monster.Name        = "Satan";
                        monster.AttackMax   = 15000;
                        monster.AttackMin   = 10000;
                        monster.AttackRange = 2;
                        monster.AttackMode  = 3;
                        monster.AttackSpeed = 500;
                        monster.ViewRange   = 30;
                        monster.MoveSpeed   = 500;
                        monster.MoveSpeed   = 500;



                        //entity.X = 314;
                        //entity.Y = 324;

                        uint   id    = 3644;
                        ushort count = 2;
                        ushort freq  = 1;



                        Database.Domain.DbMonstertype monsterType = Database.ServerDatabase.Context.Monstertype.GetById(id);
                        if (monsterType == null)
                        {
                            _client.SendMessage("ERROR: No such monster ID: " + id);
                        }
                        else if (_client.MapID == 1700)
                        {
                            var x1 = 313;
                            var x2 = 314;
                            var y1 = 323;
                            var y2 = 324;

                            Database.Domain.DbSpawn dbSpawn = new Database.Domain.DbSpawn();
                            ushort radius = 1;
                            dbSpawn.MonsterType = monsterType.ID;
                            dbSpawn.X1          = (ushort)(x1 - radius);
                            dbSpawn.Y1          = (ushort)(y1 - radius);
                            dbSpawn.X2          = (ushort)(x2 + radius);
                            dbSpawn.Y2          = (ushort)(y2 + radius);
                            dbSpawn.Map         = _client.MapID;
                            dbSpawn.AmountMax   = count / 2;
                            dbSpawn.AmountPer   = count / 2;
                            dbSpawn.Frequency   = freq;
                            freq  = 3600;
                            count = 1;
                            id    = 0;


                            monster.Life = 0;
                            Database.ServerDatabase.Context.Spawns.Add(dbSpawn);
                            _client.Map.Spawns.Add(new Managers.SpawnManager(dbSpawn, _client.Map));
                            Database.ServerDatabase.Context.Spawns.Remove(dbSpawn);
                        }
                        if (_RebFlag == 1)
                        {
                            _client.Character.SecondQuest = 1;
                            //var SQ = _client = 1;
                            // var updatePacket = UpdatePacket.Create(_client.UID, Enum.UpdateType.SecondQuest, SQ);
                            //updatePacket.AddUpdate(Enum.UpdateType.SecondQuest, _client.Character.SecondQuest);
                            _client.SendMessage("Congratulations! " + _client.Character.Name + " Has Summoned the Great Demon Wish them luck on their 2nd Rebirth", Enum.ChatType.GM, Enum.ChatColour.Red);
                            _client.Save();
                        }
                        break;
                    }
                }



                else
                {
                    AddText("You don't have  have required materials!");
                    AddOption("I see.", 255);
                }
                break;
            }
            }

            AddFinish();
            Send();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                if (_client.HasItem(721002))
                {
                    AddText("I cannot help crying. Where did you get this sad meteor? What happened?");
                    AddOption("It is from Joe.", 6);
                    AddOption("Sorry, I cannot tell you.", 255);
                }
                else
                {
                    AddText("Should auld acquaintance be forgotten and never brought to mind? Should auld acquaintance be forgotten and auld lang syne?");
                    AddOption("Why are you so sad?", 1);
                    AddOption("Nice song.", 255);
                }
                break;

            case 1:
                if (_client.HasItem(721000))
                {
                    AddText("Thanks. I am so pleased to hear from my sister. I have not seen her for a long time. It is very thoughtful of her. Sigh!");
                    AddOption("Why are you so sad?", 2);
                    AddOption("I had better leave now.", 255);
                }
                else
                {
                    AddText("I miss you like crazy every time of every day. I love you deeply all my life. Why are you so cruel to break my heart.");
                    AddOption("I got to go.", 255);
                }
                break;

            case 2:
                AddText("My lover has left me without any reason. I tried to find him but got no news since he left. Can you help me to find him?");
                AddOption("OK. I shall help you.", 4);
                AddOption("Sorry, I am too busy.", 3);
                break;

            case 3:
                //No check needed - We are exiting, not rewarding
                _client.DeleteItem(721000);
                AddText("Thank you for the letter. Good bye.");
                AddOption("See you.", 255);
                break;

            case 4:
                AddText("Thanks. Joe gave me this bag as our love token. Give it to him when you find him and tell him I am always here waiting for him.");
                AddOption("I shall try my best!", 5);
                break;

            case 5:
                if (_client.HasItem(721000))
                {
                    //No need to check inventory space. We're deleting and adding at the same time
                    _client.DeleteItem(721000);
                    _client.CreateItem(721001);
                }
                break;

            case 6:
            {
                AddText("Joe! You have seen him? Where is he now? Is everything going on well with him?");
                AddOption("Do not cry.", 7);
                AddOption("Do not ruin the meteor!", 255);
                break;
            }

            case 7:
                _client.SendMessage("Joe loves and misses you very much. He engraved his love on this meteor. He said you will understand after you see it.");
                AddText("It is said that true love can move the meteor to cry and turn it to meteor tear. I am so glad that Joe does love me.");
                AddOption("All will be fine.", 8);
                AddOption("Return my meteor.", 255);
                break;

            case 8:
                AddText("Joe, Can you hear me? I love you. wherever you go, whatever you do, I will be right here waiting for you.");
                AddOption("Sad love story. Sigh.", 9);
                break;

            case 9:
                AddText("Since Joe enjoys travelling round the world, I only wish he is happy. I shall be very delighted Whenever he thinks of me.");
                AddOption("How about you then?", 10);
                break;

            case 10:
                AddText("It is said a star in the sky represents a person on the earth. When I miss him, I can look at his star and it will twinkle.");
                AddOption("I hope Joe will return.", 11);
                break;

            case 11:
                if (_client.HasItem(721002))
                {
                    _client.DeleteItem(721002);
                    _client.CreateItem(1088002);
                    AddText("Thanks for your news. Please take this meteor tear. I hope you are happy all your life.");
                    AddOption("Thanks.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Beispiel #6
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("Hello , did you knew that an socketed equipment is better than one without sockets?");
                AddText("I can try to socket like Twin City Artisan but without leveling up");
                AddOption("Try Socket my weapon 1 time (1 Meteor)", 1);
                AddOption("Try Socket my weapon 10 times (1 Meteor Scroll)", 2);
                AddOption("Try Socket my weapon (All Meteors)", 3);
                AddOption("Try Socket my weapon (All Meteor Scrolls)", 4);
                AddOption("No. I like it this way.", 255);
                break;
            }

            case 1:
            {
                var equipment = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
                if (equipment == null)
                {
                    AddText("There must be some mistake. You must be wearing a weapon before I can help you socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem2 > 0)
                {
                    AddText("There must be some mistake. Your weapon already has the maximum number of sockets!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(Constants.METEOR_ID, 1))
                {
                    AddText("There must be some mistake. You do not have 1 Meteor required to socket this item!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    _client.DeleteItem(Constants.METEOR_ID);

                    if (Common.PercentSuccess(Constants.SOCKET_UPGRADE))
                    {
                        if (equipment.Gem1 == 0)
                        {
                            equipment.Gem1 = 255;
                            _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                        }
                        else if (equipment.Gem2 == 0)
                        {
                            equipment.Gem2 = 255;
                            _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                        }
                        equipment.Save();
                        _client.Send(ItemInformationPacket.Create(equipment));
                    }
                }
                break;
            }

            case 2:
            {
                var equipment = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
                if (equipment == null)
                {
                    AddText("There must be some mistake. You must be wearing a weapon before I can help you socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem2 > 0)
                {
                    AddText("There must be some mistake. Your weapon already has the maximum number of sockets!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(Constants.METEOR_SCROLL_ID, 1))
                {
                    AddText("There must be some mistake. You do not have 1 Meteor Scroll required to socket this item!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    _client.DeleteItem(Constants.METEOR_SCROLL_ID);

                    for (int i = 0; i < 10; i++)
                    {
                        if (Common.PercentSuccess(Constants.SOCKET_UPGRADE))
                        {
                            if (equipment.Gem1 == 0)
                            {
                                equipment.Gem1 = 255;
                                _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                            }
                            else if (equipment.Gem2 == 0)
                            {
                                equipment.Gem2 = 255;
                                _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                            }
                            equipment.Save();
                            _client.Send(ItemInformationPacket.Create(equipment));
                        }
                    }
                }
                break;
            }

            case 3:
            {
                var equipment = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
                if (equipment == null)
                {
                    AddText("There must be some mistake. You must be wearing a weapon before I can help you socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem2 > 0)
                {
                    AddText("There must be some mistake. Your weapon already has the maximum number of sockets!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(Constants.METEOR_ID, 1))
                {
                    AddText("There must be some mistake. You do not have 1 Meteor required to socket this item!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    while (_client.DeleteItem(Constants.METEOR_ID))
                    {
                        if (Common.PercentSuccess(Constants.SOCKET_UPGRADE))
                        {
                            if (equipment.Gem1 == 0)
                            {
                                equipment.Gem1 = 255;
                                _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                            }
                            else if (equipment.Gem2 == 0)
                            {
                                equipment.Gem2 = 255;
                                _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                            }
                            equipment.Save();
                            _client.Send(ItemInformationPacket.Create(equipment));
                        }
                    }
                }
                break;
            }

            case 4:
            {
                var equipment = _client.Equipment.GetItemBySlot(Enum.ItemLocation.WeaponR);
                if (equipment == null)
                {
                    AddText("There must be some mistake. You must be wearing a weapon before I can help you socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem2 > 0)
                {
                    AddText("There must be some mistake. Your weapon already has the maximum number of sockets!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(Constants.METEOR_SCROLL_ID, 1))
                {
                    AddText("There must be some mistake. You do not have 1 Meteor Scroll required to socket this item!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    while (_client.DeleteItem(Constants.METEOR_SCROLL_ID))
                    {
                        for (int i = 0; i < 10; i++)
                        {
                            if (Common.PercentSuccess(Constants.SOCKET_UPGRADE))
                            {
                                if (equipment.Gem1 == 0)
                                {
                                    equipment.Gem1 = 255;
                                    _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                                }
                                else if (equipment.Gem2 == 0)
                                {
                                    equipment.Gem2 = 255;
                                    _client.SendMessage("You have successfully socketed your " + equipment.BaseItem.Name, ChatType.System);
                                }
                                equipment.Save();
                                _client.Send(ItemInformationPacket.Create(equipment));
                            }
                        }
                    }
                }
                break;
            }
            }

            AddFinish();
            Send();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:

                if (_client.RebornCount == 0)
                {
                    if (_client.ProfessionLevel <= 5 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                    {
                        AddText("Even bold adventurers eventually grow tired of their journeys. I help these heroes by offering them life anew.");
                        AddOption("I wish to reborn.", 1);
                        AddOption("I'm not tired!", 255);
                        break;
                    }
                    else
                    {
                        AddText("Hello young one! I help people seek the ultimate goal of rebirth. ");
                        AddText("You are not yet experienced enough to undertake this adventure. Please come back later.");
                        AddOption("I will.", 255);
                        break;
                    }
                }
                else
                {
                    if (_client.Character.SecondQuest == 1)
                    {
                        AddText("Congratulations, you have finished the Second Reborn Quest FIND Eternity to start the rebirth ritual!");
                        AddOption("Okay..", 255);
                        break;
                    }
                    else
                    {
                        if (_client.RebornCount == 1 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                        {
                            AddText("Congratulations, you have reached The level required to initiate the second reborn quest, Do you really wanna go to Second Reborn Map (very hard)? ");
                            AddOption("I am ready send me", 99);
                            AddOption("Thats beyond by capabilities..", 255);
                            break;
                        }

                        else
                        {
                            if (_client.RebornCount > 1)
                            {
                                AddText("We have helped you as much as we can. No one in this realm knows how powerfull you are, use your power wisely");
                                AddOption("Thanks!", 255);
                                break;
                            }
                            else
                            {
                                AddText("I am sorry you are not ready to reborn yet!");
                                AddOption("Thanks", 255);
                                break;
                            }
                        }
                    }
                }

            case 99:
            {
                if (_client.ProfessionLevel == 5 && _client.RebornCount == 1 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                {
                    _client.ChangeMap(1700, 305, 345);
                    _client.SendMessage("Player" + _client.Name + " Has started Second Reborn quest. Players are getting Stronger by the minute", ChatType.GM, ChatColour.White);
                    _client.Save();
                    break;
                }
                else
                {
                    AddText("Sorry you must at least have 1 reborn and be level 120. Only Water Taoists can reborn at level 110.");
                    AddOption("I'll just leave", 255);
                    break;
                }
            }

            case 1:
                if (_client.ProfessionLevel == 5 && _client.RebornCount == 0 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                {
                    AddText("By accepting the gift of rebirth, you will start your life again. ");
                    AddText("You can unlock great strength as well as new skills in the process! ");
                    AddText("Are you sure you're ready to give up your current life? ");
                    AddOption("I'm ready.", 2);
                    AddOption("Not yet!", 255);
                    break;
                }
                else
                {
                    AddText("Ooh my! Lets not get ahead of ourselves. You are not yet ready to become reborn.");
                    AddOption("Sorry.", 255);
                }
                break;

            case 2:
                if (_client.HasItem(Constants.CELESTIAL_STONE_ID))
                {
                    AddText("You can choose to either receive a gem of great power or bless your equipment for even greater strength. Which would you like?");
                    AddOption("Blessed Rebirth", 3);
                    AddOption("Gem Rebirth", 5);
                    AddOption("I'm not sure...", 255);
                    break;
                }
                else
                {
                    AddText("Rebirth requires the unlocking of great power. Please make sure you have a CelestialStone before coming to me.");
                    AddOption("Sorry.", 255);
                    break;
                }
                break;

            case 3:
            case 4:
                isBlessedRebirth = _linkback == 3;
                AddText("What profession would you like in your new life?");
                AddOption("Trojan", 11);
                AddOption("Warrior", 12);
                AddOption("Water Taoist", 13);
                AddOption("Fire Taoist", 14);
                AddOption("Archer", 15);
                AddOption("I'm not sure...", 255);
                break;

            case 5:
                AddText("What type of gem would you like?");
                AddOption("Phoenix Gem", 20);
                AddOption("Dragon Gem", 21);
                AddOption("Fury Gem", 22);
                AddOption("Rainbow Gem", 23);
                AddOption("More Options", 6);
                AddOption("I'm not sure...", 255);
                break;

            case 6:
                AddText("What type of gem would you like?");
                AddOption("Kylin Gem", 24);
                AddOption("Violet Gem", 25);
                AddOption("Moon Gem", 26);
                AddOption("Previous Options", 5);
                AddOption("I'm not sure...", 255);
                break;

            case 20:
            case 21:
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
                baseGemRequest = (byte)(_linkback % 10);
                _linkback      = 4;
                goto case 4;

            case 11:
            case 12:
            case 13:
            case 14:
            case 15:
                if (_client.ProfessionLevel == 5 && _client.RebornCount == 0 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                {
                    if (_client.HasItem(Constants.CELESTIAL_STONE_ID))
                    {
                        _client.DeleteItem(Constants.CELESTIAL_STONE_ID);
                        if (isBlessedRebirth)    //Bless random item.
                        {
                            Structures.ConquerItem item;
                            for (var tries = 0; tries < 50; tries++)
                            {
                                var loc = (ItemLocation)(Common.Random.Next(10));
                                item = _client.Equipment.GetItemBySlot(loc);
                                if (item != null && item.Bless == 0)
                                {
                                    item.Bless = 1; break;
                                }
                            }
                        }
                        else    //Give Super Gem
                        {
                            _client.CreateItem((uint)(BASE_GEM_ID + baseGemRequest * 10));
                        }

                        var path = (uint)_client.ProfessionType % 10 * 10 + (uint)_linkback % 10;
                        if (_client.ProfessionType == ProfessionType.Archer)
                        {
                            path = 50 + (uint)_linkback % 10;
                        }
                        foreach (var pathData in Database.ServerDatabase.Context.RebornPaths.GetRebornByPath(path))
                        {
                            if (pathData.IsForget)
                            {
                                _client.CombatManager.TryRemoveSkill(pathData.SkillId);
                            }
                            else
                            {
                                _client.CombatManager.AddOrUpdateSkill(pathData.SkillId, 0);
                            }
                        }
                        foreach (var skill in _client.CombatManager.skills.Values)
                        {
                            skill.Database.PreviousLevel = skill.Database.Level;
                            skill.Database.Level         = 0;
                            skill.Database.Experience    = 0;
                            skill.Save();
                            skill.Send(_client);
                        }

                        _client.Character.Profession1 = _client.Character.Profession;
                        switch (_linkback % 10)
                        {
                        case 1:
                            _client.Character.Profession = 11;
                            break;

                        case 2:
                            _client.Character.Profession = 21;
                            break;

                        case 3:
                            _client.Character.Profession = 132;
                            break;

                        case 4:
                            _client.Character.Profession = 142;
                            break;

                        case 5:
                            _client.Character.Profession = 41;
                            break;
                        }

                        #region Down Level Items
                        for (ItemLocation location = ItemLocation.Helmet; location < ItemLocation.Garment; location++)
                        {
                            Structures.ConquerItem item;
                            item = _client.Equipment.GetItemBySlot(location);
                            if (item != null)
                            {
                                item.DownLevelItem(); _client.Send(ItemInformationPacket.Create(item, ItemInfoAction.Update));
                            }
                        }
                        #endregion

                        #region Set Bonus Stats
                        _client.Character.Strength = 0;
                        _client.Character.Vitality = 8;
                        _client.Character.Agility  = 2;
                        _client.Character.Spirit   = 0;
                        switch (_client.Level)
                        {
                        case 110:
                        case 111:
                            _client.ExtraStats = 20;
                            break;

                        case 112:
                        case 113:
                            _client.ExtraStats = 21;
                            break;

                        case 114:
                        case 115:
                            _client.ExtraStats = 23;
                            break;

                        case 116:
                        case 117:
                            _client.ExtraStats = 26;
                            break;

                        case 118:
                        case 119:
                            _client.ExtraStats = 30;
                            break;

                        case 120:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 35 : 20);
                            break;

                        case 121:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 35 : 21);
                            break;

                        case 122:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 41 : 23);
                            break;

                        case 123:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 41 : 26);
                            break;

                        case 124:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 48 : 30);
                            break;

                        case 125:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 48 : 35);
                            break;

                        case 126:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 56 : 41);
                            break;

                        case 127:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 56 : 48);
                            break;

                        case 128:
                            _client.ExtraStats = (ushort)(_client.ProfessionType == ProfessionType.WaterTaoist ? 65 : 56);
                            break;

                        case 129:
                            _client.ExtraStats = 65;
                            break;

                        case 130:
                            _client.ExtraStats = 75;
                            break;
                        }
                        #endregion

                        _client.RebornCount = 1;
                        _client.Send(new UpdatePacket(_client.UID, UpdateType.Profession, _client.Character.Profession));
                        _client.Send(new UpdatePacket(_client.UID, UpdateType.Reborn, _client.RebornCount));
                        _client.SpawnPacket.RebornCount = 1;
                        _client.SendToScreen(_client.SpawnPacket, true);
                        _client.SetLevel(15);
                        _client.Experience = 0;
                        _client.Recalculate(true);
                        Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, _client.Name + " has been reborned successfully. Congratulations!"));
                        _client.Save();
                        break;
                    }
                    else
                    {
                        AddText("Rebirth requires the unlocking of great power. Please make sure you have a CelestialStone before coming to me.");
                        AddOption("Sorry.", 255);
                        break;
                    }
                }
                else
                {
                    AddText("Lets not get ahead of ourselves! You are not ready to achieve rebirth. Please come back later.");
                    AddOption("Sorry.", 255);
                    break;
                }
                break;
            }
            AddFinish();
            Send();
        }