diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-07-05 11:33:36 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-07-05 11:33:36 -0300 |
commit | bbfab867c13c87714288258662542c9dc14b628e (patch) | |
tree | 03d8db0a4c37e56b55006c8713bba4435a97cfb4 /npc | |
parent | 6dbe10c9fe296f627c49c6d52e9cdfd6f8dd9f2d (diff) | |
download | serverdata-bbfab867c13c87714288258662542c9dc14b628e.tar.gz serverdata-bbfab867c13c87714288258662542c9dc14b628e.tar.bz2 serverdata-bbfab867c13c87714288258662542c9dc14b628e.tar.xz serverdata-bbfab867c13c87714288258662542c9dc14b628e.zip |
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
Diffstat (limited to 'npc')
-rw-r--r-- | npc/annuals/fathertime.txt | 16 | ||||
-rw-r--r-- | npc/functions/global_event_handler.txt | 1 |
2 files changed, 17 insertions, 0 deletions
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; +} + diff --git a/npc/functions/global_event_handler.txt b/npc/functions/global_event_handler.txt index bc8f6742..69972292 100644 --- a/npc/functions/global_event_handler.txt +++ b/npc/functions/global_event_handler.txt @@ -8,6 +8,7 @@ OnPCLoginEvent: //callfunc "fixHeadStyles"; // convert headstyles ClearVariables(); // removes / converts old variables DisplayMOTD(); // send the motd to the client, if enabled + TMWBirthday(); // add more here vaultOnLogin(); @login_event = 2; |