From 8e2e8fb455462036d17d6bcf227c2ee41cc91f21 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 28 Jan 2020 20:53:24 -0300 Subject: New function: numdate() Running this now should return the following integer: 20200128 --- npc/functions/util.txt | 7 +++++++ 1 file changed, 7 insertions(+) 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$); +} + -- cgit v1.2.3-60-g2f50