Jump to content
  • 0

Disguising entire party


Genesis

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   2
  • Joined:  12/01/11
  • Last Seen:  

Hey guys,

 

I have into a bit of a problem with something I am coding and wanted some advice. I want to make it so when the party leader speaks to a NPC, the entire party is disguised. I was debating the best way to do this, I assume it would be to add all the members of the party to an array and using a for loop? Then clearing the array once they are disguised? Do you guys have any suggestions? Thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

We have new  script  command addrid  for use

 

addrid(2,0,getcharid(1));

disguise.......
 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   2
  • Joined:  12/01/11
  • Last Seen:  

Is there any other way to accomplish this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

addrid command is the easiest way to do this. otherwise you need to go through each member and add each rid then do disguise

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   2
  • Joined:  12/01/11
  • Last Seen:  

What would be the procedure to manually add each rid and disguise it? I know the addrid command is available but I am just curious and want to expand my knowledge of the eA scripting language. 

Link to comment
Share on other sites


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

.@party_id = getcharid(1);
.@aid = getcharid(3);
if( .@party_id ){
	getpartymember .@party_id,2;
	for( .@i = 0; .@i < $@partymembercount; .@i++ )
		if( attachrid( $@partymemberaid[.@i] ) )
			disguise 1002;
	attachrid( .@aid );
	mes "You party are now disguised.";
}
close;

use getpartymember to get the Account ID then use attachrid to attach the user, then finally use disguise

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I would like to add getpartymember(1) and isloggedin to prevent to disguise the player logged on another character of his account

.@party_id = getcharid(1);
.@aid = getcharid(3);
if( .@party_id ){
    getpartymember .@party_id,1;
    getpartymember .@party_id,2;
    for( .@i = 0; .@i < $@partymembercount; .@i++ )
        if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) {
            attachrid( $@partymemberaid[.@i] );
            disguise 1002;
        }
    attachrid( .@aid );
    mes "You party are now disguised.";
}
close;
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
Answer this question...

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