Jump to content
  • 0

my ideal pvp mode


joelolopez

Question


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

party vs party match

 

lets say 3 vs 3

 

if a member dies he will stay dead

and after (n) secs he will be automaticaly resurected full hp/sp

 

in order to win:

 

the opposing team must kill

the whole party before they got resurected again

 

 

the whole party of the winning team will receive

random prizes

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@joelolopez

I totally mess this part.. thanks !

prontera,150,145,5	script	register	56,{
function isreq;

	callsub L_check;
	select( "Register ?" );

	if( !getcharid(1) ) {
		mes "you're not in a party";
		close;
	}
	else if( .party1 == getcharid(1) || .party2 == getcharid(1) ) {
		mes "you're already on my list";
		close;
	}
	getpartymember getcharid(1);
	if( $@partymembercount != .count_req || !instance_check_party( getcharid(1),.count_req ) ) {
		mes "you need "+ .count_req +" players online in your party";
		close;
	}
	callsub L_check;
	if( !.party2 )
		.party2 = getcharid(1);
	else
		.party1 = getcharid(1);
	dispbottom "your party is now on my list";
	if( !.party1 || !.party2 ) end;

	.start = 1;
	warpparty .map_event$, 0,0, .party1;
	warpparty .map_event$, 0,0, .party2;
	initnpctimer;
	end;

OnPCKillEvent:
	.@self = getcharid(3);
	.@killed = killedrid;
	.@is_reg = isreq();
	attachrid( .@killed );
	if( !isreq() ) end;
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	for( .@i = 0; .@i < $@partymembercount; .@i++ ) {
		if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
			attachrid( $@partymemberaid[.@i] );
			sleep2 1;
			if( strcharinfo(3) == .map_event$ ) {
				.@is_online += 1;
				if( Hp < 1 )
					.@count += 1;
			}
		}
	}
	if( .@is_online != .@count ) {
		attachrid( .@killed );
		sleep2( .wait * 1000 );
		atcommand "@alive";
		end;
	}
	else if( !.@is_reg ) end;

	attachrid( .@self );
	sleep2 2;
	announce "team "+ getpartyname( getcharid(1) ) +" win the event !", 0;
	getpartymember getcharid(1);
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	for( .@i = 0; .@i < $@partymembercount; .@i++ )
		if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
			getmapxy .@map$, .@x, .@y, 0, $@partymembername$[.@i];
			if( .@map$ == .map_event$ )
				getitem .item_id, .item_count, $@partymemberaid[.@i];
		}
	stopnpctimer;
	sleep 3000;

OnTimer300000:	// 5 min then end of event
	.start = .party1 = .party2 = 0;
	mapwarp .map_event$,"prontera",0,0;
	end;

L_check:
	if( .start ) end;
	else if( getpartyname( .party1 ) == "null" )
		.party1 = 0;
	else if( getpartyname( .party2 ) == "null" )
		.party2 = 0;
	else if( getpartyname( .party1 ) != "null" ) {
		getpartymember .party1;
		if( $@partymembercount != .count_req || !instance_check_party( .party1,.count_req ) )
			.party1 = 0;
	}
	else if( getpartyname( .party2 ) != "null" ) {
		getpartymember .party2;
		if( $@partymembercount != .count_req || !instance_check_party( .party2,.count_req ) )
			.party2 = 0;
	}
	return;

function isreq {
	if( strcharinfo(3) == .map_event$ && .start && ( getcharid(1) == .party1 || getcharid(1) == .party2 ) ) return 1;
	return 0;
}
OnInit:
	.map_event$ = "geffen";	// your event map
	.count_req = 1;	// count required in the party to start the event
	.wait = 20;		// time in secs to be rezu
	.item_id = 501;	// item id gained
	.item_count = 1;	// item count gained

	setmapflag .map_event$,mf_noteleport;
	setmapflag .map_event$,mf_nowarp;
	setmapflag .map_event$,mf_nowarpto;
	setmapflag .map_event$,mf_nomemo;
	setmapflagnosave .map_event$,"prontera",0,0;
	setmapflag .map_event$,mf_partylock;
	setmapflag .map_event$,mf_pvp;
	end;
}

 

