Exemplo n.º 1
0
        /// <summary>
        /// Of the given <paramref name="questIds"/>, returns those matched to
        /// the player's success rate for the given PTJ <paramref name="type"/>.
        /// </summary>
        /// <param name="type"></param>
        /// <param name="questIds"></param>
        /// <returns></returns>
        public IEnumerable <int> GetLevelMatchingQuestIds(QuestLevel level, PtjType type, params int[] questIds)
        {
            // Check ids
            if (questIds.Length == 0)
            {
                throw new ArgumentException("Creature.RandomPtj: questIds may not be empty.");
            }

            // Check quest scripts and get a list of available ones
            var questScripts      = questIds.Select(id => ChannelServer.Instance.ScriptManager.QuestScripts.Get(id)).Where(a => a != null);
            var questScriptsCount = questScripts.Count();

            if (questScriptsCount == 0)
            {
                throw new Exception("Creature.RandomPtj: Unable to find any of the given quests.");
            }
            if (questScriptsCount != questIds.Length)
            {
                var missing = questIds.Where(a => !questScripts.Any(b => b.Id == a));
                Log.Warning("Creature.RandomPtj: Some of the given quest ids are unknown (" + string.Join(", ", missing) + ").");
            }

            // Check same level quests
            var sameLevelQuests      = questScripts.Where(a => a.Level == level);
            var sameLevelQuestsCount = sameLevelQuests.Count();

            if (sameLevelQuestsCount == 0)
            {
                // Try to fall back to Basic
                sameLevelQuests      = questScripts.Where(a => a.Level == QuestLevel.Basic);
                sameLevelQuestsCount = sameLevelQuests.Count();

                if (sameLevelQuestsCount == 0)
                {
                    throw new Exception("Creature.RandomPtj: Missing quest for level '" + level + "'.");
                }

                Log.Warning("Creature.RandomPtj: Missing quest for level '" + level + "', using 'Basic' as fallback.");
            }

            return(sameLevelQuests.Select(qscript => qscript.Id));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Sets quest's level (required for PTJ).
 /// </summary>
 /// <param name="level"></param>
 protected void SetLevel(QuestLevel level)
 {
     this.Level = level;
 }
Exemplo n.º 3
0
		/// <summary>
		/// Sets quest's level (required for PTJ).
		/// </summary>
		/// <param name="level"></param>
		protected void SetLevel(QuestLevel level)
		{
			this.Level = level;
		}
Exemplo n.º 4
0
 public void SetQuests(QuestLevel questLevel)
 {
     quests = questLevel.quests;
 }
Exemplo n.º 5
0
	/// <remarks>Rewards are common among all non/extended item delivery PTJs, separately.</remarks>
	private void AddRewards(QuestLevel questLevel)
	{
		if (!IsExtended)
		{
			switch (questLevel)
			{
				case QuestLevel.Basic:
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(200));
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(150));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(100));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(75));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(40));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(30));

					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(65));
					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(260));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(32));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(130));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(13));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(52));

					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(315));
					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(65));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(157));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(32));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(63));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(13));

					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(40027)); // Weeding Hoe

					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(51001, 6)); // HP 10 Potion
					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(25));
					return;

				case QuestLevel.Int:
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(300));
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(250));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(150));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(125));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(60));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(50));

					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(100));
					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(400));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(50));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(200));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(20));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(80));

					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(500));
					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(100));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(250));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(50));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(100));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(20));

					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50021)); // Milk
					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(80));

					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(40027)); // Weeding Hoe
					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(180));
					return;

				case QuestLevel.Adv:
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(400));
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(320));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(200));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(160));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(80));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(64));

					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(140));
					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(515));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(70));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(257));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(28));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(103));

					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(655));
					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(130));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(327));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(65));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(131));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(26));

					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50006, 1)); // Slice of Meat
					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(20));

					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(63016, 1)); // Holy Water of Lymilark
					return;
			}
		}
		else
		{
			switch (questLevel)
			{
				case QuestLevel.Basic: // Copied from basic non-extended reward in the event of fallback.
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(200));
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(150));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(100));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(75));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(40));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(30));

					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(65));
					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(260));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(32));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(130));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(13));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(52));

					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(315));
					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(65));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(157));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(32));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(63));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(13));

					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(40027)); // Weeding Hoe

					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(51001, 6)); // HP 10 Potion
					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(25));
					return;

				case QuestLevel.Int:
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(360));
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(260));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(180));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(130));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(72));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(52));

					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(110));
					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(450));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(55));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(225));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(22));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(90));

					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(575));
					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(100));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(287));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(50));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(115));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(20));

					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50021)); // Milk
					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(135));
					return;

				case QuestLevel.Adv:
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(490));
					AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(390));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(245));
					AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(195));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(98));
					AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(78));

					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(175));
					AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(625));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(87));
					AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(312));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(35));
					AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(125));

					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(800));
					AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(155));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(400));
					AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(77));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(160));
					AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(31));

					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50006, 1)); // Slice of Meat
					AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(157));

					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(63016, 1)); // Holy Water of Lymilark
					AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(154));
					return;
			}
		}

		Log.Warning(
			"GlenisDeliveryPtjBaseScript: Unspecified quest level for derived class {0}. Fell back to {1} basic rewards.",
			this.GetType(),
			IsExtended ? "extended" : "non-extended"
			);
		AddRewards(QuestLevel.Basic); // Repeat method.
	}
