summaryrefslogtreecommitdiff
path: root/npc/annuals/xmas/helpers.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
commitcf18ce071c79ae37e14ea38943e0b1d88da70a7b (patch)
treef9159c9b60b3018300dd22ffba0d797bc5e828e5 /npc/annuals/xmas/helpers.txt
parent8a4bf716002a017de77fe7df301ef8e4aaf00a2e (diff)
downloadserverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.gz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.bz2
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.xz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.zip
Override
Diffstat (limited to 'npc/annuals/xmas/helpers.txt')
-rwxr-xr-xnpc/annuals/xmas/helpers.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/npc/annuals/xmas/helpers.txt b/npc/annuals/xmas/helpers.txt
new file mode 100755
index 00000000..28d5e650
--- /dev/null
+++ b/npc/annuals/xmas/helpers.txt
@@ -0,0 +1,44 @@
+
+function script XmasHelperPoints {
+ @xmas_helper_count = 0;
+ @xmas_helper_loop = 0;
+ if((@xmas_helper_done_state) || !(@xmas_helper_start_state))
+ goto L_Return;
+ goto L_Loop;
+
+L_Loop:
+ if(XMASTIME & $@xmas_helper_list[@xmas_helper_loop])
+ goto L_AddOne;
+ goto L_LoopAgain;
+
+L_AddOne:
+ @xmas_helper_count = (@xmas_helper_count + 1);
+ goto L_LoopAgain;
+
+L_LoopAgain:
+ if((@xmas_helper_loop + 1) == getarraysize($@xmas_helper_list))
+ goto L_HelperTally;
+ @xmas_helper_loop = (@xmas_helper_loop + 1);
+ goto L_Loop;
+
+L_HelperTally:
+ if(@xmas_helper_count == $@xmas_perfect_helpers_count)
+ goto L_PerfectHelpers;
+ if(@xmas_helper_count > $@xmas_required_helpers_count)
+ goto L_SetHelperState;
+ goto L_Return;
+
+L_PerfectHelpers:
+ XMASTIME = XMASTIME | $@xmas_all_helpers_bit;
+ goto L_SetHelperState;
+
+L_SetHelperState:
+ @xmas_state = $@xmas_helpers_done_state;
+ callfunc "XmasSetState";
+ goto L_Return;
+
+L_Return:
+ @xmas_helper_count = 0;
+ @xmas_helper_loop = 0;
+ return;
+}