summaryrefslogtreecommitdiff
path: root/world/map/npc/019-1/mobmanager.txt
blob: ef9e0c739fbb3ff35e0e3788a8231004ea8ad38d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Spawns mobs

019-1.gat,0,0,0|script|SpawnManager|-1,{
    end; // just to be secure

onInit:
    set $@019_1_SANTASLIME_MONSTER_MAX_NUMBER,15;
    set $@019_1_SANTASLIME_MOMSTER_ID,1015;
    set $@019_1_SANTASLIME_MONSTER_SPAWN_X1,32;
    set $@019_1_SANTASLIME_MONSTER_SPAWN_Y1,31;
    set $@019_1_SANTASLIME_MONSTER_SPAWN_X2,111;
    set $@019_1_SANTASLIME_MONSTER_SPAWN_Y2,101;
    set $@019_1_SANTASLIME_month,gettime(6);
    set $@019_1_SANTASLIME_monster_number,0;
    if (debug >= 2) end;
    initnpctimer;
    if ($@019_1_SANTASLIME_month == 12 || $@019_1_SANTASLIME_month == 1 || $@019_1_SANTASLIME_month == 2) goto L_Init_Spawn;
    end;

L_Init_Spawn:
    areamonster "019-1.gat", $@019_1_SANTASLIME_MONSTER_SPAWN_X1, $@019_1_SANTASLIME_MONSTER_SPAWN_Y1, $@019_1_SANTASLIME_MONSTER_SPAWN_X2, $@019_1_SANTASLIME_MONSTER_SPAWN_Y2, "Santa Slime", $@019_1_SANTASLIME_MOMSTER_ID, $@019_1_SANTASLIME_MONSTER_MAX_NUMBER, "SpawnManager::OnMonsterDeath";
    set $@monster_number,$@019_1_SANTASLIME_MONSTER_MAX_NUMBER;
    end;

L_Spawn:
    areamonster "019-1.gat", $@019_1_SANTASLIME_MONSTER_SPAWN_X1, $@019_1_SANTASLIME_MONSTER_SPAWN_Y1, $@019_1_SANTASLIME_MONSTER_SPAWN_X2, $@019_1_SANTASLIME_MONSTER_SPAWN_Y2, "Santa Slime", $@019_1_SANTASLIME_MOMSTER_ID, 1, "SpawnManager::OnMonsterDeath";
    set $@019_1_SANTASLIME_monster_number,$@019_1_SANTASLIME_monster_number+1;
    end;

OnTimer20000:
    initnpctimer;
    set $@019_1_SANTASLIME_month,gettime(6);
    if (($@019_1_SANTASLIME_month == 12 || $@019_1_SANTASLIME_month == 1 || $@019_1_SANTASLIME_month == 2) && $@019_1_SANTASLIME_monster_number < $@019_1_SANTASLIME_MONSTER_MAX_NUMBER) goto L_Spawn;
    end;

OnMonsterDeath:
    set $@019_1_SANTASLIME_monster_number,$@019_1_SANTASLIME_monster_number-1;
    end;
}