summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/instances/EndlessTower.txt259
-rw-r--r--npc/instances/NydhoggsNest.txt40
-rw-r--r--npc/instances/OrcsMemory.txt272
-rw-r--r--npc/instances/SealedShrine.txt50
4 files changed, 265 insertions, 356 deletions
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 06a287611..d3291350a 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.8
+//= 1.9
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -27,9 +27,10 @@
//= warps between floors. (bugreport:4623)
//= Added missing end's to prevent infinite mobspawn (bugreport:4540)
//= Commented out remaining GM-only NPCs. [Gepard]
-//============================================================
//= 1.8 Adjusted Instance Attach Map to Validate ALL Maps, instead of
//= only 1@tower -> 5@tower (bugreport:4983)
+//= 1.9 Added 'instance_check_party' command to the script for proper checking if
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//============================================================
alberta,214,77,6 script Captain Janssen 709,{
@@ -38,7 +39,6 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "You're carrying too much stuff. Why don't you put some of it away, and then come back.^000000";
close;
}
- set .@name_102$,strcharinfo(0);
if (BaseLevel < 50) {
mes "[Captain Janssen]";
mes "Sigh... I don't know if I can ever go back to sailing the sea...";
@@ -52,7 +52,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "[Captain Janssen]";
mes "I was touched when you accepted a request from me, a stranger, so easily. You must truly be one of those good, heroic adventurers. Are you interested in setting out on an ocean voyage?";
next;
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "I've sailed a few times... But now that I think about it, I've never gone across the continent.";
next;
mes "[Captain Janssen]";
@@ -74,7 +74,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "[Captain Janssen]";
mes "My crew was starving, and a few of them walked into the tower in order to find food... They never came back.";
next;
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "Why didn't you go in there with them?";
next;
mes "[Captain Janssen]";
@@ -91,13 +91,13 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "[Captain Janssen]";
mes "I feel so lucky to meet a warm-hearted adventurer like you. With the money you've given me, I can finally go sailing to the tower again.";
next;
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "How about hiring me as your first mate?";
next;
mes "[Captain Janssen]";
mes "Thank you, but it is an extremely dangerous place. I have my duty to fulfill, but you don't have any obligation to me or them. I don't wish to sacrifice someone as young as you to such a dangerous place.";
next;
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "No...";
mes ".";
mes ".";
@@ -136,7 +136,7 @@ alberta,214,77,6 script Captain Janssen 709,{
next;
switch(select("I'll come back later.:Let's go, now!")) {
case 1:
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "I'm sorry, but I don't have that much money. I'll come back when I save enough.";
next;
mes "[Captain Janssen]";
@@ -170,7 +170,7 @@ alberta,214,77,6 script Captain Janssen 709,{
next;
switch(select("No!:Sure thing.")) {
case 1:
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "I'm sorry, but you've got the wrong person to ask that.";
next;
mes "[Captain Janssen]";
@@ -186,7 +186,7 @@ alberta,214,77,6 script Captain Janssen 709,{
close;
}
else {
- mes "["+.@name_102$+"]";
+ mes "["+strcharinfo(0)+"]";
mes "I don't know why you'd need so much money, but here. You can take it.";
next;
mes "^0000ffYou have donated 10,000 Zeny to Captain Janssen^000000.";
@@ -210,10 +210,6 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
set .@md_name$,"Endless Tower";
set .@p_name2$,strcharinfo(0);
- getpartymember(.@party_id),2;
- set .@partymembercount,$@partymembercount;
- copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
-
set .@etower_timer,checkquest(60200,PLAYTIME); // 1 week
set .@etower_timer2,checkquest(60201,PLAYTIME); // 4 hours
@@ -225,133 +221,99 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
- for(set .@i,0; .@i < .@partymembercount; set .@i,.@i+1){
- if(isloggedin($@partymemberaid[.@i])){
- set .@loggedin,.@loggedin+1;
- }
+ if(!instance_check_party(.@party_id,2)){
+ mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ close;
}
- if ((.@party_id > 0) && (.@partymembercount > 1) && (.@loggedin > 1)) {
- if (.@etower_timer == -1) {
- if (.@ins_mas == getcharid(0)) {
- mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
- next;
- switch(select(.@md_name$ + " Dungeon Generated:Enter the dungeon:Return to Alberta:Cancel")) {
- case 1:
- set .@instance, instance_create(.@md_name$, .@party_id);
- if (.@instance < 0) {
- mes "Party Name:"+.@p_name$+"";
- mes "Party Leader:"+.@p_reader$+"";
- mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
- }
- else {
- mes "^0000ff"+.@md_name$+"^000000 - Try to reserve";
- mes "After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.";
- // 1,2,3,4,5,6
- for( set .@i, 1; .@i <= 6; set .@i, .@i + 1 ) {
- if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
- mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
- instance_destroy(.@instance);
- close;
- }
+ if (.@etower_timer == -1) {
+ if (.@ins_mas == getcharid(0)) {
+ mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
+ next;
+ switch(select(.@md_name$ + " Dungeon Generated:Enter the dungeon:Return to Alberta:Cancel")) {
+ case 1:
+ set .@instance, instance_create(.@md_name$, .@party_id);
+ if (.@instance < 0) {
+ mes "Party Name:"+.@p_name$+"";
+ mes "Party Leader:"+.@p_reader$+"";
+ mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
+ }
+ else {
+ mes "^0000ff"+.@md_name$+"^000000 - Try to reserve";
+ mes "After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.";
+ // 1,2,3,4,5,6
+ for( set .@i, 1; .@i <= 6; set .@i, .@i + 1 ) {
+ if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
+ mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
+ instance_destroy(.@instance);
+ close;
}
- instance_attach(.@instance);
- instance_set_timeout 14400,300,.@instance;
- instance_init(.@instance);
- // Spawn the first floor of each map, which will then spawn the rest when cleared.
- donpcevent instance_npcname("#1F Controller", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Immortal Furnace#1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Immortal Furnace#2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Immortal Furnace#3", instance_id())+"::OnInstanceInit";
- // Disable the warps on all floor. (enable as floors are cleared)
- for( set .@i, 1; .@i <= 99; set .@i, .@i + 1 )
- donpcevent instance_npcname(.@i+"FGate102tower", instance_id())+"::OnInstanceInit";
- // Warps activate on timer, so players can't get unlimited Ashes.
- donpcevent instance_npcname("25FGate102tower-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("50FGate102tower-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("75FGate102tower-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("99FGate102tower-2", instance_id())+"::OnInstanceInit";
- // Disable and ready NPCs for the 100th and 101st floors.
- donpcevent instance_npcname("Lucid Crystal#102", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#102Effect1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#102Effect2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#102FShadowDust1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#102FShadowDust", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Spring of Life#1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Tyrant's Throne#", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Lost Soul#102", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Effect30", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Effect31", instance_id())+"::OnInstanceInit";
- }
- break;
- case 2:
- if (has_instance("1@tower") == "") {
- mes "The memorial dungeon " + .@md_name$ + " does not exist.";
- mes "The party leader did not generate the dungeon yet.";
- }
- else if ((has_instance("1@tower") != "") && (.@partymembercount < 2))
- mes "You can enter the dungeon after making a party.";
- else {
- mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
- set etower_timer,gettimetick(2);
- setquest 60200;
- setquest 60201;
- warp "1@tower",52,354;
- end;
}
- break;
- case 3:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
- end;
- case 4:
- break;
+ instance_attach(.@instance);
+ instance_set_timeout 14400,300,.@instance;
+ instance_init(.@instance);
+ // Spawn the first floor of each map, which will then spawn the rest when cleared.
+ donpcevent instance_npcname("#1F Controller", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Immortal Furnace#1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Immortal Furnace#2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Immortal Furnace#3", instance_id())+"::OnInstanceInit";
+ // Disable the warps on all floor. (enable as floors are cleared)
+ for( set .@i, 1; .@i <= 99; set .@i, .@i + 1 )
+ donpcevent instance_npcname(.@i+"FGate102tower", instance_id())+"::OnInstanceInit";
+ // Warps activate on timer, so players can't get unlimited Ashes.
+ donpcevent instance_npcname("25FGate102tower-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("50FGate102tower-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("75FGate102tower-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("99FGate102tower-2", instance_id())+"::OnInstanceInit";
+ // Disable and ready NPCs for the 100th and 101st floors.
+ donpcevent instance_npcname("Lucid Crystal#102", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#102Effect1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#102Effect2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#102FShadowDust1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#102FShadowDust", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Spring of Life#1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Tyrant's Throne#", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Lost Soul#102", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Effect30", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Effect31", instance_id())+"::OnInstanceInit";
}
- close;
- }
- else {
- switch(select(.@md_name$ + "Enter the dungeon:Return to Alberta:Cancel")) {
- case 1:
- if (has_instance("1@tower") == "") {
- mes "The memorial dungeon " + .@md_name$ + " does not exist.";
- mes "The party leader did not generate the dungeon yet.";
- }
- else if ((has_instance("1@tower") != "") && (.@partymembercount < 2))
- mes "You can enter the dungeon after making a party.";
- else {
- mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
- set etower_timer,gettimetick(2);
- setquest 60200;
- setquest 60201;
- warp "1@tower",52,354;
- end;
- }
- break;
- case 2:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
+ break;
+ case 2:
+ if (has_instance("1@tower") == "") {
+ mes "The memorial dungeon " + .@md_name$ + " does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ }
+ else {
+ mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
+ set etower_timer,gettimetick(2);
+ setquest 60200;
+ setquest 60201;
+ warp "1@tower",52,354;
end;
- case 3:
- break;
}
- close;
+ break;
+ case 3:
+ mes "I will move you to Alberta.";
+ close2;
+ warp "alberta",223,36;
+ end;
+ case 4:
+ break;
}
+ close;
}
- else if ((.@etower_timer >= 0) && (.@etower_timer2 < 2)) {
- mes "If you have the dungeon generated already, you can enter it. ";
- next;
- switch(select(.@md_name$ + "Enter the dungeon:Return to Alberta:Cancel")) {
+ else {
+ switch(select(.@md_name$ + " Enter the dungeon:Return to Alberta:Cancel")) {
case 1:
if (has_instance("1@tower") == "") {
mes "The memorial dungeon " + .@md_name$ + " does not exist.";
mes "The party leader did not generate the dungeon yet.";
}
- else if ((has_instance("1@tower") != "") && (.@partymembercount < 2))
- mes "You can enter the dungeon after making a party.";
else {
mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
+ set etower_timer,gettimetick(2);
+ setquest 60200;
+ setquest 60201;
warp "1@tower",52,354;
end;
}
@@ -366,26 +328,49 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
}
close;
}
- else if ((.@etower_timer >= 0) && (.@etower_timer < 2) && (.@etower_timer2 == 2)) {
- mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
- next;
- mes "It is dangerous here. Let me move you to Alberta.";
+ }
+ else if ((.@etower_timer >= 0) && (.@etower_timer2 < 2)) {
+ mes "If you have the dungeon generated already, you can enter it. ";
+ next;
+ switch(select(.@md_name$ + " Enter the dungeon:Return to Alberta:Cancel")) {
+ case 1:
+ if (has_instance("1@tower") == "") {
+ mes "The memorial dungeon " + .@md_name$ + " does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ }
+ else {
+ mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
+ warp "1@tower",52,354;
+ end;
+ }
+ break;
+ case 2:
+ mes "I will move you to Alberta.";
close2;
warp "alberta",223,36;
end;
+ case 3:
+ break;
}
- else {
- set etower_timer,0;
- erasequest 60200;
- erasequest 60201;
- mes "^0000ffThe records and after effects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
- close;
- }
+ close;
+ }
+ else if ((.@etower_timer >= 0) && (.@etower_timer < 2) && (.@etower_timer2 == 2)) {
+ mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
+ next;
+ mes "It is dangerous here. Let me move you to Alberta.";
+ close2;
+ warp "alberta",223,36;
+ end;
}
else {
- mes "Make or join a party with more than 1 member and try again.";
+ set etower_timer,0;
+ erasequest 60200;
+ erasequest 60201;
+ mes "^0000ffThe records and after effects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
close;
}
+ mes "Make or join a party with more than 1 member and try again.";
+ close;
}
e_tower,30,30,2 script Huge Vortex 844,2,2,{
diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index e80ed4b90..36f79605d 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf, various sources
//===== Current Version: =====================================
-//= 1.2
+//= 1.3
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -13,6 +13,8 @@
//= 1.0 First version.
//= 1.1 Minor dialog updates.
//= 1.2 No longer glitches when anyone but party leader talks to the first NPC.
+//= 1.3 Added 'instance_check_party' command to the script for proper checking if
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//============================================================
nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
@@ -64,7 +66,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
}
}
else if (ins_nyd == 1) {
- if ((ep13_1_edq == 14) || (ep13_1_edq == 15)) {
+ if (ep13_1_edq == 14 || ep13_1_edq == 15) {
mes "A mysterious power prevents you from getting too close. It looks like there is something strong beyond the door...";
next;
mes "Perhaps there's a great hidden secret beyond the gate, beyond expectation.";
@@ -84,7 +86,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
close;
}
}
- else if ((ins_nyd == 111) || (ins_nyd == 112)) {
+ else if (ins_nyd == 111 || ins_nyd == 112) {
specialeffect2 EF_CHANGECOLD;
mes "The strange sensation surrounding your body has disappeared";
next;
@@ -112,7 +114,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
close;
}
}
- else if ((ins_nyd == 131) || (ins_nyd == 132) || (ins_nyd > 199)) {
+ else if (ins_nyd == 131 || ins_nyd == 132 || ins_nyd > 199) {
set .@ins_nyd_check,checkquest(3135,PLAYTIME); // 3 Day cooldown
set .@ins_nyd_check2,checkquest(3136,PLAYTIME); // 4 Hour play limit
if (.@ins_nyd_check == -1) {
@@ -127,17 +129,12 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
set .@leader,getpartyleader(.@party,2);
set .@md_name$,"Nidhoggur's Nest";
- getpartymember(.@party),2;
- set .@partymembercount,$@partymembercount;
- copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
-
- for(set .@i,0; .@i < .@partymembercount; set .@i,.@i+1){
- if(isloggedin($@partymemberaid[.@i])){
- set .@loggedin,.@loggedin+1;
- }
+ if(!instance_check_party(.@party_id,2,70)){
+ mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ close;
}
- if ((.@party > 0) && ((.@partymembercount > 1)) && (.@leader == getcharid(0)) && (.@loggedin > 1)) {
+ if (.@leader == getcharid(0)) {
set .@instance, instance_create(.@md_name$, .@party);
if (.@instance < 0) {
mes "[Yggdrasil Gatekeeper]";
@@ -221,23 +218,16 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
set .@p_name2$,strcharinfo(0);
set .@md_name$,"Nidhoggur's Nest";
- getpartymember(.@party);
- set .@partymembercount,$@partymembercount;
- copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
+ if(!instance_check_party(.@party_id,2,70)){
+ mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ close;
+ }
if (has_instance("1@nyd") == "") {
mes "[Yggdrasil Gatekeeper]";
mes "You did not request for entrance. Please let your leader request entrance.";
close;
}
- else if ((has_instance("1@nyd") != "") && (.@partymembercount < 2)) {
- mes "[Yggdrasil Gatekeeper]";
- mes "Where are the other servants with you? We do not allow individuals to enter alone.";
- next;
- mes "[Yggdrasil Gatekeeper]";
- mes "You must be accompanied by one servant to be able to enter.";
- close;
- }
else {
mapannounce "nyd_dun02", .@p_name$ + "'s Party member " + .@p_name2$ + " has entered " + .@md_name$,bc_map,"0x00ff99";
if (checkquest(3135) == -1) setquest 3135;
@@ -259,7 +249,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
close;
}
}
- else if ((.@ins_nyd_check == 0) || (.@ins_nyd_check == 1)) {
+ else if (.@ins_nyd_check == 0 || .@ins_nyd_check == 1) {
mes "[Yggdrasil Gatekeeper]";
mes "With the defeat of Nidhoggur's Shadow, the roots of the World Tree Yggdrasil are also affected.";
next;
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index 83a81b871..332159aeb 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.5
+//= 1.6
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -28,198 +28,142 @@
//= Corrected the variable type for party leader name.
//= 1.4 Fixed donpcevent calling non-existant npc. (bugreport:4039) [L0ne_W0lf]
//= 1.5 Fixed a checkquest condition never setting quest. [L0ne_W0lf]
+//= 1.6 Added 'instance_check_party' command to the script for proper checking if
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//============================================================
// Entrance
gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
- if ((BaseLevel < 30) || (BaseLevel > 80)) {
- mes "Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon.";
- close;
- }
set .@party_id,getcharid(1);
- set .@ins_mas,getpartyleader(.@party_id,2);
+ set .@ins_mas,getpartyleader(.@party_id,1);
set .@p_name$,getpartyname(.@party_id);
- set .@p_reader$,strcharinfo(0);
+ set .@p_leader$,rid2name(.@ins_mas);
set .@md_name$,"Orc's Memory";
- getpartymember(.@party_id),2;
- set .@partymembercount,$@partymembercount;
- copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
-
- for(set .@i,0; .@i < .@partymembercount; set .@i,.@i+1){
- if(isloggedin($@partymemberaid[.@i])){
- set .@loggedin,.@loggedin+1;
- }
+ if(!instance_check_party(.@party_id,2,30,80)){
+ mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ close;
}
set .@orctime,checkquest(12059,PLAYTIME);
- if ((.@party_id > 0) && (.@partymembercount > 1) && (.@loggedin > 1)) {
- if (.@orctime == -1) {
- if (.@ins_mas == getcharid(0)) {
- mes "Party status confirmed. Would you like to book entrance to the " + .@md_name$ + "?";
- next;
- switch(select("Reserve the " + .@md_name$ + ":Enter the Dungeon:Cancel")) {
- case 1:
- set .@instance, instance_create(.@md_name$, .@party_id);
- if (.@instance < 0) {
- mes "Party Name: "+.@p_name$+"";
- mes "Party Leader: "+.@p_reader$+"";
- mes "^0000ff"+.@md_name$+" ^000000 - Reservation Failed.";
- close;
- }
- else {
- mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance";
- mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the " + .@md_name$ + ".";
-
- for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
- if( instance_attachmap(.@i + "@orcs", .@instance) == "" )
- break;
- }
- if( .@i < 2 ) {
- instance_destroy(.@instance);
- close;
- }
- instance_attach(.@instance);
- instance_set_timeout 7200,300,.@instance;
- instance_init(.@instance);
-
- // First Floor
- donpcevent instance_npcname("#Resurrect Monsters1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Resurrect Monsters2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Resurrect Monsters3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Resurrect Monsters4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("B1 Area 1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("B1 Area 2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("B1 Area 3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("B1 Area 4", instance_id())+"::OnInstanceInit";
- disablenpc instance_npcname("Kurger#1-2", instance_id());
-
- // Second Floor
- donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#1-1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#1-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#1-3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#1-4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#2-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#2-3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#2-4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#3-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#3-3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Torch#3-4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Warp2-1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Warp2-2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Warp2-3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Boss Control", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Warp Outside Orc Dun", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Kruger#", instance_id())+"::OnInstanceInit";
- disablenpc instance_npcname("Kruger#2-2", instance_id());
-
- close;
- }
- case 2:
- //if (move_md == 3) {
- // mes "An unidentified error has occured.";
- // close;
- //}
- //else if (move_md == 2) {
- if (has_instance("1@orcs") == "") {
- mes "Memorial Dungeon " + .@md_name$ + " does not exist.";
- mes "The party leader has not reserved entrance to the dungeon yet.";
- next;
- mes "Once the reservation is complete, the dungeon will be generated.";
- mes "If your dungeon has been destroyed you must wait 7 days before re-entering.";
- close;
- }
- //else if (move_md == 0) {
- else if ((has_instance("1@orcs") != "") && (.@partymembercount < 2)) {
- mes "Only party members may enter the Memorial Dungeon.";
- close;
- }
- //else if (move_md == 0) {
- else {
- mapannounce "gef_fild10", .@p_reader$ + " of the party, " + .@p_name$ + " is entering the " + .@md_name$ + ".",bc_map,"0x00ff99";
- warp "1@orcs",179,15;
- if (checkquest(12059)== -1) setquest 12059;
- close;
- }
- case 3:
+ if (.@orctime == -1) {
+ if (.@ins_mas == getcharid(3)) {
+ mes "Party status confirmed. Would you like to book entrance to the "+.@md_name$+"?";
+ next;
+ switch(select("Reserve the "+.@md_name$+":Enter the Dungeon:Cancel")) {
+ case 1:
+ set .@instance,instance_create(.@md_name$,.@party_id);
+ if (.@instance < 0) {
+ mes "Party Name: "+.@p_name$+"";
+ mes "Party Leader: "+.@p_leader$+"";
+ mes "^0000ff"+.@md_name$+" ^000000 - Reservation Failed.";
close;
- }
- }
- else {
- switch(select(.@md_name$ + " Enter the Memorial Dungeon:Cancel")) {
- case 1:
- //if (move_md == 3) {
- // mes "An unidentified error has occured.";
- // close;
- //}
- //else if (move_md == 2) {
- if (has_instance("1@orcs") == "") {
- mes "The Memorial Dungeon " + .@md_name$ + " does not exist.";
- mes "The Memorial Dungeon has been destroyed by the Party Leader or because of the time limit. Please try again after 2 hours.";
- close;
+ } else {
+ mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance";
+ mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the "+.@md_name$+".";
+ for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
+ if( instance_attachmap(.@i + "@orcs", .@instance) == "" )
+ break;
}
- //else if (move_md == 1) {
- else if ((has_instance("1@orcs") != "") && (.@partymembercount < 2)) {
- mes "Only party members may enter the Memorial Dungeon.";
+ if( .@i < 2 ) {
+ instance_destroy(.@instance);
close;
}
- //else if (move_md == 0) {
- else {
- mapannounce "gef_fild10", .@p_name$ + " Party's member " + .@p_reader$ + " has entered the " + .@md_name$ + ".",bc_map,"0x00ff99";
- if (checkquest(12059)== -1) setquest 12059;
- warp "1@orcs",179,15;
- close;
- }
- case 2:
+ instance_attach(.@instance);
+ instance_set_timeout 7200,300,.@instance;
+ instance_init(.@instance);
+
+ // First Floor
+ donpcevent instance_npcname("#Resurrect Monsters1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Resurrect Monsters2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Resurrect Monsters3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Resurrect Monsters4", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("B1 Area 1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("B1 Area 2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("B1 Area 3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("B1 Area 4", instance_id())+"::OnInstanceInit";
+ disablenpc instance_npcname("Kurger#1-2", instance_id());
+
+ // Second Floor
+ donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#1-1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#1-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#1-3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#1-4", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#2-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#2-3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#2-4", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#3-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#3-3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Torch#3-4", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Warp2-1", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Warp2-2", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Warp2-3", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Boss Control", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("#Warp Outside Orc Dun", instance_id())+"::OnInstanceInit";
+ donpcevent instance_npcname("Kruger#", instance_id())+"::OnInstanceInit";
+ disablenpc instance_npcname("Kruger#2-2", instance_id());
close;
}
- }
- }
- else if ((.@orctime == 0) || (.@orctime == 1)) {
- mes "You can enter the Dungeon if it has been generated.";
- next;
- switch(select("Enter the Dungeon " + .@md_name$ + ":Cancel")) {
- case 1:
- //if (move_md == 3) {
- // mes "An unidentified error has occured.";
- // close;
- //}
- //else if (move_md == 2) {
+ case 2:
if (has_instance("1@orcs") == "") {
- mes "The Memorial Dungeon " + .@md_name$ + " does not exist.";
- mes "The Memorial Dungeon has been destroyed by the Party Leader or because of the time limit. Please try again after 2 hours.";
- close;
- }
- //else if (move_md == 1) {
- else if ((has_instance("1@orcs") != "") && (.@partymembercount < 2)) {
- mes "Only party members may enter the Memorial Dungeon.";
+ mes "Memorial Dungeon "+.@md_name$+" does not exist.";
+ mes "The party leader has not reserved entrance to the dungeon yet.";
+ next;
+ mes "Once the reservation is complete, the dungeon will be generated.";
+ mes "If your dungeon has been destroyed you must wait 7 days before re-entering.";
close;
}
- //else if (move_md == 0) {
- else {
- mapannounce "gef_fild10", .@p_name$ + " Party's member " + .@p_reader$ + " has entered the " + .@md_name$ + ".",bc_map,"0x00ff99";
- if (checkquest(12059)== -1) setquest 12059;
- warp "1@orcs",179,15;
- close;
- }
- case 2:
+ mapannounce "gef_fild10", .@p_leader$ + " of the party, " + .@p_name$ + " is entering the "+.@md_name$+".",bc_map,"0x00ff99";
+ if (checkquest(12059)== -1) setquest 12059;
+ warp "1@orcs",179,15;
+ end;
+ case 3:
+ close;
+ }
+ }
+ switch(select(.@md_name$ + " Enter the Memorial Dungeon:Cancel")) {
+ case 1:
+ if (has_instance("1@orcs") == "") {
+ mes "The Memorial Dungeon "+.@md_name$+" does not exist.";
+ mes "The Memorial Dungeon has been destroyed by the Party Leader or because of the time limit. Please try again after 2 hours.";
close;
}
+ mapannounce "gef_fild10",.@p_name$+" Party's member "+.@p_leader$+" has entered the "+.@md_name$+".",bc_map,"0x00ff99";
+ if (checkquest(12059)== -1) setquest 12059;
+ warp "1@orcs",179,15;
+ end;
+ case 2:
+ close;
}
- else if (.@orctime == 2) {
- mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000";
- erasequest 12059;
+ } else if (.@orctime == 0 || .@orctime == 1) {
+ mes "You can enter the Dungeon if it has been generated.";
+ next;
+ switch(select("Enter the Dungeon "+.@md_name$+":Cancel")) {
+ case 1:
+ if (has_instance("1@orcs") == "") {
+ mes "The Memorial Dungeon "+.@md_name$+" does not exist.";
+ mes "The Memorial Dungeon has been destroyed by the Party Leader or because of the time limit. Please try again after 2 hours.";
+ close;
+ }
+ mapannounce "gef_fild10",.@p_name$+" Party's member "+.@p_leader$+" has entered the "+.@md_name$+".",bc_map,"0x00ff99";
+ if (checkquest(12059)== -1) setquest 12059;
+ warp "1@orcs",179,15;
+ end;
+ case 2:
close;
}
}
- else {
- mes "In order to generate a dungeon you must be the Party Leader and have at least 2 members in the party.";
+ else if (.@orctime == 2) {
+ mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000";
+ erasequest 12059;
close;
}
+ mes "In order to generate a dungeon you must be the Party Leader and have at least 2 members in the party.";
+ close;
}
gef_fild10,238,202,6 script Mad Scientist#orc 865,{
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index bbe83f01b..f6a028dd9 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.7
+//= 1.8
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -20,6 +20,8 @@
//= Changed quest 3046 to 3040. This is the correct quest id.
//= Removed checking quest 3045, unofficial check.
//= 1.7 Fixed a checkquest condition never setting quest. [L0ne_W0lf]
+//= 1.8 Added 'instance_check_party' command to the script for proper checking if
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//============================================================
// Sealed Catacomb Entrance
@@ -91,9 +93,6 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
if (BaseLevel > 74) {
set .@party_id,getcharid(1);
- getpartymember(.@party_id),2;
- set .@partymembercount,$@partymembercount;
- copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
mes "[Friar Patrick]";
mes "Do you mean you'll go to the shrine and reseal Baphomet?";
@@ -104,14 +103,13 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
// Two hour play limit
//set .@ins_bapho_check2,checkquest(3045,PLAYTIME);
- for(set .@i,0; .@i < .@partymembercount; set .@i,.@i+1){
- if(isloggedin($@partymemberaid[.@i])){
- set .@loggedin,.@loggedin+1;
- }
+ if(!instance_check_party(.@party_id,2,75)){
+ mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ close;
}
if (.@ins_bapho_check == -1) {
- if ((getpartyleader(.@party_id,2) == getcharid(0)) && (.@partymembercount > 1) && (.@loggedin > 1)) {
+ if (getpartyleader(.@party_id,2) == getcharid(0)) {
set .@instance, instance_create("Sealed Catacombs", .@party_id);
if (.@instance < 0) {
mes "[Friar Patrick]";
@@ -197,7 +195,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "Once the party leader is permitted, the rest of the party can enter. This is a rule of this monastery, so please understand.";
}
}
- else if ((.@ins_bapho_check == 0) || (.@ins_bapho_check == 1)) {
+ else if (.@ins_bapho_check == 0 || .@ins_bapho_check == 1) {
mes "[Friar Patrick]";
mes "It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed.";
}
@@ -264,10 +262,6 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
case 1:
set .@party_id,getcharid(1);
- getpartymember(.@party_id);
- set .@partymembercount,$@partymembercount;
- copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
-
set .@instance, instance_id(1);
instance_attach(.@instance);
@@ -276,26 +270,22 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
// Two hour play limit
//set .@ins_bapho_check2,checkquest(3045,PLAYTIME);
+ if(!instance_check_party(.@party_id,2,75)){
+ mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ close;
+ }
+
if (.@ins_bapho_check == -1) {
if (has_instance("1@cata") == "") {
mes "It's cold to the touch. It doesn't respond.";
}
- //else if (ret == 2) {
- // mes "It's cold to the touch. It doesn't respond.";
- // close;
- //}
- else if ((has_instance("1@cata") != "") && (.@partymembercount < 2)) {
- mes "[Friar Patrick]";
- mes "To enter this dangerous place, you can't go alone. Come again after you join a party.";
- }
- //else if (ret == 0) {
else {
mapannounce "monk_test","[" + strcharinfo(0) + "] member of the [" + getpartyname(.@party_id) + "] party has entered the Sealed Shrine.",bc_map,"0x00ff99";
if (checkquest(3040) == -1) setquest 3040;
warp "1@cata",100,224;
}
}
- else if ((.@ins_bapho_check == 0) || (.@ins_bapho_check == 1)) {
+ else if (.@ins_bapho_check == 0 || .@ins_bapho_check == 1) {
mes "[Friar Patrick]";
mes "It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains.";
mes "The curse of Baphomet disappears after a certain amount of time after you entered.";
@@ -329,7 +319,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
mes "[Rust Blackhand]";
mes "You're not a monk, then what do you want?";
next;
- if ((.@new_maje == 0) || (.@new_maje == 1)) {
+ if (.@new_maje == 0 || .@new_maje == 1) {
mes "[Rust Blackhand]";
mes "Did you bring all of the ingredients?";
next;
@@ -1916,7 +1906,7 @@ OnTouch:
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
- else if ((.@seal_check == 0) || (.@seal_check == 1)) {
+ else if (.@seal_check == 0 || .@seal_check == 1) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
@@ -1955,7 +1945,7 @@ OnTouch:
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
- else if ((.@seal_check == 0) || (.@seal_check == 1)) {
+ else if (.@seal_check == 0 || .@seal_check == 1) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
@@ -1994,7 +1984,7 @@ OnTouch:
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
- else if ((.@seal_check == 0) || (.@seal_check == 1)) {
+ else if (.@seal_check == 0 || .@seal_check == 1) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
@@ -2033,7 +2023,7 @@ OnTouch:
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
- else if ((.@seal_check == 0) || (.@seal_check == 1)) {
+ else if (.@seal_check == 0 || .@seal_check == 1) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
@@ -2072,7 +2062,7 @@ OnTouch:
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
- else if ((.@seal_check == 0) || (.@seal_check == 1)) {
+ else if (.@seal_check == 0 || .@seal_check == 1) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;