summaryrefslogtreecommitdiff
path: root/npc/019-4-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-15 19:06:25 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-15 19:06:25 -0200
commitaf0b861a5e0924258f61c162b17bad741e46f5f6 (patch)
tree1c3fcc25ad1adb3515f782206e425ed563d0796e /npc/019-4-1
parent78ffda4468161a5bb891ee8aff3e1ad0a23cf6c7 (diff)
downloadserverdata-af0b861a5e0924258f61c162b17bad741e46f5f6.tar.gz
serverdata-af0b861a5e0924258f61c162b17bad741e46f5f6.tar.bz2
serverdata-af0b861a5e0924258f61c162b17bad741e46f5f6.tar.xz
serverdata-af0b861a5e0924258f61c162b17bad741e46f5f6.zip
Christmas main quest finished (rewards pending. Storage pending.)
Diffstat (limited to 'npc/019-4-1')
-rw-r--r--npc/019-4-1/chief.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/npc/019-4-1/chief.txt b/npc/019-4-1/chief.txt
index 10c2849a1..41cb40767 100644
--- a/npc/019-4-1/chief.txt
+++ b/npc/019-4-1/chief.txt
@@ -20,6 +20,28 @@
// World-wide collected gifts count.
019-4-1,56,33,0 script Christmas Chief NPC_GNOME_A,{
+ function ScoreXMAS {
+ .@nb = query_sql("SELECT c.name, i.count2 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$, .@value);
+
+ mes "##B"+l("Top 5 - Christmas Box Donation Event")+"##b";
+ mes("1."+.@name$[0]+" ("+.@value[0]+")");
+ mes("2."+.@name$[1]+" ("+.@value[1]+")");
+ mes("3."+.@name$[2]+" ("+.@value[2]+")");
+ mes("4."+.@name$[3]+" ("+.@value[3]+")");
+ mes("5."+.@name$[4]+" ("+.@value[4]+")");
+ next;
+
+ .@nb = query_sql("SELECT c.name, i.count3 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$, .@value);
+
+ mes "##B"+l("Top 5 - Golbarez Seasonal Quest")+"##b";
+ mes("1."+.@name$[0]+" ("+.@value[0]+" GP)");
+ mes("2."+.@name$[1]+" ("+.@value[1]+" GP)");
+ mes("3."+.@name$[2]+" ("+.@value[2]+" GP)");
+ mes("4."+.@name$[3]+" ("+.@value[3]+" GP)");
+ mes("5."+.@name$[4]+" ("+.@value[4]+" GP)");
+ next;
+ }
+
// Last year
if (getq3(SQuest_Christmas) == gettime(GETTIME_YEAR)-1)
goto L_Reward;
@@ -134,6 +156,9 @@ L_Main:
}
next;
}
+ goto L_Loop;
+
+L_Loop:
mesn;
mesq l("Well, if you want to donate @@, you'll be ranked. There's gift for everyone, and rewards for top 5 donors.", getitemlink(ClosedChristmasBox));
mes "";
@@ -142,6 +167,15 @@ L_Main:
l("Scoreboards"),
l("Leave");
mes "";
+ switch (@menu) {
+ case 1:
+ .@am=countitem(ClosedChristmasBox);
+ delitem ClosedChristmasBox, .@am;
+ .@q=getq2(SQuest_Christmas);
+ setq2 SQuest_Christmas, .@q+.@am;
+ break;
+ case 2: ScoreXMAS(); goto L_Loop; break;
+ }
close;