pastebin - collaborative debugging tool
eathena.kpaste.net RSS


is_sitting() diff
Posted by Anonymous on Fri 18th Nov 2011 23:33
raw | new post

  1. Index: src/map/script.c
  2. ===================================================================
  3. --- src/map/script.c    (revision 14995)
  4. +++ src/map/script.c    (working copy)
  5. @@ -7578,6 +7578,25 @@
  6.         return 0;
  7.  }
  8.  
  9. +/// Checks if the player is sitting
  10. +///
  11. +/// is_sitting() -> <bool>
  12. +BUILDIN_FUNC(is_sitting)
  13. +{
  14. +       TBL_PC* sd;
  15. +
  16. +       sd = script_rid2sd(st);
  17. +       if (sd == NULL)
  18. +               return 0;// no player attached, report source
  19. +
  20. +       if (pc_issit(sd))
  21. +               script_pushint(st, 1);
  22. +       else
  23. +               script_pushint(st, 0);
  24. +
  25. +       return 0;
  26. +}
  27. +
  28.  /// Sets the save point of the player.
  29.  ///
  30.  /// save "<map name>",<x>,<y>
  31. @@ -15062,6 +15081,7 @@
  32.         BUILDIN_DEF(checkfalcon,""),
  33.         BUILDIN_DEF(setriding,"?"),
  34.         BUILDIN_DEF(checkriding,""),
  35. +       BUILDIN_DEF(is_sitting,""),
  36.         BUILDIN_DEF2(savepoint,"save","sii"),
  37.         BUILDIN_DEF(savepoint,"sii"),
  38.         BUILDIN_DEF(gettimetick,"i"),

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at