summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHello=) <hello@themanaworld.org>2024-12-13 13:51:48 +0300
committerHello=) <hello@themanaworld.org>2024-12-13 13:51:48 +0300
commite32f3d29948bbfdce04c7b23befffd03fd83b0c0 (patch)
tree95441a048a2ed56e151e4c61fed0846290b26dc4
parentb098ecc78d414fe73b9314dfa298df572eb94e31 (diff)
downloadserverdata-e32f3d29948bbfdce04c7b23befffd03fd83b0c0.tar.gz
serverdata-e32f3d29948bbfdce04c7b23befffd03fd83b0c0.tar.bz2
serverdata-e32f3d29948bbfdce04c7b23befffd03fd83b0c0.tar.xz
serverdata-e32f3d29948bbfdce04c7b23befffd03fd83b0c0.zip
Two changes:
1) Add check Luvia witch is not on Illia map (052-2), It its Illia, omit spawns for now to be on safe side. 2) Fix of silly typo causing bug in witch spawns (in fact they were not working at all, parameters sanity check did its part and aborted call).
-rw-r--r--world/map/npc/functions/spawns_on_mobkill.txt22
1 files changed, 11 insertions, 11 deletions
diff --git a/world/map/npc/functions/spawns_on_mobkill.txt b/world/map/npc/functions/spawns_on_mobkill.txt
index 4d8dc81b..a3677601 100644
--- a/world/map/npc/functions/spawns_on_mobkill.txt
+++ b/world/map/npc/functions/spawns_on_mobkill.txt
@@ -8,7 +8,7 @@ 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 == Luvia) goto L_LuvWitchDead;
+ if ((@mobID == Luvia) && (getmap() != "052-2")) goto L_LuvWitchDead; // Skip spawns if its Illia
return;
L_SplitSea:
@@ -26,27 +26,27 @@ L_TorWitchDead:
return;
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));
+ 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;
}
// Spawns mobs around spot, if it can - or stacks mobs on spot if no room for 3x3 area
// This function can be called from any context.
-// Inputs: arg0: map (string), arg1: X, arg2: Y, arg3: mob ID, ard4: amount
+// Inputs: arg0: map (string), arg1: X, arg2: Y, arg3: mob ID, arg4: amount
// Return: nothing, but spawns few things.
function|script|spawn_mobs_around
{
- set .@map$, getarg(0, "");
- set .@mobX, getarg(1, -1);
- set .@mobY, getarg(2, -1);
- set .@mobID, getarg(3, -1);
- set .@mobQTY, getarg(4, -1);
+ set .@map$, getarg(0, ""); // map where to spawn
+ set .@mobX, getarg(1, -1); // X coord
+ set .@mobY, getarg(2, -1); // Y coord
+ set .@mobID, getarg(3, -1); // Mob ID to spawn.
+ 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$)))
- areamonster .@map$, (.@mobX-1), (.@mobY-1), (.@mobX+1), (.@mobY+1), "", .@mobID, .@mobQTY; // Enough room for 3x3
+ if ((.@mobX > 1) && (.@mobY > 1) && (.@mobX < getmapmaxx(.@map$)) && (.@mobY < getmapmaxy(.@map$))) //Enough room for 3x3
+ areamonster .@map$, (.@mobX-1), (.@mobY-1), (.@mobX+1), (.@mobY+1), "", .@mobID, .@mobQTY;
else
monster .@map$, .@mobX, .@mobY, "", .@mobID, .@mobQTY; // 3x3 wouldnt fit -> use spot.
return;