summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-15 04:34:18 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-15 04:34:18 -0200
commit3d9e3555b5ea1348bbd49d6b530f44723fea1e9e (patch)
tree5486762eeaf3dc07586a21155db26138d81beea9
parent174e690fbb333dac47e01594f653b5361be2e374 (diff)
downloadserverdata-3d9e3555b5ea1348bbd49d6b530f44723fea1e9e.tar.gz
serverdata-3d9e3555b5ea1348bbd49d6b530f44723fea1e9e.tar.bz2
serverdata-3d9e3555b5ea1348bbd49d6b530f44723fea1e9e.tar.xz
serverdata-3d9e3555b5ea1348bbd49d6b530f44723fea1e9e.zip
Christmas Cook is complete
-rw-r--r--npc/019-4-1/cook.txt55
-rw-r--r--npc/commands/event.txt2
2 files changed, 56 insertions, 1 deletions
diff --git a/npc/019-4-1/cook.txt b/npc/019-4-1/cook.txt
index b7a01708f..856f22b0f 100644
--- a/npc/019-4-1/cook.txt
+++ b/npc/019-4-1/cook.txt
@@ -9,8 +9,61 @@
// however, was moved to Chief. Maybe Cook will exchange these for open xmas boxes.
019-4-1,30,29,0 script Christmas Cook NPC_GNOME_B,{
+ if ($EVENT$ != "Christmas")
+ goto L_OutOfSeason;
+ goto L_Main;
+
+L_OutOfSeason:
+ mesn;
+ mesq l("Hmm... I can handle cooking during normal days. Christmas is the problem. I never have enough sweeties by then...");
+ close;
+
+L_Main:
+ mesn;
+ mesq l("Ah... Santa's helpers sure eat a lot. I'm sure gift delivery is hard for them.");
+ next;
mesn;
- mesq l("The xmas cake and canes and gingerbread ranking...");
+ mesq l("Well, you know... Maybe we can strike a deal. I have good relations with the stock manager. I'll give you an event item.");
+ next;
+
+L_Loop:
+ mesc l("@@/10 @@ for 1 @@", countitem(GingerBreadMan), getitemlink(GingerBreadMan),getitemlink(OpenedChristmasBox));
+ mesc l("@@/9 @@ for 1 @@", countitem(XmasCandyCane), getitemlink(XmasCandyCane), getitemlink(OpenedChristmasBox));
+ mesc l("@@/8 @@ for 1 @@", countitem(XmasCake), getitemlink(XmasCake), getitemlink(OpenedChristmasBox));
+ mes "";
+ select
+ l("Uhm, I don't need that."),
+ rif(countitem(GingerBreadMan)>=10, l("Trade the Gingerbread")),
+ rif(countitem(XmasCandyCane)>=9, l("Trade the Xmas Candy Cane")),
+ rif(countitem(XmasCake)>=8, l("Trade the Xmas Cake")),
+ l("Maybe later.");
+ mes "";
+ switch (@menu) {
+ case 2:
+ delitem GingerBreadMan, 10;
+ getexp getiteminfo(GingerBreadMan, ITEMINFO_SELLPRICE)*10, 10;
+ getitem OpenedChristmasBox, 1;
+ mesn;
+ mesq l("Deal. Here you go.");
+ next;
+ goto L_Loop; break;
+ case 3:
+ delitem XmasCandyCane, 9;
+ getexp getiteminfo(XmasCandyCane, ITEMINFO_SELLPRICE)*10, 9;
+ getitem OpenedChristmasBox, 1;
+ mesn;
+ mesq l("Deal. Here you go.");
+ next;
+ goto L_Loop; break;
+ case 4:
+ delitem XmasCake, 8;
+ getexp getiteminfo(XmasCake, ITEMINFO_SELLPRICE)*10, 8;
+ getitem OpenedChristmasBox, 1;
+ mesn;
+ mesq l("Deal. Here you go.");
+ next;
+ goto L_Loop; break;
+ }
close;
OnInit:
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index cda18651d..37bb3c670 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -48,6 +48,8 @@ function script sChristmas {
addmonsterdrop(WhiteSlime, ClosedChristmasBox, 30);
// Change maps for Christmas Season (Specially LoF maps)
+ addmapmask "003-1", MASK_CHRISTMAS;
+ addmapmask "005-1", MASK_CHRISTMAS;
addmapmask "009-1", MASK_CHRISTMAS;
addmapmask "012-1", MASK_CHRISTMAS;
addmapmask "017-2", MASK_CHRISTMAS;