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
commita7a421842af79b6aff03335401db5bca5f2e5284 (patch)
tree96f05618b8dc04bc19778d51482f85c6f4e94865 /npc/functions/ghost.txt
parentc1be7bd1eab5b0c230001c369292abe757a7f32a (diff)
parent8875cef958add4b361300c1ba108d8bf1d7995d7 (diff)
downloadserverdata-a7a421842af79b6aff03335401db5bca5f2e5284.tar.gz
serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.tar.bz2
serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.tar.xz
serverdata-a7a421842af79b6aff03335401db5bca5f2e5284.zip
Merge branch 'jesusalva/cleanup' into 'master'
Christmas 2021 Cleanup See merge request themanaworld/evolved/serverdata!10
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;
}