Exemple #1
0
        public FleeAndFatigue()
        {
            Activated       = true;
            HasRestartDelay = true;
            Title           = 1075487; // Flee and Fatigue
            Description     =
                1075488;               // I was just *coughs* ambushed near the moongate. *wheeze* Why do I pay my taxes? Where were the guards? You then, you an Alchemist? If you can make me a few Refresh potions, I will be back on my feet and can give those lizards the what for! Find a mortar and pestle, a good amount of black pearl, and ten empty bottles to store the finished potions in. Just use the mortar and pestle and the rest will surely come to you. When you return, the favor will be repaid.
            RefusalMessage =
                1075489;               // Fine fine, off with *cough* thee then! The next time you see a lizardman though, give him a whallop for me, eh?
            InProgressMessage =
                1075490;               // Just remember you need to use your mortar and pestle while you have empty bottles and some black pearl. Refresh potions are what I need.
            CompletionMessage =
                1075491;               // *glug* *glug* Ahh... Yes! Yes! That feels great! Those lizardmen will never know what hit 'em! Here, take this, I can get more from the lizards.

            Objectives.Add(new CollectObjective(10, typeof(RefreshPotion), "refresh potions"));

            Rewards.Add(new ItemReward(1074282, typeof(SadrahSatchel))); // Craftsmans's Satchel
        }
Exemple #2
0
        public AStitchInTime()
        {
            Activated       = true;
            HasRestartDelay = true;
            Title           = 1075523;                                            // A Stitch in Time
            Description     =
                1075522;                                                          // Oh how I wish I had a fancy dress like the noble ladies of Castle British! I don't have much... but I have a few trinkets I might trade for it. It would mean the world to me to go to a fancy ball and dance the night away. Oh, and I could tell you how to make one! You just need to use your sewing kit on enough cut cloth, that's all.
            RefusalMessage    = 1075526;                                          // Won't you reconsider? It'd mean the world to me, it would!
            InProgressMessage =
                1075527;                                                          // Hello again! Do you need anything? You may want to visit the tailor's shop for cloth and a sewing kit, if you don't already have them.
            CompletionMessage =
                1075528;                                                          // It's gorgeous! I only have a few things to give you in return, but I can't thank you enough! Maybe I'll even catch Uzeraan's eye at the, er, *blushes* I mean, I can't wait to wear it to the next town dance!

            Objectives.Add(new CollectObjective(1, typeof(FancyDress), 1027935)); // fancy dress

            Rewards.Add(new ItemReward(1075524, typeof(AnOldRing)));              // an old ring
            Rewards.Add(new ItemReward(1075525, typeof(AnOldNecklace)));          // an old necklace
        }
Exemple #3
0
        public DeliciousFishes()
        {
            Activated       = true;
            HasRestartDelay = true;
            Title           = 1075555;                                            // Delicious Fishes
            Description     =
                1075556;                                                          // Ello there, looking for a good place on the dock to fish? I like the southeast corner meself. What's that? Oh, no, *sighs* me pole is broken and in for fixin'. My grandpappy gave me that pole, means a lot you see. Miss the taste of fish though... Oh say, since you're here, could you catch me a few fish? I can cook a mean fish steak, and I'll split 'em with you! But make sure it's one of the green kind, they're the best for seasoning!
            RefusalMessage =
                1075558;                                                          // Ah, you're missin' out my friend, you're missing out. My peppercorn fishsteaks are famous on this little isle of ours!
            InProgressMessage =
                1075559;                                                          // Eh? Find yerself a pole and get close to some water. Just toss the line on in and hopefully you won't snag someone's old boots! Remember, that's twenty of them green fish we'll be needin', so come back when you've got em, 'aight?
            CompletionMessage =
                1075560;                                                          // Just a moment my friend, just a moment! *rummages in his pack* Here we are! My secret blend of peppers always does the trick, never fails, no not once. These'll fill you up much faster than that tripe they sell in the market!

            Objectives.Add(new CollectObjective(5, typeof(Fish), 1022508));       // fish

            Rewards.Add(new ItemReward(1075557, typeof(PeppercornFishsteak), 3)); // peppercorn fishsteak
        }
