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; donpcevent "Man-Hunt Event::OnEnd"; 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; if(.rounds != 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