Jump to content
  • 0
Helena

Party vs party. Both leaders must click NPC before it starts?

Question

Hi Herc!

 

I'm using a party vs party script which both work perfectly aside one small issue. 

 

What i want is that both party leaders must give their "ok" before the event starts. I thought this was possible through a simple set ready_red,1; and set ready_blue,1; but apparently this label checks if the character that clicks the NPC has both sets (while obviously team red characters wont have a ready_blue == 1 label).

 

How can i make this happen? Party leader both should say "we're ready!" before the script works?

 

Here's the part that I'll need support with:

 

 

	menu "- We're good to go!",-;		if($@DAstart == 2 || $@DAstart == 1){		mes "[Faction Controller]";		mes "There is currently a match in progress. I will be able to assist you once this match is over.";		close;		}		if(getareausers("izlude_da",90,235,120,270) < 2 && getareausers("izlude_da",235,90,270,120) <= 2 || getareausers("izlude_da",90,235,120,270) <= 2 && getareausers("izlude_da",235,90,270,120) < 2)		{		mes "[Faction Controller]";		mes "We can't start yet, there need to be at least 2 players on each side.";		close;		}		if (blue_ready == 1 || red_ready == 1){		enablenpc "Factionwar";		close2;		set $@DAstart,0;		set $@paxPoint,0;			set $@rekPoint,0;		set $@ATKstatus,0;		set $@DEFstatus,0;		set $@wallStatus,0;		donpcevent "Factionwar::OnCheck";		}		if(getfaction() == 2){		mes "[Faction Controller]";		mes "Great! Now we must wait until Red is ready as well.";		set blue_ready,1;		close;		}		if(getfaction() == 3){		mes "Great! Now we must wait until Blue is ready as well.";		set red_ready,1;		close;		}		if(blue_ready < 1 || red_ready < 1){		mes "[Faction Controller]";		mes "Hang on please. The other Faction isn't ready yet.";				close2;				if(getfaction() == 3){				set red_ready,1;				}				if(getfaction() == 2){				set blue_ready,1;				}		}		L_Noty2:	mes "[Faction Controller]";	mes "Please let me know if I can be of service!";	close;	}
Edited by Helena

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You have custom script using getfaction.

I guess you can add .variables (npc variable) and set them +1 everytime party leader does click OK , Also set another variable which will be player var, to know that this party has already selected OK.

And instead of getfaction() and one more check to check party/faction leader.

Share this post


Link to post
Share on other sites
  • 0

You have custom script using getfaction.

I guess you can add .variables (npc variable) and set them +1 everytime party leader does click OK , Also set another variable which will be player var, to know that this party has already selected OK.

And instead of getfaction() and one more check to check party/faction leader.

 

Sir Dastgir, sorry if I'm not good at explaining. can you give an example?

 

What i want is an alternative for set red_ready,1 and set blue_ready,1 because they do not sum eachother up. I tried && instead of || but faction blue doesnt get the set red_ready,1 label so && will not bring me to desired dialogue.

|| will bring me to the start screen if one of two leaders clicks it twice because || it's a either a this or that script command (sorry I'm bad at explaining). But that means leader of party #1 can click that option twice and the event will start.... :(

 

Basically, while party leader #1 is making a choice, I want a check that partyleader #2 has also clicked the "We're ready!" to be included in the script somehow. Thats my support question. So only if both partyleaders clicked "We're ready!" it starts the event. Until then it should not start. Does that make any sense?

Edited by Helena

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

×
×
  • Create New...

Important Information

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