Exemple #4
0
        public UnfadingMemoriesPartOne()
        {
            Activated   = true;
            Title       = 1075355;       // Unfading Memories
            Description =
                1075356;                 // Aargh! It�s just not right! It doesn�t capture the unique color of her hair at all! If only I had some Prismatic Amber. That would be perfect. They used to mine it in Malas, but alas, those veins ran dry some time ago. I hear it may have been found in the Prism of Light. Oh, if only there were a bold adventurer within earshot who would go to the Prism of Light and retrieve some for me!
            RefusalMessage    = 1075358; // Is there no one who can help a humble artist pursue his Muse?
            InProgressMessage =
                1075359;                 // You can find Prismatic Amber in the Prism of Light, located just north of the city of Nujel'm.
            CompletionMessage =
                1075360;                 // I knew it! See, it�s just the color I needed! Look how it brings out the highlights of her wheaten tresses!
            CompletionNotice = CompletionNoticeShort;

            Objectives.Add(new CollectObjective(1, typeof(PrismaticAmber), "Prismatic Amber"));

            Rewards.Add(new DummyReward(
                            1075357)); // The joy of contributing to a noble artistic effort, however paltry the end product.
        }
        public MoreOrePlease()
        {
            Activated         = true;
            OneTimeOnly       = true;
            Title             = "More Ore Please";
            Description       = "Have a pickaxe? My supplier is late and I need some iron ore so I can complete a bulk order for another merchant. If you can get me some soon I'll pay you double what it's worth on the market. Just find a cave or mountainside and try to use your pickaxe there, maybe you'll strike a good vein! 5 large pieces should do it.";
            RefusalMessage    = "Not feeling strong enough today? Its alright, I didn't need a bucket of rocks anyway.";
            InProgressMessage = "Hmmm… we need some more Ore. Try finding a mountain or cave, and give it a whack.";
            CompletionNotice  = "You have achieved the required task. Return to Mugg in Skaddria Naddheim to claim your reward.";
            CompletionMessage = "I see you found a good vien! Great!  This will help get this order out on time. Good work!";

            Objectives.Add(new InternalObjective());

            Rewards.Add(new ItemReward("Miner's Ingot Pouch", typeof(MinersIngotPouch)));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.SmallBagOfTreasure);
        }
        public Arachnophobia()
        {
            Activated         = true;
            OneTimeOnly       = true;
            Title             = "Arachnophobia";
            Description       = "I've seen them hiding in their webs among the woods. Glassy eyes, spindly legs, poisonous fangs. Monsters, I say! Deadly horrors, these black widows. Someone must exterminate the abominations! If only I could find a worthy hero for such a task, then I could give them this considerable reward.";
            RefusalMessage    = "I hope you'll reconsider. Until then, farwell.";
            InProgressMessage = "You've got a good start, but to stop the black-eyed fiends, you need to kill a dozen. You can find them over in Black Widow Pit. But for the love of Eienyasil be careful. Take a few cure potions just in case.";
            CompletionMessage = "Way to go fellow Almharian. That should put the scare back into those creepy-crawlies. EKK! WHAT WAS THAT! Oh, it was the wind. *cough* Where were we again, oh right. You like money, correct?";
            CompletionNotice  = "You have slain the required black widows. Return to Alelle over in Tiki Tsundara for your reward.";

            Objectives.Add(new KillObjective(12, new Type[] { typeof(GiantBlackWidow) }, "giant black widows"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
Exemple #7
0
        public AGhostOfCovetous()
        {
            Activated   = true;
            Title       = 1075287;       // A Ghost of Covetous
            Description =
                1075286;                 // What? Oh, you startled me! Sorry, I'm a little jumpy. My master Griswolt learned that a ghost has recently taken up residence in the Covetous dungeon. He sent me to capture it, but I . . . well, it terrified me, to be perfectly honest. If you think yourself courageous enough, I'll give you my Spirit Bottle, and you can try to capture it yourself. I'm certain my master would reward you richly for such service.
            RefusalMessage =
                1075288;                 // That's okay, I'm sure someone with more courage than either of us will come along eventually.
            InProgressMessage = 1075290; // You'll find that ghost in the mountain pass above the Covetous dungeon.
            CompletionMessage =
                1075291;                 // (As you try to use the Spirit Bottle, the ghost snatches it out of your hand and smashes it on the rocks) Please, don't be frightened. I need your help!
            CompletionNotice = CompletionNoticeShort;

            Objectives.Add(new DeliverObjective(typeof(SpiritBottle), 1, "Spirit Bottle", typeof(Frederic)));

            Rewards.Add(new DummyReward(
                            1075284)); // Return the filled Spirit Bottle to Griswolt the Master Necromancer to receive a reward.
        }
Exemple #8
0
        public Result UpdateReward(int rewardId, string name, decimal pointsCost, int?rewardCategoryId)
        {
            var reward = Rewards.SingleOrDefault(x => x.Id == rewardId);

            if (reward is null)
            {
                return(new Result(new NotFoundError("Reward with provided id not found.")));
            }

            if (rewardCategoryId.HasValue && !RewardCategories.Any(x => x.Id == rewardCategoryId))
            {
                return(new Result(new NotFoundError("Reward category with provided id not found.")));
            }

            reward.Update(name, pointsCost, rewardCategoryId);

            return(new Result());
        }
Exemple #9
0
        public Aemaeth1()
        {
            Activated   = true;
            Title       = 1075321;       // Aemaeth
            Description =
                1075322;                 // My father died in an accident some months ago. My mother refused to accept his death. We had a little money set by, and she took it to a necromancer, who promised to restore my father to life. Well, he revived my father, all right, the cheat! Now my father is a walking corpse, a travesty . . . a monster. My mother is beside herself -- she won't eat, she can't sleep. I prayed at the shrine of Spirituality for guidance, and I must have fallen asleep. When I awoke, there was this basin of clear water. I cannot leave my mother, for I fear what she might do to herself. Could you take this to the graveyard, and give it to what is left of my father?
            RefusalMessage =
                1075324;                 // Oh! Alright then. I hope someone comes along soon who can help me, or I dont know what will become of us.
            InProgressMessage =
                1075325;                 // My father - or what remains of him - can be found in the graveyard northwest of the city.
            CompletionMessage = 1075326; // What is this you give me? A basin of water?
            CompletionNotice  = CompletionNoticeShort;

            Objectives.Add(new DeliverObjective(typeof(BasinOfCrystalClearWater), 1, "Basin of Crystal Clear Water",
                                                typeof(SkeletonOfSzandor)));

            Rewards.Add(new DummyReward(1075323)); // Aurelia's gratitude.
        }
        public TarantulaTerror()
        {
            Activated         = true;
            OneTimeOnly       = true;
            Title             = "Tarantula Terror";
            Description       = "Please excuse me, adventurer. I need you to intervene. We're winning the war, but it has come at a great cost. We're low on capable fighters to deal with the last remnants of our enemies, but we must rid the Oboru of all enemies. Hero, go out there and deal with those wretched yatsukahags. I cannot join you, for I have other tasks to attend to, but I know you don't need me anyway. Be strong and swift when fighting the yatsukahags. There's no need to kill all of them, just put the fear in them.";
            RefusalMessage    = "The Oboru grows more perilious with each passing minute without your aid. Please I beg of you.";
            InProgressMessage = "It pains me to say I won't be able to reward you with a lot, but I'll do my best to make it worth your while. I'm looking forward to your return, hero. Good luck.";
            CompletionMessage = "By the gods, I knew you could pull it off. Allow me to compensate you for everything you've done so far.";
            CompletionNotice  = "You have slain enough yatsukahags. Return to Keturah Chambers in Tiki Tsundara for your reward.";

            Objectives.Add(new KillObjective(8, new Type[] { typeof(Yatsukahag) }, "yatsukahags"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck1500);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.MediumBagOfTreasure);
        }
Exemple #11
0
        public UnfadingMemoriesPartTwo()
        {
            Activated   = true;
            Title       = 1075367; // Unfading Memories
            Description =
                1075368;           // Finished! With the pigment I was able to create from the Prismatic Amber you brought me, I was able to complete my humble work. I should explain. Once, I loved a noble lady of gentleness and refinement, who possessed such beauty that I have found myself unable to love another to this day. But it was from afar that I admired her, for it is not for one so lowly as I to pay court to the likes of her. You have heard of the fair Thalia, Lady of Nujel'm? No? Well, she was my Muse, my inspiration, and when I heard she was to be married, I lost whatever pitiful talent I possessed. I felt I must compose a portrait of her, my masterpiece, or I would never be able to paint again. You, my friend, have helped me complete my work. Now I ask another favor of you. Will you take it to her as a wedding gift? She will probably reject it, but I must make the offer.
            RefusalMessage =
                1075370;           // Alright then, you have already helped me more than I deserved. I shall find someone else to undertake this task.
            InProgressMessage =
                1075371;           // The wedding is taking place in the palace in Nujel'm. You will likely find her there.
            CompletionMessage =
                1075372;           // I�m sorry, I�m getting ready to be married. I don�t have time to . . . what�s that you say?
            CompletionNotice = CompletionNoticeShort;

            Objectives.Add(new DeliverObjective(typeof(PortraitOfTheBride), 1, "Portrait of the Bride", typeof(Thalia)));

            Rewards.Add(new DummyReward(1075369)); // The Artist�s gratitude.
        }
        public DownWithTheSickness()
        {
            Activated         = true;
            Title             = "Down With The Sickness";
            OneTimeOnly       = true;
            Description       = "Please, traveler. Your help would be much apprecited. My husband has fallen ill, he won't wake up no matter what I do. I believe we need to make him drink tea brewed from silverherb, but they only grow in the Farron Glades and I cannot leave my husband's side. Please, hero, gather a handful of silverherb as quick as you can. I wish I had something better to reward you with, but what I have ain't too bad either.";
            RefusalMessage    = "Well that's just f*****g fantastic! Leave my husband to wallow in his miserable state.";
            InProgressMessage = "You can reach the Farron Glades by passing through Cairn Forlorn in the Glimmerwood. That is if you have the fortress key. Luckily you can buy it. But I'm not exactly sure who sells it.";
            CompletionNotice  = "You have procured enough silver herbs. Return to Sanyalonde over at Red Dagger Keep";
            CompletionMessage = "Oh bless you fellow adventurer for everything you've done so far. Take this reward as compensation.";

            Objectives.Add(new CollectObjective(20, typeof(SilverHerb), "silver herb"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public ReginasThanks()
        {
            Activated         = true;
            OneTimeOnly       = true;
            Title             = "Regina’s Thanks";
            Description       = "What’s that you say? It was a humble beggar that found my ring? Such honesty must be rewarded. Here, take this packet and return it to him, and I will be in your debt.";
            RefusalMessage    = "Hmph. Very well. What did you say his name was?";
            InProgressMessage = "Take the packet and return it to the beggar who found my ring.";
            CompletionMessage = "What? For me? Let me see . . . these sapphire earrings are for you, it says. Oh, she wants to offer me a job! This is the most wonderful thing that ever happened to me!";
            CompletionNotice  = CompletionNoticeShort;

            Objectives.Add(new DeliverObjective(typeof(ReginasLetter), 1, "Regina's Letter", typeof(Evan)));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck1000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.MediumBagOfTreasure);
        }
Exemple #14
0
        public ThePenIsMightier()
        {
            Activated       = true;
            HasRestartDelay = true;
            Title           = 1075542; // The Pen is Mightier
            Description     =
                1075543;               // Do you know anything about 'Inscription?' I've been trying to get my hands on some hand crafted Recall scrolls for a while now, and I could really use some help. I don't have a scribe's pen, let alone a spellbook with Recall in it, or blank scrolls, so there's no way I can do it on my own. How about you though? I could trade you one of my old leather bound books for some.
            RefusalMessage =
                1075546;               // Hmm, thought I had your interest there for a moment. It's not everyday you see a book made from real daemon skin, after all!
            InProgressMessage =
                1075547;               // Inscribing... yes, you'll need a scribe's pen, some reagents, some blank scroll, and of course your own magery book. You might want to visit the magery shop if you're lacking some materials.
            CompletionMessage =
                1075548;               // Ha! Finally! I've had a rune to the waterfalls near Justice Isle that I've been wanting to use for the longest time, and now I can visit at last. Here's that book I promised you... glad to be rid of it, to be honest.

            Objectives.Add(new CollectObjective(5, typeof(RecallScroll), "recall scroll"));

            Rewards.Add(new ItemReward(1075545, typeof(RedLeatherBook))); // a book bound in red leather
        }
Exemple #15
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(title_textBox.Text) && title_textBox.Text.Length < 50 && decription_richtextBox.Text.Length < 150)
     {
         reward = new Rewards()
         {
             ID         = rewardId,
             Title      = title_textBox.Text,
             Decription = decription_richtextBox.Text
         };
         this.DialogResult = DialogResult.OK;
         Close();
     }
     else
     {
         MessageBox.Show("Incorrect values");
     }
 }
Exemple #16
0
        public IEnumerable <Rewards> GetList()
        {
            connection.Open();
            rewards.Clear();
            using (SqlCommand command = new SqlCommand("SELECT * FROM Awards", connection))
            {
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    Rewards reward = new Rewards(reader.GetInt32(0), reader.GetString(1), reader[2]?.ToString());
                    rewards.Add(reward);
                }
                reader.Close();
            }

            connection.Close();
            return(rewards);
        }
Exemple #17
0
        public UnfadingMemoriesPartThree()
        {
            Activated   = true;
            OneTimeOnly = true;
            Title       = 1075373;       // Unfading Memories
            Description =
                1075374;                 // Emilio painted this? It is absolutely wonderful! I used to love looking at his paintings, but I don�t remember him creating anything like this before. Would you be so kind as to carry a letter to him? Fate may have it that I am to marry another, yet I am compelled to reveal to him that his love was not entirely unrequited.
            RefusalMessage    = 1075376; // Very well, then. If you will excuse me, I need to get ready.
            InProgressMessage =
                1075377;                 // Take the letter back to the Artist�s Guild in Britain, if you would do me this kindness.
            CompletionMessage =
                1075378;                 // She said what? She thinks what of me? I . . . I can�t believe it! All this time, I never knew how she truly felt. Thank you, my friend. I believe now I will be able to paint once again. Here, take this bleach. I was going to use it to destroy all of my works. Perhaps you can find a better use for it now.
            CompletionNotice = CompletionNoticeShort;

            Objectives.Add(new DeliverObjective(typeof(BridesLetter), 1, "Bride's Letter", typeof(Emilio)));

            Rewards.Add(new ItemReward(1075375, typeof(Bleach))); // Bleach
        }
        public DiversUpDeezNuts()
        {
            Activated         = true;
            Title             = "Divers Up Deez Nuts";
            OneTimeOnly       = true;
            Description       = "Yo bitch ass neegah! I need yo help. Why won't deez mutherfuckas leave us alone? I ain't got nuttin to give, yet dae be coming back for more. Homie, please, I begs of you, get rid of those goddamn cliff divers or else I'm gonna have to choke a leaf-bitter. Pale ass, bitch ass ljosalfar. You ain't need to kill all of them. Just enough to f**k 'em over. What's say you, dawg? Yah feel me?";
            RefusalMessage    = "Hey, hold up. I ain't gonna play dat. Now you get your ass back over here and help a homie out.";
            InProgressMessage = "Yo dawg, I appreciate it. I'll make sure to reward yah once you return.";
            CompletionNotice  = "You have slain enough cliff divers. Return to Kenichi McCreary over at Red Dagger Keep";
            CompletionMessage = "Yo dawg, thanks for helping a homie out! I suppose I better give you this.";

            Objectives.Add(new KillObjective(15, new Type[] { typeof(CliffDiver) }, "cliff divers"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public SchittySchittyBangBang()
        {
            Activated         = true;
            Title             = "Schitty Schitty Bang Bang";
            OneTimeOnly       = true;
            Description       = "Please excuse me, traveler. I need your help. Fifty years it has been, half a century since we secured our lands and we could live in peace. But now they're back and they're stronger than ever. Hero, we'll need your help to get rid of the spectral armour. My duties prevent me from going with you, but I doubt I'd be needed anyway. They'll be no match for you, those dwarves. If you can, kill as many of them as possible. We want to live in peace and safety..... and especially not having to deal with their constant rattling.";
            RefusalMessage    = "Please, pretty please. They're really annoying.";
            InProgressMessage = "I hope you're not looking for a big reward, but we'll still be able to reward you with somethind decent. I'm looking forward to your return, hero. Good luck.";
            CompletionNotice  = "You have slain enough spectral armours. Return to Irene Doland over at Red Dagger Keep";
            CompletionMessage = "Yay! Now I can finally rest easily without that constant banging. Here, you can have this.";

            Objectives.Add(new KillObjective(10, new Type[] { typeof(SpectralArmour) }, "spectral armours"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public Them()
        {
            Activated         = true;
            Title             = "Them";
            OneTimeOnly       = true;
            Description       = "Oui! Excuse me, mate. Would you lend yee a hand with a particular task at hand? Years have passed since the bullet ants settled within the Harashi Nabi and its starting to get really out of hand. There's too many of them which has resulted in the area becoming quite hazardous towards those who wander too close to them. I need for you to clear out a few of their numbers by all means necessary.";
            RefusalMessage    = "Please, we gotta stop those bullet ants before things get even more hectic.";
            InProgressMessage = "It pains me to say I won't be able to reward you with a lot, but I'll do my best to make it worth your while. I'm looking forward to your return, guardian. Good luck.";
            CompletionNotice  = "You have slain enough bullet ants. Return to Carol Branston over at Red Dagger Keep";
            CompletionMessage = "I appreciate all you've done so far. Please, allow me to compensate you on a job well done.";

            Objectives.Add(new KillObjective(20, new Type[] { typeof(BulletAnt) }, "bullet ants"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public AndThanksForAllTheFish()
        {
            Activated         = true;
            Title             = "And Thanks For All The Fish";
            OneTimeOnly       = true;
            Description       = "I'm surrounded by cowards. We were robbed by a group of sand barracuda, they took all they could and killed most of those who tried to stop them. I did what I could, but if everybody helped we would've overpowered them easily. Hero, please get rid of those vulgar beings. You are fully capable to handle those beings. Try to kill all those who stand in your way, we don't need their filth in our lands.";
            RefusalMessage    = "Oh come on! There's no telling what those sand barracuda are up too.";
            InProgressMessage = "I hope you're not looking for a big reward, but we'll still be able to reward you with somethind decent. I'm looking forward to your return, hero. Good luck.";
            CompletionNotice  = "You have slain enough sand barracuda. Return to Hormell Jenkins over at Red Dagger Keep";
            CompletionMessage = "Finally! Never thought I would live to see this day. Here take this reward. I won't be needing it any time soon.";

            Objectives.Add(new KillObjective(15, new Type[] { typeof(SandBarracuda) }, "sand barracuda"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public RedDawn()
        {
            Activated         = true;
            Title             = "Red Dawn";
            OneTimeOnly       = true;
            Description       = "Pardon me, hero. You're a sight for sore eyes. They're burning down everything! Everything.. everything is turning to ashes.. My family.. they even... Hero, I need you to avenge my family and get rid of those vile stingers. I don't think you'll have much troubles dealing with those redbark scorpions. You can kill as many of them as you wish, destroy all of them if you want, curse those lowlives.";
            RefusalMessage    = "I see. Well I guess you're on your own then.";
            InProgressMessage = "I hope you're not looking for a big reward, but we'll still be able to reward you with somethind decent. Please succeed hero, we believe in you.";
            CompletionNotice  = "You have slain enough redbark scorpions. Return to Tabitha Crainlad over at Red Dagger Keep";
            CompletionMessage = "Woot, woot! That should be the last of those ugly f*****g reds.";

            Objectives.Add(new KillObjective(15, new Type[] { typeof(RedbarkScorpion) }, "red bark scorpions"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public FireStarter()
        {
            Activated         = true;
            Title             = "Fire Starter";
            OneTimeOnly       = true;
            Description       = "Pardon me, hero. I'm glad you're here. I'm sick and tired of living in fear. Fear of being robbed, fear of being killed and fear of any harm being done to those I love by those vicious lowlifes. Hero, please get rid of those dastardly charred sprites. Unfortunately I cannot join you, but I have faith in you, I know you'll succeed. Be warry hero, they're stronger than they look those faeries. You can take out as many of them as you like, the less of those lowlives there are in this world, the better.";
            RefusalMessage    = "Alright, fine then. Doesn't look like you'd be much use anyway.";
            InProgressMessage = "I hope you're not looking for a big reward, but we'll still be able to reward you with somethind decent. I hope you return swiftly hero, we believe in you.";
            CompletionNotice  = "You have slain enough charred sprites. Return to Alan Smith over at Red Dagger Keep";
            CompletionMessage = "Hopefully the activity of those charred sprites will die down now. Allow me to reward you on a job well done.";

            Objectives.Add(new KillObjective(10, new Type[] { typeof(CharredSprite) }, "charred sprites"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
        public JubokkoJamberee()
        {
            Activated         = true;
            Title             = "Jubokko Jamberee";
            OneTimeOnly       = true;
            Description       = "Great Caesars Scott, I need your help. Justice demands retribution and I will not take no for an answer. A group of jubokko killed some of my sheep and they've been nothing but trouble for the entire region. We will not allow them to go quietly in the night. I suppose it wouldn't trouble you if you could deal a good dent on their growing numbers? Your deeds will be spoken of throughout Red Dagger Keep.";
            RefusalMessage    = "Inconceivable! I will not take no for an answer.";
            InProgressMessage = "I'm happy to say I'll be able to reward you handsomely for your troubles. You best get going, there's no time to waste. We're counting on you.";
            CompletionNotice  = "You have slain enough jubokko. Return to Courtney Tripp over at Red Dagger Keep";
            CompletionMessage = "Thank you for helping me get rid of these accursed plants! Take this reward as a gratitude of generousity.";

            Objectives.Add(new KillObjective(15, new Type[] { typeof(Jubokko) }, "jubokko"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck2000);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
            Rewards.Add(ItemReward.LargeBagOfTreasure);
        }
Exemple #25
0
        public UnnaturalCreations()
        {
            Activated   = true;
            Title       = 1072758;       // Unnatural Creations
            Description =
                1072780;                 // You have proven your desire to contribute to the community and serve the people.  Now you must demonstrate your willingness to defend Sosaria from the greatest blight that plagues her.  Unnatural creatures, brought to a sort of perverted life, despoil our fair world.  Destroy them -- 5 Exodus Overseers and 2 Exodus Minions.
            RefusalMessage =
                1072771;                 // You must serve Sosaria with all your heart and strength.  Your unwillingness does not reflect favorably upon you.
            InProgressMessage = 1072779; // Every moment you procrastinate, these unnatural creatures damage Sosaria.
            CompletionMessage = 1074167; // Well done!  Well done, indeed.  You are worthy to become an arcanist!

            Objectives.Add(new KillObjective(5, new[] { typeof(ExodusOverseer) }, "Exodus Overseers"));
            Objectives.Add(new KillObjective(2, new[] { typeof(ExodusMinion) }, "Exodus Minions"));

            Rewards.Add(new ItemReward(1031601, typeof(ArcaneCircleScroll)));  // Arcane Circle
            Rewards.Add(new ItemReward(1031600, typeof(SpellweavingBook)));    // Spellweaving Spellbook
            Rewards.Add(new ItemReward(1031602, typeof(GiftOfRenewalScroll))); // Gift of Renewal
        }
        public ARockAndAHardPlace()
        {
            Activated   = true;
            Title       = 1074951;       // A Rock and a Hard Place
            Description =
                1074957;                 // This is some nasty stuff, that's for certain.  I don't even want to think about what sort of blight caused this venomous reaction from that old tree.  Let's get to work … we'll need to try something really hard but still workable as our base material.  Nothing's harder than stone and diamond.  Let's try them first.
            RefusalMessage    = 1074965; // Sure, no problem.  I thought you were interested in figuring this out.
            InProgressMessage =
                1074969;                 // If you're a miner, you should have no trouble getting that stuff.  If not, you can probably buy some samples from a miner?
            CompletionMessage =
                1074992;                 // Have you got the granite and diamonds?  Great, let me see them and we'll see what effect this venom has upon them.

            // Any type of granite works
            Objectives.Add(new CollectObjective(4, typeof(BaseGranite), 1026009)); // rock
            Objectives.Add(new CollectObjective(2, typeof(BlueDiamond), 1032696)); // Blue Diamond

            Rewards.Add(new DummyReward(1074962));                                 // A step closer to entering Blighted Grove.
        }
Exemple #27
0
        public ConvinceMe()
        {
            Activated         = true;
            Title             = 1074629; // Convince Me
            Description       = 1074630; // I'm not signing any forms until the situation here is under control.  So, you can either help out or you can forget getting your tuition refund.  Which will it be?  Help control the shambling dead?
            RefusalMessage    = 1074631; // No signature for you.
            InProgressMessage = 1074632; // No signature for you until you kill off some of the shambling dead out there and destroy that blasted horse.
            CompletionMessage = 1074633; // Pulled it off huh?  Well then you've earned this signature!
            CompletionNotice  = CompletionNoticeShortReturn;

            QuestArea bedlam = new QuestArea(1074835, "Bedlam");               // Bedlam

            Objectives.Add(new KillObjective(1, new Type[] { typeof(RedDeath) }, "Red Death", bedlam));
            Objectives.Add(new KillObjective(10, new Type[] { typeof(GoreFiend) }, "gore fiends", bedlam));
            Objectives.Add(new KillObjective(8, new Type[] { typeof(RottingCorpse) }, "rotting corpses", bedlam));

            Rewards.Add(new DummyReward(1074634));                 // Tuition Reimbursement
        }
        public DeadManWalking()
        {
            Activated         = true;
            OneTimeOnly       = true;
            Title             = "Dead Man Walking";
            Description       = "Why?  I ask you why?  They walk around after they're put in the ground.  It's just wrong in so many ways. Put them to proper rest, I beg you.  I'll find some way to pay you for the kindness. Just kill five gualichu and five umkhovu over in Zaythalor Graveyard.";
            RefusalMessage    = "Well, okay. But if you decide you are up for it after all, c'mon back and see me.";
            InProgressMessage = "*sniff* *sniff* You know what that smell is? That's the smell of you not finishing your task!";
            CompletionMessage = "Jillery Jipperru! Not bad for this go-around. Take your reward and if you excuse me, I got get back to church.";
            CompletionNotice  = "You have slain the required undead. Return to Cloorne in Hammerhill for your reward.";

            Objectives.Add(new KillObjective(5, new Type[] { typeof(Umkhovu) }, "umkhovus"));
            Objectives.Add(new KillObjective(5, new Type[] { typeof(Gualichu) }, "gualichus"));

            Rewards.Add(ItemReward.MLQuestCompletionDeed);
            Rewards.Add(ItemReward.MLExperienceCheck1000);
            Rewards.Add(ItemReward.MediumBagOfTreasure);
        }
Exemple #29
0
        public override void Init()
        {
            base.Init();

            Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
            Donations.Add(new CollectionItem(typeof(Lockpick), 0x14FC, 1025371, 0x0, 1));
            Donations.Add(new CollectionItem(typeof(LesserPoisonPotion), 0xF0A, 1015017, 0x0, 1));
            Donations.Add(new CollectionItem(typeof(DeadlyPoisonPotion), 0xF0A, 1015020, 0x0, 5));
            Donations.Add(new CollectionItem(typeof(ClothNinjaHood), 0x278F, 1074911, 0x0, 11));
            Donations.Add(new CollectionItem(typeof(LeatherNinjaHood), 0x278E, 1074912, 0x0, 16));
            Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
            Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));

            int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0)); // Britain Public Library Contributor

            hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
            Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0)); // Distinguished Library Contributor
            Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0)); // Honored Library Contributor
            Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
            Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0)); // Prominent Library Contributor
            Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0)); // Eminent Library Contributor
            Rewards.Add(new CollectionItem(typeof(PoisonedGlasses), 0x2FB8, 1073376, 0x55C, 800000.0));
        }
        public override void Init()
        {
            base.Init();

            Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
            Donations.Add(new CollectionItem(typeof(BankCheck), 0x14F0, 1075013, 0x34, 0.06666));
            Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
            Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));
            Donations.Add(new CollectionItem(typeof(Bokuto), 0x27A8, 1074913, 0x0, 8));
            Donations.Add(new CollectionItem(typeof(Daisho), 0x27A9, 1074914, 0x0, 22));
            Donations.Add(new CollectionItem(typeof(NoDachi), 0x27A2, 1074915, 0x0, 27));
            Donations.Add(new CollectionItem(typeof(BookOfBushido), 0x238C, 1070814, 0x0, 30));

            int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
            Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0));                 // Britain Public Library Contributor

            hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
            Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0));                 // Distinguished Library Contributor
            Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
            Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0));                 // Honored Library Contributor
            Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
            Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
            Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0));                 // Prominent Library Contributor
            Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0));                 // Eminent Library Contributor
            Rewards.Add(new CollectionItem(typeof(FoldedSteelGlasses), 0x2FB8, 1073380, 0x47E, 800000.0));
        }
