From 6d696ebe04849537d724877bcdab58b626d7b673 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 23 Nov 2018 09:21:21 -0200 Subject: Wildlife on COD Map --- npc/001-10/scripts.txt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'npc') diff --git a/npc/001-10/scripts.txt b/npc/001-10/scripts.txt index 46909b8a2..ef5042520 100644 --- a/npc/001-10/scripts.txt +++ b/npc/001-10/scripts.txt @@ -37,7 +37,7 @@ OnTouch: 001-10,0,0,0 script #CODMASTER NPC_NO_SPRITE,{ end; - function spawner { // (Event, x1, y1, x2, y2, Amount) + function spawner { // (Event, x1, y1, x2, y2, Amount, modifier) .@ev=getarg(0, "#CONDMASTER::OnDeath"); .@x1=getarg(1,0); .@y1=getarg(2,0); @@ -46,15 +46,18 @@ OnTouch: .@am=getarg(5,1); freeloop(true); for (.@i = 0; .@i < .@am; ++.@i) { - .@monsterId=any(DustRifle, DustGatling, DustRevolver); + if (!getarg(6,0)) + .@monsterId=any(DustRifle, DustGatling, DustRevolver); + else + .@monsterId=any(AngryBat, Snake, AngryBat, DesertBandit, AngryBat, Sarracenus); 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"); +OnWLDeath: + spawner("#CODMASTER::OnWLDeath", 0, 0, 200, 150, 1, 1); end; OnNDeath: @@ -85,8 +88,10 @@ OnDeath: /// on init block //// on init block ////// ///////////////////////////////////////////////////////////////////////////////// OnInit: - areamonster("001-10", 0, 0, 200, 150, ("Angry Bat"), AngryBat, 10, "#CODMASTER::OnBatDeath"); + // Spawn Wildlife + spawner("#CODMASTER::OnWLDeath", 0, 0, 200, 150, 12, 1); + // Spawn other monsters spawner("#CODMASTER::OnDeath", 0, 0, 200, 150, 3); spawner("#CODMASTER::OnNDeath", 0, 10, 200, 25, 5); spawner("#CODMASTER::OnSDeath", 0, 129, 200, 150, 3); -- cgit v1.2.3-60-g2f50