Jump to content
  • 0
Sign in to follow this  
Virtue

Party Vs Party ( again lol ) Read Please :)

Question

Hi Guys, 

 

I know this has been posted over and over again, but I think i have read and check all the other topics about this and still can't find the answer.

what I think everybody wants/need/asks for is this.

 

I found this script made by annie.

 

 

 

prontera,159,179,4	script	Team Wars::teamwar	899,{	if (getgmlevel() >= 99){		menu "standard menu",standard,"reset",lend;	}standard:	set $@members,2; // number of party members change this to your party size you want	set $@start,0;	getpartymember(getcharid(1));	set @partymembercount,$@partymembercount;	if ( $@start == 1 ) {		mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";		close;	}	if ( @partymembercount == $@members ) {		if ( $@TeamID1 == getcharid(1) ) {			mes "Do you wish to sign out your team?";				next;				if (select("I Give up ~.","Never Say Quit !!")==2) close;				announce "Team 1 : [ " + getpartyname($@TeamID1) + " ] has sign out. We need another Party to sign up now!",bc_yellow|bc_map;				set $@TeamID1, 0;			close;			}		if ($@TeamID2==getcharid(1)) {				mes "Do you wish to sign out your team?";				next;				if (select("I Give up ~.","Never Say Quit !!")==2) close;			announce "Team 2 : [ " + getpartyname($@TeamID2) + " ] has sign out. We need another Party to sign up now!",bc_yellow|bc_map;				set $@TeamID2, 0;				close;			}		mes "Hello "+strcharinfo(0)+" what do you want?";		if (($@TeamID1!=0) && ($@TeamID2!=0)) {			mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";			close;		}		if ( getpartyleader(getcharid(1),2) != getcharid(0) ) {			mes "Only party leader have the right to sign up / out from the game with me..";			close;		}		mes "Choose your team to register.";		switch(select("Red Team - [" + GetPartyName($@TeamID1) + "] :Blue Team - [" + GetPartyName($@TeamID2) + "]")) {		case 1:	mes "[  Team War  ]";			if ($@TeamID1==0 || getpartyname($@TeamID1)=="null") {				getpartymember(getcharid(1)),1;				getpartymember(getcharid(1)),2;				copyarray $@partymembercidt1[0],$@partymembercid[0],$@members;				copyarray $@partymemberaidt1[0],$@partymemberaid[0],$@members;				for (set .@i,0; .@i<$@members; set .@i,.@i+1) {					if(isloggedin($@partymemberaidt1[.@i],$@partymembercidt1[.@i]))  set .@count,.@count+1;				}				if(.@count < $@members) {					mes "You need all your party members to be online to Register";					close;				}				set $@TeamID1, getcharid(1);					initnpctimer;					mes "Your Party is now subscribed, good luck!";					announce "Team 1 : [ " +getpartyname($@TeamID1)+ " ] has sign up For the Team War!",bc_blue|bc_map;					doevent "teamwar::OnSubscriptionTeam";					close;				} else {				mes "I'm sorry! Another Team has sign up before you...";					close;				}		case 2:	mes "[  Team War  ]";			if ($@TeamID2==0 || getpartyname($@TeamID2)=="null") {					getpartymember(getcharid(1)),1;				getpartymember(getcharid(1)),2;				copyarray $@partymembercidt2[0],$@partymembercid[0],$@members;				copyarray $@partymemberaidt2[0],$@partymemberaid[0],$@members;				for (set .@i,0; .@i<$@members; set .@i,.@i+1) {					if(isloggedin($@partymemberaidt2[.@i],$@partymembercidt2[.@i])) set .@count,.@count+1;				}				if(.@count < $@members) {					mes "You need all your party members to be online to Register";					close;				}				set $@TeamID2, getcharid(1);					initnpctimer;					mes "Your Party is now subscribed, good luck!";					announce "Team 2 : [ " +getpartyname($@TeamID2)+ " ] has sign up For the Team War!",bc_blue|bc_map;				doevent "teamwar::OnSubscriptionTeam";					close;				} else {					mes "I'm sorry! Another Team has sign up before you...";					close;			}		}	} else {		mes "[Event Handler]";		mes "Please contact your party leader.";		mes "Your team must have a party consisting of "+$@members+" members.";		close;	}OnSubscriptionTeam:	getpartymember($@TeamID2),1;	getpartymember($@TeamID2),2;	copyarray $@partymembercidtc2[0],$@partymembercid[0],$@members;	copyarray $@partymemberaidc2[0],$@partymemberaid[0],$@members;	for (set .@i,0; .@i<$@members; set .@i,.@i+1) {		if(isloggedin($@partymemberaidc2[.@i],$@partymembercidtc2[.@i])) set .@countx,.@countx+1;	}	if(.@countx < $@members) {		announce "Team War : "+getpartyname($@TeamID2)+"are not all online the match has been canceled",0;		announce "Team War : registration for 2 new teams are now available",0;		goto lend;	}	if ( $@TeamID2 && $@partymembercount != $@members ) {		announce getpartyname($@TeamID2) +" has extra party members !", 0;		goto lend;	}	getpartymember($@TeamID1),1;	getpartymember($@TeamID1),2;	copyarray $@partymembercidtc1[0],$@partymembercid[0],$@members;	copyarray $@partymemberaidc1[0],$@partymemberaid[0],$@members;	for (set .@i,0; .@i<$@members; set .@i,.@i+1) {		if(isloggedin($@partymemberaidc1[.@i],$@partymembercidtc1[.@i])) set .@countz,.@countz+1;	}	if(.@countz < $@members) {		announce "Team War : "+getpartyname($@TeamID1)+"are not all online the match has been canceled",0;		announce "Team War : registration for 2 new teams are now available",0;		goto lend;	}	if ( $@TeamID1 &&  $@partymembercount != $@members ) {		announce getpartyname($@TeamID1) +" has extra party members !", 0;		goto lend;	}	if($@TeamID1!=0 && $@TeamID2!=0){		announce "Team War : We have 2 Teams signed up now : "+getpartyname($@TeamID1)+" and "+getpartyname($@TeamID2)+".",bc_blue|bc_map;		set @win1, 0;		set @win2, 0;		goto Onstart;	}	end;OnTimer50000:	if (($@TeamID1!=0) && ($@TeamID2!=0)) {		stopnpctimer;		end;	}	stopnpctimer;	set $@TeamID1, 0;	set $@TeamID1, 0;	announce "Team War : we lack teams to start registration for two teams are now available",0;	end;	OnStart:	warpparty "guild_vs2",89,49,$@TeamID1;	warpparty "guild_vs2",11,49,$@TeamID2;	set $@start,1;	end;lend:	stopnpctimer;	set $@TeamID1,0;	set $@TeamID2,0;	set $@start,0;	set @win1,0;	set @win2,0;	set @partymembercount,$@members;	announce "Thanks for playing",0;	end;OnTimer250000:	Announce "Team War : No Party won due to time limit!",0;	mapwarp "guild_vs2","prontera",156,191;	goto lend;	end;OnPCDieEvent:OnPCLogoutEvent:	if(strcharinfo(3) != "guild_vs2") end;	warp "prontera",156,191;	for(set .@i, 0; .@i < $@members; set .@i, .@i + 1) {		if ( $@partymembercidt1[.@i] == getcharid(0)) {			deletearray $@partymembercidt1[.@i], 1;			deletearray $@partymemberaidt1[.@i], 1;			if( getarraysize($@partymembercidt1) == 0 ) {				set @win2,getarraysize($@partymembercidt2);				goto onwin;			}		}		if ( $@partymembercidt2[.@i] == getcharid(0) ) {			deletearray $@partymembercidt2[.@i], 1;			deletearray $@partymemberaidt2[.@i], 1;			if( getarraysize($@partymembercidt2)  == 0 ) {				set @win1,getarraysize($@partymembercidt1);				goto onwin;			}		}	}	end;onwin:	if (@win1==0) {		warpparty "prontera",156,191,$@TeamID1;		warpparty "prontera",156,191,$@TeamID2;		Announce "Team War :"+GetPartyName($@TeamID2)+" won",0;		for ( .@i = 0; .@i < @win2; .@i++ )			getitem 7588, rand(6,10), $@partymemberaidt2[.@i];		goto lend;	}	if (@win2==0) {		warpparty "prontera",156,191,$@TeamID1;		warpparty "prontera",156,191,$@TeamID2;		Announce "Team War :"+GetPartyName($@TeamID1)+" won",0;		for ( .@i = 0; .@i < @win1; .@i++ )			getitem 7588, rand(6,10), $@partymemberaidt1[.@i];		goto lend;	}	end;}guild_vs2	mapflag	nosave	SavePointguild_vs2	mapflag	nomemoguild_vs2	mapflag	nobranchguild_vs2	mapflag	pvp_noguildguild_vs2	mapflag	nocommand	60guild_vs2	mapflag	noicewallguild_vs2	mapflag	pvpguild_vs2	mapflag	partylock  

 

 

 

 

Now the script itself is amazing, but it just lacks one function, A Job check. since it would really be nice to have no duplicate jobs ( knight:knight = denied | knight:crusader = allowed )

 

so i continued my search for it, then I found this 

Annakid's Post at some support thread.

 

 

 

 

getpartymember(getcharid(1),2);copyarray .@partyids[0],$@partymembercid[0],$@partymembercount;set .@count, $@partymembercount;for (set .@a, 0; .@a < .@count; set .@a, .@a + 1) {attachrid .@partyids[.@a];set .@jobs[.@a], Class;// Check Job from other current jobsfor (set .@b, 0; .@b < getarraysize(.@jobs); set .@b, .@b + 1) {if (Class == .@jobs[.@b]) {set .@matches, .@matches + 1;}}// Check if this job as too manyif (.@matches > 2) { // Too Many of the Same Job }// Less than 2, so reset counter for next playerset .@matches, 0;}  

 

 

 

 

but I tried to merge it to annie's script and no luck, it didn't work, so i decided to use annakid's script as a portal to get to annie's partyvsparty script but even though I have 2 Blacksmiths at my party it does not block my party from warping.

 

What I really want to ask for is how do we put a DUAL JOB/CLASS Restriction on Annie's PVP Party vs Party Script.

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

 

 

prontera,159,179,4    script    Team Wars::teamwar    899,{    if (getgmlevel() >= 99){	    menu "standard menu",standard,"reset",lend;    }    standard:    set $@members,2; // number of party members change this to your party size you want    set $@start,0;       	 getpartymember(getcharid(1));    set @partymembercount,$@partymembercount;    if ( $@start == 1 ) {	    mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";	    close;    }    if ( @partymembercount == $@members ) {	    if ( $@TeamID1 == getcharid(1) ) {		    mes "Do you wish to sign out your team?";   			 next;   			 if (select("I Give up ~.","Never Say Quit !!")==2) close;   			 announce "Team 1 : [ " + getpartyname($@TeamID1) + " ] has sign out. We need another Party to sign up now!",bc_yellow|bc_map;   			 set $@TeamID1, 0;		    close;   		 }	    if ($@TeamID2==getcharid(1)) {   			 mes "Do you wish to sign out your team?";   			 next;   			 if (select("I Give up ~.","Never Say Quit !!")==2) close;		    announce "Team 2 : [ " + getpartyname($@TeamID2) + " ] has sign out. We need another Party to sign up now!",bc_yellow|bc_map;   			 set $@TeamID2, 0;   			 close;   		 }        mes "[  Team War  ]";	    mes "Hello "+strcharinfo(0)+" what do you want?";        next;	    if (($@TeamID1!=0) && ($@TeamID2!=0)) {		    mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";		    close;	    }	    if ( getpartyleader(getcharid(1),2) != getcharid(0) ) {		    mes "Only party leader have the right to sign up / out from the game with me..";		    close;	    }        mes "[  Team War  ]";	    mes "Choose your team to register.";	    switch(select("^ff0000Red Team ^000000 - [" + GetPartyName($@TeamID1) + "] :^0000ffBlue Team^000000 - [" + GetPartyName($@TeamID2) + "]")) {	    case 1:   			 if ($@TeamID1==0 || getpartyname($@TeamID1)=="null") {           				 getpartymember(getcharid(1)),1;			    getpartymember(getcharid(1)),2;			    copyarray $@partymembercidt1[0],$@partymembercid[0],$@members;			    copyarray $@partymemberaidt1[0],$@partymemberaid[0],$@members;               				 for (set .@i,0; .@i<$@members; set .@i,.@i+1) {				    if(isloggedin($@partymemberaidt1[.@i],$@partymembercidt1[.@i]))  set .@count,.@count+1;			    }               				 if(.@count < $@members) {				    mes "You need all your party members to be online to Register";				    close;			    }                                if ( callfunc("party_has_duplicate_job") ) {                    mes "Too many jobs";                    close;                }			    set $@TeamID1, getcharid(1);   				 initnpctimer;   				 mes "Your Party is now subscribed, good luck!";   				 announce "Team 1 : [ " +getpartyname($@TeamID1)+ " ] has sign up For the Team War!",bc_blue|bc_map;			    doevent "teamwar::OnSubscriptionTeam";   				 close;               			 } else {			    mes "I'm sorry! Another Team has sign up before you...";   				 close;   			 }           		 case 2:    mes "[  Team War  ]";		    if ($@TeamID2==0 || getpartyname($@TeamID2)=="null") {   				 getpartymember(getcharid(1)),1;			    getpartymember(getcharid(1)),2;			    copyarray $@partymembercidt2[0],$@partymembercid[0],$@members;			    copyarray $@partymemberaidt2[0],$@partymemberaid[0],$@members;			    for (set .@i,0; .@i<$@members; set .@i,.@i+1) {				    if(isloggedin($@partymemberaidt2[.@i],$@partymembercidt2[.@i]))                        set .@count,.@count+1;			    }               				 if(.@count < $@members) {				    mes "You need all your party members to be online to Register";				    close;			    }                                if ( callfunc("party_has_duplicate_job") ) {                    mes "too many jobs";                    close;                }               				 set $@TeamID2, getcharid(1);   				 initnpctimer;   				 mes "Your Party is now subscribed, good luck!";   				 announce "Team 2 : [ " +getpartyname($@TeamID2)+ " ] has sign up For the Team War!",bc_blue|bc_map;			    doevent "teamwar::OnSubscriptionTeam";   				 close;   			 } else {   				 mes "I'm sorry! Another Team has sign up before you...";   				 close;		    }	    }    } else {	    mes "[Event Handler]";	    mes "Please contact your party leader.";	    mes "Your team must have a party consisting of "+$@members+" members.";	    close;    }OnSubscriptionTeam:    getpartymember($@TeamID2),1;    getpartymember($@TeamID2),2;    copyarray $@partymembercidtc2[0],$@partymembercid[0],$@members;    copyarray $@partymemberaidc2[0],$@partymemberaid[0],$@members;    for (set .@i,0; .@i<$@members; set .@i,.@i+1) {	    if(isloggedin($@partymemberaidc2[.@i],$@partymembercidtc2[.@i])) set .@countx,.@countx+1;    }    if(.@countx < $@members) {	    announce "Team War : "+getpartyname($@TeamID2)+"are not all online the match has been canceled",0;	    announce "Team War : registration for 2 new teams are now available",0;	    goto lend;    }    if ( $@TeamID2 && $@partymembercount != $@members ) {	    announce getpartyname($@TeamID2) +" has extra party members !", 0;	    goto lend;    }   	 getpartymember($@TeamID1),1;    getpartymember($@TeamID1),2;    copyarray $@partymembercidtc1[0],$@partymembercid[0],$@members;    copyarray $@partymemberaidc1[0],$@partymemberaid[0],$@members;    for (set .@i,0; .@i<$@members; set .@i,.@i+1) {	    if(isloggedin($@partymemberaidc1[.@i],$@partymembercidtc1[.@i])) set .@countz,.@countz+1;    }    if(.@countz < $@members) {	    announce "Team War : "+getpartyname($@TeamID1)+"are not all online the match has been canceled",0;	    announce "Team War : registration for 2 new teams are now available",0;	    goto lend;    }    if ( $@TeamID1 &&  $@partymembercount != $@members ) {	    announce getpartyname($@TeamID1) +" has extra party members !", 0;	    goto lend;    }   	 if($@TeamID1!=0 && $@TeamID2!=0){	    announce "Team War : We have 2 Teams signed up now : "+getpartyname($@TeamID1)+" and "+getpartyname($@TeamID2)+".",bc_blue|bc_map;	    set @win1, 0;	    set @win2, 0;	    goto Onstart;    }    end;OnTimer50000:    if (($@TeamID1!=0) && ($@TeamID2!=0)) {	    stopnpctimer;	    end;    }    stopnpctimer;    set $@TeamID1, 0;    set $@TeamID1, 0;    announce "Team War : we lack teams to start registration for two teams are now available",0;    end;    OnStart:    warpparty "guild_vs2",89,49,$@TeamID1;    warpparty "guild_vs2",11,49,$@TeamID2;    set $@start,1;    end;lend:    stopnpctimer;    set $@TeamID1,0;    set $@TeamID2,0;    set $@start,0;    set @win1,0;    set @win2,0;    set @partymembercount,$@members;    announce "Thanks for playing",0;    end;OnTimer250000:    Announce "Team War : No Party won due to time limit!",0;    mapwarp "guild_vs2","prontera",156,191;    goto lend;    end;OnPCDieEvent:OnPCLogoutEvent:    if(strcharinfo(3) != "guild_vs2") end;    warp "prontera",156,191;    for(set .@i, 0; .@i < $@members; set .@i, .@i + 1) {	    if ( $@partymembercidt1[.@i] == getcharid(0)) {		    deletearray $@partymembercidt1[.@i], 1;		    deletearray $@partymemberaidt1[.@i], 1;		    if( getarraysize($@partymembercidt1) == 0 ) {			    set @win2,getarraysize($@partymembercidt2);			    goto onwin;		    }	    }	    if ( $@partymembercidt2[.@i] == getcharid(0) ) {		    deletearray $@partymembercidt2[.@i], 1;		    deletearray $@partymemberaidt2[.@i], 1;		    if( getarraysize($@partymembercidt2)  == 0 ) {			    set @win1,getarraysize($@partymembercidt1);			    goto onwin;		    }	    }    }    end;onwin:    if (@win1==0) {	    warpparty "prontera",156,191,$@TeamID1;	    warpparty "prontera",156,191,$@TeamID2;	    Announce "Team War :"+GetPartyName($@TeamID2)+" won",0;	    for ( .@i = 0; .@i < @win2; .@i++ )		    getitem 7588, rand(6,10), $@partymemberaidt2[.@i];	    goto lend;    }    if (@win2==0) {	    warpparty "prontera",156,191,$@TeamID1;	    warpparty "prontera",156,191,$@TeamID2;	    Announce "Team War :"+GetPartyName($@TeamID1)+" won",0;	    for ( .@i = 0; .@i < @win1; .@i++ )		    getitem 7588, rand(6,10), $@partymemberaidt1[.@i];	    goto lend;    }    end;}function    script    party_has_duplicate_job    {    set .@party_id, getarg( 0, getcharid(1) );    // Loading party members variables    getpartymember .@party_id, 1;    getpartymember .@party_id, 2;    // Keep rid attached.    set .@rid, playerattached();    // Check all members    for ( set .@i,0; .@i<$@partymembercount; set .@i, .@i+1 ) {	    // Online user	    if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i]) )	    {		    // Attach the member to access "Class"		    attachrid( $@partymemberaid[.@i] );		    if ( compare( .@tmp_class$ + "|", "|" + Class + "|" ) )		    {			    if ( .@rid )				    attachrid(.@rid);			    else				    detachrid;			    return 1;		    }		    set .@tmp_class$, .@tmp_class$ + "|" + Class;	    }	    // Offline user (use sql)	    else {		    set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) + "`char_id`='" + $@partymembercid[.@i] + "' ";		    set .@sql_i, .@sql_i + 1;	    }    }    // SQL for offline users    if ( getstrlen(.@sql$) )    {	    // get class from offline members	    set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class );	    // Check the class.	    for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 ) {		    if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) )		    {			    if ( .@rid )				    attachrid(.@rid);			    else				    detachrid;			    return 1;		    }		    set .@tmp_class$, .@tmp_class$ + "|" + .@class[.@i];	    }    }   	 // Restore RID.    if ( .@rid )	    attachrid(.@rid);    else	    detachrid;    return 0;}guild_vs2    mapflag    nosave    SavePointguild_vs2    mapflag    nomemoguild_vs2    mapflag    nobranchguild_vs2    mapflag    pvp_noguildguild_vs2    mapflag    nocommand    60guild_vs2    mapflag    noicewallguild_vs2    mapflag    pvpguild_vs2    mapflag    partylock

 

 

credits KeyWorld.

Edited by quesoph

Share this post


Link to post
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.   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.