diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt index 4bd42436dbc..40c0aa3ccd1 100644 --- a/npc/custom/quests/hunting_missions.txt +++ b/npc/custom/quests/hunting_missions.txt @@ -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)) { diff --git a/npc/other/marriage.txt b/npc/other/marriage.txt index 546ebe48ae5..49e5ddb6497 100644 --- a/npc/other/marriage.txt +++ b/npc/other/marriage.txt @@ -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; @@ -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$) { diff --git a/npc/quests/guildrelay.txt b/npc/quests/guildrelay.txt index 2d7aeceaf54..fbfa3ebde05 100644 --- a/npc/quests/guildrelay.txt +++ b/npc/quests/guildrelay.txt @@ -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) { diff --git a/npc/quests/partyrelay.txt b/npc/quests/partyrelay.txt index 19f78a84fb3..3a7e55f8d8a 100644 --- a/npc/quests/partyrelay.txt +++ b/npc/quests/partyrelay.txt @@ -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"; @@ -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"; @@ -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"; @@ -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"; diff --git a/npc/quests/quests_louyang.txt b/npc/quests/quests_louyang.txt index a1a52986b99..b6232624d3c 100644 --- a/npc/quests/quests_louyang.txt +++ b/npc/quests/quests_louyang.txt @@ -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."; @@ -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) { @@ -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..."; diff --git a/npc/quests/quests_morocc.txt b/npc/quests/quests_morocc.txt index cd99348d5a3..9fada618a5f 100644 --- a/npc/quests/quests_morocc.txt +++ b/npc/quests/quests_morocc.txt @@ -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$))) { @@ -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$))) { diff --git a/npc/quests/quests_nameless.txt b/npc/quests/quests_nameless.txt index af4d5851de8..cb2b6439b06 100644 --- a/npc/quests/quests_nameless.txt +++ b/npc/quests/quests_nameless.txt @@ -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"; diff --git a/npc/re/instances/MalangdoCulvert.txt b/npc/re/instances/MalangdoCulvert.txt index 271a0393a37..3e3c8d0e917 100644 --- a/npc/re/instances/MalangdoCulvert.txt +++ b/npc/re/instances/MalangdoCulvert.txt @@ -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);