// 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 (70 mobs)
OnLevel1:
killmonsterall(getmap());
AreaMonsterB(getmap(), 50, 20, 100, 140, Snake, 10);
AreaMonsterB(getmap(), 50, 20, 100, 140, BlackSlime, 20);
AreaMonsterB(getmap(), 50, 20, 100, 140, AlphaMouboo, 5);
AreaMonsterB(getmap(), 50, 20, 100, 140, Wolvern, 5);
AreaMonsterB(getmap(), 50, 20, 100, 140, DarkLizard, 20);
AreaMonsterB(getmap(), 50, 20, 100, 140, BlackScorpion, 10);
end;
// Level 50~60 (65 mobs)
OnLevel2:
killmonsterall(getmap());
AreaMonsterB(getmap(), 50, 20, 100, 140, BlackScorpion, 20);
AreaMonsterB(getmap(), 50, 20, 100, 140, DustRifle, 5);
AreaMonsterB(getmap(), 50, 20, 100, 140, MountainSnake, 10);
AreaMonsterB(getmap(), 50, 20, 100, 140, HoodedNinja, 15);
AreaMonsterB(getmap(), 50, 20, 100, 140, FallenGuard2, 15);
end;
// Level 60~70 (60 mobs) + 10 passive
OnLevel3:
killmonsterall(getmap());
AreaMonsterB(getmap(), 50, 20, 100, 140, FallenGuard2, 10);
AreaMonsterB(getmap(), 50, 20, 100, 140, WickedMushroom, 25);
AreaMonsterB(getmap(), 50, 20, 100, 140, Archant, 25);
AreaMonsterB(getmap(), 50, 20, 100, 140, Crafty, 10);
end;
// Level 60~100 (45 mobs)
OnLevel4:
killmonsterall(getmap());
AreaMonsterB(getmap(), 50, 20, 100, 140, Archant, 5);
AreaMonsterB(getmap(), 50, 20, 100, 140, Forain, 20);
AreaMonsterB(getmap(), 50, 20, 100, 140, GreenDragon, 10);
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 || .@q3 != 5)
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;
}
// TODO stop here FIXME
mesc l("@@ You need to wait further releases to continue this quest!", b(l("WARNING:"))), 1;
close;
// Execute the warp
warp BarbaraInstCheck(3), 31, 151;
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;
}
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("#01862_InstCtrl::OnLevel3", 100);
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;
}
// Monster control
if (.@q3 & 2)
addtimer("#01862_InstCtrl::OnLevel2", 100);
else
addtimer("#01862_InstCtrl::OnLevel1", 100);
// Check if quest must begin
if (!(.@q3 & 1)) {
// 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:
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;
}
// Monster control
if (.@q3 & 1)
addtimer("#01862_InstCtrl::OnLevel2", 100);
else
addtimer("#01862_InstCtrl::OnLevel1", 100);
// Check if quest must begin
if (!(.@q3 & 2)) {
// 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:
disablenpc .name$;
end;
}