viewing paste Unknown #14216 | 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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
06guild_01,50,50,3  script  Man Hunt Gamekeeper 831,{
function StartHunt;
function EndHunt;
    mes getarraysize($in$) +" Player inside: ";
    for(.@i = 0; .@i < getarraysize($in$); .@i++){
        mes (.@i +1) + ". " + $in$[.@i];
    }
    close;
 
    
OnGMStart:
OnClock1300:
        set $hstart, 1;
        announce "It's time for the Man-Hunt Event!",0;
        sleep2 10000;
        announce "Mechanics: A player will be chosen as a target per round and you must kill him!",0;
        announce "If you're able to kill the target, you'll get points. Otherwise, much higher points shall be granted to him! Points can later be redeemed as SPECs.",0;
        announce "Minimum players to start the event is 10. To join, click the Man-Hunt Warden in Prontera now!",0;
        sleep2 60000;
        announce "The Man Event will start in 60 seconds..",0;
        sleep2 60000;
        announce "The Man Hunt Event starts now!",0;
        set $hstart, 2;
        StartHunt;
        end;
 
 
StartHunt:
    if(getmapusers("06guild_01")< .min_player) EndHunt;
    set .target, rand(0,getarraysize($in$)-1);
    //announce .target,0;
    set .rounds, .rounds + 1;
    mapannounce "06guild_01", "[Round " + .rounds + "] Our target is "+$in$[.target]+"!",0;
    atcommand "#killable "+$in$[.target]+"";
    atcommand "#size \""+$in$[.target]+"\" 2";
    initnpctimer;   
    end;
    
OnTimer30000:
    mapannounce "06guild_01", "The Target has survived! The Round has ended!",0 ;
    set #MHPoint, #MHPoint + 3;
    dispbottom "You got +3 Points.";
    atcommand "#killable "+$in$[.target]+"";
    atcommand "#size \""+$in$[.target]+"\" 0";
    atcommand "#item "+$in$[.target]+" 607, 3";
    stopnpctimer;
    setnpctimer 0;
    if(.rounds >= 5) EndHunt;
    mapannounce "06guild_01", "Next Round in 10 seconds..",0;
    sleep2 10000;
    StartHunt;
    end;            
    
 
OnPCDieEvent:
    if( strcharinfo(3) == "06guild_01"){
        if( strcharinfo(0) == $in$[.Target] ){
            atcommand "#killable "+$in$[.Target]+"";
            atcommand "#size \""+$in$[.Target]+"\" 0";
            atcommand "#alive "+$in$[.Target]+"";
            stopnpctimer;
            setnpctimer 0;
            mapannounce "06guild_01", strcharinfo(0)+" was killed",0;
            set #MHPoint, #MHPoint + 1;
            dispbottom "You got +1 Points.";
            if(attachrid(killerrid)) {
                mapannounce "06guild_01", strcharinfo(0)+" got a kill: " + $in$[.Target],0;
                set #MHPoint, #MHPoint + 3;
                dispbottom "You got +3 Points.";
                sleep2 500;
                
            }
        }
        if(.rounds >= 5) EndHunt;
        mapannounce "06guild_01", "Next Round in 10 seconds..",0;
        sleep2 10000;
        StartHunt;
    }
    end;
        
EndHunt:
    announce "The Man Hunt Event is over!",0;
    mapannounce "06guild_01", "All players will be warped to Prontera in 2 seconds. Thanks for participating!",0;
    mapwarp "06guild_01", "prontera",150,151;
    deletearray $in$, getarraysize($in$);
    set $hstart, 0;
    set .rounds, 0;
    donpcevent "Man Hunt Warden::OnEnd";
    end;
    
OnPCLogOutEvent:
    if(strcharinfo(3) == "06guild_01"){
        announce "Oops! "+strcharinfo(0)+" withdrew from the game!",0;
        set .left$, strcharinfo(0);
        warp "SavePoint", 0, 0;
        for(.@i = 0; .@i < getarraysize($in$); .@i++){
            if($in$[.@i] == .left$){
                set $in$[.@i],"";
                deletearray $in$[.@i], 1;
            }
        }
        if($hstart == 2){
            mapannounce "06guild_01", "A Player left the game. The game is going to Restart!",0;
            if(.rounds > 1){
                set .rounds, .rounds -1;
            }
            stopnpctimer;
            setnpctimer 0;
            StartHunt;
        }
    }
    end;
    
OnInit:
    set .rounds, 0;
    set .min_player, 5;
    end;
}
 
06guild_01  mapflag nowarp
06guild_01  mapflag nowarpto
06guild_01  mapflag noteleport
06guild_01  mapflag nosave  SavePoint
06guild_01  mapflag nomemo
06guild_01  mapflag nobranch
06guild_01  mapflag nopenalty
06guild_01  mapflag noicewall
06guild_01  mapflag noreturn
06guild_01  mapflag item_noequip
Viewed 584 times, submitted by Normynator.