Jump to content
  • 0
Amalgam

How to check party leader

Question

Hello,

 

Can anybody help me. I want a npc to check if party leader is dead.

 

Like when party leader is dead. the npc will say "Your party leader is dead".

 

 

Thank you.

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

 

 

try this

 

-	script	asdf1234	-1,{end;OnPCDieEvent:	set .@pid,getcharid(1);	if(!.@pid) end;	set .@daid,getcharid(3);	if(getpartyleader(.@pid,1)== .@daid ) {		getpartymember getcharid(1),2;		for(set .@i,0;.@i<$@partymembercount;set .@i,.@i+1) {			if($@partymemberaid[.@i]==.@daid) continue;			if(attachrid($@partymemberaid[.@i])) 				message strcharinfo(0), "Your party leader is dead!";		}	}end;}

 

 

Hello,

 

Im trying to add it here. can you help me.

 

if ( GetPartyLeader(getcharid(1),2) == getcharid(0)) {		mes "Sorry, I cant warp you. You are the party leader.";	}else if( !isloggedin( .@party_leader_aid,.@party_leader_cid ) ){		mes "Party Leader not online...";	}else if( strcharinfo(3) == .@party_leader_map$ ){		mes "Both of you at same map.";	}else if( !Hp ){		mes "Your party leader is dead. I can't warp you there.";

 

Thank you!

 

try to change this line

}else if( !Hp ){

to

} else if(set(.@tempaid,getcharid(3)) && attachrid(GetPartyLeader(getcharid(1),1)) && !Hp && attachrid(.@tempaid) ) {

Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

try this

 

-	script	asdf1234	-1,{end;OnPCDieEvent:	set .@pid,getcharid(1);	if(!.@pid) end;	set .@daid,getcharid(3);	if(getpartyleader(.@pid,1)== .@daid ) {		getpartymember getcharid(1),2;		for(set .@i,0;.@i<$@partymembercount;set .@i,.@i+1) {			if($@partymemberaid[.@i]==.@daid) continue;			if(attachrid($@partymemberaid[.@i])) 				message strcharinfo(0), "Your party leader is dead!";		}	}end;}
Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

 

try this

 

-	script	asdf1234	-1,{end;OnPCDieEvent:	set .@pid,getcharid(1);	if(!.@pid) end;	set .@daid,getcharid(3);	if(getpartyleader(.@pid,1)== .@daid ) {		getpartymember getcharid(1),2;		for(set .@i,0;.@i<$@partymembercount;set .@i,.@i+1) {			if($@partymemberaid[.@i]==.@daid) continue;			if(attachrid($@partymemberaid[.@i])) 				message strcharinfo(0), "Your party leader is dead!";		}	}end;}

 

 

Hello,

 

Im trying to add it here. can you help me.

 

if ( GetPartyLeader(getcharid(1),2) == getcharid(0)) {		mes "Sorry, I cant warp you. You are the party leader.";	}else if( !isloggedin( .@party_leader_aid,.@party_leader_cid ) ){		mes "Party Leader not online...";	}else if( strcharinfo(3) == .@party_leader_map$ ){		mes "Both of you at same map.";	}else if( !Hp ){		mes "Your party leader is dead. I can't warp you there.";

 

Thank you!

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.