NPC Code:
if(strequals(#g,FAQ)){
if(strtofloat(#s(starttime))<1){
setstring starttime,#v(timevar);
}else if((timevar- strtofloat(#s(starttime)))+ strtofloat(#s(server.#atimeontag)) > 60){ setstring server.#atimeontag,#v( strtofloat(#s(server.#atimeontag)) + (timevar- strtofloat(#s(starttime))));
setstring starttime,#v(timevar);
}else{
if(strtofloat(#s(starttime))<0){
setstring server.#atimeontag,#v(strtofloat(#s(server.#atimeo ntag))+(timevar-strtofloat(#s(starttime))));
}
}
SHOULD update the server.[accountname]timeontag string every five minutes, assuming it is indeed 5 seconds per click.
NPC Code:
if(playerenters&&strequals(#g,FAQ Chief)) toweapons FAQ Checker;
if(playerchats&&strequals(#w,FAQ Checker)){
setcharprop #n,#c;
this.clicks=strtofloat(#s(server.#ctimeontag));
this.minutes=(this.clicks/12)%60;
this.hours=(this.clicks/720);
setplayerprop #c,#c: #v(this.hours) : #v(this.minutes) : #v((this.clicks%12)*5);
//setstring server.#ctimeontag,0;
}
Should report the H:M:S assuming 5 seconds per click - otherwise you can redo the math however you like. Uncomment the last line and it'll reset the time since last check; either way you're gonna have to record it, either how much time they put in last time you checked or what the last time you checked was. It'd be rude if you checked it (thereby clearing it), then checked again five minutes later and fired them for not coming on at all!