summaryrefslogtreecommitdiff
path: root/npc/020-1/guards.txt
blob: 15d8b2122823a277ca958b52f6e2873577b56c98 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Protect Nivalis

020-1,49,48,0	script	Lieutenant Joshua	NPC_PLAYER,{
    // The Monster King guild have a special menu
    if (strcharinfo(2) == "Monster King") goto L_MKControl;

    if ($NIVALIS_LIBDATE) {
        mesn;
        mesq l("Nivalis was liberated @@ ago.", FuzzyTime($NIVALIS_LIBDATE));
        close;
    } else {
        legiontalk; end;
    }

// Respawn monster from $@SIEGE_TMPMOBS memory
OnRespawn:
    getmapxy(.@m$,.@x,.@y,0);
    siege_spawn(.@m$, any_of($@SIEGE_TMPMOBS), 1, .name$+"::OnRespawn");
    if (rand(10000) <= $coinsrate+($@SIEGE_NIVAL*50))
        makeitem StrangeCoin, 1, .@m$, .@x, .@y;
    end;


L_MKControl:
    mesn;
    mes "Oh noes! You've found the Nivalis control panel!";
    next;
    select
        l("Abort"),
        l("Initiate a siege");
    mes "";
    if (@menu == 2) {
        doevent "Lieutenant Joshua::OnStartSiege";
        closedialog;
    }
    close;


OnMKSiege:
    $@SIEGE_NIVAL=rand(1,10);
OnStartSiege:
    siege_setup("019-2");
    kamibroadcast(col("WARNING! WARNING! Monster Army marching towards Nivalis!!",1));
    siege_cast("019-2", .name$, 0, TP_NIVAL);
    initnpctimer;
    end;

// Timers
OnTimer35000:
    siege_setup("020-1");
    siege_cast("019-2", .name$, $@SIEGE_NIVAL, TP_NIVAL);
    mapannounce("020-1", "##2Message to all Nivalis NPCs: Take shelter!", bc_map);
    disablenpc "Serge";
    disablenpc "Knox The Traveler";
    disablenpc "Camilot";
    disablenpc "Mede";
    disablenpc "Gambler#020-4";
    disablenpc "Gambling Xan";
    disablenpc "Baktar";
    disablenpc "Bracco";
    disablenpc "Agostine";
    end;

OnTimer65000:
    siege_cast("020-1", .name$, 0, TP_NIVAL);
    siege_cast("019-2", .name$, $@SIEGE_NIVAL, TP_NIVAL);
    disablenpc "Ben#NivBanker";
    end;

OnTimer96000:
    siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
    end;

OnTimer180000:
    siege_boss("020-1", $@SIEGE_NIVAL);
    siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
    end;

// At certain moments, the difficulty rises
OnTimer210000:
OnTimer420000:
OnTimer540000:
    $@SIEGE_NIVAL+=1;
// Spawn each 45s after timer 120, difficulty raisers exempt (same for boss)
OnTimer120000:
OnTimer165000:
//Timer 180000: BOSS WAVE
//OnTimer210000: difficulty raiser
OnTimer255000:
OnTimer300000:
OnTimer345000:
OnTimer390000:
//Timer 420000: difficulty raiser
OnTimer435000:
OnTimer480000:
OnTimer525000:
//OnTimer540000: difficulty raiser
OnTimer570000:
    siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
    end;

OnTimer600000:
    mapannounce("020-1", "##1The Monster Army is getting tired of resistance!", bc_map);
    siege_cast("020-1", .name$, $@SIEGE_NIVAL, TP_NIVAL);
    end;

OnTimer660000:
    $@MK_SCENE=MK_NONE;
    $@MK_AGGRO=$@MK_AGGRO/20;
    mapannounce("020-1", "##1The Monster King army is preparing to withdraw!", bc_map);
    end;

OnTimer690000:
    siege_revert("020-1");
    siege_revert("019-2");
    enablenpc("Mana Stone");
    $@SIEGE_NIVAL=0;
    announce(("Nivalis siege is over!"), bc_all);
    enablenpc "Serge";
    enablenpc "Knox The Traveler";
    enablenpc "Camilot";
    enablenpc "Mede";
    enablenpc "Gambler#020-4";
    enablenpc "Gambling Xan";
    enablenpc "Baktar";
    enablenpc "Bracco";
    enablenpc "Agostine";
    enablenpc "Ben#NivBanker";
    stopnpctimer;
    end;

OnInit:
    end;


}