summaryrefslogtreecommitdiff
path: root/npc/018-6-0/main.txt
blob: 53c544ec9d925c6ffb451f8b2aa1aa68dab5589a (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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
// TMW2 Scripts
// Author:
//    Jesusalva
// Description:
//    Controls Forgotten Chamber

// Main Controller for Instanced maps
018-6-2,0,0,0	script	#01862_InstCtrl	NPC_HIDDEN,{
    end;

// Map, x, y, width, height, mob, amount
function AreaMonsterB {
    .@m$=getarg(0);
    .@x1=getarg(1);
    .@x2=.@x1+getarg(3);
    .@y1=getarg(2);
    .@y2=.@y1+getarg(4);
    .@mi=getarg(5);
    .@am=getarg(6);
    areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mi), .@mi, .@am);
    //, instance_npcname(.name$)+"::OnKill"+.@mi);
    return;
}

// Level 40~50 (60 mobs)
OnLevel1:
    killmonsterall(getmap());
    AreaMonsterB(getmap(), 50, 20, 100, 140, Snake, 10);
    AreaMonsterB(getmap(), 50, 20, 100, 140, BlackSlime, 15);
    AreaMonsterB(getmap(), 50, 20, 100, 140, AlphaMouboo, 5);
    AreaMonsterB(getmap(), 50, 20, 100, 140, Wolvern, 5);
    AreaMonsterB(getmap(), 50, 20, 100, 140, DarkLizard, 15);
    AreaMonsterB(getmap(), 50, 20, 100, 140, BlackScorpion, 10);
    end;

// Level 50~60 (55 mobs)
OnLevel2:
    killmonsterall(getmap());
    AreaMonsterB(getmap(), 50, 20, 100, 140, BlackScorpion, 15);
    AreaMonsterB(getmap(), 50, 20, 100, 140, DustRifle, 5);
    AreaMonsterB(getmap(), 50, 20, 100, 140, MountainSnake, 10);
    AreaMonsterB(getmap(), 50, 20, 100, 140, HoodedNinja, 10);
    AreaMonsterB(getmap(), 50, 20, 100, 140, FallenGuard2, 15);
    end;

// Level 60~70 (50 mobs) + 10 passive
OnLevel3:
    killmonsterall(getmap());
    AreaMonsterB(getmap(), 50, 20, 100, 140, FallenGuard2, 10);
    AreaMonsterB(getmap(), 50, 20, 100, 140, WickedMushroom, 20);
    AreaMonsterB(getmap(), 50, 20, 100, 140, Archant, 20);
    AreaMonsterB(getmap(), 50, 20, 100, 140, Crafty, 10);
    end;

// Level 60~100 (37 mobs)
OnLevel4:
    killmonsterall(getmap());
    AreaMonsterB(getmap(), 50, 20, 100, 140, Archant, 5);
    AreaMonsterB(getmap(), 50, 20, 100, 140, Forain, 15);
    AreaMonsterB(getmap(), 50, 20, 100, 140, GreenDragon, 7);
    AreaMonsterB(getmap(), 50, 20, 100, 140, Terranite, 5);
    AreaMonsterB(getmap(), 50, 20, 100, 140, GoboBear, 5);
    end;
}

/////////////////////////////
018-6-0,90,67,0	script	#ToForgottenShrine	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q < 2 || (.@q2 == 2 && .@q3 != 7))
        Exception("ERROR, YOU SHOULD NOT BEEN SEEING THIS. 018-6-1.TFC.INVALID", RB_DEFAULT|RB_ISFATAL);
    // Make the speech
    if (.@q == 2) {
        setq1 LoFQuest_Barbara, 3;
        setq3 LoFQuest_Barbara, 0;
    }

    // Execute the warp (randomly)
    if (any(true,false))
        warp BarbaraInstCheck(3), 31, 151;
    else
        warp BarbaraInstCheck(3), 145, 26;
    end;


OnInit:
    disablenpc .name$;
    end;
OnInstanceInit:
    disablenpc instance_npcname(.name$);
    end;
}

/////////////////////////////
018-6-0,90,90,0	script	#FromEleniumMines	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It should bring me back.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    if (.@q < 10) {
        warp BarbaraInstCheck(1), 83, 28;
        //warp BarbaraInstCheck(0), 90+any(-1, 1), 90+any(-1,1);
    } else {
        warp "018-6-1", 83, 28;
    }
    .alwaysVisible=true;
    end;
}





/////////////////////////////
018-6-0,90,113,0	script	#ToSouthHall	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q == 2 && .@q3 == 3) {
        addtimer(100, "#01862_InstCtrl::OnLevel3");
        enablenpc instance_npcname("#FromWestHall", .@q2);
        enablenpc instance_npcname("#FromEastHall", .@q2);
        warp BarbaraInstCheck(2), 90, 32;
        //warp BarbaraInstCheck(0), 90+any(-1, 1), 90+any(-1,1);
    } else {
        dispbottom l("I already visited this warp.");
    }
    end;


OnInit:
    disablenpc .name$;
    end;
OnInstanceInit:
    disablenpc instance_npcname(.name$);
    end;
}

/////////////////////////////
018-6-0,67,90,0	script	#ToWestHall	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q != 2) {
        dispbottom l("I already visited this warp.");
        end;
    }

    // Check if quest must begin
    if (!(.@q3 & 1)) {
        // Monster control
        if (.@q3 & 2)
            addtimer(100, "#01862_InstCtrl::OnLevel2");
        else
            addtimer(100, "#01862_InstCtrl::OnLevel1");
        // Mark the quest in progress as WEST HALL, and warp
        setq3 LoFQuest_Barbara, .@q3|64;
        enablenpc instance_npcname("#FromSouthHall", .@q2);
        warp BarbaraInstCheck(2), 70, 150;
    } else {
        dispbottom l("I already visited this warp.");
    }
    end;


OnInit:
    .alwaysVisible=true;
    disablenpc .name$;
    end;
}


/////////////////////////////
018-6-0,113,90,0	script	#ToEastHall	NPC_SUMMONING_CIRC,0,0,{
    dispbottom l("It looks dangerous.");
    end;

OnTouch:
    .@q=getq(LoFQuest_Barbara);
    .@q2=getq2(LoFQuest_Barbara);
    .@q3=getq3(LoFQuest_Barbara);
    if (.@q != 2) {
        dispbottom l("I already visited this warp.");
        end;
    }

    // Check if quest must begin
    if (!(.@q3 & 2)) {
        // Monster control
        if (.@q3 & 1)
            addtimer(100, "#01862_InstCtrl::OnLevel2");
        else
            addtimer(100, "#01862_InstCtrl::OnLevel1");
        // Mark the quest in progress as EAST HALL, and warp
        setq3 LoFQuest_Barbara, .@q3|128;
        enablenpc instance_npcname("#FromSouthHall", .@q2);
        warp BarbaraInstCheck(2), 103, 156;
    } else {
        dispbottom l("I already visited this warp.");
    }
    end;


OnInit:
    .alwaysVisible=true;
    disablenpc .name$;
    end;
}