|
@@ -16712,6 +16712,23 @@ BUILDIN_FUNC(pcstopfollow)
|
|
// <--- [zBuffer] List of player cont commands
|
|
// <--- [zBuffer] List of player cont commands
|
|
// [zBuffer] List of unit control commands --->
|
|
// [zBuffer] List of unit control commands --->
|
|
|
|
|
|
|
|
+/// Checks to see if the unit exists.
|
|
|
|
+///
|
|
|
|
+/// unitexists <unit id>;
|
|
|
|
+BUILDIN_FUNC(unitexists)
|
|
|
|
+{
|
|
|
|
+ struct block_list* bl;
|
|
|
|
+
|
|
|
|
+ bl = map_id2bl(script_getnum(st, 2));
|
|
|
|
+
|
|
|
|
+ if (!bl)
|
|
|
|
+ script_pushint(st, false);
|
|
|
|
+ else
|
|
|
|
+ script_pushint(st, true);
|
|
|
|
+
|
|
|
|
+ return SCRIPT_CMD_SUCCESS;
|
|
|
|
+}
|
|
|
|
+
|
|
/// Gets the type of the given Game ID.
|
|
/// Gets the type of the given Game ID.
|
|
///
|
|
///
|
|
/// getunittype <unit id>;
|
|
/// getunittype <unit id>;
|
|
@@ -21690,6 +21707,7 @@ struct script_function buildin_func[] = {
|
|
BUILDIN_DEF(pcblockmove,"ii"),
|
|
BUILDIN_DEF(pcblockmove,"ii"),
|
|
// <--- [zBuffer] List of player cont commands
|
|
// <--- [zBuffer] List of player cont commands
|
|
// [zBuffer] List of unit control commands --->
|
|
// [zBuffer] List of unit control commands --->
|
|
|
|
+ BUILDIN_DEF(unitexists,"i"),
|
|
BUILDIN_DEF(getunittype,"i"),
|
|
BUILDIN_DEF(getunittype,"i"),
|
|
BUILDIN_DEF(getunitname,"i"),
|
|
BUILDIN_DEF(getunitname,"i"),
|
|
BUILDIN_DEF(setunitname,"is"),
|
|
BUILDIN_DEF(setunitname,"is"),
|