summaryrefslogtreecommitdiff
path: root/npc/instances/OrcsMemory.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/instances/OrcsMemory.txt')
-rw-r--r--npc/instances/OrcsMemory.txt272
1 files changed, 108 insertions, 164 deletions
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,{