viewing paste Unknown #14125 | 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
06guild_01,50,50,3  script  Inside Event    831,{
function StartHunt;
function EndHunt;
    mes getarraysize($in$);
    mes "Player inside: ";
    for(.@i = 0; .@i < getarraysize($in$); .@i++){
        mes .@i + ". " + $in$[.@i];
    }
    close;
 
    
OnGMStart:
OnClock0000:
OnClock1200:
OnClock1600:
OnClock1800:
OnClock2200:
        set $hstart, 1;
        announce "The Man Hunt Event is going to start!",0;
        sleep2 60000;
        announce "The Event starts in 60 seconds",0;
        sleep2 60000;
        announce "Man Hunt started!!!",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;
    if(.rounds >= 5) EndHunt;
    mapannounce "06guild_01", "Next Round in 10 sec!",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]+"";
            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.";
                stopnpctimer;
                sleep2 500;
                
            }
        }
        if(.rounds >= 5) EndHunt;
        mapannounce "06guild_01", "Next Round in 10 sec!",0;
        sleep2 10000;
        StartHunt;
    }
    end;
        
EndHunt:
    announce "The Hunt is over!",0;
    mapannounce "06guild_01", "All players will be warped to Prontera in 2 seconds.",0;
    mapwarp "06guild_01", "prontera",150,151;
    deletearray $in$, getarraysize($in$);
    set $hstart, 0;
    set .rounds, 0;
    end;
    
OnPCLogOutEvent:
    if(strcharinfo(3) == "06guild_01"){
        if($hstart == 2){
            announce "Quit!!!" + strcharinfo(0),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;
                }
            }
            mapannounce "06guild_01", "A Player left the game. The game is going to Restart!",0;
            set .rounds, .rounds -1;
            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 item_noequip
Viewed 569 times, submitted by Normynator.