yeah, updating idle_time var when the character sits/stands, and chat would be great.
Hmmm..
Using this script for testing..
-<TAB>script<TAB>idle_test<TAB>-1,{
OnPCLoginEvent:
@idlecheck = isidle(5);
dispbottom "You are "+(@idlecheck?"idle for "+@idlecheck+" seconds.":"not idle.");
sleep2 5000;
goto OnPCLoginEvent;
end;
}
moving this line would be more accurate
clif.c
@@ -9861,7 +9861,6 @@
}
pc_delinvincibletimer(sd);
- sd->idletime = last_tick;
unit_attack(&sd->bl, target_id, action_type != 0);
break;
case 0x02: // sitdown
@@ -9900,6 +9899,7 @@
clif_standing(&sd->bl);
break;
}
+ sd->idletime = last_tick;
}