Example #1
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            RemoveItem(masterFrederick, QuestPlayer, dustyOldMap);

            if (QuestPlayer.HasAbilityToUseItem(recruitsArms))
            {
                GiveItem(masterFrederick, QuestPlayer, recruitsArms);
            }
            else
            {
                GiveItem(masterFrederick, QuestPlayer, recruitsSleeves);
            }

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 240, true);
            long money = Money.GetMoney(0, 0, 0, 6, Util.Random(50));

            QuestPlayer.AddMoney(money, "You recieve {0} as a reward.");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.UseSlot, new DOLEventHandler(PlayerUseSlot));
            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            RemoveItem(dalikor, QuestPlayer, necklaceOfDoppelganger);

            // Give reward to player here ...
            if (QuestPlayer.HasAbilityToUseItem(recruitsBoots))
            {
                GiveItem(dalikor, QuestPlayer, recruitsBoots);
            }
            else
            {
                GiveItem(dalikor, QuestPlayer, recruitsQuiltedBoots);
            }

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 40, true);
            long money = Money.GetMoney(0, 0, 0, 4, Util.Random(50));

            QuestPlayer.AddMoney(money, "You recieve {0} as a reward.");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.UseSlot, new DOLEventHandler(PlayerUseSlot));
            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
Example #3
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 145, true);
            QuestPlayer.AddMoney(Money.GetMoney(0, 0, 0, 0, 50), "You are awarded 50 copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, 50);
        }
Example #4
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 507, true);
            long money = Money.GetMoney(0, 0, 0, 7, Util.Random(50));

            QuestPlayer.AddMoney(money, "You recieve {0} as a reward.");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, QuestPlayer.ExperienceForNextLevel / 25, true);
            long money = Money.GetMoney(0, 0, 0, 0, QuestPlayer.Level * 10 + 30);

            QuestPlayer.AddMoney(money, "You are awarded " + Money.GetString(money) + "!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
Example #6
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, (long)((QuestPlayer.ExperienceForNextLevel - QuestPlayer.ExperienceForCurrentLevel) / 9.42), true);
            long money = Money.GetMoney(0, 0, 0, 9, 30 + Util.Random(50));

            QuestPlayer.AddMoney(money, "You are awarded 9 silver and some copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, QuestPlayer.Level * 10, true);
            QuestPlayer.AddMoney(Money.GetMoney(0, 0, 0, 0, 35 + QuestPlayer.Level), "You are awarded " + (35 + QuestPlayer.Level) + " copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, 35 + QuestPlayer.Level);

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.UseSlot, new DOLEventHandler(PlayerUseSlot));
            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
Example #8
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            GiveItem(argusBowman, QuestPlayer, dullBlackGem);

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 160, true);
            long money = Money.GetMoney(0, 0, 0, 10, 30 + Util.Random(50));

            QuestPlayer.AddMoney(money, "You are awarded 10 silver and some copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            GiveItem(freagus, QuestPlayer, recruitsCloak);

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 12);
            long money = Money.GetMoney(0, 0, 0, 1, Util.Random(50));

            QuestPlayer.AddMoney(money, LanguageMgr.GetTranslation(QuestPlayer.Client, "Hib.ImportantDelivery.FinishQuest.RecieveReward"));
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
Example #10
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            GiveItem(andrewWyatt, QuestPlayer, chokerOfTheBear);

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 80, true);
            long money = Money.GetMoney(0, 0, 0, 4, Util.Random(50));

            QuestPlayer.AddMoney(money, "You are awarded 4 silver and some copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
Example #11
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 507, true);
            long money = Money.GetMoney(0, 0, 0, 7, Util.Random(50));

            QuestPlayer.AddMoney(money, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.StolenEggs.FinishQuest.Text1"));
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
Example #12
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            GiveItem(ydeniaPhilpott, QuestPlayer, silverRingOfHealth);

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 20 + (QuestPlayer.Level - 1) * 5, true);
            long money = Money.GetMoney(0, 0, 0, 5, Util.Random(50));

            QuestPlayer.AddMoney(money, "You are awarded 5 silver and some copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
        public override void FinishQuest()
        {
            base.FinishQuest();

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 40 + (QuestPlayer.Level - 1) * 4, true);
            long money = Money.GetMoney(0, 0, 0, 7, Util.Random(50));

            QuestPlayer.AddMoney(money, "You are awarded 7 silver and some copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.UseSlot, new DOLEventHandler(PlayerUseSlot));
            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
Example #14
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            GiveItem(godelevaDowden, QuestPlayer, reedBracer);

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 40 + (QuestPlayer.Level - 1) * 4, true);
            long money = Money.GetMoney(0, 0, 0, 7, Util.Random(50));

            QuestPlayer.AddMoney(money, "You are awarded 7 silver and some copper!");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.UseSlot, new DOLEventHandler(PlayerUseSlot));
            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
