Amalgam 1 Posted July 27, 2014 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. Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted July 27, 2014 (edited) 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 July 27, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
0 Amalgam 1 Posted July 27, 2014 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! Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted July 27, 2014 (edited) 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 July 27, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
0 Amalgam 1 Posted July 27, 2014 Thank you so much! Quote Share this post Link to post Share on other sites
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