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

                AddText("Hello, are you satisfield with your stature? I can change your body size for 1 DragonBall.");
                AddText("Would you like to change it?");
                AddOption("Yeah.", 1);
                AddOption("No.", 255);
                break;

            case 1:
                AddText("Are you sure you want to do this?");
                AddOption("Yes.", 2);
                AddOption("I changed my mind.", 255);
                break;

            case 2:
                if (_client.HasItem(1088000))
                {
                    _client.DeleteItem(1088000);
                    if (_client.Lookface % 2 == 0)
                    {
                        _client.Lookface--;
                    }
                    else
                    {
                        _client.Lookface++;
                    }
                    _client.Character.Lookface = _client.Lookface;
                    _client.Save();

                    AddText("There you go. I hope you are satisfied now!");
                    AddOption("Thanks!", 255);
                    _client.Save();
                }
                else
                {
                    AddText("You don't have 1 DragonBall.");
                    AddOption("Nevermind ", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Пример #2
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("Where are you heading for? I can teleport you for a price of 100 silver.");
                AddOption("Twin City", 1);
                AddOption("Mystic Castle", 2);
                AddOption("Market", 3);
                AddOption("Just passing by.", 255);
                break;

            case 1:
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1000, 971, 666);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 2:
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1000, 85, 323);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 3:
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1036, 211, 196);
                    _client.PrevMap = (ushort)_client.Character.Map;
                    _client.PrevX   = (ushort)_client.Character.X;
                    _client.PrevY   = (ushort)_client.Character.Y;
                    _client.Save();
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Пример #3
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("I can give you 1 PureVigor for 3 ImpureVigors or i give you one SquamaBead for 3 PureVigor");
                AddOption("PureVigors", 1);
                AddOption("SquamaBead", 2);
                AddOption("This is messed up..", 255);

                break;
            }

            case 1:
            {
                if (_client.Inventory.Count <= 39 && _client.HasItem(722730, 3))
                {
                    _client.DeleteItem(722730);
                    _client.CreateItem(722731);
                    _client.Save();
                }
                else
                {
                    AddText("You either do not have enough required material or inventory space!");
                    AddOption("I see..", 255);
                }
                break;
            }

            case 2:
            {
                if (_client.Inventory.Count <= 39 && _client.HasItem(722731, 3))
                {
                    _client.DeleteItem(722731);
                    _client.CreateItem(722727);
                }
                else
                {
                    AddText("You either do not have enough required material or inventory space!");
                    AddOption("I see..", 255);
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Пример #4
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("You can exchange 1 VigorFragment for 3 ImmortalStones or 1 ImpureVigor for 3 VigorFragments");
                AddOption("VigorFragments", 1);
                AddOption("ImpureVigor", 2);
                AddOption("I will not trade anything.", 255);

                break;
            }

            case 1:
            {
                if (_client.Inventory.Count <= 39 && _client.HasItem(722728, 3))
                {
                    _client.DeleteItem(722728);
                    _client.CreateItem(722729);
                }
                else
                {
                    AddText("Seems that you don't have enough space in inventory or you dont have required materials!");
                    AddOption("I see..", 255);
                }
                break;
            }

            case 2:
            {
                if (_client.Inventory.Count <= 39 && _client.HasItem(722729, 3))
                {
                    _client.DeleteItem(722728);
                    _client.CreateItem(722730);
                    _client.Save();
                }
                else
                {
                    AddText("You don't have enough space in inventory or you dont 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.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);
                    }
                    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);
                    }
                }
                else
                {
                    AddText("I have helped you as much as I can. Even heroes have their limits.");
                    AddOption("Thanks", 255);
                }
                break;

            case 1:
                if (_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);
                }
                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);
                }
                else
                {
                    AddText("Rebirth requires the unlocking of great power. Please make sure you have a CelestialStone before coming to me.");
                    AddOption("Sorry.", 255);
                }
                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();
                    }
                    else
                    {
                        AddText("Rebirth requires the unlocking of great power. Please make sure you have a CelestialStone before coming to me.");
                        AddOption("Sorry.", 255);
                    }
                }
                else
                {
                    AddText("Lets not get ahead of ourselves! You are not ready to achieve rebirth. Please come back later.");
                    AddOption("Sorry.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Пример #6
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("I can help you master your weapon by channeling the power inside ExpBalls. What weapon would you like to train in? ");
                AddOption("Blade ", 10);
                AddOption("Club ", 80);
                AddOption("Sword ", 20);
                AddOption("Bow ", 100);
                AddOption("Next Page", 2);
                AddOption("No. I will do it myself.", 255);
                break;
            }

            case 2:
            {
                AddText("Choose the weapon you want to upgrade ițs proficiency from the list below. ");
                AddOption("Spear ", 160);
                AddOption("Wand ", 161);
                AddOption("Hook ", 30);
                AddOption("Whip ", 41);
                AddOption("Next Page", 3);
                AddOption("I changed my mind. ", 255);

                break;
            }

            case 3:
            {
                AddText("Choose the weapon you want to upgrade ițs proficiency from the list below. ");
                AddOption("PoleAxe ", 130);
                AddOption("LongHammer", 140);
                AddOption("Glaive ", 110);
                AddOption("Halbert", 180);
                AddOption("Next Page", 4);
                AddOption("I changed my mind. ", 255);
                break;
            }

            case 4:
            {
                AddText("Choose the weapon you want to upgrade ițs proficiency from the list below. ");
                AddOption("Backsword ", 21);
                AddOption("Scepter ", 81);
                AddOption("Dagger ", 90);
                AddOption("Hammer ", 60);
                AddOption("Axe", 50);
                AddOption("I changed my mind. ", 255);
                break;
            }

            case 10:
            case 20:
            case 21:
            case 30:
            case 41:
            case 50:
            case 60:
            case 80:
            case 81:
            case 90:
            case 100:
            case 110:
            case 130:
            case 140:
            case 160:
            case 161:
            case 180:
            {
                if (!_client.CombatManager.proficiencies.ContainsKey((ushort)(_linkback + 400)))
                {
                    AddText("You must have the proficiency for that weapon at least level 1!");
                    AddOption("Nevermind", 255);
                    break;
                }
                var prof = _client.CombatManager.proficiencies[(ushort)(_linkback + 400)];
                var cost = prof.Level + 1;
                if (prof.Level > 12)
                {
                    AddText("It seems that your weapon proficiency  is at it's highest level.");
                    AddOption("Nevermind", 255);

                    break;
                }
                if (hasAgreed && !_client.HasItem(723700, (uint)cost))
                {
                    AddText("There must be some mistake. You do not have the required amount of ExpBalls, you must bring +" + cost + "!");
                    AddOption("Nevermind", 255);

                    break;
                }
                else if (hasAgreed)
                {
                    for (var i = 0; i < cost; i++)
                    {
                        _client.DeleteItem(723700);
                    }
                    prof.Level++;
                    prof.Experience = 0;
                    _client.CombatManager.AddOrUpdateProf((ushort)(_linkback + 400), (ushort)(prof.Level), 0);
                    AddText("It is done! ");
                    AddOption("No thanks.", 255);
                    _client.Save();
                }
                else
                {
                    hasAgreed = true;
                    AddText("Are you sure you want to spend  " + cost + " ExpBalls to improve it?");
                    AddOption("Yes.", (byte)_linkback);
                    AddOption("No thanks.", 255);
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Пример #7
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("Where are you heading for? I can teleport you for a price of 100 silver.");
                AddOption("Phoenix Castle", 1);
                AddOption("Desert City", 2);
                AddOption("Ape Mountain", 3);
                AddOption("Bird Island.", 4);
                AddOption("Mine Cave", 5);
                AddOption("Market", 6);
                AddOption("Just passing by.", 255);
                break;

            case 1:    //Phoenix Castle
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1002, 957, 557);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 2:    //Desert City
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1002, 64, 469);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 3:    //Ape Mountain
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1002, 555, 957);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 4:    //Bird Island
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1002, 228, 193);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 5:    //Mine Cave
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1002, 53, 399);
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;

            case 6:    //Market
                if (_client.Money >= 100)
                {
                    _client.Money -= 100;
                    _client.ChangeMap(1036, 211, 196);
                    _client.PrevMap = (ushort)_client.Character.Map;
                    _client.PrevX   = (ushort)_client.Character.X;
                    _client.PrevY   = (ushort)_client.Character.Y;
                    _client.Save();
                }
                else
                {
                    AddText("Sorry, you do not have 100 silver.");
                    AddOption("I see.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Пример #9
0
        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:
                AddText("I can help you to divorce your spouse. You just will have to agree to a divorce. I will also need a MeteorTear. If you have this item and you really want to get divorced, we will do it soon.");
                AddOption("Yes, I want a divorce.", 1);
                AddOption("Just passing by.", 255);
                break;

            case 1:
                if (_client.Spouse == Constants.DEFAULT_MATE)
                {
                    AddText("You really sure you want to divorce your spouse now? You will not regret later?");
                    AddOption("No I'll not. Let's do this.", 2);
                    AddOption("I prefer to remain married.", 255);
                }
                else
                {
                    AddText("Sorry, I can not divorce you if you are not married.");
                    AddOption("Okay.", 255);
                }
                break;

            case 2:
                AddText("Are you ready? Be sure you're with MeteorTear, I really need it.");
                AddOption("Yeah. I am ready.", 3);
                AddOption("Let me think it over.", 255);
                break;

            case 3:
                if (_client.Spouse == Constants.DEFAULT_MATE && _client.HasItem(Constants.METEOR_TEAR_ID))
                {
                    var dbSpouse = Database.ServerDatabase.Context.Characters.GetByName(_client.Spouse);
                    if (dbSpouse != null)
                    {
                        dbSpouse.Spouse = Constants.DEFAULT_MATE;
                        Database.ServerDatabase.Context.Characters.AddOrUpdate(dbSpouse);

                        var meteorTear = _client.GetItemByID(Constants.METEOR_TEAR_ID);
                        _client.RemoveItem(meteorTear);
                        meteorTear.DbItem.Owner = dbSpouse.UID;
                        meteorTear.Save();

                        var spouse = Managers.PlayerManager.GetUser(_client.Spouse);
                        if (spouse != null)
                        {
                            spouse.AddItem(meteorTear);
                            spouse.Send(ItemInformationPacket.Create(meteorTear));

                            //sanity check incase they log out while it's being saved above or something weird
                            spouse.Spouse = Constants.DEFAULT_MATE;
                            spouse.Send((StringsPacket.Create(spouse.UID, StringAction.Mate, Constants.DEFAULT_MATE)));
                        }

                        Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, "Unfortunately! " + _client.Name + " and " + _client.Spouse + " got divorced."));

                        _client.Spouse = Constants.DEFAULT_MATE;
                        _client.Save();
                        AddText("Done, you are now divorced. You are free to find another passion around. Be happy my friend.");
                        AddOption("Thank you.", 255);
                    }
                }
                else
                {
                    AddText("Sorry, I can not divorce you if you don't have a MeteorTear.");
                    AddOption("Okay.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Пример #11
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            ushort Max1;

            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("Hello, i can help you gain experience to level up easier");
                AddOption("This is great..", 1);
                AddOption("Just passing by.", 255);
                break;

            case 1:
                var Jar = _client.GetItemByID(750000);
                Max1 = 100;
                if (Jar == null)
                {
                    AddText("To level up faster you need to collect the souls of 100 pheasants inside this Jar ");
                    AddOption("Looks easy, give me..", 2);
                    AddOption("Just passing by.", 255);
                }
                else if (Jar != null && Jar.MaximumDurability == 1)
                {
                    AddText("You have not completed collection of the souls of the previous Jar please complete it then come back");

                    AddOption("I see..", 255);
                }
                else if (Jar != null && Jar.MaximumDurability != 1)
                {
                    AddText("You already have a Jar (from another captain) but i will give you another one and thats it..");
                    AddOption("thank you alot", 2);
                    AddOption("I see..", 255);
                }
                else if (Jar != null && Jar.Durability == Max1)
                {
                    AddText("You have finished collecting souls and here is your reward");
                    AddOption("thank you alot", 2);
                    AddOption("I see..", 255);
                }

                break;

            case 2:
                Max1 = 100;
                DbTask task = new DbTask();

                task = Database.ServerDatabase.Context.Tasks.GetTasksByPlayerUID(_client.UID, 1);
                if (task == null)
                {
                    _client.CreateJar(Max1, 1, 750000);
                    _client.Save();


                    AddText("I gave you the item now go hunt pheasant");
                }
                else
                {
                    AddText("I'm sorry");
                }
                AddOption("Thanks", 255);
                break;
            }
            AddFinish();
            Send();
        }
