// TMW2 Scripts
// Author:
// Jesusalva
// Description:
// Controls Elenium Mines, specially the instances
// Main Controller for Instanced maps
018-6-1,0,0,0 script #01861_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;
}
// (var, value)
function SetIfVoid {
if (!getarg(0))
return getarg(1);
return 0;
}
// Bifs won't respawn
OnKill1226:
OnKill1227:
OnKill1228:
end;
// Others: Wait 30 seconds and respawn
OnKill1178:
.@mi=SetIfVoid(.@mi, 1178);
OnKill1051:
.@mi=SetIfVoid(.@mi, 1051);
OnKill1074:
.@mi=SetIfVoid(.@mi, 1074);
OnKill1123:
.@mi=SetIfVoid(.@mi, 1123);
OnKill1176:
.@mi=SetIfVoid(.@mi, 1176);
OnKill1026:
.@mi=SetIfVoid(.@mi, 1026);
// Common utils
getmapxy(.@m$, .@x, .@y, 0);
sleep(30000);
AreaMonsterB(.@m$, .@x-2, .@y-2, 4, 4, .@mi, 1);
end;
OnInstanceInit:
// Generate map ID
getmapxy(.@m$, .@x, .@y, UNITTYPE_NPC);
// Bif monsters
AreaMonsterB(.@m$, 40, 49, 7, 8, BigEleniumBif, 5);
AreaMonsterB(.@m$, 95, 51, 7, 8, BigEleniumBif, 5);
AreaMonsterB(.@m$, 145, 83, 6, 5, EleniumBif, 5);
AreaMonsterB(.@m$, 62, 86, 6, 5, EleniumBif, 5);
AreaMonsterB(.@m$, 65, 130, 6, 5, EleniumBif, 5);
AreaMonsterB(.@m$, 125, 158, 6, 5, SmallEleniumBif, 4);
AreaMonsterB(.@m$, 129, 183, 6, 5, SmallEleniumBif, 4);
AreaMonsterB(.@m$, 34, 181, 5, 5, SmallEleniumBif, 4);
// Common Monsters
AreaMonsterB(.@m$, 80, 172, 54, 25, BlackSlime, 16);
AreaMonsterB(.@m$, 89, 167, 54, 25, DarkLizard, 8);
AreaMonsterB(.@m$, 96, 103, 56, 29, BlackScorpion, 18);
AreaMonsterB(.@m$, 101, 105, 54, 25, MountainSnake, 10);
AreaMonsterB(.@m$, 70, 45, 44, 25, WickedMushroom, 14);
AreaMonsterB(.@m$, 68, 45, 31, 21, Archant, 7);
end;
}
/////////////////////////////
018-6-1,83,26,0 script #ToForgottenChamber NPC_SUMMONING_CIRC,0,0,{
dispbottom l("It looks dangerous.");
end;
OnTouch:
Exception("TODO");
end;
OnInit:
disablenpc .name$;
end;
}