From bbfab867c13c87714288258662542c9dc14b628e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 5 Jul 2021 11:33:36 -0300 Subject: Reintroduce the Present Hats as a yearly reward for logging on during TMW birthday. Also, notify players about the occasion. I even added the proper st-nd-rd-th geez. At least "11th~13th" are not a concern. close #58 --- npc/annuals/fathertime.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'npc/annuals') diff --git a/npc/annuals/fathertime.txt b/npc/annuals/fathertime.txt index d33dc4f8..6a92e7dc 100644 --- a/npc/annuals/fathertime.txt +++ b/npc/annuals/fathertime.txt @@ -14,3 +14,19 @@ OnTimer20000: //initnpctimer; end; } + +function script TMWBirthday { + if (gettime(GETTIME_MONTH) != APRIL) return; + if (gettime(GETTIME_DAYOFMONTH) != 11) return; + .@age=gettime(GETTIME_YEAR)-2004; + .@end=(.@age % 10); + .@mo$=(.@end == 1 ? "st" : (.@end == 2 ? "nd" : (.@end == 3 ? "rd" : "th"))); + dispbottom l("It is TMW's %d%s birthday!", .@age, .@mo$); + // Handle gifts + if (#TMWBDAY < .@age) { + #TMWBDAY=.@age; + getitem TMWBirthdayGift, 1; + } + return; +} + -- cgit v1.2.3-60-g2f50