summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHello=) <hello@themanaworld.org>2024-12-15 09:50:31 +0300
committerHello=) <hello@themanaworld.org>2024-12-15 09:53:39 +0300
commit37ed4776ef995b9edc9bcec0f9ea08d862431125 (patch)
tree12b55eaebf733cfb8beff19ffb27532b7c3b0e6d
parente32f3d29948bbfdce04c7b23befffd03fd83b0c0 (diff)
downloadserverdata-37ed4776ef995b9edc9bcec0f9ea08d862431125.tar.gz
serverdata-37ed4776ef995b9edc9bcec0f9ea08d862431125.tar.bz2
serverdata-37ed4776ef995b9edc9bcec0f9ea08d862431125.tar.xz
serverdata-37ed4776ef995b9edc9bcec0f9ea08d862431125.zip
1) Add Blanc1 -> Blanc2 spawn.
2) If only 1 mob requested to spawn, spawn on exact spot. Rationale: if its just 1 mob, it likely important, yet areaspawn can spawn fewer mobs than requested if e.g. some collisions are in area. Idea is that if mob can be killed on X,Y its certainly not collision so single important mob better off using use this location.
-rw-r--r--world/map/npc/functions/spawns_on_mobkill.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/world/map/npc/functions/spawns_on_mobkill.txt b/world/map/npc/functions/spawns_on_mobkill.txt
index a3677601..1a1d03e8 100644
--- a/world/map/npc/functions/spawns_on_mobkill.txt
+++ b/world/map/npc/functions/spawns_on_mobkill.txt
@@ -8,8 +8,9 @@ function|script|spawns_on_mobkill
if (@mobID == SeaSlimeMother) goto L_SplitSea;
if (@mobID == GreenSlimeMother) goto L_SplitGreen;
if (@mobID == Tormenta) goto L_TorWitchDead;
+ if (@mobID == Blanc1) goto L_Blanc1Dead;
if ((@mobID == Luvia) && (getmap() != "052-2")) goto L_LuvWitchDead; // Skip spawns if its Illia
- return;
+ return; // Not mob of interest -> do nothing
L_SplitSea:
void call("spawn_mobs_around", getmap(), @mobX, @mobY, AngrySeaSlime, rand(8, 20));
@@ -29,6 +30,10 @@ L_LuvWitchDead:
void call("spawn_mobs_around", getmap(), @mobX, @mobY, VoidBat, rand(6, 10));
void call("spawn_mobs_around", getmap(), @mobX, @mobY, DemonicSpirit, rand(4, 8));
return;
+
+L_Blanc1Dead:
+ void call("spawn_mobs_around", getmap(), @mobX, @mobY, Blanc2, 1);
+ return;
}
// Spawns mobs around spot, if it can - or stacks mobs on spot if no room for 3x3 area
@@ -44,11 +49,13 @@ function|script|spawn_mobs_around
set .@mobQTY, getarg(4, -1); // Amount.
if ((.@map$ == "") || (.@mobX < 1) || (.@mobY < 1) || (.@mobID < 1002) ||
(.@mobX > getmapmaxx(.@map$)) || (.@mobX > getmapmaxy(.@map$)) ||
- (.@mobQTY < 1)) goto L_Abort;
- if ((.@mobX > 1) && (.@mobY > 1) && (.@mobX < getmapmaxx(.@map$)) && (.@mobY < getmapmaxy(.@map$))) //Enough room for 3x3
+ (.@mobQTY < 1)) // Invalid parameters given?
+ goto L_Abort; // Yell and return
+ if ((.@mobX > 1) && (.@mobY > 1) && (.@mobX < getmapmaxx(.@map$)) &&
+ (.@mobY < getmapmaxy(.@map$)) && (.@mobQTY > 1)) //Enough room for 3x3 && "mass" spawn
areamonster .@map$, (.@mobX-1), (.@mobY-1), (.@mobX+1), (.@mobY+1), "", .@mobID, .@mobQTY;
else
- monster .@map$, .@mobX, .@mobY, "", .@mobID, .@mobQTY; // 3x3 wouldnt fit -> use spot.
+ monster .@map$, .@mobX, .@mobY, "", .@mobID, .@mobQTY; // 3x3 wouldnt fit or just 1 mob.
return;
L_Abort: