summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-01-08 02:37:23 -0300
committerJesusaves <cpntb1@ymail.com>2021-01-08 02:37:23 -0300
commit516cd42dccb974451e58accdae0c7dcbbf4b3df1 (patch)
tree0d22ec6d7f33d7375e43035d8e429f5e3bb466e7 /npc/functions
parent35cae09f141d065d4dcb9d38dfac58ede81ce4d0 (diff)
downloadserverdata-516cd42dccb974451e58accdae0c7dcbbf4b3df1.tar.gz
serverdata-516cd42dccb974451e58accdae0c7dcbbf4b3df1.tar.bz2
serverdata-516cd42dccb974451e58accdae0c7dcbbf4b3df1.tar.xz
serverdata-516cd42dccb974451e58accdae0c7dcbbf4b3df1.zip
Rewrite some internal functions and structure to be lighter (optmization)
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/clientversion.txt11
-rw-r--r--npc/functions/util.txt17
2 files changed, 28 insertions, 0 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index 2d386a21f..c36a12f3a 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -1064,6 +1064,17 @@ function script clientupdater {
else if (strcharinfo(0) == "Woody")
getitem StrangeCoin, 20;
}
+ // Easter Eggs
+ // qua jul 29 06:52:00 BRT 2020
+ if (UPDATE < 1610083840) {
+ UPDATE=1610083840;
+ .@q=getq(General_EasterEggs);
+ if (.@q) {
+ setq General_EasterEggs, 1, .@q, bitmask_count(.@q);
+ dispbottom l("Easter Egg quest updated. Total found: %02d/06",
+ bitmask_count(.@q));
+ }
+ }
// :// End of Regular Update System
////////////////////////////////////
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 042a9adb6..efd46e75b 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -1089,6 +1089,23 @@ function script NewcomerEXPDROPUP {
return .@BONUS;
}
+// Easter Egg
+// RegEasterEgg(EE_CODE, {CoinsAmount=3})
+function script RegEasterEgg {
+ .@code=getarg(0);
+ .@coin=getarg(1,3);
+ .@q=getq2(General_EasterEggs);
+
+ if (!(.@q & .@code)) {
+ setq1 General_EasterEggs, 1;
+ setq2 General_EasterEggs, .@q|.@code;
+ dispbottom l("For finding an Easter Egg, you got Strange Coins!");
+ getitem StrangeCoin, 2;
+ setq3 General_EasterEggs, bitmask_count(.@q|.@code);
+ }
+ return;
+}
+
// Special function which makes a date as a number
// numdate( - )
function script numdate {