summaryrefslogtreecommitdiff
path: root/npc/functions/util.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-15 23:42:57 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-15 23:42:57 -0300
commit8ca983615194eebee04581c2a721510d7cbb230a (patch)
treea3294a9fa723345afbfcab54290b5799ce2725f8 /npc/functions/util.txt
parent6c2eb4d10b18a7488c17b6d05b5fb75046eb2267 (diff)
downloadserverdata-8ca983615194eebee04581c2a721510d7cbb230a.tar.gz
serverdata-8ca983615194eebee04581c2a721510d7cbb230a.tar.bz2
serverdata-8ca983615194eebee04581c2a721510d7cbb230a.tar.xz
serverdata-8ca983615194eebee04581c2a721510d7cbb230a.zip
Lufix template
Diffstat (limited to 'npc/functions/util.txt')
-rw-r--r--npc/functions/util.txt25
1 files changed, 12 insertions, 13 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 5ff544f17..c7a9c3c90 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -7,29 +7,28 @@
// Util functions
-// season_direction({day, month})
-// returns the direction that represents our current season (approximation)
-// DOWN: Winter, 21/12
-// DOWNLEFT: Spring, 20/03
-// LEFT: Summer, 21/06
-// UPLEFT: Autumn, 22/09
-
-function script season_direction {
+// season({day, month})
+// SQuest_Summer
+// returns the current season (approximation)
+// WINTER: Winter, 21/12
+// SPRING: Spring, 20/03
+// SUMMER: Summer, 21/06
+// AUTUMN: Autumn, 22/09
+
+function script season {
.@current_month = getarg(0, gettime(GETTIME_MONTH));
- if (.@current_month % 3 == 0)
- {
+ if (.@current_month % 3 == 0) {
.@current_day = getarg(1, gettime(GETTIME_DAYOFMONTH));
- switch (.@current_month)
- {
+ switch (.@current_month) {
case MARCH: .@season_day = 20; break;
case JUNE: .@season_day = 21; break;
case SEPTEMBER: .@season_day = 22; break;
case DECEMBER: .@season_day = 21; break;
default: break;
}
-
+
.@is_after_season_day = .@current_day >= .@season_day ? 0 : -1;
}