summaryrefslogtreecommitdiff
path: root/npc/functions/ghost.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-01-20 02:46:20 +0000
committerJesusaves <cpntb1@ymail.com>2022-01-20 02:46:20 +0000
commit8875cef958add4b361300c1ba108d8bf1d7995d7 (patch)
tree96f05618b8dc04bc19778d51482f85c6f4e94865 /npc/functions/ghost.txt
parentc1be7bd1eab5b0c230001c369292abe757a7f32a (diff)
downloadserverdata-8875cef958add4b361300c1ba108d8bf1d7995d7.tar.gz
serverdata-8875cef958add4b361300c1ba108d8bf1d7995d7.tar.bz2
serverdata-8875cef958add4b361300c1ba108d8bf1d7995d7.tar.xz
serverdata-8875cef958add4b361300c1ba108d8bf1d7995d7.zip
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)
Diffstat (limited to 'npc/functions/ghost.txt')
-rw-r--r--npc/functions/ghost.txt14
1 files changed, 5 insertions, 9 deletions
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;
}