viewing paste anti-afk | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 
 
-   script  Sample#afk_5min -1,{
    OnInit:
        .npc_name$ = strnpcinfo(0);
        end;
        
    OnCheck:
        if ( checkidle() >= 300 ) {
            mes "You afk for 5 minute.";
            close2;
            atcommand "@kick "+strcharinfo(0);
            end;
        }
    OnPCLoginEvent:
        deltimer .npc_name$+"::OnCheck";
        addtimer 5000,.npc_name$+"::OnCheck";
        end;
}
Viewed 1362 times, submitted by Emistry.