// TMW2 scripts.
// Authors:
// Jesusalva
// Dusty in a Bottle (aka. Dustynator, Dustman, mr. willbelz)
// Description:
// Scripts for 001-10: Snipers, Bottles and Warps
001-10,89,43,0 script #COD_BossRoomCheck NPC_NO_SPRITE,0,0,{
end;
OnTouch:
if (!@COD_CHECKPOINT) {
dispbottom l("Magic Barrier is active. You must give a whole circle on the desert to break it.");
} else {
// warp
dispbottom l("A dangerous boss room, keep your guard up!");
}
end;
}
001-10,132,106,0 script #COD_Checkpoint106 NPC_NO_SPRITE,0,0,{
end;
OnTouch:
@COD_CHECKPOINT=1;
getmapxy(.@m$, .@x, .@y, 0);
slide .@x+2, .@y;
dispbottom l("Checkpoint! Magic Barrier went down!");
end;
}
001-10,132,107,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint107 NPC_NO_SPRITE
001-10,132,108,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint108 NPC_NO_SPRITE
001-10,132,109,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint109 NPC_NO_SPRITE
001-10,132,110,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint110 NPC_NO_SPRITE
001-10,132,111,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint111 NPC_NO_SPRITE
001-10,132,112,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint112 NPC_NO_SPRITE
001-10,132,113,0 duplicate(#COD_Checkpoint106) #COD_Checkpoint113 NPC_NO_SPRITE
001-10,0,0,0 script #CODMASTER NPC_NO_SPRITE,{
end;
function spawner { // (Event, x1, y1, x2, y2, Amount)
.@ev=getarg(0, "#CONDMASTER::OnDeath");
.@x1=getarg(1,0);
.@y1=getarg(2,0);
.@x2=getarg(3,200);
.@y2=getarg(4,150);
.@am=getarg(5,1);
freeloop(true);
for (.@i = 0; .@i < .@am; ++.@i) {
.@monsterId=any(DustRifle, DustGatling, DustRevolver);
areamonster("001-10", .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@monsterId), .@monsterId, 1, .@ev);
}
}
// Death handlers
OnBatDeath:
areamonster("001-10", 0, 0, 200, 150, ("Angry Bat"), AngryBat, 1, "#CODMASTER::OnBatDeath");
end;
OnNDeath:
spawner("#CODMASTER::OnNDeath", 0, 10, 200, 25);
end;
OnSDeath:
spawner("#CODMASTER::OnSDeath", 0, 129, 200, 150);
end;
OnDeath:
spawner("#CODMASTER::OnDeath");
end;
/////////////////////////////////////////////////////////////////////////////////
/// on init block //// on init block //////
/////////////////////////////////////////////////////////////////////////////////
OnInit:
areamonster("001-10", 0, 0, 200, 150, ("Angry Bat"), AngryBat, 10, "#CODMASTER::OnBatDeath");
spawner("#CODMASTER::OnDeath", 0, 0, 200, 150, 15);
spawner("#CODMASTER::OnNDeath", 0, 10, 200, 25, 6);
spawner("#CODMASTER::OnSDeath", 0, 129, 200, 150, 4);
end;
}