Jump to content
  • 0

Man Hunt Script by EMPERIUM RO


NexusXVI

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

//EMPERIUMRO ORIGINAL SCRIPT! DO NOT CLAIM THAT ITS YOURS! GIVE CREDIT TO THE
//SCRIPTER
// PROBLEM IS I DONT KNOW HIS NAME. BUT CREDITS TO HIM AND TO ME FOR SHARING. LOL!
dicastes01,239,113,3	script	Man-Hunt Event	831,{

	mes "[Man Hunt Event]";
	if(.MStatus)
		{
			mes "Status: ^00ff00ACTIVE!^000000";
			if(getgroupid() >= .GM)
				{
					menu "Join Event",-,"Admin Commands",MHAdmin;
					next;
						if(.MStart)
						{	mes "You can't join the event when it is ongoing.";
							close;
						}
					set .ManHunt[.o], getcharid(3);
					set .ManHuntN$[.o], strcharinfo(0);
					set .o, .o + 1;
					warp .MHMap$,0,0;
					close;
				}
			else
				{
					menu "Join Event",-;
					if(.MStart)
						{	mes "You can't join the event when it is ongoing.";
							close;
						}
					set .ManHunt[.o], getcharid(3);
					set .ManHuntN$[.o], strcharinfo(0);
					set .o, .o + 1;
					warp .MHMap$,0,0;
					close;
					close;
				}
		}
	else if(!.MStatus)
	{
		
		mes "Status: ^00ff00INACTIVE!^000000";
		mes "Man Hunt Points: "+MHPoint+"";
		if(getgroupid() >= .GM) 
			menu "Admin Commands",MHAdmin,"Claim Rewards",-;
		else
			menu "Claim Rewards",-;
		mes "There you go.";
		getitem .MHReward,MHPoint;
		set MHPoint, 0;
		close;
	}
		
MHAdmin:
		if(!.MStatus)
		{
			mes "Start Event?";
			menu "Start!",-;
			set .MStatus, 1;
			set .o, 0;
			announce "Man-Hunt Event warper will be closed in 3 minutes",0;
			setnpctimer 0;
			initnpctimer;
			close;
		}
		else if(.MStatus)
		{
			mes "End Event?";
			menu "End",-;
			set .MStatus, 0;
			deletearray .ManHunt[0],getarraysize(.ManHunt);
			deletearray .ManHuntN$[0],getarraysize(.ManHuntN$);	
			announce "A GM has ended the Man Hunt Event",0;
			stopnpctimer;
			close;
		}
	close;
	

OnClock1100:
OnClock1700:
		set .MStatus, 1;
		announce "Man-Hunt Event warper will be closed in 3 minutes",0;
		set .o, 0;
		setnpctimer 0;
		initnpctimer;
		end;
OnTimer60000:
		announce "Man-Hunt Event warper will be closed in 2 minutes",0;
		end;
OnTimer120000:
		announce "Man-Hunt Event warper will be closed in 60 Seconds",0;
		end;
		
OnTimer180000:
		announce "Man-Hunt Event warper is now closed.",0;
		sleep2 2000;
		mapannounce .MHMap$,"The goal is this event is to kill the target within 30 seconds.",0;
		sleep2 2000;
		mapannounce .MHMap$,"The one who managed to kill the target will gain 1 Man Hunt Point",0;
		sleep2 2000;
		mapannounce .MHMap$,"But if the target surivived, the target will gain 3 Man Hunt Points",0;
		sleep2 2000;
		mapannounce .MHMap$,"Enough explaining, let's do the Man-Hunt Event!",0;
		sleep2 2000;
		mapannounce .MHMap$,"Man-Hunt Event start!",0;
		atcommand "@doommap";
		atcommand "@raisemap";
		set .MStart,1;
		stopnpctimer;
		set .MRounds, 1;
		goto ManHuntStart;
		end;
		
OnTimer30000:
		if (.HuntedTimer)
		{
			mapannounce .MHMap$,"The Target, "+.ManHuntN$[.Target]+", managed to survive",0;
			atcommand "#killable "+.ManHuntN$[.Target]+"";
			atcommand "#size \""+.ManHuntN$[.Target]+"\" 0";
			sleep2 1000;
			if(attachrid(.ManHunt[.Target])) 
			{
					set MHPoint, MHPoint + .MSurvive;
					dispbottom "Gained "+.MSurvive+" Man Hunt Points.";
					dispbottom "Current Man Hunt Points: "+MHPoint+"";
					detachrid;					
			}
			set .MRounds, .MRounds + 1;
			stopnpctimer;
			goto MHNextRound;
		}
		end;
		
ManHuntStart:
		if (getmapusers(.MHMap$) < .MHPlayer) goto MHPlayerLack;
		set .Target, rand(0,getarraysize(.ManHunt)-1);
		mapannounce .MHMap$,"[Round "+.MRounds+"] Our target is "+.ManHuntN$[.Target]+"!",0;
		atcommand "#killable "+.ManHuntN$[.Target]+"";
		atcommand "#size \""+.ManHuntN$[.Target]+"\" 2";
		setnpctimer 0;
		set .HuntedTimer, 1;
		initnpctimer;
		end;
		
OnPCDieEvent: //in victim's scope
	if (strcharinfo(3) == .MHMap$)
	{
	if( getcharid(3) == .ManHunt[.Target] ){
		if(attachrid(killerrid)) {
			announce ""+strcharinfo(0)+" has killed the target",0;
			set MHPoint, MHPoint + .MKill;
			atcommand "#killable "+.ManHuntN$[.Target]+"";
			atcommand "#size \""+.ManHuntN$[.Target]+"\" 0";
			dispbottom "Gained "+.MKill+" Man Hunt Points.";
			dispbottom "Current Man Hunt Points: "+MHPoint+"";
			set .MRounds, .MRounds + 1;
			stopnpctimer;
			detachrid;
			sleep2 500;
			atcommand "#alive "+.ManHuntN$[.Target]+"";
			goto MHNextRound;
        }
	}
	}
	end;
	
MHPlayerLack:
		mapannounce .MHMap$,"Failed to start Man-Hunt Event due to insufficient Players",0;
		sleep2 2000;
		mapannounce .MHMap$,"The minimum player required is "+.MHPlayer+" players",0;
		sleep2 2000;
		mapannounce .MHMap$,"All players will be warped to El Dicastes in 2 seconds.",0;
		sleep2 2000;
		mapwarp .MHMap$,"dicastes01",249,158;
		set .MStatus, 0;
		set .HunterTimer, 0;
		set .Target, 0;
		set .MStart, 0;
		deletearray .ManHunt[0],getarraysize(.ManHunt);
		deletearray .ManHuntN$[0],getarraysize(.ManHuntN$);
		end;
		
	
MHNextRound:
	if (getmapusers(.MHMap$) < .MHPlayer) goto MHPlayerLack;
	if (.MRounds > .MRoundsMax)
			{
				sleep2 1000;
				announce "Man-Hunt Event ended.",0;
				sleep2 1000;
				set .MStatus, 0;
				set .HunterTimer, 0;
				deletearray .ManHunt[0],getarraysize(.ManHunt);
				deletearray .ManHuntN$[0],getarraysize(.ManHuntN$);
				mapannounce .MHMap$,"All Players will be warped to El Dicastes in 5 seconds.",0;
				sleep2 5000;
				set .Target, 0;
				set .MStart, 0;
				mapwarp .MHMap$,"dicastes01",249,158;
				end;
            }
			else
			{
				announce "Next Round in 10 seconds.",0;
				sleep2 10000;
				goto ManHuntStart;
			}
	end;

OnPCLogOutEvent:
	if (.MStatus)
		if (getcharid(3) == .ManHunt[.Target])
		{
			mapannounce .MHMap$,"The target has logged out of this game. This round will be nulled.",0;
			set .MRounds, .MRounds + 1;
			goto MHNextRound;
		}
	end;
			
			
OnInit:
//start of config
	set .MHMap$, "bossnia_01"; // event map
	set .MHReward, 7227; // reward
	set .o, 0; // dont touch this
	set .GM, 99; // minimum gm lvl
	set .MRoundsMax, 10; // number of rounds
	set .MHPlayer, 3; // minimum players to start
	set .MSurvive, 3; // points para sa nagsurvive
	set .MKill, 1; // points para sa nakapatay
//end of config
	setarray .ManHunt[0],0;
	setarray .ManHuntN$[0],"";
	end;
}

HI dis isn't my script but I am using it in my server.

I want some help cause everytime the event ends it KILLS everyone in the main town..

I don't have any sleep yet and I can't figure out what is the problem. I hope someone can help me out.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...