gleynn Posted February 1, 2018 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
0 anacondaq Posted February 1, 2018 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
0 anacondaq Posted February 1, 2018 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
0 gleynn Posted February 1, 2018 Author 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
0 gleynn Posted February 1, 2018 Author 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
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 gleynn4 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.