summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d225052..fcaf9cc 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -736,3 +736,14 @@ BUILDIN(unequipById)
}
return true;
}
+
+BUILDIN(isPcDead)
+{
+ TBL_PC *sd = script->rid2sd(st);
+
+ if (sd == NULL)
+ return false;
+
+ script_pushint(st, pc_isdead(sd) ? 1 : 0);
+ return true;
+}