Xantara Posted August 8, 2012 Posted August 8, 2012 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 [scriptcmd]_(Xantara)_partyinvite_1.1.patch Credits Created by @Xantara Requested by @Tetsuken 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 6 Quote
Emistry Posted August 8, 2012 Posted August 8, 2012 Wow..this is great !! finally a party inviting command has come out after so long we have waiting for this ~ haha Quote
Mystery Posted August 9, 2012 Posted August 9, 2012 I think that would be a great addition to the SVN ! Especially during instances creations, memorial dungeons, etc. Quote
Xantara Posted August 13, 2012 Author Posted August 13, 2012 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! Quote
Lighta Posted August 15, 2012 Posted August 15, 2012 (edited) 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 August 15, 2012 by Lighta Quote
Xantara Posted September 1, 2012 Author Posted September 1, 2012 @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. Quote
Lighta Posted September 2, 2012 Posted September 2, 2012 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). Quote
PewN Posted October 3, 2012 Posted October 3, 2012 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 [scriptcmd]_(Xantara)_partyinvite_1.1.patch Credits Created by @Xantara Requested by @Tetsuken 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; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.