Now those who leave the event map are not in the killed list + can't gain a reward.

 

 

 

 

 

Capuchin the mapflagnosave prontera I need to change that to my event map or what?

No don't touch the map name in the mapflag. Just change the setting :

	.map_event$ = "geffen";	// your event map
	.count_req = 1;	// count required in the party to start the event
	.wait = 20;		// time in secs to be rezu
	.item_id = 501;	// item id gained
	.item_count = 1;	// item count gained
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Try this

 

- EDIT : please take the last script -

 

Put your setting at the end of the script.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

WOW capuche your awesome i love it!!!


 



sir capuche can you add something on this script

 

 

-disqualification system (for those who leave the map)


 


because of this case:


 


when the other "killed members" left the event map


the other members left inside still resurrected again and again whenever they are killed


 


and thats why the script cant decide whos party is the  winner /slur

Edited by joelolopez
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Capuchin the mapflagnosave prontera I need to change that to my event map or what?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

ty ty



and if i want to ladn the party 1 here guild_vs1 59 65 and party 2 here guild_vs1 25 96

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

ty ty

and if i want to ladn the party 1 here guild_vs1 59 65 and party 2 here guild_vs1 25 96

 

  •  Then change the setting for your event map here :
OnInit:
	.map_event$ = "geffen";	// your event map

geffen -> guild_vs1

 

 

  • Change the xY for party 1 and 2 in (instead of 0,0 )
	warpparty .map_event$, 0,0, .party1;
	warpparty .map_event$, 0,0, .party2;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

and why i can kill my party member?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

and why i can kill my party member?

Because of the mapflag pvp_noparty on your event map. Check your conf/mapflag/pvp_noparty.txt, by default this mapflag is enabled on guild_vs1

 

 

//===== Description: =========================================

//= Ignores party alliances on PvP-enabled maps.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

tnx sir capuche, im going to test this and i going to update you sir if theres still need to be fix /kis2/no1



100% working sir!!!! no problems encountered!!! u r super sir capuche!!! i think im going to cry /slur

 

sir question

 

.item_id = 501;    // item id gained     <<< is this an array?can i make it like this?to make it random ? its either 501 or 502 the prize you will receive?

 

 

.item_id = 501,502;    // item id gained

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   2
  • Joined:  03/16/13
  • Last Seen:  

Dude capuche the script super good but can add some mes how to play rules etc hehehehe

:D

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@joelolopez
 

.item_id = 501;    // item id gained     <<< is this an array?can i make it like this?to make it random ? its either 501 or 502 the prize you will receive?


is not an array.
 

