Exemple #1
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("If you have more rare items then you know what to do with, I can help you pack them!");
                AddOption("Pack Meteors", 1);
                AddOption("Pack DragonBalls", 2);
                AddOption("I don't have that problem.", 255);
                break;

            case 1:
                if (!_client.HasItem(Constants.METEOR_ID, 10))
                {
                    AddText("Fool! You need 10 Meteors if you want me to help you pack them.");
                    AddOption("I'm sorry!", 255);
                }
                else
                {
                    for (var i = 0; i < 10; i++)
                    {
                        _client.DeleteItem(Constants.METEOR_ID);
                    }
                    _client.CreateItem(Constants.METEOR_SCROLL_ID);
                    AddText("It is done. Enjoy your MeteorScroll.");
                    AddOption("Wow, thanks!", 255);
                }
                break;

            case 2:
                if (!_client.HasItem(Constants.DRAGONBALL_ID, 10))
                {
                    AddText("Fool! You need 10 DragonBalls if you want me to help you pack them.");
                    AddOption("I'm sorry!", 255);
                }
                else
                {
                    for (var i = 0; i < 10; i++)
                    {
                        _client.DeleteItem(Constants.DRAGONBALL_ID);
                    }
                    _client.CreateItem(Constants.DB_SCROLL_ID);
                    AddText("It is done. Enjoy your DBScroll.");
                    AddOption("Wow, thanks!", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Exemple #2
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();
        }
Exemple #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();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("Do you wish to enter second level of labyrinth?Give me an SoulToken");
                AddOption("Yes, send me to the quest map.", 1);
                AddOption("No Thanks.", 255);
                break;

            case 1:
                if (_client.HasItem(721539, 1))
                {
                    _client.ChangeMap(1354, 321, 123);
                    _client.DeleteItem(721539);
                    AddText("There you go, take care! ");
                    AddOption("Okay.", 255);
                }
                else
                {
                    AddText("You don't have an SoulToken!");
                    AddOption("Nevermind...", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                AddText("Our shop is famous for dyeing. If you want to have your equipment dyed, please wear them before you enter. You");
                AddText(" have a wide choice of colors. One meteor will be charged before you try the colors. Do you want a try?");
                AddOption("Yes, here is a meteor", 1);
                //AddOption("Do you have any good wine?", 2);
                AddOption("Never mind", 255);
                break;

            case 1:
                if (!_client.HasItem(Constants.METEOR_ID))
                {
                    AddText("You do not have the Meteor I requested.");
                    AddOption("Sorry", 255);
                }
                else
                {
                    _client.DeleteItem(Constants.METEOR_ID);
                    _client.ChangeMap(1008, 24, 24);
                    AddText("You can change your equipment's color as many times as you like while here.");
                    AddText(" When ready to leave just jump through the portal.");
                    AddOption("Understood", 255);
                }
                break;

            case 2:
                AddText("I can sell you DrunkCelestial wine for 1,000 silver if you would like.");
                AddOption("Yes please", 3);
                AddOption("No thanks", 255);
                break;

            case 3:
                if (_client.Money < 1000)
                {
                    AddText("You do not have the 1,000 silver required");
                    AddOption("Sorry", 255);
                }
                if (_client.Inventory.Count >= 40)
                {
                    AddText("Please make room in your inventory for the wine.");
                    AddOption("Sorry", 255);
                }
                else
                {
                    _client.Money -= 1000;
                    _client.CreateItem(722185);
                    AddText("Enjoy the wine, it's the finest in all the land!");
                    AddOption("I will!", 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 turn Dragonballs into Conquer Points.");
                AddOption("DragonBall (215 CPs)", 1);
                AddOption("DBScroll (2150 CPs)", 2);
                AddOption("No thank you.", 255);
                break;

            case 1:
                if (_client.HasItem(1088000))
                {
                    _client.DeleteItem(1088000);
                    _client.CP += 215;
                    AddText("It is finished. Enjoy your Conquer Points.");
                    AddOption("Thanks.", 255);
                }
                else
                {
                    AddText("I will not be so easily fooled. You do not have a DragonBall to trade!");
                    AddOption("Sorry.", 255);
                }
                break;

            case 2:
                if (_client.HasItem(720028))
                {
                    _client.DeleteItem(720028);
                    _client.CP += 2150;
                    AddText("It is finished. Enjoy your Conquer Points.");
                    AddOption("Thanks.", 255);
                }
                else
                {
                    AddText("I will not be so easily fooled. You do not have a DBScroll to trade!");
                    AddOption("Sorry.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
        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();
        }
Exemple #8
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                if (_client.HasItem(721072))
                {
                    AddText("Can it be? Is that... YES!!! it's a SoulJade. I thought I would never see one of those. Please free me from this prision");
                    AddText("so I can join my family. I will give you this MoonBox I acquired before I died. Will you help me?");
                    AddOption("Yes, (use SoulJade)", 1);
                    AddOption("Sorry I cannoy help you yet", 255);
                }
                else
                {
                    AddText("You cannot help us without a SoulJade. Please leave here until you get one.");
                    AddOption("I will get one at once", 255);
                }
                break;

            case 1:

                if (_client.HasItem(721072))
                {
                    //tele player out of map
                    _client.ChangeMap(1002, 417, 516);

                    //remove the SoulJade
                    _client.DeleteItem(721072);

                    //Add MoonBox
                    _client.CreateItem(Constants.MOONBOX_ID);
                }
                else
                {
                    AddText("You cannot help us without a SoulJade. Please leave here until you get one.");
                    AddOption("I will get one at once", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
        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 into an dark place full of caves and strong monsters for  VirtuePoints .");
                AddText("Make sure to gather all diamonds dropped by monsters as I will reward you nicely for them !");
                AddOption("Send me! (2000 VPs)", 1);
                AddOption("Send me! (50 CPs)", 10);
                AddOption("I have some diamonds", 5);
                AddOption("Just passing by.", 255);
                break;

            case 1:    //lab1
                if (_client.VirtuePoints >= 2000)
                {
                    _client.VirtuePoints -= 2000;
                    _client.ChangeMap(1351, 14, 126);
                }
                else
                {
                    AddText("Sorry, you do not have enough VirtuePoints to enter, ");
                    AddText("but I can send you for 50 Conquer Points instead.");
                    AddOption("I see.", 255);
                }
                break;

            case 5:
                AddText("What diamonds you wish to exchange?");
                AddOption("15 SunDiamonds", 6);
                AddOption("12 MoonDiamonds", 7);
                AddOption("12 StarDiamonds", 8);
                AddOption("10 CloudDiamonds", 9);
                AddOption("Just passing by.", 255);
                break;

            case 6:
                if (_client.HasItem(721533, 15))
                {
                    for (var i = 0; i < 15; i++)
                    {
                        _client.DeleteItem(721533);
                    }
                    _client.CreateItem(720027);
                }
                else
                {
                    AddText("Sorry, you do not have enough diamonds!");
                    AddOption("I see.", 255);
                }
                break;

            case 7:
                if (_client.HasItem(721534, 12))
                {
                    for (var i = 0; i < 12; i++)
                    {
                        _client.DeleteItem(721534);
                    }
                    _client.CreateItem(720027);
                    _client.Money += 250000;
                }
                else
                {
                    AddText("Sorry, you do not have enough diamonds!");
                    AddOption("I see.", 255);
                }
                break;

            case 8:
                if (_client.HasItem(721535, 12))
                {
                    for (var i = 0; i < 12; i++)
                    {
                        _client.DeleteItem(721535);
                    }
                    _client.CreateItem(720027);
                    _client.Money += 500000;
                }
                else
                {
                    AddText("Sorry, you do not have enough diamonds!");
                    AddOption("I see.", 255);
                }
                break;

            case 9:
                if (_client.HasItem(721536, 10))
                {
                    for (var i = 0; i < 10; i++)
                    {
                        _client.DeleteItem(721536);
                    }
                    _client.CreateItem(721541);
                    _client.Money += 1000000;
                }
                else
                {
                    AddText("Sorry, you do not have enough diamonds!");
                    AddOption("I see.", 255);
                }
                break;

            case 10:
                if (_client.CP >= 50)
                {
                    _client.CP -= 50;
                    _client.ChangeMap(1351, 14, 126);
                }
                else
                {
                    AddText("Sorry, you do not have enough Conquer Points to enter.");
                    AddOption("I see.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }
Exemple #10
0
        public override void Run(Game_Server.Player client, ushort linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();

            if (client.ProfessionType != ProfessionType.Archer)
            {
                AddText("Archers do not share their secrets of battle with others. I shall not teach you.");
                AddOption("I see.", 255);
                AddFinish();
                Send();
                return;
            }

            switch (linkback)
            {
                #region Initial Options
            case 0:
                AddText("Mercilessly fight your way to the top, my friend, because Archers are destined ");
                AddText("for greatness! Your swift mind will give you the ability to attack from afar, at a ");
                AddText("pace unmatched by any of your peers. So, what can I do for you?");

                AddOption("I want to get promoted.", 1);
                AddOption("Learn class skills.", 3);
                AddOption("Okay. I see.", 255);
                break;
                #endregion

                #region Promotion
            case 1:
                switch (client.ProfessionLevel)
                {
                case 0:
                    AddText("The single requirement of becoming an Archer is a minimum level of 15.");
                    AddText(" Would you like to proceed?");
                    AddOption("Yes, please.", 2);
                    AddOption("No.", 255);
                    break;

                case 1:
                    AddText("You may become a Eagle Archer at level 40. Do you want to continue?");
                    AddOption("Yes, I do.", 2);
                    AddOption("No.", 255);
                    break;

                case 2:
                    AddText("You may promote to Tiger Archer at level 70.");
                    AddText(" I will require one Emerald, I hear they are dropped by");
                    AddText("  monsters in the desert. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 3:
                    AddText("You may promote to Dragon Archer at level 100.");
                    AddText(" I will require one Meteor. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 4:
                    AddText("You may promote to Archer Master at level 110.");
                    AddText(" I will require one Moon Box. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 5:
                    AddText("You are a true Archer. I cannot promote you anymore!");
                    AddOption("I see.", 255);
                    break;
                }
                break;

            case 2:
                switch (client.ProfessionLevel)
                {
                case 0:        //level 15
                    if (client.Level >= 15)
                    {
                        AddText("You have been promoted! I have taught you XP skills as a reward!");
                        client.CombatManager.LearnNewSkill(SkillID.Fly);
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You are not level 15, I will not promote you yet.");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 1:        //level 40
                    if (client.Level >= 40 && client.Strength >= 25 && client.Agility >= 90 && client.Vitality >= 12)
                    {
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 40, I will not promote you yet.");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 2:        //level 70
                    if (client.Level >= 70 && client.HasItem(Constants.EMERALD_ID) && client.Strength >= 45 && client.Agility >= 150 && client.Vitality >= 2)
                    {
                        client.DeleteItem(Constants.EMERALD_ID);
                        client.CreateItem(Constants.METEOR_ID);
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 70 and bring me an Emerald in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 3:        //level 100
                    if (client.Level >= 100 && client.HasItem(Constants.METEOR_ID) && client.Strength >= 60 && client.Agility >= 215 && client.Vitality >= 32)
                    {
                        client.DeleteItem(Constants.METEOR_ID);
                        AddText("You have been promoted!");
                        switch (client.RebornCount)
                        {
                        case 0:
                            client.CreateItem(700031);            //normal rainbow gem
                            break;

                        default:
                            client.CreateItem(130087, 0, 0, 0, 255);            //unique 1 sock armor
                            break;
                        }
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 100 and have a Meteor in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 4:        //level 110
                    if (client.Level >= 110 && client.HasItem(Constants.MOONBOX_ID) && client.Strength >= 68 && client.Agility >= 235 && client.Vitality >= 34)
                    {
                        client.DeleteItem(Constants.MOONBOX_ID);
                        client.CreateItem(Constants.DRAGONBALL_ID);
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 110 and have a Moon Box in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;
                }
                break;
                #endregion

                #region Learn Skills
            case 3:
                AddText("The Archer's Skills are numerous, varied and powerful. Which would you like to learn?");
                AddOption("Fly", 4);
                AddOption("Scatter", 5);
                AddOption("Rapid Fire", 6);
                AddOption("Intensify", 7);
                AddOption("Other Skills", 8);
                AddOption("Nothing.", 255);
                break;

            case 8:
                AddText("The Archer's Skills are numerous, varied and powerful. Which would you like to learn?");
                AddOption("Advanced Fly", 9);
                AddOption("Arrow Rain", 10);
                AddOption("Previous Skills", 3);
                AddOption("Nothing.", 255);
                break;

            case 4:
                if (client.Level >= 15)
                {
                    AddText("You have learned Fly successfully");
                    client.CombatManager.LearnNewSkill(SkillID.Fly);
                }
                else
                {
                    AddText("You must be at least level 15 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;

            case 5:
                if (client.Level >= 23)
                {
                    AddText("You have learned Scatter successfully");
                    client.CombatManager.LearnNewSkill(SkillID.Scatter);
                }
                else
                {
                    AddText("You must be at least level 23 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;

            case 6:
                if (client.Level >= 46)
                {
                    AddText("You have learned Rapid Fire successfully");
                    client.CombatManager.LearnNewSkill(SkillID.RapidFire);
                }
                else
                {
                    AddText("You must be at least level 46 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;

            case 7:
                if (client.Level >= 71)
                {
                    AddText("You have learned Intensify successfully");
                    client.CombatManager.LearnNewSkill(SkillID.Intensify);
                }
                else
                {
                    AddText("You must be at least level 71 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;

            case 9:
                if (client.Level >= 70)
                {
                    AddText("You have learned Advanced Fly successfully");
                    client.CombatManager.LearnNewSkill(SkillID.AdvancedFly);
                }
                else
                {
                    AddText("You must be at least level 70 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;

            case 10:
                if (client.Level >= 70)
                {
                    AddText("You have learned Arrow Rain successfully");
                    client.CombatManager.LearnNewSkill(SkillID.ArrowRain);
                }
                else
                {
                    AddText("You must be at least level 70 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;
                #endregion
            }
            AddFinish();
            Send();
        }
Exemple #11
0
        public override void Run(Game_Server.Player client, ushort linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (linkback)
            {
                #region Initial Options
            case 0:
                if (client.ProfessionType == ProfessionType.Taoist && client.RebornCount == 0 || client.ProfessionType == ProfessionType.FireTaoist && client.RebornCount == 0 || client.ProfessionType == ProfessionType.WaterTaoist && client.RebornCount == 0)
                {
                    AddText("Most of the Taoists are little concerned with anything outside the pursuit of ");
                    AddText("advanced spiritual powers. You are gifted in harnessing your inner power, ");
                    AddText("but remember, the roots of success lie in thoroughness and attention to detail.");
                    AddOption("I want to get promoted.", 1);
                    AddOption("Learn basic skills.", 5); //Handles basic taoist skills
                    if (client.ProfessionLevel >= 2)     //Handles class specific skills
                    {
                        AddOption("Learn advanced skills.", 6);
                    }
                    AddOption("Okay. I see.", 255);
                }
                else if (client.ProfessionType == ProfessionType.Taoist && client.RebornCount == 0 || client.ProfessionType == ProfessionType.FireTaoist && client.RebornCount == 0 || client.ProfessionType == ProfessionType.WaterTaoist && client.RebornCount == 1)
                {
                    AddText("Most of the Taoists are little concerned with anything outside the pursuit of ");
                    AddText("advanced spiritual powers. You are gifted in harnessing your inner power, ");
                    AddText("but remember, the roots of success lie in thoroughness and attention to detail.");
                    AddOption("I want to get promoted.", 1);
                    AddOption("Learn basic skills.", 5); //Handles basic taoist skills
                    if (client.ProfessionLevel >= 2)     //Handles class specific skills
                    {
                        AddOption("Learn advanced skills.", 6);
                    }
                    AddOption("Reborn skills", 60);
                    AddOption("Okay. I see.", 255);
                }
                else if (client.ProfessionType != ProfessionType.Taoist && client.ProfessionType != ProfessionType.FireTaoist && client.ProfessionType != ProfessionType.WaterTaoist && client.RebornCount >= 1)
                {
                    AddText("I can help you learn the skills you need after you have been reborn.");
                    AddOption("Reborn skills.", 60);
                }
                else if (client.ProfessionType != ProfessionType.Taoist && client.ProfessionType != ProfessionType.FireTaoist && client.ProfessionType != ProfessionType.WaterTaoist && client.RebornCount == 0)
                {
                    AddText("The taoists` secrets are not to be trained to outsiders. Train elsewhere, master conqueror.");
                    AddOption("I see.", 255);
                }
                break;
                #endregion

                #region Promotion
            case 1:
                switch (client.ProfessionLevel)
                {
                case 0:
                    AddText("The single requirement of becoming an Taoist is a minimum level of 15.");
                    AddText(" Would you like to proceed?");
                    AddOption("Yes, please.", 2);
                    AddOption("No.", 255);
                    break;

                case 1:
                    AddText("A decision stands before you! Become an all powerful fire taoist or a merciful water taoist?");
                    AddOption("Water Taoist", 3);
                    AddOption("Fire Taoist", 4);
                    AddOption("No.", 255);
                    break;

                case 2:
                    if (client.ProfessionType == ProfessionType.FireTaoist)
                    {
                        AddText("You may promote to become a Fire Wizard at level 70.");
                    }
                    else
                    {
                        AddText("You may promote to become a Water Wizard at level 70.");
                    }
                    AddText(" I will require one Emerald, I hear they are dropped by");
                    AddText("  monsters in the desert. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 3:
                    if (client.ProfessionType == ProfessionType.FireTaoist)
                    {
                        AddText("You may promote to become a Fire Master at level 100..");
                    }
                    else
                    {
                        AddText("You may promote to become a Water Master at level 100.");
                    }
                    AddText(" I will require one Meteor. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 4:
                    if (client.ProfessionType == ProfessionType.FireTaoist)
                    {
                        AddText("You may promote to become a Fire Saint at level 100..");
                    }
                    else
                    {
                        AddText("You may promote to become a Water Saint at level 100.");
                    }
                    AddText(" I will require one Moon Box. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 5:
                    AddText("You are a true Archer. I cannot promote you anymore!");
                    AddOption("I see.", 255);
                    break;
                }
                break;

            case 2:
                switch (client.ProfessionLevel)
                {
                case 0:        //level 15
                    if (client.Level >= 15)
                    {
                        AddText("You have been promoted! I have taught you an XP skill as a reward!");
                        client.CombatManager.AddOrUpdateSkill(SkillID.Thunder, 0);
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You are not level 15, I will not promote you yet.");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 1:        //level 40
                    if (client.Level >= 40 && client.Agility >= 25 && client.Vitality >= 22 && client.Spirit >= 80)
                    {
                        AddText("You have been promoted!");
                        if (client.RebornCount == 1)
                        {
                            AddText("I've given you a special item to help commemorate the occasion!");
                            client.CreateItem(410077);        //poison blade - need to add stat
                        }
                        if (isFire)
                        {
                            client.Character.Profession = 142;
                        }
                        else
                        {
                            client.Character.Profession = 132;
                        }
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 40, I will not promote you yet.");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 2:        //level 70
                    if (client.Level >= 70 && client.HasItem(Constants.EMERALD_ID) && client.Agility >= 45 && client.Vitality >= 32 && client.Spirit >= 140)
                    {
                        client.DeleteItem(Constants.EMERALD_ID);
                        client.CreateItem(Constants.METEOR_ID);
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 70 and bring me an Emerald in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 3:        //level 100
                    if (client.Level >= 100 && client.HasItem(Constants.METEOR_ID) && client.Agility >= 60 && client.Vitality >= 42 && client.Spirit >= 205)
                    {
                        client.DeleteItem(Constants.METEOR_ID);
                        AddText("You have been promoted!");
                        switch (client.RebornCount)
                        {
                        case 0:
                            client.CreateItem(700031);            //normal rainbow gem
                            break;

                        default:
                            client.CreateItem(130087, 0, 0, 0, 255);            //unique 1 sock armor
                            break;
                        }
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 100 and have a Meteor in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 4:        //level 110
                    if (client.Level >= 110 && client.HasItem(Constants.MOONBOX_ID) && client.Agility >= 65 && client.Vitality >= 47 && client.Spirit >= 225)
                    {
                        client.DeleteItem(Constants.MOONBOX_ID);
                        client.CreateItem(Constants.DRAGONBALL_ID);
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 110 and have a Moon Box in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;
                }
                break;

            case 3:
            case 4:
                isFire = linkback == 4;
                goto case 2;
                #endregion

                #region Learn Skills
            case 5:
                AddText("What skill would you like to learn?");
                AddOption("Basic Spells", 10);
                AddOption("Xp Skills", 11);
                AddOption("Fire", 12);
                AddOption("Meditation", 13);
                AddOption("Nothing.", 255);
                break;

            case 6:
                if (client.ProfessionType == ProfessionType.FireTaoist)
                {
                    AddText("What skill would you like to learn?");
                    AddOption("Fire Ring", 14);
                    AddOption("Fire Meteor", 15);
                    AddOption("Fire Circle", 16);
                    AddOption("Tornado", 17);
                }
                else if (client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    AddText("What skill would you like to learn?");
                    AddOption("Healing Rain", 18);
                    AddOption("Star of Accuracy", 19);
                    AddOption("Magic Shield", 20);
                    AddOption("Stigma", 21);
                    AddOption("More skills", 30);
                }
                else
                {
                    AddText("What! You don't belong here. I can only teach these skills to advanced students.");
                }
                AddOption("Nevermind", 255);
                break;

            case 30:
                if (client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    AddOption("Invisibility", 22);
                    AddOption("Pray", 23);
                    AddOption("Advanced Cure", 24);
                    AddOption("Nectar", 25);
                    AddOption("Previous skills", 6);
                }
                else
                {
                    AddText("What! You don't belong here. I can only teach these skills to advanced students.");
                }
                AddOption("Nevermind", 255);
                break;

                #region Basic Skills
            case 10:
                client.CombatManager.LearnNewSkill(SkillID.Cure);
                client.CombatManager.LearnNewSkill(SkillID.Thunder);
                AddText("Learned all basic spells.");
                AddOption("Thanks", 255);
                break;

            case 11:
                if (client.Level >= 15)
                {
                    client.CombatManager.LearnNewSkill(SkillID.Lightning);
                    if (client.Level >= 40)
                    {
                        client.CombatManager.LearnNewSkill(SkillID.Volcano);
                        if (client.ProfessionType == ProfessionType.WaterTaoist)
                        {
                            client.CombatManager.LearnNewSkill(SkillID.Revive);
                        }
                        if (client.Level >= 70)
                        {
                            client.CombatManager.LearnNewSkill(SkillID.SpeedLightning);
                        }
                    }

                    AddText("Learned all available XP skills");
                }
                else
                {
                    AddText("You must be at least level 15 to learn XP skills");
                }
                AddOption("Thanks", 255);
                break;

            case 12:
                if (client.Level >= 40 && client.CombatManager.KnowsSkillLevel(SkillID.Thunder, 4))
                {
                    client.CombatManager.LearnNewSkill(SkillID.Fire);
                    AddText("You have learned Fire successfully");
                }
                else
                {
                    AddText("You must be at least level 40 with level 4 Thunder to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 13:
                if (client.Level >= 44)
                {
                    client.CombatManager.LearnNewSkill(SkillID.Meditation);
                    AddText("You have learned Meditation successfully");
                }
                else
                {
                    AddText("You must be at least level 44 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;
                #endregion

                #region Fire Skills
            case 14:
                if (client.Level >= 55 && client.ProfessionType == ProfessionType.FireTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.FireRing);
                    AddText("You have learned Fire Ring successfully");
                }
                else
                {
                    AddText("You must be at least level 55 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 15:
                if (client.Level >= 52 && client.ProfessionType == ProfessionType.FireTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.FireMeteor);
                    AddText("You have learned Fire Meteor successfully");
                }
                else
                {
                    AddText("You must be at least level 52 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 16:
                if (client.Level >= 65 && client.ProfessionType == ProfessionType.FireTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.FireCircle);
                    AddText("You have learned Fire Circle successfully");
                }
                else
                {
                    AddText("You must be at least level 65 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 17:
                if (client.Level >= 90 && client.ProfessionType == ProfessionType.FireTaoist && client.CombatManager.KnowsSkillLevel(SkillID.Fire, 3))
                {
                    client.CombatManager.LearnNewSkill(SkillID.Tornado);
                    AddText("You have learned Tornado successfully");
                }
                else
                {
                    AddText("You must be at least level 90 with level 3 Fire to learn this skill");
                }
                AddOption("Thanks", 255);
                break;
                #endregion

                #region Water Skills
            case 18:
                if (client.Level >= 40 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.HealingRain);
                    AddText("You have learned Healing Rain successfully");
                }
                else
                {
                    AddText("You must be at least level 40 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 19:
                if (client.Level >= 45 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.StarOfAccuracy);
                    AddText("You have learned Star of Accuracy successfully");
                }
                else
                {
                    AddText("You must be at least level 45 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 20:
                if (client.Level >= 50 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.MagicShield);
                    AddText("You have learned Magic Shield successfully");
                }
                else
                {
                    AddText("You must be at least level 50 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 21:
                if (client.Level >= 55 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.Stigma);
                    AddText("You have learned Stigma successfully");
                }
                else
                {
                    AddText("You must be at least level 55 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 22:
                if (client.Level >= 60 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.Invisiblity);
                    AddText("You have learned Invisibility successfully");
                }
                else
                {
                    AddText("You must be at least level 60 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 23:
                if (client.Level >= 70 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.Pray);
                    AddText("You have learned Pray successfully");
                }
                else
                {
                    AddText("You must be at least level 70 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 24:
                if (client.Level >= 81 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.AdvancedCure);
                    AddText("You have learned Advanced Cure successfully");
                }
                else
                {
                    AddText("You must be at least level 81 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;

            case 25:
                if (client.Level >= 94 && client.ProfessionType == ProfessionType.WaterTaoist)
                {
                    client.CombatManager.LearnNewSkill(SkillID.Nectar);
                    AddText("You have learned Nectar successfully");
                }
                else
                {
                    AddText("You must be at least level 94 to learn this skill");
                }
                AddOption("Thanks", 255);
                break;
                #endregion

                #region Reborn Skills

                #region SummonGuard
            case 60:
                AddText("In order to learn Summon Guard, you will need to bring me a Rate 10 Gold Ore.");
                AddOption("Summon Guard", 70);
                break;

            case 70:
                if (client.RebornCount >= 1)
                {
                    if (client.HasItem(1072059))
                    {
                        if (client.CombatManager.KnowsSkill(SkillID.SummonGuard))
                        {
                            AddText("You already know Summon Guard.");
                            AddOption("I see", 255);
                        }
                        else
                        {
                            client.CombatManager.LearnNewSkill(SkillID.SummonGuard);
                            client.DeleteItem(1072059);
                            AddText("You have learned Summon Guard.");
                            AddOption("Thanks", 255);
                        }
                    }
                    else
                    {
                        AddText("Sorry, you do not have a Rate 10 Gold Ore.");
                        AddOption("I see", 255);
                    }
                }
                break;
                #endregion

                #endregion

                #endregion
            }
            AddFinish();
            Send();
        }
Exemple #12
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("People are pursuing greather achievement during their lives, but none can make it due to the limit of human constitution.");
                AddOption("What does it mean?", 1);
                AddOption("I don't belive it.", 255);
                break;

            case 1:
                AddText("Mortals are mundane. Only getting rid of it can help them accomplish their aims.");
                AddText("If you are high level enough, you can get reborn to learn more and stronger skills.");
                AddOption("How to get reborn?", 2);
                AddOption("I am satisfied.", 255);
                break;

            case 2:
                AddText("It is difficult.First, you should reach an certain level. Second, you need a CelestialStone.");
                AddOption("How to get CelestialStone?", 3);
                AddOption("Forget it.", 255);
                break;

            case 3:
                AddText("CelestialStone is made of 7 gems: VioletGem, KylinGem, RainbowGem, MoonGem, PhoenixGem, FuryGem, DragonGem, and CleanWater.");
                AddOption("What is CleanWater?", 4);
                AddOption("It is difficult.", 255);
                break;

            case 4:
                AddText("It is used to get rid of your mundaneness, and then you won't be affected by the environment. By the way, Clean Water comes from celestial rinsing.");
                AddOption("What are gems used for?", 5);
                break;

            case 5:
                AddText("Only seven gems can protect you during the rebirth.");
                AddOption("I will collect them now.", 6);
                AddOption("I changed my mind.", 255);
                break;

            case 6:
                AddText("It is easy to get the gems. But CleanWater...");
                AddOption("But what?", 7);
                break;

            case 7:
                AddText("The Adventure island is the headstream of CleanWater. But it is occupied by WaterEvil and he uses spell to hide the stream.");
                AddOption("What can I do?", 8);
                AddOption("I will give up.", 255);
                break;

            case 8:
                AddText("WaterEvilElder will go to get the water every certain time. If you defeat him, you may get the water. But he is very hard to deal with.");
                AddOption("I see.Thank you.", 255);
                AddOption("Anything else?", 9);
                break;

            case 9:
                if (_client.HasItem(721258) && _client.HasItem(700001) && _client.HasItem(700011) && _client.HasItem(700021) && _client.HasItem(700031) && _client.HasItem(700041) && _client.HasItem(700051) && _client.HasItem(700061))
                {
                    AddText("Are you sure you want to refine CelestialStone?");
                    AddOption("Sure.", 10);
                    AddOption("I am not sure.", 255);
                }
                else
                {
                    AddText("Come here to refine CelestialStone when you get the 7 Gems and CleanWater.");
                    AddOption("That's ok.", 255);
                }
                break;

            case 10: if (_client.HasItem(721258) && _client.HasItem(700001) && _client.HasItem(700011) && _client.HasItem(700021) && _client.HasItem(700031) && _client.HasItem(700041) && _client.HasItem(700051) && _client.HasItem(700061))
                {
                    AddText("There you go, check it in your inventory.");
                    AddOption("Thank you.", 255);
                    _client.DeleteItem(721258);
                    _client.DeleteItem(700001);
                    _client.DeleteItem(700011);
                    _client.DeleteItem(700021);
                    _client.DeleteItem(700031);
                    _client.DeleteItem(700041);
                    _client.DeleteItem(700051);
                    _client.DeleteItem(700061);
                    _client.CreateItem(721259);
                }
                else
                {
                    AddText("Come here to refine CelestialStone when you get the 7 Gems and CleanWater.");
                    AddOption("That's ok.", 255);
                }

                break;
            }
            AddFinish();
            Send();
        }
Exemple #14
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("Hello, did you noticed that MagicArtisan can only level items up to 120?");
                AddText("I can upgrade it above 120 up to 130 ,but it costs 1 DragonBall Scroll for each upgrade.");
                AddOption("Yes, I want.", 2);
                AddOption("No. I like it this way.", 255);
                break;
            }

            case 2:
            {
                AddText("It costs 1 DragonBall Scroll for any item above level 110.Are you really sure you want to do that?! ");
                AddOption("Yeah, upgrade it! ", 3);
                AddOption("No. I like it this way.", 255);
                break;
            }

            case 3:
            {
                AddText("Each upgrade requires 1 DragonBall Scroll and there is no turning back! ");
                AddText("What item would you like me to upgrade?");
                AddOption("Helmet/Earrings/TaoCap ", 11);
                AddOption("Necklace/Bag ", 12);
                AddOption("Ring/Bracelet ", 16);
                AddOption("Right Weapon ", 14);
                AddOption("Shield/Left Weapon ", 15);
                AddOption("Armor ", 13);
                AddOption("Boots ", 18);
                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 an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(Constants.DB_SCROLL_ID))
                {
                    AddText("There must be some mistake. You must pay an DragonBall Scroll before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.EquipmentLevel <= 110)
                {
                    AddText("There must be some mistake. Your item is not above level 110!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.GetNextItemLevel() == equipment.StaticID)
                {
                    AddText("There must be some mistake. Your item can't be upgraded anymore !");
                    AddOption("Nevermind", 255);
                }

                else if (_client.Level < equipment.GetDBItemByStaticID(equipment.GetNextItemLevel()).LevelReq)
                {
                    AddText("There must be some mistake. You are not high level enough to wear the item after upgrade!");
                    AddOption("Nevermind", 255);
                }

                else
                {
                    equipment.ChangeItemID(equipment.GetNextItemLevel());
                    _client.DeleteItem(Constants.DB_SCROLL_ID);
                    _client.Send(ItemInformationPacket.Create(equipment, Enum.ItemInfoAction.Update));
                    equipment.Save();
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Exemple #15
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.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();
        }
        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();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                if (_client.Tasks.ContainsKey(TaskType.UnknownMan) && DateTime.Now < _client.Tasks[TaskType.UnknownMan].Expires)
                {
                    AddText("I need some time to recover. Come see me tomorrow");
                    AddOption("I shall", 255);
                }

                /*else if (_client.HasItem(722185))
                 * {
                 *  AddText("Is that wine for me? I'm so very thirsty!");
                 *  AddOption("Here you go.", 2);
                 *  AddOption("No! Get away from me", 255);
                 * }*/
                else
                {
                    AddText("Hey, you there! Please take pity on a homeless old man! I am so hungry but can`t even afford a bowl of noodles. Could you help ");
                    AddText("me out here? The gods always smile on kindness, you know!");
                    AddOption("Here are 100 silvers. Take care.", 1);
                    AddOption("No way. I don`t do charity.", 255);
                }
                break;

            case 1:
                AddText("Thank you so much stranger! The only thing that could improve this meal is some wine to wash it down. ");
                AddText("Can you bring me some DrunkCelestial wine please?");
                AddOption("I'll get it", 255);
                break;

            case 2:
                if (_client.HasItem(722185))
                {
                    _client.DeleteItem(722185);
                    AddText("Ahhhh... that hit the spot. Your generosity is legendary! ");
                    AddText("Would you like this old man to help you unlock the secret of the DragonBalls?");
                    AddOption("Teach me please", 3);
                    AddOption("No thanks", 255);
                }
                break;

            case 3:
            {
                var cost = _client.Level > 99 ? 2 : 1;
                AddText("I will require " + cost + " DragonBalls to help you unlock infinite power. This is your last chance to leave");
                AddOption("Do it", 4);
                AddOption("Maybe later", 255);
                break;
            }

            case 4:
            {
                var cost = _client.Level > 99 ? 2 : 1;
                if (_client.Tasks.ContainsKey(TaskType.UnknownMan) && DateTime.Now < _client.Tasks[TaskType.UnknownMan].Expires)
                {
                    AddText("I need some time to recover. Come see me tomorrow");
                    AddOption("I shall", 255);
                }
                else if (_client.HasItem(Constants.DRAGONBALL_ID, cost))
                {
                    if (!_client.Tasks.ContainsKey(TaskType.UnknownMan))
                    {
                        _client.Tasks.TryAdd(TaskType.UnknownMan, new Task(_client.UID, TaskType.UnknownMan, DateTime.Now.AddHours(12)));
                    }
                    else
                    {
                        _client.Tasks[TaskType.UnknownMan].Expires = DateTime.Now.AddHours(12);
                    }
                    for (var i = 0; i < cost; i++)
                    {
                        _client.DeleteItem(Constants.DRAGONBALL_ID);
                    }
                    _client.GainExpBall(6000);
                    AddText("It is done! I need some time to recover before you come see me again.");
                    AddOption("Thank you", 255);
                }
                else
                {
                    AddText("You do not have the " + cost + " DragonBalls I require. Come back when you have them");
                    AddOption("Yes sir", 255);
                    break;
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("Hello! I can always succeed in upgrading item quality. But I`ll ask for a few more dragon balls than Artisan Wind. I can also upgrade item levels. How can I help you?");
                AddOption("Upgrade Quality", 1);
                AddOption("Upgrade Level", 2);
                AddOption("No thanks", 255);
                break;
            }

            case 1:
            {
                AddText("What item would you like me to upgrade the quality of?");
                AddOption("Helmet/Earrings/TaoCap ", 11);
                AddOption("Necklace/Bag ", 12);
                AddOption("Ring/Bracelet ", 16);
                AddOption("Weapon", 14);
                AddOption("Shield ", 15);
                AddOption("Armor ", 13);
                AddOption("Boots ", 18);
                AddOption("I changed my mind. ", 255);
                break;
            }

            case 2:
            {
                AddText("What item would you like me to upgrade the level of?");
                AddOption("Helmet/Earrings/TaoCap ", 31);
                AddOption("Necklace/Bag ", 32);
                AddOption("Ring/Bracelet ", 36);
                AddOption("Weapon", 34);
                AddOption("Shield ", 35);
                AddOption("Armor ", 33);
                AddOption("Boots ", 38);
                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 an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.StaticID == equipment.GetNextItemQuality())
                {
                    AddText("There must be some mistake. This item cannot be upgraded further!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    var dbCost = 1 + 100 / equipment.ChanceToUpgradeQuality();
                    AddText("It will take " + dbCost + " DragonBalls to upgrade the quality of this item.");
                    AddOption("Upgrade it", (byte)(_linkback % 10 + 20));
                    AddOption("Never 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 % 10));
                if (equipment == null)
                {
                    AddText("There must be some mistake., You must be wearing an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.StaticID == equipment.GetNextItemQuality())
                {
                    AddText("There must be some mistake. This item cannot be upgraded!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    var dbCost = 1 + 100 / equipment.ChanceToUpgradeQuality();
                    if (!_client.HasItem(Constants.DRAGONBALL_ID, (uint)dbCost))
                    {
                        AddText("You do not have the required " + dbCost + " DragonBalls to upgrade quality!");
                        AddOption("Sorry", 255);
                    }
                    else
                    {
                        for (var i = 0; i < dbCost; i++)
                        {
                            _client.DeleteItem(Constants.DRAGONBALL_ID);
                        }
                        equipment.ChangeItemID(equipment.GetNextItemQuality());

                        if (Common.PercentSuccess(Constants.SOCKET_RATE * 2))
                        {
                            if (equipment.Gem1 == 0)
                            {
                                equipment.Gem1 = 255;
                                Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, "As a very lucky player, " + _client.Name + " has added the first socket to his/her " + equipment.BaseItem.Name));
                            }
                            else if (equipment.Gem2 == 0)
                            {
                                equipment.Gem2 = 255;
                                Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, "As a very lucky player, " + _client.Name + " has added the second socket to his/her " + equipment.BaseItem.Name));
                            }
                        }
                        equipment.Save();
                        _client.Send(ItemInformationPacket.Create(equipment, ItemInfoAction.Update));
                        _client.Recalculate();
                        AddText("The quality has been upgraded! Enjoy your new item.");
                        AddOption("Thanks!", 255);
                    }
                }
                break;
            }

            case 31:
            case 32:
            case 33:
            case 34:
            case 35:
            case 36:
            case 38:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 10));
                if (equipment == null)
                {
                    AddText("There must be some mistake., You must be wearing an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.StaticID == equipment.GetNextItemLevel() || equipment.BaseItem.LevelReq >= 120)
                {
                    AddText("There must be some mistake. I cannot upgrade this item further.");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    var metCost = 1 + 100 / equipment.ChanceToUpgradeLevel();
                    if (metCost > 40)
                    {
                        metCost = 40;
                    }
                    AddText("It will take " + metCost + " Meteors to upgrade the level of this item.");
                    AddOption("Upgrade it", (byte)(_linkback % 10 + 40));
                    AddOption("Never mind", 255);
                }
                break;
            }

            case 41:
            case 42:
            case 43:
            case 44:
            case 45:
            case 46:
            case 48:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 10));
                if (equipment == null)
                {
                    AddText("There must be some mistake., You must be wearing an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.StaticID == equipment.GetNextItemLevel() || equipment.BaseItem.LevelReq >= 120)
                {
                    AddText("There must be some mistake. I cannot upgrade this item further.");
                    AddOption("Nevermind", 255);
                }
                else if (_client.Level < equipment.GetDBItemByStaticID(equipment.GetNextItemLevel()).LevelReq)
                {
                    AddText("You are too low level to wear the upgraded item!");
                    AddOption("Oops", 255);
                }
                else
                {
                    var metCost = 1 + 100 / equipment.ChanceToUpgradeLevel();
                    if (metCost > 40)
                    {
                        metCost = 40;
                    }
                    if (!_client.HasItem(Constants.METEOR_ID, (uint)metCost))
                    {
                        AddText("You do not have the required " + metCost + " Meteors to upgrade this item's level!");
                        AddOption("Sorry", 255);
                    }
                    else
                    {
                        for (var i = 0; i < metCost; i++)
                        {
                            _client.DeleteItem(Constants.METEOR_ID);
                        }
                        equipment.ChangeItemID(equipment.GetNextItemLevel());
                        if (Common.PercentSuccess(Constants.SOCKET_RATE))
                        {
                            if (equipment.Gem1 == 0)
                            {
                                equipment.Gem1 = 255;
                                Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, "As a very lucky player, " + _client.Name + " has added the first socket to his/her " + equipment.BaseItem.Name));
                            }
                            else if (equipment.Gem2 == 0)
                            {
                                equipment.Gem2 = 255;
                                Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.GM, "As a very lucky player, " + _client.Name + " has added the second socket to his/her " + equipment.BaseItem.Name));
                            }
                        }
                        equipment.Save();
                        _client.Send(ItemInformationPacket.Create(equipment, ItemInfoAction.Update));
                        _client.Recalculate();
                        AddText("The level has been upgraded! Enjoy your new item.");
                        AddOption("Thanks!", 255);
                    }
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Exemple #20
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();

        }
Exemple #21
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();
        }
        public override void Run(Game_Server.Player client, ushort linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();

            if (client.ProfessionType != ProfessionType.Warrior)
            {
                AddText("Warriors do not share their secrets of battle with others. I shall not teach you.");
                AddOption("I see.", 255);
                AddFinish();
                Send();
                return;
            }

            switch (linkback)
            {
                #region Initial Options
            case 0:
                AddText("To be a good Warrior, you must know your weapon, your armor be a 2nd");
                AddText(" skin, and use your shild to ward off your enemy! Remember, fortune favors");
                AddText(" the brave, and you must keep your head, even in the darkest hours. So, what");
                AddText(" can I do for you?");
                AddOption("I want to get promoted.", 1);
                AddOption("Learn class skills.", 3);
                AddOption("Okay. I see.", 255);
                break;
                #endregion

                #region Promotion
            case 1:
                switch (client.ProfessionLevel)
                {
                case 0:
                    AddText("The single requirement of becoming a Warrior is a minimum level of 15.");
                    AddText(" Would you like to proceed?");
                    AddOption("Yes, please.", 2);
                    AddOption("No.", 255);
                    break;

                case 1:
                    AddText("You may become a Brass Warrior at level 40. Do you want to continue?");
                    AddOption("Yes, I do.", 2);
                    AddOption("No.", 255);
                    break;

                case 2:
                    AddText("You may promote to Silver Warrior at level 70.");
                    AddText(" I will require one Emerald, I hear they are dropped by");
                    AddText("  monsters in the desert. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 3:
                    AddText("You may promote to Gold Warrior at level 100.");
                    AddText(" I will require one Meteor. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 4:
                    AddText("You may promote to Warrior Master at level 110.");
                    AddText(" I will require one Moon Box. Are you ready for promotion?");
                    AddOption("I'm ready!", 2);
                    AddOption("I'm not sure...", 255);
                    break;

                case 5:
                    AddText("You are a true Warrior. I cannot promote you anymore!");
                    AddOption("I see.", 255);
                    break;
                }
                break;

            case 2:
                switch (client.ProfessionLevel)
                {
                case 0:        //level 15
                    if (client.Level >= 15)
                    {
                        AddText("You have been promoted! I have taught you XP skills as a reward!");
                        client.CombatManager.LearnNewSkill(SkillID.Accuracy);
                        client.CombatManager.LearnNewSkill(SkillID.Shield);
                        client.CombatManager.LearnNewSkill(SkillID.Superman);
                        client.CombatManager.LearnNewSkill(SkillID.Roar);
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You are not level 15, I will not promote you yet.");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 1:        //level 40
                    if (client.Level >= 40 && client.Strength >= 80 && client.Agility >= 25 && client.Vitality >= 20)
                    {
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 40, I will not promote you yet.");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 2:        //level 70
                    if (client.Level >= 70 && client.HasItem(Constants.EMERALD_ID) && client.Strength >= 140 && client.Agility >= 45 && client.Vitality >= 32)
                    {
                        client.DeleteItem(Constants.EMERALD_ID);
                        AddText("You have been promoted!");
                        client.CreateItem(Constants.METEOR_ID);        //meteor
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 70 and bring me an Emerald in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 3:        //level 100
                    if (client.Level >= 100 && client.HasItem(Constants.METEOR_ID) && client.Strength >= 205 && client.Agility >= 60 && client.Vitality >= 42)
                    {
                        client.DeleteItem(Constants.METEOR_ID);
                        AddText("You have been promoted!");
                        switch (client.RebornCount)
                        {
                        case 0:
                            client.CreateItem(700031);            //normal rainbow gem
                            break;

                        default:
                            client.CreateItem(130087, 0, 0, 0, 255);            //unique 1 sock armor
                            break;
                        }
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 100 and have a Meteor in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;

                case 4:        //level 110
                    if (client.Level >= 110 && client.HasItem(Constants.MOONBOX_ID) && client.Strength >= 225 && client.Agility >= 65 && client.Vitality >= 47)
                    {
                        client.DeleteItem(Constants.MOONBOX_ID);
                        client.CreateItem(Constants.DRAGONBALL_ID);
                        AddText("You have been promoted!");
                        client.Character.Profession++;
                        client.Send(new UpdatePacket(client.UID, UpdateType.Profession, client.Character.Profession));
                        client.Recalculate();
                        AddOption("Thank you!", 255);
                    }
                    else
                    {
                        AddText("You must be level 110 and have a Moon Box in order to be promoted!");
                        AddOption("I'll work harder.", 255);
                    }
                    break;
                }
                break;
                #endregion

                #region Learn Skills
            case 3:
                AddText("What skill would you like to learn?");
                AddOption("XP Skills", 4);
                AddOption("Dash", 5);
                AddOption("Nothing.", 255);
                break;

            case 4:
                if (client.Level >= 15)
                {
                    AddText("You have learned your XP skills successfully");
                    client.CombatManager.LearnNewSkill(SkillID.Accuracy);
                    client.CombatManager.LearnNewSkill(SkillID.Shield);
                    client.CombatManager.LearnNewSkill(SkillID.Superman);
                    client.CombatManager.LearnNewSkill(SkillID.Roar);
                }
                else
                {
                    AddText("You must be at least level 15 to learn these skills!");
                }
                AddOption("Thanks", 255);
                break;

            case 5:
                if (client.Level >= 63)
                {
                    AddText("You have learned Dash successfully");
                    client.CombatManager.LearnNewSkill(SkillID.Dash);
                }
                else
                {
                    AddText("You must be at least level 63 to learn this skill!");
                }
                AddOption("Thanks", 255);
                break;
                #endregion
            }
            AddFinish();
            Send();
        }
Exemple #23
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 future battles.I can help you by upgrading blessed attribute.");
                AddText("Keep in mind that each upgrade costs TortoiseGems witch are rare and expensive.");
                AddOption("Upgrade blessed attribute.", 1);
                AddOption("Nothing right now, thanks.", 255);

                break;

            case 1:
            {
                AddText("I see, upgrading an items blessed attribute will help you receive less damage. ");
                AddText("What item would you like me upgrade?");
                AddOption("Helmet/Earrings/TaoCap ", 11);
                AddOption("Necklace/Bag ", 12);
                AddOption("Ring/Bracelet ", 16);
                AddOption("Right Weapon ", 14);
                AddOption("Shield/Left Weapon ", 15);
                AddOption("Armor ", 13);
                AddOption("Boots ", 18);
                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 an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                    break;
                }
                cost = equipment.Bless;

                if (equipment.Bless == 0)
                {
                    AddText("Your item must be blessed in order to upgrade this attribute!");
                    AddOption("Nevermind", 255);
                    break;
                }

                if (equipment.Bless == 7)
                {
                    AddText("Your item has maximum bless attribute!");
                    AddOption("Nevermind", 255);
                    break;
                }

                if (hasAgreed && !_client.HasItem(700073, cost))
                {
                    AddText("To upgrade this item you need to pay " + cost + " Super TortoiseGems witch you don't have!");
                    AddOption("I see.", 255);
                }
                else if (hasAgreed && _client.HasItem(700073, cost))
                {
                    equipment.Bless += 2;
                    for (var i = 0; i < cost; i++)
                    {
                        _client.DeleteItem(700073);
                    }
                    _client.Send(ItemInformationPacket.Create(equipment, Enum.ItemInfoAction.Update));
                    equipment.Save();
                    Managers.PlayerManager.SendToServer(new TalkPacket(ChatType.System, "Congratulations you have upgraded you items blessed attribute!"));
                }
                else
                {
                    hasAgreed = true;
                    AddText("To upgrade this item you need to pay " + cost + " Super TortoiseGems! Are you sure?");
                    AddOption("Yes.", (byte)_linkback);
                    AddOption("No thanks.", 255);
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Exemple #24
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();
        }
Exemple #25
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("Hello, I can upgrade your items past level 120 for the cost of 1 DragonBall.");
                AddText("The upgrade is guaranteed to work!");
                AddOption("Yes, Let's do it!", 2);
                AddOption("Maybe later.", 255);
                break;
            }

            case 2:
            {
                AddText("Each upgrade requires 1 DragonBall and there is no turning back! ");
                AddText("What item would you like me to upgrade?");
                AddOption("Helmet/Earrings/TaoCap ", 11);
                AddOption("Necklace/Bag ", 12);
                AddOption("Ring/Bracelet ", 16);
                AddOption("Right Weapon ", 14);
                AddOption("Shield/Left Weapon ", 15);
                AddOption("Armor ", 13);
                AddOption("Boots ", 18);
                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 an item before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(1088000))
                {
                    AddText("There must be some mistake. You must pay an DragonBall before you may upgrade it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.EquipmentLevel <= 0)
                {
                    AddText("There must be some mistake.");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.GetNextItemLevel() == equipment.StaticID)
                {
                    AddText("There must be some mistake. Your item can't be upgraded anymore !");
                    AddOption("Nevermind", 255);
                }

                else if (_client.Level < equipment.GetDBItemByStaticID(equipment.GetNextItemLevel()).LevelReq)
                {
                    AddText("There must be some mistake. You are not high level enough to wear the item after upgrade!");
                    AddOption("Nevermind", 255);
                }

                else
                {
                    equipment.ChangeItemID(equipment.GetNextItemLevel());
                    _client.DeleteItem(1088000);
                    _client.Send(ItemInformationPacket.Create(equipment, Enum.ItemInfoAction.Update));
                    equipment.Save();
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Exemple #26
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("It costs DragonBalls or ToughDrills/StarDrills depending on the item.");
                AddOption("Socket my weapon", 1);
                AddOption("Socket my gears", 2);
                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!");
                }
                else if (equipment.Gem2 > 0)
                {
                    AddText("There must be some mistake. Your weapon already has the maximum number of sockets!");
                }
                else
                {
                    var cost = (uint)(equipment.Gem1 == 0 ? 1 : 5);
                    AddText("It will cost " + cost + " DragonBall(s) to socket this weapon. Are you positive you wish to continue?");
                    AddOption("I'm Sure!", 10);
                }
                AddOption("Nevermind", 255);
                break;
            }

            case 2:
            {
                AddText("It costs 12 DragonBalls for the first socket and 7 StarDrills for second.If you consider yourself lucky try ToughDrill! ");
                AddOption("Make the first socket ", 3);
                AddOption("Make the second socket ", 4);
                AddOption("No. I like it this way.", 255);
                break;
            }

            case 3:
            {
                AddText("The first socket requires 12 DragonBalls and there is no turning back! ");
                AddText("What item would you like me to socket?");
                AddOption("Helmet/Earrings/TaoCap ", 11);
                AddOption("Necklace/Bag ", 12);
                AddOption("Ring/Bracelet ", 16);
                AddOption("Shield ", 15);
                AddOption("Armor ", 13);
                AddOption("Boots ", 18);
                AddOption("I changed my mind. ", 255);
                break;
            }

            case 4:
            {
                AddText("Opening the second socket is a delicate matter. I can guarentee an upgrade by using 7 StarDrills ");
                AddText("or you can try your luck using a ToughDrill.");
                AddOption("Use ToughDrill", 5);
                AddOption("Use 7 StarDrills", 6);
                AddOption("No. I like it this way.", 255);
                break;
            }

            case 5:
            {
                AddText("There is no guarentee this upgrade will be a success. Each attempt will require a ToughDrill. ");
                AddText("What item would you like to try to socket?");
                AddOption("Helmet/Earrings/TaoCap ", 21);
                AddOption("Necklace/Bag ", 22);
                AddOption("Ring/Bracelet ", 26);
                AddOption("Shield ", 25);
                AddOption("Armor ", 23);
                AddOption("Boots ", 28);
                AddOption("I changed my mind. ", 255);
                break;
            }

            case 6:
            {
                AddText("This upgrade is guarenteed to work but requires 7 StarDrills. ");
                AddText("What item would you like to try to socket?");
                AddOption("Helmet/Earrings/TaoCap ", 31);
                AddOption("Necklace/Bag ", 32);
                AddOption("Ring/Bracelet ", 36);
                AddOption("Shield ", 35);
                AddOption("Armor ", 33);
                AddOption("Boots ", 38);
                AddOption("I changed my mind. ", 255);
                break;
            }

            case 10:
            {
                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
                {
                    var cost = equipment.Gem1 == 0 ? 1 : 5;
                    if (_client.HasItem(Constants.DRAGONBALL_ID, (uint)cost))
                    {
                        if (cost == 1)
                        {
                            equipment.Gem1 = 255;
                        }
                        else
                        {
                            equipment.Gem2 = 255;
                        }

                        for (var i = 0; i < cost; i++)
                        {
                            _client.DeleteItem(Constants.DRAGONBALL_ID);
                        }
                        equipment.Save();
                        _client.Send(ItemInformationPacket.Create(equipment));
                        AddText("It is done! Please enjoy your new equipment.");
                        AddOption("Thanks!", 255);
                    }
                    else
                    {
                        AddText("There must be some mistake. Your do not have the " + cost + " DragonBall(s) required");
                        AddOption("Nevermind", 255);
                    }
                }
                break;
            }

            case 11:
            case 12:
            case 13:
            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 an item before you may socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem1 != 0)
                {
                    AddText("There must be some mistake. This item already has a socket!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(Constants.DRAGONBALL_ID, 12))
                {
                    AddText("There must be some mistake. You do not have the 12 DragonBalls required to socket this item!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    for (var i = 0; i < 12; i++)
                    {
                        _client.DeleteItem(Constants.DRAGONBALL_ID);
                    }
                    equipment.Gem1 = 255;
                    equipment.Save();
                    _client.Send(ItemInformationPacket.Create(equipment));
                    AddText("It is done! Please enjoy your new equipment.");
                    AddOption("Thanks!", 255);
                }

                break;
            }

            case 21:
            case 22:
            case 23:
            case 25:
            case 26:
            case 28:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 10));
                if (equipment == null)
                {
                    AddText("There must be some mistake., You must be wearing an item before you may socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem1 == 0)
                {
                    AddText("There must be some mistake. You must open the first socket before you may attempt the second!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem2 != 0)
                {
                    AddText("There must be some mistake. This item already has two sockets!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(1200005))
                {
                    AddText("There must be some mistake. You do not have a ToughDrill!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    _client.DeleteItem(1200005);
                    if (Common.PercentSuccess(12))
                    {
                        equipment.Gem2 = 255;
                        equipment.Save();
                        _client.Send(ItemInformationPacket.Create(equipment));
                        AddText("It is done! Please enjoy your new equipment.");
                        AddOption("Thanks!", 255);
                    }
                    else
                    {
                        _client.CreateItem(1200006);
                        AddText("I was not able to open the second socket for you. I will give you a StarDrill for future use.");
                        AddOption("Damn...", 255);
                    }
                }
                break;
            }

            case 31:
            case 32:
            case 33:
            case 35:
            case 36:
            case 38:
            {
                var equipment = _client.Equipment.GetItemBySlot((Enum.ItemLocation)(_linkback % 10));
                if (equipment == null)
                {
                    AddText("There must be some mistake., You must be wearing an item before you may socket it!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem1 == 0)
                {
                    AddText("There must be some mistake. You must open the first socket before you may attempt the second!");
                    AddOption("Nevermind", 255);
                }
                else if (equipment.Gem2 != 0)
                {
                    AddText("There must be some mistake. This item already has two sockets!");
                    AddOption("Nevermind", 255);
                }
                else if (!_client.HasItem(1200006, 7))
                {
                    AddText("There must be some mistake. You do not have the required 7 StarDrills!");
                    AddOption("Nevermind", 255);
                }
                else
                {
                    for (var i = 0; i < 7; i++)
                    {
                        _client.DeleteItem(1200006);
                    }
                    equipment.Gem2 = 255;
                    equipment.Save();
                    _client.Send(ItemInformationPacket.Create(equipment));
                    AddText("It is done! Please enjoy your new equipment.");
                    AddOption("Thanks!", 255);
                }
                break;
            }
            }
            AddFinish();
            Send();
        }
Exemple #27
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
            {
                AddText("If you aren't an evildoer, you can leave here.");
                AddOption("Let me out of here!", 1);
                AddOption("I see.", 255);
                break;
            }

            case 1:
                if (_client.PK >= 100)
                {
                    AddText("No, you will stay here until you have regretted your sins or you can do some work and mine some gold ores.");
                    AddText("Mine 5 Gold Ores with a rate of 4 or higher and I will let you leave.");
                    AddOption("Lend me a hoe please.", 3);
                    AddOption("I have the ores.", 4);
                    AddOption("I see.", 255);
                    break;
                }
                else
                {
                    _client.ChangeMap(1002, 512, 355);
                    break;
                }

            case 3:
            {
                if (_client.HasItem(562001, 1))         // Check if the client has a Hoe in his/her inventory.
                {
                    AddText("You already have a Hoe. I cannot give you another one.");
                    AddOption("I see.", 255);
                    break;
                }
                else
                {
                    if (!_client.HasItem(562001, 1))         // Second check. If a player does not have a Hoe, give them one. :)
                    {
                        _client.CreateItem(562001);
                    }
                    break;
                }
            }

            case 4:
                var GoldOres =                                              // "GoldOres" Cursor.
                               from Item                                    // "Item" Secondary cursor refers to _client.Inventory.Values
                               in _client.Inventory.Values                  // That's where you need the Secondary cursor to point.
                               where Item.StaticID / 10 == 107205           // Secondary cursor.StaticID for the item you have to put in the item ID without the quality 10 == refers to the quality.
                               where Item.StaticID % 10 >= 3                // "% 10 >= 3" refers to the quality.
                               select Item;                                 // Every Query Link should end up with the "select" then secondary cursor.

                if (GoldOres.Count() >= 5)
                {
                    for (var i = 0; i < 5; i++)                             // Start our loop for removing the Ores
                    {
                        _client.DeleteItem(GoldOres.ElementAt(i));          // Now actually remove the ores.
                    }
                    _client.ChangeMap(1002, 512, 355);
                    break;
                }
                else
                {
                    AddText("Don't try to fool me! You do not have 5 Gold Ores of rate 4 or higher!");
                    AddOption("Sorry! I'll get back to work.", 255);
                    break;
                }
            }
            AddFinish();
            Send();
        }
        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.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();
        }
Exemple #30
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();
        }