Jump to content
  • 0

help, modified this script


aguyaguy

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  


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
Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

so is this 50% chance in every hour ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

well it doesnt work ! @_@ i've been waiting for 8hrs and there was no MH Event @_@

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

well can you re-work the script again like in every hour the event will be open but the rate is 50% chance !

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

/hmm ? the script i provide above is a event that run in a rate of 50%

/lv ==''

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

im just wondering in 50% chance and waiting for 8hours that event isnt open @_@

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  12/17/11
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   0
  • Joined:  11/13/11
  • Last Seen:  

@TS this section is only Support if you want to new re-work script.. please request @ script request..with full details..

Link to comment
Share on other sites

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...