From e6a0e7eced6288c66c0db8441f290434501cac56 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 15 Dec 2018 19:53:12 -0200 Subject: Christmas Rewards: Done and Over. Only Storage Manager missing. --- npc/019-4-1/chief.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'npc/019-4-1/chief.txt') diff --git a/npc/019-4-1/chief.txt b/npc/019-4-1/chief.txt index e3bd51f5f..299ef1f78 100644 --- a/npc/019-4-1/chief.txt +++ b/npc/019-4-1/chief.txt @@ -65,9 +65,23 @@ L_Reward: .@q2=getq3(SQuest_Christmas); setq SQuest_Christmas, 0, 0, 0; - /* Handle hChristmas Quest Rewards */ - /* Some Merc Boxes, five rares, gift boxes */ - /* Christmas gift boxes contain rares */ + /* Handle Christmas Quest Rewards */ + /* The top 5 gets special rewards! */ + /* #1: White Cat Pet */ + /* #2 - #3: Red Stocking */ + /* #4 - #5: Extra xmas gift */ + /* You get Christmas Gift Box, which contain rares */ + // CattyCat + .@gifts=max(15, log2(gifts/100)); + if (.@q1 > .@gifts) + getitem XmasGift, .@gifts; + .@nb = query_sql("SELECT c.name FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Christmas+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 5", .@name$); + if (strcharinfo(0) == .@name$[0]) + makepet CattyCat; + else if (strcharinfo(0) == .@name$[1] || strcharinfo(0) == .@name$[2]) + getitem RedStocking, 1; + else if (strcharinfo(0) == .@name$[3] || strcharinfo(0) == .@name$[4]) + getitem XmasGift, 1; ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// -- cgit v1.2.3-60-g2f50