Jump to content
  • 0
Sign in to follow this  
gleisondosreis

3vs3

Question

How are you, my friends?
This is my first post on the forum..
I haven't tried new emulators for a long time.
Since a lot has changed, I decided to go back to using my super old emulator HAHA
and I wanted to ask for your help.

 

 

my party vs party script worked perfectly years ago.. now I decided to put my server online and do some tests, I'm having this problem.

 

 

When the two parties register for the first time, everything goes very well.
everyone is teleported

 

 

When the game ends they register again, only the leaders of each party enter..

 

and I'm having this error when the first game ends

 

[Erro]: script_rid2sd: erro fatal! no associated players!
[Depurar]: Function: getcharid (1 parametro):
[Depurar]: Dado: number value=1
[Depurar]: Source (NPC): 3 vs 3 Party on arena_room (105,93)

 

I have all the necessary modifications in the src.

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 "Desculpe, Você precisa está acima do level 250 ou não ser Apredinz.";
close;
}
if (getpartyleader(getcharid(1),2) != getcharid(0)) {
mes "Apenas o líder da Party pode Registrar!"; 
close;


if (getpartymembercount(getcharid(1)) != 3 && getpartycount(getcharid(1)) != 3){
 mes "Desculpe, Você não atende o requesitos, Verifique se sua Party têm 3 pessoas e tente novamente.";
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" Algum membro do grupo não está online!";
        close;
}    //Not all users on


mes "Bem VIndo ao 3 vs 3 Party!!!";
set .@i,0;
mes "Você quer se registrar?";
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 "Você têm ^FF0000"+(.signup_count-1)+"^000000 Partys em sua frente.";
 
        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 "Você têm  "+(.signup_count-1)+" Partys em sua Frente !";
    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 "Uma Partida de 3vs3 Começou!", 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;


L_reward:
    getbgusers getarg(0);
    for ( set .@i, 0; .@i < $@arenamembersnum; set .@i, .@i +1 )
//    getitem 501, 1, $@arenamembers[.@i]; // item reward
    bg_kickall .red;
    bg_kickall .blue;
    set .start, 0;
    deletearray .score;
    warpparty "lhz_cube",66,192,getcharid(1);
    enablenpc "Partytwo";
    enablenpc "Partyone";
    goto L_start;
    return;

OnredDead: callsub L_dead, 1;
OnblueDead: callsub L_dead, 2;

L_dead:
    set .score[ getarg(0) ], .score[ getarg(0) ] -1;
    bg_updatescore "guild_vs1-1", .score[1], .score[2];
    if ( !.score[ getarg(0) ] )
        awake strnpcinfo(0);
    sleep2 1250;
    percentheal 100,100;
    end;
 
OnredQuit: callsub L_quit, 1, .red;
OnblueQuit: callsub L_quit, 2, .blue;
L_quit:
 
    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;
}

lhz_cube,66,192,3    script    partyvsparty0    139,5,5,{

if(getcharid(1) == $pvsp_grupo1)
               {
getitem 20043,3;
warp "arena_room",99,88;


    close;
     }
 
if(getcharid(1) == $pvsp_grupo2)
            {
getitem 20043,3;
warp "arena_room",99,88;

close;
      }

}

-    script    Remove_Buffs3    -1,{

OnPCLoadMapEvent:

if(strcharinfo(2) == "guild_vs1-1" || strcharinfo(2) == "guild_vs1-2" ){
sc_end -1;
}
end;

OnPCDieEvent:
    getmapxy(@map$,$@x,$@y,0);
    if (@map$ == "guild_vs1-1") {
    sleep2 1;
    atcommand "@alive";
    warp "prontera",156,191;
    end;
}
}

guild_vs1-1    mapflag    nosave    SavePoint
guild_vs1-1    mapflag    nowarp
guild_vs1-1    mapflag    nowarpto
guild_vs1-1    mapflag    noteleport
guild_vs1-1    mapflag    nomemo
guild_vs1-1    mapflag    nopenalty
guild_vs1-1    mapflag    nobranch
guild_vs1-1    mapflag    noicewall
guild_vs1-1    mapflag    pvp

guild_vs1-1    mapflag    noexp
guild_vs1-1    mapflag    noreturn
guild_vs1-1    mapflag    pvp_noguild

 

Thank you in advance for any help.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.