Haven't fully tested, but it should basically work...unless I missed out something really important *gulps*
Probably different from what you really wanted, I did make a few modifications but I hope it helps.
prontera,155,255,4 script MonsterHunt 929,{
mes "[Monster Hunt]";
if ( !.monsterhunt )
mes "No event for the moment.";
else if(!getcharid(1) || getpartyleader(getcharid(1),2) != getcharid(0))
mes "You're not a Leader in a Party.";
else if ( getmapusers("pvp_n_1-3") > 0 )
mes "There is someone/party inside.";
else{
getpartymember( getcharid(1) );
set $@CurrentParty, getcharid(1);
set .@PartyCount, $@partymembercount;
if (.@PartyCount == 5) // does NOT check for offline members
warpparty "pvp_n_1-3",100,139,$@CurrentParty;
else
mes "Dont have enough player/s on your party. You need 5 Member.";
}
close;
OnInit:
set .mh_timer, rand(1,59); // random between 1-59 minutes
sleep2 (.mh_timer*60000); // 60000 == 1 minute
OnEventStart:
if (.monsterhunt == 1) end;
announce "Monster Hunt Event is open.",0;
monster "pvp_n_1-3.gat",0,0,"RAIDEVENT",1751,1,"MonsterHunt::OnMobKilled";
set .monsterhunt,1;
end;
OnMobKilled:
if( getmapusers("pvp_n_1-3") != 5 )
announce strcharinfo(1)+"'s party failed the Monster Hunt Event.",bc_all;
else{
getpartymember($@CurrentParty);
set .@PartyCount, $@partymembercount;
copyarray .@PartyMemberName$, $@partymembername$, .@PartyCount;
for( set .@i, 0; .@i < .@PartyCount; set .@i, .@i+1 )
getitem 7227,1,getcharid(3,.@PartyMemberName$[.@i]);
announce ""+strcharinfo(0)+" party killed the monster.",bc_all;
}
warpparty "prontera",0,0,$@CurrentParty;
goto OnClear;
end;
OnPCDieEvent:
if (getcharid(1) == $@CurrentParty && $@CurrentParty != 0 && strcharinfo(3) == "pvp_n_1-3") {
sleep2 500;
warp "prontera",0,0;
percentheal 100,100;
sleep2 1000;
if (getmapusers("pvp_n_1-3") == 0) {
announce strcharinfo(0)+"'s party failed the Monster Hunt Event.",bc_all;
goto OnClear;
}
}
end;
OnClear:
set .monsterhunt, 0;
set $@CurrentParty, 0;
sleep2 600000; //sleep 10 minutes
goto OnInit;
end;
}
Few things I would question, such as if one of the party members died, why would you only announce the party failed AFTER killing the mob.
But I'll leave that to you. Cheers =)
EDIT: Oh, I didn't realize that you posted in the Scripting Support prior to this one. This event goes on by time, not by (50%) chance, but I'm sure you can sort that out.
Well then I guess you can come up with something better by merging both scripts. Good luck! =)