- Index: src/map/script.c
- ===================================================================
- --- src/map/script.c (revision 14995)
- +++ src/map/script.c (working copy)
- @@ -7578,6 +7578,25 @@
- return 0;
- }
- +/// Checks if the player is sitting
- +///
- +/// is_sitting() -> <bool>
- +BUILDIN_FUNC(is_sitting)
- +{
- + TBL_PC* sd;
- +
- + sd = script_rid2sd(st);
- + if (sd == NULL)
- + return 0;// no player attached, report source
- +
- + if (pc_issit(sd))
- + script_pushint(st, 1);
- + else
- + script_pushint(st, 0);
- +
- + return 0;
- +}
- +
- /// Sets the save point of the player.
- ///
- /// save "<map name>",<x>,<y>
- @@ -15062,6 +15081,7 @@
- BUILDIN_DEF(checkfalcon,""),
- BUILDIN_DEF(setriding,"?"),
- BUILDIN_DEF(checkriding,""),
- + BUILDIN_DEF(is_sitting,""),
- BUILDIN_DEF2(savepoint,"save","sii"),
- BUILDIN_DEF(savepoint,"sii"),
- BUILDIN_DEF(gettimetick,"i"),
is_sitting() diff
Posted by Anonymous on Fri 18th Nov 2011 23:33
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.