Пример #12
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("A good set of equipment can help you a lot in battle. I can help you upgrade your equipment");
                AddText("all the way to +9.");
                AddOption("Enchant HP", 1);
                AddOption("Composing Upgrade", 3);
                AddOption("No thanks.", 255);

                break;

            case 1:
                _client.Send(GeneralActionPacket.Create(_client.UID, Enum.DataAction.OpenCustom, 1091));
                break;

            /*case 2:
             *  AddText("There are two ways of composing from +1 to +9 with +n stones or +n items and from +9 to +12 with DragonBalls.");
             *  AddText("Whitch one would you want?");
             *  AddOption("Compose +1 to +9.", 3);
             *  AddOption("Compose +9 to +12.", 4);
             *  AddOption("How does composing  +9 to +12 works?", 5);
             *  AddOption("Thanks.", 255);
             *
             *  break;*/
            case 3:
                _client.Send(GeneralActionPacket.Create(_client.UID, Enum.DataAction.OpenWindow, 1));
                break;

            case 4:      // Everything else can stay. There's no way to access anything further than +9
                AddText("What a glorious day! I belive it's the best weather to refine equipment in. Do you need my help with anything?");
                AddOption("Compose +9 Equipment to +10.", 6);
                AddOption("Compose +10 Equipment to +11.", 7);
                AddOption("Compose +11 Equipment to +12.", 8);
                AddOption("Nothing right now, thanks.", 255);
                break;

            case 5:
                AddText("If you have any +9 items, you may use DragonBalls to refine it and upgrade its bonus level up to +12.");
                AddOption("Are there any limits to equipment refining?", 9);
                AddOption("How many DragonBalls would I need?", 17);
                break;

            case 9:
                AddText("When your level reaches 130, I can help you upgrade the bonus level of your equiment and weapons.");
                AddText("However, there are limitations.Only right-Handed weapons can be refined. Whereas, there are no limits to equipment refining.");
                AddOption("Thanks. I never knew.", 255);
                break;

            case 17:
                AddText("12 DragonBalls are required for refining +9 items to +10, ");
                AddText("25 DragonBalls are required for refining +10 items to +11, ");
                AddText("4 DBScrolls are required for refining +11 items to +12,");
                AddOption("Got it, thanks.", 255);
                break;

                #region +9 to +10

            case 6:
                AddText("Choose the equipment you want to upgrade from +9 to +10 from the list below. ");
                AddOption("Helmet/Earrings/TaoCap ", 11);
                AddOption("Ring/Bracelet ", 16);
                AddOption("Necklace/Bag ", 12);
                AddOption("Boots ", 18);
                AddOption("Armor ", 13);
                AddOption("Shield ", 15);
                AddOption("Weapon ", 14);
                AddOption("I changed my mind. ", 255);

                break;

            case 11:
            case 12:
            case 13:
            case 14:
            case 15:
            case 16:
            case 18:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 10));
                if (equipment == null)
                {
                    AddText("There must be some mistake.... You must be wearing the items in order to refine it!");
                }
                else if (equipment.Plus != 9)
                {
                    AddText("It seems that your items is not +9, in this case i can not help you.");
                }
                else if (!_client.HasItem(1088000, 12))
                {
                    AddText("There must be some mistake. You do not have the 12 DragonBalls required to refine this item!");
                }
                else
                {
                    for (var i = 0; i < 12; i++)
                    {
                        _client.DeleteItem(1088000);
                    }
                    equipment.Plus++;
                    _client.Send(ItemInformationPacket.Create(equipment));
                    AddText("It is done! Please enjoy your new equipment.");
                    Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, _client.Name + " upgraded his " + equipment.BaseItem.Name + " to +10 . Congratulations!"));
                    _client.Save();
                }
                AddOption("Nevermind", 255);
                break;
            }
                #endregion

                #region +10 to +11
            case 7:
                AddText("Choose the equipment you want to upgrade from +10 to +11 from the list below. ");
                AddOption("Helmet/Earrings/TaoCap ", 21);
                AddOption("Ring/Bracelet ", 26);
                AddOption("Necklace/Bag ", 22);
                AddOption("Boots ", 28);
                AddOption("Armor ", 23);
                AddOption("Shield ", 25);
                AddOption("Weapon ", 24);
                AddOption("I changed my mind. ", 255);

                break;

            case 21:
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
            case 28:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 20));
                if (equipment == null)
                {
                    AddText("There must be some mistake.... You must be wearing the items in order to refine it!");
                }
                else if (equipment.Plus != 10)
                {
                    AddText("It seems that your items is not +10, in this case I can not help you.");
                }
                else if (!_client.HasItem(1088000, 25))
                {
                    AddText("There must be some mistake. You do not have the 25 DragonBalls required to refine this item!");
                }
                else
                {
                    for (var i = 0; i < 25; i++)
                    {
                        _client.DeleteItem(1088000);
                    }
                    equipment.Plus++;
                    _client.Send(ItemInformationPacket.Create(equipment));
                    AddText("It is done! Please enjoy your new equipment.");
                    Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, _client.Name + " upgraded his " + equipment.BaseItem.Name + " to +11 . Congratulations!"));
                    _client.Save();
                }
                AddOption("Nevermind", 255);
                break;
            }
                #endregion

                #region +11 to +12


            case 8:
                AddText("Choose the equipment you want to upgrade from +11 to +12 from the list below. ");
                AddOption("Helmet/Earrings/TaoCap ", 31);
                AddOption("Ring/Bracelet ", 36);
                AddOption("Necklace/Bag ", 32);
                AddOption("Boots ", 38);
                AddOption("Armor ", 33);
                AddOption("Shield ", 35);
                AddOption("Weapon ", 34);
                AddOption("I changed my mind. ", 255);

                break;

            case 31:
            case 32:
            case 33:
            case 34:
            case 35:
            case 36:
            case 38:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 30));
                if (equipment == null)
                {
                    AddText("There must be some mistake.... You must be wearing the items in order to refine it!");
                }
                else if (equipment.Plus != 11)
                {
                    AddText("It seems that your items is not +11, in this case I can not help you.");
                }
                else if (!_client.HasItem(720028, 4))
                {
                    AddText("There must be some mistake. You do not have the 4 DBScrolls required to refine this item!");
                }
                else
                {
                    for (var i = 0; i < 4; i++)
                    {
                        _client.DeleteItem(720028);
                    }
                    equipment.Plus++;
                    _client.Send(ItemInformationPacket.Create(equipment));
                    AddText("It is done! Please enjoy your new equipment.");
                    Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, _client.Name + " upgraded his " + equipment.BaseItem.Name + " to +12 . Congratulations!"));
                    _client.Save();
                }
                AddOption("Nevermind", 255);
                break;
            }
                #endregion
            }
            AddFinish();
            Send();
        }
