isdead script command (#7434)
* return true if a player is dead else false Thanks to @aleos89 and @Lemongrass3110
This commit is contained in:
parent
a090a0a7ba
commit
c415b51b88
@ -11250,3 +11250,9 @@ Returns fame rank (start from 1 to MAX_FAME_LIST), else 0.
|
|||||||
Note: Only works with classes that use the ranking system.
|
Note: Only works with classes that use the ranking system.
|
||||||
|
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
*isdead({<account id>})
|
||||||
|
|
||||||
|
Returns true if the player is dead else false.
|
||||||
|
|
||||||
|
---------------------------------------
|
||||||
|
@ -26845,6 +26845,17 @@ BUILDIN_FUNC(getfamerank) {
|
|||||||
return SCRIPT_CMD_SUCCESS;
|
return SCRIPT_CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BUILDIN_FUNC(isdead) {
|
||||||
|
struct map_session_data *sd;
|
||||||
|
|
||||||
|
if (!script_mapid2sd(2, sd))
|
||||||
|
return SCRIPT_CMD_FAILURE;
|
||||||
|
|
||||||
|
script_pushint(st, pc_isdead(sd));
|
||||||
|
|
||||||
|
return SCRIPT_CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#include "../custom/script.inc"
|
#include "../custom/script.inc"
|
||||||
|
|
||||||
// declarations that were supposed to be exported from npc_chat.cpp
|
// declarations that were supposed to be exported from npc_chat.cpp
|
||||||
@ -27597,6 +27608,7 @@ struct script_function buildin_func[] = {
|
|||||||
BUILDIN_DEF(addfame, "i?"),
|
BUILDIN_DEF(addfame, "i?"),
|
||||||
BUILDIN_DEF(getfame, "?"),
|
BUILDIN_DEF(getfame, "?"),
|
||||||
BUILDIN_DEF(getfamerank, "?"),
|
BUILDIN_DEF(getfamerank, "?"),
|
||||||
|
BUILDIN_DEF(isdead, "?"),
|
||||||
#include "../custom/script_def.inc"
|
#include "../custom/script_def.inc"
|
||||||
|
|
||||||
{NULL,NULL,NULL},
|
{NULL,NULL,NULL},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user