If you see anything in this script you know won't work right please let me know.
NPC Code:
// NPC made by Rogue Shadow
if (actionplayeronline){
  if (strtofloat(#s(jail_time))>0){
    if (!strequals(#F,police2.nw))setlevel2 police2.nw,10,20;
    if (!strcontains(#s(this.prisoners),"#a"))addstring this.prisoners,"#a";
  }else
  if (strtofloat(#s(jail_time))<=0){
    removestring this.prisoners,"#a";
  }
}
if (actionserverjail){
  if (strequals(#p(0),jail)){
    with (getplayer(#p(1))){
      setstring jail_time,#p(2);
      setlevel2 police2.nw,10,20;
      if (!strcontains(#s(this.prisoners),"#a"))addstring this.prisoners,"#a";
    }
  }
  else
  if (strequals(#p(0),unjail)){
    with (getplayer(#p(1))){
      setstring jail_time,0;
    }
  }
}
if (playerenters||timeout||created){
  timeout=1;
}
if (timeout){
  for (i=0;i<sarraylen(this.prisoners);i++){
    with (getplayer(#I(this.prisoners,i))){
      if (playeronline){
        if (strtofloat(#s(jail_time))>0){
          setstring jail_time,#v( strtofloat(#s(jail_time)) - 1 );
        }else{
          setlevel2 unstick.graal,30,30;
        }
      }
    }
  }
}