prontera,156,181,5 script MvP Challenge#Register 100,{ mes "["+ strnpcinfo(1) +"]"; if ( getvariableofnpc( .party_id, .main$ ) ) { .@remain = getvariableofnpc( .last_register, .main$ ) + getvariableofnpc( .register_delay, .main$ ) - gettimetick(2); .@min = .@remain / 60; .@sec = .@remain % 60; mes "Event will be start again"; mes "after "+ .@min +" min "+ .@sec +" sec."; close; } mes "Hello "+ strcharinfo(0) +", the MVP challenge is currently available."; next; mes "["+ strnpcinfo(1) +"]"; if ( getvariableofnpc( .party_id, .main$ ) ) { // need 1 more time because the stupid next; button mes "Hello "+ strcharinfo(0) +", the MVP challenge is currently unavailable"; close; } .@pid = getcharid(1); if ( !.@pid ) { mes "You don't have a party."; close; } if ( getpartyleader( .@pid, 2 ) != getcharid(0) ) { mes "Only a party leader can register."; close; } getpartymember .@pid, 1; getpartymember .@pid, 2; .@origin = getcharid(3); 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 < getvariableofnpc( .register_min, .main$ ) ) { mes "You must have at least "+ getvariableofnpc( .register_min, .main$ ) +" players in your party"; close; } if ( .@online < getvariableofnpc( .register_min, .main$ ) ) { mes "You must have "+ getvariableofnpc( .register_min, .main$ ) +" players online in "+ strnpcinfo(4) +" map"; close; } announce "Wishing luck for the party ["+ strcharinfo(1) +"] has started the MvP Challenge Event !", bc_all; cleanmap getvariableofnpc( .map$, .main$ ); killmonsterall getvariableofnpc( .map$, .main$ ); warpparty getvariableofnpc( .map$, .main$ ), 0,0, .@pid, strnpcinfo(4); hideoffnpc .main$; set getvariableofnpc( .last_register, .main$ ), gettimetick(2); set getvariableofnpc( .party_id, .main$ ), .@pid; set getvariableofnpc( .round, .main$ ), 0; sleep getvariableofnpc( .register_delay, .main$ ) * 1000; set getvariableofnpc( .party_id, .main$ ), 0; mapwarp getvariableofnpc( .map$, .main$ ), "prontera",156,181; end; OnInit: .main$ = "MvP Challenger#main"; // send all variables into 1 npc, that's my style end; } guild_vs2,49,50,4 script MvP Challenger#main 100,{ mes "["+ strnpcinfo(1) +"]"; if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) { mes "You are not the leader of your party."; close; } mes "Activate next round ?"; mes "Remaining rounds : "+( .totalround - .round ); next; if ( select( "Yes", "No" ) == 2 ) close; mes "["+ strnpcinfo(1) +"]"; mes "Ok ! Round ["+( .round +1 )+"] will begin shortly"; close2; .round++; for ( .@i = 0; .@i < .mobamount[ .round ]; .@i++ ) monster .map$, 49,49, "--ja--", .mobid[ rand( .mobsize ) ], 1, strnpcinfo(0)+"::OnMvPChallengeKill"; mapannounce .map$, "Round ["+ .round +"]. En Garde !!!", bc_map; hideonnpc strnpcinfo(0); end; OnMvPChallengeKill: if ( mobcount( .map$, strnpcinfo(0)+"::OnMvPChallengeKill" ) ) { announce mobcount( .map$, strnpcinfo(0)+"::OnMvPChallengeKill" )+ " monster(s) left to defeat." ,bc_map; end; } .@pid = getcharid(1); if ( .@pid != .party_id ) end; getpartymember .@pid, 1; getpartymember .@pid, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) getitem .itemid[ .round ], .amount[ .round ]; } } hideoffnpc strnpcinfo(0); if ( .round < .totalround ) end; announce "Congratulations to ["+ strcharinfo(1) +"] for completing MvP Challenge Event", bc_all; mapwarp .map$, "prontera",156,181; .round = 0; end; OnPCDieEvent: OnPCLogoutEvent: if ( strcharinfo(3) != .map$ || !getcharid(1) ) end; if ( getcharid(1) != .party_id ) end; warp "Save", 0,0; if ( getmapusers( .map$ ) ) end; .round = 0; killmonsterall .map$; end; OnInit: .register_delay = 3600; // how long can the party able to make use of the time for the map, this also deny entrance for other party to get in .register_min = 2; // minimum amount of party members must have to join in this event setarray .mobid[0],1852,1514,1853,1576,1847,1894,1399,1802,1874,1885,1980,1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,1389,1418,1492,1511,1583,1623,1630,1658,1685,1688,1719,1708,1734,1751,1768,1779,1785,1832,1871; // mob id .totalround = 5; // maximum rounds setarray .mobamount[1],3,5,7,9,10; setarray .itemid[1],673,675,7829,7828,12103; setarray .amount[1],250,100,3,3,1; .mobsize = getarraysize( .mobid ); .map$ = strnpcinfo(4); mapwarp .map$, "prontera",156,181; end; } guild_vs2 mapflag partylock guild_vs2 mapflag nomemo guild_vs2 mapflag nowarp guild_vs2 mapflag nowarpto guild_vs2 mapflag noteleport guild_vs2 mapflag nosave SavePoint guild_vs2 mapflag noreturn