summaryrefslogtreecommitdiff
path: root/npc/annuals/xmas/mobmanager.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/mobmanager.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/mobmanager.txt')
-rwxr-xr-xnpc/annuals/xmas/mobmanager.txt77
1 files changed, 77 insertions, 0 deletions
diff --git a/npc/annuals/xmas/mobmanager.txt b/npc/annuals/xmas/mobmanager.txt
new file mode 100755
index 00000000..e478e6be
--- /dev/null
+++ b/npc/annuals/xmas/mobmanager.txt
@@ -0,0 +1,77 @@
+
+019-1,0,0,0 script XmasSpawnManager NPC400,{
+ end;
+
+OnCommandSpawnStart:
+ if ($@xmas_spawn_started)
+ goto L_End;
+ $@xmas_spawn_started = 1;
+ goto L_InitSpawn;
+
+L_InitSpawn:
+ initnpctimer;
+ $@xmas_current_count = 0;
+ $@xmas_map_loop = 0;
+ goto L_StartLoop;
+
+L_StartLoop:
+ $@xmas_mob_lck = 1;
+ $@mob_count = mobcount($@xmas_map_spawns$[$@xmas_map_loop], "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally");
+ $@spawn_amount = ($@xmas_mob_counts[$@xmas_map_loop] - ($@mob_count + 1));
+ if ($@spawn_amount)
+ goto L_Spawn;
+ goto L_NextMap;
+
+L_Spawn:
+ areamonster $@xmas_map_spawns$[$@xmas_map_loop], $@xmas_spawn_x1, $@xmas_spawn_y1, $@xmas_spawn_x2, $@xmas_spawn_y2, $@xmas_mob_names$[$@xmas_map_loop], $@xmas_mob_spawns[$@xmas_map_loop], $@spawn_amount, "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally";
+ $@xmas_current_count = ($@xmas_current_count + $@spawn_amount);
+ goto L_NextMap;
+
+L_NextMap:
+ if (($@xmas_map_loop + 1) == getarraysize($@xmas_map_spawns$))
+ goto L_End;
+ $@xmas_map_loop = ($@xmas_map_loop + 1);
+ goto L_StartLoop;
+
+OnCommandTally:
+ $@xmas_map_loop = 0;
+ $@xmas_current_count = ($@xmas_current_count - 1);
+ if (($@xmas_current_count < $@xmas_respawn_count) && !($@xmas_mob_lck))
+ goto L_StartLoop;
+ goto L_End;
+
+OnTimer110000:
+ initnpctimer;
+ goto L_StartLoop;
+
+L_End:
+ $@mob_count = 0;
+ $@spawn_amount = 0;
+ $@xmas_mob_lck = 0;
+ $@xmas_map_loop = 0;
+ end;
+}
+
+019-1,0,0,0 script XmasSpawnCounter#0 NPC400,{
+ end;
+
+OnTally:
+ donpcevent "XmasSpawnManager::OnCommandTally";
+ end;
+}
+
+019-3,0,0,0 script XmasSpawnCounter#1 NPC400,{
+ end;
+
+OnTally:
+ donpcevent "XmasSpawnManager::OnCommandTally";
+ end;
+}
+
+030-3,0,0,0 script XmasSpawnCounter#2 NPC400,{
+ end;
+
+OnTally:
+ donpcevent "XmasSpawnManager::OnCommandTally";
+ end;
+}