prontera,150,145,5	script	register	56,{
function isreq;

	callsub L_check;
	if( select( "Register ?", "Informations" ) == 2 ) {
		mes "info blablabla fill it as your content";
		close;
	}

	if( !getcharid(1) ) {
		mes "you're not in a party";
		close;
	}
	else if( .party1 == getcharid(1) || .party2 == getcharid(1) ) {
		mes "you're already on my list";
		close;
	}
	getpartymember getcharid(1);
	if( $@partymembercount != .count_req || !instance_check_party( getcharid(1),.count_req ) ) {
		mes "you need "+ .count_req +" players online in your party";
		close;
	}
	callsub L_check;
	if( !.party2 )
		.party2 = getcharid(1);
	else
		.party1 = getcharid(1);
	dispbottom "your party is now on my list";
	if( !.party1 || !.party2 ) end;

	.start = 1;
	warpparty .map_event$, 0,0, .party1;
	warpparty .map_event$, 0,0, .party2;
	initnpctimer;
	end;

OnPCKillEvent:
	.@self = getcharid(3);
	.@killed = killedrid;
	.@is_reg = isreq();
	attachrid( .@killed );
	if( !isreq() ) end;
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	for( .@i = 0; .@i < $@partymembercount; .@i++ ) {
		if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
			attachrid( $@partymemberaid[.@i] );
			sleep2 1;
			if( strcharinfo(3) == .map_event$ ) {
				.@is_online += 1;
				if( Hp < 1 )
					.@count += 1;
			}
		}
	}
	if( .@is_online != .@count ) {
		attachrid( .@killed );
		sleep2( .wait * 1000 );
		atcommand "@alive";
		end;
	}
	else if( !.@is_reg ) end;

	attachrid( .@self );
	sleep2 2;
	announce "team "+ getpartyname( getcharid(1) ) +" win the event !", 0;
	getpartymember getcharid(1);
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	for( .@i = 0; .@i < $@partymembercount; .@i++ )
		if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
			getmapxy .@map$, .@x, .@y, 0, $@partymembername$[.@i];
			if( .@map$ == .map_event$ ) {
				for( .@j = 0; .@j < .size_reward; .@j++ )
					getitem .item_id[.@j], .item_count[.@j], $@partymemberaid[.@i];
			}
		}
	stopnpctimer;
	sleep 3000;

OnTimer300000:	// 5 min then end of event
	.start = .party1 = .party2 = 0;
	mapwarp .map_event$,"prontera",0,0;
	end;

L_check:
	if( .start ) end;
	else if( getpartyname( .party1 ) == "null" )
		.party1 = 0;
	else if( getpartyname( .party2 ) == "null" )
		.party2 = 0;
	else if( getpartyname( .party1 ) != "null" ) {
		getpartymember .party1;
		if( $@partymembercount != .count_req || !instance_check_party( .party1,.count_req ) )
			.party1 = 0;
	}
	else if( getpartyname( .party2 ) != "null" ) {
		getpartymember .party2;
		if( $@partymembercount != .count_req || !instance_check_party( .party2,.count_req ) )
			.party2 = 0;
	}
	return;

function isreq {
	if( strcharinfo(3) == .map_event$ && .start && ( getcharid(1) == .party1 || getcharid(1) == .party2 ) ) return 1;
	return 0;
}
OnInit:
	.map_event$ = "geffen";	// your event map
	.count_req = 1;	// count required in the party to start the event
	.wait = 20;		// time in secs to be rezu
	setarray .item_id, 501;		// item id array gained
	setarray .item_count, 1;	// item count array gained - must be same size of .item_id array

// Don't touch this part
// ---------------------
	.size_reward = getarraysize( .item_id );
	setmapflag .map_event$,mf_noteleport;
	setmapflag .map_event$,mf_nowarp;
	setmapflag .map_event$,mf_nowarpto;
	setmapflag .map_event$,mf_nomemo;
	setmapflagnosave .map_event$,"prontera",0,0;
	setmapflag .map_event$,mf_partylock;
	setmapflag .map_event$,mf_pvp;
	end;
}

I include a reward array in this one.

 

 

 

Dude capuche the script super good but can add some mes how to play rules etc hehehehe
 

:D

I add a information menu in the script of this post. But you must fill out... it's your homework xD


 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

sir capuche what does the item count do?

 

if i set the configuration like this

 

setarray .item_id, 501,502;      
setarray .item_count, 1,3;

 

will ite give

 

(1x) 501 item

(3x) 502 item?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Yes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

once again sir capuche, thanks for making my requested script possible /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  03/26/13
  • Last Seen:  

how can i make this to 3vs3?

 thanks..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

dude find this line

 

.count_req = 1;    // count required in the party to start the event

 

change 1 to 3

 

.count_req = 3;    // count required in the party to start the event

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

Some suggestions, how do player know if someone is already in REGISTERED? possible? to make it expiration in 5minutes? so that another Party can register the said EVENT? so basically this one is first come first serve?

 

Please correct me if i'm wrong.


Thank you!

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...