// https://rathena.org/board/topic/109412-r-script-for-time-idle-dc-during-woe/
- script Sample -1,{
OnInit:
setarray .map$,
"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
.map_size = getarraysize( .map$ );
.npc_name$ = strnpcinfo(3);
.map_list$ = "#";
for ( .@i = 0; .@i < .map_size; .@i++ ) {
.map_list$ = .map_list$ + .map$[.@i] + "#";
setmapflag .map$[.@i], mf_loadevent;
}
OnAgitStart:
OnAgitEnd:
.agit_check = agitcheck();
end;
OnCheck:
if ( !compare( .map_list$,"#"+strcharinfo(3)+"#" ) || !.agit_check )
end;
else if ( checkidle() > .max_idle_second ) {
atcommand "@kick "+strcharinfo(0);
end;
}
OnPCLoadMapEvent:
if ( compare( .map_list$,"#"+strcharinfo(3)+"#" ) && .agit_check ) {
deltimer .npc_name$+"::OnCheck";
addtimer ( 1 * 60000 ), .npc_name$+"::OnCheck";
}
end;
}
Comments
0 B
|👍
/👎