diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-01-08 02:37:23 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-01-08 02:37:23 -0300 |
commit | 516cd42dccb974451e58accdae0c7dcbbf4b3df1 (patch) | |
tree | 0d22ec6d7f33d7375e43035d8e429f5e3bb466e7 /npc/functions/util.txt | |
parent | 35cae09f141d065d4dcb9d38dfac58ede81ce4d0 (diff) | |
download | serverdata-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/util.txt')
-rw-r--r-- | npc/functions/util.txt | 17 |
1 files changed, 17 insertions, 0 deletions
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 { |