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_DEF(checkidle,"?"),