Example #15
0
        public override void Notify(DOLEvent e, object sender, EventArgs args)
        {
            GamePlayer player = sender as GamePlayer;

            if (player == null || player.IsDoingQuest(typeof(AndrewsSkins)) == null)
            {
                return;
            }

            if (e == GamePlayerEvent.GiveItem)
            {
                if (Step == 1)
                {
                    GiveItemEventArgs gArgs = (GiveItemEventArgs)args;
                    if (gArgs.Target.Name == georNadren.Name && gArgs.Item.Id_nb == bundleOfBearSkins.Id_nb)
                    {
                        RemoveItem(georNadren, QuestPlayer, bundleOfBearSkins);

                        georNadren.TurnTo(QuestPlayer);
                        georNadren.SayTo(QuestPlayer, "Ah!  These must be the skins I've been waiting for from Andrew.  My, my, these are very high quality.  He's a very skilled hunter indeed, with a fine eye for good pelts.  Excellent!  I have but one more [errand] I need for you to run for me.");

                        Step = 2;
                        return;
                    }
                }
                else if (Step == 3)
                {
                    GiveItemEventArgs gArgs = (GiveItemEventArgs)args;
                    if (gArgs.Target.Name == georNadren.Name && gArgs.Item.Id_nb == spoolOfLeatherworkingThread.Id_nb)
                    {
                        RemoveItem(georNadren, QuestPlayer, spoolOfLeatherworkingThread);

                        georNadren.TurnTo(QuestPlayer);
                        georNadren.SayTo(QuestPlayer, "Excellent!  Why, there is enough here to make several suits of armor.  Thank you friend!  Now, I think you need to return to Andrew in Cotswold and let him know I received the skins.  Thank you again, and good journeys to you " + QuestPlayer.Name + ".");

                        QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 40, true);
                        long money = Money.GetMoney(0, 0, 0, 2, Util.Random(50));
                        QuestPlayer.AddMoney(money, "You are awarded 2 silver and some copper!");
                        InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

                        Step = 4;
                        return;
                    }
                }
            }
        }
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            ItemTemplate dye = GameServer.Database.FindObjectByKey <ItemTemplate>("light_" + getRandomDyeColor() + "_cloth_dye");

            if (dye != null)
            {
                GiveItem(arleighPenn, QuestPlayer, dye);
            }

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 2560, true);
            long money = Money.GetMoney(0, 0, 0, 0, 30 + Util.Random(50));

            QuestPlayer.AddMoney(money, "You recieve {0} for your service.");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
Example #17
0
        public override void FinishQuest()
        {
            kealan.SayTo(QuestPlayer, "Great, the bloated spider fang and Arachneida's chitin. You did your job well! Now here, take this as a token of my gratitude.");
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 40050, true);
            long money = Money.GetMoney(0, 0, 0, 22, Util.Random(50));

            QuestPlayer.AddMoney(money, "You recieve {0} for your service.");
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);

            if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Wizard ||
                QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Sorcerer ||
                QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Cabalist ||
                QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Theurgist)
            {
                GiveItem(kealan, QuestPlayer, spiderSilkenRobe);
            }
            else if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Paladin ||
                     QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Armsman ||
                     QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Reaver ||
                     QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Mercenary)
            {
                GiveItem(kealan, QuestPlayer, ringedSpiderChitinTunic);
            }
            else if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Cleric ||
                     QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Scout ||
                     QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Minstrel)
            {
                GiveItem(kealan, QuestPlayer, studdedSpiderEyeVest);
            }
            else if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Friar)
            {
                GiveItem(kealan, QuestPlayer, spiderEmblazonedTunic);
            }
            else if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Infiltrator)
            {
                GiveItem(kealan, QuestPlayer, embossedSpiderTunic);
            }

            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.UseSlot, new DOLEventHandler(PlayerUseSlot));
            GameEventMgr.RemoveHandler(QuestPlayer, GamePlayerEvent.Quit, new DOLEventHandler(PlayerLeftWorld));
        }
