i want to on the pvp on this script when the event start and when the first round is finish the pvp is automatically off oh i forgot only the man who been choosen is able to kill not all players thank you for help
//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!
prontera,164,173,4 script Man-Hunt Event 832,{
mes "[Man Hunt Event]";
if(.MStatus)
{
mes "Status: ^00ff00ACTIVE!^000000";
mes "Man Hunt Points: ^03960F"+MHPoint+"^000000";
mes " ";
mes "You will see a Join Event option if the event becomes active. Save up your Points and redeem later in a form of SPECs!";
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$,23,104;
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$,23,104;
close;
close;
}
}
else if(!.MStatus)
{
mes "Event Status: ^0004FFINACTIVE!^000000";
mes "Man Hunt Points: ^03960F " +MHPoint+ " ^000000";
mes " ";
mes "You will see a Join Event option if the event is active. Save up your Points and redeem later in a form of SPECs!";
if(getgroupid() >= .GM)
menu "Admin Commands",MHAdmin,"Claim Rewards",-;
else
menu "Claim Rewards",-;
mes "There you go. Congratulations on your redemption!";
getitem .MHReward,MHPoint;
set MHPoint, 0;
close;
}
MHAdmin:
if(!.MStatus)
{
mes "Start Event?";
menu "Start!",-;
set .MStatus, 1;
set .o, 0;
announce "It's time for the Man-Hunt Event!",0;
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 "To join, click the Man-Hunt Event NPC in Prontera! ",0;
announce "Man-Hunt Event Warper will be disabled 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;
OnClock1200:
set .MStatus, 1;
announce "It's time for the Man-Hunt Event!",0;
announce "Mechanics: The NPC will choose which player to target per round and you must kill him!",0;
announce "If you manage to kill the target, you'll get points. Otherwise, he'll receive much higher points! Points can later be redeemed as SPECs.",0;
announce "To join, click the Man-Hunt Event NPC in Prontera!",0;
announce "Man-Hunt Event warper will be disabled 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$,"Okay let me repeat the mechanics more clearly now.",0;
sleep2 2000;
mapannounce .MHMap$,"The goal in 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 10 Man Hunt Points.",0;
sleep2 2000;
mapannounce .MHMap$,"But if the target surivived, the target will gain 30 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 "@pvpon";
atcommand "@raisemap";
set .MStart,1;
stopnpctimer;
set .MRounds, 1;
goto ManHuntStart;
end;
OnTimer30000:
if (.HunterTimer)
{
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 .HunterTimer, 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 the 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 Prontera in 2 seconds.",0;
sleep2 2000;
mapwarp .MHMap$,"prontera",155,181;
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 Prontera in 5 seconds.",0;
sleep2 5000;
set .Target, 0;
set .MStart, 0;
mapwarp .MHMap$,"prontera",155,181;
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$, "z_agit"; // 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, 2; // minimum players to start
set .MSurvive, 1; // points para sa nagsurvive
set .MKill, 1; // points para sa nakapatay
//end of config
setarray .ManHunt[0],0;
setarray .ManHuntN$[0],"";
end;
Question
Quesooo
i want to on the pvp on this script when the event start and when the first round is finish the pvp is automatically off oh i forgot only the man who been choosen is able to kill not all players thank you for help
//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! prontera,164,173,4 script Man-Hunt Event 832,{ mes "[Man Hunt Event]"; if(.MStatus) { mes "Status: ^00ff00ACTIVE!^000000"; mes "Man Hunt Points: ^03960F"+MHPoint+"^000000"; mes " "; mes "You will see a Join Event option if the event becomes active. Save up your Points and redeem later in a form of SPECs!"; 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$,23,104; 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$,23,104; close; close; } } else if(!.MStatus) { mes "Event Status: ^0004FFINACTIVE!^000000"; mes "Man Hunt Points: ^03960F " +MHPoint+ " ^000000"; mes " "; mes "You will see a Join Event option if the event is active. Save up your Points and redeem later in a form of SPECs!"; if(getgroupid() >= .GM) menu "Admin Commands",MHAdmin,"Claim Rewards",-; else menu "Claim Rewards",-; mes "There you go. Congratulations on your redemption!"; getitem .MHReward,MHPoint; set MHPoint, 0; close; } MHAdmin: if(!.MStatus) { mes "Start Event?"; menu "Start!",-; set .MStatus, 1; set .o, 0; announce "It's time for the Man-Hunt Event!",0; 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 "To join, click the Man-Hunt Event NPC in Prontera! ",0; announce "Man-Hunt Event Warper will be disabled 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; OnClock1200: set .MStatus, 1; announce "It's time for the Man-Hunt Event!",0; announce "Mechanics: The NPC will choose which player to target per round and you must kill him!",0; announce "If you manage to kill the target, you'll get points. Otherwise, he'll receive much higher points! Points can later be redeemed as SPECs.",0; announce "To join, click the Man-Hunt Event NPC in Prontera!",0; announce "Man-Hunt Event warper will be disabled 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$,"Okay let me repeat the mechanics more clearly now.",0; sleep2 2000; mapannounce .MHMap$,"The goal in 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 10 Man Hunt Points.",0; sleep2 2000; mapannounce .MHMap$,"But if the target surivived, the target will gain 30 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 "@pvpon"; atcommand "@raisemap"; set .MStart,1; stopnpctimer; set .MRounds, 1; goto ManHuntStart; end; OnTimer30000: if (.HunterTimer) { 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 .HunterTimer, 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 the 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 Prontera in 2 seconds.",0; sleep2 2000; mapwarp .MHMap$,"prontera",155,181; 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 Prontera in 5 seconds.",0; sleep2 5000; set .Target, 0; set .MStart, 0; mapwarp .MHMap$,"prontera",155,181; 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$, "z_agit"; // 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, 2; // minimum players to start set .MSurvive, 1; // points para sa nagsurvive set .MKill, 1; // points para sa nakapatay //end of config setarray .ManHunt[0],0; setarray .ManHuntN$[0],""; end;
Edited to use codebox
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.