Exemple #31
0
        static void Main(string[] args)
        {
            Utility.WriteExeDetails();
            Utility.LoadStrings(root);
            Utility.LoadItems(root);
            Utility.LoadQuestFile(root);

            var newStuff = Utility.QuestIndex.QuestList.Where(n => n.nodes.Count > 0)
                                                       .SelectMany(n => n.nodes);
            var distinctNew = newStuff.Select(n => n.Name).Distinct();

            if (distinctNew.Any()) {
                Console.WriteLine("New elements found in XML which were not coded in. Continue?");
                Console.WriteLine("Elements are:");
                foreach (var nodeName in distinctNew)
                    Console.WriteLine("      {0}", nodeName);
                Console.Write("(Y/N): ");
                var input = Console.ReadKey(true);
                if (Char.ToLower(input.KeyChar) == 'n')
                    return;
            }

            Utility.LoadClientNpcs(root);

            Utility.LoadTitles(root);

            Utility.LoadNpcFactions(root);

            Console.Write("Parsing... ");
            int top = Console.CursorTop;
            int left = Console.CursorLeft;

            var utility = Utility<Quest>.Instance;
            List<QuestOur> ourList = new List<QuestOur>();
            foreach (Quest quest in Utility.QuestIndex.QuestList) {
                //testing
                //if (quest.Description == null) continue;

                // disable check, using new check for testing
                // not enabled 임시 in korean
                if (quest.Description != null) {
                    if (quest.Description.body == "Temporary" || quest.Description.body == "임시")
                        continue;
                }

                // Only Exclude Temporary and min level == 99 (Disabled Quests)
                //if (Utility.QuestStringIndex.GetString(quest.desc) == "Temporary" || quest.minlevel_permitted == 99) continue;

                /* disable check
                if (quest.minlevel_permitted != 99 && quest.minlevel_permitted > 60 &&
                    quest.minlevel_permitted != 65)
                    continue;
                */

                QuestOur q = new QuestOur();
                q.id = quest.id;

                Console.SetCursorPosition(left, top);
                Console.Write("Q" + q.id);

                q.max_repeat_count = quest.max_repeat_count;

                // Assign to category
                q.category = quest.category1.ToUpper();

                /* disabled, Get Id's from string index instead
                q.nameId = (quest.Description.id * 2 + 1);
                if (q.nameId > 0)
                    q.nameIdSpecified = true;
                */

                q.nameId = Utility.StringIndex[quest.desc];
                q.nameIdSpecified = true;

                // Get Mentor Faction from Client Data
                if (quest.npcfaction_name != null) q.npcfaction_id = Utility.NpcFactionIndex[quest.npcfaction_name];

                // set mentor type
                if (quest.category2 != null) if (quest.category2.Contains("Mentee")) q.mentor_type = "MENTE";
                if (quest.category2 != null) if (quest.category2.Contains("Mentor")) q.mentor_type = "MENTOR";

                if (quest.race_permitted == string.Empty)
                {
                    q.race_permitted = Race.PC_ALL;
                    q.race_permittedSpecified = true;
                }
                else if (quest.race_permitted.Split(' ').Count() > 1) {
                    q.race_permitted = Race.PC_ALL;
                    q.race_permittedSpecified = true;
                }
                else {
                    q.race_permitted = (Race)Enum.Parse(typeof(Race), quest.race_permitted.ToUpper());
                    q.race_permittedSpecified = true;
                }

                q.name = quest.Description.body.TrimEnd();
                q.minlevel_permitted = quest.minlevel_permitted;
                if (quest.minlevel_permitted < quest.maxlevel_permitted)
                    q.maxlevel_permitted = quest.maxlevel_permitted;

                q.playtime_hour = quest.playtime_hour;

                if(quest.quest_repeat_cycle!= null)
                    q.repeat_cycle = quest.quest_repeat_cycle.ToUpper();

                q.cannot_giveup = quest.cannot_giveup;
                q.cannot_share = quest.cannot_share;

                string[] classes = quest.class_permitted.ToUpper().Split(' ');
                string classesParse = String.Join(",", classes);
                Class classEnum = (Class)Enum.Parse(typeof(Class), classesParse);
                if ((classEnum & Class.ALL) != Class.ALL) {
                    q.class_permitted = ((ClassOur)classEnum).ToString().Replace(",", String.Empty);
                    q.class_permittedSpecified = true;
                }

                string race = quest.race_permitted.ToLower();
                if (race == "pc_light") {
                    q.race_permitted = Race.ELYOS;
                    q.race_permittedSpecified = true;
                } else if (race == "pc_dark") {
                    q.race_permitted = Race.ASMODIANS;
                    q.race_permittedSpecified = true;
                }

                string gender = quest.gender_permitted.ToLower();
                if (gender != "all") {
                    q.gender_permittedSpecified = true;
                    if (gender == "male")
                        q.gender_permitted = Gender.MALE;
                    else
                        q.gender_permitted = Gender.FEMALE;
                }

                var drops = new List<QuestDrop>();
                utility.Export(quest, "drop_item_", drops);
                drops = drops.Where(d => d.item_id != 0 && d.chance > 0).ToList();
                if (drops.Count > 0) {
                    // check if multiple NCS
                    q.QuestDrops = new List<QuestDrop>();
                    foreach (var drop in drops) {
                        if (drop.npc_id > 0) {
                            drop.collecting_step = quest.collect_progress;
                            q.QuestDrops.Add(drop);
                        }
                        else {
                            if (drop.npcIds == null /*&& drop.npc_faction != null*/) {
                                // NOT defined in 1.9 but in 2.0 - skip them
                                // q.QuestDrops.Add(drop);
                                continue;
                            }
                            foreach (var npcName in drop.npcIds) {
                                QuestDrop newDrop = (QuestDrop)drop.Clone();
                                int id = Utility.ClientNpcIndex[npcName];
                                if (id != -1) {
                                    newDrop.npc_id = id;
                                    newDrop.collecting_step = quest.collect_progress;
                                    q.QuestDrops.Add(newDrop);
                                }
                            }
                        }
                    }
                }

                q.QuestWorkItems = new List<QuestItemsOur>();
                utility.Export(quest, "quest_work_item", q.QuestWorkItems);
                q.QuestWorkItems = q.QuestWorkItems.Where(d => d.count > 0).ToList();
                if (q.QuestWorkItems.Count == 0)
                    q.QuestWorkItems = null;
                else
                    q.QuestWorkItemsSpecified = true;

                if (quest.assassin_selectable_reward != null) {
                    q.AssassinSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.assassin_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.assassin_selectable_item);
                        if (our != null)
                            q.AssassinSelectableRewards.Add(our);
                    }
                }

                if (quest.chanter_selectable_reward != null) {
                    q.ChanterSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.chanter_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.chanter_selectable_item);
                        if (our != null)
                            q.ChanterSelectableRewards.Add(our);
                    }
                }

                if (quest.elementalist_selectable_reward != null) {
                    q.ElementalistSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.elementalist_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.elementalist_selectable_item);
                        if (our != null)
                            q.ElementalistSelectableRewards.Add(our);
                    }
                }

                if (quest.fighter_selectable_reward != null) {
                    q.FighterSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.fighter_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.fighter_selectable_item);
                        if (our != null)
                            q.FighterSelectableRewards.Add(our);
                    }
                }

                if (quest.knight_selectable_reward != null) {
                    q.KnightSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.knight_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.knight_selectable_item);
                        if (our != null)
                            q.KnightSelectableRewards.Add(our);
                    }
                }

                if (quest.priest_selectable_reward != null) {
                    q.PriestSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.priest_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.priest_selectable_item);
                        if (our != null)
                            q.PriestSelectableRewards.Add(our);
                    }
                }

                if (quest.ranger_selectable_reward != null) {
                    q.RangerSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.ranger_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.ranger_selectable_item);
                        if (our != null)
                            q.RangerSelectableRewards.Add(our);
                    }
                }

                if (quest.wizard_selectable_reward != null) {
                    q.WizardSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.wizard_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.wizard_selectable_item);
                        if (our != null)
                            q.WizardSelectableRewards.Add(our);
                    }
                }

                if (quest.bard_selectable_reward != null)
                {
                    q.Bard_selectablRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.bard_selectable_reward)
                    {
                        QuestItemsOur our = GetRewardItem(r.bard_selectable_item);
                        if (our != null)
                            q.Bard_selectablRewards.Add(our);
                    }
                }

                if (quest.gunner_selectable_reward != null)
                {
                    q.Gunner_selectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.gunner_selectable_reward)
                    {
                        QuestItemsOur our = GetRewardItem(r.gunner_selectable_item);
                        if (our != null)
                            q.Gunner_selectableRewards.Add(our);
                    }
                }

                q.CollectItems = new List<CollectItem>();
                utility.Export(quest, "collect_item", q.CollectItems);
                q.CollectItems = q.CollectItems.Where(d => d.count > 0).ToList();
                if (q.CollectItems.Count == 0)
                    q.CollectItems = null;
                else
                    q.CollectItemsSpecified = true;

                q.combine_skillpoint = quest.combine_skillpoint;
                if (q.combine_skillpoint > 0)
                    q.combine_skillpointSpecified = true;

                if (quest.combineskill != CombineSkillType.any) {
                    q.combineskill = (int)quest.combineskill;
                    q.combineskillSpecified = true;
                }

                var questConds = GetConditions(quest, "finished_quest_cond");
                if (questConds.Count > 0) {
                    if (q.start_conditions == null) q.start_conditions = new QuestStartCondition();
                    q.start_conditions.finishedQuestSteps = new List<QuestStep>();
                    for (int i = 0; i < questConds.Count; i++) {
                        q.start_conditions.finishedQuestSteps.Add(questConds[i].questSteps[0]);
                    }
                }
                questConds = GetConditions(quest, "unfinished_quest_cond");
                if (questConds.Count > 0) {
                    if (q.start_conditions == null) q.start_conditions = new QuestStartCondition();
                    q.start_conditions.unfinishedQuestSteps = new List<QuestStep>();
                    for (int i = 0; i < questConds.Count; i++) {
                        q.start_conditions.unfinishedQuestSteps.Add(questConds[i].questSteps[0]);
                    }
                }
                questConds = GetConditions(quest, "acquired_quest_cond");
                if (questConds.Count > 0) {
                    if (q.start_conditions == null) q.start_conditions = new QuestStartCondition();
                    q.start_conditions.acquiredQuestSteps = new List<QuestStep>();
                    for (int i = 0; i < questConds.Count; i++) {
                        q.start_conditions.acquiredQuestSteps.Add(questConds[i].questSteps[0]);
                    }
                }
                questConds = GetConditions(quest, "noacquired_quest_cond");
                if (questConds.Count > 0) {
                    if (q.start_conditions == null) q.start_conditions = new QuestStartCondition();
                    q.start_conditions.notAcquiredQuestSteps = new List<QuestStep>();
                    for (int i = 0; i < questConds.Count; i++) {
                        q.start_conditions.notAcquiredQuestSteps.Add(questConds[i].questSteps[0]);
                    }
                }
                questConds = GetConditions(quest, "equiped_item_name");
                if (questConds.Count > 0) {
                    if (q.start_conditions == null) q.start_conditions = new QuestStartCondition();
                    q.start_conditions.equippedQuestSteps = new List<QuestStep>();
                    for (int i = 0; i < questConds.Count; i++) {
                        q.start_conditions.equippedQuestSteps.Add(questConds[i].questSteps[0]);
                    }
                }

                q.use_class_reward = quest.use_class_reward == 1 ? true : false;

                var rewards = new List<Rewards>();

                utility.Export(quest, "reward_exp", rewards);
                utility.Export(quest, "reward_gold", rewards);
                utility.Export(quest, "reward_score", rewards);
                utility.Export(quest, "reward_abyss_point", rewards);
                utility.Export(quest, "reward_title", rewards);
                utility.Export(quest, "reward_extend_inventory", rewards);
                utility.Export(quest, "reward_extend_stigma", rewards);
                utility.Export(quest, "reward_item", rewards);
                utility.Export(quest, "selectable_reward_item", rewards);

                rewards = rewards.Where(r => r.BasicRewards != null || r.SelectableRewards != null ||
                                             r.exp > 0 || r.gold > 0 || r.reward_abyss_point > 0 ||
                                             r.title > 0).ToList();
                if (rewards.Count > 0)
                    q.Rewards = rewards;

                Rewards extRewards = null;

                if (quest.reward_gold_ext != 0) {
                    extRewards = new Rewards();
                    extRewards.gold = quest.reward_gold_ext;
                    extRewards.goldSpecified = true;
                }

                if (quest.reward_score_ext != 0)
                {
                    extRewards = new Rewards();
                    extRewards.score = quest.reward_score_ext;
                }

                if (quest.reward_title_ext != null) {
                    int titleId = Utility.TitleIndex[quest.reward_title_ext];
                    if (titleId > 0) {
                        if (extRewards == null)
                            extRewards = new Rewards();
                        extRewards.title = titleId;
                    }
                }

                rewards = new List<Rewards>();
                utility.Export(quest, "reward_item_ext_", rewards);
                rewards = rewards.Where(r => r.BasicRewards != null).ToList();
                if (rewards.Count > 0) {
                    var items = rewards.SelectMany(r => r.BasicRewards);
                    if (extRewards == null)
                        extRewards = new Rewards();
                    extRewards.BasicRewards = new List<QuestItemsOur>();
                    extRewards.BasicRewards.AddRange(items);
                }

                rewards = new List<Rewards>();
                utility.Export(quest, "selectable_reward_item_ext_", rewards);
                rewards = rewards.Where(r => r.SelectableRewards != null).ToList();
                if (rewards.Count > 0) {
                    var items = rewards.SelectMany(r => r.SelectableRewards);
                    if (extRewards == null)
                        extRewards = new Rewards();
                    extRewards.SelectableRewards = new List<QuestItemsOur>();
                    extRewards.SelectableRewards.AddRange(items);
                }

                if (extRewards != null)
                    q.ExtRewards = new List<Rewards>() { extRewards };

                // Lets Add Item Bonuses
                var bonuses = new List<Rewards>();
                utility.Export(quest, "reward_item", bonuses);
                bonuses = rewards.Where(r => r.BonusRewards != null).ToList();
                if (bonuses.Count > 0) {
                    foreach (var bonus in bonuses[0].BonusRewards) {
                        if (bonus.name.Contains("Quest_L_matter_option") || bonus.name.Contains("Quest_D_matter_option")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[4].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "MANASTONE"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_L_medicine") || bonus.name.Contains("Quest_D_medicine")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "MEDICINE"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_D_food") || bonus.name.Contains("Quest_D_food")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "FOOD"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_D_fortress") || bonus.name.Contains("Quest_D_fortress")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "FORTRESS"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_L_Goods") || bonus.name.Contains("Quest_D_Goods")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "GOODS"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_A_BranchLunarEvent")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "LUNAR"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_L_magical") || bonus.name.Contains("Quest_D_magical")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "MAGICAL"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_D_material")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "MATERIAL"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_L_medal") || bonus.name.Contains("Quest_D_medal")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "MEDAL"; // bonus type

                            string quantity = split[split.Count() - 1];
                            int number;
                            bool result = Int32.TryParse(quantity, out number);
                            if (result) q.bonus.quantity = number;
                        }
                        if (bonus.name.Contains("Quest_L_Christmas") || bonus.name.Contains("Quest_D_Christmas")) {
                            q.bonus = new Bonus();
                            q.bonus.type = "MOVIE"; // bonus type
                        }
                        if (bonus.name.Contains("Quest_L_Recipe")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "RECIPE"; // bonus type
                        }
                        if (bonus.name.Contains("Quest_L_redeem") || bonus.name.Contains("Quest_D_redeem")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "REDEEM"; // bonus type
                        }
                        if (bonus.name.Contains("Quest_L_BranchRiftEvent") || bonus.name.Contains("Quest_D_BranchRiftEvent")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "RIFT"; // bonus type
                        }
                        if (bonus.name.Contains("Quest_L_task") || bonus.name.Contains("Quest_D_task")) {
                            q.bonus.skill = q.combineskill;
                            q.bonus.type = "TASK"; // bonus type
                        }
                        if (bonus.name.Contains("Quest_A_BranchWinterEvent")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "WINTER"; // bonus type
                        }
                        if (bonus.name.Contains("Quest_L_boss") || bonus.name.Contains("Quest_D_boss")) {
                            string[] split = bonus.name.Split('_');
                            q.bonus = new Bonus();
                            q.bonus.level = Int32.Parse(split[3].Substring(0, 2)); // Get Level Part of Random Bonus
                            q.bonus.type = "BOSS"; // bonus type
                        }
                    }
                }

                ourList.Add(q);
                Thread.Sleep(1);
            }

            quest_data fileData = new quest_data();
            fileData.Quests = ourList;

            var settings = new XmlWriterSettings() {
                CheckCharacters = false,
                CloseOutput = false,
                Encoding = new UTF8Encoding(false),
                Indent = true,
                IndentChars = "\t",
            };

            string outputPath = Path.Combine(root, @".\output\");
            if (!Directory.Exists(outputPath))
                Directory.CreateDirectory(outputPath);

            try {
                using (var fs = new FileStream(Path.Combine(outputPath, "quest_data.xml"),
                                               FileMode.Create, FileAccess.Write))
                using (var writer = XmlWriter.Create(fs, settings)) {
                    XmlSerializer ser = new XmlSerializer(typeof(quest_data));
                    ser.Serialize(writer, fileData);
                }
            }
            catch (Exception ex) {
                Debug.Print(ex.ToString());
            }

            Console.Clear();
            Console.WriteLine("Done.");
            Console.ReadKey();
            Environment.Exit(0);
        }
