Jump to content
  • 0

Disguising entire party


Question

Posted

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!

6 answers to this question

Recommended Posts

Posted

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. 

Posted
.@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

Posted

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;

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...