diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-11-23 09:13:28 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-11-23 09:13:28 -0200 |
commit | 008fcb6bbcd49c99221f22b8aa0f90c215abcc67 (patch) | |
tree | e9a6b01425266503ea8b59fc41d317c7ff5d6aaa /npc | |
parent | 7bd62b8d6bb08668bf32c4bb0fa31e86ad9d7b04 (diff) | |
download | serverdata-008fcb6bbcd49c99221f22b8aa0f90c215abcc67.tar.gz serverdata-008fcb6bbcd49c99221f22b8aa0f90c215abcc67.tar.bz2 serverdata-008fcb6bbcd49c99221f22b8aa0f90c215abcc67.tar.xz serverdata-008fcb6bbcd49c99221f22b8aa0f90c215abcc67.zip |
Upgrade 001-10 scripts
Diffstat (limited to 'npc')
-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; } |