diff options
author | wushin <pasekei@gmail.com> | 2013-12-25 09:08:06 -0600 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2013-12-26 08:27:31 -0600 |
commit | cd71949def7c2c9b86991b92f4462136671757a3 (patch) | |
tree | 1122db272deff33e017afd9011e6c92ffd3eea59 /world/map/npc/annuals/xmas/mobmanager.txt | |
parent | 91498af8d7e3f347ef5bcc3a9b1dc7d91d52fd61 (diff) | |
download | serverdata-cd71949def7c2c9b86991b92f4462136671757a3.tar.gz serverdata-cd71949def7c2c9b86991b92f4462136671757a3.tar.bz2 serverdata-cd71949def7c2c9b86991b92f4462136671757a3.tar.xz serverdata-cd71949def7c2c9b86991b92f4462136671757a3.zip |
Annual Xmas Event
Diffstat (limited to 'world/map/npc/annuals/xmas/mobmanager.txt')
-rw-r--r-- | world/map/npc/annuals/xmas/mobmanager.txt | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/world/map/npc/annuals/xmas/mobmanager.txt b/world/map/npc/annuals/xmas/mobmanager.txt new file mode 100644 index 00000000..2ffa5e15 --- /dev/null +++ b/world/map/npc/annuals/xmas/mobmanager.txt @@ -0,0 +1,99 @@ +// Spawns mobs + +019-1.gat,0,0,0|script|XmasSpawnManager|400, +{ + +OnCommandSpawnStart: + goto L_InitSpawn; + +L_InitSpawn: + initnpctimer; + set $@xmas_current_count, 0; + set $@xmas_map_loop, 0; + goto L_StartLoop; + +L_StartLoop: + set $@xmas_mob_lck, 1; + set $@mob_count, mobcount($@xmas_map_spawns$[$@xmas_map_loop], "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally"); + set $@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"; + set $@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; + set $@xmas_map_loop, ($@xmas_map_loop + 1); + goto L_StartLoop; + +L_DespawnLoop: + killmonster $@xmas_map_spawns$[$@xmas_map_loop], "XmasSpawnCounter#" + $@xmas_map_loop + "::OnTally"; + goto L_NextDespawn; + +L_NextDespawn: + if (($@xmas_map_loop + 1) == getarraysize($@xmas_map_spawns$)) + goto L_SelfDestruct; + set $@xmas_map_loop, ($@xmas_map_loop + 1); + goto L_DespawnLoop; + +L_StopTracking: + set $@xmas_mob_lck, 1; + set $@xmas_map_loop, 0; + goto L_DespawnLoop; + +L_SelfDestruct: + stopnpctimer; + disablenpc "XmasSpawnManager"; + goto L_End; + +OnCommandTally: + set $@xmas_map_loop, 0; + set $@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: + set $@mob_count, 0; + set $@spawn_amount, 0; + set $@xmas_mob_lck, 0; + set $@xmas_map_loop, 0; + end; +} + +019-1.gat,0,0,0|script|XmasSpawnCounter#0|400, +{ +OnTally: + cmdothernpc "XmasSpawnManager", "Tally"; + end; +} + +019-3.gat,0,0,0|script|XmasSpawnCounter#1|400, +{ +OnTally: + cmdothernpc "XmasSpawnManager", "Tally"; + end; +} + +030-1.gat,0,0,0|script|XmasSpawnCounter#2|400, +{ +OnTally: + cmdothernpc "XmasSpawnManager", "Tally"; + end; +} + +030-3.gat,0,0,0|script|XmasSpawnCounter#3|400, +{ +OnTally: + cmdothernpc "XmasSpawnManager", "Tally"; + end; +} |