viewing paste auto kick pvp if idle kill | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
 
 
-   script  auto_kick_pvp   -1,{
OnInit:
    .map$ = "prontera";
    .npc_name$ = strnpcinfo(0);
    setmapflag .map$,mf_loadevent;
    setmapflag .map$,mf_pvp;
    end;
 
OnPCLoadMapEvent:
    if( strcharinfo(3) == .map$ ){
        deltimer .npc_name$+"::Onaaa";
        deltimer .npc_name$+"::Onbbb";
        addtimer ( 7 * 60000 ),.npc_name$+"::Onaaa";
    }
    end;
    
Onaaa:
    if( strcharinfo(3) == .map$ ){
        addtimer ( 3 * 60000 ),.npc_name$+"::Onbbb";
        dispbottom "last 3 mins to kill or will be kicked out";
    }
    end;
    
Onbbb:
    if( strcharinfo(3) == .map$ ){
        warp "Save", 0,0;
        dispbottom "You have been kick because of failure to kill";
    }
    end;
    
OnPCKillEvent:
    if( strcharinfo(3) == .map$ )
        if ( killedrid != getcharid(3) ){
            deltimer .npc_name$+"::Onaaa";
            deltimer .npc_name$+"::Onbbb";
            addtimer 7000,.npc_name$+"::Onaaa";
        }
    end;
}
Viewed 1167 times, submitted by Emistry.