summaryrefslogtreecommitdiff
path: root/world/map/npc/052-2
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/052-2')
-rw-r--r--world/map/npc/052-2/_import.txt12
-rw-r--r--world/map/npc/052-2/_mobs.txt3
-rw-r--r--world/map/npc/052-2/_nodes.txt4
-rw-r--r--world/map/npc/052-2/_warps.txt3
-rw-r--r--world/map/npc/052-2/chest.txt181
-rw-r--r--world/map/npc/052-2/janitor.txt38
-rw-r--r--world/map/npc/052-2/lobby.txt382
-rw-r--r--world/map/npc/052-2/mapflags.txt2
-rw-r--r--world/map/npc/052-2/partyroom.txt286
-rw-r--r--world/map/npc/052-2/storage.txt191
10 files changed, 0 insertions, 1102 deletions
diff --git a/world/map/npc/052-2/_import.txt b/world/map/npc/052-2/_import.txt
deleted file mode 100644
index aa01af40..00000000
--- a/world/map/npc/052-2/_import.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-// Map 052-2: Illia forsaken inn
-// This file is generated automatically. All manually added changes will be removed when running the Converter.
-map: 052-2
-npc: npc/052-2/_mobs.txt
-npc: npc/052-2/_nodes.txt
-npc: npc/052-2/_warps.txt
-npc: npc/052-2/chest.txt
-npc: npc/052-2/janitor.txt
-npc: npc/052-2/lobby.txt
-npc: npc/052-2/mapflags.txt
-npc: npc/052-2/partyroom.txt
-npc: npc/052-2/storage.txt
diff --git a/world/map/npc/052-2/_mobs.txt b/world/map/npc/052-2/_mobs.txt
deleted file mode 100644
index 1d91c286..00000000
--- a/world/map/npc/052-2/_mobs.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Illia forsaken inn mobs
-
diff --git a/world/map/npc/052-2/_nodes.txt b/world/map/npc/052-2/_nodes.txt
deleted file mode 100644
index 38010d03..00000000
--- a/world/map/npc/052-2/_nodes.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Illia forsaken inn nodes
-
-// (no nodes)
diff --git a/world/map/npc/052-2/_warps.txt b/world/map/npc/052-2/_warps.txt
deleted file mode 100644
index 06a0dffd..00000000
--- a/world/map/npc/052-2/_warps.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-// This file is generated automatically. All manually added changes will be removed when running the Converter.
-// Illia forsaken inn warps
-
diff --git a/world/map/npc/052-2/chest.txt b/world/map/npc/052-2/chest.txt
deleted file mode 100644
index d7644054..00000000
--- a/world/map/npc/052-2/chest.txt
+++ /dev/null
@@ -1,181 +0,0 @@
-//-----------------------------------------------------------------------------
-// Illia Forsaken Inn - Chest room
-// $@illia_progress = 8
-//
-// Level progress:
-// No progress: Players pick the rewards, then leave,
-// with the Hero forced to leave last.
-// @illia_got_rewards value:
-// 0: player did not pick his reward yet
-// 1: player picked his common rewards
-// 2: player picked his unique rewards
-// 3: player choosed to leave the room
-//-----------------------------------------------------------------------------
-
-052-2,136,73,0|script|Chest#illia|111
-{
- set @step, 8;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if (@illia_got_rewards > 2) end;
- if (@illia_got_rewards == 2) goto L_AlreadyGotReward;
- if (@illia_current_num_rewards > 0) goto L_ResumePick;
- set @illia_current_num_rewards, 0;
- mes "You find an opened chest which seems full of equipments.";
- next;
- mes "You realize again you were not the first one to visit this place. But where the others failed, you succeeded.";
- goto L_Pick;
-
-L_ShouldNotBeHere:
- heal -Hp, 0;
- end;
-
-OnInit:
- setarray $@illia_common_rewards$, "SteelShield", "WarlordHelmet", "KnightsHelmet", "InfantryHelmet", "CrusadeHelmet", "ChainmailShirt", "LightPlatemail", "WarlordPlate", "Setzer", "RockKnife", "WarlordBoots", "ForestArmor", "ForestBow", "WoodenStaff", "WizardHat", "ShortSword", "BoneKnife", "JeansChaps", "PointyWitchHat", "AssassinPants", "AssassinGloves", "AssassinBoots";
- setarray $@illia_common_rewards_n$, "Steel Shield", "Warlord Helmet", "Knights Helmet", "Infantry Helmet", "Crusade Helmet", "Chainmail Shirt", "Light Platemail", "Warlord Plate", "Setzer", "Rock Knife", "Warlord Boots", "Forest Armor", "Forest Bow", "Wooden Staff", "Wizard Hat", "Short Sword", "Bone Knife", "Jeans Chaps", "Pointy Witch Hat", "Assassin Pants", "Assassin Gloves", "Assassin Boots";
- setarray $@illia_unique_rewards$, "BullHelmet", "BansheeBow", "HeartOfIsis", "LazuriteRobe", "AssassinShirt";
- setarray $@illia_unique_rewards_n$, "Bull Helmet", "Banshee Bow", "Heart of Isis", "Lazurite Robe", "Assassin Shirt";
- end;
-
-L_ResumePick:
- mes "Ok. I should continue to dig in this chest...";
- menu
- "... and quickly.", L_GetReward,
- "... or maybe not. I am out of time.", L_AskLeaving,
- "... but I can't carry more stuff.", L_AskLeaving,
- "... no, wait a minute.", L_Close;
-
-L_Pick:
- menu
- "Let's take what I deserve for all this.", L_GetReward,
- "Wait.", L_Close;
-
-L_GetReward:
- if (@illia_got_rewards == 0)
- goto L_GetCommonReward;
- if (@illia_got_rewards == 1)
- goto L_GetUniqueReward;
- goto L_Close;
-
-L_GetCommonReward:
- if (@illia_current_num_rewards == $@illia_num_common_reward_items)
- goto L_RewardDone;
- getinventorylist;
- set @index, rand(getarraysize($@illia_common_rewards$));
- set @reward$, $@illia_common_rewards$[@index];
- if ((checkweight(@reward$, 1) == 0) || (@inventorylist_count == 100))
- goto L_InventoryNoSpace;
- set @illia_current_num_rewards, @illia_current_num_rewards + 1;
- getitem @reward$, 1;
- mes "You found a " + $@illia_common_rewards_n$[@index] + "!";
- set @reward$, "";
- goto L_GetCommonReward;
-
-L_GetUniqueReward:
- if (@illia_current_num_rewards == $@illia_num_unique_reward_items)
- goto L_RewardDone;
- if (Illia_Uniques_Count >= 2)
- goto L_GetUniqueReward2;
- getinventorylist;
- set @index, rand(getarraysize($@illia_unique_rewards$));
- set @reward$, $@illia_unique_rewards$[@index];
- if ((checkweight(@reward$, 1) == 0) || (@inventorylist_count == 100))
- goto L_InventoryNoSpace;
- next;
- mes "You notice an interesting shape hidden under a cover...";
- next;
- set @illia_current_num_rewards, @illia_current_num_rewards + 1;
- getitem @reward$, 1;
- mes "You found a " + $@illia_unique_rewards_n$[@index] + "!";
- set Illia_Uniques_Count, Illia_Uniques_Count + 1;
- set @reward$, "";
- goto L_GetUniqueReward;
-
-L_GetUniqueReward2:
- next;
- mes "You find a bunch of gold pieces!";
- next;
- set Zeny, Zeny + 100000*($@illia_num_unique_reward_items - @illia_current_num_rewards);
- getexp 200000*($@illia_num_unique_reward_items - @illia_current_num_rewards), 0;
- set @illia_current_num_rewards, $@illia_num_unique_reward_items;
- goto L_GetUniqueReward;
-
-L_AlreadyGotReward:
- mes "I already took my part.";
- next;
- goto L_AskLeaving;
-
-L_RewardDone:
- set @illia_got_rewards, @illia_got_rewards + 1;
- set @illia_current_num_rewards, 0;
- next;
- if (@illia_got_rewards == 1)
- goto L_GetUniqueReward;
- goto L_AskLeaving; // @illia_got_rewards == 2
-
-L_InventoryNoSpace:
- mes "You cannot carry more stuff. Make some room first.";
- close;
-
-L_AskLeaving:
- mes "It's time to leave this place now.";
- next;
- // Force the hero to leave last, as this event triggers the end of the quest
- // as well as some dialogs from Valia, when the hero returns.
- if (strcharinfo(0) == $@ILLIA_HERO$ && getareausers("052-2", 19, 8, 137, 88) > 1)
- goto L_WaitHelpersLeave;
- goto L_PrepareLeaving;
-
-L_WaitHelpersLeave:
- mes "However, I'd better wait my friends leave before I do.";
- next;
- mes "I prefer to know they left safely this place.";
- close;
-
-L_PrepareLeaving:
- mes "Use Valia's ring to teleport now?";
- menu
- "Yes. Time to make her pay for her trick!", L_Leave,
- "No, I still need to see things here.", L_Close;
-
-L_Leave:
- set @illia_got_rewards, 3;
- set @illia_current_num_rewards, 0;
- addtimer 1000, "Chest#illia::OnMsg1";
- addtimer 4000, "Chest#illia::OnMsg2";
- addtimer 7000, "Chest#illia::OnMsg3";
- addtimer 9000, "Chest#illia::OnFx";
- addtimer 10000, "Chest#illia::OnRing";
- close;
-
-OnMsg1:
- message strcharinfo(0), "At the moment you are wearing the ring, you start to feel dizzy...";
- end;
-
-OnMsg2:
- message strcharinfo(0), "Who is Luvia? Something isn't right... It looks like your memory is rewritten.";
- end;
-
-OnMsg3:
- message strcharinfo(0), "Damn, this ring! That Valia! Someone...";
- end;
-
-OnFx:
- misceffect FX_MAGIC_BLUE_TELEPORT, strcharinfo(0);
- end;
-
-OnRing:
- warp "007-2",31 + rand(0,2),23 + rand(0,2);
- if (strcharinfo(0) == $@ILLIA_HERO$)
- goto L_ScheduleEnd;
- end;
-
-L_ScheduleEnd:
- set $@ILLIA_STATUS, 253;
- startnpctimer "Valia";
- donpcevent "#IlliaDaemon::OnCommandToggle";
- end;
-
-L_Close:
- close;
-
-}
diff --git a/world/map/npc/052-2/janitor.txt b/world/map/npc/052-2/janitor.txt
deleted file mode 100644
index 73858ce4..00000000
--- a/world/map/npc/052-2/janitor.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-// Lobby janitor
-052-2,1,1,0|script|#IlliaJanitor5|32767
-{
-end;
-
-OnCommandClean:
- // For security, kill all.
- killmonster "052-2", "All";
- npcwarp 1, 1, "Luvia?";
- end;
-
-}
-
-// Storage janitor
-052-2,1,1,0|script|#IlliaJanitor6|32767
-{
-end;
-
-OnCommandClean:
- killmonster "052-2", "#ItemsInvoker::OnDeath";
- npcwarp 1, 1, "#ItemsInvoker";
- end;
-
-}
-
-// Final boss janitor
-052-2,1,1,0|script|#IlliaJanitor7|32767
-{
-end;
-
-OnCommandClean:
- killmonster "052-2", "#LuviaDaemon::OnDeath";
- killmonster "052-2", "#LuviaDaemon::OnWGD";
- npcwarp 83, 28, "#LuviaDaemon";
- npcwarp 88, 15, "Luvia";
- end;
-
-}
diff --git a/world/map/npc/052-2/lobby.txt b/world/map/npc/052-2/lobby.txt
deleted file mode 100644
index 1b36d929..00000000
--- a/world/map/npc/052-2/lobby.txt
+++ /dev/null
@@ -1,382 +0,0 @@
-//-----------------------------------------------------------------------------
-// Illia Forsaken Inn - Lobby
-// $@illia_progress = 5
-//
-// Level progress:
-// 0: Initial state
-// 1: Mysterious voice is talking
-// 2: Luvia is appearing
-// 3: Luvia is waiting for a talk, to trigger the fight
-// 4: Hero talked to Luvia. Initiating a talk and demonic spirit waves
-// 5: All Demonic spirits waves are spawned
-// 6: Demonic spirit waves beaten. Talk while preparing the witch guards
-// 7: Luvia is escaping, Witch guards appear
-// 8: Witch guards defeated. Door is open.
-//-----------------------------------------------------------------------------
-
-052-2,40,19,0|script|#InnDoorTrigger|32767,2,2
-{
- set @step, 5;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if ($@illia_level_5_progress == 8) goto L_Warp;
- message strcharinfo(0), "A magical field prevents you from going further...";
- end;
-
-L_Warp:
- warp "052-2", 23, 71;
- message strcharinfo(0), "This place is full of dust... *coughs*";
- end;
-
-L_ShouldNotBeHere:
- heal -100, 0;
- end;
-
-}
-
-052-2,33,40,0|script|#EntranceTrigger|32767,4,2
-{
- set @step, 5;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if ($@illia_level_5_progress == 0 && strcharinfo(0) == $@ILLIA_HERO$) goto L_StartVoices;
- end;
-
-L_StartVoices:
- set $@illia_level_5_progress, 1;
- donpcevent "#MysteriousVoice::OnCommandStart";
- end;
-
-L_ShouldNotBeHere:
- heal -100, 0;
- end;
-}
-
-052-2,1,1,0|script|#LuviaShadow|127
-{
-end;
-
-// Escape sequence
-OnCommandEscape:
- initnpctimer;
- end;
-
-OnTimer100:
- if ($@illia_level_5_progress != 7)
- end;
- npcwarp 39, 35, "#LuviaShadow";
- misceffect FX_DARK_TELEPORT;
- npcwarp 1, 1, "Luvia?";
- end;
-
-OnTimer750:
- if ($@illia_level_5_progress != 7)
- end;
- npcwarp 1, 1, "#LuviaShadow";
- stopnpctimer;
- setnpctimer 0;
- end;
-
-// Invoke sequence
-OnCommandInvoke:
- initnpctimer;
- end;
-
-OnTimer650:
- if ($@illia_level_5_progress != 2)
- end;
- npcwarp 39, 35, "#LuviaShadow";
- misceffect FX_EVIL_SUMMON;
- end;
-
-OnTimer1500:
- if ($@illia_level_5_progress != 2)
- end;
- npcwarp 1, 1, "#LuviaShadow";
- npcwarp 39, 35, "Luvia?";
- set $@illia_level_5_progress, 3;
- stopnpctimer;
- setnpctimer 0;
- end;
-
-OnNN:
- message strcharinfo(0), "The last guard is down. Let's go after Luvia now!";
- end;
-
-}
-
-052-2,1,1,0|script|#MysteriousVoice|127
-{
-end;
-
-OnInit:
- setarray $@illia_lobby_voices$, "Finally.", "I was...", "Waiting...", "For you!";
- end;
-
-OnCommandStart:
- set $@illia_lobby_voices_index, 0;
- initnpctimer;
- end;
-
-// Voices loop
-OnTimer2000:
- if ($@illia_level_5_progress != 1)
- end;
- npcwarp rand(30,42), rand(32,38), "?";
- donpcevent "?::OnCommandTalk";
- end;
-
-OnTimer3000:
- if ($@illia_level_5_progress != 1)
- end;
- npcwarp 1, 1, "?";
- set $@illia_lobby_voices_index, $@illia_lobby_voices_index + 1;
- // FIXME Uncomment next line, comment the next next, when getarraysize is repaired.
- //if ($@illia_lobby_voices_index < getarraysize($@illia_lobby_voices$)) goto L_Continue;
- if ($@illia_lobby_voices_index < 4)
- goto L_Continue;
- // End the process
- stopnpctimer;
- setnpctimer 0;
- set $@illia_lobby_voices_index, 0;
- set $@illia_level_5_progress, 2;
- donpcevent "#LuviaShadow::OnCommandInvoke";
- end;
-
-L_Continue:
- setnpctimer 0;
- end;
-
-}
-
-// Dummy npc to display the mysterious voice,
-// as a workaround to fakenpcname causing problems
-052-2,1,1,0|script|?|127
-{
-end;
-
-OnCommandTalk:
- npctalk strnpcinfo(0), $@illia_lobby_voices$[$@illia_lobby_voices_index];
- end;
-
-}
-
-052-2,1,1,0|script|Luvia?|371,2,2
-{
- if ($@illia_level_5_progress != 3) end;
- if (isin("052-2", 37,36, 41,39)) goto L_HandleTalk;
- // Notify too far
- mes "You see a strange and frightening, yet beautiful woman.";
- if (strcharinfo(0) == $@ILLIA_HERO$)
- mes "Maybe she knows something about this place.";
- close;
-
-L_HandleTalk:
- if (strcharinfo(0) == $@ILLIA_HERO$)
- goto L_TalkToHero;
- goto L_TalkToHelper;
-
-L_TalkToHelper:
- mes "She gives you a quick look then gives her attention to " + $@ILLIA_HERO$ + ".";
- close;
-
-L_TalkToHero:
- mes "Are you Luvia? Your sister Valia sent me to save you! Where is Ismuth?";
- next;
- set $@illia_level_5_progress, 4;
- initnpctimer;
- close;
-
-// Talk sequence timers
-OnTimer1500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "Yes " + $@ILLIA_HERO$ + ", I am Luvia.";
- end;
-
-OnTimer4500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "How nice of all of you to have come to save me!";
- end;
-
-OnTimer7500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "But I fear...";
- end;
-
-OnTimer10500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "... that you are mistaken about who has to be saved!";
- end;
-
-OnTimer13500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "Don't make these faces...";
- end;
-
-OnTimer16500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "Valia is just helping me by sending new soldiers for my personal army!";
- end;
-
-OnTimer21500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "So, if I may... Let's see what you are made of!";
- end;
-
-// Monster invokes timers
-OnTimer24500:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "Demonotis!";
- misceffect FX_EVIL_SUMMON;
- callsub S_GetHeroRect;
- areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1101, 20 + 16 - 480/(30+$Illia_Luvia_Harvest), "Luvia?::OnDSDeath";
- callsub S_ClearHeroRect;
- end;
-
-OnTimer44000:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "Demonotis!";
- misceffect FX_EVIL_SUMMON;
- callsub S_GetHeroRect;
- areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1101, 28 + 16 - 480/(30+$Illia_Luvia_Harvest), "Luvia?::OnDSDeath";
- callsub S_ClearHeroRect;
- end;
-
-OnTimer77000:
- if ($@illia_level_5_progress != 4)
- end;
- npctalk strnpcinfo(0), "Demonotis!";
- misceffect FX_EVIL_SUMMON;
- callsub S_GetHeroRect;
- areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1101, 42 + 16 - 480/(30+$Illia_Luvia_Harvest), "Luvia?::OnDSDeath";
- callsub S_ClearHeroRect;
- // That was the last spawn: reset the timer to start the CheckInvoke loop.
- set $@illia_level_5_progress, 5;
- setnpctimer 0;
- end;
-
-// Talk and Witch guard invokes timers
-OnTimer6500:
- if ($@illia_level_5_progress != 6)
- end;
- npctalk strnpcinfo(0), "Okay. You have some skill.";
- end;
-
-OnTimer10000:
- if ($@illia_level_5_progress != 6)
- end;
- npctalk strnpcinfo(0), "But that was only the beginning!";
- end;
-
-OnTimer13000:
- if ($@illia_level_5_progress != 6)
- end;
- npctalk strnpcinfo(0), "I'll leave you in the good hands of your predecessors. Farewell!";
- end;
-
-OnTimer18500:
- if ($@illia_level_5_progress != 6)
- end;
- npctalk strnpcinfo(0), "Demonotis Major!";
- misceffect FX_EVIL_SUMMON;
- misceffect FX_MAGIC_DARK_EXPLOSION;
- callsub S_GetHeroRect;
- areamonster "052-2", $@illia_lobby_x1, $@illia_lobby_y1, $@illia_lobby_x2, $@illia_lobby_y2, "", 1103, 8 + (16 - 480/(30+$Illia_Luvia_Harvest))/3, "Luvia?::OnWGDeath";
- callsub S_ClearHeroRect;
- end;
-
-OnTimer20000:
- if ($@illia_level_5_progress != 6)
- end;
- set $@illia_level_5_progress, 7;
- donpcevent "#LuviaShadow::OnCommandEscape";
- setnpctimer 0;
- end;
-
-// Monsters checks timer loop
-OnTimer2000:
- if ($@illia_progress != 5)
- goto L_Clear;
- if ($@illia_level_5_progress != 5 && $@illia_level_5_progress != 7)
- end;
- setnpctimer 0;
- // Mock players randomly (more or less once every 40 secs) and if still enough mobs running after them
- if ($@illia_level_5_progress == 5 && rand(20) == 0 && (mobcount("052-2", "Luvia?::OnDSDeath") > 20))
- npctalk strnpcinfo(0), "Ahaha! Run... Run!";
- if ($@illia_level_5_progress == 5 && (mobcount("052-2", "Luvia?::OnDSDeath") < 0))
- goto L_AllWavesClear;
- if ($@illia_level_5_progress == 7 && (mobcount("052-2", "Luvia?::OnWGDeath") < 0))
- goto L_AllWavesClear;
- end;
-
-L_Clear:
- stopnpctimer;
- setnpctimer 0;
- killmonster "052-2", "Luvia?::OnDSDeath";
- killmonster "052-2", "Luvia?::OnWGDeath";
- end;
-
-L_AllWavesClear:
- set $@illia_level_5_progress, $@illia_level_5_progress + 1;
- stopnpctimer;
- setnpctimer 0;
- if ($@illia_level_5_progress == 6)
- startnpctimer;
- if ($@illia_level_5_progress == 8)
- goto L_ChaseLuvia;
- end;
-
-L_ChaseLuvia:
- set $@illia_progress, 6;
- callfunc "UpdateIlliaProgress";
- set $@illia_max_time, $@illia_max_time + 360;
- areatimer 0, "052-2", 19, 18, 48, 43, 2000, "#LuviaShadow::OnNN";
- end;
-
-S_GetHeroRect:
- if (!(attachrid($@ILLIA_HERO_ID)))
- goto L_Clear;
- if(!(isin("052-2", 20, 21, 47, 43)))
- goto L_Clear;
-
- set $@illia_lobby_x, getx();
- set $@illia_lobby_y, gety();
-
- set $@illia_lobby_x1, $@illia_lobby_x - 12;
- set $@illia_lobby_y1, $@illia_lobby_y - 8;
- set $@illia_lobby_x2, $@illia_lobby_x + 12;
- set $@illia_lobby_y2, $@illia_lobby_y + 8;
-
- if ($@illia_lobby_x1 < 20)
- set $@illia_lobby_x1, 20;
- if ($@illia_lobby_y1 < 19)
- set $@illia_lobby_y1, 19;
- if ($@illia_lobby_x2 > 47)
- set $@illia_lobby_x2, 47;
- if ($@illia_lobby_y2 > 42)
- set $@illia_lobby_y2, 42;
-
- detachrid;
- return;
-
-S_ClearHeroRect:
- set $@illia_lobby_x1, 20;
- set $@illia_lobby_y1, 19;
- set $@illia_lobby_x2, 47;
- set $@illia_lobby_y2, 42;
- return;
-
-OnDSDeath:
- end;
-
-OnWGDeath:
- end;
-
-}
diff --git a/world/map/npc/052-2/mapflags.txt b/world/map/npc/052-2/mapflags.txt
deleted file mode 100644
index 3fe6852b..00000000
--- a/world/map/npc/052-2/mapflags.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-052-2|mapflag|nosave|007-2,36,23
-052-2|mapflag|resave|007-2,36,23
diff --git a/world/map/npc/052-2/partyroom.txt b/world/map/npc/052-2/partyroom.txt
deleted file mode 100644
index ec6d2a64..00000000
--- a/world/map/npc/052-2/partyroom.txt
+++ /dev/null
@@ -1,286 +0,0 @@
-//-----------------------------------------------------------------------------
-// Illia Forsaken Inn - Party room
-// $@illia_progress = 6
-//
-// Level progress:
-// 0: Initial state
-// 1: Luvia is talking, then spawns after a teleport
-// 2: Luvia spawned, and witch guards may spawn to help
-// 3: Luvia is defeated
-//-----------------------------------------------------------------------------
-
-052-2,88,19,0|script|#TriggerDialog|32767,3,2
-{
- set @step, 7;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if ($@illia_level_7_progress == 0 && strcharinfo(0) == $@ILLIA_HERO$) goto L_SpawnLuvia;
- end;
-
-L_SpawnLuvia:
- set $@illia_level_7_progress, 1;
- donpcevent "Luvia::OnCommandStart";
- end;
-
-L_ShouldNotBeHere:
- heal -Hp, 0;
- end;
-
-}
-
-// A trigger whose only purpose is to place Luvia npcs back in place.
-// (even though the Janitor 7 will have done this job)
-052-2,77,48,0|script|#TriggerPlaceLuvia|32767,1,1
-{
- if (strcharinfo(0) != $@ILLIA_HERO$) end;
- if ($@illia_progress == 7 && $@illia_level_7_progress == 0) goto L_PlaceLuvia;
- end;
-
-L_PlaceLuvia:
- npcwarp 88, 15, "#LuviaDaemon";
- npcwarp 88, 15, "Luvia";
- end;
-
-}
-
-052-2,88,15,0|script|Luvia|371
-{
- set @step, 7;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if ($@illia_level_7_progress == 0 && strcharinfo(0) == $@ILLIA_HERO$) goto L_Start;
- end;
-
-OnCommandStart:
- goto L_Start;
-
-L_Start:
- setnpctimer 0;
- if ($@illia_level_7_progress == 1)
- startnpctimer;
- end;
-
-L_ShouldNotBeHere:
- heal -Hp, 0;
- end;
-
-OnTimer1000:
- npctalk strnpcinfo(0), "Oh well, who thought you would survive so far?";
- end;
-
-OnTimer5000:
- npctalk strnpcinfo(0), "All this way, for nothing, only to die from my hands...";
- end;
-
-OnTimer10000:
- npctalk strnpcinfo(0), "Don't worry, you will continue to live, for my sake.";
- end;
-
-OnTimer15000:
- npctalk strnpcinfo(0), "One piece of advice: get prepared!";
- stopnpctimer;
- setnpctimer 0;
- donpcevent "#LuviaDaemon::OnCommandInvoke";
- end;
-
-}
-
-052-2,88,15,0|script|#LuviaDaemon|32767
-{
-end;
-
-OnCommandInvoke:
- setnpctimer 0;
- if ($@illia_level_7_progress == 1)
- startnpctimer;
- end;
-
-OnTimer2000:
- if ($@illia_level_7_progress != 1) end;
- misceffect FX_DARK_TELEPORT;
- // Kill any mob existing on the map
- // That's to terminate any attempt at players mass-summoning mobs
- // and hide in a corner of the map.
- killmonster "052-2", "All";
- npcwarp 1, 1, "Luvia";
- end;
-
-OnTimer100:
- if ($@illia_progress != 7)
- goto L_Clear;
- if ($@illia_level_7_progress != 3)
- end;
- // Trance mode
- callsub S_SpawnWitchGuard;
- end;
-
-OnTimer2600:
- if ($@illia_level_7_progress != 3)
- end;
- npcwarp 1, 1, "#LuviaDaemon";
- setnpctimer 0;
- end;
-
-OnTimer5000:
- if ($@illia_level_7_progress != 1)
- end;
- // Warp to the place to spawn luvia once the teleport sequence is finished
- if (!(attachrid($@ILLIA_HERO_ID)))
- end;
- set $@illia_luvia_x, getx();
- set $@illia_luvia_y, gety();
- npcwarp $@illia_luvia_x, $@illia_luvia_y, "#LuviaDaemon";
-
- detachrid;
- // This is a fix to force the official mana client to display a npc after a warp.
- // Note: the manaplus client do not need this.
- disablenpc "#LuviaDaemon";
- end;
-
-OnTimer5500:
- if ($@illia_level_7_progress != 1) end;
- // See the note above.
- enablenpc "#LuviaDaemon";
- misceffect FX_EVIL_SUMMON;
- misceffect FX_CHANNELLING_CAST;
- monster "052-2", $@illia_luvia_x, $@illia_luvia_y, "", 1102, 1, "#LuviaDaemon::OnDeath";
- set $@illia_luvia_x, 0;
- set $@illia_luvia_y, 0;
- end;
-
-OnTimer9000:
- if ($@illia_level_7_progress != 1) end;
- set $@illia_luvia_trance_delay, 480; // 8 minutes before turning in trance mode
- set $@illia_witch_guard_threshold, 30 + ($Illia_Luvia_Harvest*3)/5;
- if ($@illia_witch_guard_threshold > 100)
- set $@illia_witch_guard_threshold, 100;
- set $@illia_level_7_progress, 2;
- npcwarp 1, 1, "#LuviaDaemon";
- setnpctimer 0;
- end;
-
-// Extra monster spawn
-OnTimer26000:
- if ($@illia_progress != 7)
- goto L_Clear;
- if ($@illia_level_7_progress != 2)
- end;
- // The more players Luvia "harvested", the stronger she is.
- if (rand(100) >= $@illia_witch_guard_threshold)
- end;
- // Decrease her power over time.
- set $@illia_witch_guard_threshold, $@illia_witch_guard_threshold - 7;
- // Keep always a small probability when it reached the minimum
- if ($@illia_witch_guard_threshold <= 0)
- set $@illia_witch_guard_threshold, 6 + $Illia_Luvia_Harvest/5;
- callsub S_SpawnWitchGuard;
- end;
-
-S_SpawnWitchGuard:
- if (!(attachrid($@ILLIA_HERO_ID)))
- end;
- npcwarp getx(), gety(), "#LuviaDaemon";
- misceffect FX_EVIL_SUMMON;
- misceffect FX_GROUND_SPAWN;
- monster "052-2", getx(), gety(), "", 1103, 1, "#LuviaDaemon::OnWGD";
- detachrid;
- areatimer 0, "052-2", 73, 11, 115, 49, 0, "#LuviaDaemon::OnWGS";
- return;
-
-OnTimer30000:
- if ($@illia_level_7_progress != 2)
- end;
- npcwarp 1, 1, "#LuviaDaemon";
- set $@illia_luvia_trance_delay, $@illia_luvia_trance_delay - 30;
- if ($@illia_luvia_trance_delay <= 0)
- goto L_TriggerTrance;
- setnpctimer 0;
- end;
-
-L_TriggerTrance:
- set $@illia_level_7_progress, 3;
- set $@illia_luvia_trance_delay, 0;
- areatimer 0, "052-2", 73, 11, 115, 49, 0, "#LuviaDaemon::OnTT";
- setnpctimer 0;
- end;
-
-L_Clear:
- stopnpctimer;
- setnpctimer 0;
- end;
-
-OnDeath:
- stopnpctimer;
- setnpctimer 0;
- if ($@illia_progress != 7)
- end;
- set $@illia_level_7_progress, 4;
- killmonster "052-2", "#LuviaDaemon::OnWGD";
- mapannounce "052-2", "Luvia : How? By mere humans! But we will see again! Enjoy your victory while it lasts, " + $@ILLIA_HERO$ + "!!", 0;
-
- set $@illia_bp, $Illia_Luvia_Harvest * 16 / 10 + 120;
- areatimer 0, "052-2", 73, 11, 115, 49, 0, "#LuviaDaemon::OnBP";
-
- areatimer 0, "052-2", 73, 11, 115, 49, 2000, "#LuviaDaemon::OnW00t";
-
- set $@illia_progress, 8;
- callfunc "UpdateIlliaProgress";
- // Set the number of common rewards rewards
- if ($Illia_Luvia_Harvest < 15)
- set $@illia_num_common_reward_items, 0;
- if ($Illia_Luvia_Harvest >= 15 && $Illia_Luvia_Harvest < 35)
- set $@illia_num_common_reward_items, 1;
- if ($Illia_Luvia_Harvest >= 35)
- set $@illia_num_common_reward_items, 2;
-
- // Set the number of unique rewards
- if ($Illia_Luvia_Harvest < 40)
- set $@illia_num_unique_reward_items, 1;
- if ($Illia_Luvia_Harvest >= 40)
- set $@illia_num_unique_reward_items, 2;
- set $Illia_Luvia_Harvest, 0;
-
- // Extend the time limit of +7 mins to leave enough time to pick
- // the rewards even if close to the time limit
- set $@illia_max_time, $@illia_max_time + 300;
-
- // Record how many times the quest was finished
- set $Illia_Win_Counter, $Illia_Win_Counter + 1;
-
- end;
-
-OnBP:
- set BOSS_POINTS, BOSS_POINTS + $@illia_bp;
- message strcharinfo(0), "You gain " + $@illia_bp + " Boss Points giving you a total of " + BOSS_POINTS + ".";
- end;
-
-OnWGD:
- end;
-
-OnWGS:
- if ($@illia_level_7_progress == 2)
- message strcharinfo(0), "One of Luvia's guard spawned from the depths to assist her!";
- end;
-
-OnTT:
- if ($@illia_level_7_progress == 3)
- message strcharinfo(0), "Luvia seems to become in trance!";
- end;
-
-OnW00t:
- message strcharinfo(0), "You defeated this evil sorceress... But what about her sister now?";
- end;
-
-}
-
-// Warp from the party room, to the chest room
-052-2,88,12,0|script|#ToLuviaRoomDoor|32767,1,2
-{
- set @step, 7;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if ($@illia_level_7_progress < 4) end;
- warp "052-2", 133, 84;
- end;
-
-L_ShouldNotBeHere:
- heal -Hp, 0;
- end;
-}
diff --git a/world/map/npc/052-2/storage.txt b/world/map/npc/052-2/storage.txt
deleted file mode 100644
index a8582408..00000000
--- a/world/map/npc/052-2/storage.txt
+++ /dev/null
@@ -1,191 +0,0 @@
-//-----------------------------------------------------------------------------
-// Illia Forsaken Inn - Storage
-// $@illia_progress = 6
-//
-// Level progress:
-// 0: Initial state
-// 1: Items and/or mobs are spawned
-// 2: All spawns are done and the players killed all mobs
-//-----------------------------------------------------------------------------
-
-052-2,23,69,0|script|#TriggerItemsInvoker|32767,1,0
-{
- set @step, 6;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if (strcharinfo(0) != $@ILLIA_HERO$) end;
- if ($@illia_level_6_progress == 0) goto L_StartItemInvoker;
- end;
-
-L_ShouldNotBeHere:
- heal -Hp, 0;
- end;
-
-L_StartItemInvoker:
- set $@illia_level_6_progress, 1;
- donpcevent "#ItemsInvoker::OnCommandStart";
- end;
-
-}
-
-052-2,1,1,0|script|#ItemsInvoker|32767
-{
-end;
-
-OnInit:
- setarray $@illia_storage_items, 541, 567, 568, 562;
- setarray $@illia_storage_special_items, 687, 827, 1229;
- // Map coords:* x1,y1, x2,y2, ...
- setarray $@illia_storage_item_points, 20,67, 22,75, 27,71, 30,73, 34,76, 30,64, 34,65, 34,62, 21,61, 22,64;
- end;
-
-OnCommandStart:
- set $@illia_storage_max_items, 20;
- set $@illia_storage_deviation, (8 + ($Illia_Luvia_Harvest*70)/100)*3;
- initnpctimer;
- areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnStart";
- end;
-
-OnStart:
- message strcharinfo(0), "You feel a strange atmosphere in this room... You sense a strong magic rising from the depth!";
- end;
-
-OnTimer1000:
- if ($@illia_storage_max_items == 0)
- goto L_CheckMobs;
- set $@item_invoke_index, rand(getarraysize($@illia_storage_item_points)/2);
- set $@item_invoke_x, $@illia_storage_item_points[$@item_invoke_index*2];
- set $@item_invoke_y, $@illia_storage_item_points[($@item_invoke_index*2)+1];
- npcwarp $@item_invoke_x, $@item_invoke_y, "#ItemsInvoker";
- // This is a fix to force the official mana client to display a npc after a warp.
- // Note: the manaplus client do not need this.
- disablenpc "#ItemsInvoker";
- end;
-
-OnTimer1500:
- // See the note above.
- enablenpc "#ItemsInvoker";
- areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnItem";
- misceffect FX_GROUND_SPAWN;
- end;
-
-OnTimer3750:
- setnpctimer 0;
- set $@item_invoke_x, 0;
- set $@item_invoke_y, 0;
- set $@item_invoke_index, 0;
- end;
-
-OnItem:
- if (strcharinfo(0) == $@ILLIA_HERO$)
- goto L_ItemSpawn;
- end;
-
-L_ItemSpawn:
- // This section will decide what to spawn: special monster, monster, item, special item
- // Calculation uses a decreasing variable which introduces a deviation.
- // Its initial value is based on $@Illia_Luvia_Harvest
- // * first decide (50% / 50%) if the deviation will be positive or negative
- // * Apply the deviation to a random number between 0, 100. (note the final value can be < 0 or > 100)
- // The purpose is that, when the initial deviation is high, there are high chances to get either
- // a special monster, or a special item.
- set @m, rand(100);
- if (@m < 50)
- set @r, rand(100) - $@illia_storage_deviation;
- if (@m >= 50)
- set @r, rand(100) + $@illia_storage_deviation;
- // Reduce the deviation
- set $@illia_storage_deviation, $@illia_storage_deviation*83/100;
- if (@r < 5)
- goto L_MakeSpecialMonster;
- if (@r < 50)
- goto L_MakeMonster;
- if (@r > 98)
- goto L_MakeSpecialItem;
- // Normal item
- makeitem $@illia_storage_items[rand(getarraysize($@illia_storage_items))], rand(2, 8), "052-2", $@item_invoke_x, $@item_invoke_y;
- set $@illia_storage_max_items, $@illia_storage_max_items - 1;
- set @r, 0;
- end;
-
-L_MakeSpecialMonster:
- monster "052-2", $@item_invoke_x, $@item_invoke_y, "", 1103, 1, "#ItemsInvoker::OnDeath";
- areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnWtf";
- set $@illia_storage_max_items, $@illia_storage_max_items - 1;
- end;
-
-L_MakeMonster:
- monster "052-2", $@item_invoke_x, $@item_invoke_y, "", 1101, rand(1, 3), "#ItemsInvoker::OnDeath";
- set $@illia_storage_max_items, $@illia_storage_max_items - 1;
- set @r, 0;
- end;
-
-L_MakeSpecialItem:
- makeitem $@illia_storage_special_items[rand(getarraysize($@illia_storage_special_items))], rand(2, 4), "052-2", $@item_invoke_x, $@item_invoke_y;
- areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnWow";
- set $@illia_storage_max_items, $@illia_storage_max_items - 1;
- set @r, 0;
- end;
-
-L_CheckMobs:
- if ($@illia_progress != 6)
- goto L_Clear;
- if (mobcount("052-2", "#ItemsInvoker::OnDeath") < 0)
- goto L_Stop;
- setnpctimer 0;
- end;
-
-L_Clear:
- stopnpctimer;
- setnpctimer 0;
- set $@illia_storage_deviation, 0;
- set $@illia_storage_max_items, 0;
- killmonster "052-2", "#ItemsInvoker::OnDeath";
- end;
-
-L_Stop:
- stopnpctimer;
- setnpctimer 0;
- npcwarp 1, 1, "#ItemsInvoker";
- set $@illia_storage_deviation, 0;
- set $@illia_storage_max_items, 0;
- set $@illia_level_6_progress, 2;
- set $@illia_progress, 7;
- callfunc "UpdateIlliaProgress";
- set $@illia_max_time, $@illia_max_time + 900;
- areatimer 0, "052-2", 19, 60, 35, 78, 10, "#ItemsInvoker::OnStop";
- end;
-
-OnDeath:
- end;
-
-OnStop:
- message strcharinfo(0), "The magic seems to quickly dissipate.";
- end;
-
-OnWtf:
- message strcharinfo(0), "Look out!";
- end;
-
-OnWow:
- message strcharinfo(0), "Wow, see what appeared!";
- end;
-
-}
-
-052-2,35,68,0|script|#ToPartyRoom|32767,1,1
-{
- set @step, 6;
- if ($@illia_progress < @step) goto L_ShouldNotBeHere;
- if ($@illia_level_6_progress == 2) goto L_Warp;
- message strcharinfo(0), "The strong magic inside this room prevents you from going further.";
- end;
-
-L_Warp:
- warp "052-2", 73, 48;
- end;
-
-L_ShouldNotBeHere:
- heal -Hp, 0;
- end;
-
-}