From 9eef9e20f6e25833aacdd07610489723d336781a Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Mon, 1 Dec 2014 15:30:11 +0100 Subject: [PATCH] Flex out and add more quest rewards with cash values --- QuickQuest.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/QuickQuest.lua b/QuickQuest.lua index 70a399a..961b0d7 100644 --- a/QuickQuest.lua +++ b/QuickQuest.lua @@ -199,6 +199,11 @@ QuickQuest:Register('QUEST_COMPLETE', function() end end) +local cashRewards = { + [45724] = 1e5, -- Champion's Purse + [64491] = 2e6, -- Royal Reward +} + QuickQuest:Register('QUEST_COMPLETE', function() local choices = GetNumQuestChoices() if(choices > 1) then @@ -208,11 +213,7 @@ QuickQuest:Register('QUEST_COMPLETE', function() local link = GetQuestItemLink('choice', index) if(link) then local _, _, _, _, _, _, _, _, _, _, value = GetItemInfo(link) - - if(string.match(link, 'item:45724:')) then - -- Champion's Purse, contains 10 gold - value = 1e5 - end + value = cashRewards[tonumber(string.match(link, 'item:(%d+):'))] or value if(value > bestValue) then bestValue, bestIndex = value, index -- 1.7.9.5