Guys, I wanted some tips or even some help from you...
I know this is rathena, in fact I use it and have a rathena server too..
but I'm trying to put another project of mine online, a very old project.
And I would like to ask for your help so I can fix this script.
Error: when both parties register, everything goes well in the first match, but then when you register again, instead of teleporting the entire party in case 3, you end up teleporting only 1 player, the leader.
Thank you very much for any help you may have!!
Quote
arena_room,105,93,5 script 3 vs 3 Party 822,{
if (BaseLevel < 250 || Class==Job_Novice || Class==Job_Baby || Class==Job_Novice_High) {
mes "[Arena Guide]";
mes "Sorry, you need to be above level 250 or not be an Apredinz.";
close;
}
if (getpartyleader(getcharid(1),2) != getcharid(0)) {
mes "Only the Party leader can Register!";
close;
}
if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
mes "Sorry, you don't meet the requirements, check if your Party has 3 people and try again.";
close;
}
getpartymember getcharid(1),0;
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
set .@count, $@partymembercount;
if(.@count < 3)
end; //Not enough members
copyarray .@charid[0],$@partymembercid[0],$@partymembercount;
//if($@partymembercount != ) end;
for(set .@i,0; .@i < .@count; set .@i, .@i + 1){
if( isloggedin($@partymemberaid[.@i],$@partymembercid[.@i]))
set .@online, .@online + 1;
}
if(.@count != .@online){
mes" Some group member is not online!";
close;
} //Not all users on
mes "Welcome to 3 vs 3 Party!!!";
set .@i,0;
mes "Do you want to register?";
if ( select( "Sim", "Não" ) == 2 ) close;
else if ( .signup_count == 128 ) {
mes "Desculpe a fila está cheia";
close;
}
while ( .signup_aid[.@i] != getcharid(3) && .@i < .signup_count )
set .@i, .@i +1;
if ( .@i < .signup_count ) {
mes "Sua Party já está registrada.";
mes "You have ^FF0000"+(.signup_count-1)+"^000000 Parties in front of you.";
close;
}
set .signup_aid[ .signup_count ], getcharid(3);
set .signup_count, .signup_count +1;
mes "Congratulations, you are now on the waiting line for 3vs3 Party!";
mes "Your position is: ^FF0000"+(.signup_count-1)+"^000000";
dispbottom "You have "+(.signup_count-1)+" Parties in front of you !";
close2;
L_start:
if ( .signup_count < .min2start ) end;
for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 ) {
if ( attachrid( .signup_aid[.@i] ) ) {
if ( getmapflag( strcharinfo(3), mf_nowarp ) ) { // player has went into another event
deletearray .signup_aid[.@i], 1;
set .signup_count, .signup_count -1;
set .@i, .@i -1;
}
}
else {
deletearray .signup_aid[.@i], 1;
set .signup_count, .signup_count -1;
set .@i, .@i -1;
}
}
if ( .start || .signup_count < .min2start ) end;
announce "A 3vs3 Match Started!", 0;
set .start, 1;
for ( set .@i, 0; .@i < .signup_count; set .@i, .@i +1 )
setbgid ( .@i %2 )? .red : .blue, .signup_aid[.@i];
deletearray .signup_aid, .min2start;
set .signup_count, .signup_count - .min2start;
bg_warp .red, "guild_vs1-1", 7,49;
bg_warp .blue, "guild_vs1-1", 92,49;
cleararray .score[1], .startingscore, 2;
bg_updatescore "guild_vs1-1", .score[1], .score[2];
sleep .eventlasting * 1000;
if ( .start == 1 ) {
if ( .score[1] == .score[2] )
mapannounce "guild_vs1-1", "Empate !", 0;
else if ( .score[1] > .score[2] ) {
mapannounce "guild_vs1-1", " Red side wins !", 0;
callsub L_reward, .red;
}
else if ( .score[1] < .score[2] ) {
mapannounce "guild_vs1-1", " Blue side wins !", 0;
callsub L_reward, .blue;
}
}
bg_warp .red, "izlude", 128,117;
bg_warp .blue, "izlude", 128,117;
bg_kickall .red;
bg_kickall .blue;
set .start, 0;
deletearray .score;
goto L_start;
if ( bg_get_data( getarg(1), 0 ) ) end;
set .score[ getarg(0) ], 0;
awake strnpcinfo(0);
end;
OnInit:
set .eventlasting, 100 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins
set .min2start, 2; // minimum player to start
set .startingscore, 6; // score at start
set .red, createbgid( "guild_vs1-1", 7,49, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead" );
set .blue, createbgid( "guild_vs1-1", 92,49, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead" );
set $psvp_map$,"guild_vs1-1";
set $pvsp_grupo1,0;
set $pvsp_grupo2,0;
set $pvsp_kill1,0;
set $pvsp_kill2,0;
end;
OnPCKillEvent:
if(strcharinfo(3) == $psvp_map$)
{
if(getcharid(1) == $pvsp_grupo1)
{
set $pvsp_kill1,$pvsp_kill1+1;
mapannounce $psvp_map$,"Party ["+getpartyname($pvsp_grupo1)+"] Matou "+$pvsp_kill1+"/3 Membros da Party ["+getpartyname($pvsp_grupo2)+"]!",bc_all;
}
if(getcharid(1) == $pvsp_grupo2)
{
set $pvsp_kill2,$pvsp_kill2+1;
mapannounce $psvp_map$,"Party ["+getpartyname($pvsp_grupo2)+"] Matou "+$pvsp_kill2+"/3 Membros da Party ["+getpartyname($pvsp_grupo1)+"]!",bc_all;
}
if($pvsp_kill1 == 3)
{
announce "[3 vs 3] Party ["+getpartyname($pvsp_grupo1)+"] è a vencedora !",bc_all;
sleep 3000;
mapwarp "guild_vs1-1","lhz_cube",66,192;
callsub L_reward, .red;
}
if($pvsp_kill2 == 3)
{
announce "[3 vs 3] Party ["+getpartyname($pvsp_grupo2)+"] é a vencedora !",bc_all;
sleep 3000;
mapwarp "guild_vs1-1","lhz_cube",66,192;
callsub L_reward, .blue;
}
end;
}
}
guild_vs1-1,7,49,0 script Partyone 139,5,5,{
warpparty "guild_vs1-1",7,49,getcharid(1);
set $pvsp_grupo1,0;
set $pvsp_kill1,0;
if($pvsp_grupo1 == 0) set $pvsp_grupo1,getcharid(1);
sleep 1000;
disablenpc "Partyone";
end;
}
guild_vs1-1,92,49,0 script Partytwo 139,5,5,{
set $pvsp_grupo2,0;
set $pvsp_kill2,0;
warpparty "guild_vs1-1",92,49,getcharid(1);
if($pvsp_grupo2 == 0) set $pvsp_grupo2,getcharid(1);
sleep 1000;
disablenpc "Partytwo";
end;
}
Question
Yukaiii
Guys, I wanted some tips or even some help from you...
I know this is rathena, in fact I use it and have a rathena server too..
but I'm trying to put another project of mine online, a very old project.
And I would like to ask for your help so I can fix this script.
Error: when both parties register, everything goes well in the first match, but then when you register again, instead of teleporting the entire party in case 3, you end up teleporting only 1 player, the leader.
Thank you very much for any help you may have!!
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.