Пример #13
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List<NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
                case 0:

                    AddText("Hello, do you need to exchange those  gems for one of higher quality and spare some space in warehouses?");
                    AddText("For each 15 gems of normal or refined quality I will give you one of higher quality?");
                    AddOption("Compose gems .", 1);
                    AddOption("I see.", 255);
                    break;
                case 1:
                    AddText("What kind of gems do you wish to compose?");
                    AddText("The fee for composing is 10.000 gold for normal gems into refined and 100.000 for refined into super gems ?");
                    AddOption("Compose normal to refined gems .", 2);
                    AddOption("Compose refined to super gems .", 3);

                    AddOption("I see.", 255);
                    break;
                case 2:
                    BASE_GEM_ID = 700001;
                    cost = 10000;
                    goto case 4;
                case 3:
                    BASE_GEM_ID = 700002;
                    cost = 100000;
                    goto case 4;

                case 4:
                    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", 5);
                    AddOption("I'm not sure...", 255);
                    break;
                case 5:
                    AddText("What type of gem would you like?");
                    AddOption("Kylin Gem", 24);
                    AddOption("Violet Gem", 25);
                    AddOption("Moon Gem", 26);
                    AddOption("Previous Options", 4);
                    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 = 6;
                    goto case 6;

                case 6:
                    if (_client.Money < cost)
                    {
                        AddText("You don't have the required amount of  money!");
                        AddOption("Ok! ", 255);

                    }
                    else if (_client.HasItem((uint)(BASE_GEM_ID + baseGemRequest * 10), 15))//Check if they have at least 15
                    {
                        for (var i = 0; i < 15; i++)
                            _client.DeleteItem((uint)(BASE_GEM_ID + baseGemRequest * 10));
                        _client.Money -= cost;
                        _client.CreateItem((uint)(BASE_GEM_ID + baseGemRequest * 10 + 1));
                        AddText("There you go.Check it out in your inventory!");
                        AddOption("Thanks!", 255);
                        _client.Save();

                    }
                    else
                    {
                        AddText("You don't have the required amount of gems or not enough money!");
                        AddOption("Ok! ", 255);


                    }
                    break;
            }
            AddFinish();
            Send();

        }
