diff options
Diffstat (limited to 'npc/001-10')
-rw-r--r-- | npc/001-10/scripts.txt | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/npc/001-10/scripts.txt b/npc/001-10/scripts.txt index 6805b3fd8..d6a38fe8e 100644 --- a/npc/001-10/scripts.txt +++ b/npc/001-10/scripts.txt @@ -37,6 +37,20 @@ OnTouch: 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: @@ -44,15 +58,15 @@ OnBatDeath: end; OnNDeath: - areamonster("001-10", 0, 10, 200, 25, ("Sniper"), any(DustRifle, DustGatling, DustRevolver), 1, "#CODMASTER::OnNDeath"); + spawner("#CODMASTER::OnNDeath", 0, 10, 200, 25); end; OnSDeath: - areamonster("001-10", 0, 129, 200, 150, ("Sniper"), any(DustRifle, DustGatling, DustRevolver), 1, "#CODMASTER::OnSDeath"); + spawner("#CODMASTER::OnSDeath", 0, 129, 200, 150); end; OnDeath: - areamonster("001-10", 0, 0, 200, 150, ("Sniper"), any(DustRifle, DustGatling, DustRevolver), 1, "#CODMASTER::OnDeath"); + spawner("#CODMASTER::OnDeath"); end; ///////////////////////////////////////////////////////////////////////////////// @@ -61,9 +75,9 @@ OnDeath: OnInit: areamonster("001-10", 0, 0, 200, 150, ("Angry Bat"), AngryBat, 10, "#CODMASTER::OnBatDeath"); - areamonster("001-10", 0, 0, 200, 150, ("Sniper"), any(DustRifle, DustGatling, DustRevolver), 15, "#CODMASTER::OnDeath"); - areamonster("001-10", 0, 10, 200, 25, ("Sniper"), any(DustRifle, DustGatling, DustRevolver), 3, "#CODMASTER::OnNDeath"); - areamonster("001-10", 0, 129, 200, 150, ("Sniper"), any(DustRifle, DustGatling, DustRevolver), 2, "#CODMASTER::OnSDeath"); + 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; } |