Example #18
0
        public override void FinishQuest()
        {
            base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

            // Give reward to player here ...
            if (QuestPlayer.HasAbilityToUseItem(recruitsLegs))
            {
                GiveItem(dalikor, QuestPlayer, recruitsLegs);
            }
            else
            {
                GiveItem(dalikor, QuestPlayer, recruitsPants);
            }

            QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 240, true);
            long money = Money.GetMoney(0, 0, 0, 5, Util.Random(50));

            QuestPlayer.AddMoney(money, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.Frontiers.FinishQuest.Text1"));
            InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", QuestPlayer, eInventoryActionType.Quest, money);
        }
Example #19
0
        /// <summary>
        /// Called when quest is finished, hands out rewards.
        /// </summary>
        public override void FinishQuest()
        {
            int inventorySpaceRequired = Rewards.BasicItems.Count + Rewards.ChosenItems.Count;

            if (QuestPlayer.Inventory.IsSlotsFree(inventorySpaceRequired, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack))
            {
                base.FinishQuest();
                QuestPlayer.Out.SendSoundEffect(11, 0, 0, 0, 0, 0);
                QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, Rewards.Experience);
                QuestPlayer.AddMoney(Rewards.Money);
                InventoryLogging.LogInventoryAction($"(QUEST;{Name})", QuestPlayer, eInventoryActionType.Quest, Rewards.Money);
                if (Rewards.GiveBountyPoints > 0)
                {
                    QuestPlayer.GainBountyPoints(Rewards.GiveBountyPoints);
                }

                if (Rewards.GiveRealmPoints > 0)
                {
                    QuestPlayer.GainRealmPoints(Rewards.GiveRealmPoints);
                }

                foreach (ItemTemplate basicReward in Rewards.BasicItems)
                {
                    GiveItem(QuestPlayer, basicReward);
                }

                foreach (ItemTemplate optionalReward in Rewards.ChosenItems)
                {
                    GiveItem(QuestPlayer, optionalReward);
                }

                QuestPlayer.Out.SendNPCsQuestEffect(QuestGiver, QuestGiver.GetQuestIndicator(QuestPlayer));
            }
            else
            {
                QuestPlayer.Out.SendMessage($"Your inventory is full, you need {inventorySpaceRequired} free slot(s) to complete this quest.", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                Rewards.ChosenItems.Clear();
            }
        }
Example #20
0
        public override void FinishQuest()
        {
            if (QuestPlayer.Inventory.IsSlotsFree(6, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack))
            {
                RemoveItem(Miri, QuestPlayer, sealed_pouch);

                base.FinishQuest(); // Defined in Quest, changes the state, stores in DB etc ...

                if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Shaman)
                {
                    GiveItem(QuestPlayer, ShamanEpicArms);
                    GiveItem(QuestPlayer, ShamanEpicBoots);
                    GiveItem(QuestPlayer, ShamanEpicGloves);
                    GiveItem(QuestPlayer, ShamanEpicHelm);
                    GiveItem(QuestPlayer, ShamanEpicLegs);
                    GiveItem(QuestPlayer, ShamanEpicVest);
                }
                else if (QuestPlayer.CharacterClass.ID == (byte)eCharacterClass.Healer)
                {
                    GiveItem(QuestPlayer, HealerEpicArms);
                    GiveItem(QuestPlayer, HealerEpicBoots);
                    GiveItem(QuestPlayer, HealerEpicGloves);
                    GiveItem(QuestPlayer, HealerEpicHelm);
                    GiveItem(QuestPlayer, HealerEpicLegs);
                    GiveItem(QuestPlayer, HealerEpicVest);
                }

                QuestPlayer.GainExperience(GameLiving.eXPSource.Quest, 1937768448, true);

                // mQuestPlayer.AddMoney(Money.GetMoney(0,0,0,2,Util.Random(50)), "You recieve {0} as a reward.");
            }
            else
            {
                QuestPlayer.Out.SendMessage("You do not have enough free space in your inventory!", eChatType.CT_Important, eChatLoc.CL_SystemWindow);
            }
        }