summaryrefslogtreecommitdiff
path: root/npc/022-1/gift_collector.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-15 04:00:21 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-15 04:00:21 -0200
commit2d53be4b771aec1c91da67897b16d5b5d0b8c230 (patch)
treebe35b19a9045572a8d029066ae9c7d1fa871c8f4 /npc/022-1/gift_collector.txt
parent54710b25d4b858bd7e17dac69ecd583438fc36c4 (diff)
downloadserverdata-2d53be4b771aec1c91da67897b16d5b5d0b8c230.tar.gz
serverdata-2d53be4b771aec1c91da67897b16d5b5d0b8c230.tar.bz2
serverdata-2d53be4b771aec1c91da67897b16d5b5d0b8c230.tar.xz
serverdata-2d53be4b771aec1c91da67897b16d5b5d0b8c230.zip
This is how Christmas 2018 (and all successors) are supposed to go.
Simple, yet elegant.
Diffstat (limited to 'npc/022-1/gift_collector.txt')
-rw-r--r--npc/022-1/gift_collector.txt76
1 files changed, 76 insertions, 0 deletions
diff --git a/npc/022-1/gift_collector.txt b/npc/022-1/gift_collector.txt
new file mode 100644
index 000000000..6ea911979
--- /dev/null
+++ b/npc/022-1/gift_collector.txt
@@ -0,0 +1,76 @@
+// TMW2/LoF scripts.
+// Authors:
+// TMW-LoF Team
+// Jesusalva
+// Description:
+// Part Of Christmas Events
+// SQuest_XmasCollector
+// Status, Delivered Gifts, Current Year
+// Status:
+// 0 - Quest is unknown
+// 1 - Quest is known
+// 2 - Rewards Collected
+
+022-1,65,53,0 script Gift Fanatic NPC_GNOME_C,{
+ // Last year
+ if (getq3(SQuest_XmasCollector) == gettime(GETTIME_YEAR)-1)
+ goto L_Reward;
+ if ($EVENT$ != "Christmas")
+ goto L_OutOfSeason;
+ // Start Event for the first time
+ if (getq3(SQuest_XmasCollector) < gettime(GETTIME_YEAR))
+ setq SQuest_XmasCollector, 1, 0, gettime(GETTIME_YEAR);
+ // Main Loop
+ goto L_Main;
+
+L_OutOfSeason:
+ mesn;
+ mesq l("Hey, collect lots of @@ and give them to me on Christmas! Not now. On Christmas!", getitemlink(PresentBox));
+ close;
+
+// The reward is actually just an extra bonus, there is nothing WOW to see here...
+L_Reward:
+ .@q=getq2(SQuest_XmasCollector);
+ .@q=max(0, .@q-BaseLevel);
+ mesn;
+ mesq l("Hey, huge THANKS for the help! I love gifts! Here's your due reward!");
+ mesc l("Got @@ EXP, @@ JExp and @@ GP for helping out.", .@q*7, .@q, .@q*5);
+ getexp .@q*7, .@q;
+ Zeny=Zeny+(.@q*5);
+ setq SQuest_XmasCollector, 2, 0, 0;
+ close;
+
+L_Main:
+ .@q=getq2(SQuest_XmasCollector);
+ mesn;
+ mesq l("I want @@! I want @@!!", getitemlink(PresentBox), getitemlink(PresentBox));
+ next;
+ .@price=(getiteminfo(PresentBox, ITEMINFO_SELLPRICE)+2;
+ mesn;
+ mesq l("I am willing to pay @@ GP for each you bring me! Do you want to give me ALL your @@?!", .@price, getitemlink(PresentBox));
+ next;
+ select
+ rif(countitem(PresentBox), l("Yes, of course!")),
+ l("Not now...");
+ mes "";
+ if (@menu == 1) {
+ .@qnt=countitem(PresentBox);
+ .@q2+=.@qnt;
+ delitem PresentBox, .@qnt;
+ Zeny=Zeny+.@price*.@qnt;
+ getexp .@qnt*.@price, .@qnt;
+ setq2 SQuest_XmasCollector, .@q2;
+ mesn;
+ mesq l("Many, many thanks! Thus far, you delivered me @@ gift boxes!", .@q2);
+ next;
+ }
+ mesn;
+ mesq l("Come back and give me more gifts!");
+ close;
+
+OnInit:
+ .sex=G_OTHER;
+ .distance=5;
+ end;
+}
+