summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <notind@gmail.com>2013-02-10 19:48:17 -0800
committershennetsind <notind@gmail.com>2013-02-10 19:48:17 -0800
commitdff5f3f362f09dbeb8d60b19a4d53d34ca1f8087 (patch)
tree6c3aa9dfa71e3c4e464fc86f611c40088bf8edd3 /src
parent7a8857cbf73d589ded8ef7bcf000063ad0ef1432 (diff)
parent56a20bb18d6fde61bb82cf160a131eb54d464148 (diff)
downloadhercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.tar.gz
hercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.tar.bz2
hercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.tar.xz
hercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.zip
Merge pull request #9 from Mysteries/master
Fixed a few Typos and merged rAthena changes
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a6d588113..b89121ee4 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14968,6 +14968,23 @@ BUILDIN_FUNC(checkchatting) // check chatting [Marka]
return 0;
}
+BUILDIN_FUNC(checkidle)
+{
+ TBL_PC *sd = NULL;
+
+ if (script_hasdata(st, 2))
+ sd = map_nick2sd(script_getstr(st, 2));
+ else
+ sd = script_rid2sd(st);
+
+ if (sd)
+ script_pushint(st, DIFF_TICK(last_tick, sd->idletime));
+ else
+ script_pushint(st, 0);
+
+ return 0;
+}
+
BUILDIN_FUNC(searchitem)
{
struct script_data* data = script_getdata(st, 2);
@@ -17689,6 +17706,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(roclass,"i?"), //[Skotlex]
BUILDIN_DEF(checkvending,"?"),
BUILDIN_DEF(checkchatting,"?"),
+ BUILDIN_DEF(checkidle,"?"),
BUILDIN_DEF(openmail,""),
BUILDIN_DEF(openauction,""),
BUILDIN_DEF(checkcell,"siii"),