Jump to content
  • 0

help, modified this script


Question

Posted (edited)


prontera,155,255,2 script MonsterHunt 929,{
if(.monsterhunt)==1 goto M_game;
mes "[Monster Hunt]";
mes "No event for the moment.";
close;

M_game:
mes "[MonsterHunt]";
if(getmapusers("pvp_n_1-3")>=1) goto L_no;
if (!getcharid(1)) {
mes "You are not in a party.";
close;
}
if (getpartyleader(getcharid(1),2) != getcharid(0)) {
mes "You are not the party leader.";
close;
}
//if(!isloggedin(getcharid(3,$@partymembername$[.i]),getcharid(0,$@partymembername$[.i]))) {
if(isloggedin(getcharid(3, $@partymembername$[.@i]))) {
mes "Some party members are not online.";
mes "Come back with everyone.";
close;
}
attachrid (getcharid(3));
if(BaseLevel<255) {
mes "Some party members don't have the Base Level required to enter in this event.";
close;
}
getpartymember(getcharid(1));
set .@PartyCount, $@partymembercount;
if (.@PartyCount == 5) {
warpparty "pvp_n_1-3",100,139,getcharid(1);
end;
}
else{
mes "Dont have enough player/s on your party.";
close;
}
L_no:
mes "There's someone in the arena.";
close;
OnMinute:
announce "Monster Hunt Event is open.",0;
monster "pvp_n_1-3.gat",0,0,"RAIDEVENT",1751,1,"Monster Hunt::OnMobKilled";
set .monsterhunt,1;
end;

OnMobKilled:
if(getmapusers("pvp_n_1-3")==5) goto L_good;
announce ""+strcharinfo(1)+" party failed.",bc_all;
warpparty "prontera.gat",0,0,getcharid(1);
set .monsterhunt,0;
end;
L_good:
getpartymember (getcharid(1),0);
for( set .@i, 0; .@i < getarraysize($@partymembername$); set .@i, .@i+1 )
getitem 7227,1,getcharid(3, $@partymembername$[.@i]);
announce ""+strcharinfo(1)+" party killed the monster.",bc_all;
warpparty "prontera.gat",0,0,getcharid(1);
set .monsterhunt,0;
end;
}
[/codeBOX]

i think there is something wrong . how to put a time on this script ? so the players can join in this event.

i want to put a random time like 50% chance to open or able to join ? help pls

Edited by aguyaguy

10 answers to this question

Recommended Posts

Posted

try this..

prontera,155,255,2 script MonsterHunt 929,{
mes "[Monster Hunt]";
if( !.monsterhunt ){
mes "No event for the moment.";
}else if( getmapusers("pvp_n_1-3") ){
mes "There is someone/party inside.";
}else if( !getcharid(1) || getpartyleader(getcharid(1),2) != getcharid(0) ){
mes "You're not a Leader in a Party.";
}else{
getpartymember( getcharid(1) );
set .@PartyCount, $@partymembercount;
if (.@PartyCount == 5) {
 warpparty "pvp_n_1-3",100,139,getcharid(1);
 end;
}else{
 mes "Dont have enough player/s on your party. You need 5 Member.";
}
}
close;

OnMinute:
if( rand(100) < 50 ){
announce "Monster Hunt Event is open.",0;
monster "pvp_n_1-3.gat",0,0,"RAIDEVENT",1751,1,"Monster Hunt::OnMobKilled";
set .monsterhunt,1;
}
end;

OnMobKilled:
set .monsterhunt,0;
if( getmapusers("pvp_n_1-3") != 5 ){
announce ""+strcharinfo(1)+" party failed.",bc_all;
}else{
getpartymember( getcharid(1),0 );
for( set .@i, 0; .@i < getarraysize($@partymembername$); set .@i, .@i+1 )
 getitem 7227,1,getcharid(3, $@partymembername$[.@i]);
announce ""+strcharinfo(1)+" party killed the monster.",bc_all;
}
warpparty "prontera",0,0,getcharid(1);
end;
}

Posted

like you just mentioned..

event start in 50% rate..

50% rate...it can be whole week / whole year / your whole life also wont start if everytime get the same rate..

so get use to it since you want it to be like this.. ==''

wait 8 hour or even longer doesnt mean the event must work for 1 time or more..

Posted

well aguyaguy you could increase rate each hours so it'll have more chance to open like

OnMinute:
if( rand(100) < 50 + .ratei){
announce "Monster Hunt Event is open.",0;
monster "pvp_n_1-3.gat",0,0,"RAIDEVENT",1751,1,"Monster Hunt::OnMobKilled";
set .monsterhunt,1;
set .ratei,0; //reset rateincrease on opening
}
else { //lets increase rate for next hour
set .ratei,ratei+10;
}
end;

Posted

ohh it working now i just edit the OnMinute00: ! btw i need a new re-work script. if the MH failed . like someone die . the event will be open again and also the monster will be spawn with full hp ! but they will for 10mins to join in that event is that possible?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...