From 008fcb6bbcd49c99221f22b8aa0f90c215abcc67 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 23 Nov 2018 09:13:28 -0200 Subject: Upgrade 001-10 scripts --- maps/re/001-10.mcache | Bin 1477 -> 78 bytes npc/001-10/scripts.txt | 26 ++++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/maps/re/001-10.mcache b/maps/re/001-10.mcache index 1ac4b21cc..6cf1b9ce6 100644 Binary files a/maps/re/001-10.mcache and b/maps/re/001-10.mcache differ 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; } -- cgit v1.2.3-60-g2f50