I would like this script to change from Exact number of party players to Minimum party of 2 and up.
Can anybody fix this problem?
prontera,169,186,4 script MvP Speed Run 580,{
mes "[MvP Speed Run]";
mes "Say... do you want to play the MvP Ladder game?";
next;
switch(select("Yes, let's get it on!:Information.:Show me the best records.:No.")) {
case 1:
break;
case 2:
mes "[MvP Speed Run]";
mes "In this game, your party will fight an MVP of your choosing as fast as you can.";
if ( .register_cost )
mes "But the entrance fee is "+ callfunc( "F_InsertComma", .register_cost ) +" zeny times the mvp level.";
next;
mes "[MvP Speed Run]";
mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed.";
mes "Good luck!";
close;
case 3: //todo mvp ladder menu
mes "[MvP Speed Run]";
mes "Menu Under Construction";
close;
case 4:
mes "[MvP Speed Run]";
mes "When you are strong enough to complete the game, please come back.";
close;
}
next;
mes "[MvP Speed Run]";
mes "Which MVp would you like to face?";
.round = select(implode(.Menu$,":")) - 1;
if ( !getcharid(1) ) {
mes "[MvP Speed Run]";
mes "You have to form a party to play.";
close;
}
if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) {
mes "[MvP Speed Run]";
mes "Only the party leader can register.";
close;
}
.@origin = getcharid(3);
getpartymember getcharid(1), 1;
getpartymember getcharid(1), 2;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == strnpcinfo(4) )
.@online++;
}
}
attachrid .@origin;
if ( $@partymembercount != .register_min ) {
mes "[MvP Speed Run]";
mes "You have to form a party with exactly "+ .register_min +" members to play.";
close;
}
else if ( .@online != .register_min ) {
mes "[MvP Speed Run]";
mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'.";
close;
}
else if ( .register_cost && Zeny < .register_cost ) {
mes "[MvP Speed Run]";
mes "You don't have enough zeny. Please come back when you do.";
close;
}
else if ( .party_id ) {
mes "[MvP Speed Run]";
mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished.";
mes "Thank you.";
close;
}
Zeny -= .register_cost;
announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all;
set .party_id, getcharid(1);
set .@time_enter, gettimetick(2);
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == strnpcinfo(4) ) {
announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self;
.@name$[.@c] = strcharinfo(0);
.@c++;
}
}
}
cleanmap .eventmap$;
warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4);
mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" will spawn in 60 Seconds", bc_map|bc_blue;
sleep 60000;
monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead";
mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue;
sleep .timeout * 60000;
set .@timeused, gettimetick(2) - .@time_enter;
if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) {
mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map;
set $mvpladdderparty_time, .@timeused;
set $mvpladdderparty_name$, getpartyname( .party_id );
copyarray $mvpladderparty_member$, .@name$, .register_min;
}
else
mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map;
sleep 10000;
announce "The party ["+ getpartyname( .party_id ) +"] has finished the MvP Speed Run!", bc_all;
mapwarp .eventmap$, .map$, .x, .y;
killmonsterall .eventmap$;
.party_id = .round = 0;
end;
OnMvpDead:
awake strnpcinfo(0);
end;
OnPCLogoutEvent:
if ( hp > 0 )
.@less_one = 1;
else
end;
OnPCDieEvent:
if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end;
if ( getcharid(1) != .party_id ) end;
getpartymember .party_id, 1;
getpartymember .party_id, 2;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == .eventmap$ && hp > 0 )
.@alive++;
}
}
if ( .@less_one )
.@alive--;
if ( !.@alive ) {
mapannounce .eventmap$, "Party wiped!", bc_map;
sleep 10000;
awake strnpcinfo(0);
}
end;
OnInit:
// Configurations -----------------------------------------------------
// Time limit (in minutes)
// When time runs out, all players inside the room will be kicked out.
// Do NOT set this to zero!
set .timeout, 60;
// entrance fee (in Zeny)
set .register_cost, 1000000;
// exact amount of party members needed to start the game
set .register_min, ;
// id of each mvp. you can add more
setarray .mvpid[0],
1086,// Golden Thief Bug 64
1115,// Eddga 65
1150,// Moonlight Flower 67
1159,// Phreeoni 69
1112,// Drake 70
1583,// Tao Gunka 70
1492,// Incantation Samurai 71
1046,// Doppelgangger 72
1252,// Garm 73
1418,// Evil Snake Lord 73
1059,// Mistress 74
1190,// Orc Lord 74
1087,// Orc Hero 77
1251,// Knight of Windstorm 77
1038,// Osiris 78
1658,// Ygnizem 79
1272,// Dark Lord 80
1871,// Fallen Bishop 80
1039,// Baphomet 81
1147,// Maya 81
1785,// Atroce 82
1389,// Dracula 85
1630,// Bacsojin 85
1885,// Gorynych 85
1623,// RSX 0806 86
1511,// Amon Ra 88
1688,// Lady Tanee 89
1768,// Gloom Under Night 89
1719,// Datale 90
1734,// Kiel D-01 90
1157,// Pharaoh 93
1373,// Lord of Death 94
1312,// Turtle General 97
1779,// Ktullanux 98
1874,// Beelzebub 98
1646,// Bio3 99
1647,// Bio3 99
1648,// Bio3 99
1649,// Bio3 99
1650,// Bio3 99
1651,// Bio3 99
1708,// Thanatos 99
1751,// Valkyrie Randgris 99
1832,// Ifrit 99
1917,// Wounded Morroc 99
2022,// Nidhoggr's Shadow 117
2202,// Kraken 124
2131,// Lost Dragon 135
2475,// Root of Corruption 136
2087,// Queen Scaraba 140
2165,// Gold Queen Scaraba 140
2253,// Daehyon 142
2476,// Amdarias 143
2255,// Kades 143
2251,// Gioia 146
2235,// Bio4 160
2236,// Bio4 160
2237,// Bio4 160
2238,// Bio4 160
2239,// Bio4 160
2240,// Bio4 160
2241;// Bio4 160
// Generate Menu
for(.@i = 0; .@i < getarraysize(.mvpid); .@i++){
set .Menu$[.@i], "["+strmobinfo(3,.mvpid[.@i])+"] ~ "+strmobinfo(1,.mvpid[.@i]);
}
// minimum GM level to reset the best record
set .gmlvlreset, 99;
// event map
set .eventmap$, "guild_vs2-2";
// mapflag configuration
setarray .@mapflag,
mf_nowarp,
mf_nowarpto,
mf_nosave,
mf_nomemo,
mf_noteleport,
mf_nopenalty, // disable exp loss
mf_noreturn,
mf_nobranch,
mf_nomobloot, // disable monster drop loots,
mf_nomvploot, // 2 of these
mf_partylock;
// Config Ends --------------------------------------------------------------
mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map;
getmapxy .map$, .x, .y, 1;
mapwarp .eventmap$, .map$, .x, .y;
killmonsterall .eventmap$;
.@size = getarraysize( .@mapflag );
for ( .@i = 0; .@i < .@size; .@i++ )
setmapflag .eventmap$, .@mapflag[.@i];
end;
}}
I would like this script to change from Exact number of party players to Minimum party of 2 and up.
Can anybody fix this problem?
I figured it out
Share this post
Link to post
Share on other sites