diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 21:45:04 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 21:45:04 -0600 |
commit | 2bcbee6aee744c0ba8c48f44c0b4ec07547bbaa2 (patch) | |
tree | 35d4b0cabeae53de21a9af13fb1b3e5791609b49 | |
parent | 606ab91698d796d3d6a053e7ce37052a2676cf91 (diff) | |
download | tmwa-2bcbee6aee744c0ba8c48f44c0b4ec07547bbaa2.tar.gz tmwa-2bcbee6aee744c0ba8c48f44c0b4ec07547bbaa2.tar.bz2 tmwa-2bcbee6aee744c0ba8c48f44c0b4ec07547bbaa2.tar.xz tmwa-2bcbee6aee744c0ba8c48f44c0b4ec07547bbaa2.zip |
Add a script function to see if the player is dead
-rw-r--r-- | src/map/script.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 48071d0..d731b3f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -280,6 +280,7 @@ int buildin_getpartnerid(struct script_state *st); // [Fate] int buildin_areatimer(struct script_state *st); // [Jaxad0127] int buildin_isin(struct script_state *st); // [Jaxad0127] int buildin_shop(struct script_state *st); // [MadCamel] +int buildin_isdead(struct script_state *st); // [Jaxad0127] void push_val(struct script_stack *stack,int type,int val); int run_func(struct script_state *st); @@ -481,8 +482,9 @@ struct { {buildin_getlook,"getlook","i"}, {buildin_getsavepoint,"getsavepoint","i"}, {buildin_areatimer,"areatimer","siiiiis"}, - {buildin_isin,"isin","siiii"}, - {buildin_shop,"shop","s"}, // End Additions + {buildin_isin,"isin","siiii"}, + {buildin_shop,"shop","s"}, + {buildin_isdead,"isdead","i"}, // End Additions {NULL,NULL,NULL}, }; int buildin_message(struct script_state *st); // [MouseJstr] @@ -5891,6 +5893,17 @@ int buildin_shop(struct script_state *st) return 0; } +/*========================================== + * Check whether the PC is dead + *------------------------------------------ + */ +int buildin_isdead(struct script_state *st) +{ + struct map_session_data *sd=script_rid2sd(st); + + push_val(st->stack, C_INT, pc_isdead(sd)); +} + // // ŽÀs•”main // |