summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2016-08-25 13:00:05 +0100
committerhemagx <hemagx2@gmail.com>2016-08-26 21:34:19 +0200
commit84c253d2b012bc06b25a843c09a60cb28c678e95 (patch)
tree8af64fb54cd80be5991410d508620b083d90540d /npc
parent13067dc118b790e676dc2cecf272279a850c7ce2 (diff)
downloadhercules-84c253d2b012bc06b25a843c09a60cb28c678e95.tar.gz
hercules-84c253d2b012bc06b25a843c09a60cb28c678e95.tar.bz2
hercules-84c253d2b012bc06b25a843c09a60cb28c678e95.tar.xz
hercules-84c253d2b012bc06b25a843c09a60cb28c678e95.zip
Implementation of Ghost palace instance based on iRO
* Added ghost palace instance script * Add needed monster, item and quest database entries * Added mapflags for instance map (1@spa)
Diffstat (limited to 'npc')
-rw-r--r--npc/mapflag/nobranch.txt3
-rw-r--r--npc/mapflag/noicewall.txt3
-rw-r--r--npc/mapflag/nomemo.txt3
-rw-r--r--npc/mapflag/nopvp.txt1
-rw-r--r--npc/mapflag/nosave.txt3
-rw-r--r--npc/mapflag/noteleport.txt4
-rw-r--r--npc/mapflag/nowarpto.txt3
-rw-r--r--npc/mapflag/partylock.txt3
-rw-r--r--npc/mapflag/zone.txt3
-rw-r--r--npc/re/instances/ghost_palace.txt837
-rw-r--r--npc/re/scripts.conf3
11 files changed, 865 insertions, 1 deletions
diff --git a/npc/mapflag/nobranch.txt b/npc/mapflag/nobranch.txt
index 8e69367b2..71672c1a1 100644
--- a/npc/mapflag/nobranch.txt
+++ b/npc/mapflag/nobranch.txt
@@ -405,6 +405,9 @@ ecl_in04 mapflag nobranch
1@ecl mapflag nobranch
ecl_hub01 mapflag nobranch
+// Ghost Palace ===========
+1@spa mapflag nobranch
+
//evt_zombie mapflag nobranch
// Poring War ==================
diff --git a/npc/mapflag/noicewall.txt b/npc/mapflag/noicewall.txt
index 3c5c55dbc..9b6e3940a 100644
--- a/npc/mapflag/noicewall.txt
+++ b/npc/mapflag/noicewall.txt
@@ -200,6 +200,9 @@ nguild_prt mapflag noicewall
// Inside Eclage ===========
1@ecl mapflag noicewall
+// Ghost Palace ===========
+1@spa mapflag noicewall
+
// Poring War ====================
poring_w01 mapflag noicewall
poring_w02 mapflag noicewall
diff --git a/npc/mapflag/nomemo.txt b/npc/mapflag/nomemo.txt
index 89222153d..4ac4837bc 100644
--- a/npc/mapflag/nomemo.txt
+++ b/npc/mapflag/nomemo.txt
@@ -792,6 +792,9 @@ moc_prydn2 mapflag nomemo
1@nyd mapflag nomemo
2@nyd mapflag nomemo
+// Ghost Palace ===========
+1@spa mapflag nomemo
+
//evt_zombie mapflag nomemo
// Poring War ====================
diff --git a/npc/mapflag/nopvp.txt b/npc/mapflag/nopvp.txt
index f69039b06..ee2f8438d 100644
--- a/npc/mapflag/nopvp.txt
+++ b/npc/mapflag/nopvp.txt
@@ -53,6 +53,7 @@
1@ma_c mapflag pvp off
1@ma_b mapflag pvp off
1@ecl mapflag pvp off
+1@spa mapflag pvp off
bat_a01 mapflag pvp off
bat_a02 mapflag pvp off
diff --git a/npc/mapflag/nosave.txt b/npc/mapflag/nosave.txt
index ece12d7bd..f53bf5a83 100644
--- a/npc/mapflag/nosave.txt
+++ b/npc/mapflag/nosave.txt
@@ -346,6 +346,9 @@ que_lhz mapflag nosave SavePoint
// Inside Eclage ===========
1@ecl mapflag nosave SavePoint
+// Ghost Palace ===========
+1@spa mapflag nosave SavePoint
+
//evt_zombie mapflag nosave SavePoint
// Poring War ====================
diff --git a/npc/mapflag/noteleport.txt b/npc/mapflag/noteleport.txt
index 93e8d2e24..e8693678a 100644
--- a/npc/mapflag/noteleport.txt
+++ b/npc/mapflag/noteleport.txt
@@ -467,6 +467,10 @@ nyd_dun02 mapflag noteleport
2@nyd mapflag noteleport
2@nyd mapflag monster_noteleport
+// Ghost Palace ===========
+1@spa mapflag noteleport
+1@spa mapflag monster_noteleport
+
//evt_zombie mapflag noteleport
// Poring War ====================
diff --git a/npc/mapflag/nowarpto.txt b/npc/mapflag/nowarpto.txt
index 596dabbd0..34d093ae2 100644
--- a/npc/mapflag/nowarpto.txt
+++ b/npc/mapflag/nowarpto.txt
@@ -168,6 +168,9 @@ spl_in01 mapflag nowarpto
1@nyd mapflag nowarpto
2@nyd mapflag nowarpto
+// Ghost Palace ===========
+1@spa mapflag nowarpto
+
// Poring War ====================
poring_w01 mapflag nowarpto
poring_w02 mapflag nowarpto
diff --git a/npc/mapflag/partylock.txt b/npc/mapflag/partylock.txt
index 2cb06eefa..ee16cf798 100644
--- a/npc/mapflag/partylock.txt
+++ b/npc/mapflag/partylock.txt
@@ -78,3 +78,6 @@
// Inside Eclage ===========
1@ecl mapflag partylock
+
+// Ghost Palace ===========
+1@spa mapflag partylock
diff --git a/npc/mapflag/zone.txt b/npc/mapflag/zone.txt
index a405934a2..c14ef569f 100644
--- a/npc/mapflag/zone.txt
+++ b/npc/mapflag/zone.txt
@@ -100,6 +100,9 @@ prt_are_in mapflag zone Izlude Battle Arena
// Inside Eclage ===========
1@ecl mapflag zone Memorial Dungeon
+// Ghost Palace ===========
+1@spa mapflag zone Memorial Dungeon
+
//Towns
alberta mapflag zone Towns
aldebaran mapflag zone Towns
diff --git a/npc/re/instances/ghost_palace.txt b/npc/re/instances/ghost_palace.txt
new file mode 100644
index 000000000..ea8f3d853
--- /dev/null
+++ b/npc/re/instances/ghost_palace.txt
@@ -0,0 +1,837 @@
+//================= Hercules Script =======================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2016 Hercules Dev Team
+//= Copyright (C) Asheraf
+//= Copyright (C) pengc2010
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Ghost Palace
+//================= Current Version =======================================
+//= 1.1
+//=========================================================================
+1@spa mapflag src4instance
+
+dali02,44,129,5 script Unpleasent Royal Guard 4_M_SAKRAYROYAL,{
+ if (BaseLevel < 120) {
+ mes("[Unpleasent Royal Guard]");
+ mes("Althought I need help with a task, you are not strong enough to assist me, noob~!");
+ next;
+ mes("[Unpleasent Royal Guard]");
+ mes("Come back after when you have done some training and are at least level 120!");
+ close();
+ }
+ if (questprogress(1261)) {
+ mes("[Unpleasent Royal Guard]");
+ mes("The monsters that attacked the palace are wandering around the secret entrance. It would be very bad if they spotted us... Please wait until the time limit for re-entrance passed.");
+ close();
+ }
+ if (questprogress(1260)) {
+ if (has_instance("1@spa") == "") {
+ mes("[Unpleasent Royal Guard]");
+ mes("Did the gate close?\r"
+ "Please enter the gate as soon as you can next time.");
+ erasequest 1260;
+ close();
+ }
+ mes("[Unpleasent Royal Guard]");
+ mes("Please go ahead, ^0000ffThe entrance is behind me.^000000\r"
+ "I will be right behind you!");
+ close();
+ }
+ .@party_id = getcharid(1);
+ if (!.@party_id) {
+ mes("[Unpleasent Royal Guard]");
+ mes("This is a solo instance. Please form a solo party before continuing.");
+ close();
+ }
+ if (getcharid(0) != getpartyleader(.@party_id,2)) {
+ mes("[Unpleasent Royal Guard]");
+ mes("I'm looking for adventurers to help me!\r"
+ "I want to talk to the team leader, can I?");
+ close();
+ }
+ mes("[Unpleasent Royal Guard]");
+ mes("I need some help, even from the likes of you.");
+ next;
+ mes("[Unpleasent Royal Guard]");
+ mes("In the middle of the battle the princess disappeared while I was guarding the palace.");
+ next;
+ mes("[Unpleasent Royal Guard]");
+ mes("You run ahead and i will catch up.\r"
+ "We must save her.");
+ next;
+ if (select("I will help.", "This is not a good time.") == 2) {
+ mes("[Unpleasent Royal Guard]");
+ mes("Even now all the royal guards are fighting and dying to the monsters.");
+ next;
+ mes("[Unpleasent Royal Guard]");
+ mes("We must save the princess no matter how much fear grips our hearts!");
+ close();
+ }
+ .@instance = instance_create("Ghost Palace", .@party_id);
+ .@p_name$ = getpartyname(.@party_id);
+ .@md_name$ = "Ghost Palace";
+ if (.@instance < 0) {
+ mesf("Party Name: %s", .@p_name$);
+ mesf("Party Leader: %s", strcharinfo(0));
+ mesf("^0000FF%s^000000 - Reservation Failed!", .@md_name$);
+ close();
+ }
+ if (instance_attachmap("1@spa", .@instance) != "") {
+ instance_set_timeout(3600, 300, .@instance);
+ instance_init(.@instance);
+ if (!questprogress(1260)) setquest 1260;
+ mes("[Unpleasent Royal Guard]");
+ mes("Thank You..\r"
+ "I will open the secret passage to ^0000FFGhost Palace.^000000\r"
+ "Please be ready!");
+ close();
+ } else {
+ instance_destroy(.@instance);
+ mesf("^0000FF%s^000000 - Reservation Failed!", .@md_name$);
+ close();
+ }
+}
+
+dali02,41,134,0 script Interdimensional Device::gpportal PORTAL,{
+ if (BaseLevel < 120) {
+ mes("[Unpleasent Royal Guard]");
+ mes("Althought I need help with a task, you are not strong enough to assist me, noob~!");
+ next;
+ mes("[Unpleasent Royal Guard]");
+ mes("Come back after when you have done some training and are at least level 120!");
+ close();
+ }
+ if (questprogress(1261)) {
+ if (questprogress(1261, PLAYTIME) == 2) {
+ erasequest 1261;
+ if (questprogress(1260))
+ erasequest 1260;
+ end;
+ }
+ mes("[Unpleasent Royal Guard]");
+ mes("The monsters that attacked the palace are wandering around the secret entrance. It would be very bad if they spotted us... Please wait until the time limit for re-entrance passed.");
+ close();
+ }
+ if (getcharid(0) == getpartyleader(.@party_id,2) && !questprogress(1260)) {
+ mes("[Unpleasent Royal Guard]");
+ mes("I'm looking for adventurers to help me!\r"
+ "I want to talk to the team leader, can I?");
+ close();
+ }
+ mes("[Unpleasent Royal Guard]");
+ mes("I can see the secret passage into the Palace... Are you ready to save the princess?!");
+ next;
+ if (select("Enter", "Stop") == 2) {
+ mes("[Unpleasent Royal Guard]");
+ mes("Even now all the royal guards are fighting and dying to the monsters.");
+ next;
+ mes("[Unpleasent Royal Guard]");
+ mes("We must save the princess no matter how much fear grips our hearts!");
+ close();
+ }
+ if (has_instance("1@spa") == "") {
+ mes("^FF0000Inside the device you see a dark hole. If you wish to enter you may wish to talk to the Unpleasant Royal Guard first.^000000");
+ close();
+ }
+ mapannounce("dali", sprintf(_$("%s of the party, %s, is entering the Ghost Palace."), strcharinfo(0), getpartyname(getcharid(1))), bc_map, C_SPRINGGREEN);
+ if (!questprogress(1260)) setquest 1260;
+ setquest 1261;
+ warp("1@spa", 198, 188);
+ close();
+}
+
+1@spa,197,204,5 script King#gp1 4_M_RUSKING,{
+ mes("[King]");
+ mes("You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else.");
+ npctalk(_("You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else."), instance_npcname("King#gp1"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("I will protect the Princess with my life.");
+ npctalk(_("I will protect the Princess with my life."), instance_npcname("Lurid Royal Guard#gp1"));
+ next;
+ mes("[King]");
+ mes("The marriage arrangements are going as planned. The prince is here to meet the princess.");
+ npctalk(_("The marriage arrangements are going as planned. The prince is here to meet the princess."), instance_npcname("King#gp1"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("...Yes, your majesty.");
+ npctalk(_("...Yes, your majesty."), instance_npcname("Lurid Royal Guard#gp1"));
+ next;
+ mes("[King]");
+ mes("My gods, there are monsters in the castle! Get rid of them now!");
+ npctalk(_("My gods, there are monsters in the castle! Get rid of them now!"), instance_npcname("King#gp1"));
+ close2();
+ donpcevent instance_npcname("#gp1control")+"::OnStart";
+ end;
+}
+
+1@spa,1,1,1 script #gp1control HIDDEN_NPC,{
+ end;
+OnStart:
+ hideonnpc instance_npcname("Lurid Royal Guard#gp1");
+ hideonnpc instance_npcname("King#gp1");
+ sleep 1000;
+OnSummon:
+ sleep 2000;
+ .@map$ = instance_mapname("1@spa");
+ areamonster(.@map$, 182, 190, 214, 214, _("Cursed Sentinel"), CURSED_SENTINEL, 2, instance_npcname("#gp1control")+"::OnMyMobDead");
+ areamonster(.@map$, 182, 190, 214, 214, _("Cursed Solider"), CURSED_SOLDIER, 2, instance_npcname("#gp1control")+"::OnMyMobDead");
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp1control")+"::OnMyMobDead"))
+ end;
+ if ('gp1 < 2) {
+ ++'gp1;
+ donpcevent instance_npcname("#gp1control")+"::OnSummon";
+ end;
+ }
+ mapannounce(instance_mapname("1@spa"), _("The passage on 2nd floor in the palace of the ghost is open."), bc_map, C_YELLOW);
+ enablenpc instance_npcname("#gp1warp");
+ disablenpc instance_npcname("#gp1control");
+ end;
+OnInstanceInit:
+ 'gp1 = 0;
+ disablenpc instance_npcname("#gp1warp");
+ end;
+}
+
+1@spa,132,122,0 script Lurid Royal Guard#gp2 4_M_SAKRAYROYAL,{
+ cutin("npc-tiara", 3);
+ mes("[Lurid Royal Guard]");
+ mes("Your Highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him...");
+ npctalk(_("Your Highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him..."), instance_npcname("Lurid Royal Guard#gp2"));
+ next;
+ mes("[Princess Tiara]");
+ mes("If...if a marriage is arranged what should I do ?");
+ npctalk(_("If...if a marriage is arranged what should I do ?"), instance_npcname("Tiara Princess#gp2"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("The only thing I can do is protect you from physical harm.");
+ npctalk(_("The only thing I can do is protect you from physical harm."), instance_npcname("Lurid Royal Guard#gp2"));
+ next;
+ mes("[Princess Tiara]");
+ mes("Then, what can I do?");
+ npctalk(_("Then, what can I do?"), instance_npcname("Tiara Princess#gp2"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("......");
+ mes("You must decide that for yourself your highness...");
+ npctalk(_("You must decide that for yourself your highness..."), instance_npcname("Lurid Royal Guard#gp2"));
+ next;
+ mes("[Princess Tiara]");
+ mes("Would it be easier for you if I were married and sent off to another country?");
+ npctalk(_("Would it be easier for you if I were married and sent off to another country?"), instance_npcname("Tiara Princess#gp2"));
+ next;
+ cutin("", 255);
+ mes("[Lurid Royal Guard]");
+ mes("I will alway stand by you and protect you forever.");
+ npctalk(_("I will alway stand by you and protect you forever."), instance_npcname("Lurid Royal Guard#gp2"));
+ next;
+ mes("[Princess Tiara]");
+ mes("Monsters in the castle? Protect me!");
+ npctalk(_("Monsters in the castle? Protect me!"), instance_npcname("Tiara Princess#gp2"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("Step back, Let's go!");
+ npctalk(_("Step back, Let's go!"), instance_npcname("Lurid Royal Guard#gp2"));
+ close2();
+ donpcevent instance_npcname("#gp2control")+"::OnStart";
+ end;
+}
+
+1@spa,1,1,1 script #gp2control HIDDEN_NPC,{
+ end;
+OnStart:
+ hideonnpc instance_npcname("Lurid Royal Guard#gp2");
+ hideonnpc instance_npcname("Tiara Princess#gp2");
+ sleep 1000;
+OnSummon:
+ sleep 2000;
+ .@map$ = instance_mapname("1@spa");
+ areamonster(.@map$, 143, 96, 94, 143, _("Broken Mind"), BROKEN_MIND, 3, instance_npcname("#gp2control")+"::OnMyMobDead");
+ areamonster(.@map$, 143, 96, 94, 143, _("Floating Word"), FLOATING_WORD, 4, instance_npcname("#gp2control")+"::OnMyMobDead");
+ areamonster(.@map$, 143, 96, 94, 143, _("Like Love"), LIKE_LOVE, 3, instance_npcname("#gp2control")+"::OnMyMobDead");
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp2control")+"::OnMyMobDead"))
+ end;
+ mapannounce(instance_mapname("1@spa"), _("The passage on the 3rd floor of the palace is open."), bc_map, C_YELLOW);
+ enablenpc instance_npcname("#gp2warp");
+ disablenpc instance_npcname("#gp2control");
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#gp2warp");
+ end;
+}
+
+1@spa,32,54,1 script King#gp3 4_M_RUSKING,{
+ mes("[King]");
+ mes("It was you who brought the monsters here, you want to get rid of me and have the princess for yourself?");
+ npctalk(_("It was you who brought the monsters here, you want to get rid of me and have the princess for yourself?"), instance_npcname("King#gp3"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("It's a trap, you should trust me, your majesty!");
+ npctalk(_("It's a trap, you should trust me, your majesty!"), instance_npcname("Lurid Royal Guard#gp3"));
+ next;
+ mes("[King]");
+ mes("Shut up! You're betrayed me ! I trusted you... you must pay for your disgrace.");
+ npctalk(_("Shut up! You're betrayed me ! I trusted you... you must pay for your disgrace."), instance_npcname("King#gp3"));
+ next;
+ mes("[King]");
+ mes("You will suffer for the rest of your life.");
+ npctalk(_("You will suffer for the rest of your life."), instance_npcname("King#gp3"));
+ close2();
+ donpcevent instance_npcname("#gp3control")+"::OnStart";
+ end;
+}
+
+1@spa,54,28,0 script #gp3warp WARPNPC,1,1,{
+ if (!'gp5)
+ warp("1@spa", 218, 186);
+ else {
+ if (questprogress(40024))
+ completequest 40024;
+ mes("It is time to leave Palace of the ghost.\r"
+ "Everything is completed.\r"
+ "Everything will be vanished...");
+ close2();
+ if (first_time_gpmission)
+ getitem Gray_Piece, 1;
+ if (!first_time_gpmission) {
+ getitem Gray_Piece, 2;
+ getexp(900000, 500000);
+ ++first_time_gpmission;
+ }
+ warp("dali02", 49, 127);
+ end;
+ }
+ end;
+}
+
+1@spa,35,56,1 script Ominous Voice#gp3 4_TRACE,{
+ end;
+OnStart:
+ initnpctimer;
+ end;
+OnTimer3000:
+ npctalk(_("Oh, faithful royal guard, you are trapped."));
+ end;
+OnTimer6000:
+ npctalk(_("The conspiracy in the palace has your princess in grave danger..."));
+ end;
+OnTimer9000:
+ npctalk(_("Who are you? Show yourself!"), instance_npcname("Lurid Royal Guard#gp3"));
+ end;
+OnTimer12000:
+ npctalk(_("Ah... so you do hear me?"));
+ end;
+OnTimer15000:
+ npctalk(_("...?"), instance_npcname("Lurid Royal Guard#gp3"));
+ end;
+OnTimer18000:
+ npctalk(_("I...I..."), instance_npcname("Lurid Royal Guard#gp3"));
+ end;
+OnTimer21000:
+ npctalk(_("Kukuku... What do you want boy?"));
+ end;
+OnTimer24000:
+ stopnpctimer;
+ hideonnpc instance_npcname("Ominous Voice#gp3");
+ hideonnpc instance_npcname("Lurid Royal Guard#gp3");
+ donpcevent instance_npcname("#gp3control")+"::OnSummon";
+ end;
+}
+
+1@spa,1,1,1 script #gp3control HIDDEN_NPC,{
+ end;
+OnStart:
+ hideonnpc instance_npcname("King#gp3");
+ hideonnpc instance_npcname("Soldier#gp3_1");
+ hideonnpc instance_npcname("Soldier#gp3_2");
+ hideonnpc instance_npcname("Soldier#gp3_3");
+ hideonnpc instance_npcname("Captain of the Guard#gp3");
+ donpcevent instance_npcname("Ominous Voice#gp3")+"::OnStart";
+ end;
+OnSummon:
+ initnpctimer;
+ .@map$ = instance_mapname("1@spa");
+ 'talkid[0] = areamonster(.@map$, 61, 63, 24, 24, _("Cursed Memory"), CURSED_MEMORY, 2 + 'gp3, instance_npcname("#gp3control")+"::OnMyMobDead");
+ 'talkid[1] = areamonster(.@map$, 61, 63, 24, 24, _("Colorless Vow"), COLORLESS_VOW, 3 + 'gp3, instance_npcname("#gp3control")+"::OnMyMobDead");
+ 'talkid[2] = areamonster(.@map$, 61, 63, 24, 24, _("Old Friendship"), OLD_FRIENDSHIP, 2 + 'gp3, instance_npcname("#gp3control")+"::OnMyMobDead");
+ end;
+OnTimer2000:
+ stopnpctimer;
+ unittalk('talkid[0], _("Faithful Guards"));
+ unittalk('talkid[1], _("Run!"));
+ unittalk('talkid[2], _("Being framed..."));
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp3control")+"::OnMyMobDead"))
+ end;
+ if (!'gp3) {
+ mapannounce instance_mapname("1@spa"), "The passage on the 4rd floor of the palace is open.", bc_map, C_YELLOW;
+ enablenpc instance_npcname("#gp3warp");
+ donpcevent instance_npcname("#gp4control")+"::OnSummon";
+ disablenpc instance_npcname("#gp1warp");
+ }
+ ++'gp3;
+ if ('gp3 < 5)
+ donpcevent instance_npcname("#gp3control")+"::OnSummon";
+ else {
+ stopnpctimer;
+ disablenpc instance_npcname("#gp3control");
+ }
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#gp3warp");
+ 'gp3 = 0;
+ end;
+}
+
+1@spa,199,214,1 script Lurid Royal Guard#gp4 4_M_SAKRAYROYAL,{
+ mes("[Lurid Royal Guard]");
+ mes("Where is Princess Tiara?");
+ npctalk(_("Where is Princess Tiara?"), instance_npcname("Lurid Royal Guard#gp4"));
+ next;
+ mes("[Visiting Prince]");
+ mes("You are too late... but you brought what I was looking for. Thanks for your help.");
+ npctalk(_("You are too late... but you brought what I was looking for. Thanks for your help."), instance_npcname("Visiting Prince#gp4"));
+ next;
+ mes("[Visiting Prince]");
+ mes("Cursed Thanatos Magic Trace! Are you ready to have a new master?");
+ npctalk(_("Cursed Thanatos Magic Trace! Are you ready to have a new master?"), instance_npcname("Visiting Prince#gp4"));
+ next;
+ cutin("tartanos", 3);
+ mes("[Thanatos Magic Trace]");
+ mes("How dare you!");
+ npctalk(_("How dare you!"), instance_npcname("Thanatos Magic Trace#gp4"));
+ next;
+ mes("[Visiting Prince]");
+ mes("Aah, aah!!!");
+ npctalk(_("Aah, aah!!!"), instance_npcname("Visiting Prince#gp4"));
+ close2();
+ cutin("", 255);
+ donpcevent instance_npcname("#gp4control")+"::OnBoss";
+ end;
+}
+
+1@spa,1,1,1 script #gp4control HIDDEN_NPC,{
+ end;
+OnStart:
+ end;
+OnSummon:
+ .@map$ = instance_mapname("1@spa");
+ areamonster(.@map$, 182, 217, 214, 188, _("Cursed Sentinel"), CURSED_SENTINEL, rand(2,3), instance_npcname("#gp4control")+"::OnMyMobDead");
+ areamonster(.@map$, 182, 217, 214, 188, _("Sweet Slaughter"), SWEET_SLAUGHTER, rand(2,3), instance_npcname("#gp4control")+"::OnMyMobDead");
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp4control")+"::OnMyMobDead"))
+ end;
+ ++'gp4;
+ if ('gp4 > 3)
+ donpcevent instance_npcname("#gp4control")+"::OnStory";
+ else
+ donpcevent instance_npcname("#gp4control")+"::OnSummon";
+ end;
+OnStory:
+ for(.@i = 1; .@i <= 4; ++.@i)
+ enablenpc instance_npcname("Soldier's Corpse#gp4_"+.@i);
+ enablenpc instance_npcname("Captain's Corpse#gp4");
+ enablenpc instance_npcname("King's Corpse#gp4");
+ enablenpc instance_npcname("Lurid Royal Guard#gp4");
+ enablenpc instance_npcname("Thanatos Magic Trace#gp4");
+ enablenpc instance_npcname("Visiting Prince#gp4");
+ end;
+OnBoss:
+ for(.@i = 1; .@i <= 4; ++.@i)
+ hideonnpc instance_npcname("Soldier's Corpse#gp4_"+.@i);
+ hideonnpc instance_npcname("Captain's Corpse#gp4");
+ hideonnpc instance_npcname("King's Corpse#gp4");
+ hideonnpc instance_npcname("Lurid Royal Guard#gp4");
+ hideonnpc instance_npcname("Thanatos Magic Trace#gp4");
+ hideonnpc instance_npcname("Visiting Prince#gp4");
+ sleep 1000;
+ monster(instance_mapname("1@spa"), 197, 218, _("Torturous Redeemer"), TORTUROUS_REDEEMER, 1, instance_npcname("#gp4control")+"::OnBossDead");
+ end;
+OnBossDead:
+ monster(instance_mapname("1@spa"), 197, 180, _("Sweet Slaughter"), SWEET_SLAUGHTER, 1, instance_npcname("#gp4control")+"::OnMobDead");
+ end;
+OnMobDead:
+ mapannounce instance_mapname("1@spa"), "The passage on the 5th floor of the palace is open.", bc_map, C_YELLOW;
+ enablenpc instance_npcname("#gp4warp");
+ donpcevent instance_npcname("#gp5control")+"::OnStart";
+ disablenpc instance_npcname("#gp4control");
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#gp4warp");
+ for(.@i = 1; .@i <= 4; ++.@i)
+ disablenpc instance_npcname("Soldier's Corpse#gp4_"+.@i);
+ disablenpc instance_npcname("Captain's Corpse#gp4");
+ disablenpc instance_npcname("King's Corpse#gp4");
+ disablenpc instance_npcname("Lurid Royal Guard#gp4");
+ disablenpc instance_npcname("Thanatos Magic Trace#gp4");
+ disablenpc instance_npcname("Visiting Prince#gp4");
+ 'gp4 = 0;
+ end;
+}
+
+1@spa,57,42,0 script Lurid Royal Guard#gp5 4_M_SAKRAYROYAL,{
+ mes("[Princess Tiara]");
+ mes("You kept your promise.");
+ npctalk(_("You kept your promise."), instance_npcname("Tiara Princess#gp5"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("princess!");
+ npctalk(_("princess"), instance_npcname("Lurid Royal Guard#gp5"));
+ next;
+ cutin("npc-tiara", 3);
+ mes("[Princess Tiara]");
+ mes("Thank you..now I can rest at beside you...");
+ npctalk(_("Thank you..now I can rest at beside you..."), instance_npcname("Tiara Princess#gp5"));
+ next;
+ mes("[Lurid Royal Guard]");
+ mes("No..NO!!!!!!");
+ npctalk(_("No..NO!!!!!!"), instance_npcname("Lurid Royal Guard#gp5"));
+ next;
+ mes("[The Voice of Princess Tiara]");
+ mes("I want to be with you forever in peace...forever...");
+ npctalk(_("I want to be with you forever in peace...forever..."), instance_npcname("Tiara Princess#gp5"));
+ next;
+ cutin("b-tiara", 3);
+ mes("[Lurid Royal Guard]");
+ mes("no.....Ahh ahh ahh!!!~!");
+ npctalk(_("no.....Ahh ahh ahh!!!~!"), instance_npcname("Lurid Royal Guard#gp5"));
+ next;
+ mes("[The Voice of Princess Tiara]");
+ mes("I love you...");
+ npctalk(_("I love you..."), instance_npcname("Tiara Princess#gp5"));
+ close2();
+ cutin("", 255);
+ donpcevent instance_npcname("#gp5control")+"::OnStart2";
+ end;
+}
+
+1@spa,40,44,6 script Sakray#gp5 4_M_SAKRAY,{
+ cutin("sakray", 3);
+ mes("[Lurid Royal Guard]");
+ mes("Are you satisfied..? Thanatos Magic Trace?");
+ npctalk(_("Are you satisfied..? Thanatos Magic Trace?"), instance_npcname("Sakray#gp5"));
+ next;
+ mes("[Thanatos Magic Trace]");
+ mes("I need more blood..Sakray, offer me his blood.");
+ npctalk(_("I need more blood..Sakray, offer me his blood."), instance_npcname("Thanatos Magic Trace#gp5"));
+ next;
+ mes("[Sakray]");
+ mes("Okay, that is good. A traveler.\r"
+ "Did you see?");
+ npctalk(_("Okay, that is good. A traveler. Did you see?"), instance_npcname("Sakray#gp5"));
+ next;
+ mesf("[%s]", strcharinfo(0));
+ mes("Sakray, What do you want sympathy? Or is it a trap?");
+ unittalk(getcharid(3), _("Sakray, What do you want sympathy? Or is it a trap?"));
+ next;
+ mes("[Sakray]");
+ mes("Non...I did not need to make an effort to catch a novice.");
+ npctalk(_("Non...I did not need to make an effort to catch a novice."), instance_npcname("Sakray#gp5"));
+ next;
+ mesf("[%s]", strcharinfo(0));
+ mes("If so... then why...?");
+ unittalk(getcharid(3), _("If so... then why...?"));
+ next;
+ cutin("cry-b", 3);
+ mes("[Sakray]");
+ mes("I wanted to get rid of a piece of humanity inside of me through you.");
+ npctalk(_("I wanted to get rid of a piece of humanity inside of me through you."), instance_npcname("Sakray#gp5"));
+ next;
+ mes("[Sakray]");
+ mes("I am quite satisfied with the result.");
+ next;
+ mes("[Thanatos Magic Trace]");
+ mes("Sakray, offer the blood to me now!");
+ npctalk(_("Sakray, offer the blood to me now!"), instance_npcname("Thanatos Magic Trace#gp5"));
+ next;
+ mes("[Sakray]");
+ mes("If you were me, what would you do?");
+ next;
+ mes("[Sakray]");
+ mes("Can you set yourself free from this curse?");
+ next;
+ mesf("[%s]", strcharinfo(0));
+ mes("...");
+ unittalk(getcharid(3), _("..."));
+ next;
+ mes("[Sakray]");
+ mes("Heh heh... I will keep watching you until the day you grow up enough.");
+ next;
+ mes("[Sakray]");
+ mes("I am willing to hunt you later for Thanatos.");
+ next;
+ cutin("", 255);
+ mes("[Sakray]");
+ mes("Farewell then.");
+ close2();
+ donpcevent instance_npcname("#gp5control")+"::OnEnd";
+ hideonnpc instance_npcname("Sakray#gp5");
+ hideonnpc instance_npcname("Thanatos Magic Trace#gp5");
+ end;
+}
+
+1@spa,1,1,1 script #gp5control HIDDEN_NPC,{
+ end;
+OnStart:
+ stopnpctimer instance_npcname("#gp3control");
+ disablenpc instance_npcname("#gp3control");
+ killmonster instance_mapname("1@spa"), "All";
+ disablenpc instance_npcname("#gp3warp");
+ enablenpc instance_npcname("Lurid Royal Guard#gp5");
+ enablenpc instance_npcname("Tiara Princess#gp5");
+ end;
+OnStart2:
+ hideonnpc instance_npcname("Lurid Royal Guard#gp5");
+ hideonnpc instance_npcname("Tiara Princess#gp5");
+ sleep 2000;
+OnSummon:
+ initnpctimer;
+ .@map$ = instance_mapname("1@spa");
+ 'talkid[0] = areamonster(.@map$, 61, 63, 24, 24, _("Forgotten Name"), FORGOTTEN_NAME, rand(1,2), instance_npcname("#gp5control")+"::OnMyMobDead");
+ 'talkid[1] = areamonster(.@map$, 61, 63, 24, 24, _("Colorless Vow"), COLORLESS_VOW, 2, instance_npcname("#gp5control")+"::OnMyMobDead");
+ 'talkid[2] = areamonster(.@map$, 61, 63, 24, 24, _("Sweet Slaughter"), SWEET_SLAUGHTER, rand(1,2), instance_npcname("#gp5control")+"::OnMyMobDead");
+ end;
+OnTimer2000:
+ stopnpctimer;
+ unittalk('talkid[0], _("What is this..??"));
+ unittalk('talkid[1], _("Wake up! look at us... We are monsters?"));
+ unittalk('talkid[2], _("Sakray killed the princess!"));
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@spa"), instance_npcname("#gp5control")+"::OnMyMobDead"))
+ end;
+ ++'gp5;
+ if ('gp5 > 2)
+ donpcevent instance_npcname("#gp5control")+"::OnStory";
+ else
+ donpcevent instance_npcname("#gp5control")+"::OnSummon";
+ end;
+OnBossDead:
+ enablenpc instance_npcname("Sakray#gp5");
+ enablenpc instance_npcname("Thanatos Magic Trace#gp5");
+ end;
+OnStory:
+ stopnpctimer;
+ 'BossID = monster(instance_mapname("1@spa"), 44, 47, _("Torturous Redeemer"), E_TORTUROUS_REDEEMER, 1, instance_npcname("#gp5control")+"::OnBossDead");
+ unittalk('BossID, _("Thanatos Magic Trace! I will destroy you if I can't have you... Oh no! How could this be?"));
+ sleep 3000;
+ unitkill 'BossID;
+ end;
+OnEnd:
+ hideoffnpc instance_npcname("Voice of Princess Tiara");
+ hideoffnpc instance_npcname("Voice of Sakray");
+ hideoffnpc instance_npcname("Thanatos Magic Trace");
+ npctalk(_("What can I do for you?"), instance_npcname("Voice of Princess Tiara"));
+ sleep 3000;
+ npctalk(_("I will always stand by you. Please reset beside me."), instance_npcname("Voice of Sakray"));
+ sleep 3000;
+ npctalk(_("Your soul is mine until you find the blood that satisfies me.."), instance_npcname("Thanatos Magic Trace"));
+ sleep 3000;
+ npctalk(_("Reset in the shadow with me."), instance_npcname("Voice of Sakray"));
+ sleep 3000;
+ npctalk(_("In the dark forever..."), instance_npcname("Voice of Sakray"));
+ sleep 3000;
+ mapannounce(instance_mapname("1@spa"), _("It is time to leave the Ghost Palace."), bc_map, C_YELLOW);
+ enablenpc instance_npcname("King#gpend");
+ enablenpc instance_npcname("#gp3warp");
+ hideonnpc instance_npcname("Voice of Princess Tiara");
+ hideonnpc instance_npcname("Voice of Sakray");
+ hideonnpc instance_npcname("Thanatos Magic Trace");
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("Lurid Royal Guard#gp5");
+ disablenpc instance_npcname("Tiara Princess#gp5");
+ disablenpc instance_npcname("Thanatos Magic Trace#gp5");
+ disablenpc instance_npcname("Sakray#gp5");
+ disablenpc instance_npcname("King#gpend");
+ hideonnpc instance_npcname("Voice of Princess Tiara");
+ hideonnpc instance_npcname("Voice of Sakray");
+ hideonnpc instance_npcname("Thanatos Magic Trace");
+ 'gp5 = 0;
+ end;
+}
+
+1@spa,48,29,1 script King#gpend 4_M_RUSKING,{
+ mes("[King]");
+ mes("Hey there, are you alive?\r"
+ "I did not expect to meet someone alive");
+ next;
+ mes("[King]");
+ mes("Do you possibly have ^009900Gray Piece^000000?\r"
+ "Can you give it to me?\r"
+ "The old memory of faithful royal guard,\r"
+ "the memory of everyone he loved becomes broken pieces and are contained inside of them.");
+ next;
+ mes("[King]");
+ mes("Will you give ^009900Gray Piece^000000 to me?\r"
+ "The guilt is eating my soul.\r"
+ "My soul is stuck in ghost palace.");
+ next;
+ mes("[King]");
+ mes("I am collecting Sakray's abandoned memories from these shards.");
+ next;
+ mes("[King]");
+ mes("If you give any Gray Shards to me, I can make equipment for you.");
+ next;
+ mes("[King]");
+ mes("The cursed knight...\r"
+ "Please help me save the soul of Sakray.");
+ next;
+ setarray .@items_list, Thanatos_Sword, Thanatos_Great_Sword, Thanatos_Spear, Thanatos_Long_Spear, Thanatos_Staff, Thanatos_Two-Handed_Staff, Thanatos_Bow,
+ Thanatos_Dagger, Thanatos_Katar, Thanatos_Knuckles, Thanatos_Hammer, Thanatos_Axe, Thanatos_Violin, Thanatos_Whip, Gray_Shield,
+ Gray_Armor, Gray_Robe, Gray_Cloak, Boots_of_Gray, Gray_Helmet;
+
+ setarray .@cost, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 100, 100, 100, 100, 100, 100;
+ .@menulist$ = "";
+ for (.@i = 0; .@i < getarraysize(.@items_list); ++.@i)
+ .@menulist$ += getitemname(.@items_list[.@i])+":";
+ while (true) {
+ .@choice = select(.@menulist$, "Cancel") - 1;
+ if (.@choice == getarraysize(.@items_list)) {
+ mes("[King]");
+ mes("Someday, Sakray will get out of his curse for sure.\r"
+ "I believe collecting Gray Shards is the only method to save him.");
+ close();
+ }
+ next;
+ mes("[King]");
+ mesf("to make a ^FF0000%s^000000 \r"
+ "I need %d ^009900Gray Shard^000000", getitemname(.@items_list[.@choice]), .@cost[.@choice]);
+ switch (select("Cancel", "hand over "+.@cost[.@choice]+" Gray Shard.")) {
+ case 1:
+ next;
+ mes("[King]");
+ mes("Someday, Sakray will get out of curse for sure. I believe");
+ next;
+ break;
+ case 2:
+ next;
+ if (countitem(Gray_Piece) < .@cost[.@choice]) {
+ mes("[King]");
+ mes("You don't have enough Gray Shards.");
+ mesf("I need %d Gray Shards to make a ^FF0000%s.^000000", .@cost[.@choice], getitemname(.@items_list[.@choice]));
+ break;
+ }
+ mes("[King]");
+ mesf("I will make a ^FF0000%s^000000 \r"
+ "with %d ^009900Gray Shard^000000", getitemname(.@items_list[.@choice]), .@cost[.@choice]);
+ next;
+ mes("[King]");
+ mes("You see a light through the folded hands of the king and it gradually takes on a shape.");
+ next;
+ mes("[King]");
+ mesf("All right, it is done.\r"
+ "Take this ^FF0000%s.^000000\r"
+ "Use it to confront Sakray and Thanatos.", getitemname(.@items_list[.@choice]));
+ next;
+ mes("[King]");
+ mes("The power requires a sacrifice.\r"
+ "Please be careful...");
+ delitem Gray_Piece, .@cost[.@choice];
+ getitem .@items_list[.@choice], 1;
+ close();
+ }
+ }
+}
+
+// 1st floor npc's
+1@spa,198,201,1 script Lurid Royal Guard#gp1 4_M_SAKRAYROYAL,{
+ end;
+}
+1@spa,197,217,0 warp #gp1warp 1,1,1@spa,114,120
+
+// 2nd floor npc's
+1@spa,135,125,3 script Tiara Princess#gp2 4_F_MAYSEL,{
+ end;
+}
+1@spa,117,137,0 warp #gp2warp 1,1,1@spa,60,43
+
+// 3rd floor npc's
+1@spa,30,58,5 script Lurid Royal Guard#gp3 4_M_SAKRAY_TIED,{
+ end;
+}
+1@spa,28,52,0 script Captain of the Guard#gp3 4_M_KY_KNT,{
+ end;
+}
+1@spa,30,52,0 script Soldier#gp3_1 4_M_KY_SOLD,{
+ end;
+}
+1@spa,34,53,1 script Soldier#gp3_2 4_M_CRU_SOLD,{
+ end;
+}
+1@spa,25,53,0 script Soldier#gp3_3 4_M_CRU_SOLD,{
+ end;
+}
+
+// 4th floor npc's
+1@spa,201,198,1 script Soldier's Corpse#gp4_1 4_M_DIEMAN,{
+ end;
+}
+1@spa,191,207,0 script Soldier's Corpse#gp4_2 4_M_DIEMAN,{
+ end;
+}
+1@spa,206,209,0 script Soldier's Corpse#gp4_3 4_M_DIEMAN,{
+ end;
+}
+1@spa,189,193,0 script Soldier's Corpse#gp4_4 4_M_DIEMAN,{
+ end;
+}
+1@spa,211,194,4 script Captain's Corpse#gp4 4_M_LIEMAN,{
+ end;
+}
+1@spa,194,214,5 script King's Corpse#gp4 4_M_TRISTAN,{
+ end;
+}
+1@spa,197,218,5 script Visiting Prince#gp4 4_M_KNIGHT_SILVER,{
+ end;
+}
+1@spa,197,218,0 script Thanatos Magic Trace#gp4 HIDDEN_WARP_NPC,{
+ end;
+}
+1@spa,178,186,0 warp #gp4warp 1,1,1@spa,30,57
+
+// 5th floor npc's
+1@spa,60,43,3 script Tiara Princess#gp5 4_F_MAYSEL,{
+ end;
+}
+1@spa,40,44,0 script Thanatos Magic Trace#gp5 HIDDEN_WARP_NPC,{
+ end;
+}
+1@spa,40,46,0 script Voice of Princess Tiara CLEAR_NPC,{
+ end;
+}
+1@spa,42,43,0 script Voice of Sakray CLEAR_NPC,{
+ end;
+}
+1@spa,40,41,0 script Thanatos Magic Trace CLEAR_NPC,{
+ end;
+}
+
diff --git a/npc/re/scripts.conf b/npc/re/scripts.conf
index 38caffc81..55b5066de 100644
--- a/npc/re/scripts.conf
+++ b/npc/re/scripts.conf
@@ -87,13 +87,14 @@
"npc/re/instances/BakonawaLake.txt",
"npc/re/instances/BangungotHospital.txt",
"npc/re/instances/BuwayaCave.txt",
+"npc/re/instances/EclageInterior.txt",
+"npc/re/instances/ghost_palace.txt",
"npc/re/instances/HazyForest.txt",
"npc/re/instances/MalangdoCulvert.txt",
"npc/re/instances/OctopusCave.txt",
"npc/re/instances/OldGlastHeim.txt",
"npc/re/instances/saras_memory.txt",
"npc/re/instances/WolfchevLaboratory.txt",
-"npc/re/instances/EclageInterior.txt",
//================= Kafras & Cool Event Corp. =============================
"npc/re/kafras/kafras.txt",