Exemplo n.º 6
0
    /// <remarks>Rewards are common among all non/extended item delivery PTJs, separately.</remarks>
    private void AddRewards(QuestLevel questLevel)
    {
        if (!IsExtended)
        {
            switch (questLevel)
            {
            case QuestLevel.Basic:
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(200));
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(150));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(100));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(75));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(40));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(30));

                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(65));
                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(260));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(32));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(130));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(13));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(52));

                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(315));
                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(65));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(157));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(32));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(63));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(13));

                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(40027));                         // Weeding Hoe

                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(51001, 6));                      // HP 10 Potion
                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(25));
                return;

            case QuestLevel.Int:
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(300));
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(250));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(150));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(125));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(60));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(50));

                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(100));
                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(400));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(50));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(200));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(20));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(80));

                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(500));
                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(100));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(250));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(50));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(100));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(20));

                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50021));                         // Milk
                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(80));

                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(40027));                         // Weeding Hoe
                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(180));
                return;

            case QuestLevel.Adv:
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(400));
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(320));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(200));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(160));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(80));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(64));

                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(140));
                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(515));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(70));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(257));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(28));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(103));

                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(655));
                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(130));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(327));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(65));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(131));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(26));

                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50006, 1));                         // Slice of Meat
                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(20));

                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(63016, 1));                         // Holy Water of Lymilark
                return;
            }
        }
        else
        {
            switch (questLevel)
            {
            case QuestLevel.Basic:                     // Copied from basic non-extended reward in the event of fallback.
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(200));
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(150));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(100));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(75));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(40));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(30));

                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(65));
                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(260));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(32));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(130));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(13));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(52));

                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(315));
                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(65));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(157));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(32));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(63));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(13));

                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(40027));                         // Weeding Hoe

                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(51001, 6));                      // HP 10 Potion
                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(25));
                return;

            case QuestLevel.Int:
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(360));
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(260));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(180));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(130));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(72));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(52));

                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(110));
                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(450));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(55));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(225));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(22));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(90));

                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(575));
                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(100));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(287));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(50));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(115));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(20));

                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50021));                         // Milk
                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(135));
                return;

            case QuestLevel.Adv:
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Exp(490));
                AddReward(1, RewardGroupType.Gold, QuestResult.Perfect, Gold(390));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Exp(245));
                AddReward(1, RewardGroupType.Gold, QuestResult.Mid, Gold(195));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Exp(98));
                AddReward(1, RewardGroupType.Gold, QuestResult.Low, Gold(78));

                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Exp(175));
                AddReward(2, RewardGroupType.Gold, QuestResult.Perfect, Gold(625));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Exp(87));
                AddReward(2, RewardGroupType.Gold, QuestResult.Mid, Gold(312));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Exp(35));
                AddReward(2, RewardGroupType.Gold, QuestResult.Low, Gold(125));

                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Exp(800));
                AddReward(3, RewardGroupType.Exp, QuestResult.Perfect, Gold(155));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Exp(400));
                AddReward(3, RewardGroupType.Exp, QuestResult.Mid, Gold(77));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Exp(160));
                AddReward(3, RewardGroupType.Exp, QuestResult.Low, Gold(31));

                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Item(50006, 1));                         // Slice of Meat
                AddReward(4, RewardGroupType.Item, QuestResult.Perfect, Gold(157));

                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Item(63016, 1));                         // Holy Water of Lymilark
                AddReward(5, RewardGroupType.Item, QuestResult.Perfect, Gold(154));
                return;
            }
        }

        Log.Warning(
            "GlenisDeliveryPtjBaseScript: Unspecified quest level for derived class {0}. Fell back to {1} basic rewards.",
            this.GetType(),
            IsExtended ? "extended" : "non-extended"
            );
        AddRewards(QuestLevel.Basic);         // Repeat method.
    }
Exemplo n.º 7
0
 void NextLevel(int level)
 {
     CurrentQuestLevel = InputParameter (level);
     ClearNum = 0;
 }
Exemplo n.º 8
0
    //Lv	Next	Quest	Max	Min
    QuestLevel InputParameter(int num)
    {
        string[] str = LevelStr [num].Split (',');
        QuestLevel ql = new QuestLevel ();

        ql.Level = int.Parse (str [0]);
        ql.NextCount = int.Parse (str [1]);
        ql.QuestTime = int.Parse (str [2]);
        ql.Max = int.Parse (str [3]);
        ql.Min = int.Parse (str [4]);

        return ql;
    }