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

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.