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;
}
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.
Share this post
Link to post
Share on other sites