Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all npc getpartymember commands #3307

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions npc/custom/quests/hunting_missions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ OnNPCKillEvent:
} else if (.Party) {
set .@mob, killedrid;
getmapxy(.@map1$, .@x1, .@y1, UNITTYPE_PC);
getpartymember getcharid(CHAR_ID_PARTY),1;
getpartymember getcharid(CHAR_ID_PARTY),2;
for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) {
if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) {
attachrid $@partymemberaid[.@i];
getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@accid);
.@count = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_CHARID, .@charid);
for (.@i = 0; .@i < .@count; .@i++) {
if (isloggedin(.@accid[.@i], .@charid[.@i])) {
attachrid(.@accid[.@i]);
if (#Mission_Count && Mission0 && Hp > 0) {
getmapxy(.@map2$, .@x2, .@y2, UNITTYPE_PC);
if ((.@map1$ == .@map2$ || .Party == 1) && (distance(.@x1,.@y1,.@x2,.@y2) <= 30 || .Party < 3)) {
Expand Down
6 changes: 2 additions & 4 deletions npc/other/marriage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{
if (!getpartnerid()) {
if (!$@wedding) {
if (wedding_sign == 1) {
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
if (.@partymembercount == 2) {
if (Sex == SEX_MALE) {
$@wedding = 1;
Expand Down Expand Up @@ -648,8 +647,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{
}
else if ($@wedding == 1) {
if (wedding_sign == 1) {
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
if (.@partymembercount == 2) {
if (Sex == SEX_FEMALE) {
if (strcharinfo(PC_NAME) == $@wed_bride$) {
Expand Down
3 changes: 1 addition & 2 deletions npc/quests/guildrelay.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2527,8 +2527,7 @@
close;
}
}
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
.@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (guildrelay_q == 91) {
if (.@partymembercount == 6) {
Expand Down
12 changes: 4 additions & 8 deletions npc/quests/partyrelay.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
//=========================================================================

payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
.@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
Expand Down Expand Up @@ -402,8 +401,7 @@ payon,103,113,3 script Ledrion#payon::RelayLedrion 4_M_MANAGER,{
}

payon,83,327,3 script Gatan#payon::RelayGatan 4_M_04,{
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
.@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
Expand Down Expand Up @@ -1837,8 +1835,7 @@ payon,83,327,3 script Gatan#payon::RelayGatan 4_M_04,{
}

payon,204,221,3 script Bafhail#payon::RelayBafhail 4_M_JOB_BLACKSMITH,{
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
.@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
Expand Down Expand Up @@ -2470,8 +2467,7 @@ payon,204,221,3 script Bafhail#payon::RelayBafhail 4_M_JOB_BLACKSMITH,{
}

payon,168,314,3 script Lospii#payon::RelayLospii 4_M_KID1,{
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
.@partyleader = getpartyleader(getcharid(CHAR_ID_PARTY),2);
if (checkweight(Resin,300) == 0) {
mes "^3355FFWait a minute! You're";
Expand Down
9 changes: 3 additions & 6 deletions npc/quests/quests_louyang.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4643,8 +4643,7 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{
mes strcharinfo(PC_NAME)+ "...!";
mes "Your name is now engraved on this bloody pledge board. We will fight together to the death for Louyang's future!";
next;
getpartymember(getcharid(CHAR_ID_PARTY));
@partymember = $@partymembercount;
@partymember = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
if (getpartyleader(getcharid(CHAR_ID_PARTY),1) == getcharid(CHAR_ID_CHAR) || !@partymember) {
mes "[Sun Mao]";
mes "Now, the most important thing for our cause is to gather more recruits and increase our numbers. Please find others who will join us in our fight.";
Expand Down Expand Up @@ -4677,8 +4676,7 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{
mes "Go back safe.";
close;
}
getpartymember(getcharid(CHAR_ID_PARTY));
@partymember = $@partymembercount;
@partymember = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
if (QL_REVOL < 8) {
if (@partymember == QL_REVOL +1) {
if (@partymember != 8) {
Expand Down Expand Up @@ -4869,8 +4867,7 @@ lou_in02,77,37,7 script Hermit 4_M_CHNOLD,{

lou_in01,43,147,3 script Gunpowder Expert 4_M_ALCHE_C,{
if (ch_make == 0) {
getpartymember(getcharid(CHAR_ID_PARTY));
@partymember = $@partymembercount;
@partymember = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
if (!QL_REVOL) {
mes "[Hao Chenryu]";
mes "Who...";
Expand Down
8 changes: 2 additions & 6 deletions npc/quests/quests_morocc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,7 @@ moc_fild20,354,183,3 script Continental Guard#01::MocConGuard 4_M_MOC_SOLDIER,3,
close;
case 2:
if ($@re_moc < 3) {
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_NAME, .@partymembername$);
while (.@partymembercount >= 0) {
.@name$ = .@partymembername$[.@partymembercount];
if (isloggedin(getcharid(CHAR_ID_ACCOUNT,.@name$))) {
Expand Down Expand Up @@ -1009,9 +1007,7 @@ moc_fild20,354,183,3 script Continental Guard#01::MocConGuard 4_M_MOC_SOLDIER,3,
mes "[Continental Guard]";
mes "Ah, you're an adventurer working for the Continental Guard. Nice to meet you. Feel free to ask me if you need my assistance.";
next;
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_NAME, .@partymembername$);
while (.@partymembercount >= 0) {
.@name$ = .@partymembername$[.@partymembercount];
if (isloggedin(getcharid(CHAR_ID_ACCOUNT,.@name$))) {
Expand Down
3 changes: 1 addition & 2 deletions npc/quests/quests_nameless.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10177,8 +10177,7 @@ moc_fild18,108,116,0 script #treasure CLEAR_NPC,{
mes "protection to get the treasure.^000000";
next;
input(.@input$);
getpartymember(getcharid(CHAR_ID_PARTY));
.@partymembercount = $@partymembercount;
.@partymembercount = getpartymember(getcharid(CHAR_ID_PARTY), PT_MEMBER_ACCID, .@temp);
if (.@partymembercount > 1) {
if ((.@input$ == "OpenSesame" && treasure_nd == 9) || (.@input$ == "UnlockTreasure" && treasure_nd == 10)) {
mes "^3355FFThe Z Gang must have split";
Expand Down
5 changes: 2 additions & 3 deletions npc/re/instances/MalangdoCulvert.txt
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,8 @@ OnEnable:
areamonster(.@map$, .@c[0], .@c[1], .@c[2], .@c[3], _("Abysmal Cornutus"), MD_CORNUTUS, rand(1, 3), .@label$);
specialeffect(EF_MAPPILLAR2, ALL_SAMEMAP); //currently broken
getmapxy(.@map$, .@x, .@y, UNITTYPE_NPC);
getpartymember('party_id, 2);
copyarray(.@partymemberaid[0], $@partymemberaid[0], $@partymembercount);
for(.@i = 0; .@i<$@partymembercount; ++.@i) {
.@partymembercount = getpartymember('party_id, PT_MEMBER_ACCID, .@partymemberaid);
for(.@i = 0; .@i < .@partymembercount; ++.@i) {
if (attachrid(.@partymemberaid[.@i])) {
if (strcharinfo(PC_MAP) == .@map$)
viewpoint(0, .@x, .@y, .@index, C_YELLOW);
Expand Down
Loading