gleynn Posted February 1, 2018 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 63 Reputation: 2 Joined: 08/10/12 Last Seen: December 31, 2022 Share Posted February 1, 2018 (edited) Hi, Can someone please show me a sample script that checks if all party members are in the same guild with the party leader. Thanks Edit: only party leader can talk to the npc, and it checks if all of his party members are in the same guild with his. Edited February 1, 2018 by gleynn Quote Link to comment Share on other sites More sharing options...
0 anacondaq Posted February 1, 2018 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 1096 Reputation: 348 Joined: 02/26/12 Last Seen: May 30, 2023 Share Posted February 1, 2018 1 hour ago, gleynn said: Thanks Anacondaqq and apologies for the confusion, im not clear with my request, but im looking for an npc that only talks to a party leader. prontera,156,180,5 script PartyChecker 89,{ if(getpartyleader(getcharid(1),2) == getcharid(0)) { if(select("Check party","Cancel") != 1) close; .@main_guild = getcharid(2); getpartymembers(getcharid(1),2); for(.@i = 0; .@i < $@partymembercount; .@i++) { if(getcharid(2,$@partymembercid[.@i] != .@main_guild) { mes "Not all members of the party in the same guild. Break"; dispbottom strcharinfo(0,$@partymembercid[.@i]) + " out of the guild"; break; } } } } I did not test that code, and very sleepy. Quote Link to comment Share on other sites More sharing options...
0 anacondaq Posted February 1, 2018 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 1096 Reputation: 348 Joined: 02/26/12 Last Seen: May 30, 2023 Share Posted February 1, 2018 prontera,156,180,5 script brobrobro 89,{ if(!getcharid(1) || !getcharid(2)) { mes "You don't have party or guild"; close; } if(getpartyleader(getcharid(1,2)) == getcharid(0)) { dispbottom "You're party leader"; .party_leader = getcharid(0); } if(.party_leader) { if(getcharid(2) == getcharid(2,.party_leader)) dispbottom "You're in the same guild with "+ rid2name(.party_leader); else dispbottom "You're outside of the guild of the your party leader"; } else { dispbottom "Sorry, but there is no party leader yet. Try later."; } end; } something very stupid like that. Not tested. How is it work? Everyone should talk to the NPC Quote Link to comment Share on other sites More sharing options...
0 gleynn Posted February 1, 2018 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 63 Reputation: 2 Joined: 08/10/12 Last Seen: December 31, 2022 Author Share Posted February 1, 2018 6 minutes ago, Anacondaqq said: prontera,156,180,5 script brobrobro 89,{ if(!getcharid(1) || !getcharid(2)) { mes "You don't have party or guild"; close; } if(getpartyleader(getcharid(1,2)) == getcharid(0)) { dispbottom "You're party leader"; .party_leader = getcharid(0); } if(.party_leader) { if(getcharid(2) == getcharid(2,.party_leader)) dispbottom "You're in the same guild with "+ rid2name(.party_leader); else dispbottom "You're outside of the guild of the your party leader"; } else { dispbottom "Sorry, but there is no party leader yet. Try later."; } end; } something very stupid like that. Not tested. How is it work? Everyone should talk to the NPC Thanks Anacondaqq and apologies for the confusion, im not clear with my request, but im looking for an npc that only talks to a party leader. Quote Link to comment Share on other sites More sharing options...
0 gleynn Posted February 1, 2018 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 63 Reputation: 2 Joined: 08/10/12 Last Seen: December 31, 2022 Author Share Posted February 1, 2018 (edited) I think it should be getpartymembers(getcharid(1),1); since you are using character id from the rest of the script. Thank you so much Anacondaqq! Problem Solved! Edited February 1, 2018 by gleynn Quote Link to comment Share on other sites More sharing options...
Question
gleynn
Hi,
Can someone please show me a sample script that checks if all party members are in the same guild with the party leader. Thanks
Edit: only party leader can talk to the npc, and it checks if all of his party members are in the same guild with his.
Edited by gleynnLink to comment
Share on other sites
4 answers to this question
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.