diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-01-28 20:53:24 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-01-28 20:53:24 -0300 |
commit | 8e2e8fb455462036d17d6bcf227c2ee41cc91f21 (patch) | |
tree | 5d25b4e9c60cee878ff633ef5df4e4a98cf333be /npc/functions | |
parent | 70bded3be5f87da0f864509865bdd74c2131a974 (diff) | |
download | serverdata-8e2e8fb455462036d17d6bcf227c2ee41cc91f21.tar.gz serverdata-8e2e8fb455462036d17d6bcf227c2ee41cc91f21.tar.bz2 serverdata-8e2e8fb455462036d17d6bcf227c2ee41cc91f21.tar.xz serverdata-8e2e8fb455462036d17d6bcf227c2ee41cc91f21.zip |
New function: numdate()
Running this now should return the following integer: 20200128
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/util.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt index b87bc89b1..fa64fcca3 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -934,4 +934,11 @@ function script NewcomerEXPDROPUP { return .@BONUS; } +// Special function which makes a date as a number +// numdate( - ) +function script numdate { + .@strdate$=sprintf("%04d%02d%02d", gettime(GETTIME_YEAR), gettime(GETTIME_MONTH), gettime(GETTIME_DAYOFMONTH)); + return atoi(.@strdate$); +} + |