From b01dfa1ecf8ae4b94502dccb7083180fd6caa9e0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 27 Oct 2019 23:48:20 -0300 Subject: Register Thanksgiving in annuals --- npc/functions/event.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'npc') diff --git a/npc/functions/event.txt b/npc/functions/event.txt index 5bc602cc3..ada71f3dc 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -91,6 +91,11 @@ OnInit: .worker_endday=3; .worker_endmon=MAY; + .thanks_stday=1; + .thanks_stmon=NOVEMBER; + .thanks_endday=30; + .thanks_endmon=NOVEMBER; + .xmas_stday=19; .xmas_stmon=DECEMBER; .xmas_endday=2; @@ -171,6 +176,7 @@ OnClock0000: } } + // Handle Easter if (.@m >=.easter_stmon && .@m <= .easter_endmon) { // It's tomorrow: Send out an announcement @@ -198,6 +204,7 @@ OnClock0000: } } + // Handle Worker Day if (.@m >=.worker_stmon && .@m <= .worker_endmon) { // It's tomorrow: Send out an announcement @@ -226,6 +233,30 @@ OnClock0000: } + // Handle Thanksgiving Day + if (.@m >=.thanks_stmon && .@m <= .thanks_endmon) { + // It's tomorrow: Send out an announcement + if (.@d == .thanks_stday - 1 && .@m == .thanks_stmon) { + kamibroadcast("Thanksgiving will start tomorrow!"); + } + // Last Day: Send out an announcement + if (.@d == .thanks_endday && .@m == .thanks_endmon) { + kamibroadcast("It's the last day for Thanksgiving Event! Hurry up!"); + } + // Begin the event + if (.@d == .thanks_stday && .@m == .thanks_stmon) { + kamibroadcast("Thanksgiving begun!"); + $EVENT$="Thanksgiving"; + } + // End the event the day after + if (.@d == .thanks_endday+1 && .@m == .thanks_endmon) { + kamibroadcast("Thanksgiving ended!"); + sClear(); + $EVENT$=""; + } + } + + // Handle Christmas if (.@m >=.xmas_stmon && .@m <= .xmas_endmon) { // It's tomorrow: Send out an announcement -- cgit v1.2.3-60-g2f50