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();
        }
Пример #2
0
        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List <NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
            case 0:
                if (_client.Character.Level >= 70)
                {
                    AddText("We hope all can help each other. If you power level the newbies, we may reward you with Experience, Meteors or Dragonballs.");
                    AddText("Are you interested?");
                    AddOption("Tell me more details.", 1);
                    AddOption("Check my virtue points.", 5);
                    AddOption("Claim prize.", 6);
                    AddOption("Just passing by.", 255);
                }
                else
                {
                    AddText("You must be level 70 at least or more in order to get virtue points and be able to exchange for am prize.");
                    AddOption("I see.", 255);
                }
                break;

            case 1:
                AddText("If you are above level 70 and try to power level the newbies (at least 20 levels lower than you), you may gain virtue points.");
                AddOption("What are the virtue points?", 2);
                break;

            case 2:
                AddText("The more newbies you power level, the more virtue points you gain. I shall give you a good reward for a certain virtue points.");
                AddOption("How can I gain virtue points?", 3);
                AddOption("What prize can I expect?", 4);

                break;

            case 3:
                AddText("Once the newbies are one level up, the team captain can gain virtue points accordingly.");
                AddOption("I see.", 255);

                break;

            case 4:
                AddText("I shall reward you exp. of equivalent to an ExpBall for 15,000 virtue points , a meteor for 5,000 virtue points and an Dragonball for 50,000 virtue points.");
                AddOption("I see.", 255);

                break;

            case 5:
                AddText("Your current virtue points are " + _client.VirtuePoints + "  , please try to gain more.");
                AddOption("I see.", 255);

                break;

            case 6:
                if (_client.Inventory.Count == 40)
                {
                    //Lazy sanity check to stop people accidentally wasting VP. They can still packet exploit but they'd just be wasting VP and not getting items.
                    AddText("Please make room in your inventory before trying to claim a prize!");
                    AddOption("Sorry", 255);
                }
                else
                {
                    AddText("What prize do you prefer?");
                    AddOption("Meteor", 7);
                    AddOption("Experience.", 8);
                    AddOption("Dragonball", 9);
                    AddOption("Let me think it over.", 255);
                }
                break;

            case 7:
                if (_client.VirtuePoints >= 5000)
                {
                    _client.VirtuePoints -= 5000;
                    _client.CreateItem(1088001);
                    AddText("There you go.Check out in your inventory!");
                    AddOption("Thanks!", 255);
                }
                else
                {
                    AddText("Sorry, you do not have the required virtue points.");
                    AddOption("I see.", 255);
                }
                break;

            case 8:
                if (_client.VirtuePoints >= 15000 && _client.Character.Level <= 129)
                {
                    _client.VirtuePoints -= 15000;
                    _client.GainExpBall(1200);
                    AddText("There you go!");
                    AddOption("Thanks!", 255);
                }
                else if (_client.VirtuePoints >= 15000 && _client.Character.Level >= 130)
                {
                    AddText("Only characters below level 130 can exchange the virtue points for exp.");
                    AddText("You may find Simon (Twin city 393,235) and spend 2,000 virtue points to hunt the treasure in the Labyrinth.)");
                    AddOption("Wow.So cool.", 255);
                }
                else
                {
                    AddText("Sorry, you do not have the required virtue points.");
                    AddOption("I see.", 255);
                }
                break;

            case 9:
                if (_client.VirtuePoints >= 50000)
                {
                    _client.VirtuePoints -= 50000;
                    _client.CreateItem(1088000);
                    AddText("There you go.Check out in your inventory!");
                    AddOption("Thanks!", 255);
                }
                else
                {
                    AddText("Sorry, you do not have the required virtue points.");
                    AddOption("I see.", 255);
                }
                break;
            }
            AddFinish();
            Send();
        }