From 8875cef958add4b361300c1ba108d8bf1d7995d7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 20 Jan 2022 02:46:20 +0000 Subject: Christmas 2021 Cleanup Contains several other bugfixes and improvements - The Mana World Team's Chairman - Fix Terogan Fight - Poppet's Battle Chamber (inactive) - `@setcells` and `@delcells` - Fix Graveyard Ghosts - Jande skill (inactive) --- npc/functions/ghost.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'npc/functions/ghost.txt') diff --git a/npc/functions/ghost.txt b/npc/functions/ghost.txt index 3e1a9724..4c3b825a 100644 --- a/npc/functions/ghost.txt +++ b/npc/functions/ghost.txt @@ -1,6 +1,6 @@ function script SpawnGhost { if ($GHOSTS_DISABLED) - goto L_Return; + return; if (BaseLevel >= 40 && (getmapname() == "026-1" || @@ -22,15 +22,11 @@ L_Spawn: else if (!(iscollision(getmapname(), .@x + 1, .@y))) set .@x, .@x + 1; // right // else on the player - // FIXME (Is this a valid event label??) - if (@GHOST_MAP$ != "") - killmonster @GHOST_MAP$, "~GH~" + getcharid(0); + // FIXME - verify if ghost GID is still alive, maybe add it an event label + if (@GHOST_GID) + unitkill(@GHOST_GID); - @GHOST_MAP$ = getmapname(); specialeffect(39, SELF, getcharid(3)); - monster getmapname(), .@x, .@y, strcharinfo(0), 1136, 1, "~GH~" + getcharid(0); - return; - -L_Return: + @GHOST_GID = monster(getmapname(), .@x, .@y, strcharinfo(0), LesserGhost, 1); return; } -- cgit v1.2.3-70-g09d2