Exemple #32
0
        static void Main(string[] args)
        {
            Utility.WriteExeDetails();
            Console.WriteLine("Loading quests...");
            Utility.LoadQuestFile(root);

            var newStuff = Utility.QuestIndex.QuestList.Where(n => n.nodes.Count > 0)
                                                       .SelectMany(n => n.nodes);
            var distinctNew = newStuff.Select(n => n.Name).Distinct();

            if (distinctNew.Any()) {
                Console.WriteLine("New elements found in XML which were not coded in. Continue?");
                Console.WriteLine("Elements are:");
                foreach (var nodeName in distinctNew)
                    Console.WriteLine("      {0}", nodeName);
                Console.Write("(Y/N): ");
                var input = Console.ReadKey(true);
                if (Char.ToLower(input.KeyChar) == 'n')
                    return;
            }

            Console.WriteLine("Loading strings...");
            Utility.LoadStrings(root);
            Console.WriteLine("Loading NPCs...");
            Utility.LoadClientNpcs(root);
            Console.WriteLine("Loading items...");
            Utility.LoadItems(root);
            Console.WriteLine("Loading titles...");
            Utility.LoadTitles(root);

            Console.Write("Parsing... ");
            int top = Console.CursorTop;
            int left = Console.CursorLeft;

            var utility = Utility<Quest>.Instance;
            List<QuestOur> ourList = new List<QuestOur>();
            foreach (Quest quest in Utility.QuestIndex.QuestList) {
                // not enabled 임시 in korean
                if (quest.Description.body == "Temporary" || quest.Description.body == "임시")
                    continue;

                if (quest.minlevel_permitted != 99 && quest.minlevel_permitted > 55 &&
                    quest.minlevel_permitted != 65)
                    continue;

                QuestOur q = new QuestOur();
                q.id = quest.id;

                Console.SetCursorPosition(left, top);
                Console.Write("Q" + q.id);

                q.max_repeat_count = quest.max_repeat_count;
                q.nameId = (quest.Description.id * 2 + 1);
                if (q.nameId > 0)
                    q.nameIdSpecified = true;

                q.name = quest.Description.body.TrimEnd();
                q.minlevel_permitted = quest.minlevel_permitted;
                if (quest.minlevel_permitted < quest.maxlevel_permitted)
                    q.maxlevel_permitted = quest.maxlevel_permitted;
                q.repeat_day = (int)quest.quest_repeat_cycle;
                q.cannot_giveup = quest.cannot_giveup;
                q.cannot_share = quest.cannot_share;

                string[] classes = quest.class_permitted.ToUpper().Split(' ');
                string classesParse = String.Join(",", classes);
                Class classEnum = (Class)Enum.Parse(typeof(Class), classesParse);
                if ((classEnum & Class.ALL) != Class.ALL) {
                    q.class_permitted = ((ClassOur)classEnum).ToString().Replace(",", String.Empty);
                    q.class_permittedSpecified = true;
                }

                string race = quest.race_permitted.ToLower();
                if (race == "pc_light") {
                    q.race_permitted = Race.ELYOS;
                    q.race_permittedSpecified = true;
                } else if (race == "pc_dark") {
                    q.race_permitted = Race.ASMODIANS;
                    q.race_permittedSpecified = true;
                }

                string gender = quest.gender_permitted.ToLower();
                if (gender != "all") {
                    q.gender_permittedSpecified = true;
                    if (gender == "male")
                        q.gender_permitted = Gender.MALE;
                    else
                        q.gender_permitted = Gender.FEMALE;
                }

                var drops = new List<QuestDrop>();
                utility.Export(quest, "drop_item_", drops);
                drops = drops.Where(d => d.item_id != 0 && d.chance > 0).ToList();
                if (drops.Count > 0) {
                    // check if multiple NCS
                    q.QuestDrops = new List<QuestDrop>();
                    foreach (var drop in drops) {
                        if (drop.npc_id > 0)
                            q.QuestDrops.Add(drop);
                        else {
                            if (drop.npcIds == null /*&& drop.npc_faction != null*/) {
                                // NOT defined in 1.9 but in 2.0 - skip them
                                // q.QuestDrops.Add(drop);
                                continue;
                            }
                            foreach (var npcName in drop.npcIds) {
                                QuestDrop newDrop = (QuestDrop)drop.Clone();
                                int id = Utility.ClientNpcIndex[npcName];
                                if (id != -1) {
                                    newDrop.npc_id = id;
                                    q.QuestDrops.Add(newDrop);
                                }
                            }
                        }
                    }
                }

                q.QuestWorkItems = new List<QuestItemsOur>();
                utility.Export(quest, "quest_work_item", q.QuestWorkItems);
                q.QuestWorkItems = q.QuestWorkItems.Where(d => d.count > 0).ToList();
                if (q.QuestWorkItems.Count == 0)
                    q.QuestWorkItems = null;
                else
                    q.QuestWorkItemsSpecified = true;

                if (quest.assassin_selectable_reward != null) {
                    q.AssassinSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.assassin_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.assassin_selectable_item);
                        if (our != null)
                            q.AssassinSelectableRewards.Add(our);
                    }
                }

                if (quest.chanter_selectable_reward != null) {
                    q.ChanterSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.chanter_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.chanter_selectable_item);
                        if (our != null)
                            q.ChanterSelectableRewards.Add(our);
                    }
                }

                if (quest.elementalist_selectable_reward != null) {
                    q.ElementalistSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.elementalist_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.elementalist_selectable_item);
                        if (our != null)
                            q.ElementalistSelectableRewards.Add(our);
                    }
                }

                if (quest.fighter_selectable_reward != null) {
                    q.FighterSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.fighter_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.fighter_selectable_item);
                        if (our != null)
                            q.FighterSelectableRewards.Add(our);
                    }
                }

                if (quest.knight_selectable_reward != null) {
                    q.KnightSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.knight_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.knight_selectable_item);
                        if (our != null)
                            q.KnightSelectableRewards.Add(our);
                    }
                }

                if (quest.priest_selectable_reward != null) {
                    q.PriestSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.priest_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.priest_selectable_item);
                        if (our != null)
                            q.PriestSelectableRewards.Add(our);
                    }
                }

                if (quest.ranger_selectable_reward != null) {
                    q.RangerSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.ranger_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.ranger_selectable_item);
                        if (our != null)
                            q.RangerSelectableRewards.Add(our);
                    }
                }

                if (quest.wizard_selectable_reward != null) {
                    q.WizardSelectableRewards = new List<QuestItemsOur>();
                    foreach (var r in quest.wizard_selectable_reward) {
                        QuestItemsOur our = GetRewardItem(r.wizard_selectable_item);
                        if (our != null)
                            q.WizardSelectableRewards.Add(our);
                    }
                }

                q.CollectItems = new List<CollectItem>();
                utility.Export(quest, "collect_item", q.CollectItems);
                q.CollectItems = q.CollectItems.Where(d => d.count > 0).ToList();
                if (q.CollectItems.Count == 0)
                    q.CollectItems = null;
                else
                    q.CollectItemsSpecified = true;

                q.combine_skillpoint = quest.combine_skillpoint;
                if (q.combine_skillpoint > 0)
                    q.combine_skillpointSpecified = true;

                if (quest.combineskill != CombineSkillType.any) {
                    q.combineskill = (int)quest.combineskill;
                    q.combineskillSpecified = true;
                }

                var questConds = GetConditions(quest, "finished_quest_cond");
                if (questConds.Count > 0)
                    q.finished_quest_conds = questConds;

                questConds = GetConditions(quest, "unfinished_quest_cond");
                if (questConds.Count > 0)
                    q.unfinished_quest_conds = questConds;

                questConds = GetConditions(quest, "acquired_quest_cond");
                if (questConds.Count > 0)
                    q.acquired_quest_conds = questConds;

                questConds = GetConditions(quest, "noacquired_quest_cond");
                if (questConds.Count > 0)
                    q.noacquired_quest_conds = questConds;

                q.use_class_reward = quest.use_class_reward;

                var rewards = new List<Rewards>();

                utility.Export(quest, "reward_exp", rewards);
                utility.Export(quest, "reward_gold", rewards);
                utility.Export(quest, "reward_abyss_point", rewards);
                utility.Export(quest, "reward_title", rewards);
                utility.Export(quest, "reward_extend_inventory", rewards);
                utility.Export(quest, "reward_extend_stigma", rewards);
                utility.Export(quest, "reward_item", rewards);
                utility.Export(quest, "selectable_reward_item", rewards);

                rewards = rewards.Where(r => r.BasicRewards != null || r.SelectableRewards != null ||
                                             r.exp > 0 || r.gold > 0 || r.reward_abyss_point > 0 ||
                                             r.title > 0).ToList();

                if (rewards.Count > 0)
                    q.Rewards = rewards;

                Rewards extRewards = null;

                if (quest.reward_gold_ext != 0) {
                    extRewards = new Rewards();
                    extRewards.gold = quest.reward_gold_ext;
                    extRewards.goldSpecified = true;
                }

                if (quest.reward_title_ext != null) {
                    int titleId = Utility.TitleIndex[quest.reward_title_ext];
                    if (titleId > 0) {
                        if (extRewards == null)
                            extRewards = new Rewards();
                        extRewards.title = titleId;
                    }
                }

                rewards = new List<Rewards>();
                utility.Export(quest, "reward_item_ext_", rewards);
                rewards = rewards.Where(r => r.BasicRewards != null).ToList();
                if (rewards.Count > 0) {
                    var items = rewards.SelectMany(r => r.BasicRewards);
                    if (extRewards == null)
                        extRewards = new Rewards();
                    extRewards.BasicRewards = new List<QuestItemsOur>();
                    extRewards.BasicRewards.AddRange(items);
                }

                rewards = new List<Rewards>();
                utility.Export(quest, "selectable_reward_item_ext_", rewards);
                rewards = rewards.Where(r => r.SelectableRewards != null).ToList();
                if (rewards.Count > 0) {
                    var items = rewards.SelectMany(r => r.SelectableRewards);
                    if (extRewards == null)
                        extRewards = new Rewards();
                    extRewards.SelectableRewards = new List<QuestItemsOur>();
                    extRewards.SelectableRewards.AddRange(items);
                }

                if (extRewards != null)
                    q.ExtRewards = new List<Rewards>() { extRewards };

                ourList.Add(q);
                Thread.Sleep(1);
            }

            quest_data fileData = new quest_data();
            fileData.Quests = ourList;

            var settings = new XmlWriterSettings()
            {
                CheckCharacters = false,
                CloseOutput = false,
                Encoding = new UTF8Encoding(false),
                Indent = true,
                IndentChars = "\t",
            };

            string outputPath = Path.Combine(root, @".\output\");
            if (!Directory.Exists(outputPath))
                Directory.CreateDirectory(outputPath);

            try {
                using (var fs = new FileStream(Path.Combine(outputPath, "quest_data.xml"),
                                               FileMode.Create, FileAccess.Write))
                using (var writer = XmlWriter.Create(fs, settings)) {
                    XmlSerializer ser = new XmlSerializer(typeof(quest_data));
                    ser.Serialize(writer, fileData);
                }
            } catch (Exception ex) {
                Debug.Print(ex.ToString());
            }

            Console.Clear();
            Console.WriteLine("Done.");
            Console.ReadKey();
            Environment.Exit(0);
        }