Пример #14
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("I can give you 1 Feather Stone if you find me one of each of these pieces of 3 ingredients Moss, DreamGrass, SoulAroma. ");
                AddText("I can also give you one Immortal Stone for 3 FeatherStones");

                AddOption("Feather Stone", 1);
                AddOption("Immortal Stones", 2);
                AddOption("This is so sad..", 255);

                break;
            }

            case 1:
            {
                if (_client.Inventory.Count <= 39 && _client.HasItem(722723, 1) && _client.HasItem(722724, 1) && _client.HasItem(722725, 1))
                {
                    _client.DeleteItem(722723);
                    _client.DeleteItem(722724);
                    _client.DeleteItem(722725);
                    _client.CreateItem(722726);
                    _client.Save();
                }
                else
                {
                    AddText("Either you don't have enough space in inventory or you dont have required materials!");
                    AddOption("I see.", 255);
                }
                break;
            }

            case 2:
            {
                if (_client.Inventory.Count <= 39 && _client.HasItem(722726, 3))
                {
                    _client.DeleteItem(722726);
                    _client.DeleteItem(722726);
                    _client.DeleteItem(722726);
                    _client.CreateItem(722728);
                    _client.Save();
                }

                else
                {
                    AddText("Either you don't have enough space in inventory or you dont 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:
                AddText("The DragonBall is really a precious item.You can use it to reallot your attribute points after you have been reborned.");
                AddText("After reborning at 70 or above you can reallot your attribute points freely.");
                AddText(" Well, if you have a DragonBall, I can help you do that.");
                AddOption("Please help me.", 1);
                AddOption("Definitely.", 255);
                break;

            case 1:
                if (_client.RebornCount < 1)
                {
                    AddText("Please come back when you have been reborned at least once in your lifetime?");
                    AddOption("I see.", 255);
                    break;
                }
                if (_client.Level < 70)
                {
                    AddText("You must be level 70 or above to be able to reallot attribute points!");
                    AddOption("Thanks. I see.", 255);
                    break;
                }
                if (!_client.HasItem(1088000))
                {
                    AddText("Sorry, but you must pay one DragonBall come back when you have one!");
                    AddOption("I see!", 255);
                    break;
                }
                else if (hasAgreed)
                {
                    stats = (uint)(_client.Character.Strength + _client.Character.Vitality + _client.Character.Agility + _client.Character.Spirit + _client.ExtraStats);
                    _client.DeleteItem(1088000);

                    _client.Strength   = 0;
                    _client.Vitality   = 8;
                    _client.Agility    = 2;
                    _client.Spirit     = 0;
                    _client.ExtraStats = (ushort)(stats - 10);
                    _client.Recalculate(true);
                    _client.Save();

                    AddText("There you go, allot them as you wish!");
                    AddOption("I see!", 255);
                }
                else
                {
                    hasAgreed = true;
                    AddText("Are you sure you want to reallot your attribute points?");
                    AddOption("Yes.", (byte)_linkback);
                    AddOption("No thanks.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Пример #16
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:

                if (_client.RebornCount != 0 && _client.Character.SecondQuest > 0 && _client.RebornCount < 2 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                {
                    if (_client.Character.SecondQuest > 0 && _client.RebornCount < 2 && _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. ");
                        AddOption("I will.", 255);
                    }
                    break;
                }
                else
                {
                    if (_client.RebornCount != 0 && _client.Character.SecondQuest == 0)
                    {
                        AddText("I cannot do the rebirth ritual if you do not open the gates of hell. Go talk to alex he will show you how..");
                        AddOption("Okay Thanks", 255);
                        break;
                    }
                    else
                    {
                        AddText("I have helped you as much as I can. Even heroes have their limits.");
                        AddOption("Thanks", 255);
                        break;
                    }
                }

            case 1:
                if (_client.RebornCount < 2 && _client.Character.SecondQuest > 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.EXEMPTION_TOKEN_ID))
                {
                    AddText("Are you sure you want to get second reborn and unlock new powers?");
                    AddOption("Yeah.", 5);
                    AddOption("I'm not sure...", 255);
                    break;
                }
                else
                {
                    AddText("Rebirth requires the unlocking of great power. Please make sure you have a ExemptionToken before coming to me.");
                    AddOption("Sorry.", 255);
                }
                break;

            case 5:
                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 11:
            case 12:
            case 13:
            case 14:
            case 15:
                if (_client.RebornCount < 2 && _client.Character.SecondQuest > 0 && _client.Level >= (_client.ProfessionType == Enum.ProfessionType.WaterTaoist ? 110 : 120))
                {
                    if (_client.HasItem(Constants.EXEMPTION_TOKEN_ID))
                    {
                        _client.DeleteItem(Constants.EXEMPTION_TOKEN_ID);

                        var path = (((uint)_client.Character.Profession1 - 5) / 10) * 100 + (((uint)_client.Character.Profession - 5)) + (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.CombatManager.AddOrUpdateSkill(9876, 0);
                        _client.Character.Profession2 = _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;
                        }

                        _client.RebornCount = 2;
                        _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);

                        #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 120:
                            _client.ExtraStats = (ushort)(20 + _client.ExtraStats);
                            break;

                        case 121:
                            _client.ExtraStats = (ushort)(21 + _client.ExtraStats);
                            break;

                        case 122:
                            _client.ExtraStats = (ushort)(23 + _client.ExtraStats);
                            break;

                        case 123:
                            _client.ExtraStats = (ushort)(26 + _client.ExtraStats);
                            break;

                        case 124:
                            _client.ExtraStats = (ushort)(30 + _client.ExtraStats);
                            break;

                        case 125:
                            _client.ExtraStats = (ushort)(35 + _client.ExtraStats);
                            break;

                        case 126:
                            _client.ExtraStats = (ushort)(41 + _client.ExtraStats);
                            break;

                        case 127:
                            _client.ExtraStats = (ushort)(48 + _client.ExtraStats);
                            break;

                        case 128:
                            _client.ExtraStats = (ushort)(56 + _client.ExtraStats);
                            break;

                        case 129:
                            _client.ExtraStats = (ushort)(65 + _client.ExtraStats);
                            break;

                        case 130:
                            _client.ExtraStats = (ushort)(75 + _client.ExtraStats);
                            break;
                        }
                        #endregion

                        if (_client.Level > 120)
                        {
                            _client.Character.PreviousLevel = _client.Level;
                        }
                        _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();
                    }
                    else
                    {
                        AddText("Rebirth requires the unlocking of great power. Please make sure you have a ExemptionToken before coming to me.");
                        AddOption("Sorry.", 255);
                    }
                }
                else
                {
                    AddText("Lets not get ahead of ourselves! You are not ready to achieve second rebirth. Please come back later.");
                    AddOption("Sorry.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }