Jump to content

Partyinvite Script Command


Xantara

Recommended Posts


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

File Name: Partyinvite Script Command

File Submitter: Xantara

File Submitted: 08 Aug 2012

File Category: Source Modifications

Content Author: Xantara

Information

This script command will will add the player attached to the party specified by the id.

Syntax

partyinvite(<party id>{,<type>});

Documentation

This function will add the player attached to the party specified by the id.

If type is 1 or omitted, player will be added to the party only if player

has no current party. Otherwise, player will leave their current

party and add them to the new party.

If party does not exist, player is already in the party, party is full,

or player has a party (for type 1), this function will return 0.

If successful, it will return 1.

[Made by Xantara]

Mirror

Credits

Created by @Xantara

Requested by @Tetsuken

88x31.png

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Do not mirror without my consent.

Click here to download this file

  • Upvote 6
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

Can you add this to the SVN? ;D

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

Wow..this is great !! finally a party inviting command has come out after so long we have waiting for this ~ haha

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Please, add this to SVN. xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

I think that would be a great addition to the SVN :o! Especially during instances creations, memorial dungeons, etc. :o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

I believe this should still work but it was made a while ago. If someone has downloaded and tried it out, please let me know how it turned out. Especially if there are any bugs. This will help me know if I should submit a request to add to the SVN or not (not guaranteed). Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Yep remind me a bit of partyjoin but still good to add some cmd.

About bug I didn't try it to be sure but I'm quite sure it wont be good :

"If I already have a team and type 1 and 2 ain't specified you'll had me on a second team (best scenario) or make it crash (worse).."

So either we had a if(!(type&3)) return 0; //check if valid type.

Or we need to change type check..

Also but that quite minor you're returning 1 (success) assuming player was added correctly even trought it may fail on this reply (but since those return nothing ain't much you can do about it ithout affecting other functions...)

nb :

why not using ARR_FIND to remove thatuseless flag var ?

ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == 0);
if (i >= MAX_PARTY) push0.....

Edited by Lighta
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  243
  • Reputation:   206
  • Joined:  11/28/11
  • Last Seen:  

@Lighta, thanks for the bug report~

@Topic, I updated the patch file to v1.1 to fix the bugs Lighta mentioned and optimized it with the ARR_FIND macro. As requested by a user, I have also uploaded a sample NPC script that will add a member to the party.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Oki glad to help, now it's just your explanation that is a bit trickie.

At first read I tought that I'll join the party if I could (mean party not full and I'm not already part in it) but then I realise type was default to 1.

So yep all good, if I want to force join a party I have to specify a type !=1

(I personally would default to 0 and specify both case, so easier to get it but it correct =)

Now only real issue is that it will return 1 (succes) even if char-server down (wich will really be a failure).

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

File Name: Partyinvite Script Command

File Submitter: Xantara

File Submitted: 08 Aug 2012

File Category: Source Modifications

Content Author: Xantara

Information

This script command will will add the player attached to the party specified by the id.

Syntax

partyinvite(<party id>{,<type>});

Documentation

This function will add the player attached to the party specified by the id.

If type is 1 or omitted, player will be added to the party only if player

has no current party. Otherwise, player will leave their current

party and add them to the new party.

If party does not exist, player is already in the party, party is full,

or player has a party (for type 1), this function will return 0.

If successful, it will return 1.

[Made by Xantara]

Mirror

Credits

Created by @Xantara

Requested by @Tetsuken

88x31.png

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Do not mirror without my consent.

Click here to download this file

is this correct?

partyinvite TeamA,1;

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
Reply to this topic...

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