Jump to content
  • 0
bWolfie

Can a player be forced to join a party?

Question

Hello,

I created this buildin which invites char id 2 to char id 1's party (CID1 must be online).
It sends char id 2 an invite as if char id 1 clicked their name and invited them.
What I want to know - is it possible to force join a character to a party without giving them the option to accept or decline?

Thanks.
 

/*
*party_invite(<char id 1>, <char id 2>)
Invites Char ID 2 to the party owned by Char ID 1.
Char ID 1 must be online.
Returns true on succession, false on failure.
*/
BUILDIN(party_invite)
{
	struct map_session_data *sd = script->charid2sd(st, script_getnum(st, 2));
	struct map_session_data *t_sd = script->charid2sd(st, script_getnum(st, 3));

	if (sd == NULL || t_sd == NULL)
		return false;

	if (!script_hasdata(st, 2) && !script_hasdata(st, 2)) {
		ShowError("Both Char IDs must be supplied.");
		return true;
	}

	if (party->invite(sd, t_sd))
		script_pushint(st, 1);
	else
		script_pushint(st, 0);
	
	return true;
}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
t_sd->party_invite = sd->status.party_id;
t_sd->party_invite_account = sd->status.account_id;

party->reply_invite(t_sd, sd->status.party_id, 1);

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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