summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/player.conf17
-rw-r--r--db/GeoIP.datbin1358092 -> 587854 bytes
-rw-r--r--db/cashshop_db.conf4
-rw-r--r--db/quest_db.txt5
-rw-r--r--db/re/mob_db.txt29
-rw-r--r--doc/script_commands.txt22
-rw-r--r--npc/instances/EndlessTower.txt5108
-rw-r--r--npc/instances/NydhoggsNest.txt1561
-rw-r--r--npc/instances/OrcsMemory.txt1004
-rw-r--r--npc/instances/SealedShrine.txt939
-rw-r--r--npc/other/gm_npcs.txt150
-rw-r--r--npc/re/instances/BakonawaLake.txt543
-rw-r--r--npc/re/instances/BangungotHospital.txt1101
-rw-r--r--npc/re/instances/BuwayaCave.txt459
-rw-r--r--npc/re/instances/HazyForest.txt320
-rw-r--r--npc/re/instances/MalangdoCulvert.txt355
-rw-r--r--npc/re/instances/OctopusCave.txt515
-rw-r--r--npc/re/instances/OldGlastHeim.txt2059
-rw-r--r--npc/re/scripts.conf4
-rw-r--r--npc/scripts.conf2
-rw-r--r--sql-files/item_db.sql25
-rw-r--r--sql-files/item_db_re.sql44
-rw-r--r--src/char/char.c8
-rw-r--r--src/common/HPM.c3
-rw-r--r--src/common/mmo.h2
-rw-r--r--src/map/HPMmap.c51
-rw-r--r--src/map/HPMmap.h6
-rw-r--r--src/map/atcommand.c432
-rw-r--r--src/map/atcommand.h1
-rw-r--r--src/map/battle.c30
-rw-r--r--src/map/battle.h16
-rw-r--r--src/map/clif.c136
-rw-r--r--src/map/guild.c2
-rw-r--r--src/map/instance.c78
-rw-r--r--src/map/instance.h8
-rw-r--r--src/map/itemdb.c3
-rw-r--r--src/map/map.c48
-rw-r--r--src/map/map.h11
-rw-r--r--src/map/npc.c8
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c71
-rw-r--r--src/map/skill.c205
-rw-r--r--src/map/skill.h19
-rw-r--r--src/map/status.c4565
-rw-r--r--src/map/unit.c2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc7
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc205
49 files changed, 10577 insertions, 9644 deletions
diff --git a/conf/battle/player.conf b/conf/battle/player.conf
index 436399469..03d51bbaf 100644
--- a/conf/battle/player.conf
+++ b/conf/battle/player.conf
@@ -5,6 +5,7 @@
//--------------------------------------------------------------
// Note 1: Value is a config switch (on/off, yes/no or 1/0)
// Note 2: Value is in percents (100 means 100%)
+// Note 3: Value is a bit field.
//--------------------------------------------------------------
// Players' maximum HP rate? (Default is 100)
@@ -148,3 +149,19 @@ min_npc_vendchat_distance: 3
// Changing snovice_call_type config to 1 enables its use at 0%, for maxed super novices.
// default: 0
snovice_call_type: 0
+
+// How the server should measure the character's idle time? (Note 3)
+// 0x001 - Walk Request
+// 0x002 - UseSkillToID Request ( targetted skill use attempt )
+// 0x004 - UseSkillToPos Request ( aoe skill use attempt )
+// 0x008 - UseItem Request ( including equip/unequip )
+// 0x010 - Attack Request
+// 0x020 - Chat Request ( whisper, party, guild, bg, etca )
+// 0x040 - Sit/Standup Request
+// 0x080 - Emotion Request
+// 0x100 - DropItem Request
+// 0x200 - @/#Command Request
+// Please note that at least 1 option has to be enabled.
+// Be mindful that the more options used, the easier it becomes to cheat features that rely on idletime (e.g. checkidle()).
+// Default: walk ( 0x1 ) + useskilltoid ( 0x2 ) + useskilltopos ( 0x4 ) + useitem ( 0x8 ) + attack ( 0x10 ) = 0x25
+idletime_criteria: 0x1F
diff --git a/db/GeoIP.dat b/db/GeoIP.dat
index 9d014999f..55ccd4d4e 100644
--- a/db/GeoIP.dat
+++ b/db/GeoIP.dat
Binary files differ
diff --git a/db/cashshop_db.conf b/db/cashshop_db.conf
index 8273b133e..7f1d4f5d6 100644
--- a/db/cashshop_db.conf
+++ b/db/cashshop_db.conf
@@ -14,6 +14,10 @@
// add in any amount of items you like within each category.
// Please keep in mind that the Cashshop does not work
// with ragexere clients.
+// Categories can be empty or even missing, but, if
+// present, their names must be kept as cat_<n>, where
+// <n> is a valid tab index, as descripbed in 'enum
+// CASH_SHOP_TABS' in clif.c (normally 0 through 7)
//====================================================
cash_shop: (
diff --git a/db/quest_db.txt b/db/quest_db.txt
index c6c306070..32cc64f2f 100644
--- a/db/quest_db.txt
+++ b/db/quest_db.txt
@@ -2288,6 +2288,11 @@
12300,0,0,0,0,0,0,0,"Revisiting Etran"
12301,0,0,0,0,0,0,0,"Two remaining friends"
+// Old Glast Heim
+12317,82800,0,0,0,0,0,0,"Fake Keyblade"
+12318,0,2475,1,0,0,0,0,"Upper Cats: annoying guy"
+12319,0,2476,1,0,0,0,0,"Upper Cats: annoying guy"
+
13000,0,0,0,0,0,0,0,"RWC2011Card Gathering"
13001,82800,0,0,0,0,0,0,"RWC2011Card Gathering - Hold"
diff --git a/db/re/mob_db.txt b/db/re/mob_db.txt
index bfbd55d8a..86c854b26 100644
--- a/db/re/mob_db.txt
+++ b/db/re/mob_db.txt
@@ -1613,19 +1613,22 @@
//2461,TREASURE_BOX_TE_9
//2462,TREASURE_BOX_TE_10
//2463,E_BOMBPORING
-//2464,MG_ZOMBIE
-//2465,MG_WRAITH
-//2466,MG_GHOUL
-//2467,MG_ARCLOUSE
-//2468,MG_RAYDRIC
-//2469,MG_RAYDRIC_ARCHER
-//2470,MG_KNIGHT_OF_ABYSS
-//2471,MG_KHALITZBURG
-//2472,MG_BLOODY_KNIGHT
-//2473,MG_M_UNDEAD_KNIGHT
-//2474,MG_F_UNDEAD_KNIGHT
-//2475,MG_CORRUPTION_ROOT
-//2476,MG_AMDARAIS
+
+// Old Glast Heim (currently placeholders)
+2464,MG_ZOMBIE,Zombie,Zombie,17,9340,1,117,87,1,38,50,20,3,15,8,17,0,15,0,10,12,1,1,29,0x3885,400,2612,912,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2465,MG_WRAITH,Wraith,Wraith,77,23168,1,1190,1191,1,335,396,80,40,62,26,30,55,76,5,10,12,2,1,89,0x3695,300,1816,576,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2466,MG_GHOUL,Ghoul,Ghoul,61,12614,1,583,656,1,216,245,78,5,56,12,19,11,27,10,10,12,1,1,49,0x3885,250,2456,912,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2467,MG_ARCLOUSE,Arclouse,Arclouze,107,14020,1,1844,2607,1,269,309,101,36,60,73,45,35,140,15,10,12,1,4,42,0x3195,100,960,500,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2468,MG_RAYDRIC,Raydric,Raydric,115,25408,1,20770,2076,1,572,668,89,15,129,87,55,32,76,27,10,12,2,7,47,0x3095,150,824,780,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2469,MG_RAYDRIC_ARCHER,Raydric Archer,Raydric Archer,82,30370,1,1049,1332,9,377,395,63,40,53,24,40,15,112,30,10,12,1,6,47,0x2185,200,1152,1152,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2470,MG_KNIGHT_OF_ABYSS,Knight of Abyss,Abysmal Knight,122,332970,1,4779,4013,1,810,1002,102,50,121,55,68,70,97,37,10,12,2,7,87,0x3695,300,1500,500,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2471,MG_KHALITZBURG,Khalitzburg,Khalitzburg,118,109860,1,2862,2147,1,737,833,125,10,121,48,40,31,89,32,10,12,2,1,29,0x3695,350,528,1000,396,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2472,MG_BLOODY_KNIGHT,Bloody Knight,Bloody Knight,116,285000,1,7348,6511,3,942,1065,122,50,132,59,70,57,98,45,10,12,2,0,87,0x3695,250,828,528,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2473,MG_M_UNDEAD_KNIGHT,Undead Knight,Undead Knight,133,500000,0,4500,3375,2,751,880,122,62,122,87,54,65,103,65,14,16,2,7,80,0x37B5,170,140,384,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2474,MG_F_UNDEAD_KNIGHT,Undead Knight,Undead Knight,133,500000,0,4500,3375,2,751,880,122,62,122,87,54,65,103,65,14,16,2,7,80,0x37B5,170,140,384,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2475,MG_CORRUPTION_ROOT,Root of Corruption,Root of Corruption,136,3190000,1,240120,187920,3,710,1762,213,123,86,89,120,131,101,92,14,12,2,7,62,0x1A4,170,854,2016,480,120060,607,5500,608,3500,732,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2476,MG_AMDARAIS,Amdarias,Amdarias,143,3283990,1,74288,77950,2,8860,10022,32,66,140,159,30,109,300,90,10,12,2,2,63,0x37B5,200,1152,1152,576,37144,617,5500,617,5000,616,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+
//2477,NG_WANDER_MAN
//2478,NG_RIDEWORD
//2479,NG_MIMIC
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 661e84bee..9969ff1a8 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7426,7 +7426,7 @@ in the count parameter.
Example:
replacestr("testing tester", "test", "dash"); //returns "dashing dasher"
replacestr("Donkey", "don", "mon", 0); //returns "monkey"
- replacestr("test test test test test", "yay", 0, 3); //returns "yay yay yay test test"
+ replacestr("test test test test test", "test", "yay", 0, 3); //returns "yay yay yay test test"
---------------------------------------
@@ -7860,6 +7860,26 @@ if (instance_check_party(getcharid(1),2,2,149)) {
}
---------------------------------------
+*instance_set_respawn(<map_name>,<x>,<y>{,<instance_id>});
+
+Updates the 'reload spawn' position of a instance,
+that is where players in the instance are sent to upon @reloadscript,
+uses the npc instance (if any) when instance_id is not provided,
+handy to update a instance's progress so that when/if @reloadscript happens
+the damage to the players progress is reduced.
+It is most effective when used with instance variables (which are @reloadscript persistent)
+
+If a player warps into a instance before this command has been used,
+it will use the player's warp destination as the initial respawn point,
+it can of course be modified by using this script command at any point.
+
+---------------------------------------
+*instance_mapname("<map name>"{,<instance id>})
+
+Returns the unique name of the instanced map. If no instance ID is specified,
+the instance the script is attached to is used. If the script is not attached to
+an instance, the instance of the currently attached player's party is used. If
+that fails, the command returns an empty string instead.
=========================
|8.- Quest Log commands.|
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 68cf25000..3f6109f3a 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -1,14 +1,14 @@
//===== Hercules Script ======================================
//= Endless Tower
-//===== By: ==================================================
+//===== By: ==================================================
//= L0ne_W0lf
-//===== Current Version: =====================================
-//= 2.1
-//===== Description: =========================================
+//===== Current Version: =====================================
+//= 2.4
+//===== Description: =========================================
//= [Official Conversion]
-//= Endless Tower Memorial Dungeon
+//= Endless Tower Memorial Dungeon.
//= Consists of 101 floors.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version.
//= 1.1 Removed a disablenpc from #102FShadowDust1. (bugreport:4415)
//= 1.2 Added ends to several NPCs which would allow you to restart timers.
@@ -28,11 +28,21 @@
//= 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.
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//= 2.0 Fixed broken else/if chaining. [Joseph]
//= 2.1 Updated to match latest official script. [Euphy]
+//= 2.2 Instance system rewrite. [Euphy]
+//= 2.3 Added some missing announcements. [Euphy]
+//= 2.4 Added GM management function. [Euphy]
+//============================================================
+
+1@tower mapflag src4instance
+2@tower mapflag src4instance
+3@tower mapflag src4instance
+4@tower mapflag src4instance
+5@tower mapflag src4instance
+6@tower mapflag src4instance
//============================================================
-
alberta,214,77,6 script Captain Janssen 709,{
if (checkweight(1201,1) == 0) {
mes "^008800Wait here!!";
@@ -67,8 +77,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "^0000ffAt least half of his story sounded grossly exaggerated, but something caught your ear: he insists that a humongous tower exists on the ocean, and that it's so tall, it scrapes across the sky.^000000";
set in_102tower,2;
close;
- }
- else if (in_102tower == 2) {
+ } else if (in_102tower == 2) {
mes "[Captain Janssen]";
mes "So all I could do was cast anchor at that humongous tower after my fleet was wrecked. At first, we were only going to stay there until the rainstorm was over, but it didn't end as soon as we had hoped.";
next;
@@ -112,8 +121,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "Welcome aboard, first mate.";
set in_102tower,3;
close;
- }
- else if (in_102tower == 3) {
+ } else if (in_102tower == 3) {
mes "[Captain Janssen]";
mes "Shall we leave now?";
next;
@@ -130,8 +138,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "Sure, no problem. Come back when you're ready.";
close;
}
- }
- else if (in_102tower > 3) {
+ } else if (in_102tower > 3) {
mes "[Captain Janssen]";
mes "Well, to travel the ocean again, we need to restock on goods. If you give me 10,000 Zeny, I'll take care of the rest.";
next;
@@ -144,7 +151,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "Sure, no problem. I'll be waiting for your return.";
close;
case 2:
- if (zeny < 10000) {
+ if (Zeny < 10000) {
mes "[Captain Janssen]";
mes "I'm sorry, but you don't have enough money. I need at least 10,000 Zeny to restock our supplies...";
close;
@@ -152,14 +159,13 @@ alberta,214,77,6 script Captain Janssen 709,{
else {
mes "[Captain Janssen]";
mes "Excellent! Now we're good to go. Let's pull up the anchor again!";
- set zeny,zeny-10000;
+ set Zeny, Zeny-10000;
close2;
warp "e_tower",70,114;
end;
}
}
- }
- else {
+ } else {
mes "[Captain Janssen]";
mes "Excuse me, are you an adventurer?";
next;
@@ -181,12 +187,11 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "[Captain Janssen]";
mes "Huh? Are you sure that you don't mind giving me that much money? Wow, thank you so much!";
next;
- if (zeny < 10000) {
+ if (Zeny < 10000) {
mes "[Captain Janssen]";
mes "...I'm sorry, but I don't think you have 10,000 Zeny. Thank you for your kindness, but I need more than that.";
close;
- }
- else {
+ } else {
mes "["+.@name$+"]";
mes "I don't know why you'd need so much money, but here. You can take it.";
next;
@@ -194,7 +199,7 @@ alberta,214,77,6 script Captain Janssen 709,{
next;
mes "[Captain Janssen]";
mes "Thank you so much! Now I can stock up on food and materials for my ship. You're kind, very kind!";
- set zeny,zeny-10000;
+ set Zeny, Zeny-10000;
set in_102tower,1;
close;
}
@@ -205,164 +210,69 @@ alberta,214,77,6 script Captain Janssen 709,{
e_tower,81,105,0 script Tower Protection Stone 406,{
set .@party_id,getcharid(1);
- set .@ins_mas,getpartyleader(.@party_id,2);
set .@p_name$,getpartyname(.@party_id);
- set .@p_reader$,strcharinfo(0);
set .@md_name$,"Endless Tower";
- set .@p_name2$,strcharinfo(0);
set .@etower_timer,checkquest(60200,PLAYTIME); // 1 week
set .@etower_timer2,checkquest(60201,PLAYTIME); // 4 hours
- set .@dun_lim_time,etower_timer+604800; // 1 week
- set .@dun_lim_time2,etower_timer+14400; // 4 hours
- set .@dun_cur_time,gettimetick(2);
- set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
- set .@dun_h,(.@dun_ent_t / 3600);
- set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
- set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
-
- if(!instance_check_party(.@party_id,2)){
- mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
+ if (!instance_check_party(.@party_id,2)) {
+ mes "Make or join a party with more than 1 member and try again.";
close;
}
-
if (.@etower_timer == -1) {
- if (.@ins_mas == getcharid(0)) {
+ if (getcharid(0) == getpartyleader(.@party_id,2)) {
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")) {
+ switch(select("Generate dungeon "+.@md_name$+":Enter the dungeon:Return to Alberta:Cancel")) {
case 1:
- set .@instance, instance_create(.@md_name$, .@party_id);
+ set .@instance, instance_create(.@md_name$,.@party_id);
if (.@instance < 0) {
- mes "Party Name:"+.@p_name$+"";
- mes "Party Leader:"+.@p_reader$+"";
+ mes "Party Name: "+.@p_name$;
+ mes "Party Leader: "+strcharinfo(0);
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;
- }
+ close;
+ }
+ 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.";
+ 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("Life Spring#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;
+ instance_set_timeout 14400,300,.@instance;
+ instance_init(.@instance);
+ close;
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((party_instance_id != 0) && (party_instance_id != getcharid(1))) {
- 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 {
- mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
- set party_instance_id,getcharid(1);
- set etower_timer,gettimetick(2);
- setquest 60200;
- setquest 60201;
- warp "1@tower",52,354;
- end;
- }
- break;
+ callsub L_Enter,0,1;
case 3:
mes "I will move you to Alberta.";
close2;
warp "alberta",223,36;
end;
case 4:
- break;
- }
- 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((party_instance_id != 0) && (party_instance_id != getcharid(1))) {
- 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 {
- mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
- set party_instance_id,getcharid(1);
- 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;
- end;
- case 3:
- break;
+ close;
}
- close;
+ }
+ switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
+ case 1:
+ callsub L_Enter,1,1;
+ case 2:
+ mes "I will move you to Alberta.";
+ close2;
+ warp "alberta",223,36;
+ end;
+ case 3:
+ end;
}
} 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")) {
+ switch(select("Enter the "+.@md_name$+":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((party_instance_id != 0) && (party_instance_id != getcharid(1))) {
- 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 {
- mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
- set party_instance_id,getcharid(1);
- warp "1@tower",52,354;
- end;
- }
- break;
+ callsub L_Enter,0,0;
case 2:
mes "I will move you to Alberta.";
close2;
@@ -373,6 +283,15 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
}
close;
} else if ((.@etower_timer >= 0) && (.@etower_timer < 2) && (.@etower_timer2 == 2)) {
+
+ set .@dun_lim_time,etower_timer+604800; // 1 week
+ set .@dun_lim_time2,etower_timer+14400; // 4 hours
+ set .@dun_cur_time,gettimetick(2);
+ set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
+ set .@dun_h,(.@dun_ent_t / 3600);
+ set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
+ set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
+
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.";
@@ -383,27 +302,45 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
set etower_timer,0;
erasequest 60200;
erasequest 60201;
- set party_instance_id,0;
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;
+
+L_Enter:
+ if (has_instance("1@tower") == "") {
+ mes "The memorial dungeon " + .@md_name$ + " does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ close;
+ } else {
+ mapannounce "e_tower", strcharinfo(0)+" of the party, "+.@p_name$+", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
+ if (getarg(1)) {
+ set etower_timer,gettimetick(2);
+ setquest 60200;
+ setquest 60201;
+ }
+ warp "1@tower",52,354;
+ if (getarg(0) == 0)
+ close;
+ else
+ end;
+ }
}
e_tower,30,30,2 script Huge Vortex 844,2,2,{
+ end;
OnTouch:
mapannounce "e_tower","[ " + strcharinfo(0) + " ], seems to be engulfed by a huge vortex",bc_map,"0x00ff99",FW_NORMAL,12;
warp "alberta",223,36;
end;
}
-/*
-e_tower,1,1,2 script #102Administrator Mode104 844,{
+// Original name: "#102Administrator Mode104"
+e_tower,1,1,2 script #102Administrator Mode 844,{
+ callfunc "F_GM_NPC";
mes "Please enter the password";
- input .@inputstr$;
+ set .@i, callfunc("F_GM_NPC","dmc2008",1);
next;
- if (.@inputstr$ == "dmc2008") {
+ if (.@i == 1) {
switch(select("Generate Purification Stone:Remove Purification Stone:Cancel")) {
case 1:
mes "Create the Purification Stone that stays for 30 minutes.";
@@ -418,8 +355,7 @@ e_tower,1,1,2 script #102Administrator Mode104 844,{
break;
}
close;
- }
- else {
+ } else {
mes "Enter the password exactly.";
close;
}
@@ -457,1000 +393,999 @@ OnTimer1800000:
}
e_tower,151,185,4 script Purification Stone#et2 844,{
+ callfunc "F_GM_NPC";
set etower_timer,0;
mes "^0000ffThe records and aftereffects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
- close;
+ close2;
warp "e_tower",75,108;
end;
}
-*/
-// Levels 1-25
+// Core Functions
//============================================================
-1@tower,50,360,0 script Immortal Brazier# 844,{
- mes "- A Message is Engraved on the Brazier -";
- mes "The one who scatters the ashes of the darkness in this place shall become one step closer to Nacht Sieger, the Hegemon King of the Darkness...";
- next;
- set .@move_name$,strcharinfo(0);
- switch(select("26th Level:51st Level:76th Level")) {
+function script F_Tower_Monster {
+
+ set .@level, getarg(0);
+ set .@map$, getarg(1);
+ set .@label$, getarg(2);
+
+ switch(.@level) {
case 1:
- if (countitem(6000) < 1) {
- mes "-Warning-";
- mes "To warp to the 26th Level, you need 1 Ashes of the Darkness.";
- close;
- }
- else {
- delitem 6000,1; //Dark_Ashes
- instance_announce -1, .@move_name$ + ". You will be warped to the 26th Level.",bc_map,"0x00ff99";
- warp "2@tower",52,354;
- }
+ areamonster .@map$,7,351,17,387,"Metaling",1613,15,.@label$;
+ areamonster .@map$,7,351,17,387,"Marin",1242,5,.@label$;
+ areamonster .@map$,7,351,17,387,"Poporing",1031,5,.@label$;
+ areamonster .@map$,7,351,17,387,"Drops",1113,5,.@label$;
+ areamonster .@map$,7,351,17,387,"Mastering",1090,1,.@label$;
+ areamonster .@map$,7,351,17,387,"Poring",1002,5,.@label$;
break;
case 2:
- if (countitem(6000) < 2) {
- mes "-Warning-";
- mes "To warp to the 51st Level, you need 2 Ashes of the Darkness.";
- close;
- }
- else {
- delitem 6000,2; //Dark_Ashes
- instance_announce -1, .@move_name$ + ". You will be warped to the 51st Level.",bc_map,"0x00ff99";
- warp "3@tower",52,354;
- }
+ areamonster .@map$,93,351,103,387,"Desert Wolf",1106,20,.@label$;
+ areamonster .@map$,93,351,103,387,"Vagabond Wolf",1092,1,.@label$;
+ areamonster .@map$,93,351,103,387,"Baby Desert Wolf",1107,10,.@label$;
break;
case 3:
- if (countitem(6000) < 3) {
- mes "-Warning-";
- mes "To warp to the 76th Level, you need 3 Ashes of the Darkness.";
- close;
- }
- else {
- delitem 6000,3; //Dark_Ashes
- instance_announce -1, .@move_name$ + ". You will be warped to the 76th Level.",bc_map,"0x00ff99";
- warp "4@tower",52,354;
+ areamonster .@map$,181,351,191,387,"Archer Skeleton",1016,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Skel Worker",1169,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Soldier Skeleton",1028,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Orc Skeleton",1152,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Pirate Skeleton",1071,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Skeleton",1076,5,.@label$;
+ break;
+ case 4:
+ areamonster .@map$,267,351,277,387,"Argiope",1099,15,.@label$;
+ areamonster .@map$,267,351,277,387,"Mantis",1139,5,.@label$;
+ areamonster .@map$,267,351,277,387,"Argos",1100,5,.@label$;
+ areamonster .@map$,267,351,277,387,"Vocal",1088,1,.@label$;
+ areamonster .@map$,267,351,277,387,"Rocker",1052,5,.@label$;
+ areamonster .@map$,267,351,277,387,"Hornet",1004,5,.@label$;
+ break;
+ case 5:
+ areamonster .@map$,352,351,362,387,"Golden Thief Bug",1086,1,.@label$;
+ areamonster .@map$,352,351,362,387,"Thief Bug Male",1054,15,.@label$;
+ areamonster .@map$,352,351,362,387,"Thief Bug Female",1053,15,.@label$;
+ areamonster .@map$,352,351,362,387,"Thief Bug",1051,15,.@label$;
+ areamonster .@map$,352,351,362,387,"Thief Bug Egg",1048,5,.@label$;
+ break;
+ case 6:
+ areamonster .@map$,9,267,19,303,"Dragon Egg",1721,5,.@label$;
+ areamonster .@map$,9,267,19,303,"Thief Bug Egg",1048,5,.@label$;
+ areamonster .@map$,9,267,19,303,"Ant Egg",1097,5,.@label$;
+ areamonster .@map$,9,267,19,303,"Pupa",1008,5,.@label$;
+ break;
+ case 7:
+ areamonster .@map$,93,267,103,303,"Explosion",1383,15,.@label$;
+ areamonster .@map$,93,267,103,303,"Drainliar",1111,15,.@label$;
+ areamonster .@map$,93,267,103,303,"Anopheles",1627,15,.@label$;
+ areamonster .@map$,93,267,103,303,"Farmiliar",1005,15,.@label$;
+ break;
+ case 8:
+ areamonster .@map$,181,267,191,303,"Firelock Soldier",1403,15,.@label$;
+ areamonster .@map$,181,267,191,303,"Cruiser",1248,15,.@label$;
+ break;
+ case 9:
+ areamonster .@map$,267,267,277,303,"Obsidian",1615,15,.@label$;
+ areamonster .@map$,267,267,277,303,"Golem",1040,15,.@label$;
+ areamonster .@map$,267,267,277,303,"Stapo",1784,10,.@label$;
+ break;
+ case 10:
+ areamonster .@map$,352,267,362,303,"Mistress",1059,1,.@label$;
+ areamonster .@map$,352,267,362,303,"Giant Hornet",1303,25,.@label$;
+ areamonster .@map$,352,267,362,303,"Hornet",1004,20,.@label$;
+ break;
+ case 11:
+ areamonster .@map$,9,180,19,216,"Dryad",1493,15,.@label$;
+ areamonster .@map$,9,180,19,216,"Parasite",1500,15,.@label$;
+ areamonster .@map$,9,180,19,216,"Hermit Plant",1413,15,.@label$;
+ areamonster .@map$,9,180,19,216,"Rafflesia",1162,5,.@label$;
+ break;
+ case 12:
+ areamonster .@map$,93,180,103,216,"Demon Pungus",1378,25,.@label$;
+ areamonster .@map$,93,180,103,216,"Punk",1199,25,.@label$;
+ break;
+ case 13:
+ areamonster .@map$,181,180,191,216,"Yao Yun",1512,15,.@label$;
+ areamonster .@map$,181,180,191,216,"Bongunn",1188,15,.@label$;
+ areamonster .@map$,181,180,191,216,"Munak",1026,10,.@label$;
+ break;
+ case 14:
+ areamonster .@map$,267,180,277,216,"High Orc",1213,15,.@label$;
+ areamonster .@map$,267,180,277,216,"Orc Archer",1189,10,.@label$;
+ areamonster .@map$,267,180,277,216,"Orc Lady",1273,10,.@label$;
+ areamonster .@map$,267,180,277,216,"Orc Warrior",1023,5,.@label$;
+ areamonster .@map$,267,180,277,216,"Orc Baby",1686,5,.@label$;
+ break;
+ case 15:
+ areamonster .@map$,352,180,362,216,"Maya",1147,1,.@label$;
+ areamonster .@map$,352,180,362,216,"Phreeoni",1159,1,.@label$;
+ areamonster .@map$,352,180,362,216,"Deniro",1105,15,.@label$;
+ areamonster .@map$,352,180,362,216,"Pierre",1160,15,.@label$;
+ areamonster .@map$,352,180,362,216,"Andre",1095,15,.@label$;
+ areamonster .@map$,352,180,362,216,"Ant Egg",1097,5,.@label$;
+ break;
+ case 16:
+ areamonster .@map$,9,96,19,132,"Raydric Archer",1276,10,.@label$;
+ areamonster .@map$,9,96,19,132,"Orc Archer",1189,10,.@label$;
+ areamonster .@map$,9,96,19,132,"Gargoyle",1253,10,.@label$;
+ areamonster .@map$,9,96,19,132,"Archer Skeleton",1016,10,.@label$;
+ break;
+ case 17:
+ areamonster .@map$,93,96,103,132,"Merman",1264,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Baphomet Jr.",1101,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Strouf",1065,15,.@label$;
+ areamonster .@map$,93,96,103,132,"Hill Wind",1629,5,.@label$;
+ break;
+ case 18:
+ areamonster .@map$,181,96,191,132,"Cramp",1209,25,.@label$;
+ areamonster .@map$,181,96,191,132,"Tarou",1175,15,.@label$;
+ break;
+ case 19:
+ areamonster .@map$,267,96,277,132,"Deviace",1108,10,.@label$;
+ areamonster .@map$,267,96,277,132,"Megalodon",1064,10,.@label$;
+ areamonster .@map$,267,96,277,132,"Swordfish",1069,10,.@label$;
+ areamonster .@map$,267,96,277,132,"Phen",1158,10,.@label$;
+ break;
+ case 20:
+ areamonster .@map$,352,96,362,132,"Drake",1112,1,.@label$;
+ areamonster .@map$,352,96,362,132,"Pirate Skeleton",1071,50,.@label$;
+ break;
+ case 21:
+ areamonster .@map$,9,9,19,45,"Plasma",1693,10,.@label$;
+ areamonster .@map$,9,9,19,45,"Plasma",1696,10,.@label$;
+ areamonster .@map$,9,9,19,45,"Plasma",1695,5,.@label$;
+ areamonster .@map$,9,9,19,45,"Plasma",1697,5,.@label$;
+ areamonster .@map$,9,9,19,45,"Plasma",1694,5,.@label$;
+ break;
+ case 22:
+ areamonster .@map$,93,9,103,45,"Muscipular",1780,15,.@label$;
+ areamonster .@map$,93,9,103,45,"Drosera",1781,15,.@label$;
+ areamonster .@map$,93,9,103,45,"Flora",1118,15,.@label$;
+ areamonster .@map$,93,9,103,45,"Hydra",1068,15,.@label$;
+ areamonster .@map$,93,9,103,45,"Mandragora",1020,10,.@label$;
+ areamonster .@map$,93,9,103,45,"Rafflesia",1162,10,.@label$;
+ break;
+ case 23:
+ areamonster .@map$,181,9,191,45,"Penomena",1216,15,.@label$;
+ areamonster .@map$,181,9,191,45,"Obeaune",1044,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Marse",1144,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Swordfish",1069,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Hydra",1068,5,.@label$;
+ break;
+ case 24:
+ areamonster .@map$,267,9,277,45,"Joker",1131,15,.@label$;
+ areamonster .@map$,267,9,277,45,"Carat",1267,15,.@label$;
+ areamonster .@map$,267,9,277,45,"Jakk",1130,10,.@label$;
+ break;
+ case 25:
+ areamonster .@map$,352,9,362,45,"Cat o' Nine Tails",1307,15,.@label$;
+ areamonster .@map$,352,9,362,45,"Moonlight",1150,1,.@label$;
+ areamonster .@map$,352,9,362,45,"Nine Tail",1180,15,.@label$;
+ break;
+ case 26:
+ areamonster .@map$,9,351,19,387,"Gibbet",1503,10,.@label$;
+ areamonster .@map$,9,351,19,387,"Enchanted Peach Tree",1410,10,.@label$;
+ areamonster .@map$,9,351,19,387,"Wooden Golem",1497,10,.@label$;
+ areamonster .@map$,9,351,19,387,"Stone Shooter",1495,10,.@label$;
+ areamonster .@map$,9,351,19,387,"Elder Willow",1033,5,.@label$;
+ break;
+ case 27:
+ areamonster .@map$,93,351,103,387,"Goblin Archer",1258,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Goblin",1122,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Goblin",1123,5,.@label$;
+ areamonster .@map$,93,351,103,387,"Goblin",1124,5,.@label$;
+ areamonster .@map$,93,351,103,387,"Gobin",1125,5,.@label$;
+ areamonster .@map$,93,351,103,387,"Goblin",1126,5,.@label$;
+ break;
+ case 28:
+ areamonster .@map$,181,351,191,387,"Arclouse",1194,30,.@label$;
+ areamonster .@map$,181,351,191,387,"Neraid",1255,15,.@label$;
+ areamonster .@map$,181,351,191,387,"Pest",1256,15,.@label$;
+ areamonster .@map$,181,351,191,387,"Kukre",1070,10,.@label$;
+ break;
+ case 29:
+ areamonster .@map$,267,351,277,387,"Dark Frame",1260,10,.@label$;
+ areamonster .@map$,267,351,277,387,"The Paper",1375,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Hylozoist",1510,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Quve",1508,5,.@label$;
+ areamonster .@map$,267,351,277,387,"Lude",1509,5,.@label$;
+ areamonster .@map$,267,351,277,387,"Whisper",1179,10,.@label$;
+ break;
+ case 30:
+ areamonster .@map$,352,351,362,387,"White Lady",1630,1,.@label$;
+ areamonster .@map$,352,351,362,387,"Evil Nymph",1416,30,.@label$;
+ break;
+ case 31:
+ areamonster .@map$,9,267,19,303,"Gig",1387,20,.@label$;
+ areamonster .@map$,9,267,19,303,"Iron Fist",1212,15,.@label$;
+ areamonster .@map$,9,267,19,303,"Argiope",1099,10,.@label$;
+ areamonster .@map$,9,267,19,303,"Scorpion",1001,5,.@label$;
+ break;
+ case 32:
+ areamonster .@map$,93,267,103,303,"Goblin Leader",1299,1,.@label$;
+ areamonster .@map$,93,267,103,303,"Goblin Archer",1258,10,.@label$;
+ areamonster .@map$,93,267,103,303,"Goblin",1122,10,.@label$;
+ areamonster .@map$,93,267,103,303,"Goblin",1123,5,.@label$;
+ areamonster .@map$,93,267,103,303,"Goblin",1124,5,.@label$;
+ areamonster .@map$,93,267,103,303,"Goblin",1125,5,.@label$;
+ areamonster .@map$,93,267,103,303,"Goblin",1126,5,.@label$;
+ break;
+ case 33:
+ areamonster .@map$,181,267,191,303,"Kobold Leader",1296,1,.@label$;
+ areamonster .@map$,181,267,191,303,"Kobold",1133,15,.@label$;
+ areamonster .@map$,181,267,191,303,"Kobold_Archer",1282,15,.@label$;
+ areamonster .@map$,181,267,191,303,"Kobold",1134,10,.@label$;
+ areamonster .@map$,181,267,191,303,"Kobold",1135,5,.@label$;
+ break;
+ case 34:
+ areamonster .@map$,267,267,277,303,"Flame Skull",1869,20,.@label$;
+ areamonster .@map$,267,267,277,303,"Whisper",1179,10,.@label$;
+ areamonster .@map$,267,267,277,303,"Giant Whisper",1186,10,.@label$;
+ break;
+ case 35:
+ areamonster .@map$,352,267,362,303,"Turtle General",1312,1,.@label$;
+ areamonster .@map$,352,267,362,303,"Freezer",1319,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Solider",1316,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Heater",1318,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Permeter",1314,10,.@label$;
+ break;
+ case 36:
+ areamonster .@map$,9,180,19,216,"Anolian",1206,30,.@label$;
+ areamonster .@map$,9,180,19,216,"Grove",1687,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Alligator",1271,10,.@label$;
+ break;
+ case 37:
+ areamonster .@map$,93,180,103,216,"Clock Tower Manager",1270,10,.@label$;
+ areamonster .@map$,93,180,103,216,"Clock",1269,10,.@label$;
+ areamonster .@map$,93,180,103,216,"Alarm",1193,30,.@label$;
+ break;
+ case 38:
+ areamonster .@map$,181,180,191,216,"Death Word",1698,25,.@label$;
+ areamonster .@map$,181,180,191,216,"Rideword",1195,25,.@label$;
+ break;
+ case 39:
+ areamonster .@map$,267,180,277,216,"Evil Nymph",1416,10,.@label$;
+ areamonster .@map$,267,180,277,216,"Mao Gui",1513,10,.@label$;
+ areamonster .@map$,267,180,277,216,"Taoist Hermit",1412,10,.@label$;
+ areamonster .@map$,267,180,277,216,"Zhu Po Long",1514,10,.@label$;
+ areamonster .@map$,267,180,277,216,"Jin Guai",1517,5,.@label$;
+ break;
+ case 40:
+ areamonster .@map$,352,180,362,216,"Samurai Specter",1492,1,.@label$;
+ areamonster .@map$,352,180,362,216,"Shinobi",1401,10,.@label$;
+ areamonster .@map$,352,180,362,216,"Tengu",1405,10,.@label$;
+ areamonster .@map$,352,180,362,216,"Firelock Soldier",1403,5,.@label$;
+ areamonster .@map$,352,180,362,216,"Miyabi Doll",1404,10,.@label$;
+ areamonster .@map$,352,180,362,216,"Karakasa",1400,5,.@label$;
+ break;
+ case 41:
+ areamonster .@map$,9,96,19,132,"Kraben",1587,50,.@label$;
+ break;
+ case 42:
+ areamonster .@map$,93,96,103,132,"Sleeper",1386,20,.@label$;
+ areamonster .@map$,93,96,103,132,"Sting",1207,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Mi Gao",1516,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Sandman",1165,5,.@label$;
+ areamonster .@map$,93,96,103,132,"Hode",1127,5,.@label$;
+ break;
+ case 43:
+ areamonster .@map$,181,96,191,132,"Medusa",1148,10,.@label$;
+ areamonster .@map$,181,96,191,132,"Sidewinder",1037,40,.@label$;
+ areamonster .@map$,181,96,191,132,"Anacondaq",1030,5,.@label$;
+ areamonster .@map$,181,96,191,132,"Boa",1025,5,.@label$;
+ break;
+ case 44:
+ areamonster .@map$,267,96,277,132,"Hatii Baby",1515,20,.@label$;
+ areamonster .@map$,267,96,277,132,"Baphomet Jr.",1101,20,.@label$;
+ areamonster .@map$,267,96,277,132,"Orc Baby",1686,1,.@label$;
+ areamonster .@map$,267,96,277,132,"Baby Desert Wolf",1107,10,.@label$;
+ areamonster .@map$,267,96,277,132,"Savage Babe",1167,10,.@label$;
+ break;
+ case 45:
+ areamonster .@map$,352,96,362,132,"Osiris",1038,1,.@label$;
+ areamonster .@map$,352,96,362,132,"Ancient Mummy",1297,15,.@label$;
+ areamonster .@map$,352,96,362,132,"Verit",1032,15,.@label$;
+ areamonster .@map$,352,96,362,132,"Mummy",1041,20,.@label$;
+ break;
+ case 46:
+ areamonster .@map$,9,9,19,45,"Seeker",1774,20,.@label$;
+ areamonster .@map$,9,9,19,45,"Beholder",1633,20,.@label$;
+ break;
+ case 47:
+ areamonster .@map$,93,9,103,45,"Deleter",1384,20,.@label$;
+ areamonster .@map$,93,9,103,45,"Deleter",1385,10,.@label$;
+ areamonster .@map$,93,9,103,45,"Petite",1156,10,.@label$;
+ areamonster .@map$,93,9,103,45,"Petite",1155,10,.@label$;
+ break;
+ case 48:
+ areamonster .@map$,181,9,191,45,"Ancient Worm",1305,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Ancient Mummy",1297,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Ancient Mimic",1699,10,.@label$;
+ break;
+ case 49:
+ areamonster .@map$,267,9,277,45,"Grizzly",1381,20,.@label$;
+ areamonster .@map$,267,9,277,45,"Leib Olmai",1306,7,.@label$;
+ areamonster .@map$,267,9,277,45,"Zipper Bear",1417,5,.@label$;
+ areamonster .@map$,267,9,277,45,"Sasquatch",1243,5,.@label$;
+ areamonster .@map$,267,9,277,45,"Bigfoot",1060,5,.@label$;
+ break;
+ case 50:
+ areamonster .@map$,352,9,362,45,"Pharaoh",1157,1,.@label$;
+ areamonster .@map$,352,9,362,45,"Amon Ra",1511,1,.@label$;
+ areamonster .@map$,352,9,362,45,"Anubis",1098,10,.@label$;
+ areamonster .@map$,352,9,362,45,"Marduk",1140,10,.@label$;
+ areamonster .@map$,352,9,362,45,"Matyr",1146,10,.@label$;
+ break;
+ case 51:
+ areamonster .@map$,9,351,19,387,"Mini Demon",1292,20,.@label$;
+ areamonster .@map$,9,351,19,387,"Diabolic",1382,20,.@label$;
+ areamonster .@map$,9,351,19,387,"Deviruchi",1109,10,.@label$;
+ break;
+ case 52:
+ areamonster .@map$,93,351,103,387,"Harpy",1376,20,.@label$;
+ areamonster .@map$,93,351,103,387,"Grand Peco",1369,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Bloody Butterfly",1408,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Gargoyle",1253,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Hill Wind",1680,5,.@label$;
+ areamonster .@map$,93,351,103,387,"Hill Wind",1629,5,.@label$;
+ break;
+ case 53:
+ areamonster .@map$,181,351,191,387,"Assaulter",1315,25,.@label$;
+ areamonster .@map$,181,351,191,387,"Shinobi",1401,30,.@label$;
+ break;
+ case 54:
+ areamonster .@map$,267,351,277,387,"Chepet",1250,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Mariontte",1143,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Miyabi Doll",1404,10,.@label$;
+ break;
+ case 55:
+ areamonster .@map$,352,351,362,387,"Medusa",1148,25,.@label$;
+ areamonster .@map$,352,351,362,387,"Evil Snake Lord",1418,1,.@label$;
+ areamonster .@map$,352,351,362,387,"Isis",1029,15,.@label$;
+ areamonster .@map$,352,351,362,387,"Sidewinder",1037,15,.@label$;
+ break;
+ case 56:
+ areamonster .@map$,9,267,19,303,"Freezer",1319,10,.@label$;
+ areamonster .@map$,9,267,19,303,"Hatii Baby",1515,10,.@label$;
+ areamonster .@map$,9,267,19,303,"Ice Titan",1777,15,.@label$;
+ areamonster .@map$,9,267,19,303,"Snowier",1775,10,.@label$;
+ areamonster .@map$,9,267,19,303,"Gazeti",1778,10,.@label$;
+ break;
+ case 57:
+ areamonster .@map$,93,267,103,303,"Arc Angeling",1388,1,.@label$;
+ areamonster .@map$,93,267,103,303,"Deviling",1582,1,.@label$;
+ areamonster .@map$,93,267,103,303,"Angeling",1096,1,.@label$;
+ areamonster .@map$,93,267,103,303,"Ghostring",1120,1,.@label$;
+ areamonster .@map$,93,267,103,303,"Mastering",1090,1,.@label$;
+ areamonster .@map$,93,267,103,303,"Metaling",1613,25,.@label$;
+ areamonster .@map$,93,267,103,303,"Marin",1242,5,.@label$;
+ areamonster .@map$,93,267,103,303,"Poporing",1031,5,.@label$;
+ areamonster .@map$,93,267,103,303,"Drops",1113,5,.@label$;
+ break;
+ case 58:
+ areamonster .@map$,181,267,191,303,"Phendark",1202,20,.@label$;
+ areamonster .@map$,181,267,191,303,"Rybio",1201,10,.@label$;
+ areamonster .@map$,181,267,191,303,"Zombie Prisoner",1197,10,.@label$;
+ areamonster .@map$,181,267,191,303,"Skeleton Prisoner",1196,5,.@label$;
+ areamonster .@map$,181,267,191,303,"Injustice",1257,5,.@label$;
+ break;
+ case 59:
+ areamonster .@map$,267,267,277,303,"Ancient Mimic",1699,30,.@label$;
+ areamonster .@map$,267,267,277,303,"Mimic",1191,20,.@label$;
+ areamonster .@map$,267,267,277,303,"Mystcase",1249,10,.@label$;
+ break;
+ case 60:
+ areamonster .@map$,352,267,362,303,"Egnigem Cenia",1658,1,.@label$;
+ areamonster .@map$,352,267,362,303,"Doppelganger",1046,1,.@label$;
+ areamonster .@map$,352,267,362,303,"Armeyer Dinze",1654,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Wickebine Tres",1653,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Laurell Winder",1657,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Kavach Icarus",1656,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Errende Ebecee",1655,10,.@label$;
+ areamonster .@map$,352,267,362,303,"Egnigem Cenia",1652,10,.@label$;
+ break;
+ case 61:
+ areamonster .@map$,9,180,19,216,"Agav",1769,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Echio",1770,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Isilla",1772,5,.@label$;
+ areamonster .@map$,9,180,19,216,"Mobster",1313,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Pasana",1154,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Vanberk",1771,5,.@label$;
+ break;
+ case 62:
+ areamonster .@map$,93,180,103,216,"Wanderer",1208,35,.@label$;
+ break;
+ case 63:
+ areamonster .@map$,181,180,191,216,"Ragged Zombie",1865,20,.@label$;
+ areamonster .@map$,181,180,191,216,"Zombie Master",1298,10,.@label$;
+ areamonster .@map$,181,180,191,216,"Zombie Prisoner",1197,5,.@label$;
+ areamonster .@map$,181,180,191,216,"Orc Zombie",1153,5,.@label$;
+ areamonster .@map$,181,180,191,216,"Zombie",1015,5,.@label$;
+ break;
+ case 64:
+ areamonster .@map$,267,180,277,216,"Ungoliant",1618,30,.@label$;
+ areamonster .@map$,267,180,277,216,"Ancient Worm",1305,2,.@label$;
+ areamonster .@map$,267,180,277,216,"Caterpillar",1300,2,.@label$;
+ areamonster .@map$,267,180,277,216,"Creamy Fear",1293,2,.@label$;
+ areamonster .@map$,267,180,277,216,"Killer Mantis",1294,2,.@label$;
+ areamonster .@map$,267,180,277,216,"Giant Hornet",1303,2,.@label$;
+ break;
+ case 65:
+ areamonster .@map$,352,180,362,216,"Atros",1785,1,.@label$;
+ areamonster .@map$,352,180,362,216,"Galion",1783,20,.@label$;
+ break;
+ case 66:
+ areamonster .@map$,9,96,19,132,"Incubus",1374,20,.@label$;
+ areamonster .@map$,9,96,19,132,"Aliot",1736,20,.@label$;
+ areamonster .@map$,9,96,19,132,"Injustice",1257,10,.@label$;
+ break;
+ case 67:
+ areamonster .@map$,93,96,103,132,"Acidus",1716,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Acidus",1713,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Deleter",1384,5,.@label$;
+ areamonster .@map$,93,96,103,132,"Mutant Dragonoid",1262,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Petite",1156,5,.@label$;
+ break;
+ case 68:
+ areamonster .@map$,181,96,191,132,"Lava Golem",1366,10,.@label$;
+ areamonster .@map$,181,96,191,132,"Stalactic Golem",1278,10,.@label$;
+ areamonster .@map$,181,96,191,132,"Ice Titan",1777,10,.@label$;
+ areamonster .@map$,181,96,191,132,"Wooden Golem",1497,5,.@label$;
+ areamonster .@map$,181,96,191,132,"Golem",1040,5,.@label$;
+ break;
+ case 69:
+ areamonster .@map$,267,96,277,132,"Dame of Sentinel",1700,20,.@label$;
+ areamonster .@map$,267,96,277,132,"Mistress of Shelter",1701,10,.@label$;
+ areamonster .@map$,267,96,277,132,"Baroness of Retribution",1702,10,.@label$;
+ areamonster .@map$,267,96,277,132,"Lady Solace",1703,10,.@label$;
+ areamonster .@map$,267,96,277,132,"False Angel",1371,10,.@label$;
+ break;
+ case 70:
+ areamonster .@map$,352,96,362,132,"Orc Hero",1087,1,.@label$;
+ areamonster .@map$,352,96,362,132,"Orc Lord",1190,1,.@label$;
+ areamonster .@map$,352,96,362,132,"Orc Baby",1686,20,.@label$;
+ break;
+ case 71:
+ areamonster .@map$,9,9,19,45,"Succubus",1370,20,.@label$;
+ areamonster .@map$,9,9,19,45,"Nightmare Terror",1379,20,.@label$;
+ areamonster .@map$,9,9,19,45,"Incubus",1374,20,.@label$;
+ areamonster .@map$,9,9,19,45,"Nightmare",1061,5,.@label$;
+ break;
+ case 72:
+ areamonster .@map$,93,9,103,45,"Margaretha Sorin",1637,10,.@label$;
+ areamonster .@map$,93,9,103,45,"Permeter",1314,10,.@label$;
+ areamonster .@map$,93,9,103,45,"Errende Ebecee",1655,10,.@label$;
+ areamonster .@map$,93,9,103,45,"Enchanted Peach Tree",1410,10,.@label$;
+ break;
+ case 73:
+ areamonster .@map$,181,9,191,45,"Succubus",1370,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Loli Ruri",1505,20,.@label$;
+ areamonster .@map$,181,9,191,45,"Aliza",1737,10,.@label$;
+ areamonster .@map$,181,9,191,45,"Zealotus",1200,5,.@label$;
+ areamonster .@map$,181,9,191,45,"Alice",1275,5,.@label$;
+ areamonster .@map$,181,9,191,45,"Green Maiden",1631,10,.@label$;
+ break;
+ case 74:
+ areamonster .@map$,267,9,277,45,"Dimik",1671,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Dimik",1673,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Dimik",1672,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Venatu",1677,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Dimik",1670,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Archdam",1668,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Venatu",1678,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Venatu",1679,6,.@label$;
+ areamonster .@map$,267,9,277,45,"Venatu",1676,6,.@label$;
+ break;
+ case 75:
+ areamonster .@map$,352,9,362,45,"Baphomet",1039,1,.@label$;
+ areamonster .@map$,352,9,362,45,"Dark Lord",1272,1,.@label$;
+ areamonster .@map$,352,9,362,45,"Baphomet Jr.",1101,20,.@label$;
+ areamonster .@map$,352,9,362,45,"Dark Illusion",1302,10,.@label$;
+ break;
+ case 76:
+ areamonster .@map$,9,351,19,387,"Abysmal Knight",1219,30,.@label$;
+ areamonster .@map$,9,351,19,387,"Nightmare Terror",1379,20,.@label$;
+ areamonster .@map$,9,351,19,387,"Nightmare",1061,10,.@label$;
+ break;
+ case 77:
+ areamonster .@map$,93,351,103,387,"Banshee",1867,30,.@label$;
+ areamonster .@map$,93,351,103,387,"Wraith Dead",1291,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Evil Druid",1117,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Wraith",1192,10,.@label$;
+ areamonster .@map$,93,351,103,387,"Wind Ghost",1263,10,.@label$;
+ break;
+ case 78:
+ areamonster .@map$,181,351,191,387,"Sword Master",1829,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Bloody Knight",1268,10,.@label$;
+ areamonster .@map$,181,351,191,387,"Abysmal Knight",1219,5,.@label$;
+ areamonster .@map$,181,351,191,387,"Dullahan",1504,10,.@label$;
+ areamonster .@map$,181,351,191,387,"Raydric",1163,20,.@label$;
+ break;
+ case 79:
+ areamonster .@map$,267,351,277,387,"Hydro",1720,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Ferus",1714,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Ferus",1717,10,.@label$;
+ areamonster .@map$,267,351,277,387,"Deleter",1385,5,.@label$;
+ areamonster .@map$,267,351,277,387,"Petite",1155,5,.@label$;
+ break;
+ case 80:
+ areamonster .@map$,352,351,362,387,"Falling Bishop",1871,1,.@label$;
+ areamonster .@map$,352,351,362,387,"Necromancer",1870,15,.@label$;
+ break;
+ case 81:
+ areamonster .@map$,9,267,19,303,"Mysteltainn",1203,20,.@label$;
+ areamonster .@map$,9,267,19,303,"Ogretooth",1204,20,.@label$;
+ areamonster .@map$,9,267,19,303,"Executioner",1205,20,.@label$;
+ break;
+ case 82:
+ areamonster .@map$,93,267,103,303,"Bloody Knight",1268,10,.@label$;
+ areamonster .@map$,93,267,103,303,"Agav",1769,10,.@label$;
+ areamonster .@map$,93,267,103,303,"Bloody Murderer",1507,10,.@label$;
+ areamonster .@map$,93,267,103,303,"Skogul",1752,10,.@label$;
+ areamonster .@map$,93,267,103,303,"Injustice",1257,10,.@label$;
+ break;
+ case 83:
+ areamonster .@map$,181,267,191,303,"Skeggiold",1754,10,.@label$;
+ areamonster .@map$,181,267,191,303,"Dark Illusion",1302,10,.@label$;
+ areamonster .@map$,181,267,191,303,"Gryphon",1259,10,.@label$;
+ areamonster .@map$,181,267,191,303,"Chimera",1283,10,.@label$;
+ break;
+ case 84:
+ areamonster .@map$,267,267,277,303,"Succubus",1370,10,.@label$;
+ areamonster .@map$,267,267,277,303,"Dark Illusion",1302,20,.@label$;
+ areamonster .@map$,267,267,277,303,"Owl Duke",1320,10,.@label$;
+ areamonster .@map$,267,267,277,303,"Owl Baron",1295,10,.@label$;
+ areamonster .@map$,267,267,277,303,"Incubus",1374,10,.@label$;
+ break;
+ case 85:
+ areamonster .@map$,352,267,362,303,"Ifrit",1832,1,.@label$;
+ break;
+ case 86:
+ areamonster .@map$,9,180,19,216,"Hydro",1720,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Gryphon",1259,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Chimera",1283,10,.@label$;
+ areamonster .@map$,9,180,19,216,"Majoruros",1310,10,.@label$;
+ break;
+ case 87:
+ areamonster .@map$,93,180,103,216,"Salamander",1831,15,.@label$;
+ areamonster .@map$,93,180,103,216,"Kasa",1833,20,.@label$;
+ areamonster .@map$,93,180,103,216,"Lava Golem",1366,15,.@label$;
+ areamonster .@map$,93,180,103,216,"Gajomart",1309,10,.@label$;
+ break;
+ case 88:
+ areamonster .@map$,181,180,191,216,"Necromancer",1870,15,.@label$;
+ areamonster .@map$,181,180,191,216,"Anubis",1098,15,.@label$;
+ areamonster .@map$,181,180,191,216,"Wraith Dead",1291,10,.@label$;
+ areamonster .@map$,181,180,191,216,"Ancient Mummy",1297,10,.@label$;
+ areamonster .@map$,181,180,191,216,"Khalitzburg",1132,10,.@label$;
+ break;
+ case 89:
+ areamonster .@map$,267,180,277,216,"Odium of Thanatos",1704,6,.@label$;
+ areamonster .@map$,267,180,277,216,"Despero of Thanatos",1705,6,.@label$;
+ areamonster .@map$,267,180,277,216,"Maero of Thanatos",1706,6,.@label$;
+ areamonster .@map$,267,180,277,216,"Dolor of Thanatos",1707,6,.@label$;
+ break;
+ case 90:
+ areamonster .@map$,352,180,362,216,"Valkyrie Randgris",1751,1,.@label$;
+ areamonster .@map$,352,180,362,216,"Baroness of Retribution",1702,10,.@label$;
+ areamonster .@map$,352,180,362,216,"Lady Solace",1703,10,.@label$;
+ areamonster .@map$,352,180,362,216,"False Angel",1371,10,.@label$;
+ break;
+ case 91:
+ areamonster .@map$,9,96,19,132,"Cecil Damon",1638,10,.@label$;
+ areamonster .@map$,9,96,19,132,"Bow Master",1830,10,.@label$;
+ areamonster .@map$,9,96,19,132,"Kavac",1656,30,.@label$;
+ break;
+ case 92:
+ areamonster .@map$,93,96,103,132,"Kathryne Keyron",1639,15,.@label$;
+ areamonster .@map$,93,96,103,132,"Elder",1377,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Laurell Weinder",1657,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Wind Ghost",1263,10,.@label$;
+ areamonster .@map$,93,96,103,132,"Marduk",1140,10,.@label$;
+ break;
+ case 93:
+ areamonster .@map$,181,96,191,132,"Seyren Windsor",1634,15,.@label$;
+ areamonster .@map$,181,96,191,132,"Bloody Knight",1268,10,.@label$;
+ areamonster .@map$,181,96,191,132,"Abysmal Knight",1219,10,.@label$;
+ areamonster .@map$,181,96,191,132,"Wanderer",1208,10,.@label$;
+ break;
+ case 94:
+ areamonster .@map$,267,96,277,132,"Sword Master",1829,15,.@label$;
+ areamonster .@map$,267,96,277,132,"Bow Master",1830,15,.@label$;
+ break;
+ case 95:
+ areamonster .@map$,352,96,362,132,"Beelzebub",1873,1,.@label$;
+ areamonster .@map$,352,96,362,132,"Hunter Fly",1035,30,.@label$;
+ areamonster .@map$,352,96,362,132,"Steel Chonchon",1042,5,.@label$;
+ areamonster .@map$,352,96,362,132,"Dragon FLy",1091,5,.@label$;
+ areamonster .@map$,352,96,362,132,"Chonchon",1011,5,.@label$;
+ break;
+ case 96:
+ areamonster .@map$,9,9,19,45,"Valkyrie",1765,5,.@label$;
+ areamonster .@map$,9,9,19,45,"Skeggiold",1755,10,.@label$;
+ areamonster .@map$,9,9,19,45,"Skeggiold",1754,10,.@label$;
+ break;
+ case 97:
+ areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1918,5,.@label$;
+ areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1919,5,.@label$;
+ areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1920,5,.@label$;
+ areamonster .@map$,93,9,103,45,"Incarnation of Morroc",1921,5,.@label$;
+ break;
+ case 98:
+ areamonster .@map$,181,9,191,45,"Kathryne Keyron",1639,2,.@label$;
+ areamonster .@map$,181,9,191,45,"Seyren Windsor",1634,2,.@label$;
+ areamonster .@map$,181,9,191,45,"Margaretha Sorin",1637,2,.@label$;
+ areamonster .@map$,181,9,191,45,"Eremes Guile",1635,2,.@label$;
+ areamonster .@map$,181,9,191,45,"Howard Alt-Eisen",1636,2,.@label$;
+ areamonster .@map$,181,9,191,45,"Cecil Damon",1638,2,.@label$;
+ break;
+ case 99:
+ for(set .@i,1; .@i<=7; set .@i,.@i+1) {
+ set .@mob_ran,rand(1,30);
+ if (.@mob_ran == 1)
+ areamonster .@map$,267,9,277,45,"Kathryne Keyron",1639,2,.@label$;
+ else if (.@mob_ran == 2)
+ areamonster .@map$,267,9,277,45,"Seyren Windsor",1634,2,.@label$;
+ else if (.@mob_ran == 3)
+ areamonster .@map$,267,9,277,45,"Margaretha Sorin",1637,2,.@label$;
+ else if (.@mob_ran == 4)
+ areamonster .@map$,267,9,277,45,"Eremes Guile",1635,2,.@label$;
+ else if (.@mob_ran == 5)
+ areamonster .@map$,267,9,277,45,"Howard Alt-Eisen",1636,2,.@label$;
+ else if (.@mob_ran == 6)
+ areamonster .@map$,267,9,277,45,"Cecil Damon",1638,2,.@label$;
+ else if (.@mob_ran == 7)
+ areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1918,5,.@label$;
+ else if (.@mob_ran == 8)
+ areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1919,5,.@label$;
+ else if (.@mob_ran == 9)
+ areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1920,5,.@label$;
+ else if (.@mob_ran == 10)
+ areamonster .@map$,267,9,277,45,"Incarnation of Morroc",1921,5,.@label$;
+ else if (.@mob_ran == 11)
+ areamonster .@map$,267,9,277,45,"Valkyrie",1765,5,.@label$;
+ else if (.@mob_ran == 12)
+ areamonster .@map$,267,9,277,45,"Skeggiold",1755,10,.@label$;
+ else if (.@mob_ran == 13)
+ areamonster .@map$,267,9,277,45,"Skeggiold",1754,10,.@label$;
+ else if (.@mob_ran == 14)
+ areamonster .@map$,267,9,277,45,"Seyren Windsor",1634,15,.@label$;
+ else if (.@mob_ran == 15)
+ areamonster .@map$,267,9,277,45,"Bloody Knight",1268,10,.@label$;
+ else if (.@mob_ran == 16)
+ areamonster .@map$,267,9,277,45,"Abysmal Knight",1219,10,.@label$;
+ else if (.@mob_ran == 17)
+ areamonster .@map$,267,9,277,45,"Wanderer",1208,10,.@label$;
+ else if (.@mob_ran == 18)
+ areamonster .@map$,267,9,277,45,"Sword Master",1829,15,.@label$;
+ else if (.@mob_ran == 19)
+ areamonster .@map$,267,9,277,45,"Bow Master",1830,15,.@label$;
+ else if (.@mob_ran == 20)
+ areamonster .@map$,267,9,277,45,"Kathryne Keyron",1639,15,.@label$;
+ else if (.@mob_ran == 21)
+ areamonster .@map$,267,9,277,45,"Elder",1377,10,.@label$;
+ else if (.@mob_ran == 22)
+ areamonster .@map$,267,9,277,45,"Laurell Weinder",1657,10,.@label$;
+ else if (.@mob_ran == 23)
+ areamonster .@map$,267,9,277,45,"Wind Ghost",1263,10,.@label$;
+ else if (.@mob_ran == 24)
+ areamonster .@map$,267,9,277,45,"Marduk",1140,10,.@label$;
+ else if (.@mob_ran == 25)
+ areamonster .@map$,267,9,277,45,"Cecil Damon",1638,10,.@label$;
+ else if (.@mob_ran == 26)
+ areamonster .@map$,267,9,277,45,"Bow Master",1830,10,.@label$;
+ else if (.@mob_ran == 27)
+ areamonster .@map$,267,9,277,45,"Kavach Icarus",1656,30,.@label$;
+ else if (.@mob_ran == 28)
+ areamonster .@map$,267,9,277,45,"Baroness of Retribution",1702,10,.@label$;
+ else if (.@mob_ran == 29)
+ areamonster .@map$,267,9,277,45,"Lady Solace",1703,10,.@label$;
+ else
+ areamonster .@map$,267,9,277,45,"False Angel",1371,10,.@label$;
}
break;
}
- end;
-}
-
-1@tower,29,365,1 script #1F Controller 844,{
- end;
-
-OnInstanceInit:
- areamonster "1@tower",7,351,17,387,"Metaling",1613,15,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",7,351,17,387,"Marin",1242,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",7,351,17,387,"Poporing",1031,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",7,351,17,387,"Drops",1113,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",7,351,17,387,"Mastering",1090,1,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",7,351,17,387,"Poring",1002,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead";
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 1
- }
- else
- instance_announce -1, "Remaining Monsters on the 1st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 1st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("1FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,12,393,0 script 1FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("1FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("1FGate102tower", instance_id());
- areamonster "1@tower",93,351,103,387,"Desert Wolf",1106,20,instance_npcname("1FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,351,103,387,"Vagabond Wolf",1092,1,instance_npcname("1FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,351,103,387,"Baby Desert Wolf",1107,10,instance_npcname("1FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",136,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("1FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 2
- }
- else
- instance_announce -1, "Remaining Monsters on the 2nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 2nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("2FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,96,393,0 script 2FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("2FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("2FGate102tower", instance_id());
- areamonster "1@tower",181,351,191,387,"Archer Skeleton",1016,5,instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,351,191,387,"Skel Worker",1169,5,instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,351,191,387,"Soldier Skeleton",1028,5,instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,351,191,387,"Orc Skeleton",1152,5,instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,351,191,387,"Pirate Skeleton",1071,5,instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,351,191,387,"Skeleton",1076,5,instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",224,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("2FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 3
- }
- else
- instance_announce -1, "Remaining Monsters on the 3rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 3rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("3FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,184,393,0 script 3FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("3FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("3FGate102tower", instance_id());
- areamonster "1@tower",267,351,277,387,"Argiope",1099,15,instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,351,277,387,"Mantis",1139,5,instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,351,277,387,"Argos",1100,5,instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,351,277,387,"Vocal",1088,1,instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,351,277,387,"Rocker",1052,5,instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,351,277,387,"Hornet",1004,5,instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",310,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("3FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 4
- }
- else
- instance_announce -1, "Remaining Monsters on the 4th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 4th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("4FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,270,393,0 script 4FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("4FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("4FGate102tower", instance_id());
- areamonster "1@tower",352,351,362,387,"Golden Thief Bug",1086,1,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,351,362,387,"Thief Bug Male",1054,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,351,362,387,"Thief Bug Female",1053,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,351,362,387,"Thief Bug",1051,15,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,351,362,387,"Thief Bug Egg",1048,5,instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",395,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("4FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 5
- }
- else
- instance_announce -1, "Remaining Monsters on the 5th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 5th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("5FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,355,393,0 script 5FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("5FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("5FGate102tower", instance_id());
- areamonster "1@tower",9,267,19,303,"Dragon Egg",1721,5,instance_npcname("5FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,267,19,303,"Thief Bug Egg",1048,5,instance_npcname("5FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,267,19,303,"Ant Egg",1097,5,instance_npcname("5FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,267,19,303,"Pupa",1008,5,instance_npcname("5FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",52,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("5FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 6
- }
- else
- instance_announce -1, "Remaining Monsters on the 6th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 6th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("6FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,12,309,0 script 6FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("6FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("6FGate102tower", instance_id());
- areamonster "1@tower",93,267,103,303,"Explosion",1383,15,instance_npcname("6FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,267,103,303,"Drainliar",1111,15,instance_npcname("6FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,267,103,303,"Anopheles",1627,15,instance_npcname("6FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,267,103,303,"Farmiliar",1005,15,instance_npcname("6FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",136,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("6FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 7
- }
- else
- instance_announce -1, "Remaining Monsters on the 7th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 7th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("7FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,96,309,0 script 7FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("7FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("7FGate102tower", instance_id());
- areamonster "1@tower",181,267,191,303,"Firelock Soldier",1403,15,instance_npcname("7FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,267,191,303,"Cruiser",1248,15,instance_npcname("7FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",224,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("7FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 8
- }
- else
- instance_announce -1, "Remaining Monsters on the 8th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 8th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("8FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,184,309,0 script 8FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("8FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("8FGate102tower", instance_id());
- areamonster "1@tower",267,267,277,303,"Obsidian",1615,15,instance_npcname("8FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,267,277,303,"Golem",1040,15,instance_npcname("8FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,267,277,303,"Stapo",1784,10,instance_npcname("8FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",310,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("8FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 9
- }
- else
- instance_announce -1, "Remaining Monsters on the 9th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 9th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("9FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,270,309,0 script 9FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("9FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("9FGate102tower", instance_id());
- areamonster "1@tower",352,267,362,303,"Mistress",1059,1,instance_npcname("9FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,267,362,303,"Giant Hornet",1303,25,instance_npcname("9FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,267,362,303,"Hornet",1004,20,instance_npcname("9FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",395,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("9FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 10
- }
- else
- instance_announce -1, "Remaining Monsters on the 10th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 10th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("10FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,355,309,0 script 10FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("10FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("10FGate102tower", instance_id());
- areamonster "1@tower",9,180,19,216,"Dryad",1493,15,instance_npcname("10FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,180,19,216,"Parasite",1500,15,instance_npcname("10FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,180,19,216,"Hermit Plant",1413,15,instance_npcname("10FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,180,19,216,"Rafflesia",1162,5,instance_npcname("10FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",52,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("10FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 11
- }
- else
- instance_announce -1, "Remaining Monsters on the 11th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 11th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("11FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
+ return;
+}
+
+function script F_Tower_Warp {
+
+ set .@level, getarg(0);
+ set .@map$, getarg(1);
+
+ switch(.@level) {
+ case 2: warp .@map$,136,354; break;
+ case 3: warp .@map$,224,354; break;
+ case 4: warp .@map$,310,354; break;
+ case 5: warp .@map$,395,354; break;
+ case 6: warp .@map$,52,270; break;
+ case 7: warp .@map$,136,270; break;
+ case 8: warp .@map$,224,270; break;
+ case 9: warp .@map$,310,270; break;
+ case 10: warp .@map$,395,270; break;
+ case 11: warp .@map$,52,183; break;
+ case 12: warp .@map$,136,183; break;
+ case 13: warp .@map$,224,183; break;
+ case 14: warp .@map$,310,183; break;
+ case 15: warp .@map$,395,183; break;
+ case 16: warp .@map$,52,99; break;
+ case 17: warp .@map$,136,99; break;
+ case 18: warp .@map$,224,99; break;
+ case 19: warp .@map$,310,99; break;
+ case 20: warp .@map$,395,99; break;
+ case 21: warp .@map$,52,12; break;
+ case 22: warp .@map$,136,12; break;
+ case 23: warp .@map$,224,12; break;
+ case 24: warp .@map$,310,12; break;
+ case 25: warp .@map$,395,12; break;
+
+ case 27: warp .@map$,136,354; break;
+ case 28: warp .@map$,224,354; break;
+ case 29: warp .@map$,310,354; break;
+ case 30: warp .@map$,395,354; break;
+ case 31: warp .@map$,52,270; break;
+ case 32: warp .@map$,136,270; break;
+ case 33: warp .@map$,224,270; break;
+ case 34: warp .@map$,310,270; break;
+ case 35: warp .@map$,395,270; break;
+ case 36: warp .@map$,52,183; break;
+ case 37: warp .@map$,136,183; break;
+ case 38: warp .@map$,224,183; break;
+ case 39: warp .@map$,310,183; break;
+ case 40: warp .@map$,395,183; break;
+ case 41: warp .@map$,52,99; break;
+ case 42: warp .@map$,136,99; break;
+ case 43: warp .@map$,224,99; break;
+ case 44: warp .@map$,310,99; break;
+ case 45: warp .@map$,395,99; break;
+ case 46: warp .@map$,52,12; break;
+ case 47: warp .@map$,136,12; break;
+ case 48: warp .@map$,224,12; break;
+ case 49: warp .@map$,310,12; break;
+ case 50: warp .@map$,395,12; break;
+
+ case 52: warp .@map$,136,354; break;
+ case 53: warp .@map$,224,354; break;
+ case 54: warp .@map$,310,354; break;
+ case 55: warp .@map$,395,354; break;
+ case 56: warp .@map$,52,270; break;
+ case 57: warp .@map$,136,270; break;
+ case 58: warp .@map$,224,270; break;
+ case 59: warp .@map$,310,270; break;
+ case 60: warp .@map$,395,270; break;
+ case 61: warp .@map$,52,183; break;
+ case 62: warp .@map$,136,183; break;
+ case 63: warp .@map$,224,183; break;
+ case 64: warp .@map$,310,183; break;
+ case 65: warp .@map$,395,183; break;
+ case 66: warp .@map$,52,99; break;
+ case 67: warp .@map$,136,99; break;
+ case 68: warp .@map$,224,99; break;
+ case 69: warp .@map$,310,99; break;
+ case 70: warp .@map$,395,99; break;
+ case 71: warp .@map$,52,12; break;
+ case 72: warp .@map$,136,12; break;
+ case 73: warp .@map$,224,12; break;
+ case 74: warp .@map$,310,12; break;
+ case 75: warp .@map$,395,12; break;
+
+ case 77: warp .@map$,136,354; break;
+ case 78: warp .@map$,224,354; break;
+ case 79: warp .@map$,310,354; break;
+ case 80: warp .@map$,395,354; break;
+ case 81: warp .@map$,52,270; break;
+ case 82: warp .@map$,136,270; break;
+ case 83: warp .@map$,224,270; break;
+ case 84: warp .@map$,310,270; break;
+ case 85: warp .@map$,395,270; break;
+ case 86: warp .@map$,52,183; break;
+ case 87: warp .@map$,136,183; break;
+ case 88: warp .@map$,224,183; break;
+ case 89: warp .@map$,310,183; break;
+ case 90: warp .@map$,395,183; break;
+ case 91: warp .@map$,52,99; break;
+ case 92: warp .@map$,136,99; break;
+ case 93: warp .@map$,224,99; break;
+ case 94: warp .@map$,310,99; break;
+ case 95: warp .@map$,395,99; break;
+ case 96: warp .@map$,52,12; break;
+ case 97: warp .@map$,136,12; break;
+ case 98: warp .@map$,224,12; break;
+ case 99: warp .@map$,309,12; break;
+ }
+ return;
}
-1@tower,12,222,0 script 11FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("11FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("11FGate102tower", instance_id());
- areamonster "1@tower",93,180,103,216,"Demon Pungus",1378,25,instance_npcname("11FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,180,103,216,"Punk",1199,25,instance_npcname("11FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",136,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("11FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 12
- }
- else
- instance_announce -1, "Remaining Monsters on the 12th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 12th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("12FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,96,222,0 script 12FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("12FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("12FGate102tower", instance_id());
- areamonster "1@tower",181,180,191,216,"Yao Yun",1512,15,instance_npcname("12FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,180,191,216,"Bongunn",1188,15,instance_npcname("12FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,180,191,216,"Munak",1026,10,instance_npcname("12FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",224,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("12FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 13
- }
- else
- instance_announce -1, "Remaining Monsters on the 13th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 13th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("13FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,184,222,0 script 13FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("13FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("13FGate102tower", instance_id());
- areamonster "1@tower",267,180,277,216,"High Orc",1213,15,instance_npcname("13FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,180,277,216,"Orc Archer",1189,10,instance_npcname("13FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,180,277,216,"Orc Lady",1273,10,instance_npcname("13FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,180,277,216,"Orc Warrior",1023,5,instance_npcname("13FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,180,277,216,"Orc Baby",1686,5,instance_npcname("13FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",310,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("13FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 14
- }
- else
- instance_announce -1, "Remaining Monsters on the 14th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 14th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("14FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,270,222,0 script 14FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("14FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("14FGate102tower", instance_id());
- areamonster "1@tower",352,180,362,216,"Maya",1147,1,instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,180,362,216,"Phreeoni",1159,1,instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,180,362,216,"Deniro",1105,15,instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,180,362,216,"Pierre",1160,15,instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,180,362,216,"Andre",1095,15,instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,180,362,216,"Ant Egg",1097,5,instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
-
- warp "1@tower",395,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("14FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 15
- }
- else
- instance_announce -1, "Remaining Monsters on the 15th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 15th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("15FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,355,222,0 script 15FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("15FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("15FGate102tower", instance_id());
- areamonster "1@tower",9,96,19,132,"Raydric Archer",1276,10,instance_npcname("15FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,96,19,132,"Orc Archer",1189,10,instance_npcname("15FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,96,19,132,"Gargoyle",1253,10,instance_npcname("15FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,96,19,132,"Archer Skeleton",1016,10,instance_npcname("15FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",52,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("15FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 16
- }
- else
- instance_announce -1, "Remaining Monsters on the 16th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 16th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("16FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,12,138,0 script 16FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("16FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("16FGate102tower", instance_id());
- areamonster "1@tower",93,96,103,132,"Merman",1264,10,instance_npcname("16FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,96,103,132,"Baphomet Jr.",1101,10,instance_npcname("16FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,96,103,132,"Strouf",1065,15,instance_npcname("16FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,96,103,132,"Hill Wind",1629,5,instance_npcname("16FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",136,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("16FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 17
- }
- else
- instance_announce -1, "Remaining Monsters on the 17th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 17th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("17FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,96,138,0 script 17FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("17FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("17FGate102tower", instance_id());
- areamonster "1@tower",181,96,191,132,"Cramp",1209,25,instance_npcname("17FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,96,191,132,"Tarou",1175,15,instance_npcname("17FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",224,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("17FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 18
- }
- else
- instance_announce -1, "Remaining Monsters on the 18th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 18th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("18FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,184,138,0 script 18FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("18FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("18FGate102tower", instance_id());
- areamonster "1@tower",267,96,277,132,"Deviace",1108,10,instance_npcname("18FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,96,277,132,"Megalodon",1064,10,instance_npcname("18FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,96,277,132,"Swordfish",1069,10,instance_npcname("18FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,96,277,132,"Phen",1158,10,instance_npcname("18FGate102tower", instance_id())+"::OnMyMobDead";
- end;
+// Levels 1-25
+//============================================================
+1@tower,50,360,0 script Immortal Brazier# 844,{
+ mes "- A Message is Engraved on the Brazier -";
+ mes "The one who scatters the ashes of the darkness in this place shall become one step closer to Nacht Sieger, the Hegemon King of the Darkness...";
+ next;
-OnTouch_:
- warp "1@tower",310,99;
- end;
+ setarray .@level$[1],"26th","51st","76th";
+ setarray .@map$[1],"2@tower","3@tower","4@tower";
+ set .@i, select("26th Level:51st Level:76th Level");
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("18FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 19
+ if (countitem(6000) < .@i) {
+ mes "-Warning-";
+ mes "To warp to the "+.@level$[.@i]+" Level, you need "+.@i+" Ashes of the Darkness.";
+ close;
}
- else
- instance_announce -1, "Remaining Monsters on the 19th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 19th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("19FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-1@tower,270,138,0 script 19FGate102tower 45,2,2,{
- end;
+ delitem 6000,.@i; //Dark_Ashes
+ mapannounce instance_mapname("1@tower"), strcharinfo(0)+". You will be warped to the "+.@level$[.@i]+" Level.",bc_map,"0x00ff99";
+ warp instance_mapname(.@map$[.@i]),52,354;
+ close;
OnInstanceInit:
- disablenpc instance_npcname("19FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("19FGate102tower", instance_id());
- areamonster "1@tower",352,96,362,132,"Drake",1112,1,instance_npcname("19FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,96,362,132,"Pirate Skeleton",1071,50,instance_npcname("19FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",395,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("19FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 20
- }
- else
- instance_announce -1, "Remaining Monsters on the 20th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ initnpctimer;
end;
-OnTimer5000:
- instance_announce -1, "All Monsters on the 20th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("20FGate102tower", instance_id())+"::OnEnable";
+OnTimer10000:
+ mapannounce instance_mapname("1@tower"), "Notice : Taming a monster does not count towards defeating them.",bc_map,"0xff0000";
stopnpctimer;
end;
}
-1@tower,355,138,0 script 20FGate102tower 45,2,2,{
+1@tower,29,365,1 script #1F Controller 844,{
end;
OnInstanceInit:
- disablenpc instance_npcname("20FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("20FGate102tower", instance_id());
- areamonster "1@tower",9,9,19,45,"Plasma",1693,10,instance_npcname("20FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,9,19,45,"Plasma",1696,10,instance_npcname("20FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,9,19,45,"Plasma",1695,5,instance_npcname("20FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,9,19,45,"Plasma",1697,5,instance_npcname("20FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",9,9,19,45,"Plasma",1694,5,instance_npcname("20FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",52,12;
+ callfunc "F_Tower_Monster",
+ 1,
+ instance_mapname("1@tower"),
+ instance_npcname("#1F Controller")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("20FGate102tower", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("#1F Controller")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
initnpctimer;
- //SetItemPartyInMap in_102floor 21
- }
- else
- instance_announce -1, "Remaining Monsters on the 21st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ //SetItemPartyInMap in_102floor 1
+ } else
+ mapannounce .@map$, "Remaining Monsters on the 1st Level - "+.@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce -1, "All Monsters on the 21st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("21FGate102tower", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("1@tower"), "All Monsters on the 1st Level have been defeated.",bc_map,"0xffff00";
+ donpcevent instance_npcname("1FGate102tower")+"::OnEnable";
stopnpctimer;
end;
}
-1@tower,12,51,0 script 21FGate102tower 45,2,2,{
+1@tower,12,393,0 script 1FGate102tower 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname("21FGate102tower", instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname("21FGate102tower", instance_id());
- areamonster "1@tower",93,9,103,45,"Muscipular",1780,15,instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,9,103,45,"Drosera",1781,15,instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,9,103,45,"Flora",1118,15,instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,9,103,45,"Hydra",1068,15,instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,9,103,45,"Mandragora",1020,10,instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",93,9,103,45,"Rafflesia",1162,10,instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname(strnpcinfo(0));
+ callfunc "F_Tower_Monster",
+ atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1,
+ strnpcinfo(4),
+ instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
end;
OnTouch_:
- warp "1@tower",136,12;
+ callfunc "F_Tower_Warp",
+ atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1,
+ strnpcinfo(4);
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("21FGate102tower", instance_id())+"::OnMyMobDead");
+ set .@map$, strnpcinfo(4);
+ set .@level, atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1;
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
initnpctimer;
- //SetItemPartyInMap in_102floor 22
- }
- else
- instance_announce -1, "Remaining Monsters on the 22nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ //SetItemPartyInMap in_102floor .@level
+ } else
+ mapannounce .@map$, "Remaining Monsters on the "+callsub(L_Display,.@level)+" Level - "+.@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce -1, "All Monsters on the 22nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("22FGate102tower", instance_id())+"::OnEnable";
+ set .@level, atoi(replacestr(strnpcinfo(0),"FGate102tower","")) + 1;
+ mapannounce strnpcinfo(4), "All Monsters on the "+callsub(L_Display,.@level)+" Level have been defeated.",bc_map,"0xffff00";
+ donpcevent instance_npcname(.@level+"FGate102tower")+"::OnEnable";
stopnpctimer;
end;
-}
-
-1@tower,96,51,0 script 22FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("22FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("22FGate102tower", instance_id());
- areamonster "1@tower",181,9,191,45,"Penomena",1216,15,instance_npcname("22FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,9,191,45,"Obeaune",1044,10,instance_npcname("22FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,9,191,45,"Marse",1144,10,instance_npcname("22FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,9,191,45,"Swordfish",1069,10,instance_npcname("22FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",181,9,191,45,"Hydra",1068,5,instance_npcname("22FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "1@tower",224,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("22FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 23
- }
- else
- instance_announce -1, "Remaining Monsters on the 23rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-OnTimer5000:
- instance_announce -1, "All Monsters on the 23rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("23FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
+L_Display:
+ // Display level properly.
+ set .@mod, getarg(0) % 10;
+ if (.@mod == 1 && getarg(0) != 11) return getarg(0)+"st";
+ else if (.@mod == 2 && getarg(0) != 12) return getarg(0)+"nd";
+ else if (.@mod == 3 && getarg(0) != 13) return getarg(0)+"rd";
+ else return getarg(0)+"th";
}
+1@tower,96,393,0 duplicate(1FGate102tower) 2FGate102tower 45,2,2
+1@tower,184,393,0 duplicate(1FGate102tower) 3FGate102tower 45,2,2
+1@tower,270,393,0 duplicate(1FGate102tower) 4FGate102tower 45,2,2
+1@tower,355,393,0 duplicate(1FGate102tower) 5FGate102tower 45,2,2
+1@tower,12,309,0 duplicate(1FGate102tower) 6FGate102tower 45,2,2
+1@tower,96,309,0 duplicate(1FGate102tower) 7FGate102tower 45,2,2
+1@tower,184,309,0 duplicate(1FGate102tower) 8FGate102tower 45,2,2
+1@tower,270,309,0 duplicate(1FGate102tower) 9FGate102tower 45,2,2
+1@tower,355,309,0 duplicate(1FGate102tower) 10FGate102tower 45,2,2
+1@tower,12,222,0 duplicate(1FGate102tower) 11FGate102tower 45,2,2
+1@tower,96,222,0 duplicate(1FGate102tower) 12FGate102tower 45,2,2
+1@tower,184,222,0 duplicate(1FGate102tower) 13FGate102tower 45,2,2
+1@tower,270,222,0 duplicate(1FGate102tower) 14FGate102tower 45,2,2
+1@tower,355,222,0 duplicate(1FGate102tower) 15FGate102tower 45,2,2
+1@tower,12,138,0 duplicate(1FGate102tower) 16FGate102tower 45,2,2
+1@tower,96,138,0 duplicate(1FGate102tower) 17FGate102tower 45,2,2
+1@tower,184,138,0 duplicate(1FGate102tower) 18FGate102tower 45,2,2
+1@tower,270,138,0 duplicate(1FGate102tower) 19FGate102tower 45,2,2
+1@tower,355,138,0 duplicate(1FGate102tower) 20FGate102tower 45,2,2
+1@tower,12,51,0 duplicate(1FGate102tower) 21FGate102tower 45,2,2
+1@tower,96,51,0 duplicate(1FGate102tower) 22FGate102tower 45,2,2
+1@tower,184,51,0 duplicate(1FGate102tower) 23FGate102tower 45,2,2
+1@tower,270,51,0 duplicate(1FGate102tower) 24FGate102tower 45,2,2
-1@tower,184,51,0 script 23FGate102tower 45,2,2,{
+1@tower,355,51,0 script 25FGate102tower 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname("23FGate102tower", instance_id());
+ disablenpc instance_npcname("25FGate102tower");
end;
OnEnable:
- enablenpc instance_npcname("23FGate102tower", instance_id());
- areamonster "1@tower",267,9,277,45,"Joker",1131,15,instance_npcname("23FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,9,277,45,"Carat",1267,15,instance_npcname("23FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",267,9,277,45,"Jakk",1130,10,instance_npcname("23FGate102tower", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("25FGate102tower");
+ initnpctimer;
end;
OnTouch_:
- warp "1@tower",310,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("23FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 24
- }
- else
- instance_announce -1, "Remaining Monsters on the 24th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ getitem 6000,1; //Dark_Ashes
+ warp instance_mapname("2@tower"),52,354;
end;
-OnTimer5000:
- instance_announce -1, "All Monsters on the 24th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("24FGate102tower", instance_id())+"::OnEnable";
+OnTimer120000:
+ disablenpc instance_npcname("25FGate102tower");
+ donpcevent instance_npcname("25FGate102tower-2")+"::OnEnable";
stopnpctimer;
end;
}
-1@tower,270,51,0 script 24FGate102tower 45,2,2,{
+1@tower,355,51,0 script 25FGate102tower-2 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname("24FGate102tower", instance_id());
+ disablenpc instance_npcname("25FGate102tower-2");
end;
OnEnable:
- enablenpc instance_npcname("24FGate102tower", instance_id());
- areamonster "1@tower",352,9,362,45,"Cat o' Nine Tails",1307,15,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,9,362,45,"Moonlight",1150,1,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "1@tower",352,9,362,45,"Nine Tail",1180,15,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("25FGate102tower-2");
end;
OnTouch_:
- warp "1@tower",395,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("1@tower",instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 25
- }
- else
- instance_announce -1, "Remaining Monsters on the 25th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 25th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("25FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
+ warp instance_mapname("2@tower"),52,354;
end;
}
-1@tower,355,51,0 script 25FGate102tower 45,2,2,{
+1@tower,71,4,0 script #Broadcast Mode1 844,{
end;
OnInstanceInit:
- disablenpc instance_npcname("25FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("25FGate102tower", instance_id());
initnpctimer;
end;
-OnTouch_:
- getitem 6000,1; //Dark_Ashes
- warp "2@tower",52,354;
+OnTimer15000:
+OnTimer60000:
+ mapannounce instance_mapname("1@tower"), "Notice : In any abnormal situation where you defeat a monster, you can't advance to the next level!",bc_map,"0xff0000";
end;
-
OnTimer120000:
- disablenpc instance_npcname("25FGate102tower", instance_id());
- donpcevent instance_npcname("25FGate102tower-2", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("1@tower"), "Notice : In any abnormal situation where you defeat a monster, you can't advance to the next level!",bc_map,"0xff0000";
stopnpctimer;
end;
}
-1@tower,355,51,0 script 25FGate102tower-2 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("25FGate102tower-2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("25FGate102tower-2", instance_id());
- end;
-
-OnTouch_:
- warp "2@tower",52,354;
- end;
-}
-
-/*
1@tower,71,1,0 script #Manager Mode1 844,{
+ callfunc "F_GM_NPC";
mes "Please enter the password.";
- input .@inputstr$;
+ set .@i, callfunc("F_GM_NPC","dmc2008",1);
next;
- if (.@inputstr$ == "dmc2008") {
+ if (.@i == 1) {
mes "This NPC manages the tower from the 1st to the 25th Level.";
mes "Please enter the Level number to open.";
mes "(i.g.: 1F->1, 25F->25)";
@@ -1459,13 +1394,12 @@ OnTouch_:
if (.@input < 1 || .@input > 25)
mes "You can only enter a number from 1 to 25.";
else {
- donpcevent instance_npcname(.@input+"FGate102tower", instance_id())+"::OnEnable";
+ donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
mes "*** Level "+ .@input + " is now being opened. ***";
}
}
close;
}
-*/
// Levels 26-50
//============================================================
@@ -1473,917 +1407,75 @@ OnTouch_:
end;
OnInstanceInit:
- areamonster "2@tower",9,351,19,387,"Gibbet",1503,10,instance_npcname("Immortal Furnace#1", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,351,19,387,"Enchanted Peach Tree",1410,10,instance_npcname("Immortal Furnace#1", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,351,19,387,"Wooden Golem",1497,10,instance_npcname("Immortal Furnace#1", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,351,19,387,"Stone Shooter",1495,10,instance_npcname("Immortal Furnace#1", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,351,19,387,"Elder Willow",1033,5,instance_npcname("Immortal Furnace#1", instance_id())+"::OnMyMobDead";
+ callfunc "F_Tower_Monster",
+ 26,
+ instance_mapname("2@tower"),
+ instance_npcname("Immortal Furnace#1")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("Immortal Furnace#1", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("2@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("Immortal Furnace#1")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
initnpctimer;
//SetItemPartyInMap in_102floor 26
}
else
- instance_announce -1, "Remaining Monsters on the 26th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 26th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("26FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,12,393,0 script 26FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("26FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("26FGate102tower", instance_id());
- areamonster "2@tower",93,351,103,387,"Goblin Archer",1258,10,instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,351,103,387,"Goblin",1122,10,instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,351,103,387,"Goblin",1123,5,instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,351,103,387,"Goblin",1124,5,instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,351,103,387,"Gobin",1125,5,instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,351,103,387,"Goblin",1126,5,instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",136,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("26FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 27
- }
- else
- instance_announce -1, "Remaining Monsters on the 27th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 27th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("27FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,96,393,0 script 27FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("27FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("27FGate102tower", instance_id());
- areamonster "2@tower",181,351,191,387,"Arclouse",1194,30,instance_npcname("27FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,351,191,387,"Neraid",1255,15,instance_npcname("27FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,351,191,387,"Pest",1256,15,instance_npcname("27FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,351,191,387,"Kukre",1070,10,instance_npcname("27FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",224,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("27FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 28
- }
- else
- instance_announce -1, "Remaining Monsters on the 28th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 28th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("28FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,184,393,0 script 28FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("28FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("28FGate102tower", instance_id());
- areamonster "2@tower",267,351,277,387,"Dark Frame",1260,10,instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,351,277,387,"The Paper",1375,10,instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,351,277,387,"Hylozoist",1510,10,instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,351,277,387,"Quve",1508,5,instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,351,277,387,"Lude",1509,5,instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,351,277,387,"Whisper",1179,10,instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",310,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("28FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 29
- }
- else
- instance_announce -1, "Remaining Monsters on the 29th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 29th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("29FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,270,393,0 script 29FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("29FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("29FGate102tower", instance_id());
- areamonster "2@tower",352,351,362,387,"White Lady",1630,1,instance_npcname("29FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,351,362,387,"Evil Nymph",1416,30,instance_npcname("29FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",395,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("29FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 30
- }
- else
- instance_announce -1, "Remaining Monsters on the 30th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 30th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("30FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,355,393,0 script 30FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("30FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("30FGate102tower", instance_id());
- areamonster "2@tower",9,267,19,303,"Gig",1387,20,instance_npcname("30FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,267,19,303,"Iron Fist",1212,15,instance_npcname("30FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,267,19,303,"Argiope",1099,10,instance_npcname("30FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,267,19,303,"Scorpion",1001,5,instance_npcname("30FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",52,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("30FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 31
- }
- else
- instance_announce -1, "Remaining Monsters on the 31st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 31st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("31FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,12,309,0 script 31FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("31FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("31FGate102tower", instance_id());
- areamonster "2@tower",93,267,103,303,"Goblin Leader",1299,1,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,267,103,303,"Goblin Archer",1258,10,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,267,103,303,"Goblin",1122,10,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,267,103,303,"Goblin",1123,5,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,267,103,303,"Goblin",1124,5,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,267,103,303,"Goblin",1125,5,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,267,103,303,"Goblin",1126,5,instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",136,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("31FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 32
- }
- else
- instance_announce -1, "Remaining Monsters on the 32nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 32nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("32FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,96,309,0 script 32FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("32FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("32FGate102tower", instance_id());
- areamonster "2@tower",181,267,191,303,"Kobold Leader",1296,1,instance_npcname("32FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,267,191,303,"Kobold",1133,15,instance_npcname("32FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,267,191,303,"Kobold_Archer",1282,15,instance_npcname("32FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,267,191,303,"Kobold",1134,10,instance_npcname("32FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,267,191,303,"Kobold",1135,5,instance_npcname("32FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",224,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("32FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 33
- }
- else
- instance_announce -1, "Remaining Monsters on the 33rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 33rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("33FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,184,309,0 script 33FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("33FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("33FGate102tower", instance_id());
- areamonster "2@tower",267,267,277,303,"Flame Skull",1869,20,instance_npcname("33FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,267,277,303,"Whisper",1179,10,instance_npcname("33FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,267,277,303,"Giant Whisper",1186,10,instance_npcname("33FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",310,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("33FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 34
- }
- else
- instance_announce -1, "Remaining Monsters on the 34th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 34th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("34FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,270,309,0 script 34FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("34FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("34FGate102tower", instance_id());
- areamonster "2@tower",352,267,362,303,"Turtle General",1312,1,instance_npcname("34FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,267,362,303,"Freezer",1319,10,instance_npcname("34FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,267,362,303,"Solider",1316,10,instance_npcname("34FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,267,362,303,"Heater",1318,10,instance_npcname("34FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,267,362,303,"Permeter",1314,10,instance_npcname("34FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",395,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("34FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 35
- }
- else
- instance_announce -1, "Remaining Monsters on the 35th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 35th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("35FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,355,309,0 script 35FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("35FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("35FGate102tower", instance_id());
- areamonster "2@tower",9,180,19,216,"Anolian",1206,30,instance_npcname("35FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,180,19,216,"Grove",1687,10,instance_npcname("35FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,180,19,216,"Alligator",1271,10,instance_npcname("35FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",52,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("35FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 36
- }
- else
- instance_announce -1, "Remaining Monsters on the 36th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 36th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("36FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,12,222,0 script 36FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("36FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("36FGate102tower", instance_id());
- areamonster "2@tower",93,180,103,216,"Clock Tower Manager",1270,10,instance_npcname("36FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,180,103,216,"Clock",1269,10,instance_npcname("36FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,180,103,216,"Alarm",1193,30,instance_npcname("36FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",136,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("36FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 37
- }
- else
- instance_announce -1, "Remaining Monsters on the 37th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 37th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("37FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,96,222,0 script 37FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("37FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("37FGate102tower", instance_id());
- areamonster "2@tower",181,180,191,216,"Death Word",1698,25,instance_npcname("37FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,180,191,216,"Rideword",1195,25,instance_npcname("37FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",224,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("37FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 38
- }
- else
- instance_announce -1, "Remaining Monsters on the 38th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 38th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("38FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,184,222,0 script 38FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("38FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("38FGate102tower", instance_id());
- areamonster "2@tower",267,180,277,216,"Evil Nymph",1416,10,instance_npcname("38FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,180,277,216,"Mao Gui",1513,10,instance_npcname("38FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,180,277,216,"Taoist Hermit",1412,10,instance_npcname("38FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,180,277,216,"Zhu Po Long",1514,10,instance_npcname("38FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,180,277,216,"Jin Guai",1517,5,instance_npcname("38FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",310,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("38FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 39
- }
- else
- instance_announce -1, "Remaining Monsters on the 39th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 39th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("39FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,270,222,0 script 39FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("39FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("39FGate102tower", instance_id());
- areamonster "2@tower",352,180,362,216,"Samurai Specter",1492,1,instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,180,362,216,"Shinobi",1401,10,instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,180,362,216,"Tengu",1405,10,instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,180,362,216,"Firelock Soldier",1403,5,instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,180,362,216,"Miyabi Doll",1404,10,instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,180,362,216,"Karakasa",1400,5,instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",395,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("39FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 40
- }
- else
- instance_announce -1, "Remaining Monsters on the 40th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 40th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("40FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,355,222,0 script 40FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("40FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("40FGate102tower", instance_id());
- areamonster "2@tower",9,96,19,132,"Kraben",1587,50,instance_npcname("40FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",52,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("40FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 41
- }
- else
- instance_announce -1, "Remaining Monsters on the 41st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 41st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("41FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,12,138,0 script 41FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("41FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("41FGate102tower", instance_id());
- areamonster "2@tower",93,96,103,132,"Sleeper",1386,20,instance_npcname("41FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,96,103,132,"Sting",1207,10,instance_npcname("41FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,96,103,132,"Mi Gao",1516,10,instance_npcname("41FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,96,103,132,"Sandman",1165,5,instance_npcname("41FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,96,103,132,"Hode",1127,5,instance_npcname("41FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",136,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("41FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 42
- }
- else
- instance_announce -1, "Remaining Monsters on the 42nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 42nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("42FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,96,138,0 script 42FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("42FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("42FGate102tower", instance_id());
- areamonster "2@tower",181,96,191,132,"Medusa",1148,10,instance_npcname("42FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,96,191,132,"Sidewinder",1037,40,instance_npcname("42FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,96,191,132,"Anacondaq",1030,5,instance_npcname("42FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,96,191,132,"Boa",1025,5,instance_npcname("42FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",224,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("42FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 43
- }
- else
- instance_announce -1, "Remaining Monsters on the 43rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 43rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("43FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,184,138,0 script 43FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("43FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("43FGate102tower", instance_id());
- areamonster "2@tower",267,96,277,132,"Hatii Baby",1515,20,instance_npcname("43FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,96,277,132,"Baphomet Jr.",1101,20,instance_npcname("43FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,96,277,132,"Orc Baby",1686,1,instance_npcname("43FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,96,277,132,"Baby Desert Wolf",1107,10,instance_npcname("43FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,96,277,132,"Savage Babe",1167,10,instance_npcname("43FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",310,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("43FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 44
- }
- else
- instance_announce -1, "Remaining Monsters on the 44th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 44th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("44FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,270,138,0 script 44FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("44FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("44FGate102tower", instance_id());
- areamonster "2@tower",352,96,362,132,"Osiris",1038,1,instance_npcname("44FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,96,362,132,"Ancient Mummy",1297,15,instance_npcname("44FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,96,362,132,"Verit",1032,15,instance_npcname("44FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,96,362,132,"Mummy",1041,20,instance_npcname("44FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",395,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("44FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 45
- }
- else
- instance_announce -1, "Remaining Monsters on the 45th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 45th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("45FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,355,138,0 script 45FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("45FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("45FGate102tower", instance_id());
- areamonster "2@tower",9,9,19,45,"Seeker",1774,20,instance_npcname("45FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",9,9,19,45,"Beholder",1633,20,instance_npcname("45FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",52,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("45FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 46
- }
- else
- instance_announce -1, "Remaining Monsters on the 46th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 46th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("46FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,12,51,0 script 46FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("46FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("46FGate102tower", instance_id());
- areamonster "2@tower",93,9,103,45,"Deleter",1384,20,instance_npcname("46FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,9,103,45,"Deleter",1385,10,instance_npcname("46FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,9,103,45,"Petite",1156,10,instance_npcname("46FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",93,9,103,45,"Petite",1155,10,instance_npcname("46FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",136,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("46FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 47
- }
- else
- instance_announce -1, "Remaining Monsters on the 47 Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 47th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("47FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,96,51,0 script 47FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("47FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("47FGate102tower", instance_id());
- areamonster "2@tower",181,9,191,45,"Ancient Worm",1305,10,instance_npcname("47FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,9,191,45,"Ancient Mummy",1297,10,instance_npcname("47FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",181,9,191,45,"Ancient Mimic",1699,10,instance_npcname("47FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",224,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("47FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 48
- }
- else
- instance_announce -1, "Remaining Monsters on the 48th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ mapannounce .@map$, "Remaining Monsters on the 26th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce -1, "All Monsters on the 48th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("48FGate102tower", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("2@tower"), "All Monsters on the 26th Level have been defeated.",bc_map,"0xffff00";
+ donpcevent instance_npcname("26FGate102tower")+"::OnEnable";
stopnpctimer;
end;
}
-2@tower,184,51,0 script 48FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("48FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("48FGate102tower", instance_id());
- areamonster "2@tower",267,9,277,45,"Grizzly",1381,20,instance_npcname("48FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,9,277,45,"Leib Olmai",1306,7,instance_npcname("48FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,9,277,45,"Zipper Bear",1417,5,instance_npcname("48FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,9,277,45,"Sasquatch",1243,5,instance_npcname("48FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",267,9,277,45,"Bigfoot",1060,5,instance_npcname("48FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",310,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("48FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 49
- }
- else
- instance_announce -1, "Remaining Monsters on the 49th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 49th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("49FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-2@tower,270,51,0 script 49FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("49FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("49FGate102tower", instance_id());
- areamonster "2@tower",352,9,362,45,"Pharaoh",1157,1,instance_npcname("49FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,9,362,45,"Amon Ra",1511,1,instance_npcname("49FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,9,362,45,"Anubis",1098,10,instance_npcname("49FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,9,362,45,"Marduk",1140,10,instance_npcname("49FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "2@tower",352,9,362,45,"Matyr",1146,10,instance_npcname("49FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "2@tower",395,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@tower",instance_npcname("49FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 50
- }
- else
- instance_announce -1, "Remaining Monsters on the 50th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 50th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("50FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
+2@tower,12,393,0 duplicate(1FGate102tower) 26FGate102tower 45,2,2
+2@tower,96,393,0 duplicate(1FGate102tower) 27FGate102tower 45,2,2
+2@tower,184,393,0 duplicate(1FGate102tower) 28FGate102tower 45,2,2
+2@tower,270,393,0 duplicate(1FGate102tower) 29FGate102tower 45,2,2
+2@tower,355,393,0 duplicate(1FGate102tower) 30FGate102tower 45,2,2
+2@tower,12,309,0 duplicate(1FGate102tower) 31FGate102tower 45,2,2
+2@tower,96,309,0 duplicate(1FGate102tower) 32FGate102tower 45,2,2
+2@tower,184,309,0 duplicate(1FGate102tower) 33FGate102tower 45,2,2
+2@tower,270,309,0 duplicate(1FGate102tower) 34FGate102tower 45,2,2
+2@tower,355,309,0 duplicate(1FGate102tower) 35FGate102tower 45,2,2
+2@tower,12,222,0 duplicate(1FGate102tower) 36FGate102tower 45,2,2
+2@tower,96,222,0 duplicate(1FGate102tower) 37FGate102tower 45,2,2
+2@tower,184,222,0 duplicate(1FGate102tower) 38FGate102tower 45,2,2
+2@tower,270,222,0 duplicate(1FGate102tower) 39FGate102tower 45,2,2
+2@tower,355,222,0 duplicate(1FGate102tower) 40FGate102tower 45,2,2
+2@tower,12,138,0 duplicate(1FGate102tower) 41FGate102tower 45,2,2
+2@tower,96,138,0 duplicate(1FGate102tower) 42FGate102tower 45,2,2
+2@tower,184,138,0 duplicate(1FGate102tower) 43FGate102tower 45,2,2
+2@tower,270,138,0 duplicate(1FGate102tower) 44FGate102tower 45,2,2
+2@tower,355,138,0 duplicate(1FGate102tower) 45FGate102tower 45,2,2
+2@tower,12,51,0 duplicate(1FGate102tower) 46FGate102tower 45,2,2
+2@tower,96,51,0 duplicate(1FGate102tower) 47FGate102tower 45,2,2
+2@tower,184,51,0 duplicate(1FGate102tower) 48FGate102tower 45,2,2
+2@tower,270,51,0 duplicate(1FGate102tower) 49FGate102tower 45,2,2
2@tower,355,51,0 script 50FGate102tower 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname("50FGate102tower", instance_id());
+ disablenpc instance_npcname("50FGate102tower");
end;
OnEnable:
- enablenpc instance_npcname("50FGate102tower", instance_id());
+ enablenpc instance_npcname("50FGate102tower");
initnpctimer;
end;
OnTouch_:
getitem 6000,1; //Dark_Ashes
- warp "3@tower",52,354;
+ warp instance_mapname("3@tower"),52,354;
end;
OnTimer120000:
- disablenpc instance_npcname("50FGate102tower", instance_id());
- donpcevent instance_npcname("50FGate102tower-2", instance_id())+"::OnEnable";
+ disablenpc instance_npcname("50FGate102tower");
+ donpcevent instance_npcname("50FGate102tower-2")+"::OnEnable";
stopnpctimer;
end;
}
@@ -2392,24 +1484,24 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("50FGate102tower-2", instance_id());
+ disablenpc instance_npcname("50FGate102tower-2");
end;
OnEnable:
- enablenpc instance_npcname("50FGate102tower-2", instance_id());
+ enablenpc instance_npcname("50FGate102tower-2");
end;
OnTouch_:
- warp "3@tower",52,354;
+ warp instance_mapname("3@tower"),52,354;
end;
}
-/*
2@tower,71,1,0 script #Manager Mode2 844,{
+ callfunc "F_GM_NPC";
mes "Please enter the password.";
- input .@inputstr$;
+ set .@i, callfunc("F_GM_NPC","dmc2008",1);
next;
- if (.@inputstr$ == "dmc2008") {
+ if (.@i == 1) {
mes "This NPC manages the tower from the 26st to the 50th Level.";
mes "Please enter the Level number to open.";
mes "(i.g.: 26F->26, 50F->50)";
@@ -2418,13 +1510,12 @@ OnTouch_:
if (.@onput < 26 || .@input > 50)
mes "You can only enter a number from 26 to 50.";
else {
- donpcevent instance_npcname(.@input+"FGate102tower", instance_id())+"::OnEnable";
+ donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
mes "*** Level "+ .@input + " is now being opened. ***";
}
}
close;
}
-*/
// Levels 51-75
//============================================================
@@ -2432,929 +1523,75 @@ OnTouch_:
end;
OnInstanceInit:
- areamonster "3@tower",9,351,19,387,"Mini Demon",1292,20,instance_npcname("Immortal Furnace#2", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,351,19,387,"Diabolic",1382,20,instance_npcname("Immortal Furnace#2", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,351,19,387,"Deviruchi",1109,10,instance_npcname("Immortal Furnace#2", instance_id())+"::OnMyMobDead";
+ callfunc "F_Tower_Monster",
+ 51,
+ instance_mapname("3@tower"),
+ instance_npcname("Immortal Furnace#2")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("Immortal Furnace#2", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("3@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("Immortal Furnace#2")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
initnpctimer;
//SetItemPartyInMap in_102floor 51
}
else
- instance_announce -1, "Remaining Monsters on the 51st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 51st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("51FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,12,393,0 script 51FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("51FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("51FGate102tower", instance_id());
- areamonster "3@tower",93,351,103,387,"Harpy",1376,20,instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,351,103,387,"Grand Peco",1369,10,instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,351,103,387,"Bloody Butterfly",1408,10,instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,351,103,387,"Gargoyle",1253,10,instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,351,103,387,"Hill Wind",1680,5,instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,351,103,387,"Hill Wind",1629,5,instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",136,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("51FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 52
- }
- else
- instance_announce -1, "Remaining Monsters on the 52nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 52nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("52FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,96,393,0 script 52FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("52FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("52FGate102tower", instance_id());
- areamonster "3@tower",181,351,191,387,"Assaulter",1315,25,instance_npcname("52FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,351,191,387,"Shinobi",1401,30,instance_npcname("52FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",224,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("52FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 53
- }
- else
- instance_announce -1, "Remaining Monsters on the 53rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 53rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("53FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,184,393,0 script 53FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("53FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("53FGate102tower", instance_id());
- areamonster "3@tower",267,351,277,387,"Chepet",1250,10,instance_npcname("53FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,351,277,387,"Mariontte",1143,10,instance_npcname("53FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,351,277,387,"Miyabi Doll",1404,10,instance_npcname("53FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",310,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("53FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 54
- }
- else
- instance_announce -1, "Remaining Monsters on the 54th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 54th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("54FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,270,393,0 script 54FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("54FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("54FGate102tower", instance_id());
- areamonster "3@tower",352,351,362,387,"Medusa",1148,25,instance_npcname("54FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,351,362,387,"Evil Snake Lord",1418,1,instance_npcname("54FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,351,362,387,"Isis",1029,15,instance_npcname("54FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,351,362,387,"Sidewinder",1037,15,instance_npcname("54FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",395,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("54FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 55
- }
- else
- instance_announce -1, "Remaining Monsters on the 55th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 55th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("55FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,355,393,0 script 55FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("55FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("55FGate102tower", instance_id());
- areamonster "3@tower",9,267,19,303,"Freezer",1319,10,instance_npcname("55FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,267,19,303,"Hatii Baby",1515,10,instance_npcname("55FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,267,19,303,"Ice Titan",1777,15,instance_npcname("55FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,267,19,303,"Snowier",1775,10,instance_npcname("55FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,267,19,303,"Gazeti",1778,10,instance_npcname("55FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",52,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("55FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 56
- }
- else
- instance_announce -1, "Remaining Monsters on the 56th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 56th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("56FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,12,309,0 script 56FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("56FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("56FGate102tower", instance_id());
- areamonster "3@tower",93,267,103,303,"Arc Angeling",1388,1,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Deviling",1582,1,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Angeling",1096,1,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Ghostring",1120,1,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Mastering",1090,1,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Metaling",1613,25,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Marin",1242,5,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Poporing",1031,5,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,267,103,303,"Drops",1113,5,instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",136,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("56FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 57
- }
- else
- instance_announce -1, "Remaining Monsters on the 57th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 57th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("57FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,96,309,0 script 57FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("57FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("57FGate102tower", instance_id());
- areamonster "3@tower",181,267,191,303,"Phendark",1202,20,instance_npcname("57FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,267,191,303,"Rybio",1201,10,instance_npcname("57FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,267,191,303,"Zombie Prisoner",1197,10,instance_npcname("57FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,267,191,303,"Skeleton Prisoner",1196,5,instance_npcname("57FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,267,191,303,"Injustice",1257,5,instance_npcname("57FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",224,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("57FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 58
- }
- else
- instance_announce -1, "Remaining Monsters on the 58th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 58th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("58FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,184,309,0 script 58FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("58FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("58FGate102tower", instance_id());
- areamonster "3@tower",267,267,277,303,"Ancient Mimic",1699,30,instance_npcname("58FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,267,277,303,"Mimic",1191,20,instance_npcname("58FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,267,277,303,"Mystcase",1249,10,instance_npcname("58FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",310,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("58FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 59
- }
- else
- instance_announce -1, "Remaining Monsters on the 59th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 59th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("59FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,270,309,0 script 59FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("59FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("59FGate102tower", instance_id());
- areamonster "3@tower",352,267,362,303,"Egnigem Cenia",1658,1,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Doppelganger",1046,1,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Armeyer Dinze",1654,10,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Wickebine Tres",1653,10,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Laurell Winder",1657,10,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Kavach Icarus",1656,10,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Errende Ebecee",1655,10,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,267,362,303,"Egnigem Cenia",1652,10,instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",395,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("59FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 60
- }
- else
- instance_announce -1, "Remaining Monsters on the 60th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 60th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("60FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,355,309,0 script 60FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("60FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("60FGate102tower", instance_id());
- areamonster "3@tower",9,180,19,216,"Agav",1769,10,instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,180,19,216,"Echio",1770,10,instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,180,19,216,"Isilla",1772,5,instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,180,19,216,"Mobster",1313,10,instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,180,19,216,"Pasana",1154,10,instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,180,19,216,"Vanberk",1771,5,instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",52,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("60FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 61
- }
- else
- instance_announce -1, "Remaining Monsters on the 61st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 61st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("61FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,12,222,0 script 61FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("61FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("61FGate102tower", instance_id());
- areamonster "3@tower",93,180,103,216,"Wanderer",1208,35,instance_npcname("61FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",136,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("61FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 62
- }
- else
- instance_announce -1, "Remaining Monsters on the 62nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 62nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("62FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,96,222,0 script 62FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("62FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("62FGate102tower", instance_id());
- areamonster "3@tower",181,180,191,216,"Ragged Zombie",1865,20,instance_npcname("62FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,180,191,216,"Zombie Master",1298,10,instance_npcname("62FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,180,191,216,"Zombie Prisoner",1197,5,instance_npcname("62FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,180,191,216,"Orc Zombie",1153,5,instance_npcname("62FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,180,191,216,"Zombie",1015,5,instance_npcname("62FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",224,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("62FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 63
- }
- else
- instance_announce -1, "Remaining Monsters on the 63rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 63rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("63FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,184,222,0 script 63FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("63FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("63FGate102tower", instance_id());
- areamonster "3@tower",267,180,277,216,"Ungoliant",1618,30,instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,180,277,216,"Ancient Worm",1305,2,instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,180,277,216,"Caterpillar",1300,2,instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,180,277,216,"Creamy Fear",1293,2,instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,180,277,216,"Killer Mantis",1294,2,instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,180,277,216,"Giant Hornet",1303,2,instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",310,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("63FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 64
- }
- else
- instance_announce -1, "Remaining Monsters on the 64th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 64th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("64FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,270,222,0 script 64FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("64FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("64FGate102tower", instance_id());
- areamonster "3@tower",352,180,362,216,"Atros",1785,1,instance_npcname("64FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,180,362,216,"Galion",1783,20,instance_npcname("64FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",395,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("64FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 65
- }
- else
- instance_announce -1, "Remaining Monsters on the 65th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ mapannounce .@map$, "Remaining Monsters on the 51st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce -1, "All Monsters on the 65th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("65FGate102tower", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("3@tower"), "All Monsters on the 51st Level have been defeated.",bc_map,"0xffff00";
+ donpcevent instance_npcname("51FGate102tower")+"::OnEnable";
stopnpctimer;
end;
}
-3@tower,355,222,0 script 65FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("65FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("65FGate102tower", instance_id());
- areamonster "3@tower",9,96,19,132,"Incubus",1374,20,instance_npcname("65FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,96,19,132,"Aliot",1736,20,instance_npcname("65FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,96,19,132,"Injustice",1257,10,instance_npcname("65FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",52,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("65FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 66
- }
- else
- instance_announce -1, "Remaining Monsters on the 66th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 66th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("66FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,12,138,0 script 66FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("66FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("66FGate102tower", instance_id());
- areamonster "3@tower",93,96,103,132,"Acidus",1716,10,instance_npcname("66FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,96,103,132,"Acidus",1713,10,instance_npcname("66FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,96,103,132,"Deleter",1384,5,instance_npcname("66FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,96,103,132,"Mutant Dragonoid",1262,10,instance_npcname("66FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,96,103,132,"Petite",1156,5,instance_npcname("66FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",136,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("66FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 67
- }
- else
- instance_announce -1, "Remaining Monsters on the 67th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 67th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("67FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,96,138,0 script 67FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("67FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("67FGate102tower", instance_id());
- areamonster "3@tower",181,96,191,132,"Lava Golem",1366,10,instance_npcname("67FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,96,191,132,"Stalactic Golem",1278,10,instance_npcname("67FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,96,191,132,"Ice Titan",1777,10,instance_npcname("67FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,96,191,132,"Wooden Golem",1497,5,instance_npcname("67FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,96,191,132,"Golem",1040,5,instance_npcname("67FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",224,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("67FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 68
- }
- else
- instance_announce -1, "Remaining Monsters on the 68th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 68th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("68FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,184,138,0 script 68FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("68FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("68FGate102tower", instance_id());
- areamonster "3@tower",267,96,277,132,"Dame of Sentinel",1700,20,instance_npcname("68FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,96,277,132,"Mistress of Shelter",1701,10,instance_npcname("68FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,96,277,132,"Baroness of Retribution",1702,10,instance_npcname("68FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,96,277,132,"Lady Solace",1703,10,instance_npcname("68FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,96,277,132,"False Angel",1371,10,instance_npcname("68FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",310,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("68FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 69
- }
- else
- instance_announce -1, "Remaining Monsters on the 69th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 69th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("69FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,270,138,0 script 69FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("69FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("69FGate102tower", instance_id());
- areamonster "3@tower",352,96,362,132,"Orc Hero",1087,1,instance_npcname("69FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,96,362,132,"Orc Lord",1190,1,instance_npcname("69FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,96,362,132,"Orc Baby",1686,20,instance_npcname("69FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",395,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("69FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 70
- }
- else
- instance_announce -1, "Remaining Monsters on the 70th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 70th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("70FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,355,138,0 script 70FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("70FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("70FGate102tower", instance_id());
- areamonster "3@tower",9,9,19,45,"Succubus",1370,20,instance_npcname("70FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,9,19,45,"Nightmare Terror",1379,20,instance_npcname("70FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,9,19,45,"Incubus",1374,20,instance_npcname("70FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",9,9,19,45,"Nightmare",1061,5,instance_npcname("70FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",52,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("70FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 71
- }
- else
- instance_announce -1, "Remaining Monsters on the 71st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 71st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("71FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,12,51,0 script 71FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("71FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("71FGate102tower", instance_id());
- areamonster "3@tower",93,9,103,45,"Margaretha Sorin",1637,10,instance_npcname("71FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,9,103,45,"Permeter",1314,10,instance_npcname("71FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,9,103,45,"Errende Ebecee",1655,10,instance_npcname("71FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",93,9,103,45,"Enchanted Peach Tree",1410,10,instance_npcname("71FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",136,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("71FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 72
- }
- else
- instance_announce -1, "Remaining Monsters on the 72nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 72nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("72FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,96,51,0 script 72FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("72FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("72FGate102tower", instance_id());
- areamonster "3@tower",181,9,191,45,"Succubus",1370,10,instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,9,191,45,"Loli Ruri",1505,20,instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,9,191,45,"Aliza",1737,10,instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,9,191,45,"Zealotus",1200,5,instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,9,191,45,"Alice",1275,5,instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",181,9,191,45,"Green Maiden",1631,10,instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",224,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("72FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 73
- }
- else
- instance_announce -1, "Remaining Monsters on the 73rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 73rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("73FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,184,51,0 script 73FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("73FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("73FGate102tower", instance_id());
- areamonster "3@tower",267,9,277,45,"Dimik",1671,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Dimik",1673,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Dimik",1672,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Venatu",1677,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Dimik",1670,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Archdam",1668,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Venatu",1678,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Venatu",1679,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",267,9,277,45,"Venatu",1676,6,instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",310,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("73FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 74
- }
- else
- instance_announce -1, "Remaining Monsters on the 74th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 74th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("74FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-3@tower,270,51,0 script 74FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("74FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("74FGate102tower", instance_id());
- areamonster "3@tower",352,9,362,45,"Baphomet",1039,1,instance_npcname("74FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,9,362,45,"Dark Lord",1272,1,instance_npcname("74FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,9,362,45,"Baphomet Jr.",1101,20,instance_npcname("74FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "3@tower",352,9,362,45,"Dark Illusion",1302,10,instance_npcname("74FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "3@tower",395,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("3@tower",instance_npcname("74FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 75
- }
- else
- instance_announce -1, "Remaining Monsters on the 75th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1, "All Monsters on the 75th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("75FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
+3@tower,12,393,0 duplicate(1FGate102tower) 51FGate102tower 45,2,2
+3@tower,96,393,0 duplicate(1FGate102tower) 52FGate102tower 45,2,2
+3@tower,184,393,0 duplicate(1FGate102tower) 53FGate102tower 45,2,2
+3@tower,270,393,0 duplicate(1FGate102tower) 54FGate102tower 45,2,2
+3@tower,355,393,0 duplicate(1FGate102tower) 55FGate102tower 45,2,2
+3@tower,12,309,0 duplicate(1FGate102tower) 56FGate102tower 45,2,2
+3@tower,96,309,0 duplicate(1FGate102tower) 57FGate102tower 45,2,2
+3@tower,184,309,0 duplicate(1FGate102tower) 58FGate102tower 45,2,2
+3@tower,270,309,0 duplicate(1FGate102tower) 59FGate102tower 45,2,2
+3@tower,355,309,0 duplicate(1FGate102tower) 60FGate102tower 45,2,2
+3@tower,12,222,0 duplicate(1FGate102tower) 61FGate102tower 45,2,2
+3@tower,96,222,0 duplicate(1FGate102tower) 62FGate102tower 45,2,2
+3@tower,184,222,0 duplicate(1FGate102tower) 63FGate102tower 45,2,2
+3@tower,270,222,0 duplicate(1FGate102tower) 64FGate102tower 45,2,2
+3@tower,355,222,0 duplicate(1FGate102tower) 65FGate102tower 45,2,2
+3@tower,12,138,0 duplicate(1FGate102tower) 66FGate102tower 45,2,2
+3@tower,96,138,0 duplicate(1FGate102tower) 67FGate102tower 45,2,2
+3@tower,184,138,0 duplicate(1FGate102tower) 68FGate102tower 45,2,2
+3@tower,270,138,0 duplicate(1FGate102tower) 69FGate102tower 45,2,2
+3@tower,355,138,0 duplicate(1FGate102tower) 70FGate102tower 45,2,2
+3@tower,12,51,0 duplicate(1FGate102tower) 71FGate102tower 45,2,2
+3@tower,96,51,0 duplicate(1FGate102tower) 72FGate102tower 45,2,2
+3@tower,184,51,0 duplicate(1FGate102tower) 73FGate102tower 45,2,2
+3@tower,270,51,0 duplicate(1FGate102tower) 74FGate102tower 45,2,2
3@tower,355,51,0 script 75FGate102tower 45,1,1,{
end;
OnInstanceInit:
- disablenpc instance_npcname("75FGate102tower", instance_id());
+ disablenpc instance_npcname("75FGate102tower");
end;
OnEnable:
- enablenpc instance_npcname("75FGate102tower", instance_id());
+ enablenpc instance_npcname("75FGate102tower");
initnpctimer;
end;
OnTouch_:
getitem 6000,1; //Dark_Ashes
- warp "4@tower",52,354;
+ warp instance_mapname("4@tower"),52,354;
end;
OnTimer120000:
- disablenpc instance_npcname("75FGate102tower", instance_id());
- donpcevent instance_npcname("75FGate102tower-2", instance_id())+"::OnEnable";
+ disablenpc instance_npcname("75FGate102tower");
+ donpcevent instance_npcname("75FGate102tower-2")+"::OnEnable";
stopnpctimer;
end;
}
@@ -3363,24 +1600,24 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("75FGate102tower-2", instance_id());
+ disablenpc instance_npcname("75FGate102tower-2");
end;
OnEnable:
- enablenpc instance_npcname("75FGate102tower-2", instance_id());
+ enablenpc instance_npcname("75FGate102tower-2");
end;
OnTouch_:
- warp "4@tower",52,354;
+ warp instance_mapname("4@tower"),52,354;
end;
}
-/*
3@tower,71,1,0 script #Manager Mode3 844,{
+ callfunc "F_GM_NPC";
mes "Please enter the password.";
- input .@inputstr$;
+ set .@i, callfunc("F_GM_NPC","dmc2008",1);
next;
- if (.@inputstr$ == "dmc2008") {
+ if (.@i == 1) {
mes "This NPC manages the tower from the 51st to the 75th Level.";
mes "Please enter the Level number to open.";
mes "(i.g.: 51F->51, 75F->75)";
@@ -3389,13 +1626,12 @@ OnTouch_:
if (.@input < 51 || .@input > 75)
mes "You can only enter a number from 51 to 75.";
else {
- donpcevent instance_npcname(.@input+"FGate102tower", instance_id())+"::OnEnable";
+ donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
mes "*** Level "+ .@input + " is now being opened. ***";
}
}
close;
}
-*/
// Levels 76-99
//============================================================
@@ -3403,935 +1639,74 @@ OnTouch_:
end;
OnInstanceInit:
- areamonster "4@tower",9,351,19,387,"Abysmal Knight",1219,30,instance_npcname("Immortal Furnace#3", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,351,19,387,"Nightmare Terror",1379,20,instance_npcname("Immortal Furnace#3", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,351,19,387,"Nightmare",1061,10,instance_npcname("Immortal Furnace#3", instance_id())+"::OnMyMobDead";
+ callfunc "F_Tower_Monster",
+ 76,
+ instance_mapname("4@tower"),
+ instance_npcname("Immortal Furnace#3")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("Immortal Furnace#3", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("4@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("Immortal Furnace#3")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
initnpctimer;
//SetItemPartyInMap in_102floor 76
}
else
- instance_announce -1,"Remaining Monsters on the 76th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 76th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("76FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,12,393,0 script 76FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("76FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("76FGate102tower", instance_id());
- areamonster "4@tower",93,351,103,387,"Banshee",1867,30,instance_npcname("76FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,351,103,387,"Wraith Dead",1291,10,instance_npcname("76FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,351,103,387,"Evil Druid",1117,10,instance_npcname("76FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,351,103,387,"Wraith",1192,10,instance_npcname("76FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,351,103,387,"Wind Ghost",1263,10,instance_npcname("76FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",136,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("76FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 77
- }
- else
- instance_announce -1,"Remaining Monsters on the 77th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 77th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("77FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,96,393,0 script 77FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("77FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("77FGate102tower", instance_id());
- areamonster "4@tower",181,351,191,387,"Sword Master",1829,5,instance_npcname("77FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,351,191,387,"Bloody Knight",1268,10,instance_npcname("77FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,351,191,387,"Abysmal Knight",1219,5,instance_npcname("77FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,351,191,387,"Dullahan",1504,10,instance_npcname("77FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,351,191,387,"Raydric",1163,20,instance_npcname("77FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",224,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("77FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 78
- }
- else
- instance_announce -1,"Remaining Monsters on the 78th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the Level 78th have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("78FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,184,393,0 script 78FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("78FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("78FGate102tower", instance_id());
- areamonster "4@tower",267,351,277,387,"Hydro",1720,10,instance_npcname("78FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,351,277,387,"Ferus",1714,10,instance_npcname("78FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,351,277,387,"Ferus",1717,10,instance_npcname("78FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,351,277,387,"Deleter",1385,5,instance_npcname("78FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,351,277,387,"Petite",1155,5,instance_npcname("78FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",310,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("78FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 79
- }
- else
- instance_announce -1,"Remaining Monsters on the 79th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
+ mapannounce .@map$,"Remaining Monsters on the 76th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
end;
OnTimer5000:
- instance_announce -1,"All Monsters on the 79th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("79FGate102tower", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("4@tower"),"All Monsters on the 76th Level have been defeated.",bc_map,"0xffff00";
+ donpcevent instance_npcname("76FGate102tower")+"::OnEnable";
stopnpctimer;
end;
}
-4@tower,270,393,0 script 79FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("79FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("79FGate102tower", instance_id());
- areamonster "4@tower",352,351,362,387,"Falling Bishop",1871,1,instance_npcname("79FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,351,362,387,"Necromancer",1870,15,instance_npcname("79FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",395,354;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("79FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 80
- }
- else
- instance_announce -1,"Remaining Monsters on the 80th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 80th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("80FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,355,393,0 script 80FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("80FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("80FGate102tower", instance_id());
- areamonster "4@tower",9,267,19,303,"Mysteltainn",1203,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,267,19,303,"Ogretooth",1204,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,267,19,303,"Executioner",1205,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",52,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 81
- }
- else
- instance_announce -1,"Remaining Monsters on the 81st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 81st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("81FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,12,309,0 script 81FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("81FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("81FGate102tower", instance_id());
- areamonster "4@tower",93,267,103,303,"Bloody Knight",1268,10,instance_npcname("81FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,267,103,303,"Agav",1769,10,instance_npcname("81FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,267,103,303,"Bloody Murderer",1507,10,instance_npcname("81FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,267,103,303,"Skogul",1752,10,instance_npcname("81FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,267,103,303,"Injustice",1257,10,instance_npcname("81FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",136,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("81FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 82
- }
- else
- instance_announce -1,"Remaining Monsters on the 82nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 82nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("82FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,96,309,0 script 82FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("82FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("82FGate102tower", instance_id());
- areamonster "4@tower",181,267,191,303,"Skeggiold",1754,10,instance_npcname("82FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,267,191,303,"Dark Illusion",1302,10,instance_npcname("82FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,267,191,303,"Gryphon",1259,10,instance_npcname("82FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,267,191,303,"Chimera",1283,10,instance_npcname("82FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",224,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("82FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 83
- }
- else
- instance_announce -1,"Remaining Monsters on the 83rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 83rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("83FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,184,309,0 script 83FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("83FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("83FGate102tower", instance_id());
- areamonster "4@tower",267,267,277,303,"Succubus",1370,10,instance_npcname("83FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,267,277,303,"Dark Illusion",1302,20,instance_npcname("83FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,267,277,303,"Owl Duke",1320,10,instance_npcname("83FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,267,277,303,"Owl Baron",1295,10,instance_npcname("83FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,267,277,303,"Incubus",1374,10,instance_npcname("83FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",310,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("83FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 84
- }
- else
- instance_announce -1,"Remaining Monsters on the 84th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 84th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("84FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,270,309,0 script 84FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("84FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("84FGate102tower", instance_id());
- areamonster "4@tower",352,267,362,303,"Ifrit",1832,1,instance_npcname("84FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",395,270;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("84FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 85
- }
- else
- instance_announce -1,"Remaining Monsters on the 85th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 85th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("85FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,355,309,0 script 85FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("85FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("85FGate102tower", instance_id());
- areamonster "4@tower",9,180,19,216,"Hydro",1720,10,instance_npcname("85FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,180,19,216,"Gryphon",1259,10,instance_npcname("85FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,180,19,216,"Chimera",1283,10,instance_npcname("85FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,180,19,216,"Majoruros",1310,10,instance_npcname("85FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",52,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("85FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 86
- }
- else
- instance_announce -1,"Remaining Monsters on the 86th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 86th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("86FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,12,222,0 script 86FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("86FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("86FGate102tower", instance_id());
- areamonster "4@tower",93,180,103,216,"Salamander",1831,15,instance_npcname("86FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,180,103,216,"Kasa",1833,20,instance_npcname("86FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,180,103,216,"Lava Golem",1366,15,instance_npcname("86FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,180,103,216,"Gajomart",1309,10,instance_npcname("86FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",136,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("86FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 87
- }
- else
- instance_announce -1,"Remaining Monsters on the 87th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 87th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("87FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,96,222,0 script 87FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("87FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("87FGate102tower", instance_id());
- areamonster "4@tower",181,180,191,216,"Necromancer",1870,15,instance_npcname("87FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,180,191,216,"Anubis",1098,15,instance_npcname("87FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,180,191,216,"Wraith Dead",1291,10,instance_npcname("87FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,180,191,216,"Ancient Mummy",1297,10,instance_npcname("87FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,180,191,216,"Khalitzburg",1132,10,instance_npcname("87FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",224,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("87FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 88
- }
- else
- instance_announce -1,"Remaining Monsters on the 88th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 88th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("88FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,184,222,0 script 88FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("88FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("88FGate102tower", instance_id());
- areamonster "4@tower",267,180,277,216,"Odium of Thanatos",1704,6,instance_npcname("88FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,180,277,216,"Despero of Thanatos",1705,6,instance_npcname("88FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,180,277,216,"Maero of Thanatos",1706,6,instance_npcname("88FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,180,277,216,"Dolor of Thanatos",1707,6,instance_npcname("88FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",310,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("88FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 89
- }
- else
- instance_announce -1,"Remaining Monsters on the 89th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 89th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("89FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,270,222,0 script 89FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("89FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("89FGate102tower", instance_id());
- areamonster "4@tower",352,180,362,216,"Valkyrie Randgris",1751,1,instance_npcname("89FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,180,362,216,"Baroness of Retribution",1702,10,instance_npcname("89FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,180,362,216,"Lady Solace",1703,10,instance_npcname("89FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,180,362,216,"False Angel",1371,10,instance_npcname("89FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",395,183;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("89FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 90
- }
- else
- instance_announce -1,"Remaining Monsters on the 90th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 90th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("90FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,355,222,0 script 90FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("90FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("90FGate102tower", instance_id());
- areamonster "4@tower",9,96,19,132,"Cecil Damon",1638,10,instance_npcname("90FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,96,19,132,"Bow Master",1830,10,instance_npcname("90FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,96,19,132,"Kavac",1656,30,instance_npcname("90FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",52,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("90FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 91
- }
- else
- instance_announce -1,"Remaining Monsters on the 91st Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 91st Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("91FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,12,138,0 script 91FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("91FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("91FGate102tower", instance_id());
- areamonster "4@tower",93,96,103,132,"Kathryne Keyron",1639,15,instance_npcname("91FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,96,103,132,"Elder",1377,10,instance_npcname("91FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,96,103,132,"Laurell Weinder",1657,10,instance_npcname("91FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,96,103,132,"Wind Ghost",1263,10,instance_npcname("91FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,96,103,132,"Marduk",1140,10,instance_npcname("91FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",136,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("91FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 92
- }
- else
- instance_announce -1,"Remaining Monsters on the 92nd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 92nd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("92FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,96,138,0 script 92FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("92FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("92FGate102tower", instance_id());
- areamonster "4@tower",181,96,191,132,"Seyren Windsor",1634,15,instance_npcname("92FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,96,191,132,"Bloody Knight",1268,10,instance_npcname("92FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,96,191,132,"Abysmal Knight",1219,10,instance_npcname("92FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,96,191,132,"Wanderer",1208,10,instance_npcname("92FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",224,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("92FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 93
- }
- else
- instance_announce -1,"Remaining Monsters on the 93rd Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 93rd Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("93FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,184,138,0 script 93FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("93FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("93FGate102tower", instance_id());
- areamonster "4@tower",267,96,277,132,"Sword Master",1829,15,instance_npcname("93FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",267,96,277,132,"Bow Master",1830,15,instance_npcname("93FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",310,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("93FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 94
- }
- else
- instance_announce -1,"Remaining Monsters on the 94th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 94th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("94FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,270,138,0 script 94FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("94FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("94FGate102tower", instance_id());
- areamonster "4@tower",352,96,362,132,"Beelzebub",1873,1,instance_npcname("94FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,96,362,132,"Hunter Fly",1035,30,instance_npcname("94FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,96,362,132,"Steel Chonchon",1042,5,instance_npcname("94FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,96,362,132,"Dragon FLy",1091,5,instance_npcname("94FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",352,96,362,132,"Chonchon",1011,5,instance_npcname("94FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",395,99;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("94FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 95
- }
- else
- instance_announce -1,"Remaining Monsters on the 95th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 95th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("95FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,355,138,0 script 95FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("95FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("95FGate102tower", instance_id());
- areamonster "4@tower",9,9,19,45,"Valkyrie",1765,5,instance_npcname("95FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,9,19,45,"Skeggiold",1755,10,instance_npcname("95FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",9,9,19,45,"Skeggiold",1754,10,instance_npcname("95FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",52,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("95FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 96
- }
- else
- instance_announce -1,"Remaining Monsters on the 96th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 96th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("96FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,12,51,0 script 96FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("96FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("96FGate102tower", instance_id());
- areamonster "4@tower",93,9,103,45,"Incarnation of Morroc",1918,5,instance_npcname("96FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,9,103,45,"Incarnation of Morroc",1919,5,instance_npcname("96FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,9,103,45,"Incarnation of Morroc",1920,5,instance_npcname("96FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",93,9,103,45,"Incarnation of Morroc",1921,5,instance_npcname("96FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",136,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("96FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 97
- }
- else
- instance_announce -1,"Remaining Monsters on the 97th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 97th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("97FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,96,51,0 script 97FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("97FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("97FGate102tower", instance_id());
- areamonster "4@tower",181,9,191,45,"Kathryne Keyron",1639,2,instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,9,191,45,"Seyren Windsor",1634,2,instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,9,191,45,"Margaretha Sorin",1637,2,instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,9,191,45,"Eremes Guile",1635,2,instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,9,191,45,"Howard Alt-Eisen",1636,2,instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead";
- areamonster "4@tower",181,9,191,45,"Cecil Damon",1638,2,instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead";
- end;
-
-OnTouch_:
- warp "4@tower",224,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("97FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 98
- }
- else
- instance_announce -1,"Remaining Monsters on the 98th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 98th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("98FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
-
-4@tower,184,51,0 script 98FGate102tower 45,2,2,{
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("98FGate102tower", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("98FGate102tower", instance_id());
- for( set .@i, 1; .@i <= 7; set .@i, .@i + 1 ) {
- set .@mob_ran,rand(1,30);
- if (.@mob_ran == 1)
- areamonster "4@tower",267,9,277,45,"Kathryne Keyron",1639,2,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 2)
- areamonster "4@tower",267,9,277,45,"Seyren Windsor",1634,2,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 3)
- areamonster "4@tower",267,9,277,45,"Margaretha Sorin",1637,2,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 4)
- areamonster "4@tower",267,9,277,45,"Eremes Guile",1635,2,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 5)
- areamonster "4@tower",267,9,277,45,"Howard Alt-Eisen",1636,2,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 6)
- areamonster "4@tower",267,9,277,45,"Cecil Damon",1638,2,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 7)
- areamonster "4@tower",267,9,277,45,"Incarnation of Morroc",1918,5,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 8)
- areamonster "4@tower",267,9,277,45,"Incarnation of Morroc",1919,5,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 9)
- areamonster "4@tower",267,9,277,45,"Incarnation of Morroc",1920,5,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 10)
- areamonster "4@tower",267,9,277,45,"Incarnation of Morroc",1921,5,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 11)
- areamonster "4@tower",267,9,277,45,"Valkyrie",1765,5,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 12)
- areamonster "4@tower",267,9,277,45,"Skeggiold",1755,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 13)
- areamonster "4@tower",267,9,277,45,"Skeggiold",1754,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 14)
- areamonster "4@tower",267,9,277,45,"Seyren Windsor",1634,15,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 15)
- areamonster "4@tower",267,9,277,45,"Bloody Knight",1268,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 16)
- areamonster "4@tower",267,9,277,45,"Abysmal Knight",1219,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 17)
- areamonster "4@tower",267,9,277,45,"Wanderer",1208,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 18)
- areamonster "4@tower",267,9,277,45,"Sword Master",1829,15,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 19)
- areamonster "4@tower",267,9,277,45,"Bow Master",1830,15,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 20)
- areamonster "4@tower",267,9,277,45,"Kathryne Keyron",1639,15,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 21)
- areamonster "4@tower",267,9,277,45,"Elder",1377,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 22)
- areamonster "4@tower",267,9,277,45,"Laurell Weinder",1657,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 23)
- areamonster "4@tower",267,9,277,45,"Wind Ghost",1263,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 24)
- areamonster "4@tower",267,9,277,45,"Marduk",1140,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 25)
- areamonster "4@tower",267,9,277,45,"Cecil Damon",1638,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 26)
- areamonster "4@tower",267,9,277,45,"Bow Master",1830,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 27)
- areamonster "4@tower",267,9,277,45,"Kavach Icarus",1656,30,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 28)
- areamonster "4@tower",267,9,277,45,"Baroness of Retribution",1702,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else if (.@mob_ran == 29)
- areamonster "4@tower",267,9,277,45,"Lady Solace",1703,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- else
- areamonster "4@tower",267,9,277,45,"False Angel",1371,10,instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead";
- }
- end;
-
-OnTouch_:
- warp "4@tower",309,12;
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("4@tower",instance_npcname("98FGate102tower", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- initnpctimer;
- //SetItemPartyInMap in_102floor 99
- }
- else
- instance_announce -1,"Remaining Monsters on the 99th Level - " + .@mob_dead_num,bc_map,"0x00ff99";
- end;
-
-OnTimer5000:
- instance_announce -1,"All Monsters on the 99th Level have been defeated.",bc_map,"0xffff00";
- donpcevent instance_npcname("99FGate102tower", instance_id())+"::OnEnable";
- stopnpctimer;
- end;
-}
+4@tower,12,393,0 duplicate(1FGate102tower) 76FGate102tower 45,2,2
+4@tower,96,393,0 duplicate(1FGate102tower) 77FGate102tower 45,2,2
+4@tower,184,393,0 duplicate(1FGate102tower) 78FGate102tower 45,2,2
+4@tower,270,393,0 duplicate(1FGate102tower) 79FGate102tower 45,2,2
+4@tower,355,393,0 duplicate(1FGate102tower) 80FGate102tower 45,2,2
+4@tower,12,309,0 duplicate(1FGate102tower) 81FGate102tower 45,2,2
+4@tower,96,309,0 duplicate(1FGate102tower) 82FGate102tower 45,2,2
+4@tower,184,309,0 duplicate(1FGate102tower) 83FGate102tower 45,2,2
+4@tower,270,309,0 duplicate(1FGate102tower) 84FGate102tower 45,2,2
+4@tower,355,309,0 duplicate(1FGate102tower) 85FGate102tower 45,2,2
+4@tower,12,222,0 duplicate(1FGate102tower) 86FGate102tower 45,2,2
+4@tower,96,222,0 duplicate(1FGate102tower) 87FGate102tower 45,2,2
+4@tower,184,222,0 duplicate(1FGate102tower) 88FGate102tower 45,2,2
+4@tower,270,222,0 duplicate(1FGate102tower) 89FGate102tower 45,2,2
+4@tower,355,222,0 duplicate(1FGate102tower) 90FGate102tower 45,2,2
+4@tower,12,138,0 duplicate(1FGate102tower) 91FGate102tower 45,2,2
+4@tower,96,138,0 duplicate(1FGate102tower) 92FGate102tower 45,2,2
+4@tower,184,138,0 duplicate(1FGate102tower) 93FGate102tower 45,2,2
+4@tower,270,138,0 duplicate(1FGate102tower) 94FGate102tower 45,2,2
+4@tower,355,138,0 duplicate(1FGate102tower) 95FGate102tower 45,2,2
+4@tower,12,51,0 duplicate(1FGate102tower) 96FGate102tower 45,2,2
+4@tower,96,51,0 duplicate(1FGate102tower) 97FGate102tower 45,2,2
+4@tower,184,51,0 duplicate(1FGate102tower) 98FGate102tower 45,2,2
4@tower,271,51,0 script 99FGate102tower 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname("99FGate102tower", instance_id());
+ disablenpc instance_npcname("99FGate102tower");
end;
OnEnable:
- enablenpc instance_npcname("99FGate102tower", instance_id());
+ enablenpc instance_npcname("99FGate102tower");
initnpctimer;
end;
OnTouch_:
getitem 6000,1; //Dark_Ashes
- warp "5@tower",101,72;
+ warp instance_mapname("5@tower"),101,72;
end;
OnTimer120000:
- disablenpc instance_npcname("99FGate102tower", instance_id());
- donpcevent instance_npcname("99FGate102tower-2", instance_id())+"::OnEnable";
+ disablenpc instance_npcname("99FGate102tower");
+ donpcevent instance_npcname("99FGate102tower-2")+"::OnEnable";
stopnpctimer;
end;
}
@@ -4340,24 +1715,24 @@ OnTimer120000:
end;
OnInstanceInit:
- disablenpc instance_npcname("99FGate102tower-2", instance_id());
+ disablenpc instance_npcname("99FGate102tower-2");
end;
OnEnable:
- enablenpc instance_npcname("99FGate102tower-2", instance_id());
+ enablenpc instance_npcname("99FGate102tower-2");
end;
OnTouch_:
- warp "5@tower",101,72;
+ warp instance_mapname("5@tower"),101,72;
end;
}
-/*
4@tower,71,1,0 script #Manager Mode4 844,{
+ callfunc "F_GM_NPC";
mes "Please enter the password.";
- input .@inputstr$;
+ set .@i, callfunc("F_GM_NPC","dmc2008",1);
next;
- if (.@inputstr$ == "dmc2008") {
+ if (.@i == 1) {
mes "This NPC manages the tower from the 76th to the 99th Level.";
mes "Please enter the Level number to open.";
mes "(i.g.: 76F->76, 99F->99)";
@@ -4366,13 +1741,12 @@ OnTouch_:
if (.@input < 76 || .@input > 99)
mes "You can only enter a number from 76 to 99.";
else {
- donpcevent instance_npcname(.@input+"FGate102tower", instance_id())+"::OnEnable";
+ donpcevent instance_npcname(.@input+"FGate102tower")+"::OnEnable";
mes "*** Level "+ .@input + " is now being opened. ***";
}
}
close;
}
-*/
// Level 100
//============================================================
@@ -4413,21 +1787,18 @@ OnTouch_:
mes "[Mysterious Voice]";
mes "I now allow you to come receive an audience from me. Come to me, to Nacht Sieger the Hegemon-King of the Darkness!";
close2;
- warp "6@tower",32,12;
+ warp instance_mapname("6@tower"),32,12;
}
end;
OnInstanceInit:
- disablenpc instance_npcname("Lucid Crystal#102", instance_id());
- end;
-
OnDisable:
- disablenpc instance_npcname("Lucid Crystal#102", instance_id());
+ disablenpc instance_npcname("Lucid Crystal#102");
end;
OnEnable:
- enablenpc instance_npcname("Lucid Crystal#102", instance_id());
- donpcevent instance_npcname("#102Effect1", instance_id())+"::OnEnable";
+ enablenpc instance_npcname("Lucid Crystal#102");
+ donpcevent instance_npcname("#102Effect1")+"::OnEnable";
end;
}
@@ -4435,22 +1806,22 @@ OnEnable:
end;
OnInstanceInit:
- disablenpc instance_npcname("#102Effect1", instance_id());
+ disablenpc instance_npcname("#102Effect1");
end;
OnDisable:
- disablenpc instance_npcname("#102Effect1", instance_id());
+ disablenpc instance_npcname("#102Effect1");
end;
OnEnable:
- enablenpc instance_npcname("#102Effect1", instance_id());
+ enablenpc instance_npcname("#102Effect1");
initnpctimer;
end;
OnTimer500:
specialeffect EF_ENHANCE;
stopnpctimer;
- donpcevent instance_npcname("#102Effect2", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#102Effect2")+"::OnEnable";
end;
}
@@ -4458,22 +1829,22 @@ OnTimer500:
end;
OnInstanceInit:
- disablenpc instance_npcname("#102Effect2", instance_id());
+ disablenpc instance_npcname("#102Effect2");
end;
OnDisable:
- disablenpc instance_npcname("#102Effect2", instance_id());
+ disablenpc instance_npcname("#102Effect2");
end;
OnEnable:
- enablenpc instance_npcname("#102Effect2", instance_id());
+ enablenpc instance_npcname("#102Effect2");
initnpctimer;
end;
OnTimer500:
specialeffect EF_ENHANCE;
stopnpctimer;
- donpcevent instance_npcname("#102Effect1", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#102Effect1")+"::OnEnable";
end;
}
@@ -4481,16 +1852,17 @@ OnTimer500:
end;
OnInstanceInit:
- donpcevent instance_npcname("#102FShadowDust", instance_id())+"::OnEnable";
- monster "5@tower",83,85,"Entweihen Crothen",1957,1,instance_npcname("#102FShadowDust1", instance_id())+"::OnMyMobDead";
+ donpcevent instance_npcname("#102FShadowDust")+"::OnEnable";
+ monster instance_mapname("5@tower"),83,85,"Entweihen Crothen",1957,1,instance_npcname("#102FShadowDust1")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("5@tower",instance_npcname("#102FShadowDust1", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("5@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("#102FShadowDust1")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce -1, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00";
- donpcevent instance_npcname("#102FShadowDust", instance_id())+"::OnDisable";
- donpcevent instance_npcname("Lucid Crystal#102", instance_id())+"::OnEnable";
+ mapannounce .@map$, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00";
+ donpcevent instance_npcname("#102FShadowDust")+"::OnDisable";
+ donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable";
//SetItemPartyInMap in_102floor 100
}
end;
@@ -4500,83 +1872,76 @@ OnMyMobDead:
end;
OnInstanceInit:
- disablenpc instance_npcname("#102FShadowDust", instance_id());
+ disablenpc instance_npcname("#102FShadowDust");
end;
OnDisable:
- killmonsterall "5@tower";
- end;
-
-OnEnable:
- monster "5@tower",72,93,"Thorny Skeleton",1958,1;
- monster "5@tower",70,87,"Thorn of Magic",1960,1;
- monster "5@tower",68,83,"Thorn of Pureness",1961,1;
- monster "5@tower",70,80,"Thorny Skeleton",1958,1;
- monster "5@tower",74,81,"Thorn of Magic",1960,1;
- monster "5@tower",78,72,"Thorn of Magic",1960,1;
- monster "5@tower",81,70,"Thorny Skeleton",1958,1;
- monster "5@tower",78,84,"Thorn of Recovery",1959,1;
- monster "5@tower",85,72,"Thorn of Magic",1960,1;
- monster "5@tower",91,74,"Thorny Skeleton",1958,1;
- monster "5@tower",79,77,"Thorn of Pureness",1961,1;
- monster "5@tower",82,80,"Thorn of Recovery",1959,1;
- monster "5@tower",87,83,"Thorn of Recovery",1959,1;
- monster "5@tower",80,92,"Thorn of Pureness",1961,1;
- monster "5@tower",81,89,"Thorny Skeleton",1958,1;
- monster "5@tower",85,93,"Thorn of Magic",1960,1;
- monster "5@tower",86,90,"Thorn of Recovery",1959,1;
- monster "5@tower",88,88,"Thorny Skeleton",1958,1;
- monster "5@tower",91,87,"Thorn of Magic",1960,1;
- monster "5@tower",95,94,"Thorn of Magic",1960,1;
- monster "5@tower",91,96,"Thorny Skeleton",1958,1;
- monster "5@tower",90,82,"Thorn of Pureness",1961,1;
- monster "5@tower",96,98,"Thorn of Magic",1960,1;
- monster "5@tower",83,76,"Thorny Skeleton",1958,1;
- monster "5@tower",74,85,"Thorny Skeleton",1958,1;
- set .@mob_ran,rand(1,3);
- if (.@mob_ran == 1)
- monster "5@tower",82,85,"Thorny Skeleton",1958,1;
- else if (.@mob_ran == 2)
- monster "5@tower",82,85,"Thorn of Magic",1960,1;
- else
- monster "5@tower",82,85,"Thorn of Pureness",1961,1;
- set .@mob_ran2,rand(1,3);
- if (.@mob_ran2 == 1)
- monster "5@tower",84,85,"Thorny Skeleton",1958,1;
- else if (.@mob_ran2 == 2)
- monster "5@tower",84,85,"Thorn of Magic",1960,1;
- else
- monster "5@tower",84,85,"Thorn of Pureness",1961,1;
+ killmonsterall instance_mapname("5@tower");
+ end;
+
+OnEnable:
+ set .@map$, instance_mapname("5@tower");
+ monster .@map$,72,93,"Thorny Skeleton",1958,1;
+ monster .@map$,70,87,"Thorn of Magic",1960,1;
+ monster .@map$,68,83,"Thorn of Pureness",1961,1;
+ monster .@map$,70,80,"Thorny Skeleton",1958,1;
+ monster .@map$,74,81,"Thorn of Magic",1960,1;
+ monster .@map$,78,72,"Thorn of Magic",1960,1;
+ monster .@map$,81,70,"Thorny Skeleton",1958,1;
+ monster .@map$,78,84,"Thorn of Recovery",1959,1;
+ monster .@map$,85,72,"Thorn of Magic",1960,1;
+ monster .@map$,91,74,"Thorny Skeleton",1958,1;
+ monster .@map$,79,77,"Thorn of Pureness",1961,1;
+ monster .@map$,82,80,"Thorn of Recovery",1959,1;
+ monster .@map$,87,83,"Thorn of Recovery",1959,1;
+ monster .@map$,80,92,"Thorn of Pureness",1961,1;
+ monster .@map$,81,89,"Thorny Skeleton",1958,1;
+ monster .@map$,85,93,"Thorn of Magic",1960,1;
+ monster .@map$,86,90,"Thorn of Recovery",1959,1;
+ monster .@map$,88,88,"Thorny Skeleton",1958,1;
+ monster .@map$,91,87,"Thorn of Magic",1960,1;
+ monster .@map$,95,94,"Thorn of Magic",1960,1;
+ monster .@map$,91,96,"Thorny Skeleton",1958,1;
+ monster .@map$,90,82,"Thorn of Pureness",1961,1;
+ monster .@map$,96,98,"Thorn of Magic",1960,1;
+ monster .@map$,83,76,"Thorny Skeleton",1958,1;
+ monster .@map$,74,85,"Thorny Skeleton",1958,1;
+ switch(rand(1,3)) {
+ case 1: monster .@map$,82,85,"Thorny Skeleton",1958,1; break;
+ case 2: monster .@map$,82,85,"Thorn of Magic",1960,1; break;
+ case 3: monster .@map$,82,85,"Thorn of Pureness",1961,1; break;
+ }
+ switch(rand(1,3)) {
+ case 1: monster .@map$,84,85,"Thorny Skeleton",1958,1; break;
+ case 2: monster .@map$,84,85,"Thorn of Magic",1960,1; break;
+ case 3: monster .@map$,84,85,"Thorn of Pureness",1961,1; break;
+ }
end;
}
-/*
5@tower,71,1,0 script #Manager Mode5 844,{
+ callfunc "F_GM_NPC";
mes "This NPC manages the crystal on the 100th Level. Please enter the password.";
- input .@inputstr$;
+ set .@i, callfunc("F_GM_NPC","dmc2008",1);
next;
- if (.@inputstr$ == "dmc2008") {
- donpcevent instance_npcname("Lucid Crystal#102", instance_id())+"::OnEnable";
+ if (.@i == 1) {
+ donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable";
mes "The 100th Level's crystal has been activated.";
- }
- else
+ } else
mes "Please enter the correct password.";
close;
-} */
+}
// Level 101
//============================================================
6@tower,45,89,2 script Life Spring#1 844,{
- set .@pc_hp,MaxHp-Hp;
- set .@pc_sp,MaxSp-Sp;
mes "^0066ffYou took a sip of the spring's clear water, and you feel invigorated.^000000";
- percentheal .@pc_hp,.@pc_sp;
+ heal (MaxHp-Hp),(MaxSp-Sp);
close;
OnInstanceInit:
- donpcevent instance_npcname("Life Spring#2", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Life Spring#2")+"::OnEnable";
end;
-
}
6@tower,45,89,2 script Life Spring#2 844,{
@@ -4589,7 +1954,7 @@ OnEnable:
OnTimer2000:
stopnpctimer;
- donpcevent instance_npcname("Life Spring#3", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Life Spring#3")+"::OnEnable";
end;
}
@@ -4603,7 +1968,7 @@ OnEnable:
OnTimer2000:
stopnpctimer;
- donpcevent instance_npcname("Life Spring#2", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Life Spring#2")+"::OnEnable";
end;
}
@@ -4613,14 +1978,14 @@ OnTimer2000:
end;
OnInstanceInit:
- areamonster "6@tower",154,73,156,75,"Watcher's Son",1627,10,instance_npcname("Tyrant's Throne#", instance_id())+"::OnMyMobDead";
+ areamonster instance_mapname("6@tower"),154,73,156,75,"Watcher's Son",1627,10,instance_npcname("Tyrant's Throne#")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("6@tower",instance_npcname("Tyrant's Throne#", instance_id())+"::OnMyMobDead");
+ set .@mob_dead_num,mobcount(instance_mapname("6@tower"),instance_npcname("Tyrant's Throne#")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#1st Beeper", instance_id())+"::OnEnable";
- disablenpc instance_npcname("Tyrant's Throne#", instance_id());
+ donpcevent instance_npcname("#1st Beeper")+"::OnEnable";
+ disablenpc instance_npcname("Tyrant's Throne#");
}
end;
}
@@ -4633,36 +1998,38 @@ OnEnable:
end;
OnTimer500:
- instance_announce -1,"Guests, huh? I hope you've come here knowing that you'll be buried in this place. If you didn't know, well... it's too late!",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Guests, huh? I hope you've come here knowing that you'll be buried in this place. If you didn't know, well... it's too late!",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce -1,"This is why you adventurers always end up dead.",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"This is why you adventurers always end up dead.",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce -1,"I may applaud you for your courage... Of course, I intend to play with you a little bit first.",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"I may applaud you for your courage... Of course, I intend to play with you a little bit first.",bc_map,"0x00ffcc";
end;
OnTimer15500:
- instance_announce -1,"You know, I like watching humans running around in fear.",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"You know, I like watching humans running around in fear.",bc_map,"0x00ffcc";
end;
OnTimer20500:
- instance_announce -1,"Let's see who runs fastest. Are you ready?",bc_map,"0x00ffcc";
+ set .@map$, instance_mapname("6@tower");
+ mapannounce .@map$,"Let's see who runs fastest. Are you ready?",bc_map,"0x00ffcc";
stopnpctimer;
- areamonster "6@tower",151,66,153,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper", instance_id())+"::OnMyMobDead";
- areamonster "6@tower",158,66,160,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,151,66,153,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper")+"::OnMyMobDead";
+ areamonster .@map$,158,66,160,106,"Bone Guardian",1152,50,instance_npcname("#1st Beeper")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("6@tower",instance_npcname("#1st Beeper", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("6@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("#1st Beeper")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#2nd Beeper", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#2nd Beeper")+"::OnEnable";
//SetItemPartyInMap in_102floor 101
}
else
- instance_announce -1,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
+ mapannounce .@map$,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -4674,28 +2041,30 @@ OnEnable:
end;
OnTimer500:
- instance_announce -1,"Well, I guess they aren't too challenging for you.",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Well, I guess they aren't too challenging for you.",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce -1,"Let's speed up a little bit, shall we?",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Let's speed up a little bit, shall we?",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce -1,"I demand an encore!",bc_map,"0x00ffcc";
+ set .@map$, instance_mapname("6@tower");
+ mapannounce .@map$,"I demand an encore!",bc_map,"0x00ffcc";
stopnpctimer;
- areamonster "6@tower",151,66,153,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper", instance_id())+"::OnMyMobDead";
- areamonster "6@tower",158,66,160,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,151,66,153,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper")+"::OnMyMobDead";
+ areamonster .@map$,158,66,160,106,"Wind Guardian",1263,30,instance_npcname("#2nd Beeper")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("6@tower",instance_npcname("#2nd Beeper", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("6@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("#2nd Beeper")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#3rd Beeper", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#3rd Beeper")+"::OnEnable";
//SetItemPartyInMap in_102floor 102
}
else
- instance_announce -1,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
+ mapannounce .@map$,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -4707,28 +2076,30 @@ OnEnable:
end;
OnTimer500:
- instance_announce -1,"Yes, this is getting exciting!",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Yes, this is getting exciting!",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce -1,"I'll remember you as one of a few that have managed to entertain me.",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"I'll remember you as one of a few that have managed to entertain me.",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce -1,"How would you like to play one more round?",bc_map,"0x00ffcc";
+ set .@map$, instance_mapname("6@tower");
+ mapannounce .@map$,"How would you like to play one more round?",bc_map,"0x00ffcc";
stopnpctimer;
- areamonster "6@tower",151,66,153,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper", instance_id())+"::OnMyMobDead";
- areamonster "6@tower",158,66,160,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,151,66,153,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper")+"::OnMyMobDead";
+ areamonster .@map$,158,66,160,106,"Sword Edge Guardian",1132,20,instance_npcname("#3rd Beeper")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("6@tower",instance_npcname("#3rd Beeper", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("6@tower");
+ set .@mob_dead_num,mobcount(.@map$,instance_npcname("#3rd Beeper")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- donpcevent instance_npcname("#4th Beeper", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#4th Beeper")+"::OnEnable";
//SetItemPartyInMap in_102floor 103
}
else
- instance_announce -1,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
+ mapannounce .@map$,"Remaining Targets " + .@mob_dead_num + "ea",bc_map,"0x00ff99";
end;
}
@@ -4740,21 +2111,22 @@ OnEnable:
end;
OnTimer500:
- instance_announce -1,"Okay, the time has come to make my appearance!",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Okay, the time has come to make my appearance!",bc_map,"0x00ffcc";
end;
OnTimer5500:
- instance_announce -1,"Do you want to know who I am?",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Do you want to know who I am?",bc_map,"0x00ffcc";
end;
OnTimer10500:
- instance_announce -1,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
+ set .@map$, instance_mapname("6@tower");
+ mapannounce .@map$,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
stopnpctimer;
- monster "6@tower",156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper", instance_id())+"::OnMyMobDead";
+ monster .@map$,156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper")+"::OnMyMobDead";
end;
OnMyMobDead:
- donpcevent instance_npcname("Lost Soul#102", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Lost Soul#102")+"::OnEnable";
end;
}
@@ -4814,26 +2186,26 @@ OnMyMobDead:
end;
OnInstanceInit:
- disablenpc instance_npcname("Lost Soul#102", instance_id());
+ disablenpc instance_npcname("Lost Soul#102");
end;
OnEnable:
initnpctimer;
- enablenpc instance_npcname("Lost Soul#102", instance_id());
- donpcevent instance_npcname("#Effect30", instance_id())+"::OnEnable";
+ enablenpc instance_npcname("Lost Soul#102");
+ donpcevent instance_npcname("#Effect30")+"::OnEnable";
//SetItemPartyInMap in_102floor 104
end;
OnTimer500:
- instance_announce -1,"This... This can't be happening! I can't be defeated!",bc_map,"0xffff00";
+ mapannounce instance_mapname("6@tower"),"This... This can't be happening! I can't be defeated!",bc_map,"0xffff00";
end;
OnTimer5500:
- instance_announce -1,"Nooo! My soul... My shell...! Nooo~!",bc_map,"0xffff00";
+ mapannounce instance_mapname("6@tower"),"Nooo! My soul... My shell...! Nooo~!",bc_map,"0xffff00";
end;
OnTimer10500:
- instance_announce -1,"Nacht Sieger's body has turned into dark ashes that scattered in the wind.",bc_map,"0x00ffcc";
+ mapannounce instance_mapname("6@tower"),"Nacht Sieger's body has turned into dark ashes that scattered in the wind.",bc_map,"0x00ffcc";
stopnpctimer;
end;
}
@@ -4842,7 +2214,7 @@ OnTimer10500:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Effect30", instance_id());
+ disablenpc instance_npcname("#Effect30");
end;
OnEnable:
@@ -4852,7 +2224,7 @@ OnEnable:
OnTimer1000:
stopnpctimer;
- donpcevent instance_npcname("#Effect31", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#Effect31")+"::OnEnable";
end;
}
@@ -4860,7 +2232,7 @@ OnTimer1000:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Effect31", instance_id());
+ disablenpc instance_npcname("#Effect31");
end;
OnEnable:
@@ -4870,6 +2242,6 @@ OnEnable:
OnTimer1000:
stopnpctimer;
- donpcevent instance_npcname("#Effect30", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#Effect30")+"::OnEnable";
end;
-}
+} \ No newline at end of file
diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt
index f2fe3fc68..331aba3f7 100644
--- a/npc/instances/NydhoggsNest.txt
+++ b/npc/instances/NydhoggsNest.txt
@@ -3,19 +3,24 @@
//===== By: ==================================================
//= L0ne_W0lf, various sources
//===== Current Version: =====================================
-//= 1.4
-//===== Description: =========================================
+//= 1.6
+//===== Description: =========================================
//= [Official Conversion]
//= Nidhoggr's Nest Instance
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 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.
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//= 1.4 Cleaning. [Euphy]
-//============================================================
+//= 1.5 Instance system rewrite. [Euphy]
+//= 1.6 Added GM management NPCs. [Euphy]
+//============================================================
+1@nyd mapflag src4instance
+2@nyd mapflag src4instance
+//============================================================
nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
if (ins_nyd == 0) {
mes "A great stone gate stands before you. The sculpture of a terrible dragon spreads its powerful looking wings.";
@@ -24,47 +29,25 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
next;
switch(select("Move closer to look more carefully.:Step back.")) {
case 1:
- if (ep13_1_edq == 14) {
- specialeffect2 EF_HOLYHIT;
- pushpc 3,3;
+ specialeffect2 EF_HOLYHIT;
+ pushpc 3,3;
+ if (ep13_1_edq == 14)
set 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.";
- next;
- mes "It would be better to go back to camp and inform the others and ask for help.";
- set ins_nyd,1;
- close;
- }
- else if (ep13_1_edq == 15) {
- specialeffect2 EF_HOLYHIT;
- pushpc 3,3;
- 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.";
- next;
- mes "It would be better to go back to camp and inform the others and ask for help.";
- set ins_nyd,1;
- close;
- }
- else {
- specialeffect2 EF_HOLYHIT;
- pushpc 3,3;
- 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.";
- next;
- mes "It would be better to go back to camp and inform the others and ask for help.";
+ 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.";
+ next;
+ mes "It would be better to go back to camp and inform the others and ask for help.";
+ if (ep13_1_edq != 15) {
next;
mes "You'll have to obtain the others trust in the expendition camp by working hard.";
- set ins_nyd,1;
- close;
}
+ set ins_nyd,1;
+ close;
case 2:
close;
}
- }
- else if (ins_nyd == 1) {
+ } else if (ins_nyd == 1) {
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.";
@@ -74,13 +57,10 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
set ep13_1_edq,15;
close;
}
- else {
- next;
- mes "You'll have to obtain the others trust in the expendition camp by working hard.";
- close;
- }
- }
- else if (ins_nyd == 111 || ins_nyd == 112) {
+ next;
+ mes "You'll have to obtain the others trust in the expendition camp by working hard.";
+ close;
+ } else if (ins_nyd == 111 || ins_nyd == 112) {
specialeffect2 EF_CHANGECOLD;
mes "The strange sensation surrounding your body has disappeared";
next;
@@ -107,177 +87,104 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
case 2:
close;
}
- }
- else if (ins_nyd == 131 || ins_nyd == 132 || ins_nyd > 199) {
+ } else if (ins_nyd == 131 || ins_nyd == 132 || ins_nyd > 199) {
+
+ set .@party_id,getcharid(1);
+ set .@md_name$,"Nidhoggur's Nest";
+
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) {
- mes "As I put my hands on the stone gate, a voice sounded from the depth of my heart.";
- next;
- mes "[Yggdrasil Gatekeeper]";
- mes "The loyal servants of the Guardian... what can I do for you?";
- next;
- switch(select("Please allow me to enter.:I want to go in.:I want to leave.")) {
- case 1:
- set .@party,getcharid(1);
- set .@leader,getpartyleader(.@party,2);
- set .@md_name$,"Nidhoggur's Nest";
-
- if(!instance_check_party(.@party,2,70)){
- mes "I'm sorry but your Party does not meet the requirements to join the Memorial Dungeon.";
- close;
- }
- if (.@leader == getcharid(0)) {
- set .@instance, instance_create(.@md_name$, .@party);
+ mes "As I put my hands on the stone gate, a voice sounded from the depth of my heart.";
+ next;
+ if (.@ins_nyd_check == -1 && .@ins_nyd_check2 == -1) {
+ if (!instance_check_party(.@party_id,2,70)) {
+ mes "[Yggdrasil Gatekeeper]";
+ mes "Where are the other servants, so you can work together? Each servant cannot be admitted here individually...";
+ next;
+ mes "[Yggdrasil Gatekeeper]";
+ mes "Come with at least 1 more servant... Only party leaders can accept admission to Nidhoggur's Nest.";
+ next;
+ mes "[Yggdrasil Gatekeeper]";
+ mes "And only 1 representative of you needs to talk to me, so don't annoy me...";
+ close;
+ }
+ if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ mes "[Yggdrasil Gatekeeper]";
+ mes "The loyal servants of the Guardian... what can I do for you?";
+ next;
+ switch(select("Please allow me to enter.:I want to go in.:I want to leave.")) {
+ case 1:
+ set .@instance, instance_create(.@md_name$, .@party_id);
if (.@instance < 0) {
mes "[Yggdrasil Gatekeeper]";
mes "The Guardian seems to wish to be alone. I will go in and check, please wait out here.";
close;
}
- else {
- for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
- if( instance_attachmap(.@i + "@nyd", .@instance) == "" )
- break;
- }
- if( .@i < 2 ) {
- instance_destroy(.@instance);
- close;
- }
- instance_attach(.@instance);
- instance_set_timeout 144000,300,.@instance;
- instance_init(.@instance);
-
- // Spawn standard mobs
- donpcevent instance_npcname("ins_nyd1_spawn_mobs", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("ins_nyd2_spawn_mobs", instance_id())+"::OnInstanceInit";
- // Activate Floor 1
- donpcevent instance_npcname("nyd_call_mon_1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("ins_nyd_1f_timer", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_to2f_warp", instance_id())+"::OnInstanceInit";
- // Active Floor 2
- donpcevent instance_npcname("nyd_2f_enter_broad", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_boss_enter", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("World Tree Yggdrasil#2F", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_red_c", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_red_warp1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_red_warp2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_red_warp3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_white_c", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_white_warp1", instance_id())+"::OnInstanceInit";;
- donpcevent instance_npcname("nyd_2f_white_warp2", instance_id())+"::OnInstanceInit";;
- donpcevent instance_npcname("nyd_2f_white_warp3", instance_id())+"::OnInstanceInit";;
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_yellow_warp1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_yellow_warp2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_yellow_warp3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_green_c", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_green_warp1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_green_warp2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("nyd_2f_green_warp3", instance_id())+"::OnInstanceInit";
-
- mes "[Yggdrasil Gatekeeper]";
- mes "I've recorded your request, are you ready to go inside?";
- next;
- mes "[Yggdrasil Gatekeeper]";
- mes "If you are ready, I will allow you to enter.";
+ for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
+ if( instance_attachmap(.@i + "@nyd", .@instance) == "" )
+ break;
+ }
+ if( .@i < 2 ) {
+ instance_destroy(.@instance);
close;
}
- }
- else {
+ instance_set_timeout 144000,300,.@instance;
+ instance_init(.@instance);
mes "[Yggdrasil Gatekeeper]";
- mes "When you touch the stone gate, you can hear the voice in your heart.";
+ mes "I've recorded your request, are you ready to go inside?";
next;
mes "[Yggdrasil Gatekeeper]";
- mes "Where are the other servants, so you can work together? Each servant cannot be admitted here individually...";
- next;
+ mes "If you are ready, I will allow you to enter.";
+ close;
+ case 2:
+ goto L_Enter;
+ case 3:
+ close;
+ }
+ }
+ mes "[Yggdrasil Gatekeeper]";
+ mes "If you have the dungeon generated already, you can enter it.";
+ next;
+ if(select("I want to go in.:I want to leave.") == 2)
+ close;
+ goto L_Enter;
+ } else {
+ if (.@ins_nyd_check == 0 || .@ins_nyd_check == 1) {
+ if ('ins_nyd2 == 3 || 'ins_nyd2 == 4) {
mes "[Yggdrasil Gatekeeper]";
- mes "Come with at least 1 more servant... Only party leaders can accept admission to Nidhoggur's Nest.";
+ mes "With the defeat of Nidhoggur's Shadow, the roots of the World Tree Yggdrasil are also affected.";
next;
mes "[Yggdrasil Gatekeeper]";
- mes "And only 1 representative of you needs to talk to me, so don't annoy me...";
+ mes "After Nidhoggur's Shadow disappears, at least 3 days is needed for stabilizing.";
close;
}
- case 2:
- if (.@ins_nyd_check2 < 2) { // Added check to avoid people from re-partting up.
- set .@party,getcharid(1);
- set .@leader,getpartyleader(.@party,2);
- set .@p_name$,getpartyname(.@party);
- set .@p_name2$,strcharinfo(0);
- set .@md_name$,"Nidhoggur's Nest";
-
- if(!instance_check_party(.@party,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;
- }
- if((party_instance_id2 != 0) && (party_instance_id2 != getcharid(1))) {
- //Custom
- mes "[Yggdrasil Gatekeeper]";
- mes "You are no longer able to enter Nidhogger's Nest, as your instance has expired.";
- next;
- mes "[Yggdrasil Gatekeeper]";
- mes "After Nidhoggur's Shadow disappears, at least 3 days is needed for stabilizing.";
- close;
- }
- else {
- mapannounce "nyd_dun02", .@p_name$ + "'s Party member " + .@p_name2$ + " has entered " + .@md_name$,bc_map,"0x00ff99";
- set party_instance_id2,getcharid(1);
- if (checkquest(3135) == -1) setquest 3135;
- if (checkquest(3136) == -1) setquest 3136;
- warp "1@nyd",32,37;
- close;
- }
- }
- else {
- //Custom
+ mes "[Yggdrasil Gatekeeper]";
+ mes "If you have the dungeon generated already, you can enter it.";
+ next;
+ if(select("I want to go in.:I want to leave.") == 2)
+ close;
+ goto L_Enter;
+ } else if (.@ins_nyd_check == 2) {
+ if (.@ins_nyd_check2 == 0 || .@ins_nyd_check2 == 1) {
+ mes "[Yggdrasil Gatekeeper]";
+ mes "The time limit to enter the dungeon has expired. You must wait for the World Tree to stabilize its power before trying to re-enter.";
+ close;
+ } else if (.@ins_nyd_check2 == 2) {
mes "[Yggdrasil Gatekeeper]";
- mes "You are no longer able to enter Nidhogger's Nest, as your instance has expired.";
+ mes "The World Tree Yggdrasil has stabilized. Would you like to enter Nidhoggur's Nest again?";
next;
mes "[Yggdrasil Gatekeeper]";
- mes "After Nidhoggur's Shadow disappears, at least 3 days is needed for stabilizing.";
+ mes "If you would like to enter again, please register with me.";
+ erasequest 3135;
+ erasequest 3136;
+ set 'ins_nyd2,0;
close;
}
- case 3:
- close;
}
}
- 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;
- mes "[Yggdrasil Gatekeeper]";
- mes "After Nidhoggur's Shadow disappears, at least 3 days is needed for stabilizing.";
- close;
- }
- else if (.@ins_nyd_check == 2) {
- mes "[Yggdrasil Gatekeeper]";
- mes "The World Tree Yggdrasil has stabilized. Would you like to enter Nidhoggur's Nest again?";
- next;
- mes "[Yggdrasil Gatekeeper]";
- mes "If you would like to enter again, please register with me.";
- set party_instance_id2,0;
- erasequest 3135;
- erasequest 3136;
- set 'ins_nyd2,0;
- close;
- }
- else {
- close;
- }
- }
- else {
+ close;
+ } else {
mes "A great stone gate stands before you. The sculpture of a terrible dragon spreads its powerful looking wings.";
next;
mes "Near the bottom of the gate, Laphine tribeswomen have been turned to stone and now look like they are part of the great door.";
@@ -296,10 +203,23 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper 111,8,8,{
}
close;
+L_Enter:
+ if (has_instance("1@nyd") == "") {
+ mes "[Yggdrasil Gatekeeper]";
+ mes "You did not request for entrance. Please let your leader request entrance.";
+ close;
+ } else {
+ mapannounce "nyd_dun02", getpartyname(getcharid(1))+"'s party member "+strcharinfo(0)+" has entered Nidhoggur's Nest.",bc_map,"0x00ff99";
+ if (checkquest(3135) == -1) setquest 3135;
+ if (checkquest(3136) == -1) setquest 3136;
+ warp "1@nyd",32,37;
+ close;
+ }
+
OnTouch_:
if (ins_nyd == 0) {
specialeffect2 EF_CHANGECOLD;
- specialeffect EF_CHANGECOLD,"Yggdrasil Gatekeeper";
+ specialeffect EF_CHANGECOLD;
}
end;
}
@@ -318,8 +238,7 @@ mid_camp,271,299,3 script Historian Magnifier#edq 755,3,3,{
mes "[Historian Magniffer]";
mes "We are expecting a lot from you, expert adventurer. So, if you find anything... just tell me.";
close;
- }
- else if (ins_nyd == 2) {
+ } else if (ins_nyd == 2) {
mes "Does Commander Agip want to talk to me? Let's listen to his story.";
next;
mes "[Historian Magniffer]";
@@ -361,12 +280,10 @@ mid_camp,271,299,3 script Historian Magnifier#edq 755,3,3,{
mes "I will definitely help you find a way to enter the World Tree directly so, just believe in me! Okay~!!";
set ins_nyd,3;
close;
- }
- else if (ins_nyd == 3) {
+ } else if (ins_nyd == 3) {
mes "Why are you standing there? Go to my assistant in the Prontera Library!";
close;
- }
- else if (ins_nyd == 4) {
+ } else if (ins_nyd == 4) {
mes "You've come back... Good, how's Naomi? Actually, I don't need to worry about her. She is always cheerful. Haha.";
next;
mes "[Historian Magnifier]";
@@ -422,8 +339,7 @@ mid_camp,271,299,3 script Historian Magnifier#edq 755,3,3,{
set ins_nyd,5;
close;
}
- }
- else if ((ins_nyd == 5) || (ins_nyd == 51) || (ins_nyd == 52)) {
+ } else if ((ins_nyd == 5) || (ins_nyd == 51) || (ins_nyd == 52)) {
mes "Okay, let's try to contact them first, to be clear about any caves or treasures.";
next;
mes "[Historian Magnifier]";
@@ -432,8 +348,7 @@ mid_camp,271,299,3 script Historian Magnifier#edq 755,3,3,{
mes "[Historian Magnifier]";
mes "I'll also keep searching here. If you find anything, come back and let me know.";
close;
- }
- else if ((ins_nyd == 61) || (ins_nyd == 62)) {
+ } else if ((ins_nyd == 61) || (ins_nyd == 62)) {
mes "Ah, you've come at a proper time. I found a curious thing while looking for reports from Arunafeltz.";
next;
mes "[Historian Magnifier]";
@@ -462,12 +377,10 @@ mid_camp,271,299,3 script Historian Magnifier#edq 755,3,3,{
mes "Let's report to Commander Agip about the situation so far. Then, we wait on his decision.";
set ins_nyd,7;
close;
- }
- else if ((ins_nyd == 7) || (ins_nyd == 8)) {
+ } else if ((ins_nyd == 7) || (ins_nyd == 8)) {
mes "Report to Commander Hibba Agip about what we have discovered, since time is dependent on his decision.";
close;
- }
- else if ((ins_nyd == 121) || (ins_nyd == 122) || (ins_nyd == 131) || (ins_nyd == 132) || (ins_nyd ==14)) {
+ } else if ((ins_nyd == 121) || (ins_nyd == 122) || (ins_nyd == 131) || (ins_nyd == 132) || (ins_nyd ==14)) {
mes "So that's how it is... we were right about some parts of it... it's called the Guardian's Nest.";
next;
mes "[Historian Magnifier]";
@@ -482,8 +395,7 @@ mid_camp,271,299,3 script Historian Magnifier#edq 755,3,3,{
mes "[Historian Magnifier]";
mes "First, report to Commander Agip, then act according to the situation. Let me organize my research findings...";
close;
- }
- else {
+ } else {
mes "Sure, the mainland also has lots of interesting adventures... Hello, I am Magnifier, a historian dispatched from the Prontera royal court.";
next;
mes "[Historian Magnifier]";
@@ -610,8 +522,7 @@ prt_in,171,94,3 script Assistant Naomi#edq 893,3,3,{
set ins_nyd,4;
close;
}
- }
- else if (ins_nyd == 4) {
+ } else if (ins_nyd == 4) {
mes "Browse around, to take a look at the books.";
next;
switch(select("Discovery of Heterogeneity:Report of Indigenous Tribes")) {
@@ -676,8 +587,7 @@ prt_in,171,94,3 script Assistant Naomi#edq 893,3,3,{
mes "They have declared they will attend to the high courts for the first time in 1000 human years, since the end of the battles of Gods vs. Magicians.";
close;
}
- }
- else {
+ } else {
mes "The doctor never ever tries to come back, and there're too many things to do... How can I do it all...";
next;
mes "[Assistant Naomi]";
@@ -723,8 +633,7 @@ splendide,198,178,3 script Grumbling Soldier#edq 447,3,3,{
case 3:
close;
}
- }
- else {
+ } else {
mes "[Grumbling Soldier]";
mes "Nowadays, the world has turned unstable. I can't even fly comfortably anymore.";
next;
@@ -741,8 +650,7 @@ splendide,198,178,3 script Grumbling Soldier#edq 447,3,3,{
mes "Although they ignore your track record, still, one should be careful...";
close;
}
- }
- else {
+ } else {
mes "SeLarsmar Di marThusVil U SeMushVohl";
close;
}
@@ -788,8 +696,7 @@ splendide,240,164,3 script Sighing Soldier#edq 461,3,3,{
case 3:
close;
}
- }
- else {
+ } else {
mes "[Sighing Soldier]";
mes "When will we be finished with this combat with the Sapha? Ugghhhh...";
next;
@@ -800,8 +707,7 @@ splendide,240,164,3 script Sighing Soldier#edq 461,3,3,{
mes "Is there no way to resolve this by communicating? There's no meaning in useless combat! Geez.";
close;
}
- }
- else {
+ } else {
mes "VohlLarsmar Ha DielCyatas";
close;
}
@@ -857,8 +763,7 @@ spl_in01,109,60,3 script Commander Lebiordirr#edq 435,3,3,{
mes "Now, if you understand this, inform your friends.";
set ins_nyd,61;
close;
- }
- else if (ins_nyd == 61) {
+ } else if (ins_nyd == 61) {
mes "If you can't follow this rule, I will stop associating with you and ban all of your people from here.";
next;
mes "[Commander Lebiordirr]";
@@ -867,8 +772,7 @@ spl_in01,109,60,3 script Commander Lebiordirr#edq 435,3,3,{
mes "[Commander Lebiordirr]";
mes "Now, if you understand this, inform your friends.";
close;
- }
- else if (ins_nyd == 81) {
+ } else if (ins_nyd == 81) {
mes "Why have you come back, outsider?";
next;
select("To ask the Laphines about exploring...");
@@ -941,12 +845,10 @@ spl_in01,109,60,3 script Commander Lebiordirr#edq 435,3,3,{
mes "Here, outsider. Arioss will explain the situation with the giants. Talk with him...";
set ins_nyd,91;
close;
- }
- else if ((ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 200) || (ins_nyd == 201) || (ins_nyd == 202)) {
+ } else if ((ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 200) || (ins_nyd == 201) || (ins_nyd == 202)) {
mes "Outsider. Arioss here will explain the situation with the giants, talk with him...";
close;
- }
- else if ((ins_nyd == 72) || (ins_nyd == 82) || (ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112) || (ins_nyd == 122) || (ins_nyd == 132)) {
+ } else if ((ins_nyd == 72) || (ins_nyd == 82) || (ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112) || (ins_nyd == 122) || (ins_nyd == 132)) {
mes "Welcome to the Laphine camp in Splendide, outsider... I am Lebiordirr. I am in charge here.";
next;
mes "[Commander Lebiordirr]";
@@ -955,8 +857,7 @@ spl_in01,109,60,3 script Commander Lebiordirr#edq 435,3,3,{
mes "[Commander Lebiordirr]";
mes "If you are cautious with your actions, I won't place any harm on you. Fare well.";
close;
- }
- else if (ins_nyd == 203) {
+ } else if (ins_nyd == 203) {
mes "I was waiting for you. You came back safe, that's good news. Did you find anything?";
next;
select("Explain about the guardian Nidhoggur's leave.");
@@ -1007,12 +908,10 @@ spl_in01,109,60,3 script Commander Lebiordirr#edq 435,3,3,{
mes "Commander...";
set ins_nyd,121;
close;
- }
- else if ((ins_nyd == 121) || (ins_nyd == 131)) {
+ } else if ((ins_nyd == 121) || (ins_nyd == 131)) {
mes "Strange one, thank you for your cooperation in such situations... Please forget what has happened today...";
close;
- }
- else {
+ } else {
mes "Welcome to the Laphine camp in Splendide, outsider... I am Lebiordirr. I am in charge here.";
next;
mes "[Commander Lebiordirr]";
@@ -1022,8 +921,7 @@ spl_in01,109,60,3 script Commander Lebiordirr#edq 435,3,3,{
mes "If you are cautious with your actions, I won't place any harm on you. Fare well.";
close;
}
- }
- else {
+ } else {
mes "ThusDurnah Ra SharVeldIyaz U UorAmanDur Yee neaOsaAdor Yee...";
close;
}
@@ -1082,8 +980,7 @@ spl_in01,104,56,3 script Aide Arioss#edq 437,3,3,{
mes "I have already told you what you wanted to know... If you need anything else, just let me know.";
set ins_nyd,101;
close;
- }
- else if (ins_nyd == 101) {
+ } else if (ins_nyd == 101) {
mes "Ah, you said that there is a strange power blocking the entrance to the Guardian's nest, right?";
next;
mes "[Aide Arioss]";
@@ -1124,18 +1021,15 @@ spl_in01,104,56,3 script Aide Arioss#edq 437,3,3,{
mes "Please meet the Guardian, and come back with an answer to everything. I believe in you.";
set ins_nyd,111;
close;
- }
- else if ((ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 200) || (ins_nyd == 201) || (ins_nyd == 202)) {
+ } else if ((ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 200) || (ins_nyd == 201) || (ins_nyd == 202)) {
mes "Please meet with the Guardian and take a wise answer from him. I will trust you.";
close;
- }
- else if ((ins_nyd == 72) || (ins_nyd == 82) || (ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112)) {
+ } else if ((ins_nyd == 72) || (ins_nyd == 82) || (ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112)) {
mes "... ...";
next;
mes "Not even caring about this a single bit? What a stupid woman...";
close;
- }
- else if (ins_nyd == 121) {
+ } else if (ins_nyd == 121) {
mes "Things have actually become like this... as priests of the Guardian, it's our responsibility...";
next;
mes "[Aide Arioss]";
@@ -1149,19 +1043,16 @@ spl_in01,104,56,3 script Aide Arioss#edq 437,3,3,{
mes "[Aide Arioss]";
mes "If we can help you with anything in the future, we will do all we can to assist you. Once again, thank you.";
close;
- }
- else if (ins_nyd == 131) {
+ } else if (ins_nyd == 131) {
mes "If we can help you with anything in the future, we will do all we can to assist you. Once again, thank you.";
close;
- }
- else {
+ } else {
mes "... ...";
next;
mes "Never give attention to... um... a blunt woman...";
close;
}
- }
- else {
+ } else {
mes "AmanVilShar Ie DorLuShar Mu Re";
close;
}
@@ -1251,8 +1142,7 @@ man_in01,311,57,3 script Neat Etorr#edq 453,3,3,{
mes "You have heard it all, now please report back to your race.";
set ins_nyd,62;
close;
- }
- else if (ins_nyd == 62) {
+ } else if (ins_nyd == 62) {
mes "That captive is the only reference for our tribe, so we have taken good care of her. She is related to your current investigation.";
next;
mes "[Neat Etorr]";
@@ -1261,15 +1151,13 @@ man_in01,311,57,3 script Neat Etorr#edq 453,3,3,{
mes "[Neat Etorr]";
mes "If you don't accept our request, then do not expect any cooperations between our races in the future.";
close;
- }
- else if (ins_nyd == 72) {
+ } else if (ins_nyd == 72) {
mes "Recently, because you do not understand the current situations, you have done some things that I, as a leader, can't ignore any longer.";
next;
mes "[Neat Etorr]";
mes "I hope that your people will becareful of your actions on this land, and terminate any unnecessary interventions.";
close;
- }
- else if (ins_nyd == 82) {
+ } else if (ins_nyd == 82) {
mes "Do you need me for something, strange one?";
next;
select("Received invitation from the Sapha tribe to cooperate and investigate.");
@@ -1339,19 +1227,16 @@ man_in01,311,57,3 script Neat Etorr#edq 453,3,3,{
mes "Strange one, we hope our cooperation will be a good one. Now please go interrogate the Laphine prisoner.";
set ins_nyd,92;
close;
- }
- else if ((ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112) || (ins_nyd == 200) || (ins_nyd == 201) || (ins_nyd == 202)) {
+ } else if ((ins_nyd == 92) || (ins_nyd == 102) || (ins_nyd == 112) || (ins_nyd == 200) || (ins_nyd == 201) || (ins_nyd == 202)) {
mes "Strange one, we hope our cooperation will be a good one. Now please go interrogate the Laphine prisoner.";
close;
- }
- else if ((ins_nyd == 71) || (ins_nyd == 81) || (ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 121) || (ins_nyd == 131)) {
+ } else if ((ins_nyd == 71) || (ins_nyd == 81) || (ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 121) || (ins_nyd == 131)) {
mes "Outsider. Welcome to Manuk, the village of the Sapha. I am its representative, Neat Etorr.";
next;
mes "[Neat Etorr]";
mes "We are just a small village, nothing special... but rest comfortably.";
close;
- }
- else if (ins_nyd == 203) {
+ } else if (ins_nyd == 203) {
mes "I was waiting for you. It's good that you're safe. Did you find anything?";
next;
select("Explain the sudden leave of the Guardian.");
@@ -1392,20 +1277,17 @@ man_in01,311,57,3 script Neat Etorr#edq 453,3,3,{
getitem 6080,10; //Manuk_Coin
set ins_nyd,132;
close;
- }
- else if (ins_nyd == 132) {
+ } else if (ins_nyd == 132) {
mes "Strange one, thank you for helping us in the time of need. I will never forget your kindness.";
close;
- }
- else {
+ } else {
mes "Outsider. Welcome to the Manuk village of Sapha. I am its representative, Neat Etorr.";
next;
mes "[Neat Etorr]";
mes "We are just a small village, nothing special... but rest comfortably.";
close;
}
- }
- else {
+ } else {
mes "Tkeh likek Ohek QekhlHkl PkedlioH.";
close;
}
@@ -1484,8 +1366,7 @@ man_in01,291,62,3 script Laphine Prisoner#edq 437,3,3,{
case 4:
close;
}
- }
- else if (ins_nyd == 92) {
+ } else if (ins_nyd == 92) {
mes "The sapha tribe went as far as cooperating with an unknown race?";
next;
mes "[Laphine Prisoner]";
@@ -1541,8 +1422,7 @@ man_in01,291,62,3 script Laphine Prisoner#edq 437,3,3,{
mes "I have already told you everything you wanted to hear. If you have any other requests, please let me know.";
set ins_nyd,102;
close;
- }
- else if (ins_nyd == 102) {
+ } else if (ins_nyd == 102) {
mes "Ah, you said that there is a strange power blocking the entrance to the Guardian's nest, right?";
next;
mes "[Laphine Prisoner]";
@@ -1583,19 +1463,16 @@ man_in01,291,62,3 script Laphine Prisoner#edq 437,3,3,{
mes "Please meet the Guardian, and come back with an answer to everything. And tell the answer to...";
set ins_nyd,112;
close;
- }
- else if ((ins_nyd == 71) || (ins_nyd == 81) || (ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 121) || (ins_nyd == 131)) {
+ } else if ((ins_nyd == 71) || (ins_nyd == 81) || (ins_nyd == 91) || (ins_nyd == 101) || (ins_nyd == 111) || (ins_nyd == 121) || (ins_nyd == 131)) {
mes "... ...";
next;
mes "[Manuk Guard]";
mes "Hey, outsider! Step away from the prisoner!";
close;
- }
- else if (ins_nyd == 112) {
+ } else if (ins_nyd == 112) {
mes "Please meet the Guardian, and come back with an answer to everything. And tell the answer to...";
close;
- }
- else if (ins_nyd == 132) {
+ } else if (ins_nyd == 132) {
mes "Yes...I heard your conversation with the Sapha tribe...";
next;
mes "[Laphine Prisoner]";
@@ -1610,16 +1487,14 @@ man_in01,291,62,3 script Laphine Prisoner#edq 437,3,3,{
mes "[Laphine Prisoner]";
mes "It's...it's better if you don't believe the one called Etorr...the minds of the Sapha tribe is unpredictable.";
close;
- }
- else {
+ } else {
mes "... ...";
next;
mes "[Manuk Guard]";
mes "Hey, outsider! Step away from the prisoner!";
close;
}
- }
- else {
+ } else {
mes "AmanVilShar Ie DorLuShar Mu Re";
close;
}
@@ -1648,7 +1523,7 @@ OnTouch_:
mes "[World Tree World Tree Yggdrasil]";
mes "It's all over... servants of the Guardian... Hurry up and leave this place.";
next;
- while (1) {
+ while(1) {
switch(select("Who are you?:What do you mean?")) {
case 1:
mes "[World Tree World Tree Yggdrasil]";
@@ -1713,12 +1588,13 @@ OnTouch_:
mes "[World Tree Yggdrasil]";
mes "Are you willing to accept this mission? Even if it means to pay with your life?";
next;
- if(select("Leave it to us.:We can't do it.")==2) close;
+ if(select("Leave it to us.:We can't do it.") == 2)
+ close;
mes "[World Tree Yggdrasil]";
mes "I thank you deeply for your decision. I will use what is left of my powers to open up the path towards the Guardian's Nest.";
next;
mes "[World Tree Yggdrasil]";
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
mes "The path to the Guardian's Nest is just past the waterfall by the large World Tree Yggdrasil to the North. The defensive mechanisms of the Sanctuary will start immediately.";
next;
mes "[World Tree Yggdrasil]";
@@ -1733,8 +1609,8 @@ OnTouch_:
mes "[World Tree Yggdrasil]";
mes "And... Be careful... Be careful of the shadow's power.";
set 'ins_nyd2,1;
- donpcevent instance_npcname("ins_nyd_1f_timer", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_call_mon_1", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("ins_nyd_1f_timer")+"::OnEnable";
+ donpcevent instance_npcname("nyd_call_mon_1")+"::OnEnable";
close;
} else {
mes "The path to the Guardian's Nest is just past the waterfall by the large World Tree Yggdrasil to the North. The defensive mechanisms will start immediately.";
@@ -1752,8 +1628,7 @@ OnTouch_:
mes "And... Be careful... Be careful of the shadow's power.";
close;
}
- }
- else if ('ins_nyd2 == 1) {
+ } else if ('ins_nyd2 == 1) {
mes "[World Tree Yggdrasil]";
mes "The path to the Guardian's Nest is just past the waterfall by the large World Tree Yggdrasil to the North. The defensive mechanisms will start immediately.";
next;
@@ -1763,8 +1638,7 @@ OnTouch_:
mes "[World Tree Yggdrasil]";
mes "The gate will open soon. Go defeat all of the guardians.";
close;
- }
- else if ('ins_nyd2 == 2) {
+ } else if ('ins_nyd2 == 2) {
mes "[World Tree Yggdrasil]";
mes "The path to the Guardian's Nest is just past the waterfall by the large World Tree Yggdrasil to the North.";
next;
@@ -1772,11 +1646,9 @@ OnTouch_:
mes "Use your powers... and destroy the vile Shadow...";
next;
mes "[World Tree Yggdrasil]";
- mes "This is.. all I can do for you...";
+ mes "This is... all I can do for you...";
close;
-
- }
- else {
+ } else {
mes "[World Tree Yggdrasil]";
mes "Those who want to taint the sacred Sanctuary of the Guardian... Get out.";
warp "mid_camp",100,100;
@@ -1791,121 +1663,139 @@ OnTouch:
close;
}
end;
+
+OnInstanceInit: // Temporary fix for @reloadscript.
+ set 'ins_nyd2,0;
+ end;
}
1@nyd,1,1,0 script nyd_call_mon_1 -1,{
OnInstanceInit:
- enablenpc instance_npcname("nyd_call_mon_1", instance_id());
+ enablenpc instance_npcname("nyd_call_mon_1");
end;
OnEnable:
- monster "1@nyd",220,250,"Nidhoggur's Guardian#1",2020,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",220,252,"Nidhoggur's Guardian#2",2020,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",240,270,"Nidhoggur's Guardian#3",2020,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",240,272,"Nidhoggur's Guardian#4",2020,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",200,200,"Nidhoggur's Guardian#5",2020,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",210,210,"Nidhoggur's Guardian#6",2020,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",225,265,"Nidhoggur's Guardian#7",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",225,270,"Nidhoggur's Guardian#8",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",245,235,"Nidhoggur's Guardian#9",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",255,255,"Nidhoggur's Guardian#10",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",225,245,"Nidhoggur's Guardian#11",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- monster "1@nyd",230,280,"Nidhoggur's Guardian#12",2021,1,instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- instance_announce -1, "Nidhoggur's Guardian : Protect the Guardian's Sanctuary. Get rid of the intruders.",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@nyd");
+ monster .@map$,220,250,"Nidhoggur's Guardian#1",2020,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,220,252,"Nidhoggur's Guardian#2",2020,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,240,270,"Nidhoggur's Guardian#3",2020,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,240,272,"Nidhoggur's Guardian#4",2020,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,200,200,"Nidhoggur's Guardian#5",2020,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,210,210,"Nidhoggur's Guardian#6",2020,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,225,265,"Nidhoggur's Guardian#7",2021,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,225,270,"Nidhoggur's Guardian#8",2021,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,245,235,"Nidhoggur's Guardian#9",2021,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,255,255,"Nidhoggur's Guardian#10",2021,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,225,245,"Nidhoggur's Guardian#11",2021,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ monster .@map$,230,280,"Nidhoggur's Guardian#12",2021,1,instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ mapannounce .@map$, "Nidhoggur's Guardian : Protect the Guardian's Sanctuary. Get rid of the intruders.",bc_map,"0x00ff99";
end;
OnDisable:
- killmonster "1@nyd",instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead";
- disablenpc instance_npcname("nyd_call_mon_1", instance_id());
+ killmonster instance_mapname("1@nyd"),instance_npcname("nyd_call_mon_1")+"::OnMyMobDead";
+ disablenpc instance_npcname("nyd_call_mon_1");
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("1@nyd", instance_npcname("nyd_call_mon_1", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@nyd");
+ set .@mob_dead_num,mobcount(.@map$, instance_npcname("nyd_call_mon_1")+"::OnMyMobDead");
if (.@mob_dead_num < 1) {
- instance_announce -1, "All of Nidhoggur's Guardians have been defeated!",bc_map,"0x00ff99";
- donpcevent instance_npcname("ins_nyd_1f_timer", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_to2f_warp", instance_id())+"::OnEnable";
+ mapannounce .@map$, "All of Nidhoggur's Guardians have been defeated!",bc_map,"0x00ff99";
+ donpcevent instance_npcname("ins_nyd_1f_timer")+"::OnDisable";
+ donpcevent instance_npcname("nyd_to2f_warp")+"::OnEnable";
set 'ins_nyd2,2;
}
end;
}
1@nyd,1,2,0 script ins_nyd_1f_timer -1,{
-
OnInstanceInit:
- disablenpc instance_npcname("ins_nyd_1f_timer", instance_id());
+ disablenpc instance_npcname("ins_nyd_1f_timer");
end;
OnEnable:
- enablenpc instance_npcname("ins_nyd_1f_timer", instance_id());
+ enablenpc instance_npcname("ins_nyd_1f_timer");
initnpctimer;
end;
OnDisable:
- disablenpc instance_npcname("ins_nyd_1f_timer", instance_id());
+ disablenpc instance_npcname("ins_nyd_1f_timer");
stopnpctimer;
- killmonsterall "1@nyd";
+ killmonsterall instance_mapname("1@nyd");
end;
OnTimer900000:
- instance_announce -1, "World Tree Yggdrasil : There's not much time left. Please hurry.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@nyd"), "World Tree Yggdrasil : There's not much time left. Please hurry.",bc_map,"0xFFFF00";
end;
OnTimer1200000:
- instance_announce -1, "World Tree Yggdrasil : My powers are slowly disappearing. Please hurry.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@nyd"), "World Tree Yggdrasil : My powers are slowly disappearing. Please hurry.",bc_map,"0xFFFF00";
end;
OnTimer1500000:
- instance_announce -1, "World Tree Yggdrasil : I'm... almost at my limit... please hurry up." ,bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@nyd"), "World Tree Yggdrasil : I'm... almost at my limit... please hurry up.",bc_map,"0xFFFF00";
end;
OnTimer1800000:
- instance_announce -1, "World Tree Yggdrasil : You've failed... but I will use what power I have left... to send you out of here.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@nyd"), "World Tree Yggdrasil : You've failed... but I will use what power I have left... to send you out of here.",bc_map,"0xFFFF00";
end;
OnTimer1830000:
- instance_announce -1, "Opening of the Gate has failed.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@nyd"), "Opening of the Gate has failed.",bc_map,"0xFFFF00";
end;
OnTimer1850000:
- donpcevent instance_npcname("ins_nyd_1f_timer", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_call_mon_1", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("ins_nyd_1f_timer")+"::OnDisable";
+ donpcevent instance_npcname("nyd_call_mon_1")+"::OnDisable";
instance_warpall "mid_camp",310,150;
stopnpctimer;
end;
}
1@nyd,195,320,0 script nyd_to2f_warp 45,5,5,{
-
OnInstanceInit:
- disablenpc instance_npcname("nyd_to2f_warp", instance_id());
+OnDisable:
+ disablenpc instance_npcname("nyd_to2f_warp");
end;
OnEnable:
- enablenpc instance_npcname("nyd_to2f_warp", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_to2f_warp", instance_id());
+ enablenpc instance_npcname("nyd_to2f_warp");
end;
OnTouch:
- warp "2@nyd",200,10;
+ set 'ins_nyd2,3;
+ warp instance_mapname("2@nyd"),200,10;
end;
}
1@nyd,1,1,0 script ins_nyd1_spawn_mobs -1,{
OnInstanceInit:
- monster "1@nyd",0,0,"Ancient Tree",2019,20;
- monster "1@nyd",0,0,"Rhyncho",2020,15;
- monster "1@nyd",0,0,"Phylla",2021,15;
- monster "1@nyd",0,0,"Aqua Elemental",2016,15;
- monster "1@nyd",0,0,"Dark Pinguicula",2015,15;
- monster "1@nyd",0,0,"Ancient Tree",2019,20;
- monster "1@nyd",0,0,"Rhyncho",2020,15;
- monster "1@nyd",0,0,"Phylla",2021,15;
- monster "1@nyd",0,0,"Aqua Elemental",2016,15;
- monster "1@nyd",0,0,"Dark Pinguicula",2015,15;
+ set .@map$, instance_mapname("1@nyd");
+ monster .@map$,0,0,"Ancient Tree",2019,40,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyTreeDead";
+ monster .@map$,0,0,"Rhyncho",2020,30,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyRhynDead";
+ monster .@map$,0,0,"Phylla",2021,30,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyPhyDead";
+ monster .@map$,0,0,"Aqua Elemental",2016,30,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyAquaDead";
+ monster .@map$,0,0,"Dark Pinguicula",2015,30,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyPingDead";
+ end;
+
+OnMyTreeDead:
+ monster instance_mapname("1@nyd"),0,0,"Ancient Tree",2019,1,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyTreeDead";
+ end;
+
+OnMyRhynDead:
+ monster instance_mapname("1@nyd"),0,0,"Rhyncho",2020,1,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyRhynDead";
+ end;
+
+OnMyPhyDead:
+ monster instance_mapname("1@nyd"),0,0,"Phylla",2021,1,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyPhyDead";
+ end;
+
+OnMyAquaDead:
+ monster instance_mapname("1@nyd"),0,0,"Aqua Elemental",2016,1,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyAquaDead";
+ end;
+
+OnMyPingDead:
+ monster instance_mapname("1@nyd"),0,0,"Dark Pinguicula",2015,1,instance_npcname("ins_nyd1_spawn_mobs")+"::OnMyPingDead";
end;
}
@@ -1913,41 +1803,35 @@ OnInstanceInit:
//============================================================
2@nyd,200,14,0 script nyd_2f_enter -1,6,6,{
OnTouch_:
- donpcevent instance_npcname("nyd_2f_enter_broad", instance_id())+"::OnEnable";
- disablenpc instance_npcname("nyd_2f_enter", instance_id());
+ donpcevent instance_npcname("nyd_2f_enter_broad")+"::OnEnable";
+ disablenpc instance_npcname("nyd_2f_enter");
end;
}
2@nyd,1,1,0 script nyd_2f_enter_broad -1,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_enter_broad", instance_id());
+OnDisable:
+ disablenpc instance_npcname("nyd_2f_enter_broad");
end;
OnEnable:
- enablenpc instance_npcname("nyd_2f_enter_broad", instance_id());
+ enablenpc instance_npcname("nyd_2f_enter_broad");
initnpctimer;
end;
-OnDisable:
- disablenpc instance_npcname("nyd_2f_enter_broad", instance_id());
- end;
-
OnTimer12000:
- instance_announce -1, "Nidhoggur's Shadow : No more...I can't stand this anymore...",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@nyd"), "Nidhoggur's Shadow : No more... I can't stand this anymore...",bc_map,"0xFFFF00";
end;
OnTimer15000:
- instance_announce -1, "Nidhoggur's Shadow : I need...I need the World Tree Yggdrasil's powers...",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@nyd"), "Nidhoggur's Shadow : I need... I need the World Tree Yggdrasil's powers...",bc_map,"0xFFFF00";
end;
OnTimer18000:
- instance_announce -1, "Nidhoggur's Shadow : Destroy...everything...",bc_map,"0xFFFF00";
- end;
- /*
+ mapannounce instance_mapname("2@nyd"), "Nidhoggur's Shadow : Destroy... everything...",bc_map,"0xFFFF00";
stopnpctimer;
- disablenpc instance_npcname("nyd_2f_enter_broad", instance_id());
+ disablenpc instance_npcname("nyd_2f_enter_broad");
end;
- */
}
2@nyd,199,178,0 script nyd_2f_ddr_control -1,6,6,{
@@ -1957,19 +1841,15 @@ OnTouch:
next;
mes "The strange power slowly surrounds your body, the dimension is starting to shift.";
close2;
- warp "2@nyd",199,255;
+ warp instance_mapname("2@nyd"),199,255;
end;
}
2@nyd,199,268,0 script nyd_2f_boss_enter -1,8,8,{
-OnInstanceInit:
- enablenpc instance_npcname("nyd_2f_boss_enter", instance_id());
- end;
-
OnTouch_:
- if (getpartyleader(getcharid(1),2) == getcharid(0)) {
- donpcevent instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnEnable";
- disablenpc instance_npcname("nyd_2f_boss_enter", instance_id());
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::OnEnable";
+ disablenpc instance_npcname("nyd_2f_boss_enter");
end;
}
end;
@@ -1977,84 +1857,83 @@ OnTouch_:
2@nyd,2,2,0 script nyd_2f_boss_enter_call -1,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_boss_enter_call", instance_id());
+ disablenpc instance_npcname("nyd_2f_boss_enter_call");
end;
OnEnable:
- enablenpc instance_npcname("nyd_2f_boss_enter_call", instance_id());
- monster "2@nyd",199,327,"Nidhoggur's Shadow#",2022,1,instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnMyMobDead";
- instance_announce -1, "Nidhoggur's Shadow : I will devour all of you...you and the World Tree Yggdrasil.",bc_map,"0x00ff99";
- //donpcevent instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::Ongo";
+ enablenpc instance_npcname("nyd_2f_boss_enter_call");
+ set .@map$, instance_mapname("2@nyd");
+ monster .@map$,199,327,"Nidhoggur's Shadow",2022,1,instance_npcname("nyd_2f_boss_enter_call")+"::OnMyMobDead";
+ mapannounce .@map$, "Nidhoggur's Shadow : I will devour all of you... you and the World Tree Yggdrasil.",bc_map,"0x00ff99";
+ //donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::Ongo";
initnpctimer;
end;
OnDisable:
- disablenpc instance_npcname("nyd_2f_boss_enter_call", instance_id());
- killmonster "2@nyd",instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("2@nyd"),instance_npcname("nyd_2f_boss_enter_call")+"::OnMyMobDead";
+ disablenpc instance_npcname("nyd_2f_boss_enter_call");
end;
OnTimer180000:
- set .@rullet,rand(1,4);
- if (.@rullet == 1) {
- instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,278;
+ stopnpctimer;
+OnWarpColor:
+ set .@map$, instance_mapname("2@nyd");
+ switch(rand(1,4)) {
+ case 1:
+ mapannounce .@map$, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("nyd_2f_white")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_yellow")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_green")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_red")+"::OnEnable";
+ instance_warpall .@map$,115,278;
end;
- }
- else if (.@rullet == 2) {
- instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,373;
+ case 2:
+ mapannounce .@map$, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("nyd_2f_red")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_yellow")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_green")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_white")+"::OnEnable";
+ instance_warpall .@map$,115,373;
end;
- }
- else if (.@rullet == 3) {
- instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,278;
+ case 3:
+ mapannounce .@map$, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("nyd_2f_red")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_white")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_green")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_yellow")+"::OnEnable";
+ instance_warpall .@map$,284,278;
end;
- }
- else if (.@rullet == 4) {
- instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,374;
+ case 4:
+ mapannounce .@map$, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("nyd_2f_red")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_white")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_yellow")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_green")+"::OnEnable";
+ instance_warpall .@map$,284,374;
end;
}
- stopnpctimer;
end;
OnMyMobDead:
- set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- instance_announce -1, "Nidhoggur's Shadow : World Tree Yggdrasil's guardian... his powers are disappearing...",bc_map,"0x00ff99";
- donpcevent instance_npcname("World Tree Yggdrasil#2F", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_boss_enter_call", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green_c", instance_id())+"::OnDisable";
+ set .@map$, instance_mapname("2@nyd");
+ if (mobcount(.@map$,instance_npcname("nyd_2f_boss_enter_call")+"::OnMyMobDead") < 1) {
+ mapannounce .@map$, "Nidhoggur's Shadow : World Tree Yggdrasil's guardian... his powers are disappearing...",bc_map,"0x00ff99";
+ donpcevent instance_npcname("World Tree Yggdrasil#2F")+"::OnEnable";
+ donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_boss_enter_logic")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_red_c")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_white_c")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_yellow_c")+"::OnDisable";
+ donpcevent instance_npcname("nyd_2f_green_c")+"::OnDisable";
+ set 'ins_nyd2,4;
end;
}
- else {
- end;
- }
+ end;
}
2@nyd,2,4,0 script nyd_2f_boss_enter_logic -1,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_boss_enter_logic", instance_id());
+ disablenpc instance_npcname("nyd_2f_boss_enter_logic");
end;
OnEnable:
@@ -2064,48 +1943,12 @@ OnEnable:
OnDisable:
stopnpctimer;
- disablenpc instance_npcname("nyd_2f_boss_enter_logic", instance_id());
+ disablenpc instance_npcname("nyd_2f_boss_enter_logic");
end;
OnTimer180000:
- set .@rullet,rand(1,4);
- if (.@rullet == 1) {
- instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,278;
- end;
- }
- else if (.@rullet == 2) {
- instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,373;
- end;
- }
- else if (.@rullet == 3) {
- instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,278;
- end;
- }
- else if (.@rullet == 4) {
- instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,374;
- end;
- }
stopnpctimer;
+ donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::OnWarpColor";
end;
}
@@ -2145,684 +1988,298 @@ OnTimer180000:
}
OnInstanceInit:
- disablenpc instance_npcname("World Tree Yggdrasil#2F", instance_id());
+OnDisable:
+ disablenpc instance_npcname("World Tree Yggdrasil#2F");
end;
OnEnable:
- enablenpc instance_npcname("World Tree Yggdrasil#2F", instance_id());
- instance_announce -1, "World Tree Yggdrasil : You did good. Have everyone go to the Magic Circle in the middle, and get ready for the destruction of the nest.",bc_map,"0x00ff99";
- end;
-
-OnDisable:
- disablenpc instance_npcname("World Tree Yggdrasil#2F", instance_id());
+ enablenpc instance_npcname("World Tree Yggdrasil#2F");
+ mapannounce instance_mapname("2@nyd"), "World Tree Yggdrasil : You did good. Have everyone go to the Magic Circle in the middle, and get ready for the destruction of the nest.",bc_map,"0x00ff99";
end;
}
2@nyd,115,278,0 script nyd_2f_red -1,5,5,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_red", instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname("nyd_2f_red", instance_id());
- donpcevent instance_npcname("nyd_2f_red_warp1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_red_warp2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_red_warp3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_red_c", instance_id())+"::OnEnable";
+ enablenpc instance_npcname(strnpcinfo(0));
+ donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(0)+"_c")+"::OnEnable";
initnpctimer;
end;
OnDisable:
- donpcevent instance_npcname("nyd_2f_red_warp1", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red_warp2", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red_warp3", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_red", instance_id());
+ donpcevent instance_npcname(strnpcinfo(0)+"_warp1")+"::OnDisable";
+ donpcevent instance_npcname(strnpcinfo(0)+"_warp2")+"::OnDisable";
+ donpcevent instance_npcname(strnpcinfo(0)+"_warp3")+"::OnDisable";
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnTouch:
- percentheal -50,0;
- percentheal -30,0;
- sc_start SC_BLOODING,60000,0;
+ if (compare(strnpcinfo(0),"red")) {
+ percentheal -50,0;
+ percentheal -30,0;
+ sc_start SC_BLEEDING,60000,0;
+ } else if (compare(strnpcinfo(0),"white")) {
+ percentheal -50,0;
+ sc_start SC_FREEZE,20000,0;
+ } else if (compare(strnpcinfo(0),"yellow")) {
+ percentheal 0,-50;
+ sc_start SC_SLEEP,20000,0;
+ sc_start SC_CONFUSION,60000,0;
+ } else if (compare(strnpcinfo(0),"green")) {
+ percentheal -50,-50;
+ sc_start SC_POISON,60000,0;
+ }
end;
OnTimer10000:
- disablenpc instance_npcname("nyd_2f_red", instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
stopnpctimer;
end;
}
2@nyd,6,6,0 script nyd_2f_red_c -1,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_red_c", instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname("nyd_2f_red_c", instance_id());
+ enablenpc instance_npcname(strnpcinfo(0));
initnpctimer;
- monster "2@nyd",120,285,"Nidhoggur's Guardian#1",2020,1,instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",119,286,"Nidhoggur's Guardian#2",2020,1,instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",120,270,"Nidhoggur's Guardian#3",2020,1,instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",119,269,"Nidhoggur's Guardian#4",2021,1,instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",118,270,"Nidhoggur's Guardian#5",2021,1,instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead";
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- instance_announce -1, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
- donpcevent instance_npcname("nyd_2f_red_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
- end;
+ set .@map$, instance_mapname("2@nyd");
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ if (compare(strnpcinfo(0),"red")) {
+ monster .@map$,120,285,"Nidhoggur's Guardian#1",2020,1,.@label$;
+ monster .@map$,119,286,"Nidhoggur's Guardian#2",2020,1,.@label$;
+ monster .@map$,120,270,"Nidhoggur's Guardian#3",2020,1,.@label$;
+ monster .@map$,119,269,"Nidhoggur's Guardian#4",2021,1,.@label$;
+ monster .@map$,118,270,"Nidhoggur's Guardian#5",2021,1,.@label$;
+ } else if (compare(strnpcinfo(0),"white")) {
+ monster .@map$,120,380,"Nidhoggur's Guardian#1",2020,1,.@label$;
+ monster .@map$,119,381,"Nidhoggur's Guardian#2",2020,1,.@label$;
+ monster .@map$,120,367,"Nidhoggur's Guardian#3",2020,1,.@label$;
+ monster .@map$,119,366,"Nidhoggur's Guardian#4",2021,1,.@label$;
+ monster .@map$,118,365,"Nidhoggur's Guardian#5",2021,1,.@label$;
+ } else if (compare(strnpcinfo(0),"yellow")) {
+ monster .@map$,282,284,"Nidhoggur's Guardian#1",2020,1,.@label$;
+ monster .@map$,283,283,"Nidhoggur's Guardian#2",2020,1,.@label$;
+ monster .@map$,280,275,"Nidhoggur's Guardian#3",2020,1,.@label$;
+ monster .@map$,281,276,"Nidhoggur's Guardian#4",2021,1,.@label$;
+ monster .@map$,281,277,"Nidhoggur's Guardian#5",2021,1,.@label$;
+ } else if (compare(strnpcinfo(0),"green")) {
+ monster .@map$,282,378,"Nidhoggur's Guardian#1",2020,1,.@label$;
+ monster .@map$,283,377,"Nidhoggur's Guardian#2",2020,1,.@label$;
+ monster .@map$,280,368,"Nidhoggur's Guardian#3",2020,1,.@label$;
+ monster .@map$,281,368,"Nidhoggur's Guardian#4",2021,1,.@label$;
+ monster .@map$,281,367,"Nidhoggur's Guardian#5",2021,1,.@label$;
}
end;
-OnDisable:
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_red_c", instance_id());
- stopnpctimer;
- end;
-
-OnTimer180000:
- killmonster "2@nyd",instance_npcname("nyd_2f_red_c", instance_id())+"::OnMyMobDead";;
- stopnpctimer;
- set .@rullet,rand(1,4);
- if (.@rullet == 1) {
- instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,278;
- end;
- }
- else if (.@rullet == 2) {
- instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,373;
- end;
- }
- else if (.@rullet == 3) {
- instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,278;
- end;
- }
- else if (.@rullet == 4) {
- instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,374;
+OnMyMobDead:
+ set .@map$, instance_mapname("2@nyd");
+ if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) {
+ mapannounce .@map$, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
+ donpcevent instance_npcname("nyd_2f_boss_enter_logic")+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
end;
}
end;
-}
-2@nyd,130,298,0 script nyd_2f_red_warp1 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_red_warp1", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_red_warp1", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_red_warp1", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",115,278;
- end;
-}
-
-2@nyd,142,296,0 script nyd_2f_red_warp2 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_red_warp2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_red_warp2", instance_id());
+/*
+OnReset: // Label not called.
+ killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
end;
+*/
OnDisable:
- disablenpc instance_npcname("nyd_2f_red_warp2", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",115,278;
- end;
-}
-
-2@nyd,145,283,0 script nyd_2f_red_warp3 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_red_warp3", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_red_warp3", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_red_warp3", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",115,278;
- end;
-}
-
-2@nyd,115,373,0 script nyd_2f_white -1,5,5,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_white", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_white", instance_id());
- donpcevent instance_npcname("nyd_2f_white_warp1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_white_warp2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_white_warp3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_white_c", instance_id())+"::OnEnable";
- initnpctimer;
- end;
-
-OnDisable:
- donpcevent instance_npcname("nyd_2f_white_warp1", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white_warp2", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white_warp3", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_white", instance_id());
- end;
-
-OnTouch:
- percentheal -50,0;
- sc_start SC_FREEZE,20000,0;
- end;
-
-OnTimer10000:
- disablenpc instance_npcname("nyd_2f_white", instance_id());
- stopnpctimer;
- end;
-}
-
-2@nyd,6,7,0 script nyd_2f_white_c -1,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_white_c", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_white_c", instance_id());
- initnpctimer;
- monster "2@nyd",120,380,"Nidhoggur's Guardian#1",2020,1,instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",119,381,"Nidhoggur's Guardian#2",2020,1,instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",120,367,"Nidhoggur's Guardian#3",2020,1,instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",119,366,"Nidhoggur's Guardian#4",2021,1,instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",118,365,"Nidhoggur's Guardian#5",2021,1,instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead";
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- instance_announce -1, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
- donpcevent instance_npcname("nyd_2f_white_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
- end;
- }
- end;
-
-OnDisable:
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_white_c", instance_id());
stopnpctimer;
+ killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; //custom
+ donpcevent instance_npcname(substr(strnpcinfo(0),0,getstrlen(strnpcinfo(0))-3))+"::OnDisable";
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnTimer180000:
- killmonster "2@nyd",instance_npcname("nyd_2f_white_c", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("2@nyd"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
stopnpctimer;
- set .@rullet,rand(1,4);
- if (.@rullet == 1) {
- instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,278;
- end;
- }
- else if (.@rullet == 2) {
- instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,373;
- end;
- }
- else if (.@rullet == 3) {
- instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,278;
- end;
- }
- else if (.@rullet == 4) {
- instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,374;
- end;
- }
+ donpcevent instance_npcname("nyd_2f_boss_enter_call")+"::OnWarpColor";
end;
}
-2@nyd,127,354,0 script nyd_2f_white_warp1 -1,6,6,{
+2@nyd,130,298,0 script nyd_2f_red_warp1 -1,6,6,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_white_warp1", instance_id());;
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_white_warp1", instance_id());;
- end;
-
OnDisable:
- disablenpc instance_npcname("nyd_2f_white_warp1", instance_id());;
- end;
-
-OnTouch:
- warp "2@nyd",115,373;
- end;
-}
-
-2@nyd,140,357,0 script nyd_2f_white_warp2 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_white_warp2", instance_id());;
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname("nyd_2f_white_warp2", instance_id());;
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_white_warp2", instance_id());;
+ enablenpc instance_npcname(strnpcinfo(0));
end;
OnTouch:
- warp "2@nyd",115,373;
+ if (compare(strnpcinfo(0),"red"))
+ warp instance_mapname("2@nyd"),115,278;
+ else if (compare(strnpcinfo(0),"white"))
+ warp instance_mapname("2@nyd"),115,373;
+ else if (compare(strnpcinfo(0),"yellow"))
+ warp instance_mapname("2@nyd"),284,278;
+ else if (compare(strnpcinfo(0),"green"))
+ warp instance_mapname("2@nyd"),284,374;
end;
}
+2@nyd,142,296,0 duplicate(nyd_2f_red_warp1) nyd_2f_red_warp2 -1,6,6
+2@nyd,145,283,0 duplicate(nyd_2f_red_warp1) nyd_2f_red_warp3 -1,6,6
+
+2@nyd,115,373,0 duplicate(nyd_2f_red) nyd_2f_white -1,5,5
+2@nyd,6,7,0 duplicate(nyd_2f_red_c) nyd_2f_white_c -1
+2@nyd,127,354,0 duplicate(nyd_2f_red_warp1) nyd_2f_white_warp1 -1,6,6,
+2@nyd,140,357,0 duplicate(nyd_2f_red_warp1) nyd_2f_white_warp2 -1,6,6
+2@nyd,145,367,0 duplicate(nyd_2f_red_warp1) nyd_2f_white_warp3 -1,6,6
+
+2@nyd,284,278,0 duplicate(nyd_2f_red) nyd_2f_yellow -1,5,5
+2@nyd,6,8,0 duplicate(nyd_2f_red_c) nyd_2f_yellow_c -1
+2@nyd,255,285,0 duplicate(nyd_2f_red_warp1) nyd_2f_yellow_warp1 -1,6,6
+2@nyd,257,296,0 duplicate(nyd_2f_red_warp1) nyd_2f_yellow_warp2 -1,6,6
+2@nyd,268,300,0 duplicate(nyd_2f_red_warp1) nyd_2f_yellow_warp3 -1,6,6
+
+2@nyd,284,374,0 duplicate(nyd_2f_red) nyd_2f_green -1,5,5
+2@nyd,6,9,0 duplicate(nyd_2f_red_c) nyd_2f_green_c -1
+2@nyd,274,356,0 duplicate(nyd_2f_red_warp1) nyd_2f_green_warp1 -1,6,6
+2@nyd,260,356,0 duplicate(nyd_2f_red_warp1) nyd_2f_green_warp2 -1,6,6
+2@nyd,258,368,0 duplicate(nyd_2f_red_warp1) nyd_2f_green_warp3 -1,6,6
-2@nyd,145,367,0 script nyd_2f_white_warp3 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_white_warp3", instance_id());;
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_white_warp3", instance_id());;
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_white_warp3", instance_id());;
- end;
-
-OnTouch:
- warp "2@nyd",115,373;
- end;
-}
-
-2@nyd,284,278,0 script nyd_2f_yellow -1,5,5,{
+2@nyd,1,1,0 script ins_nyd2_spawn_mobs -1,{
OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_yellow", instance_id());
+ set .@map$, instance_mapname("2@nyd");
+ areamonster .@map$,200,92,180,80,"Rhyncho",2020,40,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyRhynDead";
+ areamonster .@map$,200,92,180,80,"Phylla",2021,40,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyPhyDead";
+ areamonster .@map$,200,92,180,80,"Dark Shadow",2023,40,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyDarkshaDead";
+ areamonster .@map$,200,92,180,80,"Dark Pinguicula",2015,40,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyPingDead";
end;
-OnEnable:
- enablenpc instance_npcname("nyd_2f_yellow", instance_id());
- donpcevent instance_npcname("nyd_2f_yellow_warp1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_yellow_warp2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_yellow_warp3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnEnable";
- initnpctimer;
+OnMyRhynDead:
+ areamonster instance_mapname("2@nyd"),200,92,180,80,"Rhyncho",2020,1,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyRhynDead";
end;
-OnDisable:
- donpcevent instance_npcname("nyd_2f_yellow_warp1", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow_warp2", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow_warp3", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_yellow", instance_id());
+OnMyPhyDead:
+ areamonster instance_mapname("2@nyd"),200,92,180,80,"Phylla",2021,1,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyPhyDead";
end;
-OnTouch:
- percentheal 0,-50;
- sc_start SC_SLEEP,20000,0;
- sc_start SC_CONFUSION,60000,0;
+OnMyDarkshaDead:
+ areamonster instance_mapname("2@nyd"),200,92,180,80,"Dark Shadow",2023,1,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyDarkshaDead";
end;
-OnTimer10000:
- disablenpc instance_npcname("nyd_2f_yellow", instance_id());
- stopnpctimer;
+OnMyPingDead:
+ areamonster instance_mapname("2@nyd"),200,92,180,80,"Dark Pinguicula",2015,1,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyPingDead";
end;
}
-2@nyd,6,8,0 script nyd_2f_yellow_c -1,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_yellow_c", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_yellow_c", instance_id());
- initnpctimer;
- monster "2@nyd",282,284,"Nidhoggur's Guardian#1",2020,1,instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",283,283,"Nidhoggur's Guardian#2",2020,1,instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",280,275,"Nidhoggur's Guardian#3",2020,1,instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",281,276,"Nidhoggur's Guardian#4",2021,1,instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",281,277,"Nidhoggur's Guardian#5",2021,1,instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- instance_announce -1, "Nidhoggur's Shadow : You're not bad...but I will be your opponent this time.",bc_map,"0x00ff99";
- donpcevent instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
- end;
+// GM Management NPCs
+//============================================================
+sec_in02,36,167,3 script Nidhoggur Manager 447,1,1,{
+ callfunc "F_GM_NPC";
+ mes "Enter the password.";
+ next;
+ if (callfunc("F_GM_NPC","1854",1) == 0) {
+ mes "Incorrect password.";
+ close;
}
- else {
- end;
+ mes "What do you need to do?";
+ next;
+ switch(select("Reset variables to allow entrance to Nidhoggur:change variable 'ins_nyd':Remove 3 day timer 3135:Confirm variable number")) {
+ case 1:
+ set ins_nyd,200;
+ set ins_nyd2,0;
+ erasequest 3135;
+ mes "ins_nyd set to 200 ins_nyd2 set to 0";
+ mes "quest 3135 erased.";
+ close;
+ case 2:
+ mes "Which variable do you want to change?";
+ next;
+ switch(select("ins_nyd:ins_nyd2")) {
+ case 1: set .@var$,"ins_nyd"; break;
+ case 2: set .@var$,"ins_nyd2"; break;
+ }
+ mes "Input the variable number";
+ next;
+ input .@input;
+ setd .@var$, .@input;
+ mes .@var$+" has been set to "+.@input+" .";
+ close;
+ case 3:
+ mes "The 3 day timer will be removed when you close this dialog.";
+ next;
+ erasequest 3135;
+ mes "Finished removing Quest Timer.";
+ close;
+ case 4:
+ mes "ins_nyd is at "+ins_nyd+".";
+ mes "ins_nyd2 is at "+ins_nyd2+".";
+ close;
}
+}
-Onreset:
- killmonster "2@nyd",instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- donpcevent instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnDisable";
- end;
-
-OnDisable:
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_yellow_c", instance_id());
- stopnpctimer;
- end;
-
-OnTimer180000:
- killmonster "2@nyd",instance_npcname("nyd_2f_yellow_c", instance_id())+"::OnMyMobDead";
- stopnpctimer;
- set .@rullet,rand(1,4);
- if (.@rullet == 1) {
- instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,278;
- end;
- }
- else if (.@rullet == 2) {
- instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,373;
- end;
- }
- else if (.@rullet == 3) {
- instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,278;
- end;
+nyd_dun02,7,7,2 script Purification Admin#nyd2 844,2,0,{
+ callfunc "F_GM_NPC";
+ mes "Please enter the password";
+ set .@i, callfunc("F_GM_NPC","dragonslayer",1);
+ next;
+ if (.@i == 0) {
+ mes "Enter the password exactly.";
+ close;
}
- else if (.@rullet == 4) {
- instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,374;
- end;
+ switch(select("Generate Purification Stone:Remove Purification Stone:Turn Entrance NPC OFF:Turn Entrance NPC On:Cancel")) {
+ case 1:
+ mes "Purification stone has been created and will stay on for 30 minutes.";
+ donpcevent "Purification Stone#nyd2::OnEnable";
+ close;
+ case 2:
+ mes "The Purification Stone has been destroyed.";
+ donpcevent "Purification Stone#nyd2::OnDisable";
+ close;
+ case 3:
+ mes "The Yggdrasil Gatekeeper at nyd_dun02 100 201 is now OFF.";
+ disablenpc "Yggdrasil Gatekeeper";
+ close;
+ case 4:
+ mes "The Yggdrasil Gatekeeper at nyd_dun02 100 201 is now On.";
+ enablenpc "Yggdrasil Gatekeeper";
+ close;
+ case 5:
+ close;
}
- end;
-}
-
-2@nyd,255,285,0 script nyd_2f_yellow_warp1 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_yellow_warp1", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_yellow_warp1", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_yellow_warp1", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",284,278;
- end;
-}
-
-2@nyd,257,296,0 script nyd_2f_yellow_warp2 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_yellow_warp2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_yellow_warp2", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_yellow_warp2", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",284,278;
- end;
}
-2@nyd,268,300,0 script nyd_2f_yellow_warp3 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_yellow_warp3", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_yellow_warp3", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_yellow_warp3", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",284,278;
- end;
-}
-
-2@nyd,284,374,0 script nyd_2f_green -1,5,5,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_green", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_green", instance_id());
- donpcevent instance_npcname("nyd_2f_green_warp1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_green_warp2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_green_warp3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("nyd_2f_green_c", instance_id())+"::OnEnable";
- initnpctimer;
- end;
-
-OnDisable:
- donpcevent instance_npcname("nyd_2f_green_warp1", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green_warp2", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green_warp3", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_green", instance_id());
- end;
-
-OnTouch:
- percentheal -50,-50;
- sc_start SC_POISON,60000,0;
- end;
-
-OnTimer10000:
- disablenpc instance_npcname("nyd_2f_green", instance_id());
- stopnpctimer;
- end;
-}
-
-2@nyd,6,9,0 script nyd_2f_green_c -1,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_green_c", instance_id());
+nyd_dun02,88,195,4 script Purification Stone#nyd2 406,{
+ erasequest 3135;
+ erasequest 3136;
+ set ins_nyd,200;
+ set ins_nyd2,0;
+ mes "^0000FFThe records and after-effect related to the Nidhoggur's Nest have been removed. You can generate and enter the dungeon again.^000000";
+ close;
+OnInit:
+ disablenpc "Purification Stone#nyd2";
end;
-
OnEnable:
- enablenpc instance_npcname("nyd_2f_green_c", instance_id());
initnpctimer;
- monster "2@nyd",282,378,"Nidhoggur's Guardian#1",2020,1,instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",283,377,"Nidhoggur's Guardian#2",2020,1,instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",280,368,"Nidhoggur's Guardian#3",2020,1,instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",281,368,"Nidhoggur's Guardian#4",2021,1,instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
- monster "2@nyd",281,367,"Nidhoggur's Guardian#5",2021,1,instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
- end;
-
-OnMyMobDead:
- set .@mob_dead_num,mobcount("2@nyd",instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead");
- if (.@mob_dead_num < 1) {
- instance_announce -1, "Nidhoggur's Shadow : You're not bad... but I will be your opponent this time.",bc_map,"0x00ff99";
- donpcevent instance_npcname("nyd_2f_green_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_boss_enter_logic", instance_id())+"::OnEnable";
- end;
- }
- else {
- end;
- }
-
-Onreset:
- killmonster "2@nyd",instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
- donpcevent instance_npcname("nyd_2f_green_c", instance_id())+"::OnDisable";
end;
-
OnDisable:
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- disablenpc instance_npcname("nyd_2f_green_c", instance_id());
- stopnpctimer;
- end;
-
-OnTimer180000:
- killmonster "2@nyd",instance_npcname("nyd_2f_green_c", instance_id())+"::OnMyMobDead";
stopnpctimer;
- set .@rullet,rand(1,4);
- if (.@rullet == 1) {
- instance_announce -1, "Nidhoggur's Shadow : In this chaos... your blood is just what I need.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,278;
- end;
- }
- else if (.@rullet == 2) {
- instance_announce -1, "Nidhoggur's Shadow : I will freeze every last drop of your blood.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",115,373;
- end;
- }
- else if (.@rullet == 3) {
- instance_announce -1, "Nidhoggur's Shadow : Sleep for eternity in an empty illusion.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,278;
- end;
- }
- else if (.@rullet == 4) {
- instance_announce -1, "Nidhoggur's Shadow : I'll let you enjoy the pain of dying slowly.",bc_map,"0xFFFF00";
- donpcevent instance_npcname("nyd_2f_red", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_white", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_yellow", instance_id())+"::OnDisable";
- donpcevent instance_npcname("nyd_2f_green", instance_id())+"::OnEnable";
- instance_warpall "2@nyd",284,374;
- end;
- }
- end;
-}
-
-2@nyd,274,356,0 script nyd_2f_green_warp1 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_green_warp1", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_green_warp1", instance_id());
+ disablenpc "Purification Stone#nyd2";
end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_green_warp1", instance_id());
+OnTimer1000:
+ enablenpc "Purification Stone#nyd2";
end;
-
-OnTouch:
- warp "2@nyd",284,374;
+OnTimer1740000:
+ mapannounce "nyd_dun02","The Purification Stone will be destroyed in one minute.",bc_map,"0x00FF99",FW_NORMAL,12;
end;
-}
-
-2@nyd,260,356,0 script nyd_2f_green_warp2 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_green_warp2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_green_warp2", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_green_warp2", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",284,374;
- end;
-}
-
-2@nyd,258,368,0 script nyd_2f_green_warp3 -1,6,6,{
-OnInstanceInit:
- disablenpc instance_npcname("nyd_2f_green_warp3", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("nyd_2f_green_warp3", instance_id());
- end;
-
-OnDisable:
- disablenpc instance_npcname("nyd_2f_green_warp3", instance_id());
- end;
-
-OnTouch:
- warp "2@nyd",284,374;
- end;
-}
-
-2@nyd,1,1,0 script ins_nyd2_spawn_mobs -1,{
-OnInstanceInit:
- areamonster "2@nyd",200,92,180,80,"Rhyncho",2020,20;
- areamonster "2@nyd",200,92,180,80,"Phylla",2021,20;
- areamonster "2@nyd",200,92,180,80,"Dark Shadow",2023,20;
- areamonster "2@nyd",200,92,180,80,"Dark Pinguicula",2015,20;
- areamonster "2@nyd",200,92,180,80,"Rhyncho",2020,20;
- areamonster "2@nyd",200,92,180,80,"Phylla",2021,20;
- areamonster "2@nyd",200,92,180,80,"Dark Shadow",2023,20;
- areamonster "2@nyd",200,92,180,80,"Dark Pinguicula",2015,20;
+OnTimer1800000:
+ disablenpc "Purification Stone#nyd2";
end;
}
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index 325b1a739..03fa2da05 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -3,11 +3,14 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.6
+//= 1.7
//===== Description: =========================================
//= [Official Conversion]
//= Relive the memory of an orc.
-//===== Additional Comments: =================================
+//===== Description: =========================================
+//= [Official Conversion]
+//= Relive the memory of an orc.
+//===== Additional Comments: =================================
//= 1.0 First version. [L0ne_W0lf]
//= 1.1 First round of bugfixes. (bugreport:3928) [L0ne_W0lf]
//= Fixed some npcs calling wrong events.
@@ -27,7 +30,12 @@
//= 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.
+//= the invoking party meets the requirements to join the Memorial Dungeon.
+//= 1.7 Instance system rewrite. [Euphy]
+//============================================================
+
+1@orcs mapflag src4instance
+2@orcs mapflag src4instance
//============================================================
// Entrance
@@ -35,153 +43,77 @@
gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
set .@party_id,getcharid(1);
- set .@ins_mas,getpartyleader(.@party_id,1);
set .@p_name$,getpartyname(.@party_id);
- set .@p_leader$,rid2name(.@ins_mas);
set .@md_name$,"Orc's Memory";
- 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.";
+ if (!instance_check_party(.@party_id,2,30,80)) {
+ mes "Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon.";
close;
}
set .@orctime,checkquest(12059,PLAYTIME);
if (.@orctime == -1) {
- if (.@ins_mas == getcharid(3)) {
+ if (getcharid(0) == getpartyleader(.@party_id,2)) {
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 "Party Name: "+.@p_name$;
+ mes "Party Leader: "+strcharinfo(0);
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 (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;
+ mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance";
+ for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
+ if( instance_attachmap(.@i + "@orcs", .@instance) == "" )
+ break;
}
- if((party_instance_id3 != 0) && (party_instance_id3 != getcharid(1))) {
- 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.";
+ if( .@i < 2 ) {
+ instance_destroy(.@instance);
close;
}
- mapannounce "gef_fild10", .@p_leader$ + " of the party, " + .@p_name$ + " is entering the "+.@md_name$+".",bc_map,"0x00ff99";
- if (checkquest(12059)== -1) setquest 12059;
- set party_instance_id3,getcharid(1);
- warp "1@orcs",179,15;
- end;
+ instance_set_timeout 7200,300,.@instance;
+ instance_init(.@instance);
+ mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the "+.@md_name$+".";
+ close;
+ case 2:
+ callsub L_Enter,0;
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;
- }
- if((party_instance_id3 != 0) && (party_instance_id3 != getcharid(1))) {
- 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";
- set party_instance_id3,getcharid(1);
- if (checkquest(12059)== -1) setquest 12059;
- warp "1@orcs",179,15;
+ if(select(.@md_name$ + " Enter the Memorial Dungeon:Cancel") == 2)
end;
- case 2:
- close;
- }
+ callsub L_Enter,1;
} 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;
- }
- if((party_instance_id3 != 0) && (party_instance_id3 != getcharid(1))) {
- 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;
- set party_instance_id3,getcharid(1);
- warp "1@orcs",179,15;
- end;
- case 2:
+ if(select("Enter the Dungeon "+.@md_name$+":Cancel") == 2)
close;
- }
- }
- else if (.@orctime == 2) {
+ callsub L_Enter,0;
+ } 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";
- set party_instance_id3,0;
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;
+L_Enter:
+ 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 {
+ 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;
+ }
}
gef_fild10,238,202,6 script Mad Scientist#orc 865,{
@@ -189,10 +121,7 @@ gef_fild10,238,202,6 script Mad Scientist#orc 865,{
mes "The Mad Scientist doesn't seem to notice you and keeps mumbling to himself...";
close;
}
- if (mad > 1) {
- set mad,1;
- }
- else if (mad < 1) {
+ if (mad == 0) {
mes "[Mad Scientist]";
mes "Haha, no Orcs are coming near me!";
mes "The power of the Dimensional Gorge is undefeatable!!";
@@ -211,43 +140,39 @@ gef_fild10,238,202,6 script Mad Scientist#orc 865,{
next;
break;
}
- switch(select("Oh? Like what, travel to alternate space?")) {
- case 1:
- mes "[Mad Scientist]";
- mes "Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!";
- next;
- mes "[Mad Scientist]";
- mes "I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?";
- next;
- break;
- }
- switch(select("... Um, that doesn't sound legal?")) {
- case 1:
- mes "[Mad Scientist]";
- mes "Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!";
- next;
- mes "[Mad Scientist]";
- mes "Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!";
- next;
- break;
- }
+ select("Oh? Like what, travel to alternate space?");
+ mes "[Mad Scientist]";
+ mes "Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!";
+ next;
+ mes "[Mad Scientist]";
+ mes "I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?";
+ next;
+ select("...Um, that doesn't sound legal?");
+ mes "[Mad Scientist]";
+ mes "Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!";
+ next;
+ mes "[Mad Scientist]";
+ mes "Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!";
+ next;
switch(select("Alright... What do I do?:Umm, maybe not.")) {
case 1:
mes "[Mad Scientist]";
mes "Very good! Just sit in the hands of this statue! And try to act natural when you're in there!";
set mad,1;
- break;
+ close;
case 2:
mes "[Mad Scientist]";
mes "Oh fine, be that way!";
- break;
+ close;
}
- }
- else {
+ } else if (mad == 1) {
mes "[Mad Scientist]";
mes "Hmm? Put your hand on that Monemus Statue if you want to experience traveling through dimensions!";
+ close;
+ } else {
+ set mad,1;
+ end;
}
- close;
}
// Orc's Memory Floor 1
@@ -256,72 +181,43 @@ gef_fild10,238,202,6 script Mad Scientist#orc 865,{
end;
OnInstanceInit:
- disablenpc instance_npcname("#Resurrect Monsters1", instance_id());
+ disablenpc instance_npcname("#Resurrect Monsters1");
end;
OnDisable:
- killmonster "1@orcs",instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ stopnpctimer;
+ killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
end;
OnEnable:
- enablenpc instance_npcname("#Resurrect Monsters1", instance_id());
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Warrior",1023,1,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#Resurrect Monsters1");
+ monster instance_mapname("1@orcs"),0,0,"Orc Warrior",1023,30,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,30;
- set .@c_mob_num,mobcount("1@orcs",instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("1@orcs");
+ set .@mob_dead_num, 30 - mobcount(.@map$,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead");
if (.@mob_dead_num > 0) {
set .@mob_ran,rand(1,30);
if (.@mob_ran > 29) {
- monster "1@orcs",0,0,"Orc Warrior",1023,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Orc Warrior",1023,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
}
else if ((.@mob_ran > 28) && (.@mob_ran < 30)) {
- monster "1@orcs",0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce -1, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444";
+ mapannounce .@map$, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444";
}
}
else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
- areamonster "1@orcs",41,91,51,81,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,41,91,51,81,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce -1, "Where are the High Orcs!? Get them to stop the enemies!",bc_map,"0xff4444";
+ mapannounce .@map$, "Where are the High Orcs!? Get them to stop the enemies!",bc_map,"0xff4444";
}
}
else {
- areamonster "1@orcs",17,187,27,177,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,17,187,27,177,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
if (rand(1,5) == 3) {
- instance_announce -1, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77";
+ mapannounce .@map$, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77";
}
if (rand(1,100) == 50) {
initnpctimer;
@@ -331,12 +227,13 @@ OnMyMobDead:
end;
OnTimer10:
- instance_announce -1, "Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!",bc_map,"0xff4444";
+ mapannounce instance_mapname("1@orcs"), "Shouts of the Chief Orc of Safeguards: Looks like this will take longer than expected. Summon the Stalactic Golems!",bc_map,"0xff4444";
end;
OnTimer4010:
- instance_announce -1, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77";
- areamonster "1@orcs",17,187,27,177,"Stalactic Golem",1278,20,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@orcs");
+ mapannounce .@map$, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77";
+ areamonster .@map$,17,187,27,177,"Stalactic Golem",1278,20,instance_npcname("#Resurrect Monsters1")+"::OnMyMobDead";
stopnpctimer;
end;
}
@@ -345,44 +242,29 @@ OnTimer4010:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Resurrect Monsters2", instance_id());
+ disablenpc instance_npcname("#Resurrect Monsters2");
end;
OnDisable:
- killmonster "1@orcs",instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
end;
OnEnable:
- enablenpc instance_npcname("#Resurrect Monsters2", instance_id());
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Trained Wolf",1106,1,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#Resurrect Monsters2");
+ monster instance_mapname("1@orcs"),0,0,"Trained Wolf",1106,15,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,15;
- set .@c_mob_num,mobcount("1@orcs",instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("1@orcs");
+ set .@mob_dead_num, 15 - mobcount(.@map$,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead");
if (rand(1,30) > 15) {
if (.@mob_dead_num > 0) {
- monster "1@orcs",0,0,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
}
}
else {
if (.@mob_dead_num > 0) {
- areamonster "1@orcs",17,187,27,177,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,17,187,27,177,"Trained Wolf",1106,.@mob_dead_num,instance_npcname("#Resurrect Monsters2")+"::OnMyMobDead";
}
}
end;
@@ -392,53 +274,38 @@ OnMyMobDead:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Resurrect Monsters3", instance_id());
+ disablenpc instance_npcname("#Resurrect Monsters3");
end;
OnDisable:
- killmonster "1@orcs",instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
end;
OnEnable:
- enablenpc instance_npcname("#Resurrect Monsters3", instance_id());
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "1@orcs",0,0,"Orc Archer",1189,1,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#Resurrect Monsters3");
+ monster instance_mapname("1@orcs"),0,0,"Orc Archer",1189,15,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,15;
- set .@c_mob_num,mobcount("1@orcs",instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("1@orcs");
+ set .@mob_dead_num, 15 - mobcount(.@map$,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead");
set .@mob_ran,rand(1,30);
if (.@mob_ran > 29) {
if (.@mob_dead_num > 0) {
- monster "1@orcs",0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
}
}
else if ((.@mob_ran > 26) && (.@mob_ran < 30)) {
if (.@mob_dead_num > 0) {
- areamonster "1@orcs",43,155,47,159,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,43,155,47,159,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
if (rand(1,3) == 3) {
- instance_announce -1, "High Orc: Attack them from behind! Cut off their support!",bc_map,"0xff4444";
+ mapannounce .@map$, "High Orc: Attack them from behind! Cut off their support!",bc_map,"0xff4444";
}
}
}
else {
if (.@mob_dead_num > 0) {
- areamonster "1@orcs",17,187,27,177,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,17,187,27,177,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#Resurrect Monsters3")+"::OnMyMobDead";
}
}
end;
@@ -448,89 +315,83 @@ OnMyMobDead:
end;
OnInstanceInit:
- enablenpc instance_npcname("#Resurrect Monsters4", instance_id());
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- areamonster "1@orcs",98,35,178,115,"Anopheles",1627,1,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#Resurrect Monsters4");
+ areamonster instance_mapname("1@orcs"),98,35,178,115,"Anopheles",1627,10,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,10;
- set .@c_mob_num,mobcount("1@orcs",instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("1@orcs");
+ set .@mob_dead_num, 10 - mobcount(.@map$,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead");
if (.@mob_dead_num > 0) {
- monster "1@orcs",0,0,"Anopheles",1627,.@mob_dead_num,instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Anopheles",1627,.@mob_dead_num,instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead";
}
end;
OnDisable:
- killmonster "1@orcs",instance_npcname("#Resurrect Monsters4", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("1@orcs"),instance_npcname("#Resurrect Monsters4")+"::OnMyMobDead";
end;
}
-1@orcs,180,29,4 script Kurger#1-1 433,{
- donpcevent instance_npcname("Kurger#1-2", instance_id())+"::OnEnable";
+1@orcs,180,29,4 script Kruger#1-1 433,{
+ donpcevent instance_npcname("Kruger#1-2")+"::OnEnable";
end;
}
-1@orcs,180,29,4 script Kurger#1-2 433,{
+1@orcs,180,29,4 script Kruger#1-2 433,{
+ end;
+
+OnInstanceInit:
+ disablenpc instance_npcname("Kruger#1-2");
end;
OnEnable:
- disablenpc instance_npcname("Kurger#1-1", instance_id());
- enablenpc instance_npcname("Kurger#1-2", instance_id());
+ disablenpc instance_npcname("Kruger#1-1");
+ enablenpc instance_npcname("Kruger#1-2");
initnpctimer;
end;
OnTimer10:
- instance_announce -1, "Kruger: Damn... What took you so long!! I don't have all day!!",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: Damn... What took you so long!! I don't have all day!!",bc_map,"0xffff00";
end;
OnTimer5710:
- instance_announce -1, "Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman.",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: My plan was to let our comrades open the gate, but it's all ruined since I got busted by the Orc Shaman.",bc_map,"0xffff00";
end;
OnTimer14610:
- instance_announce -1, "Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!",bc_map,"0xff4444";
+ mapannounce instance_mapname("1@orcs"), "Shouts of the Chief Orc of Safeguards: I smell a rat.. Send some patrols to the entrance!!",bc_map,"0xff4444";
end;
OnTimer20210:
- instance_announce -1, "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00";
end;
OnTimer24910:
- instance_announce -1, "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00";
end;
OnTimer34310:
- instance_announce -1, "Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone.",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: Find those Enchanted Orcs and get rid of them to move to the next zone.",bc_map,"0xffff00";
end;
OnTimer39710:
- instance_announce -1, "Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor.",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: Try to avoid encountering Orcs other then the Enchanted ones. Everytime you kill a normal Orc, High Orcs will gather at the last path to the 2nd floor.",bc_map,"0xffff00";
end;
OnTimer49210:
- instance_announce -1, "Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible.",bc_map,"0xffff00";
+ mapannounce instance_mapname("1@orcs"), "Kruger: In the worst case, the path to the 2nd floor could be completely blocked. For your own sake, you should be as sneaky as possible.",bc_map,"0xffff00";
end;
OnTimer56310:
- instance_announce -1, "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff";
- donpcevent instance_npcname("#Resurrect Monsters1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("#Resurrect Monsters2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("#Resurrect Monsters3", instance_id())+"::OnEnable";
- disablenpc instance_npcname("Kurger#1-2", instance_id());
+ mapannounce instance_mapname("1@orcs"), "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff";
+ donpcevent instance_npcname("#Resurrect Monsters1")+"::OnEnable";
+ donpcevent instance_npcname("#Resurrect Monsters2")+"::OnEnable";
+ donpcevent instance_npcname("#Resurrect Monsters3")+"::OnEnable";
+ disablenpc instance_npcname("Kruger#1-2");
end;
OnTimer60000:
- areamonster "1@orcs",137,83,143,89,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs", instance_id())+"::OnMyMobDead";
+ areamonster instance_mapname("1@orcs"),137,83,143,89,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead";
stopnpctimer;
end;
@@ -538,106 +399,106 @@ OnTimer60000:
1@orcs,168,125,0 script B1 Area 1 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 1", instance_id());
+ disablenpc instance_npcname("B1 Area 1");
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 1", instance_id());
- areamonster "1@orcs",103,105,109,111,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs", instance_id())+"::OnMyMobDead1";
+ enablenpc instance_npcname("B1 Area 1");
+ areamonster instance_mapname("1@orcs"),103,105,109,111,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead1";
end;
OnTouch:
- warp "1@orcs",168,130;
+ warp instance_mapname("1@orcs"),168,130;
end;
OnContinue:
- donpcevent instance_npcname("B1 Area 2", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("B1 Area 2")+"::OnEnable";
initnpctimer;
end;
OnTimer10300:
- instance_announce -1, "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499";
+ mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499";
end;
OnTimer18700:
- instance_announce -1, "Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes.",bc_map,"0xff4499";
+ mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: There's nothing we can do but to defeat the Orc Shaman if we want to save the remaining tribes.",bc_map,"0xff4499";
stopnpctimer;
end;
}
1@orcs,89,94,0 script B1 Area 2 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 2", instance_id());
+ disablenpc instance_npcname("B1 Area 2");
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 2", instance_id());
- areamonster "1@orcs",32,40,38,46,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs", instance_id())+"::OnMyMobDead2";
+ enablenpc instance_npcname("B1 Area 2");
+ areamonster instance_mapname("1@orcs"),32,40,38,46,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead2";
end;
OnTouch:
- warp "1@orcs",85,85;
+ warp instance_mapname("1@orcs"),85,85;
end;
OnContinue:
- donpcevent instance_npcname("B1 Area 3", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("B1 Area 3")+"::OnEnable";
initnpctimer;
end;
OnTimer30300:
- instance_announce -1, "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499";
+ mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499";
end;
OnTimer37600:
- instance_announce -1, "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499";
+ mapannounce instance_mapname("1@orcs"), "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499";
stopnpctimer;
end;
}
1@orcs,38,105,0 script B1 Area 3 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 3", instance_id());
+ disablenpc instance_npcname("B1 Area 3");
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 3", instance_id());
- areamonster "1@orcs",19,177,25,183,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs", instance_id())+"::OnMyMobDead3";
+ enablenpc instance_npcname("B1 Area 3");
+ areamonster instance_mapname("1@orcs"),19,177,25,183,"Enchanted Orc",1023,1,instance_npcname("B1 Area Mobs")+"::OnMyMobDead3";
end;
OnTouch:
- warp "1@orcs",38,110;
+ warp instance_mapname("1@orcs"),38,110;
end;
OnContinue:
- donpcevent instance_npcname("B1 Area 4", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("B1 Area 4")+"::OnEnable";
initnpctimer;
end;
OnTimer30300:
- instance_announce -1, "Please, hang in there!",bc_map,"0xff4499";
+ mapannounce instance_mapname("1@orcs"), "Please, hang in there!",bc_map,"0xff4499";
end;
OnTimer32700:
- instance_announce -1, "We'll get some rest when we get to the 2nd basement after passing through here.",bc_map,"0xff4499";
+ mapannounce instance_mapname("1@orcs"), "We'll get some rest when we get to the 2nd basement after passing through here.",bc_map,"0xff4499";
stopnpctimer;
end;
}
1@orcs,21,189,0 script B1 Area 4 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("B1 Area 4", instance_id());
+ disablenpc instance_npcname("B1 Area 4");
end;
OnEnable:
- enablenpc instance_npcname("B1 Area 4", instance_id());
- donpcevent instance_npcname("#Resurrect Monsters1", instance_id())+"::OnDisable";
- donpcevent instance_npcname("#Resurrect Monsters2", instance_id())+"::OnDisable";
- donpcevent instance_npcname("#Resurrect Monsters3", instance_id())+"::OnDisable";
- donpcevent instance_npcname("#Resurrect Monsters4", instance_id())+"::OnDisable";
+ enablenpc instance_npcname("B1 Area 4");
+ donpcevent instance_npcname("#Resurrect Monsters1")+"::OnDisable";
+ donpcevent instance_npcname("#Resurrect Monsters2")+"::OnDisable";
+ donpcevent instance_npcname("#Resurrect Monsters3")+"::OnDisable";
+ donpcevent instance_npcname("#Resurrect Monsters4")+"::OnDisable";
end;
OnTouch:
- warp "2@orcs",32,171;
+ warp instance_mapname("2@orcs"),32,171;
end;
}
@@ -645,19 +506,19 @@ OnTouch:
end;
OnMyMobDead:
- donpcevent instance_npcname("B1 Area 1", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("B1 Area 1")+"::OnEnable";
end;
OnMyMobDead1:
- donpcevent instance_npcname("B1 Area 1", instance_id())+"::OnContinue";
+ donpcevent instance_npcname("B1 Area 1")+"::OnContinue";
end;
OnMyMobDead2:
- donpcevent instance_npcname("B1 Area 2", instance_id())+"::OnContinue";
+ donpcevent instance_npcname("B1 Area 2")+"::OnContinue";
end;
OnMyMobDead3:
- donpcevent instance_npcname("B1 Area 3", instance_id())+"::OnContinue";
+ donpcevent instance_npcname("B1 Area 3")+"::OnContinue";
end;
}
@@ -667,70 +528,40 @@ OnMyMobDead3:
end;
OnInstanceInit:
- disablenpc instance_npcname("#2Resurrect Monsters1", instance_id());
+ disablenpc instance_npcname("#2Resurrect Monsters1");
end;
OnEnable:
- enablenpc instance_npcname("#2Resurrect Monsters1", instance_id());
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Vengeful Orc",1152,1,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#2Resurrect Monsters1");
+ monster instance_mapname("2@orcs"),0,0,"Vengeful Orc",1152,30,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
end;
OnDisable:
- killmonster "2@orcs",instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ stopnpctimer;
+ killmonster instance_mapname("2@orcs"),instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,30;
- set .@c_mob_num,mobcount("2@orcs",instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("2@orcs");
+ set .@mob_dead_num, 30 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead");
if (.@mob_dead_num > 0) {
set .@mob_ran,rand(1,30);
if (.@mob_ran > 29) {
- monster "2@orcs",0,0,"Vengeful Orc",1152,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Vengeful Orc",1152,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
}
else if ((.@mob_ran > 28) && (.@mob_ran < 30)) {
- monster "2@orcs",0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
- set mob_ran2,rand(1,10);
+ monster .@map$,0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
}
else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
- areamonster "2@orcs",157,112,167,122,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,157,112,167,122,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce -1, "Warning: High Orcs are gathering near area 3.",bc_map,"0xff4444";
+ mapannounce .@map$, "Warning: High Orcs are gathering near area 3.",bc_map,"0xff4444";
}
}
else {
- areamonster "2@orcs",173,13,183,23,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,173,13,183,23,"High Orc",1213,.@mob_dead_num,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
if (rand(1,5) == 3) {
- instance_announce -1, "Caution: The Forces have started to concentrate at the Shaman's Altar.",bc_map,"0x77ff77";
+ mapannounce .@map$, "Caution: The Forces have started to concentrate at the Shaman's Altar.",bc_map,"0x77ff77";
}
if (rand(1,70) == 50) {
initnpctimer;
@@ -740,12 +571,13 @@ OnMyMobDead:
end;
OnTimer10:
- instance_announce -1, "Voice from somewhere: Foolish... Do you really think the altar would fall like that?",bc_map,"0xff4444";
+ mapannounce instance_mapname("2@orcs"), "Voice from somewhere: Foolish... Do you really think the altar would fall like that?",bc_map,"0xff4444";
end;
OnTimer4010:
- instance_announce -1, "[ Wraiths were summoned by an unknown power ]",bc_map,"0x77ff77";
- areamonster "2@orcs",167,25,177,35,"Wraith",1475,30,instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ set .@map$, instance_mapname("2@orcs");
+ mapannounce .@map$, "[ Wraiths were summoned by an unknown power ]",bc_map,"0x77ff77";
+ areamonster .@map$,167,25,177,35,"Wraith",1475,30,instance_npcname("#2Resurrect Monsters1")+"::OnMyMobDead";
stopnpctimer;
end;
}
@@ -754,55 +586,40 @@ OnTimer4010:
end;
OnInstanceInit:
- disablenpc instance_npcname("#2Resurrect Monsters3", instance_id());
+ disablenpc instance_npcname("#2Resurrect Monsters3");
end;
OnEnable:
- enablenpc instance_npcname("#2Resurrect Monsters3", instance_id());
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Orc Zombie",1153,1,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#2Resurrect Monsters3");
+ monster instance_mapname("2@orcs"),0,0,"Orc Zombie",1153,15,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,15;
- set .@c_mob_num,mobcount("2@orcs",instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("2@orcs");
+ set .@mob_dead_num, 15 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead");
set .@mob_ran,rand(1,30);
if (.@mob_ran > 29) {
if (.@mob_dead_num > 0) {
- monster "2@orcs",0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
}
}
else if ((.@mob_ran > 6) && (.@mob_ran < 30)) {
if (.@mob_dead_num > 0) {
- areamonster "2@orcs",168,10,184,26,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,168,10,184,26,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
if (rand(1,15) == 3) {
- instance_announce -1, "Warning: Orc Archer teams are gathering near the altar.",bc_map,"0xff4444";
+ mapannounce .@map$, "Warning: Orc Archer teams are gathering near the altar.",bc_map,"0xff4444";
}
}
}
else {
if (.@mob_dead_num > 0) {
- areamonster "2@orcs",168,21,184,21,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ areamonster .@map$,168,21,184,21,"Orc Archer",1189,.@mob_dead_num,instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
}
}
end;
OnDisable:
- killmonster "2@orcs",instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("2@orcs"),instance_npcname("#2Resurrect Monsters3")+"::OnMyMobDead";
end;
}
@@ -810,164 +627,85 @@ OnDisable:
end;
OnInstanceInit:
- enablenpc instance_npcname("#2Resurrect Monsters4", instance_id());
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("#2Resurrect Monsters4");
+ monster instance_mapname("2@orcs"),0,0,"Anopheles",1627,10,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@callnum,10;
- set .@c_mob_num,mobcount("2@orcs",instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead");
- set .@mob_dead_num,.@callnum - .@c_mob_num;
+ set .@map$, instance_mapname("2@orcs");
+ set .@mob_dead_num, 10 - mobcount(.@map$,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead");
if (.@mob_dead_num > 0) {
- monster "2@orcs",0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Anopheles",1627,1,instance_npcname("#2Resurrect Monsters4")+"::OnMyMobDead";
}
end;
}
2@orcs,35,169,4 script Kruger#2-1 433,{
- donpcevent instance_npcname("Kruger#2-2", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Kruger#2-2")+"::OnEnable";
end;
}
2@orcs,35,169,4 script Kruger#2-2 433,{
end;
+OnInstanceInit:
+ disablenpc instance_npcname("Kruger#2-2");
+ end;
+
OnEnable:
- disablenpc instance_npcname("Kruger#2-1", instance_id());
- enablenpc instance_npcname("Kruger#2-2", instance_id());
+ disablenpc instance_npcname("Kruger#2-1");
+ enablenpc instance_npcname("Kruger#2-2");
initnpctimer;
end;
OnTimer10:
- instance_announce -1, "Kruger's Whisper: I'll tell you how to get to the Shaman's altar.",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: I'll tell you how to get to the Shaman's altar.",bc_map,"0xffff00";
end;
OnTimer3510:
- instance_announce -1, "Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames.",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Do you see the braziers that light the path? Unseal the next zone by strengthening their flames.",bc_map,"0xffff00";
end;
OnTimer10710:
- instance_announce -1, "Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily.",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Of course those monsters won't let you touch the braziers that easily.",bc_map,"0xffff00";
end;
OnTimer16310:
- instance_announce -1, "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00";
end;
OnTimer21910:
- instance_announce -1, "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00";
end;
OnTimer23910:
- instance_announce -1, "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff";
- donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("Torch#1-1", instance_id())+"::OnEnable";
- disablenpc instance_npcname("Kruger#2-2", instance_id());
+ mapannounce instance_mapname("2@orcs"), "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff";
+ donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnEnable";
+ donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnEnable";
+ donpcevent instance_npcname("Torch#1-1")+"::OnEnable";
+ disablenpc instance_npcname("Kruger#2-2");
end;
}
2@orcs,26,164,0 script Torch#1-1 844,{
if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#1-2", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#1-1", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#1-1", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#1-1", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,55,155,0 script Torch#1-2 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#1-3", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#1-2", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#1-2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#1-2", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,108,146,0 script Torch#1-3 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#1-4", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#1-3", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#1-3", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#1-3", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,98,171,0 script Torch#1-4 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("#Warp2-1", instance_id())+"::OnEnable";
+ setarray .@id[0], atoi(charat(strnpcinfo(2),0)), atoi(charat(strnpcinfo(2),2));
+ if (.@id[1] == 4)
+ donpcevent instance_npcname("#Warp2-"+.@id[0])+"::OnEnable";
+ else
+ donpcevent instance_npcname("Torch#"+.@id[0]+"-"+(.@id[1]+1))+"::OnEnable";
initnpctimer;
- disablenpc instance_npcname("Torch#1-4", instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnInstanceInit:
- disablenpc instance_npcname("Torch#1-4", instance_id());
+ if (strnpcinfo(0) != "Torch#2-1" && strnpcinfo(0) != "Torch#3-1")
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname("Torch#1-4", instance_id());
+ enablenpc instance_npcname(strnpcinfo(0));
end;
OnTimer100:
@@ -979,285 +717,109 @@ OnTimer2000:
stopnpctimer;
end;
}
+2@orcs,55,155,0 duplicate(Torch#1-1) Torch#1-2 844
+2@orcs,108,146,0 duplicate(Torch#1-1) Torch#1-3 844
+2@orcs,98,171,0 duplicate(Torch#1-1) Torch#1-4 844
2@orcs,48,100,0 script #Warp2-1 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp2-1", instance_id());
+ disablenpc instance_npcname("#Warp2-1");
end;
OnEnable:
- monster "2@orcs",109,156,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead1";
- instance_announce -1, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888";
+ set .@map$, instance_mapname("2@orcs");
+ monster .@map$,109,156,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control")+"::OnMyMobDead1";
+ mapannounce .@map$, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888";
end;
OnContinue:
- enablenpc instance_npcname("#Warp2-1", instance_id());
+ enablenpc instance_npcname("#Warp2-1");
initnpctimer;
end;
OnTimer10000:
- areamonster "2@orcs",28,158,40,170,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead1";
+ areamonster instance_mapname("2@orcs"),28,158,40,170,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control")+"::OnMyMobDead1";
stopnpctimer;
end;
OnTouch:
- warp "2@orcs",47,93;
+ warp instance_mapname("2@orcs"),47,93;
end;
}
-2@orcs,35,92,0 script Torch#2-1 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#2-2", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#2-1", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,32,70,0 script Torch#2-2 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#2-3", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#2-2", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#2-2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#2-2", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,70,31,0 script Torch#2-3 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#2-4", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#2-3", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#2-3", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#2-3", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,84,51,0 script Torch#2-4 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("#Warp2-2", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#2-4", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#2-4", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#2-4", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
+2@orcs,35,92,0 duplicate(Torch#1-1) Torch#2-1 844
+2@orcs,32,70,0 duplicate(Torch#1-1) Torch#2-2 844
+2@orcs,70,31,0 duplicate(Torch#1-1) Torch#2-3 844
+2@orcs,84,51,0 duplicate(Torch#1-1) Torch#2-4 844
2@orcs,101,55,0 script #Warp2-2 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp2-2", instance_id());
+ disablenpc instance_npcname("#Warp2-2");
end;
OnEnable:
- monster "2@orcs",67,64,"Orc Sniper",1982,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead2";
- instance_announce -1, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888";
+ set .@map$, instance_mapname("2@orcs");
+ monster .@map$,67,64,"Orc Sniper",1982,1,instance_npcname("#Mobs Control")+"::OnMyMobDead2";
+ mapannounce .@map$, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888";
end;
OnContinue:
- enablenpc instance_npcname("#Warp2-2", instance_id());
+ enablenpc instance_npcname("#Warp2-2");
initnpctimer;
end;
OnTimer10000:
- areamonster "2@orcs",40,91,52,103,"Orc Sniper",1982,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead2";
+ areamonster instance_mapname("2@orcs"),40,91,52,103,"Orc Sniper",1982,1,instance_npcname("#Mobs Control")+"::OnMyMobDead2";
stopnpctimer;
end;
OnTouch:
- warp "2@orcs",107,55;
+ warp instance_mapname("2@orcs"),107,55;
end;
}
-2@orcs,142,145,0 script Torch#3-1 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#3-2", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#3-1", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,162,134,0 script Torch#3-2 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#3-3", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#3-2", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#3-2", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#3-2", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,144,117,0 script Torch#3-3 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("Torch#3-4", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#3-3", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#3-3", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#3-3", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
-
-2@orcs,136,98,0 script Torch#3-4 844,{
- if(getpartyleader(getcharid(1),2) != getcharid(0)) end;
- progressbar "ffff00",5;
- donpcevent instance_npcname("#Warp2-3", instance_id())+"::OnEnable";
- initnpctimer;
- disablenpc instance_npcname("Torch#3-4", instance_id());
- end;
-
-OnInstanceInit:
- disablenpc instance_npcname("Torch#3-4", instance_id());
- end;
-
-OnEnable:
- enablenpc instance_npcname("Torch#3-4", instance_id());
- end;
-
-OnTimer100:
- specialeffect EF_FIREPILLAR;
- end;
-
-OnTimer2000:
- specialeffect EF_FIREPILLARBOMB;
- stopnpctimer;
- end;
-}
+2@orcs,142,145,0 duplicate(Torch#1-1) Torch#3-1 844
+2@orcs,162,134,0 duplicate(Torch#1-1) Torch#3-2 844
+2@orcs,144,117,0 duplicate(Torch#1-1) Torch#3-3 844
+2@orcs,136,98,0 duplicate(Torch#1-1) Torch#3-4 844
2@orcs,167,104,0 script #Warp2-3 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp2-3", instance_id());
+ disablenpc instance_npcname("#Warp2-3");
end;
OnEnable:
- monster "2@orcs",152,147,"Depraved Orc Spirit",1983,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead3";
- instance_announce -1, "Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!",bc_map,"0xff8888";
+ set .@map$, instance_mapname("2@orcs");
+ monster .@map$,152,147,"Depraved Orc Spirit",1983,1,instance_npcname("#Mobs Control")+"::OnMyMobDead3";
+ mapannounce .@map$, "Depraved Orc Spirit: I smell flesh! Hungry! Wanna try some human meat!!",bc_map,"0xff8888";
end;
OnContinue:
- //areamonster "2@orcs",117,61,129,73,"Depraved Orc Spirit",1983,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead3";
- donpcevent instance_npcname("#Boss Control", instance_id())+"::OnEnable";
- enablenpc instance_npcname("#Warp2-3", instance_id());
+ areamonster instance_mapname("2@orcs"),117,61,129,73,"Depraved Orc Spirit",1983,1;
+ donpcevent instance_npcname("#Boss Control")+"::OnEnable";
+ enablenpc instance_npcname("#Warp2-3");
initnpctimer;
end;
OnTimer10:
- instance_announce -1, "Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet.",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Shaman Cargalache: Hahaha!! So, you finally made it here. The assassin you sent was just terrible. That stupid Orc is getting cold under my feet.",bc_map,"0xffff00";
end;
OnTimer6810:
- instance_announce -1, "Shaman Cargalache: My loyal slave, go get those intruders!",bc_map,"0xffff00";
+ mapannounce instance_mapname("2@orcs"), "Shaman Cargalache: My loyal slave, go get those intruders!",bc_map,"0xffff00";
end;
OnTimer10310:
- instance_announce -1, "Depraved Orc Hero: Whatever you say, my lord.",bc_map,"0xff7777";
+ mapannounce instance_mapname("2@orcs"), "Depraved Orc Hero: Whatever you say, my lord.",bc_map,"0xff7777";
end;
OnTimer13110:
- instance_announce -1, "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
+ mapannounce instance_mapname("2@orcs"), "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
stopnpctimer;
end;
OnTouch:
- warp "2@orcs",167,95;
+ warp instance_mapname("2@orcs"),167,95;
end;
}
@@ -1265,46 +827,48 @@ OnTouch:
end;
OnInstanceInit:
- disablenpc instance_npcname("#Boss Control", instance_id());
+ disablenpc instance_npcname("#Boss Control");
end;
OnEnable:
- monster "2@orcs",185,8,"Shaman Cargalache",1984,1,instance_npcname("#Boss Control", instance_id())+"::OnMyMobDead";
- monster "2@orcs",179,15,"Depraved Orc Hero",1087,1;
- enablenpc instance_npcname("#Boss Control", instance_id());
+ set .@map$, instance_mapname("2@orcs");
+ monster .@map$,185,8,"Shaman Cargalache",1984,1,instance_npcname("#Boss Control")+"::OnMyMobDead";
+ monster .@map$,179,15,"Depraved Orc Hero",1087,1;
+ enablenpc instance_npcname("#Boss Control");
end;
OnMyMobDead:
- donpcevent instance_npcname("Kruger#", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Kruger#")+"::OnEnable";
+ set .@map$, instance_mapname("2@orcs");
set .@mob_ran,rand(1,5);
if (.@mob_ran == 1) {
- instance_announce -1, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
+ mapannounce .@map$, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
}
else if (.@mob_ran == 2) {
- instance_announce -1, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
+ mapannounce .@map$, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
}
else if (.@mob_ran == 3) {
- instance_announce -1, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
+ mapannounce .@map$, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
}
else if (.@mob_ran == 4) {
- instance_announce -1, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
+ mapannounce .@map$, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
}
else {
- instance_announce -1, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
+ mapannounce .@map$, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
}
- donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnDisable";
- donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnDisable";
- donpcevent instance_npcname("#Warp Outside Orc Dun", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnDisable";
+ donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnDisable";
+ donpcevent instance_npcname("#Warp Outside Orc Dun")+"::OnEnable";
end;
}
2@orcs,182,8,0 script #Warp Outside Orc Dun 45,3,3,{
OnInstanceInit:
- disablenpc instance_npcname("#Warp Outside Orc Dun", instance_id());
+ disablenpc instance_npcname("#Warp Outside Orc Dun");
end;
OnEnable:
- enablenpc instance_npcname("#Warp Outside Orc Dun", instance_id());
+ enablenpc instance_npcname("#Warp Outside Orc Dun");
end;
OnTouch:
@@ -1345,11 +909,11 @@ OnTouch:
}
OnInstanceInit:
- disablenpc instance_npcname("Kruger#", instance_id());
+ disablenpc instance_npcname("Kruger#");
end;
OnEnable:
- enablenpc instance_npcname("Kruger#", instance_id());
+ enablenpc instance_npcname("Kruger#");
end;
}
@@ -1357,14 +921,14 @@ OnEnable:
end;
OnMyMobDead1:
- donpcevent instance_npcname("#Warp2-1", instance_id())+"::OnContinue";
+ donpcevent instance_npcname("#Warp2-1")+"::OnContinue";
end;
OnMyMobDead2:
- donpcevent instance_npcname("#Warp2-2", instance_id())+"::OnContinue";
+ donpcevent instance_npcname("#Warp2-2")+"::OnContinue";
end;
OnMyMobDead3:
- donpcevent instance_npcname("#Warp2-3", instance_id())+"::OnContinue";
+ donpcevent instance_npcname("#Warp2-3")+"::OnContinue";
end;
-}
+} \ No newline at end of file
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index b893a1816..8f911b120 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -3,11 +3,11 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 2.2
-//===== Description: =========================================
+//= 2.3
+//===== Description: =========================================
//= [Official Conversion]
//= Seal away the Great Demon Baphomet.
-//===== Additional Comments: =================================
+//===== Additional Comments: =================================
//= 1.0 First version. [L0ne_W0lf]
//= 1.1 Added setquest for instance cooldown. [L0ne_W0lf]
//= 1.2 Fixed Torch#12 not being disabled. (bugreport:4044) [L0ne_w0lf]
@@ -19,11 +19,16 @@
//= 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.
+//= the invoking party meets the requirements to join the Memorial Dungeon.
//= 1.9 Fixed broken else/if chaining. [Joseph]
//= 2.0 Some optimization. [Euphy]
//= 2.1 Fixed quest being removed before the 12 hours cool down. [Joseph]
//= 2.2 Removed extra setquest (quest id:3040). [Joseph]
+//= 2.3 Instance system rewrite. [Euphy]
+//============================================================
+
+1@cata mapflag src4instance
+2@cata mapflag src4instance
//============================================================
// Sealed Catacomb Entrance
@@ -92,7 +97,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
}
break;
case 2:
- if (BaseLevel > 74) {
+ if (BaseLevel >= 75) {
set .@party_id,getcharid(1);
@@ -105,22 +110,16 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
// 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 (getpartyleader(.@party_id,2) == getcharid(0)) {
- set .@instance, instance_create("Sealed Catacombs", .@party_id);
+ if (getpartyleader(.@party_id,2) == getcharid(0) && instance_check_party(.@party_id,2,75)) {
+ mes "[Friar Patrick]";
+ mes "Party name is "+getpartyname(.@party_id)+"...";
+ mes "Name of the leader is "+strcharinfo(0)+"...";
+ set .@instance, instance_create("Sealed Catacomb",.@party_id);
if (.@instance < 0) {
- mes "[Friar Patrick]";
- mes "Party name is "+getpartyname(.@party_id)+"...";
- mes "Name of the leader is "+.@partymembername$[0]+"...";
mes "Umm... But it seems that there is a problem here... I'll check quickly. Please wait.";
}
else {
-
for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
if( instance_attachmap("" + .@i + "@cata", .@instance) == "" )
break;
@@ -130,47 +129,9 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
close;
}
- instance_attach(.@instance);
instance_set_timeout 7200,300,.@instance;
instance_init(.@instance);
-
- // First Floor
- disablenpc instance_npcname("Ancient Hero's Soul#1F", instance_id());
- disablenpc instance_npcname("ins_bapho_to_2f", instance_id());
-
- for( set .@i, 1; .@i < 13; set .@i, .@i + 1 ) {
- disablenpc instance_npcname("Gravestone#1F_"+.@i+"T", instance_id());
- disablenpc instance_npcname("Gravestone#1F_"+.@i+"F", instance_id());
- }
- for( set .@i, 1; .@i <= 12; set .@i, .@i + 1 ) {
- disablenpc instance_npcname("Bobbing Torch#"+.@i, instance_id());
- }
-
- // Second Floor
- disablenpc instance_npcname("ins_baphomet_1f_timer", instance_id());
- disablenpc instance_npcname("ins_2f_enter_broad", instance_id());
- disablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
- disablenpc instance_npcname("Ancient Hero's Soul#2F", instance_id());
- disablenpc instance_npcname("control_baphomet", instance_id());
- disablenpc instance_npcname("ins_2f_hero_broad2", instance_id());
- disablenpc instance_npcname("2f_callmon_pattern_c", instance_id());
- disablenpc instance_npcname("2f_callmon_pattern", instance_id());
- disablenpc instance_npcname("ins_2f_hero_pattern_c", instance_id());
- disablenpc instance_npcname("ins_2f_hero_pattern", instance_id());
-
- // Pick proper grave
- donpcevent instance_npcname("ins_baphomet_lotto", instance_id())+"::OnEnable";
-
- // Spawn monsters.
- donpcevent instance_npcname("ins_1f_spawn_mobs", instance_id())+"::OnEnable";
-
- mes "[Friar Patrick]";
- mes "Party name is "+getpartyname(.@party_id)+"...";
- mes "Name of the leader is "+.@partymembername$[0]+"...";
+
mes "Okay... I'll adjust the shrine's seal so that you and your group can enter.";
next;
mes "[Friar Patrick]";
@@ -208,10 +169,9 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "[Friar Patrick]";
mes "Haaaaaaap... Hocus Pocus Wingardium Abracadabra!!!!!";
next;
- if (checkquest(3040)>=0) erasequest 3040;
+ erasequest 3040;
if (checkquest(3041)>=0) erasequest 3041;
if (checkquest(3045)>=0) erasequest 3045;
- set party_instance_id4,0;
mes "[Friar Patrick]";
mes "Huu... It's over. Now that I've released Baphomet's Curse, you can enter again.";
}
@@ -260,55 +220,44 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
if (countitem(6002)) delitem 6002,countitem(6002); //Token_Of_Apostle
mes "This gravestone has a carving of a wicked devil with large horns. It arouses an ominous feeling.";
next;
- switch(select("Touch the stone.:Step back.")) {
- case 1:
- set .@party_id,getcharid(1);
-
- // 12 hour cooldown
- set .@ins_bapho_check,checkquest(3040,PLAYTIME);
- // 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.";
+ if(select("Touch the stone.:Step back.") == 2)
+ close;
+
+ // 12 hour cooldown
+ set .@ins_bapho_check,checkquest(3040,PLAYTIME);
+ // Two hour play limit
+ //set .@ins_bapho_check2,checkquest(3045,PLAYTIME);
+
+ if (.@ins_bapho_check == -1) {
+ if (has_instance("1@cata") == "") {
+ mes "It's cold to the touch. It doesn't respond.";
close;
- }
- if (.@ins_bapho_check == -1) {
- if (has_instance("1@cata") == "") {
- mes "It's cold to the touch. It doesn't respond.";
- } else if((party_instance_id4 != 0) && (party_instance_id4 != getcharid(1))) {
- 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.";
- } 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;
- set party_instance_id4,getcharid(1);
- warp "1@cata",100,224;
- end;
- }
- } 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.";
- } else if (.@ins_bapho_check == 2) {
- mes "[Friar Patrick]";
- mes "Umm... It seems the curse of Baphomet weakened. I'll clear the bad curse.";
- next;
- mes "[Friar Patrick]";
- mes "Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!";
- specialeffect2 EF_HOLYHIT;
- if (checkquest(3040)>=0) erasequest 3040;
- if (checkquest(3041)>=0) erasequest 3041;
- if (checkquest(3045)>=0) erasequest 3045;
- set party_instance_id4,0;
- next;
- mes "[Friar Patrick]";
- mes "Huu... It's over. Now I released all of the curses on you. You can enter again.";
- }
- break;
- case 2:
- break;
+ } else {
+ mapannounce "monk_test","[" + strcharinfo(0) + "] member of the [" + getpartyname(.@party_id) + "] party has entered the Sealed Shrine.",bc_map,"0x00ff99";
+ setquest 3040;
+ warp "1@cata",100,224;
+ end;
+ }
+ } 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.";
+ close;
+ } else if (.@ins_bapho_check == 2) {
+ mes "[Friar Patrick]";
+ mes "Umm... It seems the curse of Baphomet weakened. I'll clear the bad curse.";
+ next;
+ mes "[Friar Patrick]";
+ mes "Haaaaaaap... Wingardium Leviosa Expecto Patronum !!!!!";
+ specialeffect2 EF_HOLYHIT;
+ erasequest 3040;
+ if (checkquest(3041)>=0) erasequest 3041;
+ if (checkquest(3045)>=0) erasequest 3045;
+ next;
+ mes "[Friar Patrick]";
+ mes "Huu... It's over. Now I released all of the curses on you. You can enter again.";
+ close;
}
- close;
}
prt_monk,261,91,3 script Rust Blackhand#edq 826,{
@@ -340,7 +289,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
delitem 2256,1; //Magestic_Goat
delitem 7799,30; //Dark_Crystal
delitem 7798,50; //Dark_Debris
- set zeny,zeny-990000;
+ set Zeny, Zeny-990000;
completequest 3043;
getitem 5374,1; //L_Magestic_Goat
mes "[Rust Blackhand]";
@@ -481,250 +430,52 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
// Sealed Shrine Interior
//============================================================
1@cata,1,2,0 script ins_baphomet_lotto -1,{
-OnEnable:
- switch(rand(1,13)) {
- case 1:
- enablenpc instance_npcname("Gravestone#1F_1T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 2:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 3:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 4:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 5:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 6:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 7:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 8:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 9:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 10:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 11:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 12:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12T", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13F", instance_id());
- end;
- case 13:
- enablenpc instance_npcname("Gravestone#1F_1F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_2F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_3F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_4F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_5F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_6F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_7F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_8F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_9F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_10F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_11F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_12F", instance_id());
- enablenpc instance_npcname("Gravestone#1F_13T", instance_id());
- end;
+OnInstanceInit:
+ // Pick one "true" Gravestone and 12 "false" Gravestones.
+ set .@true, rand(1,13);
+ for(set .@i,1; .@i<13; set .@i,.@i+1) {
+ disablenpc instance_npcname("Gravestone#1F_1"+((.@i == .@true)?"F":"T"));
}
+ disablenpc instance_npcname("ins_baphomet_lotto");
end;
}
1@cata,3,2,0 script ins_baphomet_lotto2 -1,{
OnEnable:
- enablenpc instance_npcname("Bobbing Torch#1", instance_id());
- enablenpc instance_npcname("Bobbing Torch#2", instance_id());
- enablenpc instance_npcname("Bobbing Torch#3", instance_id());
- enablenpc instance_npcname("Bobbing Torch#4", instance_id());
- enablenpc instance_npcname("Bobbing Torch#5", instance_id());
- enablenpc instance_npcname("Bobbing Torch#6", instance_id());
- enablenpc instance_npcname("Bobbing Torch#7", instance_id());
- enablenpc instance_npcname("Bobbing Torch#8", instance_id());
- enablenpc instance_npcname("Bobbing Torch#9", instance_id());
- enablenpc instance_npcname("Bobbing Torch#10", instance_id());
- enablenpc instance_npcname("Bobbing Torch#11", instance_id());
- enablenpc instance_npcname("Bobbing Torch#12", instance_id());
+ for(set .@i,1; .@i<12; set .@i,.@i+1)
+ enablenpc instance_npcname("Bobbing Torch#"+.@i);
end;
}
1@cata,4,2,0 script ins_baphomet_lotto3 -1,{
OnEnable:
- monster "1@cata",0,0,"Apostle of Baphomet",1869,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1291,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1869,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1291,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1869,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1291,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1869,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1132,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1117,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1132,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1117,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1132,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1291,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1117,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
- monster "1@cata",0,0,"Apostle of Baphomet",1869,1,instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
+ set .@label$, instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@cata");
+ monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1132,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1291,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1117,1,.@label$;
+ monster .@map$,0,0,"Apostle of Baphomet",1869,1,.@label$;
end;
OnDisable:
- killmonster "1@cata",instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("1@cata"),instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead";
end;
OnMyMobDead:
- if (mobcount("1@cata",instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnMyMobDead") < 1) {
- instance_announce -1, "All apostles of Baphomet are dead!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cata");
+ if (mobcount(.@map$,instance_npcname("ins_baphomet_lotto3")+"::OnMyMobDead") < 1) {
+ mapannounce .@map$, "All apostles of Baphomet are dead!",bc_map,"0x00ff99";
}
getitem 6002,1; //Token_Of_Apostle
end;
@@ -800,12 +551,12 @@ OnMyMobDead:
mes "Yes... This is... My pendant...";
next;
delitem 6003,1; //Soul_Pendant
- enablenpc instance_npcname("Ancient Hero's Soul#1F", instance_id());
- disablenpc instance_npcname("Gravestone#", instance_id());
+ enablenpc instance_npcname("Ancient Hero's Soul#1F");
+ disablenpc instance_npcname("Gravestone#");
mes "[Voice of the Gravestone]";
mes "Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there.";
next;
- instance_announce -1, "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
mes "I can feel the voice becoming faint.";
close;
}
@@ -833,6 +584,10 @@ OnTouch:
close;
}
end;
+
+OnInstanceInit: // Temporary fix for @reloadscript.
+ set 'ins_baphomet,0;
+ end;
}
1@cata,176,119,4 script Ancient Hero's Soul#1F 411,{
@@ -954,9 +709,9 @@ OnTouch:
mes "[Ancient Hero's Soul]";
mes "To remind you again, I must be substantialized within the next hour. So everyone, finish your work within that time!";
set 'ins_baphomet,3;
- donpcevent instance_npcname("ins_baphomet_1f_timer", instance_id())+"::OnEnable";
- donpcevent instance_npcname("ins_baphomet_lotto2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("ins_baphomet_1f_timer")+"::OnEnable";
+ donpcevent instance_npcname("ins_baphomet_lotto2")+"::OnEnable";
+ donpcevent instance_npcname("ins_baphomet_lotto3")+"::OnEnable";
}
else {
mes "[Ancient Hero's Soul]";
@@ -1011,7 +766,7 @@ OnTouch:
next;
set 'ins_baphomet,5;
specialeffect EF_TELEPORTATION;
- enablenpc instance_npcname("ins_bapho_to_2f", instance_id());
+ enablenpc instance_npcname("ins_bapho_to_2f");
mes "[Ancient Hero's Soul]";
mes "Now you can go to the main altar. It is located in the bottom right corner of this floor.";
next;
@@ -1021,7 +776,7 @@ OnTouch:
mes "[Ancient Hero's Soul]";
mes "Go ahead, warriors.";
cutin "",255;
- instance_announce -1, "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
close;
}
else if ('ins_baphomet == 4) {
@@ -1048,6 +803,10 @@ OnTouch:
cutin "",255;
close;
}
+
+OnInstanceInit:
+ disablenpc instance_npcname("Ancient Hero's Soul#1F");
+ end;
}
// To 2F Warp
@@ -1057,7 +816,7 @@ OnTouch:
if (countitem(6002) > 0) {
delitem 6002,countitem(6002); //Token_Of_Apostle
set 'ins_baphomet,5;
- warp "2@cata",80,144;
+ warp instance_mapname("2@cata"),80,144;
end;
}
else {
@@ -1065,6 +824,10 @@ OnTouch:
mes "Where is your Token of Apostle? I said you should carry the Token of Apostle to pass this gate.";
close;
}
+
+OnInstanceInit:
+ disablenpc instance_npcname("ins_bapho_to_2f");
+ end;
}
// Gravestones
@@ -1129,7 +892,7 @@ OnTouch:
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
@@ -1150,6 +913,10 @@ OnTouch:
percentheal -50,0;
close;
}
+
+OnInstanceInit:
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
}
1@cata,267,210,0 duplicate(Bobbing Torch#SS) Bobbing Torch#1 844
1@cata,85,182,0 duplicate(Bobbing Torch#SS) Bobbing Torch#2 844
@@ -1165,34 +932,38 @@ OnTouch:
1@cata,155,14,0 duplicate(Bobbing Torch#SS) Bobbing Torch#12 844
1@cata,1,1,0 script ins_baphomet_1f_timer -1,{
+OnInstanceInit:
+ disablenpc instance_npcname("ins_baphomet_1f_timer");
+ end;
+
OnEnable:
- enablenpc instance_npcname("ins_baphomet_1f_timer", instance_id());
+ enablenpc instance_npcname("ins_baphomet_1f_timer");
initnpctimer;
end;
-OnDisable:;
- disablenpc instance_npcname("ins_baphomet_1f_timer", instance_id());
+OnDisable:
+ disablenpc instance_npcname("ins_baphomet_1f_timer");
stopnpctimer;
end;
OnTimer1800000:
- instance_announce -1, "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00";
end;
OnTimer2400000:
- instance_announce -1, "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00";
end;
OnTimer3000000:
- instance_announce -1, "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00";
end;
OnTimer3050000:
- instance_announce -1, "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00";
end;
OnTimer3100000:
- instance_announce -1, "You've failed to open the seal of main altar.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cata"), "You've failed to open the seal of main altar.",bc_map,"0xFFFF00";
end;
OnTimer3500000:
@@ -1203,106 +974,110 @@ OnTimer3500000:
2@cata,80,144,0 script ins_2f_enter -1,3,3,{
OnTouch:
- donpcevent instance_npcname("ins_2f_enter_broad", instance_id())+"::OnEnable";
- disablenpc instance_npcname("ins_2f_enter", instance_id());
+ donpcevent instance_npcname("ins_2f_enter_broad")+"::OnEnable";
+ disablenpc instance_npcname("ins_2f_enter");
end;
}
2@cata,1,1,0 script ins_2f_enter_broad -1,{
-OnEnable:
- enablenpc instance_npcname("ins_2f_enter_broad", instance_id());
- initnpctimer;
+OnInstanceInit:
+OnDisable:
+ disablenpc instance_npcname("ins_2f_enter_broad");
end;
-OnDisable:
- disablenpc instance_npcname("ins_2f_enter_broad", instance_id());
+OnEnable:
+ enablenpc instance_npcname("ins_2f_enter_broad");
+ initnpctimer;
end;
OnTimer10000:
- instance_announce -1, "Baphomet : Humans... interfering again...",bc_map,"0xdb7093";
+ mapannounce instance_mapname("2@cata"), "Baphomet : Humans... interfering again...",bc_map,"0xdb7093";
end;
OnTimer13000:
- instance_announce -1, "Apostle of Baphomet : Humans! Humans have invaded our sanctum!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Humans! Humans have invaded our sanctum!",bc_map,"0xFFFF00";
end;
OnTimer16000:
- instance_announce -1, "Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Kill the humans! Do not stop the revival of our Master!",bc_map,"0xFFFF00";
end;
OnTimer18000:
- instance_announce -1, "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00";
stopnpctimer;
- disablenpc instance_npcname("ins_2f_enter_broad", instance_id());
+ disablenpc instance_npcname("ins_2f_enter_broad");
end;
}
2@cata,50,67,0 script slave_left -1,5,5,{
OnTouch:
- disablenpc instance_npcname("slave_left", instance_id());
- instance_announce -1, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
- monster "2@cata",55,67,"Apostle of Baphomet",1869,1;
- monster "2@cata",51,67,"Apostle of Baphomet",1291,1;
- monster "2@cata",58,67,"Apostle of Baphomet",1292,1;
- monster "2@cata",53,67,"Apostle of Baphomet",1291,1;
- monster "2@cata",54,67,"Apostle of Baphomet",1869,1;
- monster "2@cata",55,67,"Apostle of Baphomet",1291,1;
- monster "2@cata",56,67,"Apostle of Baphomet",1117,1;
- monster "2@cata",58,66,"Apostle of Baphomet",1869,1;
- monster "2@cata",56,66,"Apostle of Baphomet",1117,1;
- monster "2@cata",60,66,"Apostle of Baphomet",1132,1;
- monster "2@cata",59,66,"Apostle of Baphomet",1117,1;
- monster "2@cata",54,66,"Apostle of Baphomet",1132,1;
- monster "2@cata",55,66,"Apostle of Baphomet",1292,1;
- monster "2@cata",56,66,"Apostle of Baphomet",1132,1;
- monster "2@cata",50,65,"Apostle of Baphomet",1867,1;
- monster "2@cata",61,65,"Apostle of Baphomet",1292,1;
+ set .@map$, instance_mapname("2@cata");
+ mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
+ monster .@map$,55,67,"Apostle of Baphomet",1869,1;
+ monster .@map$,51,67,"Apostle of Baphomet",1291,1;
+ monster .@map$,58,67,"Apostle of Baphomet",1292,1;
+ monster .@map$,53,67,"Apostle of Baphomet",1291,1;
+ monster .@map$,54,67,"Apostle of Baphomet",1869,1;
+ monster .@map$,55,67,"Apostle of Baphomet",1291,1;
+ monster .@map$,56,67,"Apostle of Baphomet",1117,1;
+ monster .@map$,58,66,"Apostle of Baphomet",1869,1;
+ monster .@map$,56,66,"Apostle of Baphomet",1117,1;
+ monster .@map$,60,66,"Apostle of Baphomet",1132,1;
+ monster .@map$,59,66,"Apostle of Baphomet",1117,1;
+ monster .@map$,54,66,"Apostle of Baphomet",1132,1;
+ monster .@map$,55,66,"Apostle of Baphomet",1292,1;
+ monster .@map$,56,66,"Apostle of Baphomet",1132,1;
+ monster .@map$,50,65,"Apostle of Baphomet",1867,1;
+ monster .@map$,61,65,"Apostle of Baphomet",1292,1;
+ disablenpc instance_npcname("slave_left");
end;
}
2@cata,109,67,0 script slave_right -1,5,5,{
OnTouch:
- disablenpc instance_npcname("slave_right", instance_id());
- instance_announce -1, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
- monster "2@cata",105,67,"Apostle of Baphomet",1869,1;
- monster "2@cata",104,67,"Apostle of Baphomet",1291,1;
- monster "2@cata",107,67,"Apostle of Baphomet",1869,1;
- monster "2@cata",106,67,"Apostle of Baphomet",1291,1;
- monster "2@cata",102,67,"Apostle of Baphomet",1869,1;
- monster "2@cata",103,67,"Apostle of Baphomet",1291,1;
- monster "2@cata",103,67,"Apostle of Baphomet",1117,1;
- monster "2@cata",109,66,"Apostle of Baphomet",1117,1;
- monster "2@cata",108,66,"Apostle of Baphomet",1132,1;
- monster "2@cata",101,66,"Apostle of Baphomet",1117,1;
- monster "2@cata",106,66,"Apostle of Baphomet",1292,1;
- monster "2@cata",102,66,"Apostle of Baphomet",1132,1;
- monster "2@cata",104,66,"Apostle of Baphomet",1292,1;
- monster "2@cata",103,66,"Apostle of Baphomet",1132,1;
- monster "2@cata",109,65,"Apostle of Baphomet",1867,1;
- monster "2@cata",108,65,"Apostle of Baphomet",1292,1;
+ set .@map$, instance_mapname("2@cata");
+ mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
+ monster .@map$,105,67,"Apostle of Baphomet",1869,1;
+ monster .@map$,104,67,"Apostle of Baphomet",1291,1;
+ monster .@map$,107,67,"Apostle of Baphomet",1869,1;
+ monster .@map$,106,67,"Apostle of Baphomet",1291,1;
+ monster .@map$,102,67,"Apostle of Baphomet",1869,1;
+ monster .@map$,103,67,"Apostle of Baphomet",1291,1;
+ monster .@map$,103,67,"Apostle of Baphomet",1117,1;
+ monster .@map$,109,66,"Apostle of Baphomet",1117,1;
+ monster .@map$,108,66,"Apostle of Baphomet",1132,1;
+ monster .@map$,101,66,"Apostle of Baphomet",1117,1;
+ monster .@map$,106,66,"Apostle of Baphomet",1292,1;
+ monster .@map$,102,66,"Apostle of Baphomet",1132,1;
+ monster .@map$,104,66,"Apostle of Baphomet",1292,1;
+ monster .@map$,103,66,"Apostle of Baphomet",1132,1;
+ monster .@map$,109,65,"Apostle of Baphomet",1867,1;
+ monster .@map$,108,65,"Apostle of Baphomet",1292,1;
+ disablenpc instance_npcname("slave_right");
end;
}
2@cata,79,39,0 script slave_down -1,5,5,{
OnTouch:
- disablenpc instance_npcname("slave_down", instance_id());
- instance_announce -1, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
- monster "2@cata",78,41,"Apostle of Baphomet",1869,1;
- monster "2@cata",79,42,"Apostle of Baphomet",1291,1;
- monster "2@cata",78,46,"Apostle of Baphomet",1869,1;
- monster "2@cata",81,41,"Apostle of Baphomet",1291,1;
- monster "2@cata",81,42,"Apostle of Baphomet",1869,1;
- monster "2@cata",79,43,"Apostle of Baphomet",1291,1;
- monster "2@cata",77,40,"Apostle of Baphomet",1117,1;
- monster "2@cata",79,41,"Apostle of Baphomet",1132,1;
- monster "2@cata",79,42,"Apostle of Baphomet",1117,1;
- monster "2@cata",79,43,"Apostle of Baphomet",1132,1;
- monster "2@cata",79,48,"Apostle of Baphomet",1117,1;
- monster "2@cata",78,49,"Apostle of Baphomet",1132,1;
- monster "2@cata",78,41,"Apostle of Baphomet",1292,1;
- monster "2@cata",74,42,"Apostle of Baphomet",1292,1;
- monster "2@cata",72,48,"Apostle of Baphomet",1867,1;
- monster "2@cata",72,38,"Apostle of Baphomet",1292,1;
+ set .@map$, instance_mapname("2@cata");
+ mapannounce .@map$, "Apostle of Baphomet : Kill the humans! Don't let them interrupt the revival of our Master!",bc_map,"0xFFFF00";
+ monster .@map$,78,41,"Apostle of Baphomet",1869,1;
+ monster .@map$,79,42,"Apostle of Baphomet",1291,1;
+ monster .@map$,78,46,"Apostle of Baphomet",1869,1;
+ monster .@map$,81,41,"Apostle of Baphomet",1291,1;
+ monster .@map$,81,42,"Apostle of Baphomet",1869,1;
+ monster .@map$,79,43,"Apostle of Baphomet",1291,1;
+ monster .@map$,77,40,"Apostle of Baphomet",1117,1;
+ monster .@map$,79,41,"Apostle of Baphomet",1132,1;
+ monster .@map$,79,42,"Apostle of Baphomet",1117,1;
+ monster .@map$,79,43,"Apostle of Baphomet",1132,1;
+ monster .@map$,79,48,"Apostle of Baphomet",1117,1;
+ monster .@map$,78,49,"Apostle of Baphomet",1132,1;
+ monster .@map$,78,41,"Apostle of Baphomet",1292,1;
+ monster .@map$,74,42,"Apostle of Baphomet",1292,1;
+ monster .@map$,72,48,"Apostle of Baphomet",1867,1;
+ monster .@map$,72,38,"Apostle of Baphomet",1292,1;
+ disablenpc instance_npcname("slave_down");
end;
}
@@ -1319,20 +1094,25 @@ OnTouch:
}
if (.@seal_check == 2) erasequest 3041;
specialeffect EF_LEXDIVINA;
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
- if (strnpcinfo(2) == "0") areamobuseskill "2@cata",79,81,10,1929,686,1,0,0,26,0;
- else if (strnpcinfo(2) == "2") areamobuseskill "2@cata",123,109,10,1929,686,1,0,0,26,0;
- else if (strnpcinfo(2) == "4") areamobuseskill "2@cata",123,22,10,1929,686,1,0,0,26,0;
- else if (strnpcinfo(2) == "8") areamobuseskill "2@cata",35,21,10,1929,686,1,0,0,26,0;
- else if (strnpcinfo(2) == "10") areamobuseskill "2@cata",35,109,10,1929,686,1,0,0,26,0;
+ disablenpc instance_npcname(strnpcinfo(0));
+ set .@map$, instance_mapname("2@cata");
+ if (strnpcinfo(2) == "0") areamobuseskill .@map$,79,81,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(2) == "2") areamobuseskill .@map$,123,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(2) == "4") areamobuseskill .@map$,123,22,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(2) == "8") areamobuseskill .@map$,35,21,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
+ else if (strnpcinfo(2) == "10") areamobuseskill .@map$,35,109,10,1929,"NPC_INVINCIBLEOFF",1,0,0,e_hlp,0;
percentheal -50,0;
sc_start Eff_Stone,20000,0;
setquest 3041;
- instance_announce -1, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
+ mapannounce .@map$, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
mes "I can feel the power of the altar came back by adding magical power.";
next;
mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
+
+OnInstanceInit:
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
}
2@cata,79,81,0 duplicate(Magical Seal#SS) Magical Seal#0 844
2@cata,123,109,0 duplicate(Magical Seal#SS) Magical Seal#2 844
@@ -1352,10 +1132,10 @@ OnTouch:
specialeffect EF_METEORSTORM;
specialeffect EF_METEORSTORM;
mes "[" + strcharinfo(0) + "]";
- mes "Watch out! Something... Something is comming.";
+ mes "Watch out! Something... Something is coming.";
set 'ins_baphomet,6;
- donpcevent instance_npcname("ins_2f_hero_broad", instance_id())+"::OnEnable";
- disablenpc instance_npcname("The Main Altar#ss", instance_id());
+ donpcevent instance_npcname("ins_2f_hero_broad")+"::OnEnable";
+ disablenpc instance_npcname("The Main Altar#ss");
close;
}
else {
@@ -1374,8 +1154,6 @@ OnTouch:
mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.";
next;
mes "[Ancient Hero's Soul]";
- next;
- mes "[Ancient Hero's Soul]";
mes "I really appreciate your help.";
mes "Our souls can finally rest in peace...";
next;
@@ -1399,291 +1177,316 @@ OnTouch:
cutin "",255;
close;
}
+
+OnInstanceInit:
+ disablenpc instance_npcname("Ancient Hero's Soul#2F");
+ end;
}
2@cata,1,2,0 script ins_2f_hero_broad -1,{
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_broad", instance_id());
+ enablenpc instance_npcname("ins_2f_hero_broad");
initnpctimer;
end;
OnDisable:
- disablenpc instance_npcname("ins_2f_hero_broad", instance_id());
+ disablenpc instance_npcname("ins_2f_hero_broad");
end;
OnTimer3000:
- instance_announce -1, "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00";
end;
OnTimer6000:
- instance_announce -1, "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
end;
OnTimer9000:
- instance_announce -1, "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
end;
OnTimer12000:
- instance_announce -1, "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
end;
OnTimer15000:
- instance_announce -1, "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093";
+ mapannounce instance_mapname("2@cata"), "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093";
end;
OnTimer17000:
- instance_announce -1, "Baphomet : No one can harm me here. You will be my first sacrifice.",bc_map,"0xdb7093";
- donpcevent instance_npcname("control_baphomet", instance_id())+"::OnEnable";
- donpcevent instance_npcname("ins_2f_hero_broad2", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("2@cata"), "Baphomet : No one can harm me here. You will be my first sacrifice.",bc_map,"0xdb7093";
+ donpcevent instance_npcname("control_baphomet")+"::OnEnable";
+ donpcevent instance_npcname("ins_2f_hero_broad2")+"::OnEnable";
stopnpctimer;
- disablenpc instance_npcname("ins_2f_hero_broad", instance_id());
+ disablenpc instance_npcname("ins_2f_hero_broad");
end;
}
2@cata,3,3,0 script control_baphomet -1,{
-OnEnable:
- enablenpc instance_npcname("control_baphomet", instance_id());
- donpcevent instance_npcname("2f_callmon_pattern_c", instance_id())+"::OnEnable";
- monster "2@cata",79,64,"Baphomet#",1929,1,instance_npcname("control_baphomet", instance_id())+"::OnMyMobDead";
+OnInstanceInit:
+OnDisable:
+ disablenpc instance_npcname("control_baphomet");
end;
-OnDisable:
- disablenpc "control_baphomet";
+OnEnable:
+ enablenpc instance_npcname("control_baphomet");
+ donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnEnable";
+ monster instance_mapname("2@cata"),79,64,"Baphomet#",1929,1,instance_npcname("control_baphomet")+"::OnMyMobDead";
end;
OnMyMobDead:
- if (mobcount("2@cata",instance_npcname("control_baphomet", instance_id())+"::OnMyMobDead") < 1) {
+ set .@map$, instance_mapname("2@cata");
+ if (mobcount(.@map$,instance_npcname("control_baphomet")+"::OnMyMobDead") < 1) {
set 'ins_baphomet,7;
erasequest 3041;
- instance_announce -1, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
- enablenpc instance_npcname("Ancient Hero's Soul#2F", instance_id());
- disablenpc instance_npcname("slave_down", instance_id());
- disablenpc instance_npcname("slave_left", instance_id());
- disablenpc instance_npcname("slave_right", instance_id());
- donpcevent instance_npcname("ins_2f_hero_broad", instance_id())+"::OnDisable";
- donpcevent instance_npcname("ins_2f_hero_broad2", instance_id())+"::OnDisable";
- donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("2f_callmon_pattern_c", instance_id())+"::OnDisable";
- donpcevent instance_npcname("2f_callmon_pattern", instance_id())+"::OnDisable";
- donpcevent instance_npcname("ins_2f_hero_pattern", instance_id())+"::OnDisable";
- donpcevent instance_npcname("ins_2f_enter_broad", instance_id())+"::OnDisable";
- donpcevent instance_npcname("control_baphomet", instance_id())+"::OnDisable";
- disablenpc instance_npcname("control_baphomet", instance_id());
+ mapannounce .@map$, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
+ enablenpc instance_npcname("Ancient Hero's Soul#2F");
+ disablenpc instance_npcname("slave_down");
+ disablenpc instance_npcname("slave_left");
+ disablenpc instance_npcname("slave_right");
+ donpcevent instance_npcname("ins_2f_hero_broad")+"::OnDisable";
+ donpcevent instance_npcname("ins_2f_hero_broad2")+"::OnDisable";
+ donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable";
+ donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnDisable";
+ donpcevent instance_npcname("2f_callmon_pattern")+"::OnDisable";
+ donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnDisable";
+ donpcevent instance_npcname("ins_2f_enter_broad")+"::OnDisable";
+ donpcevent instance_npcname("control_baphomet")+"::OnDisable";
+ disablenpc instance_npcname("control_baphomet");
}
end;
}
2@cata,2,2,0 script ins_2f_hero_broad2 -1,{
-OnEnable:
- enablenpc instance_npcname("ins_2f_hero_broad2", instance_id());
- initnpctimer;
+OnInstanceInit:
+OnDisable:
+ disablenpc instance_npcname("ins_2f_hero_broad2");
end;
-OnDisable:
- disablenpc instance_npcname("ins_2f_hero_broad2", instance_id());
+OnEnable:
+ enablenpc instance_npcname("ins_2f_hero_broad2");
+ initnpctimer;
end;
OnTimer8000:
- instance_announce -1, "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00";
end;
OnTimer11000:
- instance_announce -1, "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
end;
OnTimer13000:
- instance_announce -1, "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
end;
OnTimer16000:
- instance_announce -1, "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00";
end;
OnTimer19000:
- instance_announce -1, "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00";
end;
OnTimer22000:
- instance_announce -1, "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093";
+ mapannounce instance_mapname("2@cata"), "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093";
end;
OnTimer26000:
- instance_announce -1, "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
- enablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
- donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::OnEnable";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
+ enablenpc instance_npcname("Magical Seal#0");
+ disablenpc instance_npcname("Magical Seal#2");
+ disablenpc instance_npcname("Magical Seal#4");
+ disablenpc instance_npcname("Magical Seal#8");
+ disablenpc instance_npcname("Magical Seal#10");
+ donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnEnable";
stopnpctimer;
- disablenpc instance_npcname("ins_2f_hero_broad2", instance_id());
+ disablenpc instance_npcname("ins_2f_hero_broad2");
end;
}
2@cata,4,1,0 script 2f_callmon_pattern_c -1,{
+OnInstanceInit:
+ disablenpc instance_npcname("2f_callmon_pattern_c");
+ end;
+
OnEnable:
- enablenpc instance_npcname("2f_callmon_pattern_c", instance_id());
+ enablenpc instance_npcname("2f_callmon_pattern_c");
initnpctimer;
- donpcevent instance_npcname("2f_callmon_pattern_c", instance_id())+"::Ongo";
+ donpcevent instance_npcname("2f_callmon_pattern_c")+"::Ongo";
end;
OnDisable:
stopnpctimer;
- disablenpc instance_npcname("2f_callmon_pattern_c", instance_id());
+ disablenpc instance_npcname("2f_callmon_pattern_c");
end;
Ongo:
- donpcevent instance_npcname("2f_callmon_pattern", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("2f_callmon_pattern")+"::OnEnable";
end;
OnTimer3600000:
- donpcevent instance_npcname("2f_callmon_pattern_c", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("2f_callmon_pattern_c")+"::OnDisable";
end;
}
2@cata,4,2,0 script 2f_callmon_pattern -1,{
+OnInstanceInit:
+ disablenpc instance_npcname("2f_callmon_pattern");
+ end;
+
OnEnable:
- enablenpc instance_npcname("2f_callmon_pattern", instance_id());
+ enablenpc instance_npcname("2f_callmon_pattern");
stopnpctimer;
initnpctimer;
end;
OnDisable:
- disablenpc instance_npcname("2f_callmon_pattern", instance_id());
+ disablenpc instance_npcname("2f_callmon_pattern");
stopnpctimer;
end;
OnTimer300000:
- enablenpc instance_npcname("slave_down", instance_id());
- enablenpc instance_npcname("slave_left", instance_id());
- enablenpc instance_npcname("slave_right", instance_id());
- donpcevent instance_npcname("2f_callmon_pattern_c", instance_id())+"::Ongo";
+ enablenpc instance_npcname("slave_down");
+ enablenpc instance_npcname("slave_left");
+ enablenpc instance_npcname("slave_right");
+ donpcevent instance_npcname("2f_callmon_pattern_c")+"::Ongo";
end;
}
2@cata,3,1,0 script ins_2f_hero_pattern_c -1,{
+OnInstanceInit:
+ disablenpc instance_npcname("ins_2f_hero_pattern_c");
+ end;
+
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_pattern_c", instance_id());
+ enablenpc instance_npcname("ins_2f_hero_pattern_c");
initnpctimer;
- donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::Ongo";
+ donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::Ongo";
end;
Ongo:
- donpcevent instance_npcname("ins_2f_hero_pattern", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnEnable";
end;
OnDisable:
stopnpctimer;
- disablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
- donpcevent instance_npcname("ins_2f_hero_pattern", instance_id())+"::OnDisable";
- disablenpc instance_npcname("ins_2f_hero_pattern_c", instance_id());
+ disablenpc instance_npcname("Magical Seal#0");
+ disablenpc instance_npcname("Magical Seal#2");
+ disablenpc instance_npcname("Magical Seal#4");
+ disablenpc instance_npcname("Magical Seal#8");
+ disablenpc instance_npcname("Magical Seal#10");
+ donpcevent instance_npcname("ins_2f_hero_pattern")+"::OnDisable";
+ disablenpc instance_npcname("ins_2f_hero_pattern_c");
end;
OnTimer3600000:
- instance_announce -1, "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093";
+ mapannounce instance_mapname("2@cata"), "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093";
end;
OnTimer3605000:
- instance_announce -1, "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00";
- donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::OnDisable";
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::OnDisable";
end;
}
2@cata,3,2,0 script ins_2f_hero_pattern -1,{
+OnInstanceInit:
+ disablenpc instance_npcname("ins_2f_hero_pattern");
+ end;
+
OnEnable:
- enablenpc instance_npcname("ins_2f_hero_pattern", instance_id());
+ enablenpc instance_npcname("ins_2f_hero_pattern");
initnpctimer;
end;
OnDisable:
- disablenpc instance_npcname("ins_2f_hero_pattern", instance_id());
+ disablenpc instance_npcname("ins_2f_hero_pattern");
stopnpctimer;
end;
OnTimer70000:
switch(rand(1,5)) {
case 1:
- instance_announce -1, "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
- enablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
+ enablenpc instance_npcname("Magical Seal#0");
+ disablenpc instance_npcname("Magical Seal#2");
+ disablenpc instance_npcname("Magical Seal#4");
+ disablenpc instance_npcname("Magical Seal#8");
+ disablenpc instance_npcname("Magical Seal#10");
break;
case 2:
- instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0", instance_id());
- enablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ disablenpc instance_npcname("Magical Seal#0");
+ enablenpc instance_npcname("Magical Seal#2");
+ disablenpc instance_npcname("Magical Seal#4");
+ disablenpc instance_npcname("Magical Seal#8");
+ disablenpc instance_npcname("Magical Seal#10");
break;
case 3:
- instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- enablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ disablenpc instance_npcname("Magical Seal#0");
+ disablenpc instance_npcname("Magical Seal#2");
+ enablenpc instance_npcname("Magical Seal#4");
+ disablenpc instance_npcname("Magical Seal#8");
+ disablenpc instance_npcname("Magical Seal#10");
break;
case 4:
- instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- enablenpc instance_npcname("Magical Seal#8", instance_id());
- disablenpc instance_npcname("Magical Seal#10", instance_id());
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ disablenpc instance_npcname("Magical Seal#0");
+ disablenpc instance_npcname("Magical Seal#2");
+ disablenpc instance_npcname("Magical Seal#4");
+ enablenpc instance_npcname("Magical Seal#8");
+ disablenpc instance_npcname("Magical Seal#10");
break;
case 5:
- instance_announce -1, "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
- disablenpc instance_npcname("Magical Seal#0", instance_id());
- disablenpc instance_npcname("Magical Seal#2", instance_id());
- disablenpc instance_npcname("Magical Seal#4", instance_id());
- disablenpc instance_npcname("Magical Seal#8", instance_id());
- enablenpc instance_npcname("Magical Seal#10", instance_id());
+ mapannounce instance_mapname("2@cata"), "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ disablenpc instance_npcname("Magical Seal#0");
+ disablenpc instance_npcname("Magical Seal#2");
+ disablenpc instance_npcname("Magical Seal#4");
+ disablenpc instance_npcname("Magical Seal#8");
+ enablenpc instance_npcname("Magical Seal#10");
}
stopnpctimer;
- donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::Ongo";
+ donpcevent instance_npcname("ins_2f_hero_pattern_c")+"::Ongo";
end;
}
1@cata,1,1,0 script ins_1f_spawn_mobs -1,{
-OnEnable:
- monster "1@cata",0,0,"Zombie Master",1298,10;
- monster "1@cata",0,0,"Wraith Dead",1291,10;
- //monster "1@cata",0,0,"Ancient Mimic",1699,10;
- monster "1@cata",0,0,"Flame Skull",1869,10;
- monster "1@cata",0,0,"Skeleton General",1290,10;
- monster "1@cata",0,0,"Zombie Master",1298,10;
- monster "1@cata",0,0,"Skeleton General",1290,10;
- monster "1@cata",0,0,"Flame Skull",1869,10;
- monster "1@cata",0,0,"Wraith Dead",1291,10;
- monster "1@cata",0,0,"Wraith Dead",1291,10;
- monster "1@cata",0,0,"Khalitzburg",1132,10;
- monster "1@cata",0,0,"Khalitzburg",1132,10;
- monster "1@cata",0,0,"Flame Skull",1869,10;
- monster "1@cata",0,0,"Flame Skull",1869,10;
- monster "1@cata",0,0,"Ancient Mimic",1699,10;
- monster "1@cata",0,0,"Zombie Master",1298,10;
- monster "1@cata",0,0,"Ancient Mimic",1699,10;
- monster "1@cata",0,0,"Zombie Master",1298,10;
- monster "1@cata",0,0,"Wraith Dead",1291,10;
- monster "1@cata",0,0,"Skeleton General",1290,10;
- monster "1@cata",0,0,"Skeleton General",1290,10;
- monster "1@cata",0,0,"Wind Ghost",1263,10;
- monster "1@cata",0,0,"Wind Ghost",1263,10;
- monster "1@cata",0,0,"Wind Ghost",1263,10;
- monster "1@cata",0,0,"Lude",1509,10;
- monster "1@cata",0,0,"Lude",1509,10;
- monster "1@cata",0,0,"Evil Druid",1117,10;
- monster "1@cata",0,0,"Evil Druid",1117,10;
- monster "1@cata",0,0,"Evil Druid",1117,10;
- monster "1@cata",0,0,"Banshee",1867,10;
- monster "1@cata",0,0,"Dark Illusion",1302,1;
+OnInstanceInit:
+ set .@map$, instance_mapname("1@cata");
+ monster .@map$,0,0,"Zombie Master",1298,10;
+ monster .@map$,0,0,"Wraith Dead",1291,10;
+ //monster .@map$,0,0,"Ancient Mimic",1699,10;
+ monster .@map$,0,0,"Flame Skull",1869,10;
+ monster .@map$,0,0,"Skeleton General",1290,10;
+ monster .@map$,0,0,"Zombie Master",1298,10;
+ monster .@map$,0,0,"Skeleton General",1290,10;
+ monster .@map$,0,0,"Flame Skull",1869,10;
+ monster .@map$,0,0,"Wraith Dead",1291,10;
+ monster .@map$,0,0,"Wraith Dead",1291,10;
+ monster .@map$,0,0,"Khalitzburg",1132,10;
+ monster .@map$,0,0,"Khalitzburg",1132,10;
+ monster .@map$,0,0,"Flame Skull",1869,10;
+ monster .@map$,0,0,"Flame Skull",1869,10;
+ monster .@map$,0,0,"Ancient Mimic",1699,10;
+ monster .@map$,0,0,"Zombie Master",1298,10;
+ monster .@map$,0,0,"Ancient Mimic",1699,10;
+ monster .@map$,0,0,"Zombie Master",1298,10;
+ monster .@map$,0,0,"Wraith Dead",1291,10;
+ monster .@map$,0,0,"Skeleton General",1290,10;
+ monster .@map$,0,0,"Skeleton General",1290,10;
+ monster .@map$,0,0,"Wind Ghost",1263,10;
+ monster .@map$,0,0,"Wind Ghost",1263,10;
+ monster .@map$,0,0,"Wind Ghost",1263,10;
+ monster .@map$,0,0,"Lude",1509,10;
+ monster .@map$,0,0,"Lude",1509,10;
+ monster .@map$,0,0,"Evil Druid",1117,10;
+ monster .@map$,0,0,"Evil Druid",1117,10;
+ monster .@map$,0,0,"Evil Druid",1117,10;
+ monster .@map$,0,0,"Banshee",1867,10;
+ monster .@map$,0,0,"Dark Illusion",1302,1;
+ disablenpc instance_npcname("ins_1f_spawn_mobs");
end;
}
diff --git a/npc/other/gm_npcs.txt b/npc/other/gm_npcs.txt
new file mode 100644
index 000000000..076cbf025
--- /dev/null
+++ b/npc/other/gm_npcs.txt
@@ -0,0 +1,150 @@
+//===== Hercules Script ======================================
+//= GM Management NPCs
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= Controls the official GM management NPCs in certain scripts.
+//===== Additional Comments: =================================
+//= 1.0 First version.
+//============================================================
+
+// callfunc("F_GM_NPC"{,<password>,<0:int | 1:str>{,<min>,<max>}})
+function script F_GM_NPC {
+
+ // To disable all GM NPCs, uncomment the line below.
+ //end;
+
+ // To set a minimum GM level to access the NPCs, edit the line below.
+ if (getgmlevel() < 99) {/* TODO: perhaps better to just add a group permission? [Ind] */
+ // Log the event.
+ getmapxy(.@map$,.@x,.@y,1);
+ logmes strcharinfo(0)+" attempted to access GM NPC "+strnpcinfo(0)+" ("+.@map$+","+.@x+","+.@y+").";
+ end;
+ }
+
+ if (!getargcount()) return;
+
+ // To disable password inputs, uncomment the line below.
+ //return 1;
+
+ // Password return values:
+ // 1: correct input
+ // 0: incorrect input
+ // -1: zero/cancel (integer only)
+ // -2: out of bounds (integer only)
+ if (getarg(1) == 0) {
+ // Integer password
+ if (getarg(3,0)) {
+ set .@error, input(.@input,getarg(2),getarg(3));
+ if (.@error)
+ return -2;
+ } else
+ input .@input;
+ if (.@input == 0)
+ return -1;
+ else
+ return (.@input == getarg(0))?1:0;
+ } else {
+ // String password
+ input .@inputstr$;
+ return (.@inputstr$ == getarg(0))?1:0;
+ }
+}
+
+/*
+List of GM Management NPCs (incomplete)
+--------------------------
+[ Battleground ]
+- Switch#batgnd
+- Release all#b01
+- Release all#b02
+- Release all#a01
+- Release all#a02
+
+[ Guild-related ]
+- Event controller#aru_gd
+- Event controller#sch_gd
+- Festival Manager#gq_fes0
+- Festival Manager#gq_fes2
+- Godly Item Quests#god
+- Golbal var
+- Investment_total#fund00 (RE)
+
+[ Instances ]
+------ Endless Tower -----
+- #102Administrator Mode
+- Purification Stone#et2
+- #Manager Mode1
+- #Manager Mode2
+- #Manager Mode3
+- #Manager Mode4
+- #Manager Mode5
+--------------------------
+- Nidhoggur Manager
+- Purification Admin#nyd2
+- Bakonawa's Rage (RE)
+- Bangungot Gate (RE)
+
+[ Job-related ]
+----- 3rd Class (RE) -----
+- control#arch
+- #GMhelper01_gc
+- #GMhelper02_gc
+- Worker#job_ranger
+- R.Knight Job Manager
+- #renshucheck
+- sorcereryal
+- Button Girl#wl
+- Button Girl#sura
+--------------------------
+- Soul Linker Var
+- 1st Job Quest Reset
+- Job Repair (RE)
+
+[ Quest ]
+--------- Renewal --------
+- 13.3 Related Reset
+- Scaraba Dungeon Entrance
+- Assistant#para_suvquest
+- Guidance for quest#ml
+- Initializing Mora Sanjo
+- Theore Set Guid
+- Field Bush Switch
+- Bakonawa Intro Helper
+- Pintados Manager#pin
+--------------------------
+- Allied Manager#gm
+- #timer_alba01
+- Translator Preparation#1
+- ep13_nd2f_mng
+- Factory Quest Test
+- boss::lght_boss_admin
+- #LyozienSwitch
+- Juperos Manager
+- Extra Story Patch
+- boss::boss_aru_monas
+- Koshei GlobalVar#admin
+- Morroc GlobalVar Admin::MorrocAdmin_sec
+- Morroc GlobalVar Admin::MorrocAdmin_moc
+- Morroc Invasion Manager (disabled)
+
+[ Other ]
+-------- Marriage --------
+- The King of Midgart
+- Divorce Staff
+- Remarry Staff
+------ Izlude Arena ------
+- log-on-aco#arena
+- acolink#arena
+- Arena Manager#arena
+- Reward Manager#arena
+- Picture Manager#arena
+- Live Broadcast#arena
+- #arenacontrol
+--------------------------
+- Monster Race Manager
+- Vote Globalvar Girl#yuno (disabled)
+
+*/
diff --git a/npc/re/instances/BakonawaLake.txt b/npc/re/instances/BakonawaLake.txt
new file mode 100644
index 000000000..30b28e612
--- /dev/null
+++ b/npc/re/instances/BakonawaLake.txt
@@ -0,0 +1,543 @@
+//===== Hercules Script ======================================
+//= Bakonawa Lake
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.1
+//===== Description: =========================================
+//= [Official Conversion]
+//= Defeat Bakonawa before he eats the moon.
+//= Part of the "Bakonawa Extermination" quest.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//= 1.1 Added GM management NPC. [Euphy]
+//============================================================
+
+1@ma_b mapflag src4instance
+//============================================================
+ma_scene01,174,179,4 script Taho 541,{
+ disable_items;
+ if (checkweight(1201,1) == 0) {
+ mes "You are carrying too many items. Come back after taking off some of them.";
+ close;
+ }
+ if (MaxWeight - Weight < 10000) {
+ mes "You are carrying too much weight. Come back after reducing the weight.";
+ close;
+ }
+ if (BaseLevel < 140) {
+ mes "[Taho]";
+ mes "Hey. This is too dangerous a place for you. You cannot keep yourself safe. Get out of here and go to the village right now!";
+ close;
+ }
+ if (malaya_bakona1 < 7 && malaya_bakona2 < 15) {
+ mes "[Taho]";
+ mes "We are gonna be killed all by that Bakonawa. Ah, we must slay him but unfortunately we are not prepared.";
+ close;
+ }
+
+ set .@party_id,getcharid(1);
+ set .@md_name$, "Bakonawa Lake";
+
+ set .@baku_time, checkquest(12278,PLAYTIME);
+ if (.@baku_time == -1) {
+ if (checkquest(12279) == -1) setquest 12279;
+ }
+ if (!.@party_id) {
+ mes "[Taho]";
+ mes "Isn't there any company who can go with you? Or even if you wanna go alone, come after organizing a party.";
+ close;
+ }
+ if (.@baku_time == -1) {
+ if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ mes "[Taho]";
+ mes "Are you the leader of the Bakonawa slayers? The road is not well so we have to go down the cliff with a rope, is that OK?";
+ next;
+ set .@i, select("Please weave a rope.:Now I will go down.:Cancel.");
+ } else {
+ mes "[Taho]";
+ mes "You came for slaying Bakonawa. The leader of your party has to help me weaving the rope for going down.";
+ next;
+ set .@i, select(":Now I will go down.:Cancel.");
+ }
+ switch(.@i) {
+ case 1:
+ set .@instance,instance_create(.@md_name$,.@party_id);
+ if (.@instance < 0) {
+ mes "[Taho]";
+ mes "Oh, the rope got dropped. I have to make a new one.";
+ close;
+ }
+ if (instance_attachmap("1@ma_b",.@instance) == "") {
+ mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
+ instance_destroy(.@instance);
+ close;
+ }
+ instance_set_timeout 7200,300,.@instance;
+ instance_init(.@instance);
+ mes "[Taho]";
+ mes "Now I'm weaving, so you can go down when I'm done.";
+ close;
+ case 2:
+ if( has_instance("1@ma_b") == "" ) {
+ mes "The memorial dungeon "+.@md_name$+" does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ close;
+ } else {
+ mapannounce "ma_scene01","A party memeber, "+strcharinfo(0)+" of the party "+getpartyname(.@party_id)+" is entering the dungeon, "+.@md_name$+".",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ setquest 12278;
+ warp "1@ma_b",64,51;
+ end;
+ }
+ case 3:
+ close;
+ }
+ } else if (.@baku_time == 0 || .@baku_time == 1) {
+ mes "[Taho]";
+ mes "The rope used for getting to the Lake is already broken. We are now cleaning up the surroundings so come back after some time.";
+ close;
+ } else if (.@baku_time == 2) {
+ mes "[Taho]";
+ mes "It's all cleaned up around here. Now you can go down again after getting a rope.";
+ erasequest 5;
+ close;
+ }
+}
+
+sec_in02,26,26,4 script Bakonawa's Rage 541,{
+ callfunc "F_GM_NPC";
+ mes "[Taho]";
+ mes "My name is Minky.";
+ if (callfunc("F_GM_NPC",1854,0) == 1) {
+ erasequest 12278;
+ erasequest 12279;
+ set malaya_bakona1,7;
+ set malaya_bakona2,15;
+ }
+ close;
+}
+
+1@ma_b,62,52,4 script Taho#nf 541,{
+ mes "[Taho]";
+ mes "Heehee, I could join the Bakonawa hunt, but I'd rather hide behind that rock and cheer you guys on.";
+ next;
+ mes "[Taho]";
+ mes "Bakonawa becomes invincible at some point. When that time comes, listen to my guides carefully. Just trust me and all will be good.";
+ next;
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ mes "[Taho]";
+ mes "Now I will make Bakonawa spring out from the lake.";
+ next;
+ switch(select("Hold on! I'm not ready yet!:Let's do it!")) {
+ case 1:
+ mes "[Taho]";
+ mes "Oh... alright... tell me when you are ready.";
+ close;
+ case 2:
+ mes "[Taho]";
+ mes "Then I will drop a drop of Albopal to this lake.";
+ next;
+ mes "[Taho]";
+ mes "Once Bakonawa tastes this, he will surface...";
+ donpcevent instance_npcname("#Bakonawan1")+"::OnStart";
+ disablenpc instance_npcname("Taho#nf");
+ close;
+ }
+ } else {
+ mes "[Taho]";
+ mes "I am dropping the Alpopal to make Bakonawa mad. Bakonawa can be a good source of protein once we get him.";
+ close;
+ }
+}
+
+1@ma_b,36,111,4 script #Bakonawan1 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Bakonawan1");
+ end;
+OnStart:
+ enablenpc instance_npcname("#Bakonawan1");
+ set .@map$, instance_mapname("1@ma_b");
+ mapannounce .@map$,"Taho: I can see him there on the surface! ATTACK!!!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ monster .@map$,78,81,"Bakonawa",2320,1,instance_npcname("#Bakonawan1")+"::OnMyMobDead"; //original: (78,83)
+ initnpctimer;
+ end;
+OnFail:
+ killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan1")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@ma_b");
+ if (mobcount(.@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("#BakonawaDeadn1")+"::OnStart";
+ killmonster .@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan1");
+ }
+ end;
+OnTimer1000: callsub OnAnnounce,"10 minutes";
+OnTimer60000: callsub OnAnnounce,"9 minutes";
+OnTimer120000: callsub OnAnnounce,"8 minutes";
+OnTimer180000: callsub OnAnnounce,"7 minutes";
+OnTimer240000: callsub OnAnnounce,"6 minutes";
+OnTimer300000: callsub OnAnnounce,"5 minutes";
+OnTimer360000: callsub OnAnnounce,"4 minutes";
+OnTimer420000: callsub OnAnnounce,"3 minutes";
+OnTimer480000: callsub OnAnnounce,"2 minutes";
+OnTimer540000: callsub OnAnnounce,"1 minute";
+OnTimer570000:
+ mapannounce instance_mapname("1@ma_b"),"Time Limit: 30 seconds",bc_map,"0xff4400"; //FW_NORMAL 18 0 0
+ donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
+ end;
+OnTimer600000:
+ set .@map$, instance_mapname("1@ma_b");
+ mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0
+ donpcevent instance_npcname("Taho#Fail")+"::OnStart";
+ donpcevent instance_npcname("#Bakonawan1")+"::OnFail";
+ killmonster .@map$,instance_npcname("#Bakonawan1")+"::OnMyMobDead";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan1");
+ end;
+OnAnnounce:
+ mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL 15 0 0
+ donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
+ end;
+}
+
+1@ma_b,78,81,0 script #SummonPuppetsn1 139,4,5,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#SummonPuppetsn1");
+ end;
+OnStart:
+ stopnpctimer;
+ enablenpc instance_npcname("#SummonPuppetsn1");
+ initnpctimer;
+ end;
+OnTouch:
+ stopnpctimer;
+ disablenpc instance_npcname("#SummonPuppetsn1");
+ end;
+OnTimer5000:
+ setarray .@x[0],79,71,60,61,57,89,95,96,99;
+ setarray .@y[0],71,72,80,90,99,73,82,90,99;
+ set .@map$, instance_mapname("1@ma_b");
+ for(set .@i,0; .@i<9; set .@i,.@i+1) {
+ set .@rand, rand(1,10);
+ if (.@rand > 7)
+ monster .@map$,.@x[.@i],.@y[.@i],"Bakonawa's Will",2337,1,instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead";
+ else if (.@rand < 4)
+ monster .@map$,.@x[.@i],.@y[.@i],"Bakonawa's Will",2343,1,instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead";
+ }
+ end;
+OnTimer50000:
+ killmonster instance_mapname("1@ma_b"),instance_npcname("#SummonPuppetsn1")+"::OnMyMobDead";
+ stopnpctimer;
+ disablenpc instance_npcname("#SummonPuppetsn1");
+ end;
+OnMyMobDead:
+ end;
+}
+
+1@ma_b,1,5,4 script #BakonawaDeadn1 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#BakonawaDeadn1");
+ end;
+OnStart:
+ enablenpc instance_npcname("#BakonawaDeadn1");
+ initnpctimer;
+ end;
+OnTimer100:
+ mapannounce instance_mapname("1@ma_b"),"Taho: Good! Bakonawa is hidden under water. He will now try to swallow the moon.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ end;
+OnTimer5000:
+ mapannounce instance_mapname("1@ma_b"),"Taho: We must make loud noises with caldron and gong so he can never concentrate on the moon!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ end;
+OnTimer10000:
+ mapannounce instance_mapname("1@ma_b"),"Taho: Do not engage on him even if he come above the surface. Just make loud noises!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ end;
+OnTimer15000:
+ mapannounce instance_mapname("1@ma_b"),"Mission - Destroy 2 caldrons and 2 gongs on left and right sides of the lake.",bc_map,"0xff3300"; //FW_NORMAL 15 0 0
+ donpcevent instance_npcname("#Bakonawan2")+"::OnStart";
+ stopnpctimer;
+ disablenpc instance_npcname("#BakonawaDeadn1");
+ end;
+}
+
+1@ma_b,36,111,4 script #Bakonawan2 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Bakonawan2");
+ end;
+OnStart:
+ enablenpc instance_npcname("#Bakonawan2");
+ set .@label$, instance_npcname("#Bakonawan2")+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@ma_b");
+ monster .@map$,95,98,"Caldron",2328,1,.@label$;
+ monster .@map$,60,98,"Caldron",2328,1,.@label$;
+ monster .@map$,97,104,"Gong",2328,1,.@label$;
+ monster .@map$,58,104,"Gong",2328,1,.@label$;
+ donpcevent instance_npcname("#Bakonawan2-1")+"::OnStart";
+ initnpctimer;
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@ma_b");
+ set .@mob_dead_num, mobcount(.@map$,instance_npcname("#Bakonawan2")+"::OnMyMobDead");
+ if (.@mob_dead_num < 1) {
+ donpcevent instance_npcname("#Bakonawan2-1")+"::OnEnd";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan2");
+ } else
+ mapannounce .@map$,"Taho: Good! "+.@mob_dead_num+" left to go!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ end;
+OnTimer1000: callsub OnAnnounce,"5 minutes",15,1;
+OnTimer60000: callsub OnAnnounce,"4 minutes",15,1;
+OnTimer120000: callsub OnAnnounce,"3 minutes",15,1;
+OnTimer180000: callsub OnAnnounce,"2 minutes",15,1;
+OnTimer240000: callsub OnAnnounce,"1 minute",15,1;
+OnTimer270000: callsub OnAnnounce,"30 seconds",15,0;
+OnTimer280000: callsub OnAnnounce,"20 seconds",15,0;
+OnTimer290000: callsub OnAnnounce,"10 seconds",15,0;
+OnTimer295000: callsub OnAnnounce,"5 seconds",16,0;
+OnTimer296000: callsub OnAnnounce,"4 seconds",17,0;
+OnTimer297000: callsub OnAnnounce,"3 seconds",18,0;
+OnTimer298000: callsub OnAnnounce,"2 seconds",19,0;
+OnTimer299000: callsub OnAnnounce,"1 second",20,0;
+OnTimer300000:
+ set .@map$, instance_mapname("1@ma_b");
+ mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0
+ donpcevent instance_npcname("Taho#Fail")+"::OnStart";
+ donpcevent instance_npcname("#Bakonawan2-1")+"::OnFail";
+ killmonster .@map$,instance_npcname("#Bakonawan2")+"::OnMyMobDead";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan2");
+ end;
+OnAnnounce:
+ mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL getarg(1) 0 0
+ if (getarg(2)) donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
+ end;
+}
+
+1@ma_b,36,111,4 script #Bakonawan2-1 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Bakonawan2-1");
+ end;
+OnStart:
+ enablenpc instance_npcname("#Bakonawan2-1");
+ monster instance_mapname("1@ma_b"),78,81,"Enraged Bakonawa",2321,1,instance_npcname("#Bakonawan2-1")+"::OnMyMobDead"; //original: (78,93)
+ end;
+OnFail:
+ killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan2-1")+"::OnMyMobDead";
+ end;
+OnEnd:
+ enablenpc instance_npcname("#Bakonawan2-1");
+ killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan2-1")+"::OnMyMobDead";
+ initnpctimer;
+ end;
+OnTimer1000:
+ mapannounce instance_mapname("1@ma_b"),"Taho: He is back into the lake again. Is it over?",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ end;
+OnTimer5000:
+ mapannounce instance_mapname("1@ma_b"),"Taho: UHM! Something is moving up rapidly under the water! Ba... Bakonawa is coming!!",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ end;
+OnTimer10000:
+ mapannounce instance_mapname("1@ma_b"),"Mission - Eliminate Bakonawa who became more fierce.",bc_map,"0xff3300"; //FW_NORMAL 15 0 0
+ donpcevent instance_npcname("#Bakonawan3")+"::OnStart";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan2-1");
+ end;
+OnMyMobDead:
+ end;
+}
+
+1@ma_b,36,111,4 script #Bakonawan3 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Bakonawan3");
+ end;
+OnStart:
+ enablenpc instance_npcname("#Bakonawan3");
+ initnpctimer;
+ monster instance_mapname("1@ma_b"),78,81,"Enraged Bakonawa",2322,1,instance_npcname("#Bakonawan3")+"::OnMyMobDead"; //original: (78,83)
+ donpcevent instance_npcname("#Bakonawan3-1")+"::OnStart";
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@ma_b");
+ set .@mob_dead_num, mobcount(.@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead");
+ if (.@mob_dead_num < 1) {
+ mapannounce .@map$,"Taho: We got him! I can see he has threw up something that looks like a box.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ donpcevent instance_npcname("Taho#Completed")+"::OnStart";
+ donpcevent instance_npcname("#Bakonawan3-1")+"::OnEnd";
+ killmonster .@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan3");
+ }
+ end;
+OnTimer1000:
+ callsub OnAnnounce,"10 minutes",15,1;
+ end;
+OnTimer60000:
+OnTimer120000:
+OnTimer180000:
+OnTimer240000:
+ donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
+ end;
+OnTimer300000: callsub OnAnnounce,"5 minutes",15,1;
+OnTimer360000: callsub OnAnnounce,"4 minutes",15,1;
+OnTimer420000: callsub OnAnnounce,"3 minutes",15,1;
+OnTimer480000: callsub OnAnnounce,"2 minutes",15,1;
+OnTimer540000: callsub OnAnnounce,"1 minute",15,1;
+OnTimer570000: callsub OnAnnounce,"30 seconds",15,0;
+OnTimer580000: callsub OnAnnounce,"20 seconds",15,0;
+OnTimer590000: callsub OnAnnounce,"10 seconds",15,0;
+OnTimer595000: callsub OnAnnounce,"5 seconds",16,0;
+OnTimer596000: callsub OnAnnounce,"4 seconds",17,0;
+OnTimer597000: callsub OnAnnounce,"3 seconds",18,0;
+OnTimer598000: callsub OnAnnounce,"2 seconds",19,0;
+OnTimer599000: callsub OnAnnounce,"1 second",20,0;
+OnTimer600000:
+ set .@map$, instance_mapname("1@ma_b");
+ mapannounce .@map$,"Bakonawa has escaped deep into the lake.",bc_map,"0xffff00"; //FW_NORMAL 20 0 0
+ donpcevent instance_npcname("Taho#Fail")+"::OnStart";
+ killmonster .@map$,instance_npcname("#Bakonawan3")+"::OnMyMobDead";
+ stopnpctimer;
+ disablenpc instance_npcname("#Bakonawan3");
+ end;
+OnAnnounce:
+ mapannounce instance_mapname("1@ma_b"),"Time Limit: "+getarg(0),bc_map,"0xff4400"; //FW_NORMAL getarg(1) 0 0
+ if (getarg(2)) donpcevent instance_npcname("#SummonPuppetsn1")+"::OnStart";
+ end;
+}
+
+1@ma_b,36,111,4 script #Bakonawan3-1 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Bakonawan3-1");
+ end;
+OnStart:
+ initnpctimer;
+ end;
+OnEnd:
+ killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead";
+ //showdigit 0;
+ stopnpctimer;
+ end;
+OnMyMobDead:
+ showdigit mobcount(instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead");
+ end;
+OnTimer120000: callsub OnMobSpawn,10;
+OnTimer180000: callsub OnMobSpawn,15;
+OnTimer240000: callsub OnMobSpawn,20;
+//OnTimer300000: callsub OnMobSpawn,25;
+OnTimer300000: callsub OnMobSpawn,30;
+OnTimer360000: callsub OnMobSpawn,35;
+OnTimer420000: callsub OnMobSpawn,40;
+OnTimer480000: callsub OnMobSpawn,45;
+OnTimer540000: callsub OnMobSpawn,50;
+OnTimer600000:
+ killmonster instance_mapname("1@ma_b"),instance_npcname("#Bakonawan3-1")+"::OnMyMobDead";
+ stopnpctimer;
+ end;
+OnMobSpawn:
+ set .@label$, instance_npcname("#Bakonawan3-1")+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@ma_b");
+ killmonster .@map$,.@label$;
+ set .@mob_dead_num, mobcount(.@map$,.@label$);
+ if (.@mob_dead_num < 50) {
+ set .@mob_rg, 50 - .@mob_dead_num;
+ if (.@mob_rg > getarg(0))
+ set .@mob_rg, getarg(0);
+ while(1) {
+ areamonster .@map$,74,74,82,74,"Bakonawa's Puppet",2334,1,.@label$;
+ set .@mob_dead_num, mobcount(.@map$,.@label$);
+ if (.@mob_dead_num >= .@mob_rg) {
+ break;
+ }
+ }
+ }
+ end;
+}
+
+1@ma_b,62,52,4 script Taho#Completed 541,{
+ disable_items;
+ if (checkweight(1201,1) == 0) {
+ mes "It seems you are carrying too many different kinds of items. Please try again after reducing it.";
+ close;
+ }
+ if (MaxWeight - Weight < 10000) {
+ mes "It seems you are already carrying items of too much weight. Please try again after reducing the weight.";
+ close;
+ }
+ if (checkquest(12279,HUNTING) == 2) {
+ erasequest 12279;
+ mes "[Taho]";
+ mes "This was found from Bakonawa's corpse. It would be better if you take this.";
+// if (IsPremiumPcCafe == 10)
+ getitem 6499,7; //Ancient_Grudge
+// else
+// getitem 6499,5; //Ancient_Grudge
+ getexp 0,100000;
+ next;
+ }
+ mes "[Taho]";
+ mes "We better hurry and get out of this place. This place is still dangerous even without Bakonawa...";
+ next;
+ mes "[Taho]";
+ mes "Then let's use to the rope to go up!";
+ close2;
+ warp "ma_scene01",175,176;
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("Taho#Completed");
+ end;
+OnStart:
+ enablenpc instance_npcname("Taho#Completed");
+ initnpctimer;
+ end;
+OnTimer1000:
+ monster instance_mapname("1@ma_b"),78,74,"Bakonawa Treasure Box",2335,1;
+ end;
+OnTimer10000:
+ mapannounce instance_mapname("1@ma_b"),"Taho: After opening the treasure box, please visit me at the top of the hill. I've got something to give to you.",bc_map,"0x00ffff"; //FW_NORMAL 15 0 0
+ stopnpctimer;
+ end;
+}
+
+1@ma_b,62,52,4 script Taho#Fail 541,{
+ mes "[Taho]";
+ mes "HMM. We almost got him but he is one fast creature...";
+ next;
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ mes "[Taho]";
+ mes "Are we going to try again?";
+ next;
+ switch(select("Hold on a sec!:Of couse! We cannot stand back now!")) {
+ case 1:
+ mes "[Taho]";
+ mes "AWW... I almost brought him out.";
+ close;
+ case 2:
+ mes "[Taho]";
+ mes "Then I will use Albopal once again to the lake.";
+ next;
+ mes "[Taho]";
+ mes "We are about to see Bakonawa with intenser anger...";
+ disablenpc instance_npcname("Taho#Fail");
+ donpcevent instance_npcname("#Bakonawan1")+"::OnStart";
+ close;
+ }
+ close;
+ } else {
+ mes "[Taho]";
+ mes "I am dropping Albopal like I did a while ago. I hope it pisses him off...";
+ close;
+ }
+
+OnInstanceInit:
+ disablenpc instance_npcname("Taho#Fail");
+ end;
+OnStart:
+ enablenpc instance_npcname("Taho#Fail");
+ end;
+}
diff --git a/npc/re/instances/BangungotHospital.txt b/npc/re/instances/BangungotHospital.txt
new file mode 100644
index 000000000..18d70e02d
--- /dev/null
+++ b/npc/re/instances/BangungotHospital.txt
@@ -0,0 +1,1101 @@
+//===== Hercules Script ======================================
+//= Bangungot Hospital 2F
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.1
+//===== Description: =========================================
+//= [Official Conversion]
+//= Save the hospital in Port Malaya from Bangungot.
+//= Part of the "Nurse in Port Malaya" quest.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//= 1.1 Added GM management function. [Euphy]
+//============================================================
+
+1@ma_h mapflag src4instance
+//============================================================
+
+// Instance Creation
+//============================================================
+ma_dun01,147,10,5 script Nurse#ma_dun01 569,{
+ if (BaseLevel < 100) end;
+
+ set .@party_id,getcharid(1);
+ cutin "malaya_nurseB",2;
+ if (checkquest(9223) == -1) {
+ set .@quest, checkquest(9222);
+ if (.@quest == -1) {
+ if (!.@party_id) {
+ if (malaya_bang == 30)
+ callsub L_Closed,1;
+ else if (malaya_bang == 31)
+ callsub L_Closed,0;
+ else
+ goto L_NoParty;
+ }
+ if (checkquest(11309,HUNTING) < 2) {
+ set .@playtime, checkquest(9224,PLAYTIME);
+ if (.@playtime == -1) {
+ if (malaya_bang == 30)
+ callsub L_Closed,1;
+ else if (malaya_bang == 31)
+ callsub L_Closed,0;
+ else if (malaya_bang > 39)
+ callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,0,0;
+ else {
+ mes "[Nurse Maenne]";
+ mes "..........";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else if (.@playtime == 0 || .@playtime == 1) {
+ if (checkquest(11309) == -1) {
+ mes "[Nurse Maenne]";
+ mes "This is a fatal situation.";
+ close2;
+ cutin "",255;
+ end;
+ } else {
+ mes "[Nurse Maenne]";
+ mes "Now the entrance";
+ mes "to the second floor";
+ mes "is closed.";
+ next;
+ mes "[Nurse Maenne]";
+ mes "To go up to";
+ mes "the second floor again,";
+ mes "open the gate";
+ mes "after a lapse of time.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ set .@quest2, checkquest(11309);
+ if (.@quest2 == -1) {
+ callsub L_Closed,0;
+ } else if (.@quest2 == 0 || .@quest2 == 1) {
+ callsub L_Complete;
+ completequest 9224;
+ erasequest 9224;
+ close2;
+ cutin "",255;
+ end;
+ } else {
+ //if (!.@party_id) goto L_NoParty; //unneeded
+ if (malaya_bang > 39)
+ callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1;
+ else {
+ mes "[Nurse Maenne]";
+ mes ".......";
+ close2;
+ cutin "",255;
+ end;
+ }
+ }
+ }
+ } else {
+ mes "[Nurse Maenne]";
+ mes "You got rid of Bangungot!"; //?
+ mes "The nurse might be waiting for you";
+ mes "in front of the hospital!";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else if (.@quest == 0 || .@quest == 1) {
+ if (!.@party_id) goto L_NoParty;
+ if (malaya_bang > 39) {
+ set .@hunting, checkquest(9222,HUNTING);
+ if (.@hunting == 0 || .@hunting == 1) {
+ set .@playtime, checkquest(9224,PLAYTIME);
+ if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Nurse Maenne]";
+ mes "Do you want go up to the second floor again?";
+ next;
+ callsub L_Enter,0,0;
+ } else if (.@playtime == 2) {
+ //if (!.@party_id) goto L_NoParty; //unneeded
+ if (malaya_bang > 39)
+ callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1;
+ else {
+ mes "[Nurse Maenne]";
+ mes ".......";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ mes "[Nurse Maenne]";
+ mes "This is a fatal situation.";
+ mes "You can't go up to the 2nd floor.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ if (checkweight(607,1) == 0) {
+ mes "[Nurse Maenne]";
+ mes "You have too much stuff.";
+ mes "Please reduce your stuff and";
+ mes "come to me again.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ if (checkweight(607,11) == 0) {
+ mes "[Nurse Maenne]";
+ mes "It's too heavy.";
+ mes "Please reduce the weight and";
+ mes "come to me again.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ callsub L_Complete;
+ completequest 9222;
+ erasequest 9222;
+ completequest 9224;
+ erasequest 9224;
+ setquest 9223;
+ getexp 500000,0;
+// if (IsPremiumPcCafe == 10)
+ getitem 6499,7; //Ancient_Grudge
+// else
+// getitem 6499,5; //Ancient_Grudge
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ mes "[Nurse Maenne]";
+ mes ".....?";
+ mes "Now you can't go up";
+ mes "to the 2nd floor.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ callsub L_Complete;
+ completequest 9222;
+ erasequest 9222;
+ completequest 9224;
+ erasequest 9224;
+ setquest 9223;
+ close2;
+ cutin "",255;
+ end;
+ }
+ } else {
+ if (checkquest(9223,PLAYTIME) == 0 || checkquest(9223,PLAYTIME) == 1) {
+ callsub L_Complete;
+ close2;
+ cutin "",255;
+ end;
+ } else {
+ if (!.@party_id) goto L_NoParty;
+ if (malaya_bang > 39)
+ callsub L_Enter,(getcharid(0) == getpartyleader(.@party_id,2))?1:0,1,1;
+ else {
+ mes "[Nurse Maenne]";
+ mes ".......";
+ close2;
+ cutin "",255;
+ end;
+ }
+ }
+ }
+
+L_Closed:
+ mes "[Nurse Maenne]";
+ mes "- The door is closed to 1st floor";
+ mes "When this Nurse came in?";
+ mes "I call her behind, but";
+ mes "she doesn't respond. -";
+ if (getarg(0)) {
+ set malaya_bang,31;
+ changequest 11302,11303;
+ }
+ close2;
+ cutin "",255;
+ end;
+
+L_NoParty:
+ mes "- I guess...";
+ mes "I can't talk him alone.";
+ mes "After registering a party";
+ mes "let me try to say something. -";
+ close2;
+ cutin "",255;
+ end;
+
+L_Enter:
+ set .@md_name$,"Bangungot Hospital 2F";
+ if (getarg(2) == 0) {
+ mes "[Nurse Maenne]";
+ mes "I already heard that story so";
+ mes "I pretty much know that.";
+ mes "What are you going to do?";
+ mes "Do you want to go up";
+ mes "to the second floor?";
+ } else {
+ mes "[Nurse Maenne]";
+ mes "You are back...";
+ mes "There is bad news.";
+ mes "I heard that";
+ mes "the Bangungot has";
+ mes "appeared again.";
+ next;
+ mes "[Nurse Maenne]";
+ mes strcharinfo(0) + "'s help";
+ mes "is needed again.";
+ mes "Please, could you give me";
+ mes "one more chance?";
+ }
+ next;
+ switch(select(((getarg(0))?"Prepare to enter the second floor.":"")+":Enter the second floor.:Do not enter.")) {
+ case 1:
+ set .@instance, instance_create(.@md_name$,getcharid(1));
+ if (.@instance < 0) {
+ mes "[Nurse Maenne]";
+ mes "A critical situation has happened.";
+ mes "You can't go up to the 2nd floor.";
+ close2;
+ cutin "",255;
+ end;
+ }
+ if (instance_attachmap("1@ma_h",.@instance) == "") {
+ mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
+ instance_destroy(.@instance);
+ close;
+ }
+ instance_set_timeout 3600,300,.@instance;
+ instance_init(.@instance);
+ mes "[Nurse Maenne]";
+ mes "We are preparing to go up";
+ mes "to the second floor.";
+ mes "At the second floor";
+ mes "there is a chaotic rumor that";
+ mes "the dead do not die.";
+ mes "Please refer to this story.";
+ next;
+ mes "[Nurse Maenne]";
+ mes "When you finish everything,";
+ mes "please talk to me again.";
+ mes "I really appreciate it.";
+ close2;
+ cutin "",255;
+ end;
+ case 2:
+ if( has_instance("1@ma_h") == "" ) {
+ mes "The memorial dungeon "+.@md_name$+" does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ close;
+ } else {
+ mapannounce "ma_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member entered "+.@md_name$+".",bc_map,"0x00ff99";
+ if (getarg(1)) {
+ if (checkquest(9223) > -1) {
+ completequest 9223;
+ erasequest 9223;
+ }
+ if (checkquest(9222) > -1)
+ erasequest 9222;
+ if (checkquest(9224) > -1)
+ erasequest 9224;
+ setquest 9222;
+ }
+ setquest 9224;
+ cutin "",255;
+ warp "1@ma_h",40,157;
+ end;
+ }
+ case 3:
+ mes "[Nurse Maenne]";
+ mes "Alright.";
+ mes "If you change mind, come back again.";
+ close2;
+ cutin "",255;
+ end;
+ }
+
+L_Complete:
+ mes "[Nurse Maenne]";
+ mes "You returned safely from the Bangungot on the second floor!!";
+ mes "However, it's not";
+ mes "really over yet.";
+ next;
+ mes "[Nurse Maenne]";
+ mes "I'm pretty sure it";
+ mes "never disappears easily.";
+ mes "I don't know what will happen";
+ mes "about Bangungot, so";
+ mes "after a lapse of time";
+ mes "please return to me.";
+ return;
+}
+
+sec_in02,27,30,0 script Bangungot Gate 406,{
+ callfunc "F_GM_NPC";
+ mes "Password";
+ next;
+ if (callfunc("F_GM_NPC","1854",1) == 0) {
+ mes "Good Luck.";
+ close;
+ }
+ switch(select("Receive 9222:Receive 9223:Erase 9222:Erase 9223:Receive 9224:Erase 9224:Receive malaya_bang 30:Receive malaya_bang 40:Receive 11309:Erase 11309:Cancel")) {
+ case 1: setquest 9222; close;
+ case 2: setquest 9223; close;
+ case 3: erasequest 9222; close;
+ case 4: erasequest 9223; close;
+ case 5: setquest 9224; close;
+ case 6: erasequest 9224; close;
+ case 7: set malaya_bang,30; close;
+ case 8: set malaya_bang,40; close;
+ case 9: setquest 11309; close;
+ case 10: completequest 11309; close;
+ case 11: close;
+ }
+}
+
+// Instance Scripts
+//============================================================
+1@ma_h,43,157,0 script #Memorial Start 139,2,2,{
+ end;
+OnTouch:
+ set .@map$, instance_mapname("1@ma_h");
+ mapannounce .@map$,"Bangungot: You silly "+strcharinfo(0)+" ....",bc_map,"0xFF82FF";
+ mapannounce .@map$,"Bangungot: Get out before you die...",bc_map,"0xFF82FF";
+ areamonster .@map$,44,156,46,158,"Bangungot's Mangkukulam",2339,1,instance_npcname("#Memorial Start")+"::OnMyMobDead";
+ donpcevent instance_npcname("#Memorial Start_time")+"::OnEnable";
+ end;
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer1000:
+ set .@map$, instance_mapname("1@ma_h");
+ if (mobcount(.@map$,instance_npcname("#Memorial Start")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("#Ward1 Entry")+"::OnEnable1";
+ donpcevent instance_npcname("#Memorial Start_time")+"::OnDisable";
+ mapannounce .@map$,"Bangungot: This is where your NIGHTMARE starts...",bc_map,"0xFF82FF";
+ disablenpc instance_npcname("#Memorial Start");
+ }
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,43,157,0 script #Memorial Start_time 139,{ //2,2
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Memorial Start_time");
+ end;
+OnEnable:
+ specialeffect EF_BAT2,AREA,instance_npcname("#Memorial Start");
+ initnpctimer;
+ end;
+OnDisable:
+ stopnpctimer;
+ end;
+OnTimer5000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: You cannot help.... you can't defeat me.",bc_map,"0xFF82FF";
+ end;
+OnTimer10000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: HAHAHAHAHAHAHAHA!!!!",bc_map,"0xFF82FF";
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,46,165,0 script #Ward1 Entry 139,{ //3,3
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnEnable1:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ enablenpc instance_npcname(strnpcinfo(0));
+ specialeffect EF_BAT2;
+ switch(atoi(charat(strnpcinfo(2),4))) {
+ case 1:
+ areamonster .@map$,49,171,51,173,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,51,171,53,173,"Bangungot's Mangkukulam",2339,1,.@label$;
+ end;
+ case 2:
+ areamonster .@map$,49,137,51,139,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,51,137,53,139,"Bangungot's Mangkukulam",2339,1,.@label$;
+ end;
+ case 3:
+ areamonster .@map$,69,171,71,173,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,71,171,73,173,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,73,171,75,173,"Bangungot's Mangkukulam",2339,1,.@label$;
+ end;
+ case 4:
+ areamonster .@map$,71,139,73,141,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,73,139,75,141,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,75,139,77,141,"Bangungot's Mangkukulam",2339,1,.@label$;
+ end;
+ case 5:
+ areamonster .@map$,93,173,95,175,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,95,173,97,175,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,97,173,99,175,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,93,175,95,177,"Bangungot's Mangkukulam",2339,1,.@label$;
+ end;
+ }
+/*
+// Not called in official scripts.
+OnEnable2:
+ areamonster instance_mapname("1@ma_h"),140,38,142,40,"Bangungot's Mangkukulam",2339,1,instance_npcname("#Ward1 Entry")+"::OnMyMobDead";
+ end;
+*/
+OnEnable3:
+ set .@i, atoi(charat(strnpcinfo(2),4))+1;
+ donpcevent instance_npcname("#Ward"+.@i+" Entry")+"::OnEnable1";
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer1000:
+ set .@map$, instance_mapname("1@ma_h");
+ if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) {
+ specialeffect EF_BAT2;
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnEnable3";
+ switch(atoi(charat(strnpcinfo(2),4))) {
+ case 1: set .@str$,"Bangungot: I will let you see the pain and the agony actually be real....."; break;
+ case 2: set .@str$,"Bangungot: Diseased spirits are the source of my energy, and my life..."; break;
+ case 3: set .@str$,"Bangungot: Scream more....and more...... your pain..."; break;
+ case 4: set .@str$,"Bangungot: Deeply and more deeply in pain..."; break;
+ case 5: set .@str$,"Bangungot: Be horrified...be petrified."; break;
+ }
+ mapannounce .@map$,.@str$,bc_map,"0xFF82FF";
+ }
+ stopnpctimer;
+ end;
+}
+1@ma_h,57,147,0 duplicate(#Ward1 Entry) #Ward2 Entry 139 //3,3
+1@ma_h,67,165,0 duplicate(#Ward1 Entry) #Ward3 Entry 139 //3,3
+1@ma_h,79,147,0 duplicate(#Ward1 Entry) #Ward4 Entry 139 //3,3
+1@ma_h,90,165,0 duplicate(#Ward1 Entry) #Ward5 Entry 139 //3,3
+
+1@ma_h,101,147,0 script #Ward6 Entry 139,{ //2,2
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Ward6 Entry");
+ end;
+OnEnable1:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Ward6 Entry")+"::OnMyMobDead";
+ enablenpc instance_npcname("#Ward6 Entry");
+ specialeffect EF_BAT2;
+ areamonster .@map$,93,137,95,139,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,95,137,97,139,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,97,137,99,139,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,93,139,95,141,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,95,139,97,141,"Bangungot's Manananggal",2338,1,.@label$;
+ end;
+/*
+// Not called in official scripts.
+OnEnable2:
+ areamonster instance_mapname("1@ma_h"),140,38,142,40,"Bangungot's Mangkukulam",2339,1,instance_npcname("#Ward6 Entry")+"::OnMyMobDead";
+ end;
+*/
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer3000:
+ set .@map$, instance_mapname("1@ma_h");
+ if (mobcount(.@map$,instance_npcname("#Ward6 Entry")+"::OnMyMobDead") < 1) {
+ specialeffect EF_BAT2;
+ donpcevent instance_npcname("#Summon Boss")+"::OnEnable";
+ mapannounce .@map$,"Bangungot: You had the choice to enter here, but you have no choice to get out as you want...",bc_map,"0xFF82FF";
+ }
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,110,177,0 script #Summon Boss 139,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Summon Boss");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#Summon Boss");
+ monster instance_mapname("1@ma_h"),143,158,"Bangungot",2317,1,instance_npcname("#Summon Boss")+"::OnMyMobDead";
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry";
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnEnable";
+ end;
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer1000:
+ if (mobcount(instance_mapname("1@ma_h"),instance_npcname("#Summon Boss")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("#Summon Pillar")+"::OnEnable1";
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: I....cannot.....finish...like.......this.",bc_map,"0xFF82FF";
+ disablenpc instance_npcname("#Summon Boss");
+ }
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,147,143,0 script #Boss Room Entry 139,10,10,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Boss Room Entry");
+ end;
+OnTouch:
+ specialeffect EF_GHOST;
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnDisableEntry";
+ donpcevent instance_npcname("#Boss Room Entry_time")+"::OnEnable";
+ end;
+OnEnable:
+ enablenpc instance_npcname("#Boss Room Entry");
+ enablenpc instance_npcname("#Boss Room Door");
+ enablenpc instance_npcname("#Boss Room Door1");
+ end;
+OnSpawn:
+ areamonster instance_mapname("1@ma_h"),123,152,137,166,"Bangungot's Manananggal",2338,1,instance_npcname("#Boss Room Entry")+"::OnMyMobDead";
+ end;
+OnReset:
+ killmonster instance_mapname("1@ma_h"),instance_npcname("#Boss Room Entry")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer1000:
+ set .@map$, instance_mapname("1@ma_h");
+ if (mobcount(.@map$,instance_npcname("#Boss Room Entry")+"::OnMyMobDead") < 1)
+ mapannounce .@map$,"Bangungot: HAHAHAH... That's not enough, I will be even stronger....",bc_map,"0xFF82FF";
+ stopnpctimer;
+ end;
+
+// Unofficial labels (to avoid duplicating code).
+OnEnableEntry:
+ enablenpc instance_npcname("#Boss Room Entry");
+ enablenpc instance_npcname("#Boss Room Entry_a");
+ enablenpc instance_npcname("#Boss Room Entry_b");
+ enablenpc instance_npcname("#Boss Room Entry_c");
+ enablenpc instance_npcname("#Boss Room Entry_d");
+ enablenpc instance_npcname("#Boss Room Entry_e");
+ enablenpc instance_npcname("#Boss Room Entry_f");
+ enablenpc instance_npcname("#Boss Room Entry_g");
+ enablenpc instance_npcname("#Boss Room Entry_h");
+ end;
+OnDisableEntry:
+ disablenpc instance_npcname("#Boss Room Entry");
+ disablenpc instance_npcname("#Boss Room Entry_a");
+ disablenpc instance_npcname("#Boss Room Entry_b");
+ disablenpc instance_npcname("#Boss Room Entry_c");
+ disablenpc instance_npcname("#Boss Room Entry_d");
+ disablenpc instance_npcname("#Boss Room Entry_e");
+ disablenpc instance_npcname("#Boss Room Entry_f");
+ disablenpc instance_npcname("#Boss Room Entry_g");
+ disablenpc instance_npcname("#Boss Room Entry_h");
+ end;
+}
+
+1@ma_h,147,143,0 script #Boss Room Entry_time 139,{ //10,10
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Boss Room Entry_time");
+ end;
+OnEnable:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: You poor little things. I will invite you to the world of infectious disease...",bc_map,"0xFF82FF";
+ initnpctimer;
+ end;
+OnTimer25000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: You will know what it is...",bc_map,"0xFF82FF";
+ for(set .@i,10; .@i<=22; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer35000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: Real pain! You will know!!",bc_map,"0xFF82FF";
+ for(set .@i,25; .@i<=33; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer45000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: Have you ever heard the patients screaming?",bc_map,"0xFF82FF";
+ end;
+OnTimer55000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: If you haven't, I will let you!!",bc_map,"0xFF82FF";
+ enablenpc instance_npcname("#Summon Ward Mob");
+ donpcevent instance_npcname("#Summon Ward Mob")+"::OnEnable7";
+ end;
+OnTimer60000:
+ for(set .@i,1; .@i<=8; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ for(set .@i,34; .@i<=38; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer60500:
+ for(set .@i,41; .@i<=49; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer90000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: Delight coming from agony is my nutrient.",bc_map,"0xFF82FF";
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnSpawn";
+ end;
+OnTimer110000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: Remain here, cursed disease.....",bc_map,"0xFF82FF";
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnSpawn";
+ end;
+OnTimer125000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: You wanna hang out with me ......?",bc_map,"0xFF82FF";
+ end;
+OnTimer128000:
+ for(set .@i,1; .@i<=8; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ for(set .@i,34; .@i<=38; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer128500:
+ for(set .@i,41; .@i<=49; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer129000:
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry";
+ end;
+OnTimer129500:
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnSpawn";
+ for(set .@i,10; .@i<=22; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer130000:
+ for(set .@i,25; .@i<=33; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ stopnpctimer;
+ end;
+OnStopTimer:
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,111,177,0 script #Boss Room Entry_2 45,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Boss Room Entry_2");
+ end;
+OnEnable:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: You are pretty powerful...",bc_map,"0xFF82FF";
+ initnpctimer;
+ end;
+OnTimer3000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: But can you...",bc_map,"0xFF82FF";
+ end;
+OnTimer6000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: ...defeat me again...?",bc_map,"0xFF82FF";
+ end;
+OnTimer9000:
+ for(set .@i,1; .@i<=8; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ for(set .@i,34; .@i<=38; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer9500:
+ for(set .@i,41; .@i<=49; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer10000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: You stupid persoon....",bc_map,"0xFF82FF";
+ for(set .@i,10; .@i<=22; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ end;
+OnTimer10500:
+ for(set .@i,25; .@i<=33; set .@i,.@i+1)
+ enablenpc instance_npcname("#Patternwarp"+.@i);
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,118,63,0 script #Summon Ward Mob 139,4,4,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Summon Ward Mob");
+ end;
+OnTouch:
+ donpcevent instance_npcname("#Summon Ward Mob_time")+"::OnEnable";
+ specialeffect EF_CURSEATTACK;
+ end;
+OnEnable1:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ areamonster .@map$,47,77,49,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,49,77,51,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,51,77,53,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,47,79,49,81,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,49,79,51,81,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,47,81,49,83,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,49,81,51,83,"Bangungot's Tiyanak",2339,1,.@label$;
+ end;
+OnEnable2:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ areamonster .@map$,51,45,53,47,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,53,45,55,47,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,49,47,51,49,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,53,47,55,49,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,49,49,51,51,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,51,49,53,51,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,53,49,55,51,"Bangungot's Tiyanak",2340,1,.@label$;
+ end;
+OnEnable3:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ areamonster .@map$,69,75,71,77,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,71,75,73,77,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,73,75,75,77,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,69,77,71,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,71,77,73,79,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,69,79,71,81,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,71,79,73,81,"Bangungot's Tiyanak",2339,1,.@label$;
+ end;
+OnEnable4:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ areamonster .@map$,73,45,75,47,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,75,45,77,47,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,71,47,73,49,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,75,47,77,49,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,71,49,73,51,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,73,49,75,51,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,75,49,77,51,"Bangungot's Tiyanak",2340,1,.@label$;
+ end;
+OnEnable5:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ areamonster .@map$,93,77,95,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,95,77,97,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,97,77,99,79,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,93,79,95,81,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,95,79,97,81,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,93,81,95,83,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,95,81,97,83,"Bangungot's Tiyanak",2339,1,.@label$;
+ end;
+OnEnable6:
+ set .@map$, instance_mapname("1@ma_h");
+ set .@label$, instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ areamonster .@map$,93,43,95,45,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,95,43,97,45,"Bangungot's Tiyanak",2339,1,.@label$;
+ areamonster .@map$,91,45,93,47,"Bangungot's Mangkukulam",2339,1,.@label$;
+ areamonster .@map$,95,45,97,47,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,91,47,93,49,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,93,47,95,49,"Bangungot's Tiyanak",2340,1,.@label$;
+ areamonster .@map$,95,47,97,49,"Bangungot's Tiyanak",2340,1,.@label$;
+ end;
+OnEnable7:
+ killmonster instance_mapname("1@ma_h"),instance_npcname("#Summon Ward Mob")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer1000:
+ if (mobcount(instance_mapname("1@ma_h"),instance_npcname("#Summon Ward Mob")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("#Boss Room Entry_2")+"::OnEnable";
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry";
+ donpcevent instance_npcname("#Boss Room Entry_time")+"::OnStopTimer";
+ }
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,118,64,0 script #Summon Ward Mob_time 139,{ //4,4
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Summon Ward Mob_time");
+ end;
+OnEnable:
+ initnpctimer;
+ disablenpc instance_npcname("#Summon Ward Mob");
+ end;
+OnTimer2000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: My spirit will be with your cursed body...",bc_map,"0xFF82FF";
+ end;
+OnTimer4000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: My inferiors...!! Go!! Go torment the patients in the wards!!",bc_map,"0xFF82FF";
+ end;
+OnTimer6000:
+ mapannounce instance_mapname("1@ma_h"),"- Bangungot's inferiors are bothering patients!! If you don't slay them all, Bangungot will be stronger. -",bc_map,"0xFF8200";
+ end;
+OnTimer10000:
+ setarray .@npc$[1],
+ "Moaning Patient","Screaming Patient","Patient in Pain","Passed Out Patient","Patient with Nightmare","Sick Looking Patient",
+ "Horrified Patient","Patient in Sorrow","Suffering Patient","Wriggling Patient","Patient in Cold Sweat","Howling Patient";
+ enablenpc instance_npcname("#Summon Ward Mob");
+ set .@rand, rand(1,6);
+ donpcevent instance_npcname("#Summon Ward Mob")+"::OnEnable"+.@rand;
+ set .@id, (.@rand*2)-rand(2);
+ donpcevent instance_npcname(.@npc$[.@id]+"#"+.@id)+"::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,112,177,0 script #Summon Pillar 139,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Summon Pillar");
+ end;
+OnEnable1:
+ enablenpc instance_npcname("#Summon Pillar");
+ donpcevent instance_npcname("#Boss Room Entry_time")+"::OnStopTimer";
+ donpcevent instance_npcname("#Summon Pillar_time")+"::OnEnable";
+ monster instance_mapname("1@ma_h"),131,157,"Pillar of Spirit",2327,1,instance_npcname("#Summon Pillar")+"::OnMyMobDead";
+ end;
+OnEnable3:
+ enablenpc instance_npcname("#Boss Room Exit");
+ disablenpc instance_npcname("#Summon Pillar");
+ end;
+OnReset:
+ killmonster instance_mapname("1@ma_h"),instance_npcname("#Summon Pillar")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ initnpctimer;
+ end;
+OnTimer1000:
+ set .@map$, instance_mapname("1@ma_h");
+ if (mobcount(.@map$,instance_npcname("#Summon Pillar")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("#Summon Pillar_time")+"::OnStopTimer";
+ donpcevent instance_npcname("#Summon Pillar")+"::OnEnable3";
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnReset";
+ mapannounce .@map$,"Bangungot: Oh....cannot believe that I lost...",bc_map,"0xFF4500";
+ mapannounce .@map$,"Bangungot: But don't think this is the end!!",bc_map,"0xFF4500";
+ mapannounce .@map$,"Bangungot: I WILL BE BACK!!!!!",bc_map,"0xFF4500";
+ }
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,112,178,0 script #Summon Pillar_time 139,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Summon Pillar_time");
+ end;
+OnEnable:
+ initnpctimer;
+ end;
+OnStopTimer:
+ stopnpctimer;
+ end;
+OnTimer1000:
+ mapannounce instance_mapname("1@ma_h"),"- Bangungot's Pillar of Spirit is curing Bangungot. If you don't hunt it now, he will fully recover!! -",bc_map,"0xFF8200";
+ specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45");
+ end;
+OnTimer7000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: I never die!!!!",bc_map,"0xFF82FF";
+ specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45");
+ end;
+OnTimer14000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: If you dare, kill me!! I will revive soon!!!",bc_map,"0xFF82FF";
+ specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45");
+ end;
+OnTimer21000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: I cannot die this way...!!!!",bc_map,"0xFF82FF";
+ specialeffect EF_MAPPILLAR2,AREA,instance_npcname("#Patternwarp45");
+ end;
+OnTimer30000:
+ donpcevent instance_npcname("#Summon Pillar")+"::OnReset";
+ end;
+OnTimer31000:
+ mapannounce instance_mapname("1@ma_h"),"Bangungot: Hahahahaha!! I'm back with the power from the pillar of spirit!!!",bc_map,"0xFF82FF";
+ donpcevent instance_npcname("#Summon Pillar")+"::OnReset";
+ end;
+OnTimer36000:
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnEnableEntry";
+ donpcevent instance_npcname("#Summon Boss")+"::OnEnable";
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,118,171,0 script #Boss Room Entry_a 139,10,10,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnTouch:
+ specialeffect EF_GHOST;
+ donpcevent instance_npcname("#Boss Room Entry")+"::OnDisableEntry";
+ donpcevent instance_npcname("#Boss Room Entry_time")+"::OnEnable";
+ end;
+}
+1@ma_h,132,171,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_b 139,10,10
+1@ma_h,147,171,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_c 139,10,10
+1@ma_h,118,157,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_d 139,10,10
+1@ma_h,132,157,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_e 139,10,10
+1@ma_h,147,157,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_f 139,10,10
+1@ma_h,118,143,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_g 139,10,10
+1@ma_h,132,143,0 duplicate(#Boss Room Entry_a) #Boss Room Entry_h 139,10,10
+
+1@ma_h,131,62,0 script #Boss Effect 139,{ //4,4
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Boss Effect");
+ initnpctimer;
+ end;
+OnTimer3000:
+ specialeffect EF_BARRIER;
+ stopnpctimer;
+ initnpctimer;
+ end;
+}
+
+1@ma_h,43,86,4 script Moaning Patient#1 584,{
+ end;
+OnInstanceInit:
+ monster instance_mapname("1@ma_h"),131,62,"Bangungot",2318,1;
+ end;
+OnEnable:
+ mapannounce instance_mapname("1@ma_h"),"Moaning Patient: aaawwww....",bc_map,"0xFF0000";
+ initnpctimer;
+ end;
+OnTimer5000:
+OnTimer8000:
+OnTimer11000:
+OnTimer14000:
+OnTimer17000:
+OnTimer20000:
+OnTimer23000:
+OnTimer26000:
+ specialeffect EF_POTION_BERSERK;
+ specialeffect EF_CURSEATTACK;
+ end;
+OnTimer30000:
+ specialeffect EF_POTION_BERSERK;
+ specialeffect EF_CURSEATTACK;
+ stopnpctimer;
+ end;
+}
+
+1@ma_h,60,87,4 script Screaming Patient#2 585,{
+ end;
+OnEnable:
+ switch(atoi(strnpcinfo(2))) {
+ case 2: set .@str$,"Screaming Patient: Aaaaargh!!"; break;
+ case 3: set .@str$,"Patient in Pain: Oooooowwww!! It's killing me!!!"; break;
+ case 4: set .@str$,"Passed Out Patient: ........"; break;
+ case 5: set .@str$,"Patient with Nightmare: Help~!!! Save me!!!"; break;
+ case 6: set .@str$,"Sick Looking Patient: Hu..a...aaah.."; break;
+ case 7: set .@str$,"Horrified Patient: Get away!! Please...."; break;
+ case 8: set .@str$,"Patient in Sorrow: crying and crying......"; break;
+ case 9: set .@str$,"Suffering Patient: Stop... please..."; break;
+ case 10: set .@str$,"Wriggling Patient: awwww..."; break;
+ case 11: set .@str$,"Patient in Cold Sweat: Help.....help...."; break;
+ case 12: set .@str$,"Howling Patient: aaaaahhhhhhhhhh!!"; break;
+ }
+ mapannounce instance_mapname("1@ma_h"),.@str$,bc_map,"0xFF0000";
+ initnpctimer;
+ end;
+OnTimer5000:
+OnTimer8000:
+OnTimer11000:
+OnTimer14000:
+OnTimer17000:
+OnTimer20000:
+OnTimer23000:
+OnTimer26000:
+ specialeffect EF_POTION_BERSERK;
+ specialeffect EF_CURSEATTACK;
+ end;
+OnTimer30000:
+ specialeffect EF_POTION_BERSERK;
+ specialeffect EF_CURSEATTACK;
+ stopnpctimer;
+ end;
+}
+1@ma_h,60,39,7 duplicate(Screaming Patient#2) Patient in Pain#3 584
+1@ma_h,43,39,7 duplicate(Screaming Patient#2) Passed Out Patient#4 585
+1@ma_h,77,86,4 duplicate(Screaming Patient#2) Patient with Nightmare#5 584
+1@ma_h,69,87,4 duplicate(Screaming Patient#2) Sick Looking Patient#6 585
+1@ma_h,73,39,7 duplicate(Screaming Patient#2) Horrified Patient#7 584
+1@ma_h,65,51,7 duplicate(Screaming Patient#2) Patient in Sorrow#8 585
+1@ma_h,87,86,4 duplicate(Screaming Patient#2) Suffering Patient#9 584
+1@ma_h,104,86,4 duplicate(Screaming Patient#2) Wriggling Patient#10 585
+1@ma_h,99,39,7 duplicate(Screaming Patient#2) Patient in Cold Sweat#11 584
+1@ma_h,87,39,7 duplicate(Screaming Patient#2) Howling Patient#12 585
+
+1@ma_h,43,181,4 script Moaning Patient#b 584,{ end; }
+1@ma_h,60,182,4 script Screaming Patient#b 585,{ end; }
+1@ma_h,60,132,7 script Patient in Pain#b 584,{ end; }
+1@ma_h,43,132,7 script Passed Out Patient#b 585,{ end; }
+1@ma_h,77,182,4 script Patient with Nightmare#b 584,{ end; }
+1@ma_h,69,182,4 script Sick Looking Patient#b 585,{ end; }
+1@ma_h,73,132,7 script Horrified Patient#b 584,{ end; }
+1@ma_h,65,144,7 script Patient in Sorrow#b 585,{ end; }
+1@ma_h,87,181,4 script Suffering Patient#b 584,{ end; }
+1@ma_h,104,181,4 script Wriggling Patient#b 585,{ end; }
+1@ma_h,99,132,7 script Patient in Cold Sweat#b 584,{ end; }
+1@ma_h,87,132,7 script Howling Patient#b 585,{ end; }
+
+// Warp Portals
+//============================================================
+1@ma_h,35,156,0 warp #Boss Room Exit 2,2,ma_dun01,150,9
+1@ma_h,105,157,0 warp #Boss Room Door 2,2,1@ma_h,116,157
+1@ma_h,112,157,0 warp #Boss Room Door1 2,2,1@ma_h,100,157
+1@ma_h,104,63,0 warp #Boss Room Door2 2,2,1@ma_h,117,63
+1@ma_h,112,63,0 warp #Boss Room Door3 2,2,1@ma_h,100,63
+1@ma_h,36,157,0 warp #Patternwarp1 7,7,1@ma_h,117,63
+1@ma_h,46,157,0 warp #Patternwarp2 7,7,1@ma_h,117,63
+1@ma_h,57,157,0 warp #Patternwarp3 7,7,1@ma_h,117,63
+1@ma_h,67,157,0 warp #Patternwarp4 7,7,1@ma_h,117,63
+1@ma_h,79,157,0 warp #Patternwarp5 7,7,1@ma_h,117,63
+1@ma_h,89,157,0 warp #Patternwarp6 7,7,1@ma_h,117,63
+1@ma_h,100,157,0 warp #Patternwarp7 7,7,1@ma_h,117,63
+1@ma_h,51,173,0 warp #Patternwarp8 10,10,1@ma_h,117,63
+1@ma_h,52,140,0 warp #Patternwarp34 10,10,1@ma_h,117,63
+1@ma_h,73,173,0 warp #Patternwarp35 10,10,1@ma_h,117,63
+1@ma_h,73,140,0 warp #Patternwarp36 10,10,1@ma_h,117,63
+1@ma_h,95,173,0 warp #Patternwarp37 10,10,1@ma_h,117,63
+1@ma_h,95,140,0 warp #Patternwarp38 10,10,1@ma_h,117,63
+//1@ma_h,70,170,0 warp #Patternwarp39 10,10,1@ma_h,117,63
+//1@ma_h,77,169,0 warp #Patternwarp40 10,10,1@ma_h,117,63
+1@ma_h,117,171,0 warp #Patternwarp41 10,10,1@ma_h,117,63
+1@ma_h,131,171,0 warp #Patternwarp42 10,10,1@ma_h,117,63
+1@ma_h,146,171,0 warp #Patternwarp43 10,10,1@ma_h,117,63
+1@ma_h,117,157,0 warp #Patternwarp44 10,10,1@ma_h,117,63
+1@ma_h,131,157,0 warp #Patternwarp45 10,10,1@ma_h,117,63
+1@ma_h,146,157,0 warp #Patternwarp46 10,10,1@ma_h,117,63
+1@ma_h,117,143,0 warp #Patternwarp47 10,10,1@ma_h,117,63
+1@ma_h,131,143,0 warp #Patternwarp48 10,10,1@ma_h,117,63
+1@ma_h,146,143,0 warp #Patternwarp49 10,10,1@ma_h,117,63
+1@ma_h,36,63,0 warp #Patternwarp10 7,7,1@ma_h,116,157
+1@ma_h,46,63,0 warp #Patternwarp11 7,7,1@ma_h,116,157
+1@ma_h,56,63,0 warp #Patternwarp12 7,7,1@ma_h,116,157
+1@ma_h,67,63,0 warp #Patternwarp13 7,7,1@ma_h,116,157
+1@ma_h,78,63,0 warp #Patternwarp14 7,7,1@ma_h,116,157
+1@ma_h,89,63,0 warp #Patternwarp15 7,7,1@ma_h,116,157
+1@ma_h,100,63,0 warp #Patternwarp16 7,7,1@ma_h,116,157
+1@ma_h,51,79,0 warp #Patternwarp17 10,10,1@ma_h,116,157
+1@ma_h,51,46,0 warp #Patternwarp18 10,10,1@ma_h,116,157
+1@ma_h,73,80,0 warp #Patternwarp19 10,10,1@ma_h,116,157
+1@ma_h,73,46,0 warp #Patternwarp20 10,10,1@ma_h,116,157
+1@ma_h,95,79,0 warp #Patternwarp21 10,10,1@ma_h,116,157
+1@ma_h,95,46,0 warp #Patternwarp22 10,10,1@ma_h,116,157
+//1@ma_h,193,82,0 warp #Patternwarp23 7,7,1@ma_h,116,157
+//1@ma_h,193,82,0 warp #Patternwarp24 7,7,1@ma_h,116,157
+1@ma_h,117,77,0 warp #Patternwarp25 10,10,1@ma_h,116,157
+1@ma_h,131,77,0 warp #Patternwarp26 10,10,1@ma_h,116,157
+1@ma_h,146,77,0 warp #Patternwarp27 10,10,1@ma_h,116,157
+1@ma_h,117,63,0 warp #Patternwarp28 10,10,1@ma_h,116,157
+1@ma_h,131,63,0 warp #Patternwarp29 10,10,1@ma_h,116,157
+1@ma_h,146,63,0 warp #Patternwarp30 10,10,1@ma_h,116,157
+1@ma_h,117,49,0 warp #Patternwarp31 10,10,1@ma_h,116,157
+1@ma_h,131,49,0 warp #Patternwarp32 10,10,1@ma_h,116,157
+1@ma_h,146,49,0 warp #Patternwarp33 10,10,1@ma_h,116,157
+
+// Disable select warps.
+// Custom, but saves processing and lines.
+1@ma_h,1,1,0 script #ma_hos_warp_init 844,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#Boss Room Exit");
+ disablenpc instance_npcname("#Boss Room Door");
+ disablenpc instance_npcname("#Boss Room Door1");
+ for(set .@i,1; .@i<=8; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ for(set .@i,34; .@i<=38; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ // Skip 39-40 since they're disabled in the official script.
+ for(set .@i,41; .@i<=49; set .@i,.@i+1)
+ disablenpc instance_npcname("#Patternwarp"+.@i);
+ disablenpc instance_npcname("#ma_hos_warp_init");
+ end;
+}
diff --git a/npc/re/instances/BuwayaCave.txt b/npc/re/instances/BuwayaCave.txt
new file mode 100644
index 000000000..0f8117170
--- /dev/null
+++ b/npc/re/instances/BuwayaCave.txt
@@ -0,0 +1,459 @@
+//===== Hercules Script ======================================
+//= Buwaya Cave
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= [Official Conversion]
+//= Defeat Buwaya in his cave.
+//= Part of the "Secret in the Woods" quest.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//============================================================
+
+1@ma_c mapflag src4instance
+//============================================================
+ma_fild02,312,317,5 script Guard#buwaya_cave 570,{
+ if (BaseLevel < 130) {
+ mes "[Guard]";
+ mes "People under ^ff0000level 130^000000";
+ mes "cannot enter this place.";
+ mes "This place is dangerous. Please go back.";
+ close;
+ }
+
+ set .@party_id,getcharid(1);
+ set .@md_name$,"Buwaya Cave";
+
+ if (!.@party_id) {
+ mes "[Guard]";
+ mes "Buwaya is dangerous.";
+ mes "Please come back after you form a";
+ mes "team with other people.";
+ close;
+ }
+ if (getcharid(0) == getpartyleader(.@party_id,2)) {
+ mes "[Guard]";
+ mes "This place is dangerous. Please go back.";
+ mes "If you dont have any business here, please go back.";
+ next;
+ while(1) {
+ switch(select("Why is it so dangerous?:I'm here to hunt down Buwaya.:End conversation.")) {
+ case 1:
+ mes "[Guard]";
+ mes "Recently, there has been a case";
+ mes "where villagers have disappeared.";
+ mes "After investigating the tracks, ";
+ mes "we found out the giant monster Buwaya";
+ mes "was responsible.";
+ next;
+ mes "[Guard]";
+ mes "Soldiers and mercenaries have been dispatched to ";
+ mes "hunt down Buwaya, but were never";
+ mes "completely successful.";
+ next;
+ mes "[Guard]";
+ mes "Buwaya is still kidnapping";
+ mes "the villagers to this day.";
+ mes "Please gather some people to get rid of Buwaya.";
+ next;
+ break;
+ case 2:
+ set .@playtime, checkquest(4229,PLAYTIME);
+ if (.@playtime == -1) {
+ // fall through
+ } else if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Guard]";
+ mes "Buwaya is still hiding.";
+ mes "Even if you enter now, Buwaya will not come out. ";
+ mes "Please come back later.";
+ close;
+ } else {
+ erasequest 4229;
+ // fall through
+ }
+ set .@instance,instance_create(.@md_name$,.@party_id);
+ if (.@instance < 0) {
+ mes "[Guard]";
+ mes "Party name is... "+getpartyname(.@party_id)+".";;
+ mes "Party leader is... "+strcharinfo(0);
+ mes "^0000ff"+.@md_name$+"^000000 cannot be opened now.";
+ mes "Please try a moment later.";
+ close;
+ }
+ if (instance_attachmap("1@ma_c",.@instance) == "") {
+ mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
+ instance_destroy(.@instance);
+ close;
+ }
+ instance_set_timeout 3600,300,.@instance;
+ instance_init(.@instance);
+
+ mes "[Guard]";
+ mes "I will open up the tunnel to ^0000ff"+.@md_name$+"^000000.";
+ mes "I wish you good luck.";
+ close;
+ case 3:
+ mes "[Guard]";
+ mes "This place is dangerous. You cannot enter.";
+ close;
+ }
+ }
+ } else {
+ mes "[Guard]";
+ mes "Let me talk with the party leader.";
+ mes "Please call forth the leader.";
+ close;
+ }
+}
+
+ma_fild02,315,323,0 script Cave Entrance#buwaya 45,2,2,{
+ end;
+OnTouch:
+ if (BaseLevel < 130) {
+ mes "[Guard]";
+ mes "People under ^ff0000level 130^000000";
+ mes "cannot enter this place.";
+ mes "This place is dangerous. Please go back.";
+ close;
+ }
+ set .@playtime, checkquest(4229,PLAYTIME);
+ if (.@playtime == -1) {
+ // fall through
+ } else if (.@playtime == 0 || .@playtime == 1) {
+ mes "[Guard]";
+ mes "Buwaya is still hiding.";
+ mes "Even if you enter now, Buwaya will not come out.";
+ mes "Please come back later.";
+ close;
+ } else {
+ erasequest 4229;
+ // fall through
+ }
+ switch(select("Enter.:Turn back.")) {
+ case 1:
+ if( has_instance("1@ma_c") == "" ) {
+ mes "The memorial dungeon Buwaya Cave does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ close;
+ } else {
+ mapannounce "ma_fild02",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member began hunting Buwaya in Buwaya Cave.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ setquest 4229;
+ warp "1@ma_c",35,57;
+ end;
+ }
+ case 2:
+ mes "[Guard]";
+ mes "You must value your life.";
+ mes "It is better to think carefully before you act.";
+ close;
+ }
+}
+
+1@ma_c,33,112,0 script #damage 139,7,7,{
+ end;
+OnInstanceInit:
+ initnpctimer;
+ disablenpc instance_npcname("#damage");
+ end;
+OnTimer1000:
+ enablenpc instance_npcname("#damage");
+ specialeffect EF_POISONHIT;
+ end;
+OnTimer2000:
+ stopnpctimer;
+ initnpctimer;
+ disablenpc instance_npcname("#damage");
+ end;
+OnTouch:
+ percentheal -10,-10;
+ sc_start SC_BLEEDING,60000,0;
+ sc_start SC_POISON,60000,0;
+ end;
+}
+
+1@ma_c,29,110,5 script Kidnapped People#1 575,{
+ mes "[Kidnapped Residents]";
+ mes "Buwaya was running around,";
+ mes "and new people got caught.";
+ mes "We will be stuck in here for the rest of our lives.";
+ next;
+ switch(select("Get me outta here!!:Ca...can't escape?")) {
+ case 1:
+ mes "[Kidnapped Residents]";
+ mes "We don't have enough power to destroy it but Buwaya has a weakness.";
+ mes "Look at the wall over there.";
+ mes "If you knock there, Buywaya will feel pain and spit you out.";
+ donpcevent instance_npcname("#box_mob_call")+"::OnEnable";
+ close2;
+ disablenpc instance_npcname("Kidnapped People#1");
+ end;
+ case 2:
+ mes "[Kidnapped People]";
+ mes "Somthing is wrong here...";
+ mes "Have you experienced this before?";
+ close;
+ }
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("Kidnapped People#1");
+ end;
+OnEnable:
+ enablenpc instance_npcname("Kidnapped People#1");
+ donpcevent instance_npcname("#box_mob_call")+"::OnDisable";
+ end;
+}
+
+1@ma_c,36,110,5 script Kidnapped People#2 574,{
+ mes "[Kidnapped Residents]";
+ mes "Ahaa! I wish I had a little more power...";
+ mes "I know its weakness...";
+ next;
+ switch(select("Tell me.:Do you really know?")) {
+ case 1:
+ mes "[Kidnapped Residents]";
+ mes "Are you sure you can do it...?";
+ mes "Ok, listen carefully,";
+ mes "its weakness is...";
+ next;
+ mes "[Kidnapped Residents]";
+ mes "...behind us on the walls.";
+ sc_start SC_ATKPOTION,60000,45;
+ sc_start SC_MATKPOTION,60000,45;
+ disablenpc instance_npcname("Kidnapped People#2");
+ close;
+ case 2:
+ mes "[Kidnapped Residents]";
+ mes "WHAT?!";
+ mes "Are you ignoring me";
+ mes "because I'm captured in here?";
+ close;
+ }
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("Kidnapped People#2");
+ end;
+OnEnable:
+ enablenpc instance_npcname("Kidnapped People#2");
+ end;
+}
+
+1@ma_c,3,3,0 script #box_mob_call 139,1,1,{
+ end;
+OnInstanceInit:
+ setcell instance_mapname("1@ma_c"),30,118,35,118,cell_shootable,1; //custom
+ disablenpc instance_npcname("#box_mob_call");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#box_mob_call");
+ set .@label$, instance_npcname("#box_mob_call")+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@ma_c");
+ monster .@map$,30,118,"Buwaya's Weakness",2333,1,.@label$;
+ monster .@map$,35,118,"Buwaya's Weakness",2333,1,.@label$;
+ end;
+OnDisable:
+ killmonster instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead";
+ disablenpc instance_npcname("#box_mob_call");
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#box_mob_call")+"::OnMyMobDead") < 1)
+ donpcevent instance_npcname("#box_out")+"::OnEnable";
+ end;
+}
+
+1@ma_c,38,118,0 script #box_out 45,2,2,{
+OnInstanceInit:
+OnDisable:
+ disablenpc instance_npcname("#box_out");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#box_out");
+ end;
+OnTouch:
+ set .@x, rand(1,20) + 97;
+ set .@y, rand(1,20) + 74;
+ warp instance_mapname("1@ma_c"),.@x,.@y;
+ end;
+}
+
+1@ma_c,97,74,0 script #box_call 139,50,50,{
+ end;
+OnInstanceInit:
+ disablenpc instance_npcname("#box_call");
+ initnpctimer;
+ end;
+OnTimer30000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : I will put you in my treasure box!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ // Should execute OnTimer33000, but client doesn't render the effect fast enough.
+ for(set .@i,1; .@i<=9; set .@i,.@i+1)
+ donpcevent instance_npcname("#yunobi"+.@i)+"::OnEnable";
+ end;
+OnTimer33000:
+ donpcevent instance_npcname("#box_out")+"::OnDisable";
+ donpcevent instance_npcname("#box_mob_call")+"::OnDisable";
+ donpcevent instance_npcname("Kidnapped People#1")+"::OnEnable";
+ donpcevent instance_npcname("Kidnapped People#2")+"::OnEnable";
+ end;
+OnTimer34000:
+ enablenpc instance_npcname("#box_call");
+ end;
+OnTimer35000:
+ stopnpctimer;
+ initnpctimer;
+ disablenpc instance_npcname("#box_call");
+ end;
+OnTouch:
+ specialeffect2 EF_GUIDEDATTACK;
+ warp instance_mapname("1@ma_c"),33,112;
+ end;
+OnDisable:
+ stopnpctimer;
+ disablenpc instance_npcname("#box_call");
+ end;
+}
+
+1@ma_c,97,74,0 script #yunobi1 139,{
+ end;
+OnInstanceInit:
+ hideonnpc instance_npcname(strnpcinfo(0));
+ end;
+OnEnable:
+ specialeffect EF_MAPPILLAR2;
+ end;
+}
+1@ma_c,97,94,0 duplicate(#yunobi1) #yunobi2 139
+1@ma_c,117,94,0 duplicate(#yunobi1) #yunobi3 139
+1@ma_c,117,74,0 duplicate(#yunobi1) #yunobi4 139
+1@ma_c,117,54,0 duplicate(#yunobi1) #yunobi5 139
+1@ma_c,97,54,0 duplicate(#yunobi1) #yunobi6 139
+1@ma_c,77,54,0 duplicate(#yunobi1) #yunobi7 139
+1@ma_c,77,74,0 duplicate(#yunobi1) #yunobi8 139
+1@ma_c,77,94,0 duplicate(#yunobi1) #yunobi9 139
+
+1@ma_c,1,1,0 script #bunshin 139,{
+ end;
+OnInstanceInit:
+ initnpctimer;
+ end;
+OnTimer58000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : I had enough with this, let's go till the end!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ end;
+OnTimer61000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : This is!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ end;
+OnTimer62000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ end;
+OnTimer63000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ end;
+OnTimer64000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : This is...MY...Deadly... ATTACK!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ end;
+OnTimer65000:
+ set .@label$, instance_npcname("#bunshin")+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@ma_c");
+ areamonster .@map$,112,89,122,99,"Buwaya",2332,1,.@label$;
+ areamonster .@map$,112,49,122,59,"Buwaya",2332,1,.@label$;
+ areamonster .@map$,72,49,82,59,"Buwaya",2332,1,.@label$;
+ areamonster .@map$,72,89,82,99,"Buwaya",2332,1,.@label$;
+ end;
+OnTimer66000:
+ mapannounce instance_mapname("1@ma_c"),"Buwaya : Are you scared?",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ end;
+OnTimer105000:
+ killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead";
+ stopnpctimer;
+ initnpctimer;
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead") < 1) {
+ stopnpctimer;
+ initnpctimer;
+ }
+ end;
+OnDisable:
+ stopnpctimer;
+ killmonster instance_mapname("1@ma_c"),instance_npcname("#bunshin")+"::OnMyMobDead";
+ disablenpc instance_npcname("#bunshin");
+ end;
+}
+
+1@ma_c,2,2,0 script #buwaya_con 139,{
+ end;
+OnInstanceInit:
+ areamonster instance_mapname("1@ma_c"),90,67,104,81,"Buwaya",2319,1,instance_npcname("#buwaya_con")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@ma_c");
+ if (mobcount(.@map$,instance_npcname("#buwaya_con")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("#box_call")+"::OnDisable";
+ donpcevent instance_npcname("#bunshin")+"::OnDisable";
+ donpcevent instance_npcname("#exit_mob")+"::OnDisable";
+ donpcevent instance_npcname("#cave_out")+"::OnEnable";
+ mapannounce .@map$,"Guard : You did great work. Please hurry up and escape to the way you came in!",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ }
+ end;
+}
+
+1@ma_c,3,3,0 script #exit_mob 139,{
+ end;
+OnInstanceInit:
+ initnpctimer;
+ end;
+OnTimer60000:
+ set .@label$, instance_npcname("#exit_mob")+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@ma_c");
+ if (mobcount(.@map$,.@label$) < 30)
+ set .@amount,10;
+ else
+ set .@amount,1;
+ areamonster .@map$,43,58,47,60,"Water Plant",2331,.@amount,.@label$;
+ areamonster .@map$,43,58,47,60,"Egg",2329,.@amount,.@label$;
+ stopnpctimer;
+ initnpctimer;
+ end;
+OnDisable:
+ stopnpctimer;
+ killmonster instance_mapname("1@ma_c"),instance_npcname("#exit_mob")+"::OnMyMobDead";
+ disablenpc instance_npcname("#exit_mob");
+ end;
+OnMyMobDead:
+ end;
+}
+
+1@ma_c,28,57,0 script #cave_out 45,2,2,{
+OnInstanceInit:
+ disablenpc instance_npcname("#cave_out");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#cave_out");
+ end;
+OnTouch:
+ mes "Would like to go out?";
+ next;
+ if(select("Yes!:No, I will stay.") == 1)
+ warp "ma_fild02",315,315;
+ close;
+}
+
+1@ma_c,1,1,0 script #buwaya_spawn_mobs -1,{
+OnInstanceInit:
+ set .@map$, instance_mapname("1@ma_c");
+ areamonster .@map$,73,81,93,101,"Seaweed",2331,18;
+ areamonster .@map$,110,97,116,103,"Seaweed",2331,8;
+ areamonster .@map$,59,63,63,67,"Seaweed",2331,8;
+ areamonster .@map$,73,55,77,59,"Seaweed",2331,4;
+ areamonster .@map$,103,69,107,73,"Seaweed",2331,4;
+ areamonster .@map$,108,45,122,63,"Seaweed",2331,15;
+ areamonster .@map$,73,81,93,101,"Buwaya's Egg",2329,10;
+ areamonster .@map$,110,97,116,103,"Buwaya's Egg",2329,8;
+ areamonster .@map$,59,63,63,67,"Buwaya's Egg",2329,4;
+ areamonster .@map$,73,55,77,59,"Buwaya's Egg",2329,3;
+ areamonster .@map$,103,69,107,73,"Buwaya's Egg",2329,3;
+ areamonster .@map$,108,45,122,63,"Buwaya's Egg",2329,15;
+ monster .@map$,0,0,"Seaweed",2331,5;
+ monster .@map$,0,0,"Buwaya's Slave",2330,5;
+ end;
+}
diff --git a/npc/re/instances/HazyForest.txt b/npc/re/instances/HazyForest.txt
index cecdadd20..de8bfcd06 100644
--- a/npc/re/instances/HazyForest.txt
+++ b/npc/re/instances/HazyForest.txt
@@ -3,15 +3,19 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= Hercules
-//===== Description: =========================================
+//===== Description: =========================================
//= [Official Conversion]
//= Cross through the Hazy Forest to reach the Bifrost.
-//= Contains the Wandering Guardian quest.
-//===== Additional Comments: =================================
+//= Contains the "Wandering Guardian" quest.
+//===== Additional Comments: =================================
//= 1.0 First version. [Euphy]
+//= 1.1 Instance system rewrite. [Euphy]
+//============================================================
+
+1@mist mapflag src4instance
//============================================================
// Instance Creation
@@ -79,71 +83,38 @@ bif_fild01,158,340,5 script Laphine Soldier#mist 447,{
next;
switch(select("Venture into the Hazy Forest.:Give up.")) {
case 1:
- set .@instance, instance_create(.@md_name$,.@party_id);
- if (.@instance >= 0) {
- if (instance_attachmap("1@mist",.@instance) != "") {
-
- instance_attach(.@instance);
- instance_set_timeout 7200,300,.@instance;
- instance_init(.@instance);
-
- donpcevent instance_npcname("#Whisper_mist", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Tom's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Tomba's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Remi's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Tired Rem's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Ron's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Rover's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Mona's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Namon's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Sad Neoron's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Spyder's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Tito's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Pumba's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Tete's Garden Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("The Gardeners' Tree", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Dragon Herder", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Mysterious Young Man#mis", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Loki#mist", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Collapsed Girl#mist", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Fragments of Memory", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#mist_warp_init", instance_id())+"::OnInstanceInit";
-
- mes "[Laphine Soldier]";
- mes "Party Name "+getpartyname(.@party_id)+"...";
- mes "Party Leader "+strcharinfo(0)+"...";
- mes "I've got it. I've written them down on the report here.";
- next;
- mes "[Laphine Soldier]";
- mes "You'll get permission soon.";
- mes "Now go to the log tunnel, the only way to get into the Hazy Forest.";
- mes "You understand?";
- next;
- mes "[Laphine Soldier]";
- mes "We can't go against the forest,";
- mes "but maybe you humans can.";
- mes "Good luck!";
- close;
- } else
- instance_destroy(.@instance);
- }
mes "[Laphine Soldier]";
mes "Party Name "+getpartyname(.@party_id)+"...";
mes "Party Leader "+strcharinfo(0)+"...";
- mes "Hmm...";
- next;
- mes "[Laphine Soldier]";
- if (.@playtime == -1)
- mes "It's dangerous in the forest.";
- else
- mes "The atmosphere is somewhat tense in the forest.";
- mes "...Why don't you just go back today?";
- close;
+ set .@instance, instance_create(.@md_name$, .@party_id);
+ if (.@instance < 0) {
+ mes "Hmm...";
+ next;
+ mes "[Laphine Soldier]";
+ if (.@playtime == -1)
+ mes "It's dangerous in the forest.";
+ else
+ mes "The atmosphere is somewhat tense in the forest.";
+ mes "...Why don't you just go back today?";
+ close;
+ }
+ if (instance_attachmap("1@mist",.@instance) != "") {
+ instance_set_timeout 7200,300,.@instance;
+ instance_init(.@instance);
+ mes "I've got it. I've written them down on the report here.";
+ next;
+ mes "[Laphine Soldier]";
+ mes "You'll get permission soon.";
+ mes "Now go to the log tunnel, the only way to get into the Hazy Forest.";
+ mes "You understand?";
+ next;
+ mes "[Laphine Soldier]";
+ mes "We can't go against the forest,";
+ mes "but maybe you humans can.";
+ mes "Good luck!";
+ close;
+ } else
+ instance_destroy(.@instance);
case 2:
mes "[Laphine Soldier]";
mes "Well, you've made the right decision.";
@@ -177,15 +148,6 @@ bif_fild01,161,355,0 script Log Tunnel 844,{
next;
if(select("Enter the tunnel.:Give up.") == 2)
close;
- // TODO: Add official MD_Enter cases.
- if (!getcharid(1)) {
- mes "[Laphine Soldier]";
- mes "Hey, look!";
- mes "Are you going alone?";
- mes "That's impossible. Too rash.";
- mes "Team up with some friends and go together!";
- close;
- }
set .@playtime, checkquest(7211,PLAYTIME);
if (has_instance("1@mist") == "") {
if (.@playtime == 0 || .@playtime == 1) {
@@ -196,12 +158,13 @@ bif_fild01,161,355,0 script Log Tunnel 844,{
mes "The world beyond the log tunnel looks dark and suffocating.";
mes "Your instinct is screaming that this forest is dangerous.";
close;
- }
- if (.@playtime == 2) erasequest 7211;
- if (checkquest(7211,PLAYTIME) == -1) setquest 7211;
- mapannounce "bif_fild01",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
- warp "1@mist",89,29;
- close;
+ } else {
+ if (checkquest(7211,PLAYTIME) == 2) erasequest 7211;
+ if (checkquest(7211,PLAYTIME) == -1) setquest 7211;
+ mapannounce "bif_fild01",getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member is entering the Mistwood Maze.",bc_map,"0x00ff99"; //FW_NORMAL 12 0 0
+ warp "1@mist",89,29;
+ close;
+ }
}
// Instance Scripts
@@ -209,43 +172,44 @@ bif_fild01,161,355,0 script Log Tunnel 844,{
1@mist,89,29,0 script #Whisper_mist 844,1,1,{
end;
OnInstanceInit:
- enablenpc instance_npcname("#Whisper_mist", instance_id());
+ enablenpc instance_npcname("#Whisper_mist");
end;
OnTouch:
- disablenpc instance_npcname("#Whisper_mist", instance_id());
+ disablenpc instance_npcname("#Whisper_mist");
initnpctimer;
end;
OnTimer10000:
OnTimer20000:
- instance_announce 0,"Whisper: Who's this? Who's this!? The forest is open! Tom, Tomba, Tired Rem, Remi! Wake up!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Whisper: Who's this? Who's this!? The forest is open! Tom, Tomba, Tired Rem, Remi! Wake up!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer60000:
- instance_announce 0,"Loud Whisper: What are the forest keepers doing? What are the gardeners doing??",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Loud Whisper: What are the forest keepers doing? What are the gardeners doing??",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer120000:
- instance_announce 0,"Loud Whisper: Don't go out, wander around forever, and play with us!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Loud Whisper: Don't go out, wander around forever, and play with us!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer180000:
- instance_announce 0,"Loud Whisper: Useless, useless. Wandering around and around, you'll meet your end!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Loud Whisper: Useless, useless. Wandering around and around, you'll meet your end!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
stopnpctimer;
end;
}
// callfunc "F_Mora_Mist",<warp to enable>,<success message>,<fail message>{,<end flag>}
function script F_Mora_Mist {
- if (mobcount("1@mist",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead") == 0) {
+ set .@map$, instance_mapname("1@mist");
+ if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") == 0) {
mes "Obviously no one is taking care of it.";
mes "It seems like you can chop down the garden tree.";
next;
if(select("Chop down the garden tree.:Give up.") == 2)
close;
mes "You chop down the tree, which was blocking the path of the maze, "+((getarg(3,0))?"clearing the way out of the forest.":"so now you can continue.");
- instance_announce 0,getarg(1),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
- enablenpc instance_npcname(getarg(0), instance_id());
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ mapannounce .@map$,getarg(1),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ enablenpc instance_npcname(getarg(0));
+ disablenpc instance_npcname(strnpcinfo(0));
close;
} else
- instance_announce 0,((getarg(3,0))?getarg(2):getarg(2)+"'s Cry: Huh? Who's doing bad things to my tree?!"),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce .@map$,((getarg(3,0))?getarg(2):getarg(2)+"'s Cry: Huh? Who's doing bad things to my tree?!"),bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
}
@@ -257,7 +221,7 @@ function script F_Mora_Mist {
"Tom";
end;
OnInstanceInit:
- monster "1@mist",249,120,"Tom",2136,1,instance_npcname("Tom's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),249,120,"Tom",2136,1,instance_npcname("Tom's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -271,7 +235,7 @@ OnMyMobDead:
"Tomba";
end;
OnInstanceInit:
- monster "1@mist",200,64,"Tomba",2136,1,instance_npcname("Tomba's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),200,64,"Tomba",2136,1,instance_npcname("Tomba's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -285,7 +249,7 @@ OnMyMobDead:
"Remi";
end;
OnInstanceInit:
- monster "1@mist",154,184,"Remi the Tired",2137,1,instance_npcname("Remi's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),154,184,"Remi the Tired",2137,1,instance_npcname("Remi's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -299,16 +263,16 @@ OnMyMobDead:
"Rem";
end;
OnInstanceInit:
- monster "1@mist",101,107,"Rem the Gardener",2136,1,instance_npcname("Tired Rem's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),101,107,"Rem the Gardener",2136,1,instance_npcname("Tired Rem's Garden Tree")+"::OnMyMobDead";
end;
OnTimer10000:
- instance_announce 0,"Whisper of the Forest: So Tom's, Tomba's, Remi's, and Rem's garden trees were all chopped down?",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Whisper of the Forest: So Tom's, Tomba's, Remi's, and Rem's garden trees were all chopped down?",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer15000:
- instance_announce 0,"Whisper of the Forest: Trouble, trouble, we're in big trouble.",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Whisper of the Forest: Trouble, trouble, we're in big trouble.",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer20000:
- instance_announce 0,"Loud Whisper: They've come to the second deepest forest. Gardeners of the deep forest, watch out!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Loud Whisper: They've come to the second deepest forest. Gardeners of the deep forest, watch out!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
stopnpctimer;
end;
OnMyMobDead:
@@ -323,7 +287,7 @@ OnMyMobDead:
"Ron";
end;
OnInstanceInit:
- monster "1@mist",227,178,"Ron the Gardener",2134,1,instance_npcname("Ron's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),227,178,"Ron the Gardener",2134,1,instance_npcname("Ron's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -337,7 +301,7 @@ OnMyMobDead:
"Rover";
end;
OnInstanceInit:
- monster "1@mist",304,237,"Rover the Strutter",2134,1,instance_npcname("Rover's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),304,237,"Rover the Strutter",2134,1,instance_npcname("Rover's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -351,7 +315,7 @@ OnMyMobDead:
"Mona";
end;
OnInstanceInit:
- monster "1@mist",239,253,"Mona the Seedseeker",2133,1,instance_npcname("Mona's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),239,253,"Mona the Seedseeker",2133,1,instance_npcname("Mona's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -365,7 +329,7 @@ OnMyMobDead:
"Namon";
end;
OnInstanceInit:
- monster "1@mist",89,173,"Brave Namon",2134,1,instance_npcname("Namon's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),89,173,"Brave Namon",2134,1,instance_npcname("Namon's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -379,7 +343,7 @@ OnMyMobDead:
"Neoron";
end;
OnInstanceInit:
- monster "1@mist",143,265,"Sad Neoron",2137,1,instance_npcname("Sad Neoron's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),143,265,"Sad Neoron",2137,1,instance_npcname("Sad Neoron's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -393,19 +357,19 @@ OnMyMobDead:
"Spyder";
end;
OnInstanceInit:
- monster "1@mist",209,200,"Spyder the Eight-Legged",2132,1,instance_npcname("Spyder's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),209,200,"Spyder the Eight-Legged",2132,1,instance_npcname("Spyder's Garden Tree")+"::OnMyMobDead";
end;
OnTimer5000:
- instance_announce 0,"Roaring Whisper: The path is about to open. The tight bolts have been removed!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Roaring Whisper: The path is about to open. The tight bolts have been removed!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer9000:
- instance_announce 0,"Roaring Whisper: A forest opened, another opened, and the other is going to open as well. Tito and Pumba, they are heading your way!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Roaring Whisper: A forest opened, another opened, and the other is going to open as well. Tito and Pumba, they are heading your way!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer13000:
- instance_announce 0,"Roaring Whisper: Where you get after wandering around, around and around, everybody you've met while wandering around, around and around,",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Roaring Whisper: Where you get after wandering around, around and around, everybody you've met while wandering around, around and around,",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
end;
OnTimer17000:
- instance_announce 0,"Roaring Whisper: all the gardeners will be waiting for you, with their clippers in their hands-!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Roaring Whisper: all the gardeners will be waiting for you, with their clippers in their hands-!",bc_map,"0xccffcc"; //FW_NORMAL 12 0 0
stopnpctimer;
end;
OnMyMobDead:
@@ -420,7 +384,7 @@ OnMyMobDead:
"Tito";
end;
OnInstanceInit:
- monster "1@mist",264,291,"Tito the Flipper",2133,1,instance_npcname("Tito's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),264,291,"Tito the Flipper",2133,1,instance_npcname("Tito's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -434,7 +398,7 @@ OnMyMobDead:
"Pumba";
end;
OnInstanceInit:
- monster "1@mist",309,165,"Diligent Pumba",2134,1,instance_npcname("Pumba's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),309,165,"Diligent Pumba",2134,1,instance_npcname("Pumba's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -448,7 +412,7 @@ OnMyMobDead:
"Tete";
end;
OnInstanceInit:
- monster "1@mist",277,343,"Carefree Tete",2136,1,instance_npcname("Tete's Garden Tree", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),277,343,"Carefree Tete",2136,1,instance_npcname("Tete's Garden Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -461,19 +425,20 @@ OnMyMobDead:
"Gardeners: We're not dead, yet!!!!",1;
end;
OnInstanceInit:
- monster "1@mist",318,137,"Baby Tom",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",321,137,"Tomba the Baby",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",324,137,"Exhausted Remi",2137,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",319,135,"Rem the Exhausted",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",323,135,"Ron the Ex-Gardener",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",320,133,"Rover the Strutter",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",323,133,"Mona the Seedpicker",2133,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",317,132,"Timid Namon",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",326,132,"Indifferent Neoron",2137,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",317,129,"Spyder the Seven-Legged",2132,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",320,129,"Tito the Flapper",2133,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",324,129,"Lazy Pumba",2134,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
- monster "1@mist",327,129,"Careless Tete",2136,1,instance_npcname("The Gardeners' Tree", instance_id())+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@mist");
+ monster .@map$,318,137,"Baby Tom",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,321,137,"Tomba the Baby",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,324,137,"Exhausted Remi",2137,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,319,135,"Rem the Exhausted",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,323,135,"Ron the Ex-Gardener",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,320,133,"Rover the Strutter",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,323,133,"Mona the Seedpicker",2133,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,317,132,"Timid Namon",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,326,132,"Indifferent Neoron",2137,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,317,129,"Spyder the Seven-Legged",2132,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,320,129,"Tito the Flapper",2133,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,324,129,"Lazy Pumba",2134,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
+ monster .@map$,327,129,"Careless Tete",2136,1,instance_npcname("The Gardeners' Tree")+"::OnMyMobDead";
end;
OnMyMobDead:
end;
@@ -481,7 +446,7 @@ OnMyMobDead:
1@mist,73,290,0 script Mysterious Flower#1 844,{
specialeffect EF_LEVEL99_4;
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
getitem 12561,1; //Mysterious_Seed
end;
}
@@ -547,21 +512,22 @@ OnInstanceInit:
case 5: setarray .@c[0],268,183; break;
case 6: setarray .@c[0],65,278; break;
}
- monster "1@mist",.@c[0],.@c[1],"Wandering Purple Dragon",2131,1,instance_npcname("#Dragon Herder", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),.@c[0],.@c[1],"Wandering Purple Dragon",2131,1,instance_npcname("#Dragon Herder")+"::OnMyMobDead";
end;
OnMyMobDead:
- if (mobcount("1@mist",instance_npcname("#Dragon Herder", instance_id())+"::OnMyMobDead") == 0) {
- donpcevent instance_npcname("Collapsed Girl#mist", instance_id())+"::OnEnable";
- donpcevent instance_npcname("Mysterious Young Man#mis", instance_id())+"::OnEnable";
- donpcevent instance_npcname("Loki#mist", instance_id())+"::OnEnable";
- instance_announce 0,"The Dragon's Cry: Am I being punished... for abandoning the way... of the guardian...?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0
- disablenpc instance_npcname("#Dragon Herder", instance_id());
+ set .@map$, instance_mapname("1@mist");
+ if (mobcount(.@map$,instance_npcname("#Dragon Herder")+"::OnMyMobDead") == 0) {
+ donpcevent instance_npcname("Collapsed Girl#mist")+"::OnEnable";
+ donpcevent instance_npcname("Mysterious Young Man#mis")+"::OnEnable";
+ donpcevent instance_npcname("Loki#mist")+"::OnEnable";
+ mapannounce .@map$,"The Dragon's Cry: Am I being punished... for abandoning the way... of the guardian...?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0
+ disablenpc instance_npcname("#Dragon Herder");
initnpctimer;
}
end;
OnTimer3000:
stopnpctimer;
- instance_announce 0,"Voice in your head: ...Will you... save... me... please......?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0
+ mapannounce instance_mapname("1@mist"),"Voice in your head: ...Will you... save... me... please......?",bc_map,"0xffff00"; //FW_NORMAL 12 0 0
end;
}
@@ -705,12 +671,11 @@ OnTimer3000:
close;
}
end;
-OnInstanceInit:
OnEnable:
- enablenpc instance_npcname("Mysterious Young Man#mis", instance_id());
+ enablenpc instance_npcname("Mysterious Young Man#mis");
end;
OnDisable:
- disablenpc instance_npcname("Mysterious Young Man#mis", instance_id());
+ disablenpc instance_npcname("Mysterious Young Man#mis");
end;
}
@@ -761,10 +726,10 @@ OnDisable:
end;
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname("Loki#mist", instance_id());
+ disablenpc instance_npcname("Loki#mist");
end;
OnEnable:
- enablenpc instance_npcname("Loki#mist", instance_id());
+ enablenpc instance_npcname("Loki#mist");
end;
}
@@ -774,10 +739,10 @@ OnEnable:
close;
OnInstanceInit:
OnDisable:
- disablenpc instance_npcname("Collapsed Girl#mist", instance_id());
+ disablenpc instance_npcname("Collapsed Girl#mist");
end;
OnEnable:
- enablenpc instance_npcname("Collapsed Girl#mist", instance_id());
+ enablenpc instance_npcname("Collapsed Girl#mist");
end;
}
@@ -905,7 +870,7 @@ mora,48,152,3 script Sharp Eyed Man 512,{
mes "You still have things to do.";
next;
mes "[Nydhogg the Guardian]";
- mes "... Oh, yes. It's late, but I have to fulfill my duties as a guardian.";
+ mes "...Oh, yes. It's late, but I have to fulfill my duties as a guardian.";
mes "Now I know. I'll destroy Morroc with my own hands.";
mes "I will fulfill my duties as a guardian.";
next;
@@ -961,68 +926,73 @@ mora,48,152,3 script Sharp Eyed Man 512,{
1@mist,1,1,0 script #Mist Mobs Respawn1 844,{
end;
OnInstanceInit:
- monster "1@mist",0,0,"Miming",2137,15,instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),0,0,"Miming",2137,15,instance_npcname("#Mist Mobs Respawn1")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@num_mobs, 15 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@mist");
+ set .@num_mobs, 15 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn1")+"::OnMyMobDead");
if (.@num_mobs > 0)
- monster "1@mist",0,0,"Miming",2137,.@num_mobs,instance_npcname("#Mist Mobs Respawn1", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Miming",2137,.@num_mobs,instance_npcname("#Mist Mobs Respawn1")+"::OnMyMobDead";
end;
}
1@mist,1,2,0 script #Mist Mobs Respawn2 844,{
end;
OnInstanceInit:
- monster "1@mist",0,0,"Pom Spider",2132,35,instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),0,0,"Pom Spider",2132,35,instance_npcname("#Mist Mobs Respawn2")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@num_mobs, 35 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@mist");
+ set .@num_mobs, 35 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn2")+"::OnMyMobDead");
if (.@num_mobs > 0)
- monster "1@mist",0,0,"Pom Spider",2132,.@num_mobs,instance_npcname("#Mist Mobs Respawn2", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Pom Spider",2132,.@num_mobs,instance_npcname("#Mist Mobs Respawn2")+"::OnMyMobDead";
end;
}
1@mist,1,3,0 script #Mist Mobs Respawn3 844,{
end;
OnInstanceInit:
- monster "1@mist",0,0,"Angra Mantis",2133,35,instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),0,0,"Angra Mantis",2133,35,instance_npcname("#Mist Mobs Respawn3")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@num_mobs, 35 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@mist");
+ set .@num_mobs, 35 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn3")+"::OnMyMobDead");
if (.@num_mobs > 0)
- monster "1@mist",0,0,"Angra Mantis",2133,.@num_mobs,instance_npcname("#Mist Mobs Respawn3", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Angra Mantis",2133,.@num_mobs,instance_npcname("#Mist Mobs Respawn3")+"::OnMyMobDead";
end;
}
1@mist,1,4,0 script #Mist Mobs Respawn4 844,{
end;
OnInstanceInit:
- monster "1@mist",0,0,"Parus",2134,35,instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),0,0,"Parus",2134,35,instance_npcname("#Mist Mobs Respawn4")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@num_mobs, 35 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@mist");
+ set .@num_mobs, 35 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn4")+"::OnMyMobDead");
if (.@num_mobs > 0)
- monster "1@mist",0,0,"Parus",2134,.@num_mobs,instance_npcname("#Mist Mobs Respawn4", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Parus",2134,.@num_mobs,instance_npcname("#Mist Mobs Respawn4")+"::OnMyMobDead";
end;
}
1@mist,1,5,0 script #Mist Mobs Respawn5 844,{
end;
OnInstanceInit:
- monster "1@mist",0,0,"Little Fatum",2136,15,instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnMyMobDead";
+ monster instance_mapname("1@mist"),0,0,"Little Fatum",2136,15,instance_npcname("#Mist Mobs Respawn5")+"::OnMyMobDead";
end;
OnMyMobDead:
- set .@num_mobs, 15 - mobcount("1@mist",instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@mist");
+ set .@num_mobs, 15 - mobcount(.@map$,instance_npcname("#Mist Mobs Respawn5")+"::OnMyMobDead");
if (.@num_mobs > 0)
- monster "1@mist",0,0,"Little Fatum",2136,.@num_mobs,instance_npcname("#Mist Mobs Respawn5", instance_id())+"::OnMyMobDead";
+ monster .@map$,0,0,"Little Fatum",2136,.@num_mobs,instance_npcname("#Mist Mobs Respawn5")+"::OnMyMobDead";
end;
}
1@mist,1,6,0 script #Fragments of Memory 844,{
end;
OnInstanceInit:
- disablenpc instance_npcname("#Fragments of Memory", instance_id());
- monster "1@mist",0,0,"Guardian's Fragments of Memory",2138,15;
+ disablenpc instance_npcname("#Fragments of Memory");
+ monster instance_mapname("1@mist"),0,0,"Guardian's Fragments of Memory",2138,15;
end;
}
@@ -1058,7 +1028,7 @@ bif_fild01,38,374,0 script Mysterious Flower#ep14_1 844,{
OnTouch:
if (checkquest(7211,PLAYTIME) == -1)
setquest 7211;
- warp "1@mist",116,40;
+ warp instance_mapname("1@mist"),116,40;
end;
}
@@ -1160,21 +1130,21 @@ OnTouch:
1@mist,1,1,0 script #mist_warp_init 844,{
end;
OnInstanceInit:
- disablenpc instance_npcname("a25_a18-1", instance_id());
- disablenpc instance_npcname("a27-2_af1-2", instance_id());
- disablenpc instance_npcname("a15-2_a4-1", instance_id());
- disablenpc instance_npcname("a4-2_a11", instance_id());
- disablenpc instance_npcname("b4-2_b2", instance_id());
- disablenpc instance_npcname("b7_bf1-2", instance_id());
- disablenpc instance_npcname("b31_b16", instance_id());
- disablenpc instance_npcname("b27-3_bN-1", instance_id());
- disablenpc instance_npcname("b6-1_b33", instance_id());
- disablenpc instance_npcname("b5_b14", instance_id());
- disablenpc instance_npcname("c1_c13-1", instance_id());
- disablenpc instance_npcname("c13-3_c4", instance_id());
- disablenpc instance_npcname("c19_c4", instance_id());
- disablenpc instance_npcname("#to_bif02", instance_id());
- disablenpc instance_npcname("#mist_warp_init", instance_id());
+ disablenpc instance_npcname("a25_a18-1");
+ disablenpc instance_npcname("a27-2_af1-2");
+ disablenpc instance_npcname("a15-2_a4-1");
+ disablenpc instance_npcname("a4-2_a11");
+ disablenpc instance_npcname("b4-2_b2");
+ disablenpc instance_npcname("b7_bf1-2");
+ disablenpc instance_npcname("b31_b16");
+ disablenpc instance_npcname("b27-3_bN-1");
+ disablenpc instance_npcname("b6-1_b33");
+ disablenpc instance_npcname("b5_b14");
+ disablenpc instance_npcname("c1_c13-1");
+ disablenpc instance_npcname("c13-3_c4");
+ disablenpc instance_npcname("c19_c4");
+ disablenpc instance_npcname("#to_bif02");
+ disablenpc instance_npcname("#mist_warp_init");
end;
}
1@mist,247,123,0 warp a25_a18-1 1,1,1@mist,164,66 //Tom
diff --git a/npc/re/instances/MalangdoCulvert.txt b/npc/re/instances/MalangdoCulvert.txt
index 2d0369699..4138962c6 100644
--- a/npc/re/instances/MalangdoCulvert.txt
+++ b/npc/re/instances/MalangdoCulvert.txt
@@ -1,11 +1,9 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Malangdo Culvert
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.0a
-//===== Compatible With: =====================================
-//= rAthena SVN
+//= 1.1
//===== Description: =========================================
//= [Official Conversion]
//= Clean the culverts and defeat the Coelacanth.
@@ -15,8 +13,14 @@
//= 1.0 First version. [Euphy]
//= Letters "n" and "h" in NPC names indicate difficulty.
//= 1.0a There is no minimum party size on official servers.
+//= 1.0b Fixed incorrect use of 'close'. [Joseph]
+//= 1.1 Instance system rewrite. [Euphy]
//============================================================
+1@pump mapflag src4instance
+2@pump mapflag src4instance
+//============================================================
+
// Quest NPCs
//============================================================
mal_in01,172,28,2 script Albo#mal 561,{
@@ -400,7 +404,7 @@ mal_in01,160,34,4 script Missing, the Cleaner 545,{
mes "What a rookie.";
close;
case 2:
- set .@instance, instance_create(.@md_name$,.@party_id);
+ set .@instance,instance_create(.@md_name$,.@party_id);
if (.@instance < 0) {
mes "Party name: "+getpartyname(.@party_id);
mes "Party leader: "+strcharinfo(0);
@@ -412,66 +416,26 @@ mal_in01,160,34,4 script Missing, the Cleaner 545,{
instance_destroy(.@instance);
close;
}
- instance_attach(.@instance);
instance_set_timeout 3600,300,.@instance;
instance_init(.@instance);
-
- // Common Scripts
- donpcevent instance_npcname("Missing, the Cleaner#0", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Culvert Entrance#i", instance_id())+"::OnInstanceInit";
-
- // Normal Mode
- donpcevent instance_npcname("Missing, the Cleaner#nf", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_n1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_n2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_n3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_n4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_n5", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_n6", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Boss Creation#n", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Missing, the Cleaner#no", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Culvert Entrance#n", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Hydra#n", instance_id())+"::OnInstanceInit";
-
- // Hard Mode
- donpcevent instance_npcname("Missing, the Cleaner#hf", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h5", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h6", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h7", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h8", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h9", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("#Culvert_h10", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Boss Creation#h", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Missing, the Cleaner#ho", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Culvert Entrance#h", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("Hydra#h", instance_id())+"::OnInstanceInit";
-
+
mes "^3333FF"+.@md_name$+"^000000 - Reserving";
mes "After making the reservation, you";
mes "have to select Enter the Culvert.";
close;
case 3:
- goto L_Enter;
+ callsub L_Enter,0;
}
- } else {
- if(select("Enter Culvert:Cancel") == 2)
- close;
- goto L_Enter;
}
+ if(select("Enter Culvert:Cancel") == 2)
+ end;
+ callsub L_Enter,1;
} else if (.@playtime == 0 || .@playtime == 1) {
mes "You can enter the Culvert if the gate is open.";
next;
if(select("Enter Culvert:Cancel") == 2)
close;
- goto L_Enter;
+ callsub L_Enter,0;
} else if (.@playtime == 2) {
mes "^0000ffThe gate to the Culvert is open again.^000000";
erasequest 12254;
@@ -479,7 +443,6 @@ mal_in01,160,34,4 script Missing, the Cleaner 545,{
}
end;
L_Enter:
- // TODO: Add official MD_Enter cases.
if (has_instance("1@pump") == "") {
if (checkquest(12254,PLAYTIME) == 0 || checkquest(12254,PLAYTIME) == 1) {
mes "The gate to the Culvert is still closed.";
@@ -493,7 +456,7 @@ L_Enter:
mapannounce "mal_in01", strcharinfo(0)+" of the party "+getpartyname(.@party_id)+" is entering the Culvert.",bc_map,"0x00ff99";
if (checkquest(12254) == -1) setquest 12254;
warp "1@pump",63,98;
- close;
+ end;
}
// Instance: Common Scripts
@@ -521,9 +484,9 @@ L_Enter:
close;
}
set 'party_id,getcharid(1);
- instance_announce 0,"Missing: Move toward the 3 o'clock direction and wait for my next order!",bc_map,"0xff88ff",FW_NORMAL,15;
- disablenpc instance_npcname("Missing, the Cleaner#0", instance_id());
- enablenpc instance_npcname("Missing, the Cleaner#n", instance_id());
+ mapannounce instance_mapname("1@pump"),"Missing: Move toward the 3 o'clock direction and wait for my next order!",bc_map,"0xff88ff",FW_NORMAL,15;
+ disablenpc instance_npcname("Missing, the Cleaner#0");
+ enablenpc instance_npcname("Missing, the Cleaner#n");
close;
case 2:
if (BaseLevel < 140) {
@@ -543,9 +506,9 @@ L_Enter:
close;
}
set 'party_id,getcharid(1);
- instance_announce 0,"Missing: I'll go in first, so follow me! I'll open up a gate at the 3 o'clock direction!",bc_map,"0xff88ff",FW_NORMAL,15;
- disablenpc instance_npcname("Missing, the Cleaner#0", instance_id());
- enablenpc instance_npcname("Culvert Entrance#i", instance_id());
+ mapannounce instance_mapname("1@pump"),"Missing: I'll go in first, so follow me! I'll open up a gate at the 3 o'clock direction!",bc_map,"0xff88ff",FW_NORMAL,15;
+ disablenpc instance_npcname("Missing, the Cleaner#0");
+ enablenpc instance_npcname("Culvert Entrance#i");
close;
case 3:
mes "[Missing, the Cleaner]";
@@ -553,21 +516,18 @@ L_Enter:
close;
}
end;
-OnInstanceInit:
- enablenpc instance_npcname("Missing, the Cleaner#0", instance_id());
- end;
}
1@pump,84,105,0 script Culvert Entrance#i 45,3,3,{
end;
OnInstanceInit:
- disablenpc instance_npcname("Culvert Entrance#i", instance_id());
+ disablenpc instance_npcname("Culvert Entrance#i");
end;
OnTouch:
if (BaseLevel >= 140)
- warp "2@pump",38,88;
+ warp instance_mapname("2@pump"),38,88;
else
- warp "1@pump",74,105;
+ warp instance_mapname("1@pump"),74,105;
end;
}
@@ -638,56 +598,58 @@ function script F_mal_missing {
mes "[Missing, the Cleaner]";
mes "Ok! Let's start now!";
set .@i$, charat(strnpcinfo(2),0);
- enablenpc instance_npcname("Missing, the Cleaner#"+.@i$, instance_id());
- donpcevent instance_npcname("Missing, the Cleaner#"+.@i$, instance_id())+"::OnStart";
- disablenpc instance_npcname("Culvert Entrance#"+.@i$, instance_id());
- disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o", instance_id());
- donpcevent instance_npcname("Monster Hole#"+.@i$, instance_id())+"::OnClear";
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ enablenpc instance_npcname("Missing, the Cleaner#"+.@i$);
+ donpcevent instance_npcname("Missing, the Cleaner#"+.@i$)+"::OnStart";
+ disablenpc instance_npcname("Culvert Entrance#"+.@i$);
+ disablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o");
+ donpcevent instance_npcname("Monster Hole#"+.@i$)+"::OnClear";
+ disablenpc instance_npcname(strnpcinfo(0));
close;
}
close;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
}
1@pump,84,105,4 script Missing, the Cleaner#n 545,{
callfunc "F_mal_missing";
- donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnStart";
+ donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnStart";
close;
OnInstanceInit:
- disablenpc instance_npcname("Missing, the Cleaner#n", instance_id());
+ disablenpc instance_npcname("Missing, the Cleaner#n");
end;
OnStart:
- killmonster "1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead";
- disablenpc instance_npcname("Missing, the Cleaner#n", instance_id());
+ killmonster instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead";
+ disablenpc instance_npcname("Missing, the Cleaner#n");
initnpctimer;
end;
OnAddSeaweed:
- areamonster "1@pump",55,99,61,105,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead";
- set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("1@pump");
+ areamonster .@map$,55,99,61,105,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead";
+ set .@mob_dead_num, mobcount(.@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
if (.@mob_dead_num >= 6)
- donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnFail";
+ donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail";
else
- instance_announce 0,"Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20;
+ mapannounce .@map$,"Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20;
end;
OnMyMobDead:
end;
OnFail:
stopnpctimer;
- donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnClear";
- killmonster "1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead";
- enablenpc instance_npcname("Missing, the Cleaner#nf", instance_id());
- instance_announce 0,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15;
- disablenpc instance_npcname("Missing, the Cleaner#n", instance_id());
+ donpcevent instance_npcname("Monster Hole#n")+"::OnClear";
+ set .@map$, instance_mapname("1@pump");
+ killmonster .@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead";
+ enablenpc instance_npcname("Missing, the Cleaner#nf");
+ mapannounce .@map$,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15;
+ disablenpc instance_npcname("Missing, the Cleaner#n");
end;
OnTimer100:
- instance_announce 0,"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ mapannounce instance_mapname("1@pump"),"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15;
end;
OnTimer5500:
- instance_announce 0,"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15;
- donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnSpawn";
+ mapannounce instance_mapname("1@pump"),"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn";
end;
OnTimer45000:
OnTimer95000:
@@ -698,12 +660,12 @@ OnTimer295000:
OnTimer345000:
OnTimer395000:
OnTimer445000:
- instance_announce 0,"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ mapannounce instance_mapname("1@pump"),"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15;
end;
OnTimer50000:
OnTimer100000:
OnTimer150000:
- donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnSpawn";
+ donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn";
end;
OnTimer200000:
OnTimer250000:
@@ -711,38 +673,36 @@ OnTimer300000:
OnTimer350000:
OnTimer400000:
OnTimer450000:
- set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead");
+ set .@mob_dead_num, mobcount(instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
if (.@mob_dead_num >= 6)
- donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnFail";
+ donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail";
else
- donpcevent instance_npcname("Monster Hole#n", instance_id())+"::OnSpawn";
+ donpcevent instance_npcname("Monster Hole#n")+"::OnSpawn";
end;
OnTimer515000:
- set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead");
- instance_announce 0,"Contaminated Seaweed: "+.@mob_dead_num+" stem. Missing will come and inspect the results of the cleaning soon.",bc_map,"0xff3333",FW_NORMAL,20;
+ set .@map$, instance_mapname("1@pump");
+ set .@mob_dead_num, mobcount(.@map$,instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
+ mapannounce .@map$,"Contaminated Seaweed: "+.@mob_dead_num+" stem. Missing will come and inspect the results of the cleaning soon.",bc_map,"0xff3333",FW_NORMAL,20;
end;
OnTimer520000:
stopnpctimer;
- set .@mob_dead_num, mobcount("1@pump",instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnMyMobDead");
+ set .@mob_dead_num, mobcount(instance_mapname("1@pump"),instance_npcname("Missing, the Cleaner#n")+"::OnMyMobDead");
if (.@mob_dead_num >= 6)
- donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnFail";
+ donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnFail";
else
- donpcevent instance_npcname("Boss Creation#n", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Boss Creation#n")+"::OnEnable";
end;
}
1@pump,1,1,4 script Monster Hole#n -1,{
end;
-OnInstanceInit:
- enablenpc instance_npcname(strnpcinfo(0), instance_id());
- end;
OnSpawn:
set .@i$, charat(strnpcinfo(2),0);
if (.@i$ == "n")
set .@n,6;
else if (.@i$ == "h")
set .@n,10;
- donpcevent instance_npcname("#Culvert_"+.@i$+rand(1,.@n), instance_id())+"::OnEnable";
+ donpcevent instance_npcname("#Culvert_"+.@i$+rand(1,.@n))+"::OnEnable";
end;
OnClear:
set .@i$, charat(strnpcinfo(2),0);
@@ -751,21 +711,22 @@ OnClear:
else if (.@i$ == "h")
set .@n,10;
for(set .@i,1; .@i<=.@n; set .@i,.@i+1)
- donpcevent instance_npcname("#Culvert_"+.@i$+.@n, instance_id())+"::OnClear";
+ donpcevent instance_npcname("#Culvert_"+.@i$+.@n)+"::OnClear";
end;
}
-1@pump,36,111,4 script #Culvert_n1 844,{
+1@pump,36,111,4 script #Culvert_n1 844,14,14,{ //temporary workaround for ALL_SAMEMAP
progressbar "0xFFFF00",10;
stopnpctimer;
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0), instance_id());
- set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname(strnpcinfo(0));
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@pump");
set .@index, atoi(charat(strnpcinfo(2),9));
switch(.@index) {
case 1: setarray .@c[0],32,107,40,115; break;
@@ -775,12 +736,12 @@ OnEnable:
case 5: setarray .@c[0],71,76,79,84; break;
case 6: setarray .@c[0],54,97,62,105; break;
}
- areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Crab",2176,rand(1,3),.@label$;
- areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Marse",2175,rand(1,3),.@label$;
- areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Vadon",2174,rand(1,3),.@label$;
- areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Shellfish",2178,rand(1,3),.@label$;
- areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Kukre",2179,rand(1,3),.@label$;
- areamonster "1@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Cornutus",2177,rand(1,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Crab",2176,rand(1,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Marse",2175,rand(1,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Vadon",2174,rand(1,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Shellfish",2178,rand(1,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Kukre",2179,rand(1,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Cornutus",2177,rand(1,3),.@label$;
specialeffect EF_MAPPILLAR2,ALL_SAMEMAP; //currently broken
getmapxy(.@map$,.@x,.@y,1);
getpartymember 'party_id,2;
@@ -798,67 +759,70 @@ OnMyMobDead:
end;
OnClear:
stopnpctimer;
- killmonster "1@pump",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("1@pump"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
end;
OnTimer49500: //OnTimer50000 clashes with the timer in "Missing, the Cleaner#h".
- donpcevent instance_npcname("Missing, the Cleaner#n", instance_id())+"::OnAddSeaweed";
- donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnClear";
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ donpcevent instance_npcname("Missing, the Cleaner#n")+"::OnAddSeaweed";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnClear";
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnTouch:
+ specialeffect EF_MAPPILLAR2;
end;
}
-1@pump,68,124,4 duplicate(#Culvert_n1) #Culvert_n2 844
-1@pump,80,114,4 duplicate(#Culvert_n1) #Culvert_n3 844
-1@pump,40,80,4 duplicate(#Culvert_n1) #Culvert_n4 844
-1@pump,75,80,4 duplicate(#Culvert_n1) #Culvert_n5 844
-1@pump,58,101,4 duplicate(#Culvert_n1) #Culvert_n6 844
+1@pump,68,124,4 duplicate(#Culvert_n1) #Culvert_n2 844,14,14
+1@pump,80,114,4 duplicate(#Culvert_n1) #Culvert_n3 844,14,14
+1@pump,40,80,4 duplicate(#Culvert_n1) #Culvert_n4 844,14,14
+1@pump,75,80,4 duplicate(#Culvert_n1) #Culvert_n5 844,14,14
+1@pump,58,101,4 duplicate(#Culvert_n1) #Culvert_n6 844,14,14
1@pump,1,1,4 script Boss Creation#n -1,{
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0), instance_id());
+ enablenpc instance_npcname(strnpcinfo(0));
initnpctimer;
end;
OnTimer100:
set .@i$, charat(strnpcinfo(2),0);
if (.@i$ == "n")
- instance_announce 0,"Hmm! That wasn't so bad!",bc_map,"0xff88ff",FW_NORMAL,15;
+ mapannounce instance_mapname("1@pump"),"Hmm! That wasn't so bad!",bc_map,"0xff88ff",FW_NORMAL,15;
else if (.@i$ == "h")
- instance_announce 0,"Hmm! You guys are pretty good!!",bc_map,"0xff88ff",FW_NORMAL,15;
+ mapannounce instance_mapname("2@pump"),"Hmm! You guys are pretty good!!",bc_map,"0xff88ff",FW_NORMAL,15;
end;
OnTimer5000:
- instance_announce 0,"Let's pack up and go... WHAT!!?",bc_map,"0xff88ff",FW_NORMAL,15;
+ mapannounce strnpcinfo(4),"Let's pack up and go... WHAT!!?",bc_map,"0xff88ff",FW_NORMAL,15;
end;
OnTimer10000:
- instance_announce 0,"I sense something strange!! Don't loosen up-- prepare for a fight!!",bc_map,"0xff88ff",FW_NORMAL,15;
+ mapannounce strnpcinfo(4),"I sense something strange!! Don't loosen up-- prepare for a fight!!",bc_map,"0xff88ff",FW_NORMAL,15;
end;
OnTimer20000:
stopnpctimer;
set .@i$, charat(strnpcinfo(2),0);
- set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
if (rand(1,100) > 50) {
if (.@i$ == "n")
- monster "1@pump",0,0,"Weird Coelacanth",2188,1,.@label$;
+ monster instance_mapname("1@pump"),0,0,"Weird Coelacanth",2188,1,.@label$;
else if (.@i$ == "h")
- monster "2@pump",0,0,"Mutant Coelacanth",2189,1,.@label$;
- instance_announce 0,"Something big inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ monster instance_mapname("2@pump"),0,0,"Mutant Coelacanth",2189,1,.@label$;
+ mapannounce strnpcinfo(4),"Something big inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15;
} else {
if (.@i$ == "n")
- monster "1@pump",0,0,"Gloomy Coelacanth",2187,1,.@label$;
+ monster instance_mapname("1@pump"),0,0,"Gloomy Coelacanth",2187,1,.@label$;
else if (.@i$ == "h")
- monster "2@pump",0,0,"Violent Coelacanth",2190,1,.@label$;
- instance_announce 0,"Something savage inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ monster instance_mapname("2@pump"),0,0,"Violent Coelacanth",2190,1,.@label$;
+ mapannounce strnpcinfo(4),"Something savage inside the abyss appears with a huge noise.",bc_map,"0x00ffcc",FW_NORMAL,15;
}
end;
OnMyMobDead:
- if (mobcount(strnpcinfo(4),instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead") < 1) {
- instance_announce 0,"You've destroyed all monsters in the culverts. There are trophies lying on the ground, please look for them.",bc_map,"0xffff00",FW_NORMAL,15;
+ if (mobcount(strnpcinfo(4),instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) {
+ mapannounce strnpcinfo(4),"You've destroyed all monsters in the culverts. There are trophies lying on the ground, please look for them.",bc_map,"0xffff00",FW_NORMAL,15;
set .@i$, charat(strnpcinfo(2),0);
set .@map$, strnpcinfo(4);
- enablenpc instance_npcname("Culvert Entrance#"+.@i$, instance_id());
- enablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o", instance_id());
+ enablenpc instance_npcname("Culvert Entrance#"+.@i$);
+ enablenpc instance_npcname("Missing, the Cleaner#"+.@i$+"o");
if (.@i$ == "n") {
for(set .@i,0; .@i<10; set .@i,.@i+1) {
set .@j, rand(1,6401);
@@ -883,7 +847,7 @@ OnMyMobDead:
}
}
} else
- instance_announce 0,"There are still monsters alive.",bc_map,"0x00ff99",FW_NORMAL,20;
+ mapannounce strnpcinfo(4),"There are still monsters alive.",bc_map,"0x00ff99",FW_NORMAL,20;
end;
}
@@ -917,14 +881,14 @@ OnMyMobDead:
mes "If Tomas closes this down, we will lose our jobs!";
close;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
}
1@pump,32,100,0 script Culvert Entrance#n 45,3,3,{
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnTouch:
warp "mal_in01",161,32;
@@ -944,40 +908,39 @@ OnInstanceInit:
2@pump,39,88,4 script Missing, the Cleaner#h 545,{
callfunc "F_mal_missing";
- donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnStart";
+ donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnStart";
close;
-OnInstanceInit:
- enablenpc instance_npcname("Missing, the Cleaner#h", instance_id());
- end;
OnStart:
- killmonster "2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead";
- disablenpc instance_npcname("Missing, the Cleaner#h", instance_id());
+ killmonster instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead";
+ disablenpc instance_npcname("Missing, the Cleaner#h");
initnpctimer;
end;
OnAddSeaweed:
- areamonster "2@pump",75,78,85,88,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead";
- set .@mob_dead_num, mobcount("2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead");
+ set .@map$, instance_mapname("2@pump");
+ areamonster .@map$,75,78,85,88,"Contaminated Seaweed",2191,1,instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead";
+ set .@mob_dead_num, mobcount(.@map$,instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead");
if (.@mob_dead_num >= 6)
- donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnFail";
+ donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail";
else
- instance_announce 0,"Proliferous Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20;
+ mapannounce .@map$,"Proliferous Contaminated Seaweed: "+.@mob_dead_num+" stem",bc_map,"0xff3333",FW_NORMAL,20;
end;
OnMyMobDead:
end;
OnFail:
stopnpctimer;
- donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnClear";
- killmonster "2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead";
- enablenpc instance_npcname("Missing, the Cleaner#hf", instance_id());
- instance_announce 0,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15;
- disablenpc instance_npcname("Missing, the Cleaner#h", instance_id());
+ donpcevent instance_npcname("Monster Hole#h")+"::OnClear";
+ set .@map$, instance_mapname("2@pump");
+ killmonster .@map$, instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead";
+ enablenpc instance_npcname("Missing, the Cleaner#hf");
+ mapannounce .@map$,"What is this!! Seaweed is all over the culverts! You're done with cleaning! Get out!!",bc_map,"0xff88ff",FW_NORMAL,15;
+ disablenpc instance_npcname("Missing, the Cleaner#h");
end;
OnTimer100:
- instance_announce 0,"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ mapannounce instance_mapname("2@pump"),"First culvert will be opened in 5 sec. Cleaner can find the opened drain and click to start cleaning.",bc_map,"0x00ffcc",FW_NORMAL,15;
end;
OnTimer5500:
- instance_announce 0,"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15;
- donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnSpawn";
+ mapannounce instance_mapname("2@pump"),"The one who's in charge of cleaning the culvert cannot move or be attacked until the casting is over.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn";
end;
OnTimer35000:
OnTimer75000:
@@ -988,12 +951,12 @@ OnTimer235000:
OnTimer275000:
OnTimer315000:
OnTimer355000:
- instance_announce 0,"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15;
+ mapannounce instance_mapname("2@pump"),"Next culvert will be opened in 5 sec. Please hurry up and find the position of the next culvert.",bc_map,"0x00ffcc",FW_NORMAL,15;
end;
OnTimer40000:
OnTimer80000:
OnTimer120000:
- donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnSpawn";
+ donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn";
end;
OnTimer160000:
OnTimer200000:
@@ -1001,36 +964,37 @@ OnTimer240000:
OnTimer280000:
OnTimer320000:
OnTimer360000:
- set .@mob_dead_num, mobcount("2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead");
+ set .@mob_dead_num, mobcount(instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead");
if (.@mob_dead_num >= 6)
- donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnFail";
+ donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail";
else
- donpcevent instance_npcname("Monster Hole#h", instance_id())+"::OnSpawn";
+ donpcevent instance_npcname("Monster Hole#h")+"::OnSpawn";
end;
OnTimer420000:
- instance_announce 0,"It seems Missing will come and inspect the results of the cleaning soon. Shall we clean up the mess around here?",bc_map,"0xff3333",FW_NORMAL,20;
+ mapannounce instance_mapname("2@pump"),"It seems Missing will come and inspect the results of the cleaning soon. Shall we clean up the mess around here?",bc_map,"0xff3333",FW_NORMAL,20;
end;
OnTimer425000:
stopnpctimer;
- set .@mob_dead_num, mobcount("2@pump",instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnMyMobDead");
+ set .@mob_dead_num, mobcount(instance_mapname("2@pump"),instance_npcname("Missing, the Cleaner#h")+"::OnMyMobDead");
if (.@mob_dead_num >= 6)
- donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnFail";
+ donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnFail";
else
- donpcevent instance_npcname("Boss Creation#h", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("Boss Creation#h")+"::OnEnable";
end;
}
-2@pump,53,114,4 script #Culvert_h1 844,{
+2@pump,53,114,4 script #Culvert_h1 844,14,14,{ //temporary workaround for ALL_SAMEMAP
progressbar "0xFFFF00",15;
stopnpctimer;
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0), instance_id());
- set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname(strnpcinfo(0));
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ set .@map$, instance_mapname("2@pump");
set .@index, atoi(substr(strnpcinfo(2),9,getstrlen(strnpcinfo(2))-1));
switch(.@index) {
case 1: setarray .@c[0],49,110,57,118; break;
@@ -1044,12 +1008,12 @@ OnEnable:
case 9: setarray .@c[0],96,70,104,78; break;
case 10: setarray .@c[0],111,46,119,54; break;
}
- areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Marc",2182,rand(2,3),.@label$;
- areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Sword Fish",2181,rand(2,3),.@label$;
- areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Strouf",2180,rand(2,3),.@label$;
- areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Mutant Anolian",2183,rand(2,3),.@label$;
- areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Obeaune",2184,rand(2,3),.@label$;
- areamonster "2@pump",.@c[0],.@c[1],.@c[2],.@c[3],"Metamorphous Kapha",2185,rand(2,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Marc",2182,rand(2,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Sword Fish",2181,rand(2,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Ancient Strouf",2180,rand(2,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Mutant Anolian",2183,rand(2,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Abysmal Obeaune",2184,rand(2,3),.@label$;
+ areamonster .@map$,.@c[0],.@c[1],.@c[2],.@c[3],"Metamorphous Kapha",2185,rand(2,3),.@label$;
specialeffect EF_MAPPILLAR2,ALL_SAMEMAP; //currently broken
initnpctimer;
end;
@@ -1057,23 +1021,26 @@ OnMyMobDead:
end;
OnClear:
stopnpctimer;
- killmonster "2@pump",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ killmonster instance_mapname("2@pump"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
end;
OnTimer39500: //OnTimer40000 clashes with the timer in "Missing, the Cleaner#h".
- donpcevent instance_npcname("Missing, the Cleaner#h", instance_id())+"::OnAddSeaweed";
- donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnClear";
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ donpcevent instance_npcname("Missing, the Cleaner#h")+"::OnAddSeaweed";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnClear";
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnTouch:
+ specialeffect EF_MAPPILLAR2;
end;
}
-2@pump,79,109,4 duplicate(#Culvert_h1) #Culvert_h2 844
-2@pump,114,114,4 duplicate(#Culvert_h1) #Culvert_h3 844
-2@pump,98,98,4 duplicate(#Culvert_h1) #Culvert_h4 844
-2@pump,62,96,4 duplicate(#Culvert_h1) #Culvert_h5 844
-2@pump,57,70,4 duplicate(#Culvert_h1) #Culvert_h6 844
-2@pump,47,49,4 duplicate(#Culvert_h1) #Culvert_h7 844
-2@pump,81,63,4 duplicate(#Culvert_h1) #Culvert_h8 844
-2@pump,100,74,4 duplicate(#Culvert_h1) #Culvert_h9 844
-2@pump,115,50,4 duplicate(#Culvert_h1) #Culvert_h10 844
+2@pump,79,109,4 duplicate(#Culvert_h1) #Culvert_h2 844,14,14
+2@pump,114,114,4 duplicate(#Culvert_h1) #Culvert_h3 844,14,14
+2@pump,98,98,4 duplicate(#Culvert_h1) #Culvert_h4 844,14,14
+2@pump,62,96,4 duplicate(#Culvert_h1) #Culvert_h5 844,14,14
+2@pump,57,70,4 duplicate(#Culvert_h1) #Culvert_h6 844,14,14
+2@pump,47,49,4 duplicate(#Culvert_h1) #Culvert_h7 844,14,14
+2@pump,81,63,4 duplicate(#Culvert_h1) #Culvert_h8 844,14,14
+2@pump,100,74,4 duplicate(#Culvert_h1) #Culvert_h9 844,14,14
+2@pump,115,50,4 duplicate(#Culvert_h1) #Culvert_h10 844,14,14
2@pump,1,1,4 duplicate(Monster Hole#n) Monster Hole#h -1
2@pump,1,1,4 duplicate(Boss Creation#n) Boss Creation#h -1
diff --git a/npc/re/instances/OctopusCave.txt b/npc/re/instances/OctopusCave.txt
index 7eaf25a9c..c6216bfb3 100644
--- a/npc/re/instances/OctopusCave.txt
+++ b/npc/re/instances/OctopusCave.txt
@@ -1,18 +1,20 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Octopus Cave
//===== By: ==================================================
//= Muad_Dib
//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena SVN
+//= 1.1
//===== Description: =========================================
//= [Official Conversion]
//= Defeat the Disgusting Octopus.
//===== Additional Comments: =================================
//= 1.0 First version. [Euphy]
+//= 1.1 Instance system rewrite. [Euphy]
//============================================================
+1@cash mapflag src4instance
+//============================================================
+
// Instance Creation
//============================================================
mal_dun01,151,235,5 script Starfish 551,{
@@ -39,7 +41,7 @@ mal_dun01,151,235,5 script Starfish 551,{
mes "It is just roughly blocked for now.";
mes "But someday this cave must be sealed forever, hehe!";
next;
- while (1) {
+ while(1) {
switch(select("Ask what's going on.:Ask to open the gate.:Go to other location.")) {
case 1:
mes "[Starfish]";
@@ -83,7 +85,7 @@ mal_dun01,151,235,5 script Starfish 551,{
}
if (.@playtime == 2) erasequest 4197;
if (countitem(6442)) {
- set .@instance, instance_create(.@md_name$,.@party_id);
+ set .@instance,instance_create(.@md_name$,.@party_id);
if (.@instance < 0) {
mes "[Starfish]";
mes "Party name is... "+getpartyname(.@party_id)+".";
@@ -97,32 +99,9 @@ mal_dun01,151,235,5 script Starfish 551,{
instance_destroy(.@instance);
close;
}
- instance_attach(.@instance);
instance_set_timeout 3600,300,.@instance;
instance_init(.@instance);
-
- donpcevent instance_npcname("oct_enter", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot_4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot_exit1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot_exit2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot_exit3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_foot_exit4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_backattack1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_backattack2", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_backattack3", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_backattack4", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_boss_warp", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_exit_1", instance_id())+"::OnInstanceInit";
- donpcevent instance_npcname("oct_exit_2", instance_id())+"::OnInstanceInit";
-
+
mes "[Starfish]";
mes "I will open the gate for a while to ^0000ff"+.@md_name$+"^000000.";
mes "Please catch that pervert octopus,";
@@ -150,7 +129,6 @@ mal_dun01,153,237,5 script Weird Entrance 844,{
switch(select("Go in.:Stop.")) {
case 1:
if (countitem(6442)) {
- // TODO: Add official MD_Enter cases.
if (has_instance("1@cash") == "") {
if (checkquest(4197,PLAYTIME) == 0 || checkquest(4197,PLAYTIME) == 1) {
mes "[Starfish]";
@@ -167,7 +145,7 @@ mal_dun01,153,237,5 script Weird Entrance 844,{
mapannounce "mal_dun01", getpartyname(getcharid(1))+" party's "+strcharinfo(0)+" member started to hunt the Octopus!",bc_map,"0x00ff99";
if (checkquest(4197) == -1) setquest 4197;
warp "1@cash",199,99;
- close;
+ end;
}
mes "[Starfish]";
mes "You should definitely prepare";
@@ -186,169 +164,170 @@ mal_dun01,153,237,5 script Weird Entrance 844,{
//============================================================
1@cash,199,99,0 script oct_enter 139,4,4,{
end;
-OnInstanceInit:
- enablenpc instance_npcname("oct_enter", instance_id());
- end;
OnTouch:
- donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnEnable";
+ donpcevent instance_npcname("oct_enter_broad")+"::OnEnable";
specialeffect EF_BASH;
- disablenpc instance_npcname("oct_enter", instance_id());
+ disablenpc instance_npcname("oct_enter");
end;
}
1@cash,1,1,0 script oct_enter_broad -1,{
end;
OnInstanceInit:
- donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_enter_broad")+"::OnDisable";
end;
OnEnable:
- enablenpc instance_npcname("oct_enter_broad", instance_id());
- donpcevent instance_npcname("oct_foot_4", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnEnable";
+ enablenpc instance_npcname("oct_enter_broad");
+ donpcevent instance_npcname("oct_foot_4")+"::OnEnable";
+ donpcevent instance_npcname("oct_mob_con")+"::OnEnable";
initnpctimer;
end;
OnDisable:
- disablenpc instance_npcname("oct_enter_broad", instance_id());
+ disablenpc instance_npcname("oct_enter_broad");
end;
OnTimer1000:
- instance_announce 0,"Pervert Octopus : How dare you to come inside of my place!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cash"),"Pervert Octopus : How dare you to come inside of my place!",bc_map,"0xFFFF00";
end;
OnTimer4000:
- instance_announce 0,"Pervert Octopus : But I blocked all the cave gates!! There is nothing you can do!",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cash"),"Pervert Octopus : But I blocked all the cave gates!! There is nothing you can do!",bc_map,"0xFFFF00";
end;
OnTimer7000:
- instance_announce 0,"Pervert Octopus : My juniors~ There is your toy! Play with it~ kakaka",bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cash"),"Pervert Octopus : My juniors~ There is your toy! Play with it~ kakaka",bc_map,"0xFFFF00";
stopnpctimer;
- donpcevent instance_npcname("oct_enter_broad", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_enter_broad")+"::OnDisable";
end;
}
1@cash,3,3,0 script oct_foot_4 -1,{
end;
OnInstanceInit:
- donpcevent instance_npcname("oct_foot_4", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_foot_4")+"::OnDisable";
end;
OnEnable:
- enablenpc instance_npcname("oct_foot_4", instance_id());
- donpcevent instance_npcname("oct_foot1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_foot2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_foot3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_foot4", instance_id())+"::OnEnable";
- monster "1@cash",20,114,"Octopus Leg#1",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead";
- monster "1@cash",88,190,"Octopus Leg#2",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead";
- monster "1@cash",307,215,"Octopus Leg#3",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead";
- monster "1@cash",372,131,"Octopus Leg#4",2193,1,instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("oct_foot_4");
+ donpcevent instance_npcname("oct_foot1")+"::OnEnable";
+ donpcevent instance_npcname("oct_foot2")+"::OnEnable";
+ donpcevent instance_npcname("oct_foot3")+"::OnEnable";
+ donpcevent instance_npcname("oct_foot4")+"::OnEnable";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,20,114,"Octopus Leg#1",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead";
+ monster .@map$,88,190,"Octopus Leg#2",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead";
+ monster .@map$,307,215,"Octopus Leg#3",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead";
+ monster .@map$,372,131,"Octopus Leg#4",2193,1,instance_npcname("oct_foot_4")+"::OnMyMobDead";
end;
OnDisable:
- disablenpc instance_npcname("oct_foot_4", instance_id());
+ disablenpc instance_npcname("oct_foot_4");
end;
OnMyMobDead:
- if (mobcount("1@cash",instance_npcname("oct_foot_4", instance_id())+"::OnMyMobDead") < 1) {
- donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnEnable";
- instance_announce 0,"Hey you!! I'll personally take care of you all! Let's bring it on!",bc_map,"0x00ff99";
- enablenpc instance_npcname("oct_boss_warp", instance_id());
- instance_warpall "1@cash",199,99;
+ set .@map$, instance_mapname("1@cash");
+ if (mobcount(.@map$,instance_npcname("oct_foot_4")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("oct_boss_con")+"::OnEnable";
+ mapannounce .@map$,"Hey you!! I'll personally take care of you all! Let's bring it on!",bc_map,"0x00ff99";
+ enablenpc instance_npcname("oct_boss_warp");
+ instance_warpall .@map$,199,99;
end;
}
- instance_announce 0,"Arrgg!! That hurts!!! I need another strategy...",bc_map,"0x00ff99";
+ mapannounce .@map$,"Arrgg!! That hurts!!! I need another strategy...",bc_map,"0x00ff99";
end;
}
1@cash,20,114,0 script oct_foot1 139,6,6,{
end;
OnInstanceInit:
- donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnDisable";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0), instance_id());
- set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname(strnpcinfo(0));
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
set .@i, atoi(charat(strnpcinfo(0),8));
+ set .@map$, instance_mapname("1@cash");
switch(.@i) {
case 1:
- areamonster "1@cash",34,96,38,100,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",39,90,41,92,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",38,76,40,78,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",39,58,41,60,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",50,38,56,44,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",68,32,72,36,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",83,26,85,28,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",107,28,109,30,"Octopus's Henchman",2192,1,.@label$;
- areamonster "1@cash",123,28,125,30,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",134,31,138,35,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",142,39,146,43,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,34,96,38,100,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,39,90,41,92,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,38,76,40,78,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,39,58,41,60,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,50,38,56,44,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,68,32,72,36,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,83,26,85,28,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,107,28,109,30,"Octopus's Henchman",2192,1,.@label$;
+ areamonster .@map$,123,28,125,30,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,134,31,138,35,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,142,39,146,43,"Octopus's Henchman",2192,2,.@label$;
break;
case 2:
- areamonster "1@cash",139,113,143,117,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",135,104,137,106,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",123,93,127,97,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",113,90,115,92,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",103,89,105,91,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",89,90,91,92,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",74,104,76,106,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",74,120,76,122,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",83,131,87,135,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",92,142,94,144,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",98,159,100,161,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",94,180,98,184,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,139,113,143,117,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,135,104,137,106,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,123,93,127,97,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,113,90,115,92,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,103,89,105,91,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,89,90,91,92,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,74,104,76,106,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,74,120,76,122,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,83,131,87,135,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,92,142,94,144,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,98,159,100,161,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,94,180,98,184,"Octopus's Henchman",2192,5,.@label$;
break;
case 3:
- areamonster "1@cash",299,209,303,213,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",292,203,296,207,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",291,186,293,188,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",292,166,294,168,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",293,151,295,153,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",299,137,303,141,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",300,123,304,127,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",300,104,304,108,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",279,101,281,103,"Octopus's Henchman",2192,2,.@label$;
- monster "1@cash",260,103,"Octopus's Henchman",2192,1,.@label$;
+ areamonster .@map$,299,209,303,213,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,292,203,296,207,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,291,186,293,188,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,292,166,294,168,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,293,151,295,153,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,299,137,303,141,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,300,123,304,127,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,300,104,304,108,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,279,101,281,103,"Octopus's Henchman",2192,2,.@label$;
+ monster .@map$,260,103,"Octopus's Henchman",2192,1,.@label$;
break;
case 4:
- areamonster "1@cash",363,123,367,127,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",364,108,368,112,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",363,93,367,97,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",364,72,366,74,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",364,58,366,60,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",355,44,359,48,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",346,36,350,40,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",319,28,325,34,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",305,27,307,29,"Octopus's Henchman",2192,2,.@label$;
- areamonster "1@cash",276,29,280,33,"Octopus's Henchman",2192,5,.@label$;
- areamonster "1@cash",258,37,262,41,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,363,123,367,127,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,364,108,368,112,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,363,93,367,97,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,364,72,366,74,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,364,58,366,60,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,355,44,359,48,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,346,36,350,40,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,319,28,325,34,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,305,27,307,29,"Octopus's Henchman",2192,2,.@label$;
+ areamonster .@map$,276,29,280,33,"Octopus's Henchman",2192,5,.@label$;
+ areamonster .@map$,258,37,262,41,"Octopus's Henchman",2192,2,.@label$;
break;
}
end;
OnDisable:
- killmonster "1@cash",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead"; // Not in official script.
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ killmonster instance_mapname("1@cash"),instance_npcname(strnpcinfo(0))+"::OnMyMobDead"; // Not in official script.
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnTouch:
if (getd("."+strnpcinfo(0)+instance_id())) end;
setd "."+strnpcinfo(0)+instance_id(),1;
- hideonnpc instance_npcname(strnpcinfo(0), instance_id());
- instance_announce 0,"Come out all my babies and help me out!",bc_map,"0xFFFF00";
+ hideonnpc instance_npcname(strnpcinfo(0));
+ mapannounce instance_mapname("1@cash"),"Come out all my babies and help me out!",bc_map,"0xFFFF00";
initnpctimer;
end;
OnTimer5000:
- instance_announce 0,"Let's give them a lesson!",bc_map,"0xFFFF00";
- set .@label$, instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead";
+ set .@map$, instance_mapname("1@cash");
+ mapannounce .@map$,"Let's give them a lesson!",bc_map,"0xFFFF00";
+ set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
set .@i, atoi(charat(strnpcinfo(0),8));
switch(.@i) {
case 1:
- areamonster "1@cash",18,112,22,116,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",18,112,22,116,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,18,112,22,116,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,18,112,22,116,"Octopus's Henchman",2192,3,.@label$;
break;
case 2:
- areamonster "1@cash",86,188,90,192,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",96,98,100,102,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,86,188,90,192,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,96,98,100,102,"Octopus's Henchman",2192,3,.@label$;
break;
case 3:
- areamonster "1@cash",305,213,309,217,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",305,213,309,217,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,305,213,309,217,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,305,213,309,217,"Octopus's Henchman",2192,3,.@label$;
break;
case 4:
- areamonster "1@cash",370,129,374,133,"Octopus's Henchman",2192,3,.@label$;
- areamonster "1@cash",370,129,374,133,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,370,129,374,133,"Octopus's Henchman",2192,3,.@label$;
+ areamonster .@map$,370,129,374,133,"Octopus's Henchman",2192,3,.@label$;
break;
}
end;
@@ -356,17 +335,18 @@ OnTimer30000:
setd "."+strnpcinfo(0)+instance_id(),0;
stopnpctimer;
set .@i, atoi(charat(strnpcinfo(0),8));
- donpcevent instance_npcname("oct_foot_exit"+.@i, instance_id())+"::OnEnable";
- donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_foot_exit"+.@i)+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
end;
OnMyMobDead:
- if (mobcount("1@cash",instance_npcname(strnpcinfo(0), instance_id())+"::OnMyMobDead") < 1) {
- instance_announce 0,"You hurt my babies!!? You'll have to pay for this!!!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ if (mobcount(.@map$,instance_npcname(strnpcinfo(0))+"::OnMyMobDead") < 1) {
+ mapannounce .@map$,"You hurt my babies!!? You'll have to pay for this!!!",bc_map,"0x00ff99";
setd "."+strnpcinfo(0)+instance_id(),0;
stopnpctimer;
set .@i, atoi(charat(strnpcinfo(0),8));
- donpcevent instance_npcname("oct_foot_exit"+.@i, instance_id())+"::OnEnable";
- donpcevent instance_npcname(strnpcinfo(0), instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_foot_exit"+.@i)+"::OnEnable";
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
end;
}
end;
@@ -378,13 +358,13 @@ OnMyMobDead:
1@cash,16,117,0 script oct_foot_exit1 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnEnable:
- enablenpc instance_npcname(strnpcinfo(0), instance_id());
+ enablenpc instance_npcname(strnpcinfo(0));
end;
OnTouch:
- warp "1@cash",198,99;
+ warp instance_mapname("1@cash"),198,99;
end;
}
1@cash,77,193,0 duplicate(oct_foot_exit1) oct_foot_exit2 45,2,2
@@ -394,196 +374,205 @@ OnTouch:
1@cash,15,15,0 script oct_mob_con -1,{
end;
OnInstanceInit:
- donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_mob_con")+"::OnDisable";
end;
OnEnable:
- enablenpc instance_npcname("oct_mob_con", instance_id());
- monster "1@cash",32,94,"Hydra",1068,1;
- monster "1@cash",41,101,"Hydra",1068,1;
- monster "1@cash",35,78,"Hydra",1068,1;
- monster "1@cash",35,62,"Hydra",1068,1;
- monster "1@cash",49,54,"Hydra",1068,1;
- monster "1@cash",70,28,"Hydra",1068,1;
- monster "1@cash",83,22,"Hydra",1068,1;
- monster "1@cash",99,23,"Hydra",1068,1;
- monster "1@cash",115,23,"Hydra",1068,1;
- monster "1@cash",132,25,"Hydra",1068,1;
- monster "1@cash",100,185,"Hydra",1068,1;
- monster "1@cash",92,178,"Hydra",1068,1;
- monster "1@cash",92,162,"Hydra",1068,1;
- monster "1@cash",70,121,"Hydra",1068,1;
- monster "1@cash",70,105,"Hydra",1068,1;
- monster "1@cash",105,85,"Hydra",1068,1;
- monster "1@cash",121,84,"Hydra",1068,1;
- monster "1@cash",292,209,"Hydra",1068,1;
- monster "1@cash",303,206,"Hydra",1068,1;
- monster "1@cash",290,163,"Hydra",1068,1;
- monster "1@cash",299,150,"Hydra",1068,1;
- monster "1@cash",308,141,"Hydra",1068,1;
- monster "1@cash",308,125,"Hydra",1068,1;
- monster "1@cash",295,97,"Hydra",1068,1;
- monster "1@cash",279,97,"Hydra",1068,1;
- monster "1@cash",370,111,"Hydra",1068,1;
- monster "1@cash",370,110,"Hydra",1068,1;
- monster "1@cash",371,96,"Hydra",1068,1;
- monster "1@cash",371,80,"Hydra",1068,1;
- monster "1@cash",367,55,"Hydra",1068,1;
- monster "1@cash",343,29,"Hydra",1068,1;
- monster "1@cash",327,24,"Hydra",1068,1;
- monster "1@cash",311,22,"Hydra",1068,1;
- monster "1@cash",295,22,"Hydra",1068,1;
- monster "1@cash",279,22,"Hydra",1068,1;
- areamonster "1@cash",30,67,50,87,"Stapo",1784,1;
- areamonster "1@cash",102,19,122,39,"Stapo",1784,1;
- areamonster "1@cash",89,138,109,158,"Stapo",1784,1;
- areamonster "1@cash",112,83,132,103,"Stapo",1784,1;
- areamonster "1@cash",283,168,303,188,"Stapo",1784,1;
- areamonster "1@cash",292,97,312,117,"Stapo",1784,1;
- areamonster "1@cash",355,64,375,84,"Stapo",1784,1;
- areamonster "1@cash",317,17,337,37,"Stapo",1784,1;
- donpcevent instance_npcname("oct_backattack1", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_backattack2", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_backattack3", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_backattack4", instance_id())+"::OnEnable";
- donpcevent instance_npcname("oct_mob_con", instance_id())+"::OnDisable";
+ set .@map$, instance_mapname("1@cash");
+ enablenpc instance_npcname("oct_mob_con");
+ monster .@map$,32,94,"Hydra",1068,1;
+ monster .@map$,41,101,"Hydra",1068,1;
+ monster .@map$,35,78,"Hydra",1068,1;
+ monster .@map$,35,62,"Hydra",1068,1;
+ monster .@map$,49,54,"Hydra",1068,1;
+ monster .@map$,70,28,"Hydra",1068,1;
+ monster .@map$,83,22,"Hydra",1068,1;
+ monster .@map$,99,23,"Hydra",1068,1;
+ monster .@map$,115,23,"Hydra",1068,1;
+ monster .@map$,132,25,"Hydra",1068,1;
+ monster .@map$,100,185,"Hydra",1068,1;
+ monster .@map$,92,178,"Hydra",1068,1;
+ monster .@map$,92,162,"Hydra",1068,1;
+ monster .@map$,70,121,"Hydra",1068,1;
+ monster .@map$,70,105,"Hydra",1068,1;
+ monster .@map$,105,85,"Hydra",1068,1;
+ monster .@map$,121,84,"Hydra",1068,1;
+ monster .@map$,292,209,"Hydra",1068,1;
+ monster .@map$,303,206,"Hydra",1068,1;
+ monster .@map$,290,163,"Hydra",1068,1;
+ monster .@map$,299,150,"Hydra",1068,1;
+ monster .@map$,308,141,"Hydra",1068,1;
+ monster .@map$,308,125,"Hydra",1068,1;
+ monster .@map$,295,97,"Hydra",1068,1;
+ monster .@map$,279,97,"Hydra",1068,1;
+ monster .@map$,370,111,"Hydra",1068,1;
+ monster .@map$,370,110,"Hydra",1068,1;
+ monster .@map$,371,96,"Hydra",1068,1;
+ monster .@map$,371,80,"Hydra",1068,1;
+ monster .@map$,367,55,"Hydra",1068,1;
+ monster .@map$,343,29,"Hydra",1068,1;
+ monster .@map$,327,24,"Hydra",1068,1;
+ monster .@map$,311,22,"Hydra",1068,1;
+ monster .@map$,295,22,"Hydra",1068,1;
+ monster .@map$,279,22,"Hydra",1068,1;
+ areamonster .@map$,30,67,50,87,"Stapo",1784,1;
+ areamonster .@map$,102,19,122,39,"Stapo",1784,1;
+ areamonster .@map$,89,138,109,158,"Stapo",1784,1;
+ areamonster .@map$,112,83,132,103,"Stapo",1784,1;
+ areamonster .@map$,283,168,303,188,"Stapo",1784,1;
+ areamonster .@map$,292,97,312,117,"Stapo",1784,1;
+ areamonster .@map$,355,64,375,84,"Stapo",1784,1;
+ areamonster .@map$,317,17,337,37,"Stapo",1784,1;
+ donpcevent instance_npcname("oct_backattack1")+"::OnEnable";
+ donpcevent instance_npcname("oct_backattack2")+"::OnEnable";
+ donpcevent instance_npcname("oct_backattack3")+"::OnEnable";
+ donpcevent instance_npcname("oct_backattack4")+"::OnEnable";
+ donpcevent instance_npcname("oct_mob_con")+"::OnDisable";
end;
OnDisable:
- disablenpc instance_npcname("oct_mob_con", instance_id());
+ disablenpc instance_npcname("oct_mob_con");
end;
}
1@cash,45,53,0 script oct_backattack1 139,3,3,{
end;
OnInstanceInit:
- disablenpc instance_npcname("oct_backattack1", instance_id());
+ disablenpc instance_npcname("oct_backattack1");
end;
OnTouch:
- monster "1@cash",39,59,"Hydra",1068,1;
- monster "1@cash",40,59,"Hydra",1068,1;
- monster "1@cash",41,59,"Hydra",1068,1;
- monster "1@cash",47,50,"Hydra",1068,1;
- monster "1@cash",48,50,"Hydra",1068,1;
- monster "1@cash",49,50,"Hydra",1068,1;
- monster "1@cash",41,53,"Octopus's Henchman",2192,1;
- instance_announce 0,"Don't let them break through, stop them!!!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,39,59,"Hydra",1068,1;
+ monster .@map$,40,59,"Hydra",1068,1;
+ monster .@map$,41,59,"Hydra",1068,1;
+ monster .@map$,47,50,"Hydra",1068,1;
+ monster .@map$,48,50,"Hydra",1068,1;
+ monster .@map$,49,50,"Hydra",1068,1;
+ monster .@map$,41,53,"Octopus's Henchman",2192,1;
+ mapannounce .@map$,"Don't let them break through, stop them!!!",bc_map,"0x00ff99";
specialeffect EF_BASH;
- disablenpc instance_npcname("oct_backattack1", instance_id());
+ disablenpc instance_npcname("oct_backattack1");
end;
OnEnable:
- enablenpc instance_npcname("oct_backattack1", instance_id());
+ enablenpc instance_npcname("oct_backattack1");
end;
}
1@cash,78,99,0 script oct_backattack2 139,3,3,{
end;
OnInstanceInit:
- disablenpc instance_npcname("oct_backattack2", instance_id());
+ disablenpc instance_npcname("oct_backattack2");
end;
OnTouch:
if (getd("."+instance_id())) end;
setd "."+instance_id(),1;
initnpctimer;
- monster "1@cash",71,105,"Octopus's Henchman ",2192,1;
- instance_announce 0,"Headquarters are empty, GO!!!",bc_map,"0x00ff99";
- hideonnpc instance_npcname("oct_backattack2", instance_id());
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,71,105,"Octopus's Henchman ",2192,1;
+ mapannounce .@map$,"Headquarters are empty, GO!!!",bc_map,"0x00ff99";
+ hideonnpc instance_npcname("oct_backattack2");
end;
OnTimer2000:
- monster "1@cash",71,105,"Octopus's Henchman ",2192,1;
- instance_announce 0,"Run, RUN! Go, GO!!!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,71,105,"Octopus's Henchman ",2192,1;
+ mapannounce .@map$,"Run, RUN! Go, GO!!!",bc_map,"0x00ff99";
end;
OnTimer4000:
- monster "1@cash",71,105,"Octopus's Henchman ",2192,1;
- instance_announce 0,"No time, come out fast!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,71,105,"Octopus's Henchman ",2192,1;
+ mapannounce .@map$,"No time, come out fast!",bc_map,"0x00ff99";
end;
OnTimer6000:
- monster "1@cash",71,105,"Octopus's Henchman ",2192,3;
- instance_announce 0,"Let's take over the headquarters!!!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,71,105,"Octopus's Henchman ",2192,3;
+ mapannounce .@map$,"Let's take over the headquarters!!!",bc_map,"0x00ff99";
end;
OnTimer8000:
- monster "1@cash",71,105,"Octopus's Henchman ",2192,1;
- instance_announce 0,"There is no time to lose, hurry up!!!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,71,105,"Octopus's Henchman ",2192,1;
+ mapannounce .@map$,"There is no time to lose, hurry up!!!",bc_map,"0x00ff99";
stopnpctimer;
end;
OnEnable:
- enablenpc instance_npcname("oct_backattack2", instance_id());
+ enablenpc instance_npcname("oct_backattack2");
end;
}
1@cash,299,144,0 script oct_backattack3 139,3,3,{
end;
OnInstanceInit:
- disablenpc instance_npcname("oct_backattack2", instance_id());
+ disablenpc instance_npcname("oct_backattack3");
end;
OnTouch:
if (getd("."+instance_id())) end;
setd "."+instance_id(),1;
- monster "1@cash",293,153,"Octopus's Henchman ",2192,1;
- monster "1@cash",294,152,"Octopus's Henchman ",2192,1;
- monster "1@cash",292,153,"Octopus's Henchman ",2192,1;
- monster "1@cash",293,151,"Octopus's Henchman ",2192,1;
- monster "1@cash",293,152,"Octopus's Henchman ?",2175,1;
- instance_announce 0,"Kakaka! Suprised??!!",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,293,153,"Octopus's Henchman ",2192,1;
+ monster .@map$,294,152,"Octopus's Henchman ",2192,1;
+ monster .@map$,292,153,"Octopus's Henchman ",2192,1;
+ monster .@map$,293,151,"Octopus's Henchman ",2192,1;
+ monster .@map$,293,152,"Octopus's Henchman ?",2175,1;
+ mapannounce .@map$,"Kakaka! Suprised??!!",bc_map,"0x00ff99";
initnpctimer;
- hideonnpc instance_npcname("oct_backattack3", instance_id());
+ hideonnpc instance_npcname("oct_backattack3");
end;
OnTimer5000:
- instance_announce 0,"... Looks like we have a spy among us.",bc_map,"0x00ff99";
+ mapannounce instance_mapname("1@cash"),"... Looks like we have a spy among us.",bc_map,"0x00ff99";
stopnpctimer;
end;
OnEnable:
- enablenpc instance_npcname("oct_backattack3", instance_id());
+ enablenpc instance_npcname("oct_backattack3");
end;
}
1@cash,336,36,0 script oct_backattack4 139,3,3,{
end;
OnInstanceInit:
- disablenpc instance_npcname("oct_backattack2", instance_id());
+ disablenpc instance_npcname("oct_backattack4");
end;
OnTouch:
if (getd("."+instance_id())) end;
setd "."+instance_id(),1;
- monster "1@cash",332,37,"Octopus's Henchman ",2192,1;
- monster "1@cash",332,36,"Octopus's Henchman ",2192,1;
- monster "1@cash",332,35,"Octopus's Henchman ",2192,1;
- monster "1@cash",332,34,"Octopus's Henchman ",2192,1;
- monster "1@cash",341,37,"Octopus's Henchman ",2192,1;
- monster "1@cash",341,36,"Octopus's Henchman ",2192,1;
- monster "1@cash",341,35,"Octopus's Henchman ",2192,1;
- monster "1@cash",341,34,"Octopus's Henchman ",2192,1;
- monster "1@cash",260,40,"Mercenary Squid",2175,1;
- monster "1@cash",260,41,"Mercenary Squid",2175,1;
- monster "1@cash",260,39,"Mercenary Squid",2175,1;
- monster "1@cash",259,40,"Mercenary Squid",2175,1;
- monster "1@cash",261,40,"Mercenary Squid",2175,1;
- instance_announce 0,"What a successful pincer tactic! The enemy is strong! Let's not lose yourselves! Anyway, where are all the mercenaries??",bc_map,"0x00ff99";
+ set .@map$, instance_mapname("1@cash");
+ monster .@map$,332,37,"Octopus's Henchman ",2192,1;
+ monster .@map$,332,36,"Octopus's Henchman ",2192,1;
+ monster .@map$,332,35,"Octopus's Henchman ",2192,1;
+ monster .@map$,332,34,"Octopus's Henchman ",2192,1;
+ monster .@map$,341,37,"Octopus's Henchman ",2192,1;
+ monster .@map$,341,36,"Octopus's Henchman ",2192,1;
+ monster .@map$,341,35,"Octopus's Henchman ",2192,1;
+ monster .@map$,341,34,"Octopus's Henchman ",2192,1;
+ monster .@map$,260,40,"Mercenary Squid",2175,1;
+ monster .@map$,260,41,"Mercenary Squid",2175,1;
+ monster .@map$,260,39,"Mercenary Squid",2175,1;
+ monster .@map$,259,40,"Mercenary Squid",2175,1;
+ monster .@map$,261,40,"Mercenary Squid",2175,1;
+ mapannounce .@map$,"What a successful pincer tactic! The enemy is strong! Let's not lose yourselves! Anyway, where are all the mercenaries??",bc_map,"0x00ff99";
initnpctimer;
- hideonnpc instance_npcname("oct_backattack4", instance_id());
+ hideonnpc instance_npcname("oct_backattack4");
end;
OnTimer5000:
- instance_announce 0,"Mercenary Squid : eh...eh... wrong direction. No enemies are shown in this direction.",bc_map,"0x00ff99";
+ mapannounce instance_mapname("1@cash"),"Mercenary Squid : eh...eh... wrong direction. No enemies are shown in this direction.",bc_map,"0x00ff99";
end;
OnTimer7000:
- instance_announce 0,"Pervert Octopus : Fools! Can't you read the map??!! Useless!!",bc_map,"0x00ff99";
+ mapannounce instance_mapname("1@cash"),"Pervert Octopus : Fools! Can't you read the map??!! Useless!!",bc_map,"0x00ff99";
stopnpctimer;
end;
OnEnable:
- enablenpc instance_npcname("oct_backattack4", instance_id());
+ enablenpc instance_npcname("oct_backattack4");
end;
}
1@cash,2,2,0 script oct_boss_con -1,{
end;
OnInstanceInit:
- donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_boss_con")+"::OnDisable";
end;
OnDisable:
- disablenpc instance_npcname("oct_boss_con", instance_id());
+ disablenpc instance_npcname("oct_boss_con");
end;
OnEnable:
- enablenpc instance_npcname("oct_boss_con", instance_id());
- donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnEnable";
- monster "1@cash",199,188,"Disgusting Octopus",2194,1,instance_npcname("oct_boss_con", instance_id())+"::OnMyMobDead";
+ enablenpc instance_npcname("oct_boss_con");
+ donpcevent instance_npcname("oct_boss_foot")+"::OnEnable";
+ monster instance_mapname("1@cash"),199,188,"Disgusting Octopus",2194,1,instance_npcname("oct_boss_con")+"::OnMyMobDead";
initnpctimer;
end;
OnTimer7000:
@@ -631,16 +620,17 @@ OnTimer49000:
initnpctimer;
end;
OnAnnounce:
- instance_announce 0,"Disgusting Octopus : "+getarg(rand(3)),bc_map,"0xFFFF00";
+ mapannounce instance_mapname("1@cash"),"Disgusting Octopus : "+getarg(rand(3)),bc_map,"0xFFFF00";
return;
OnMyMobDead:
- if (mobcount("1@cash",instance_npcname("oct_boss_con", instance_id())+"::OnMyMobDead") < 1) {
- instance_announce 0,"Disgusting Octopus : That's it for the today! Next time, I will play with you badly!",bc_map,"0xFFFF00";
- enablenpc instance_npcname("oct_exit_1", instance_id());
- enablenpc instance_npcname("oct_exit_2", instance_id());
- donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnDisable";
+ set .@map$, instance_mapname("1@cash");
+ if (mobcount(.@map$,instance_npcname("oct_boss_con")+"::OnMyMobDead") < 1) {
+ mapannounce .@map$,"Disgusting Octopus : That's it for the today! Next time, I will play with you badly!",bc_map,"0xFFFF00";
+ enablenpc instance_npcname("oct_exit_1");
+ enablenpc instance_npcname("oct_exit_2");
+ donpcevent instance_npcname("oct_boss_foot")+"::OnDisable";
stopnpctimer;
- donpcevent instance_npcname("oct_boss_con", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_boss_con")+"::OnDisable";
end;
}
end;
@@ -649,22 +639,23 @@ OnMyMobDead:
1@cash,4,4,0 script oct_boss_foot -1,{
end;
OnInstanceInit:
- donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnDisable";
+ donpcevent instance_npcname("oct_boss_foot")+"::OnDisable";
end;
OnEnable:
- enablenpc instance_npcname("oct_boss_foot", instance_id());
+ enablenpc instance_npcname("oct_boss_foot");
initnpctimer;
end;
OnCall:
- if (mobcount("1@cash",instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead") < 100) {
+ set .@map$, instance_mapname("1@cash");
+ if (mobcount(.@map$,instance_npcname("oct_boss_foot")+"::OnMyMobDead") < 100) {
switch(rand(2)) {
case 0:
- instance_announce 0,"Disgusting Octopus : Do you know how many legs octopus have? It doesn't matter, I have unlimited legs!!",bc_map,"0xFFFF00";
- areamonster "1@cash",192,181,206,195,"Octopus Leg",2193,1,instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead";
+ mapannounce .@map$,"Disgusting Octopus : Do you know how many legs octopus have? It doesn't matter, I have unlimited legs!!",bc_map,"0xFFFF00";
+ areamonster .@map$,192,181,206,195,"Octopus Leg",2193,1,instance_npcname("oct_boss_foot")+"::OnMyMobDead";
break;
case 1:
- instance_announce 0,"Disgusting Octopus : I...cannot..hold anymore, my babies~ please come out and fight!",bc_map,"0xFFFF00";
- areamonster "1@cash",192,181,206,195,"Octopus's Henchman ",2192,5,instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead";
+ mapannounce .@map$,"Disgusting Octopus : I...cannot..hold anymore, my babies~ please come out and fight!",bc_map,"0xFFFF00";
+ areamonster .@map$,192,181,206,195,"Octopus's Henchman ",2192,5,instance_npcname("oct_boss_foot")+"::OnMyMobDead";
break;
}
}
@@ -672,12 +663,12 @@ OnCall:
end;
OnTimer10000:
stopnpctimer;
- donpcevent instance_npcname("oct_boss_foot", instance_id())+"::OnCall";
+ donpcevent instance_npcname("oct_boss_foot")+"::OnCall";
end;
OnDisable:
stopnpctimer;
- killmonster "1@cash",instance_npcname("oct_boss_foot", instance_id())+"::OnMyMobDead"; // Not in official script.
- disablenpc instance_npcname("oct_boss_foot", instance_id());
+ killmonster instance_mapname("1@cash"),instance_npcname("oct_boss_foot")+"::OnMyMobDead"; // Not in official script.
+ disablenpc instance_npcname("oct_boss_foot");
end;
OnMyMobDead:
end;
@@ -686,17 +677,17 @@ OnMyMobDead:
1@cash,198,116,0 script oct_boss_warp 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname("oct_boss_warp", instance_id());
+ disablenpc instance_npcname("oct_boss_warp");
end;
OnTouch:
- warp "1@cash",210,172;
+ warp instance_mapname("1@cash"),210,172;
end;
}
1@cash,190,208,0 script oct_exit_1 45,2,2,{
end;
OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0), instance_id());
+ disablenpc instance_npcname(strnpcinfo(0));
end;
OnTouch:
mes "Do you want to go out from the octopus dungeon?";
diff --git a/npc/re/instances/OldGlastHeim.txt b/npc/re/instances/OldGlastHeim.txt
new file mode 100644
index 000000000..034749f46
--- /dev/null
+++ b/npc/re/instances/OldGlastHeim.txt
@@ -0,0 +1,2059 @@
+//===== Hercules Script ======================================
+//= Old Glast Heim
+//===== By: ==================================================
+//= Ziu, Heris (translation)
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= Discover the history of events that took place in the
+//= Glast Heim castle and how it ended up in ruins.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//============================================================
+
+1@gl_k mapflag src4instance
+2@gl_k mapflag src4instance
+//============================================================
+glast_01,204,273,6 script Hugin#ghinstance 755,{
+ mes "^ff0000This isn't considered a normal progression dungeon. Please note this point.^000000";
+ next;
+ mes "[Hugin]";
+ mes "Huh? You feel like you have seen me in different places? I see. What can I say?";
+ next;
+ set .@ghins_time, checkquest(12317,PLAYTIME);
+ if (.@ghins_time == -1) {
+
+ set .@party_id,getcharid(1);
+ set .@p_name$,getpartyname(.@party_id);
+ set .@md_name$,"Old Glast Heim";
+
+ if (!instance_check_party(.@party_id,2)) {
+ //custom
+ mes "[Hugin]";
+ mes "Where are your party members?";
+ close;
+ }
+
+ if (getcharid(0) == getpartyleader(.@party_id,2))
+ set .@menu$, "Create the time gap.:Enter the Old Glast Heim.:Cancel.";
+ else
+ set .@menu$, ":Enter the Old Glast Heim.:Cancel.";
+ switch(select(.@menu$)) {
+ case 1:
+ set .@instance, instance_create(.@md_name$,.@party_id);
+ if (.@instance < 0) {
+ mes "Party Name: "+.@p_name$;
+ mes "Party Leader: "+strcharinfo(0);
+ mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
+ close;
+ }
+ if (instance_attachmap("1@gl_k",.@instance) == "" || instance_attachmap("2@gl_k",.@instance) == "") {
+ mes "^0000ff"+.@md_name$+"^000000 - Reservation Failed!";
+ instance_destroy(.@instance);
+ close;
+ }
+ instance_set_timeout 3600,300,.@instance;
+ instance_init(.@instance);
+ mes "[Hugin]";
+ mes "The time gap was created. When you're ready, talk to me again.";
+ close;
+ case 2:
+ if( has_instance("1@gl_k") == "" ) {
+ mes "The memorial dungeon "+.@md_name$+" does not exist.";
+ mes "The party leader did not generate the dungeon yet.";
+ close;
+ } else {
+ mapannounce "glast_01",strcharinfo(0)+", member of the party "+.@p_name$+" entered the instance "+.@md_name$+".",bc_map,"0x00ff99";
+ setquest 12317;
+ setquest 12318;
+ warp "1@gl_k",150,20;
+ end;
+ }
+ case 3:
+ close;
+ }
+ } else if (.@ghins_time == 0 || .@ghins_time == 1) {
+ mes "[Hugin]";
+ mes "Oh, geez.";
+ mes "Your body is still under the effects of time travel. In this state, you will not be able to travel again.";
+ next;
+ mes "[Hugin]";
+ mes "You should rest and come back later for more.";
+ close;
+ } else {
+ mes "^0000ffOld Glast Heim access trail has been cleared. It is now possible to talk to Hugin.^000000";
+ erasequest 12317;
+ if (checkquest(12318) > -1) erasequest 12318;
+ if (checkquest(12319) > -1) erasequest 12319;
+ close;
+ }
+}
+
+// Floor 1
+//============================================================
+1@gl_k,149,41,6 script Varmunt#ghinstance1 654,{
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ mes "Hey ^0000ffguys^000000, were you sent here to help me?";
+ npctalk "Hey guys, were you sent here to help me?";
+ cutin "gl_barmund1",2;
+ next;
+ select("Oh. Well, about that...");
+ mes "["+strcharinfo(0)+"]";
+ mes "Oh yeah, hahaha, we were told to meet someone called Varmunt.";
+ unittalk getcharid(3),"Oh yeah, hahaha, we were told to meet someone called Varmunt.";
+ next;
+ mes "[Varmunt]";
+ mes "We don't have time. We must tell Sir Heinrich about Himmelmez's invasion.";
+ npctalk "We don't have time. We must tell Sir Heinrich about Himmelmez's invasion.";
+ cutin "gl_barmund2",2;
+ next;
+ select("What Himmelmez...");
+ mes "["+strcharinfo(0)+"]";
+ mes "Himmelmez? Who the hell is she?";
+ unittalk getcharid(3),"Himmelmez? Who the hell is she?";
+ next;
+ mes "[Varmunt]";
+ mes "Didn't anybody give you the basic informations?";
+ npctalk "Didn't anybody give you the basic informations?";
+ cutin "gl_barmund3",2;
+ next;
+ mes "[Varmunt]";
+ mes "The Valkyrie of the dead. She's after the Ymir's Heart pieces hidden here.";
+ npctalk "The Valkyrie of the dead. She's after the Ymir's Heart pieces hidden here";
+ cutin "gl_barmund2",2;
+ next;
+ mes "[Varmunt]";
+ mes "She's capable of destroying the whole castle for this purpose.";
+ npctalk "She's capable of destroying the whole castle for this purpose.";
+ next;
+ mes "[Varmunt]";
+ mes "Hurry up! Inform Sir Heinrich that Himmelmez is coming. I will briefly explore the enchantments she made to this place!";
+ npctalk "Hurry up! Inform Sir Heinrich that Himmelmez is coming. I will briefly explore the enchantments she made to this place!";
+ close2;
+ cutin "gl_barmund2",255;
+ donpcevent instance_npcname("Varmunt#ghinstance1")+"::OnDisable2";
+ end;
+ } else {
+ mes "[Varmunt]";
+ mes "Where is he? We";
+ mes "need his help.";
+ cutin "gl_barmund2",2;
+ close2;
+ cutin "gl_barmund2",255;
+ end;
+ }
+OnInstanceInit:
+ donpcevent instance_npcname("Varmunt#ghinstance1")+"::OnEnable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Varmunt#ghinstance1");
+ end;
+OnDisable2:
+ hideonnpc instance_npcname("Varmunt#ghinstance1");
+
+ for(set .@i,1; .@i<=20; set .@i,.@i+4) {
+ hideoffnpc instance_npcname("Khalitzburg Crusader#"+.@i);
+ hideoffnpc instance_npcname("Khalitzburg Crusader#"+(.@i+1));
+ hideoffnpc instance_npcname("White Knight#"+(.@i+2));
+ hideoffnpc instance_npcname("White Knight#"+(.@i+3));
+ }
+ hideoffnpc instance_npcname("Khalitzburg Crusader#21");
+ hideoffnpc instance_npcname("Khalitzburg Crusader#22");
+
+ hideoffnpc instance_npcname("Heinrich#ghinstance1");
+ hideoffnpc instance_npcname("Varmunt#ghinstance2");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Varmunt#ghinstance1");
+ end;
+}
+
+1@gl_k,145,54,6 script Khalitzburg Crusader#1 655,{
+ mes "["+strnpcinfo(1)+"]";
+ switch((atoi(strnpcinfo(2)) + 1) / 2) {
+ case 1: mes "Would I be recruited?"; break;
+ case 2: mes "May I help you?"; break;
+ case 3: mes "..."; break;
+ case 4: mes "I do not like to chit-chat during work."; break;
+ case 5: mes "The aura of the castle has changed, don't you think? Something like a presence seemed to appear a little while ago."; break;
+ case 6: mes "I wonder what commandant Varmunt is doing. I heard people are running away..."; break;
+ case 7: mes "Quiet please."; break;
+ case 8: mes "A fuss seems to be near."; break;
+ case 9: mes "A dream last night really bothered me. My mother used to say that these dreams may come true..."; break;
+ case 10: mes "Is Varmunt going with you? The commandant is waiting for you."; break;
+ case 11: mes "Soon it's time to change shifts. I wonder what happened to the other knights."; break;
+ }
+ close;
+OnInstanceInit:
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname(strnpcinfo(0));
+ end;
+OnEnable:
+ hideoffnpc instance_npcname(strnpcinfo(0));
+ end;
+}
+1@gl_k,154,54,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#2 655
+1@gl_k,145,59,6 duplicate(Khalitzburg Crusader#1) White Knight#3 657
+1@gl_k,154,59,3 duplicate(Khalitzburg Crusader#1) White Knight#4 657
+1@gl_k,145,64,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#5 655
+1@gl_k,154,64,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#6 655
+1@gl_k,145,69,6 duplicate(Khalitzburg Crusader#1) White Knight#7 657
+1@gl_k,154,69,3 duplicate(Khalitzburg Crusader#1) White Knight#8 657
+1@gl_k,145,74,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#9 655
+1@gl_k,154,74,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#10 655
+1@gl_k,145,79,6 duplicate(Khalitzburg Crusader#1) White Knight#11 657
+1@gl_k,154,79,3 duplicate(Khalitzburg Crusader#1) White Knight#12 657
+1@gl_k,145,84,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#13 655
+1@gl_k,154,84,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#14 655
+1@gl_k,145,89,6 duplicate(Khalitzburg Crusader#1) White Knight#15 657
+1@gl_k,154,89,3 duplicate(Khalitzburg Crusader#1) White Knight#16 657
+1@gl_k,145,94,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#17 655
+1@gl_k,154,94,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#18 655
+1@gl_k,145,99,6 duplicate(Khalitzburg Crusader#1) White Knight#19 657
+1@gl_k,154,99,3 duplicate(Khalitzburg Crusader#1) White Knight#20 657
+1@gl_k,145,104,6 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#21 655
+1@gl_k,154,104,3 duplicate(Khalitzburg Crusader#1) Khalitzburg Crusader#22 655
+
+1@gl_k,149,100,6 script Heinrich#ghinstance1 652,{
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ cutin "gl_heinrich2",2;
+ select("Heinrich, about the castle...");
+ mes "["+strcharinfo(0)+"]";
+ mes "Do you know what is happening now in the castle, Heinrich?";
+ unittalk getcharid(3),"Do you know what is happening now in the castle, Heinrich?";
+ next;
+ mes "[Heinrich]";
+ mes "You are the adventurers who have come with Varmunt, right?";
+ npctalk "You are the adventurers who have come with Varmunt, right?";
+ next;
+ mes "[Heinrich]";
+ mes "What can I do for you? Is there something wrong?";
+ npctalk "What can I do for you? Is there something wrong?";
+ next;
+ select("The Ymir's Heart. Himmelmez...");
+ mes "["+strcharinfo(0)+"]";
+ mes "Himmelmez, the Valkyrie of the dead is looking to get a piece of the Ymir's heart hidden in the castle!";
+ unittalk getcharid(3),"Himmelmez, the Valkyrie of the dead is looking to get a piece of the Ymir's heart hidden in the castle!";
+ next;
+ mes "[Heinrich]";
+ mes "Haha. That's a nice joke. Now tell me what brings you here.";
+ npctalk "Haha. That's a nice joke. Now tell me what brings you here.";
+ cutin "gl_heinrich1",2;
+ next;
+ mes "[Varmunt]";
+ mes "I am not joking Heinrich, Sir. Now, if my judgement is correct, she will be here soon.";
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk1";
+ cutin "gl_barmund2",2;
+ next;
+ mes "[Varmunt]";
+ mes "I trust this guy following me. The Ymir's Heart pieces must be hidden in a safe place before Himmelmez takes them!";
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk2";
+ next;
+ select("Even if you do not believe...");
+ mes "["+strcharinfo(0)+"]";
+ mes "Even if you don't believe it, do something. We do not have much time!";
+ unittalk getcharid(3),"Even if you don't believe it, do something. We do not have much time!";
+ cutin "gl_barmund2",255;
+ next;
+ mes "[Heinrich]";
+ mes "I will be glad if you give me two minutes, please. But now the king isn't in his room.";
+ npctalk "I will be glad if you give me two minutes, please. But now the king isn't in his room.";
+ cutin "gl_heinrich1",2;
+ next;
+ mes "[Heinrich]";
+ mes "But I think that with such a busy agenda, he won't be able to take care of this.";
+ npctalk "But I think that with such a busy agenda, he won't be able to take care of this.";
+ donpcevent instance_npcname("Heinrich#ghinstance1")+"::OnDisable";
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnEnable";
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnEnable";
+ donpcevent instance_npcname("#talkinstance1")+"::OnEnable";
+ mapannounce instance_mapname("1@gl_k"), "???? Shout: Ohohohoho~!",bc_map,"0xFFFF00";
+ close2;
+ cutin "gl_heinrich1",255;
+ end;
+ } else {
+ mes "[Heinrich]";
+ mes "Where is your representative?";
+ mes "I need to talk to him.";
+ cutin "gl_heinrich2",2;
+ close2;
+ cutin "gl_heinrich2",255;
+ end;
+ }
+OnInstanceInit:
+ donpcevent instance_npcname("Heinrich#ghinstance1")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Heinrich#ghinstance1");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Heinrich#ghinstance1");
+ end;
+}
+
+1@gl_k,152,97,3 script Varmunt#ghinstance2 654,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Varmunt#ghinstance2");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Varmunt#ghinstance2");
+ end;
+OnTalk1:
+ npctalk "I am not joking Heinrich, Sir. Now, if my judgement is correct, she will be here soon.";
+ end;
+OnTalk2:
+ npctalk "I trust this guy following me. The Ymir's Heart pieces must be hidden in a safe place before Himmelmez takes them!";
+ end;
+OnTalk3:
+ npctalk "Himmelmez!! Through the cracks!";
+ end;
+OnTalk4:
+ npctalk "Unbelievable. My men are...This kind of thing is not possible!";
+ end;
+OnTalk5:
+ npctalk "Heinrich, Sir! I need a quick decision.";
+ end;
+OnTalk6:
+ npctalk "To prevent other attacks, go chase her!";
+ end;
+OnTalk7:
+ npctalk "Now, your help is desperately needed. I hopefully ask you.";
+ end;
+}
+
+1@gl_k,149,97,6 script Heinrich#ghinstance2 652,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Heinrich#ghinstance2");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Heinrich#ghinstance2");
+ end;
+OnTalk1:
+ npctalk "Who?!";
+ end;
+OnTalk2:
+ npctalk "That who rules the dead? No doubt, a pretty story. Here, some tea will be served to entertain the ladies. Unfortunately, I do not...";
+ end;
+OnTalk3:
+ npctalk "What did you say?";
+ end;
+OnTalk4:
+ npctalk "The King responded to the invitation of the Rune Midgard's Royal Family and hasn't come back yet.";
+ end;
+OnTalk5:
+ npctalk "Just leave before you get in trouble. This is the King's will!";
+ end;
+OnTalk6:
+ npctalk "Damn! She has detected the position of the Ymir's Heart pieces.";
+ end;
+OnTalk7:
+ npctalk "Now, Khalitzburg Crusaders and White Knights, follow me...";
+ end;
+OnTalk8:
+ npctalk "Unbelievable. My men are...This kind of thing is not possible!";
+ end;
+OnTalk9:
+ npctalk "I'm sorry...";
+ end;
+OnTalk10:
+ npctalk "I'm sorry, my lord! Do not forgive me!";
+ end;
+}
+
+1@gl_k,149,100,6 script Heinrich#ghinstance3 652,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Heinrich#ghinstance3");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Heinrich#ghinstance3");
+ end;
+OnTalk1:
+ npctalk "I cannot believe I killed my men with my own hands!";
+ end;
+OnTalk2:
+ npctalk "Varmunt is right about that. Now is not the time to regret.";
+ end;
+OnTalk3:
+ npctalk "People, gather around and follow my orders.";
+ end;
+OnTalk4:
+ npctalk "Himmelmez is turning into monsters all the people she put to sleep.";
+ end;
+OnTalk5:
+ npctalk "I don't know if there are survivors around here yet.";
+ end;
+OnTalk6:
+ npctalk "If there are survivors from this evil thing, please rescue them.";
+ end;
+OnTalk7:
+ npctalk "With Varmunt by my side, I'm going to chase Himmelmez down.";
+ end;
+OnTalk8:
+ npctalk "Hurry up Varmunt, let's chase her down.";
+ end;
+}
+
+1@gl_k,149,89,1 script Himmelmez#ghinstance1 650,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Himmelmez#ghinstance1");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Himmelmez#ghinstance1");
+ end;
+OnTalk1:
+ npctalk "This~ Did I interrupt your conversation? The thing is, it's been too long since the last guests saw some sadness spread...";
+ end;
+OnTalk2:
+ npctalk "My name is Lisa Kahn Himmelmez. I am called the Valkyrie of the dead, master of the Dullahan.";
+ end;
+OnTalk3:
+ npctalk "There's no need to pretend to be so laid back. Don't bluff about the whereabouts of you Majesty and things will be alright.";
+ end;
+OnTalk4:
+ npctalk "Hohoho, do you have any questions? You're a really mysterious man.";
+ end;
+OnTalk5:
+ npctalk "Not coveting the king's throne, you're such a stupid man, only waiting for his return. Your innocence is true, I love it.";
+ end;
+Ontalk6:
+ npctalk "You make me wish we hadn't met in this situation. Too bad we did.";
+ end;
+Ontalk7:
+ npctalk "Well~ Today, with such a busy commandant, I won't be able to talk as much as I'd love for you to contemplate my explanation~";
+ end;
+OnTalk8:
+ npctalk "I gotta get my job done. Meanwhile why don't you meet my men? Hohoho.";
+ end;
+}
+
+// Control Timer
+//============================================================
+1@gl_k,0,0,0 script #talkinstance1 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#talkinstance1")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#talkinstance1");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#talkinstance1");
+ initnpctimer;
+ end;
+OnTimer5000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk1";
+ end;
+OnTimer10000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk1";
+ end;
+OnTimer15000:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk3";
+ end;
+OnTimer20000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk2";
+ end;
+OnTimer25000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk2";
+ end;
+OnTimer30000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk3";
+ end;
+OnTimer35000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk3";
+ end;
+OnTimer45000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk4";
+ end;
+OnTimer50000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk5";
+ end;
+OnTimer55000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk6";
+ end;
+OnTimer60000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk4";
+ end;
+OnTimer65000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk5";
+ end;
+OnTimer70000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk7";
+ end;
+OnTimer75000:
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnTalk8";
+ end;
+OnTimer80000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk6";
+ donpcevent instance_npcname("Himmelmez#ghinstance1")+"::OnDisable";
+ end;
+OnTimer85000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk7";
+ hideonnpc instance_npcname("Varmunt#ghinstance1");
+
+ for(set .@i,1; .@i<=20; set .@i,.@i+4) {
+ hideonnpc instance_npcname("Khalitzburg Crusader#"+.@i);
+ hideonnpc instance_npcname("Khalitzburg Crusader#"+(.@i+1));
+ hideonnpc instance_npcname("White Knight#"+(.@i+2));
+ hideonnpc instance_npcname("White Knight#"+(.@i+3));
+ }
+ hideonnpc instance_npcname("Khalitzburg Crusader#21");
+ hideonnpc instance_npcname("Khalitzburg Crusader#22");
+
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#talkinstance1")+"::OnMyMobDead";
+ monster .@map$,145,59,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,154,59,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,145,69,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,154,69,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,145,79,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,154,79,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,145,89,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,154,89,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,145,99,"Abyss Knight",2470,1,.@label$;
+ monster .@map$,154,99,"Abyss Knight",2470,1,.@label$;
+
+ for(set .@i,1; .@i<=22; set .@i,.@i+1)
+ hideoffnpc instance_npcname(".#ghinstance"+.@i);
+
+ donpcevent instance_npcname(".#ghinstance22")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance21")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance18")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance17")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance14")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance13")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance10")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance9")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance6")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance5")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance2")+"::OnTalkK";
+ donpcevent instance_npcname(".#ghinstance1")+"::OnTalkK";
+ end;
+OnTimer88000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk8";
+
+ for(set .@i,1; .@i<=20; set .@i,.@i+4) {
+ hideonnpc instance_npcname(".#ghinstance"+.@i);
+ hideonnpc instance_npcname(".#ghinstance"+(.@i+1));
+ disablenpc instance_npcname(".#ghinstance"+(.@i+2));
+ disablenpc instance_npcname(".#ghinstance"+(.@i+3));
+ }
+ hideonnpc instance_npcname(".#ghinstance21");
+ hideonnpc instance_npcname(".#ghinstance22");
+
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#talkinstance1")+"::OnMyMobDead";
+ monster .@map$,145,54,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,154,54,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,145,64,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,154,64,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,145,74,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,154,74,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,145,84,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,154,84,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,145,94,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,154,94,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,145,104,"Khalitzburg",2471,1,.@label$;
+ monster .@map$,154,104,"Khalitzburg",2471,1,.@label$;
+ end;
+OnTimer93000:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk4";
+ end;
+OnTimer97000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk9";
+ end;
+OnTimer105000:
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnTalk10";
+ mapannounce instance_mapname("1@gl_k"), "Heinrich's Shout: Dead men, dead men all over the place!",bc_map,"0xFFFF00";
+ end;
+OnTimer107000:
+ mapannounce instance_mapname("1@gl_k"), "Heinrich's Shout: Everybody! Go back!",bc_map,"0xFFFF00";
+ end;
+OnTimer110000:
+ donpcevent instance_npcname(".#ghinstance22")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance21")+"::OnEffect1";
+ end;
+OnTimer110500:
+ enablenpc instance_npcname(".#ghinstance20");
+ enablenpc instance_npcname(".#ghinstance19");
+ donpcevent instance_npcname(".#ghinstance20")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance19")+"::OnEffect1";
+ end;
+OnTimer111000:
+ donpcevent instance_npcname(".#ghinstance18")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance17")+"::OnEffect1";
+ end;
+OnTimer111500:
+ enablenpc instance_npcname(".#ghinstance16");
+ enablenpc instance_npcname(".#ghinstance15");
+ donpcevent instance_npcname(".#ghinstance16")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance15")+"::OnEffect1";
+ end;
+OnTimer112000:
+ donpcevent instance_npcname(".#ghinstance14")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance13")+"::OnEffect1";
+ end;
+OnTimer112500:
+ enablenpc instance_npcname(".#ghinstance12");
+ enablenpc instance_npcname(".#ghinstance11");
+ donpcevent instance_npcname(".#ghinstance12")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance11")+"::OnEffect1";
+ end;
+OnTimer113000:
+ donpcevent instance_npcname(".#ghinstance10")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance9")+"::OnEffect1";
+ end;
+OnTimer113500:
+ enablenpc instance_npcname(".#ghinstance8");
+ enablenpc instance_npcname(".#ghinstance7");
+ donpcevent instance_npcname(".#ghinstance8")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance7")+"::OnEffect1";
+ end;
+OnTimer114000:
+ donpcevent instance_npcname(".#ghinstance6")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance5")+"::OnEffect1";
+ end;
+OnTimer114500:
+ enablenpc instance_npcname(".#ghinstance4");
+ enablenpc instance_npcname(".#ghinstance3");
+ donpcevent instance_npcname(".#ghinstance4")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance3")+"::OnEffect1";
+ end;
+OnTimer114750: //custom time
+ disablenpc instance_npcname(".#ghinstance3");
+ disablenpc instance_npcname(".#ghinstance4");
+ disablenpc instance_npcname(".#ghinstance7");
+ disablenpc instance_npcname(".#ghinstance8");
+ disablenpc instance_npcname(".#ghinstance11");
+ disablenpc instance_npcname(".#ghinstance12");
+ disablenpc instance_npcname(".#ghinstance15");
+ disablenpc instance_npcname(".#ghinstance16");
+ disablenpc instance_npcname(".#ghinstance19");
+ disablenpc instance_npcname(".#ghinstance20");
+ end;
+OnTimer115000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnEnable";
+ donpcevent instance_npcname("Heinrich#ghinstance2")+"::OnDisable";
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk1";
+ donpcevent instance_npcname(".#ghinstance2")+"::OnEffect1";
+ donpcevent instance_npcname(".#ghinstance1")+"::OnEffect1";
+ killmonster instance_mapname("1@gl_k"),instance_npcname("#talkinstance1")+"::OnMyMobDead";
+ end;
+OnTimer120000:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk5";
+ end;
+OnTimer125000:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk6";
+ end;
+OnTimer130000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk2";
+ end;
+OnTimer135000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk3";
+ end;
+OnTimer140000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk4";
+ end;
+OnTimer145000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk5";
+ end;
+OnTimer150000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk6";
+ end;
+OnTimer155000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk7";
+ end;
+OnTimer160000:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnTalk7";
+ end;
+OnTimer165000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnTalk8";
+ end;
+OnTimer167000:
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnDisable";
+ end;
+OnTimer168000:
+ donpcevent instance_npcname("Varmunt#ghinstance2")+"::OnDisable";
+ donpcevent instance_npcname("Heinrich#ghinstance3")+"::OnDisable";
+ stopnpctimer;
+ donpcevent instance_npcname("#ghinstancewarp1")+"::OnEnable";
+ donpcevent instance_npcname("#ghinstancewarp2")+"::OnEnable";
+ mapannounce instance_mapname("1@gl_k"), "9 o'clock warp leading to zone 2 is now open.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#talkinstance1")+"::OnDisable";
+ donpcevent instance_npcname("#ghmemorialmob01")+"::OnEnable";
+ end;
+OnMyMobDead:
+ end;
+}
+
+1@gl_k,145,54,6 script .#ghinstance1 2471,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname(strnpcinfo(0));
+ end;
+OnEnable:
+ hideoffnpc instance_npcname(strnpcinfo(0));
+ end;
+OnEffect1:
+ specialeffect EF_GRANDCROSS;
+ specialeffect EF_LEXAETERNA;
+ end;
+OnTalkK:
+ switch(atoi(replacestr(strnpcinfo(2),"ghinstance",""))) {
+ case 1: npctalk "I do not want to die."; break;
+ case 2: npctalk "Mom..."; break;
+ case 5: npctalk "Help."; break;
+ case 6: npctalk "My stomach hurts..."; break;
+ case 9: npctalk "Heinrich Sir, help!"; break;
+ case 10: npctalk "Ack... Ugh."; break;
+ case 13: npctalk "I'm thirsty."; break;
+ case 14: npctalk "Oh... No... I cannot die..."; break;
+ case 17: npctalk "This is so uncomfortable. Eww!"; break;
+ case 18: npctalk "Who am I..."; break;
+ case 21: npctalk "Uhh... My body."; break;
+ case 22: npctalk "I'm so thirsty!"; break;
+ }
+ end;
+}
+1@gl_k,154,54,3 duplicate(.#ghinstance1) .#ghinstance2 2471
+1@gl_k,145,64,6 duplicate(.#ghinstance1) .#ghinstance5 2471
+1@gl_k,154,64,3 duplicate(.#ghinstance1) .#ghinstance6 2471
+1@gl_k,145,74,6 duplicate(.#ghinstance1) .#ghinstance9 2471
+1@gl_k,154,74,3 duplicate(.#ghinstance1) .#ghinstance10 2471
+1@gl_k,145,84,6 duplicate(.#ghinstance1) .#ghinstance13 2471
+1@gl_k,154,84,3 duplicate(.#ghinstance1) .#ghinstance14 2471
+1@gl_k,145,94,6 duplicate(.#ghinstance1) .#ghinstance17 2471
+1@gl_k,154,94,3 duplicate(.#ghinstance1) .#ghinstance18 2471
+1@gl_k,145,104,6 duplicate(.#ghinstance1) .#ghinstance21 2471
+1@gl_k,154,104,3 duplicate(.#ghinstance1) .#ghinstance22 2471
+
+1@gl_k,145,59,6 script .#ghinstance3 111,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname(strnpcinfo(0));
+ end;
+OnEnable:
+ hideoffnpc instance_npcname(strnpcinfo(0));
+ end;
+OnEffect1:
+ specialeffect EF_GRANDCROSS;
+ specialeffect EF_LEXAETERNA;
+ end;
+}
+1@gl_k,154,59,3 duplicate(.#ghinstance3) .#ghinstance4 111
+1@gl_k,145,69,6 duplicate(.#ghinstance3) .#ghinstance7 111
+1@gl_k,154,69,3 duplicate(.#ghinstance3) .#ghinstance8 111
+1@gl_k,145,79,6 duplicate(.#ghinstance3) .#ghinstance11 111
+1@gl_k,154,79,3 duplicate(.#ghinstance3) .#ghinstance12 111
+1@gl_k,145,89,6 duplicate(.#ghinstance3) .#ghinstance15 111
+1@gl_k,154,89,3 duplicate(.#ghinstance3) .#ghinstance16 111
+1@gl_k,145,99,6 duplicate(.#ghinstance3) .#ghinstance19 111
+1@gl_k,154,99,3 duplicate(.#ghinstance3) .#ghinstance20 111
+
+1@gl_k,96,80,0 script #ghinstancewarp1 45,1,2,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnEnable:
+ enablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnTouch:
+ set .@map1$, instance_mapname("1@gl_k");
+ set .@map2$, instance_mapname("2@gl_k");
+ switch(atoi(replacestr(strnpcinfo(2),"ghinstancewarp",""))) {
+ case 1: warp .@map1$,80,80; break;
+ case 2: warp .@map1$,105,80; break;
+ case 3: warp .@map1$,215,79; break;
+ case 4: warp .@map1$,195,79; break;
+ case 5: warp .@map1$,215,216; break;
+ case 6: warp .@map1$,235,216; break;
+ case 7: warp .@map2$,150,46; break;
+ case 8: warp .@map2$,126,123; break;
+ case 9: warp .@map2$,150,116; break;
+ case 10: warp .@map2$,174,101; break;
+ case 11: warp .@map2$,150,110; break;
+ case 12: warp .@map2$,150,179; break;
+ }
+ end;
+}
+1@gl_k,90,80,0 duplicate(#ghinstancewarp1) #ghinstancewarp2 45,1,2
+1@gl_k,202,79,0 duplicate(#ghinstancewarp1) #ghinstancewarp3 45,1,2
+1@gl_k,206,79,0 duplicate(#ghinstancewarp1) #ghinstancewarp4 45,1,2
+1@gl_k,228,216,0 duplicate(#ghinstancewarp1) #ghinstancewarp5 45,1,2
+1@gl_k,222,216,0 duplicate(#ghinstancewarp1) #ghinstancewarp6 45,1,2
+1@gl_k,150,284,0 duplicate(#ghinstancewarp1) #ghinstancewarp7 45,1,2
+2@gl_k,145,123,0 duplicate(#ghinstancewarp1) #ghinstancewarp8 45,1,2
+2@gl_k,136,122,0 duplicate(#ghinstancewarp1) #ghinstancewarp9 45,1,2
+2@gl_k,154,101,0 duplicate(#ghinstancewarp1) #ghinstancewarp10 45,1,2
+2@gl_k,165,101,0 duplicate(#ghinstancewarp1) #ghinstancewarp11 45,1,2
+2@gl_k,150,163,0 duplicate(#ghinstancewarp1) #ghinstancewarp12 45,1,2
+
+
+// Sector 1 Mobs
+//============================================================
+1@gl_k,0,0,0 script #ghmemorialmob01 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob01")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob01");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob01");
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob01")+"::OnMyMobDead";
+ areamonster .@map$,76,99,87,10,"Suffering Chamberlain",2466,15,.@label$;
+ areamonster .@map$,67,39,12,6,"Fallen Monk",2465,20,.@label$;
+ areamonster .@map$,67,39,12,6,"Suffering Chamberlain",2466,3,.@label$;
+ areamonster .@map$,32,75,51,58,"Decayed Butler",2464,6,.@label$;
+ areamonster .@map$,45,84,6,137,"Decayed Butler",2464,12,.@label$;
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob01")+"::OnMyMobDead";
+ set .@mob_dead_num, 56 - mobcount(.@map$,.@label$);
+ if (.@mob_dead_num > 35) {
+ mapannounce .@map$, "Seems like Himmelmez drains the dead's souls. They must be destroyed.",bc_map,"0xFFFFFF";
+ killmonster .@map$,.@label$;
+ donpcevent instance_npcname("Aspiring Butcher#clearGH")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob01")+"::OnDisable";
+ }
+ end;
+}
+
+1@gl_k,17,51,3 script Aspiring Butcher#clearGH 706,{
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ mes "[Aspiring Butcher]";
+ mes "Help me! Help me!!!";
+ next;
+ select("Hey, wake up! Are there any other survivors?");
+ mes "["+strcharinfo(0)+"]";
+ mes "Hey, wake up! Are you alone?";
+ unittalk getcharid(3),"Hey, wake up! Are you alone?";
+ next;
+ mes "[Aspiring Butcher]";
+ mes "The Chamberlain... the Monk... They've become monsters. I couldn't do anything.";
+ npctalk "The Chamberlain... the Monk... They've become monsters. I couldn't do anything.";
+ next;
+ mes "[Aspiring Butcher]";
+ mes "I just stood still... Nothing, I couldn't do anything...";
+ npctalk "I just stood still... Nothing, I couldn't do anything...";
+ next;
+ select("Wake up!");
+ mes "["+strcharinfo(0)+"]";
+ mes "Wake up kid! Go east along the central passage to the outside! The path is safe!";
+ unittalk getcharid(3),"Wake up kid! Go east along the central passage to the outside! The path is safe!";
+ next;
+ mes "[Aspiring Butcher]";
+ mes "East passage? Alone? How?";
+ npctalk "East passage? Alone? How?";
+ next;
+ select("I can guide you through the path.");
+ mes "["+strcharinfo(0)+"]";
+ mes "I will guide you, perhaps that will help. If you want to close your eyes try not to hit anything.";
+ unittalk getcharid(3),"I will guide you, perhaps that will help. If you want to close your eyes try not to hit anything.";
+ next;
+ mes "[Aspiring Butcher]";
+ mes "Aspiring Butcher: I know, I... I'm trying to.";
+ npctalk "Aspiring Butcher: I know, I... I'm trying to.";
+ donpcevent instance_npcname("Aspiring Butcher#clearGH")+"::OnDisable";
+ donpcevent instance_npcname("#ghmemorialmob02")+"::OnEnable";
+ close;
+ } else {
+ mes "[Aspiring Butcher]";
+ mes "Somebody help me, somebody help me, please.";
+ close;
+ }
+OnInstanceInit:
+ donpcevent instance_npcname("Aspiring Butcher#clearGH")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Aspiring Butcher#clearGH");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Aspiring Butcher#clearGH");
+ end;
+}
+
+// Sector 2 Mobs
+//============================================================
+1@gl_k,291,145,3 script Hollgrehenn Destroyer 726,{
+ if (getcharid(0) == getpartyleader(getcharid(1),2)) {
+ mes "[Hollgrehenn Destroyer]";
+ mes "Yaaa!! Die!!!";
+ npctalk "Yaaa!! Die!!!";
+ specialeffect EF_CRASHEARTH;
+ next;
+ select("Don't worry!");
+ mes "["+strcharinfo(0)+"]";
+ mes "Don't worry! Mam. Are you alone? No other survivors?";
+ unittalk getcharid(3),"Don't worry! Mam. Are you alone? No other survivors?";
+ next;
+ mes "[Hollgrehenn Destroyer]";
+ mes "I'm the only survivor left";
+ npctalk "I'm the only survivor left";
+ next;
+ select("This is a very dangerous place.");
+ mes "["+strcharinfo(0)+"]";
+ mes "This is a very dangerous place. You know the central passage? Do you think you can move... and get to a safer place?";
+ unittalk getcharid(3),"This is a very dangerous place. You know the central passage? Do you think you can move... and get to a safer place?";
+ next;
+ mes "[Hollgrehenn Destroyer]";
+ mes "Yes, I am able to move. I'll move for my baby's sake.";
+ npctalk "Yes, I am able to move. I'll move for my baby's sake.";
+ next;
+ select("Survive the road...");
+ mes "["+strcharinfo(0)+"]";
+ mes "You and your baby will get out of here safely. But I'm sorry I can't help you more.";
+ unittalk getcharid(3),"You and your baby will get out of here safely. But I'm sorry I can't help you more.";
+ next;
+ mes "[Hollgrehenn Destroyer]";
+ mes "That's ok. Thank you for helping us. I'm good to go alone. Ah and good luck also.";
+ npctalk "That's ok. Thank you for helping us. I'm good to go alone. Ah and good luck also.";
+ donpcevent instance_npcname("Hollgrehenn Destroyer")+"::OnDisable";
+ donpcevent instance_npcname("#ghmemorialmob03")+"::OnEnable";
+ close;
+ } else {
+ mes "[Hollgrehenn Destroyer]";
+ mes "Somebody help me, somebody help me, please";
+ close;
+ }
+OnInstanceInit:
+ donpcevent instance_npcname("Hollgrehenn Destroyer")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Hollgrehenn Destroyer");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Hollgrehenn Destroyer");
+ end;
+}
+
+1@gl_k,0,0,0 script #ghmemorialmob02 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob02")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob02");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob02");
+ donpcevent instance_npcname("#ghinstancewarp3")+"::OnEnable";
+ donpcevent instance_npcname("#ghinstancewarp4")+"::OnEnable";
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob02")+"::OnMyMobDead";
+ mapannounce .@map$,"3 o'clock warp leading to zone 3 is now open.",bc_map,"0xFFFF00";
+ areamonster .@map$,241,113,291,19,"Suffering Chamberlain",2466,12,.@label$;
+ areamonster .@map$,241,113,291,19,"Decayed Monk",2464,12,.@label$;
+ areamonster .@map$,227,217,291,135,"Suffering Chamberlain",2466,12,.@label$;
+ areamonster .@map$,227,217,291,135,"Decayed Monk",2464,12,.@label$;
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob02")+"::OnMyMobDead";
+ set .@mob_dead_num, 48 - mobcount(.@map$,.@label$);
+ if (.@mob_dead_num > 28) {
+ mapannounce .@map$, "Seems like Himmelmez drains the dead's souls. They must be destroyed.",bc_map,"0xFFFFFF";
+ killmonster .@map$,.@label$;
+ donpcevent instance_npcname("Hollgrehenn Destroyer")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob02")+"::OnDisable";
+ }
+ end;
+}
+
+// Tramp Mobs
+//============================================================
+1@gl_k,221,82,3 script Breathless Man#GHtramp1 849,4,4,{
+ end;
+OnTouch:
+ set .@i, rand(1,10);
+ if (.@i == 1) set .@mobs,3;
+ else if (.@i == 2) set .@mobs,4;
+ else if (.@i == 3) set .@mobs,5;
+ else if (.@i < 7) set .@mobs,6;
+ else set .@mobs,7;
+ getmapxy(.@map$,.@x,.@y,1);
+ specialeffect EF_VENOMDUST;
+ monster .@map$,.@x,.@y,"Muck Worm",2467,.@mobs,instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnMyMobDead:
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname(strnpcinfo(0))+"::OnEnable";
+ end;
+OnEnable:
+ enablenpc instance_npcname(strnpcinfo(0));
+ end;
+OnDisable:
+ disablenpc instance_npcname(strnpcinfo(0));
+ end;
+}
+1@gl_k,213,63,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp2 849,4,4
+1@gl_k,230,50,2 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp3 849,4,4
+1@gl_k,222,39,2 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp4 849,4,4
+1@gl_k,214,27,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp5 849,4,4
+1@gl_k,223,17,2 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp6 849,4,4
+1@gl_k,235,16,4 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp7 849,4,4
+1@gl_k,251,20,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp8 849,4,4
+1@gl_k,240,43,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp9 849,4,4
+1@gl_k,271,19,1 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp10 849,4,4
+1@gl_k,246,62,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp11 849,4,4
+1@gl_k,282,48,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp12 849,4,4
+1@gl_k,285,81,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp13 849,4,4
+1@gl_k,241,86,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp14 849,4,4
+1@gl_k,249,101,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp15 849,4,4
+1@gl_k,276,106,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp16 849,4,4
+1@gl_k,252,120,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp17 849,4,4
+1@gl_k,258,150,1 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp18 849,4,4
+1@gl_k,255,157,6 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp19 849,4,4
+1@gl_k,261,164,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp20 849,4,4
+1@gl_k,269,173,7 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp21 849,4,4
+1@gl_k,280,167,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp22 849,4,4
+1@gl_k,293,161,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp23 849,4,4
+1@gl_k,226,96,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp24 849,4,4
+1@gl_k,222,119,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp25 849,4,4
+1@gl_k,233,123,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp26 849,4,4
+2@gl_k,147,203,5 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp27 849,4,4
+2@gl_k,141,222,1 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp28 849,4,4
+2@gl_k,167,225,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp29 849,4,4
+2@gl_k,145,236,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp30 849,4,4
+2@gl_k,143,260,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp31 849,4,4
+2@gl_k,173,258,3 duplicate(Breathless Man#GHtramp1) Breathless Man#GHtramp32 849,4,4
+
+// Sector 3 Mobs
+//============================================================
+1@gl_k,0,0,0 script #ghmemorialmob03 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob03")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob03");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob03");
+ donpcevent instance_npcname("#ghinstancewarp5")+"::OnEnable";
+ donpcevent instance_npcname("#ghinstancewarp6")+"::OnEnable";
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob03")+"::OnMyMobDead";
+ mapannounce .@map$,"12 o'clock warp leading to the zone 4 was opened.",bc_map,"0xFFFF00";
+ areamonster .@map$,17,259,53,180,"Decayed Guard",2468,11,.@label$;
+ areamonster .@map$,17,259,53,180,"Sharpshooter Ranger",2469,14,.@label$;
+ areamonster .@map$,62,281,73,186,"Decayed Guard",2468,11,.@label$;
+ areamonster .@map$,62,281,73,186,"Sharpshooter Ranger",2469,14,.@label$;
+ areamonster .@map$,74,251,109,224,"Decayed Guard",2468,11,.@label$;
+ areamonster .@map$,74,251,109,224,"Sharpshooter Ranger",2469,14,.@label$;
+ areamonster .@map$,108,281,231,234,"Decayed Guard",2468,11,.@label$;
+ areamonster .@map$,108,281,231,234,"Sharpshooter Ranger",2469,14,.@label$;
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob03")+"::OnMyMobDead";
+ set .@mob_dead_num, 100 - mobcount(.@map$,.@label$);
+ if (.@mob_dead_num > 85) {
+ mapannounce .@map$,"Himmelmez: Nice parry. I thought you were going to die slowly surrounded by the dead I summoned~",bc_map,"0xFFFFFF";
+ killmonster .@map$,.@label$;
+ donpcevent instance_npcname("#GHMclear3")+"::OnEnable";
+ donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnEnable";
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnEnable";
+ donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob03")+"::OnDisable";
+ }
+ end;
+}
+
+// 1st MVP
+//============================================================
+1@gl_k,0,0,0 script #ghmemorialmob04 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob04")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob04");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob04");
+ monster instance_mapname("1@gl_k"),150,258,"Root of Corruption",2475,1,instance_npcname("#ghmemorialmob04")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("1@gl_k");
+ if (mobcount(.@map$,instance_npcname("#ghmemorialmob04")+"::OnMyMobDead") < 1) {
+ mapannounce .@map$, "12 o'clock warp leading to the Chivalry's Second Floor is now open.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#ghinstancewarp7")+"::OnEnable";
+ donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnTalk2";
+ donpcevent instance_npcname("#effectGH01")+"::OnEnable";
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnEnable";
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob04")+"::OnDisable";
+ }
+ end;
+}
+
+1@gl_k,150,257,3 script #GHMclear3 111,9,9,{
+ end;
+OnTouch:
+ donpcevent instance_npcname("#controlGH3")+"::OnEnable";
+ specialeffect EF_BASH;
+ donpcevent instance_npcname("#GHMclear3")+"::OnDisable";
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("#GHMclear3")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#GHMclear3");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#GHMclear3");
+ initnpctimer;
+ end;
+OnTimer2000:
+ mapannounce instance_mapname("1@gl_k"), "Himmelmez: You got me tempted to go to the 2nd floor, come to the entrance. I'm curious about how far your luck goes.",bc_map,"0xFFFFFF";
+ stopnpctimer;
+ end;
+}
+
+1@gl_k,0,0,0 script #controlGH3 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#controlGH3")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#controlGH3");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#controlGH3");
+ initnpctimer;
+ end;
+OnTimer3000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk1";
+ end;
+OnTimer6000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk2";
+ end;
+OnTimer9000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk3";
+ end;
+OnTimer12000:
+ donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnTalk1";
+ end;
+OnTimer15000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk4";
+ end;
+OnTimer18000:
+ donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnTalk1";
+ end;
+OnTimer21000:
+ donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnTalk2";
+ end;
+OnTimer24000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk5";
+ end;
+OnTimer27000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnTalk6";
+ end;
+OnTimer28000:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnDisable";
+ end;
+OnTimer31000:
+ donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnTalk3";
+ end;
+OnTimer32000:
+ donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnDisable";
+ end;
+OnTimer35000:
+ mapannounce instance_mapname("1@gl_k"), "An eerie echo from the depths can be heard as you get closer.",bc_map,"0xFFFFFF";
+ end;
+OnTimer38000:
+ donpcevent instance_npcname("#ghmemorialmob04")+"::OnEnable";
+ stopnpctimer;
+ donpcevent instance_npcname("#controlGH3")+"::OnDisable";
+ end;
+}
+
+1@gl_k,144,258,6 script Heinrich#ghinstance4 652,{
+ mes "[Heinrich]";
+ mes "Himmelmez... You made my men get killed and I will never forget that.";
+ cutin "gl_heinrich1",2;
+ close2;
+ cutin "gl_heinrich1",255;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Heinrich#ghinstance4")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Heinrich#ghinstance4");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Heinrich#ghinstance4");
+ end;
+OnTalk1:
+ npctalk "Himmelmez! I won't let you take even a single more step here.";
+ end;
+OnTalk2:
+ npctalk "What... is this?!";
+ end;
+OnTalk3:
+ npctalk "Varmunt Sir! Help the adventurers and I'll chase Himmelmez!";
+ end;
+}
+
+1@gl_k,150,257,3 script Himmelmez#ghinstance2 650,{
+ mes "[Himmelmez]";
+ mes "No need to stare at me with so insecure eyes. Soon they'll become relaxed...";
+ cutin "gl_himel2",2;
+ close2;
+ cutin "gl_himel2",255;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Himmelmez#ghinstance2")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Himmelmez#ghinstance2");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Himmelmez#ghinstance2");
+ end;
+OnTalk1:
+ npctalk "What an awfully lucky, I flew all the way over here and just one of them is really powerful.";
+ end;
+OnTalk2:
+ npctalk "But it doesn't matter to me.";
+ end;
+OnTalk3:
+ npctalk "Now, all of you will die.";
+ end;
+OnTalk4:
+ npctalk "Hahaha, so you guys thought I would come alone?";
+ end;
+OnTalk5:
+ npctalk "This is my new toy to keep you at my feet. Why don't you guys play while I entertain?";
+ end;
+OnTalk6:
+ npctalk "Sincerely~, If I am given the opportunity I'd like to meet you again, Heinrich.";
+ end;
+}
+
+1@gl_k,156,259,3 script Varmunt#ghinstance3 654,{
+ if (checkquest(12318,HUNTING) == 2) {
+ if (checkquest(12319,HUNTING) == -1) {
+ mes "[Varmunt]";
+ mes "There's something unusual about this thing's aura. Maybe someday we will be able to understand what is behind all of this.";
+ cutin "gl_barmund1",2;
+ getitem 6608,1; //Coagulated Spell
+ setquest 12319;
+ close2;
+ cutin "gl_barmund1",255;
+ end;
+ }
+ }
+ mes "[Varmunt]";
+ mes "Even after all this time, it is impossible to prevent from the will of the Transcendent.";
+ cutin "gl_barmund1",2;
+ close2;
+ cutin "gl_barmund2",255;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Varmunt#ghinstance3")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Varmunt#ghinstance3");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Varmunt#ghinstance3");
+ end;
+OnTalk1:
+ npctalk "Heinrich Sir! Something unknown holds an inexplicably powerful force!";
+ end;
+OnTalk2:
+ npctalk "From the monster I picked up some great stuff. People who are interested, talk to me.";
+ end;
+}
+
+// Floor 2
+//============================================================
+2@gl_k,148,67,1 script Heinrich#ghinstance5 652,{
+ mes "[Heinrich]";
+ mes "Himmelmez's blocking spells";
+ mes "are everywhere around here...";
+ cutin "gl_heinrich1",2;
+ close2;
+ cutin "gl_heinrich1",255;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Heinrich#ghinstance5");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Heinrich#ghinstance5");
+ end;
+OnTalk1:
+ npctalk "These things have never been in the castle!";
+ end;
+OnTalk2:
+ npctalk "Trying to break this power with common weapons doesn't work. I tried it.";
+ end;
+OnTalk3:
+ npctalk "It is really unforgivable.";
+ end;
+OnTalk4:
+ npctalk "I, who already was a subordinate of genocide. How much more in the future...";
+ end;
+OnTalk5:
+ npctalk "...";
+ end;
+}
+
+2@gl_k,151,71,7 script Varmunt#ghinstance4 654,{
+ mes "[Varmunt]";
+ mes "Why am I doing this again? Doesn't seem like the first time. I've seen this place repeatedly dozens of times in my dreams. This feeling...";
+ cutin "gl_barmund1",2;
+ close2;
+ cutin "gl_barmund1",255;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Varmunt#ghinstance4");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Varmunt#ghinstance4");
+ end;
+OnTalk2:
+ npctalk "Himmelmez's enchantment has completely blocked the passage to each section.";
+ end;
+OnTalk3:
+ npctalk "Get out of the way for a moment. I'll try to somehow break the spell with magical powers.";
+ end;
+OnTalk4:
+ npctalk "The enchantment seems to be broken.";
+ end;
+OnTalk5:
+ npctalk "I've never seen this spell before.";
+ end;
+OnTalk6:
+ npctalk "Himmelmez doesn't use a seal on a person's body to turn it into an undead.";
+ end;
+OnTalk7:
+ npctalk "She uses enchantment stones.This way, the spell is probably maintained.";
+ end;
+OnTalk8:
+ npctalk "We should kill the people who have the enchantment stones to break the spell.";
+ end;
+OnTalk9:
+ npctalk "However, we can't identify them. The purification can only be done randomly.";
+ end;
+OnTalk10:
+ npctalk "Commandant...";
+ end;
+OnTalk11:
+ npctalk "Commandant, it seems too loose.";
+ end;
+OnTalk12:
+ npctalk "We are related to all these people, not just a few.";
+ end;
+OnTalk13:
+ npctalk "We can't deny that it's not their fault for what is going on.";
+ end;
+OnTalk14:
+ npctalk "Well, let's do it then.";
+ end;
+OnTalk15:
+ npctalk "You guys are of a great help. Try to follow us.";
+ end;
+OnTalk16:
+ npctalk "There can be a tough fight. Hold on, and it would be nice to eat something.";
+ end;
+OnTalk17:
+ npctalk "Guys. It is time to depart, Heinrich Sir.";
+ end;
+}
+
+2@gl_k,150,67,0 script #effectGH01 111,10,10,{
+ end;
+OnTouch:
+ specialeffect EF_BASH;
+ donpcevent instance_npcname("#controlGH4")+"::OnEnable";
+ donpcevent instance_npcname("#effectGH01")+"::OnDisable";
+ end;
+OnEffect:
+ specialeffect EF_LORD;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("#effectGH01")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#effectGH01");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#effectGH01");
+ end;
+}
+
+2@gl_k,0,0,0 script #controlGH4 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#controlGH4")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#controlGH4");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#controlGH4");
+ initnpctimer;
+ end;
+OnTimer3000:
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk1";
+ donpcevent instance_npcname("#ghmemorialmob05")+"::OnEnable";
+ end;
+OnTimer6000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk2";
+ end;
+OnTimer9000:
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk2";
+ end;
+OnTimer12000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk3";
+ end;
+OnTimer15000:
+ donpcevent instance_npcname("#effectGH01")+"::OnEnable";
+ donpcevent instance_npcname("#effectGH01")+"::OnEffect";
+ end;
+OnTimer18000:
+ donpcevent instance_npcname("#effectGH01")+"::OnDisable";
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk4";
+ end;
+OnTimer21000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk5";
+ end;
+OnTimer24000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk6";
+ end;
+OnTimer27000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk7";
+ end;
+OnTimer30000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk8";
+ end;
+OnTimer33000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk9";
+ end;
+OnTimer36000:
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk3";
+ end;
+OnTimer39000:
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk4";
+ end;
+OnTimer42000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk10";
+ end;
+OnTimer45000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk11";
+ end;
+OnTimer48000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk12";
+ end;
+OnTimer51000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk13";
+ end;
+OnTimer54000:
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnTalk5";
+ end;
+OnTimer57000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk14";
+ end;
+OnTimer60000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk15";
+ end;
+OnTimer63000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk16";
+ end;
+OnTimer66000:
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnTalk17";
+ end;
+OnTimer69000:
+ mapannounce instance_mapname("2@gl_k"), "9 o'clock positioned warp leading to the 1st zone has been opened. Move from the central hallway. A being with an evil aura seems to be appearing in this region.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#ghinstancewarp8")+"::OnEnable";
+ donpcevent instance_npcname("#ghinstancewarp9")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob06")+"::OnEnable";
+ donpcevent instance_npcname("Varmunt#ghinstance4")+"::OnDisable";
+ donpcevent instance_npcname("Heinrich#ghinstance5")+"::OnDisable";
+ end;
+OnTimer70000:
+ stopnpctimer;
+ donpcevent instance_npcname("#controlGH4")+"::OnDisable";
+ end;
+}
+
+2@gl_k,0,0,0 script #ghmemorialmob05 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob05")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob05");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob05");
+ set .@map$, instance_mapname("2@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob05")+"::OnMyMobDead";
+ areamonster .@map$,124,20,31,162,"Decayed Guard",2468,8,.@label$;
+ areamonster .@map$,124,20,31,162,"Sharpshooter Ranger",2469,8,.@label$;
+ areamonster .@map$,124,20,31,162,"Fallen Abyss Knight",2470,8,.@label$;
+ areamonster .@map$,124,20,31,162,"Suffering Khalitzburg",2471,8,.@label$;
+ areamonster .@map$,124,20,31,162,"Swollen Knight",2472,8,.@label$;
+ set .MyMobs,80;
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("2@gl_k");
+ set .MyMobs, .MyMobs-1;
+ if (.MyMobs == 0) {
+ mapannounce .@map$, "A being with an evil aura seems to be appearing in this region.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#ghmemorialmob06")+"::OnDisable2";
+ donpcevent instance_npcname("#ghmemorialmob07")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob05")+"::OnDisable";
+ } else {
+ set .@label$, instance_npcname("#ghmemorialmob05")+"::OnMyMobDead";
+ switch(rand(5)) {
+ case 0:
+ areamonster .@map$,124,20,31,162,"Decayed Guard",2468,1,.@label$;
+ break;
+ case 1:
+ areamonster .@map$,124,20,31,162,"Sharpshooter Ranger",2469,1,.@label$;
+ break;
+ case 2:
+ areamonster .@map$,124,20,31,162,"Fallen Abyss Knight",2470,1,.@label$;
+ break;
+ case 3:
+ areamonster .@map$,124,20,31,162,"Suffering Khalitzburg",2471,1,.@label$;
+ break;
+ case 4:
+ areamonster .@map$,124,20,31,162,"Swollen Knight",2472,1,.@label$;
+ break;
+ }
+ }
+ end;
+}
+
+2@gl_k,0,0,0 script #ghmemorialmob06 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob06")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob06");
+ end;
+OnDisable2:
+ stopnpctimer;
+ disablenpc instance_npcname("#ghmemorialmob06");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob06");
+ donpcevent instance_npcname("#ghmemorialmob06")+"::OnSpawn";
+ end;
+OnSpawn:
+ initnpctimer;
+ end;
+OnTimer90000:
+ set .@map$, instance_mapname("2@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob05")+"::OnMyMobDead";
+ setarray .@c[0],
+ 114,141,118,139,
+ 128,83,131,78,
+ 88,53,93,48,
+ 54,47,61,40,
+ 58,83,63,78,
+ 69,138,80,127,
+ 34,143,39,138;
+ for(set .@i,0; .@i<getarraysize(.@c); set .@i,.@i+4) {
+ areamonster .@map$,.@c[.@i],.@c[.@i+1],.@c[.@i+2],.@c[.@i+3],"Decayed Guard",2468,1,.@label$;
+ areamonster .@map$,.@c[.@i],.@c[.@i+1],.@c[.@i+2],.@c[.@i+3],"Sharpshooter Ranger",2469,1,.@label$;
+ areamonster .@map$,.@c[.@i],.@c[.@i+1],.@c[.@i+2],.@c[.@i+3],"Fallen Abyss Knight",2470,1,.@label$;
+ areamonster .@map$,.@c[.@i],.@c[.@i+1],.@c[.@i+2],.@c[.@i+3],"Suffering Khalitzburg",2471,1,.@label$;
+ areamonster .@map$,.@c[.@i],.@c[.@i+1],.@c[.@i+2],.@c[.@i+3],"Swollen Knight",2472,1,.@label$;
+ }
+ end;
+OnTimer92000:
+ stopnpctimer;
+ donpcevent instance_npcname("#ghmemorialmob06")+"::OnSpawn";
+ end;
+}
+
+2@gl_k,0,0,0 script #ghmemorialmob07 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob07")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob07");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob07");
+ areamonster instance_mapname("2@gl_k"),124,20,31,162,"The Destruction of the First Captain",2473,1,instance_npcname("#ghmemorialmob07")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("2@gl_k");
+ if (mobcount(.@map$,instance_npcname("#ghmemorialmob07")+"::OnMyMobDead") < 1) {
+ mapannounce .@map$, "3 o'clock positioned warp leading to the 2nd zone has been opened. Use the central hallway to get there.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#ghinstancewarp10")+"::OnEnable";
+ donpcevent instance_npcname("#ghinstancewarp11")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob08")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob07")+"::OnDisable";
+ }
+ end;
+}
+
+2@gl_k,0,0,0 script #ghmemorialmob08 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob08")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob08");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob08");
+ set .@map$, instance_mapname("2@gl_k");
+ set .@label$, instance_npcname("#ghmemorialmob08")+"::OnMyMobDead";
+ areamonster .@map$,175,163,265,18,"Decayed Guard",2468,7,.@label$;
+ areamonster .@map$,175,163,265,18,"Sharpshooter Ranger",2469,7,.@label$;
+ areamonster .@map$,175,163,265,18,"Fallen Abyss Knight",2470,7,.@label$;
+ areamonster .@map$,175,163,265,18,"Suffering Khalitzburg",2471,7,.@label$;
+ areamonster .@map$,175,163,265,18,"Swollen Knight",2472,7,.@label$;
+ set .MyMobs,35;
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("2@gl_k");
+ set .MyMobs, .MyMobs-1;
+ if (.MyMobs == 0) {
+ mapannounce .@map$, "A being with an evil aura seems to be appearing in this region.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#ghmemorialmob09")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob08")+"::OnDisable";
+ } else {
+ set .@label$, instance_npcname("#ghmemorialmob08")+"::OnMyMobDead";
+ switch(rand(5)) {
+ case 0:
+ areamonster .@map$,175,163,265,18,"Decayed Guard",2468,1,.@label$;
+ break;
+ case 1:
+ areamonster .@map$,175,163,265,18,"Sharpshooter Ranger",2469,1,.@label$;
+ break;
+ case 2:
+ areamonster .@map$,175,163,265,18,"Fallen Abyss Knight",2470,1,.@label$;
+ break;
+ case 3:
+ areamonster .@map$,175,163,265,18,"Suffering Khalitzburg",2471,1,.@label$;
+ break;
+ case 4:
+ areamonster .@map$,175,163,265,18,"Swollen Knight",2472,1,.@label$;
+ break;
+ }
+ }
+ end;
+}
+
+2@gl_k,0,0,0 script #ghmemorialmob09 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob09")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob09");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob09");
+ areamonster instance_mapname("2@gl_k"),175,163,265,18,"The Destruction of the Second Captain",2474,1,instance_npcname("#ghmemorialmob09")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ set .@map$, instance_mapname("2@gl_k");
+ if (mobcount(.@map$,instance_npcname("#ghmemorialmob09")+"::OnMyMobDead") < 1) {
+ mapannounce .@map$, "12 o'clock positioned warp leading to the 3rd zone has been opened. Use the central hallway to get there.",bc_map,"0xFFFF00";
+ donpcevent instance_npcname("#ghinstancewarp12")+"::OnEnable";
+ donpcevent instance_npcname("#controlGH6")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob08")+"::OnDisable";
+ donpcevent instance_npcname("#ghmemorialmob09")+"::OnDisable";
+ }
+ end;
+}
+
+2@gl_k,0,0,0 script #ghmemorialmob10 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#ghmemorialmob10")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#ghmemorialmob10");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#ghmemorialmob10");
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnDisable";
+ monster instance_mapname("2@gl_k"),158,255,"Amdarias",2476,1,instance_npcname("#ghmemorialmob10")+"::OnMyMobDead";
+ end;
+OnMyMobDead:
+ if (mobcount(instance_mapname("2@gl_k"),instance_npcname("#ghmemorialmob10")+"::OnMyMobDead") < 1) {
+ donpcevent instance_npcname("Hugin#ghinstance1")+"::OnEnable";
+ donpcevent instance_npcname("#ghmemorialmob10")+"::OnDisable";
+ }
+ end;
+}
+
+2@gl_k,155,250,7 script Heinrich#ghinstance6 652,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Heinrich#ghinstance6");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Heinrich#ghinstance6");
+ end;
+OnTalk1:
+ npctalk "Gerhard!";
+ end;
+OnTalk2:
+ npctalk "What are you doing to my men, Himmelmez?!";
+ end;
+OnTalk3:
+ npctalk "Himmelmez! You don't need to make any more sacrifices!";
+ end;
+OnTalk4:
+ npctalk "Let him go! I don't want one more sacrifice!";
+ end;
+OnTalk5:
+ npctalk "I will not forgive you.";
+ end;
+OnTalk6:
+ npctalk "Just leave us alone, Himmelmez!!";
+ end;
+}
+
+2@gl_k,162,250,1 script Varmunt#ghinstance5 654,{
+ mes "[Varmunt]";
+ mes "We can't escape this";
+ mes "eternal confinement...";
+ cutin "gl_barmund2",2;
+ close2;
+ cutin "gl_barmund2",255;
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Varmunt#ghinstance5")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Varmunt#ghinstance5");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Varmunt#ghinstance5");
+ end;
+OnTalk1:
+ npctalk "What? This cannot be. We must prevent Amdarias's attacks!";
+ end;
+}
+
+2@gl_k,158,252,3 script Himmelmez#ghinstance4 650,4,4,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Himmelmez#ghinstance4");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Himmelmez#ghinstance4");
+ end;
+OnTalk1:
+ npctalk "Great~ I thought you wouldn't come near the end...";
+ end;
+OnTalk2:
+ npctalk "Huhu, I have already found a piece of Ymir's Heart, Heinrich.";
+ end;
+OnTalk3:
+ npctalk "It would've been faster if there were no distractions.";
+ end;
+OnTalk4:
+ npctalk "What do you think? Making it look like an accidental disease infected the king and the people around...";
+ end;
+OnTalk5:
+ npctalk "You want that?";
+ end;
+OnTalk6:
+ npctalk "This one is your final blow, Heinrich.";
+ end;
+OnTalk7:
+ npctalk "It is said that stopping me requires a skillfull person.";
+ end;
+OnTalk8:
+ npctalk "Seems like a perfect scenario to make my new monster, Amdarias.";
+ end;
+OnTalk9:
+ npctalk "Booh~ I'm scared.";
+ end;
+OnTalk10:
+ npctalk "Anyway, it was nice talking to you. Maybe we'll have the chance to meet again in the next story.";
+ end;
+OnTalk11:
+ npctalk "Well, make sure you will come back again.";
+ end;
+}
+
+2@gl_k,150,179,0 script #controlGH6 111,2,2,{
+ end;
+OnTouch:
+ mapannounce instance_mapname("2@gl_k"), "???: Do not come! There are traps everywhere here... Aaaaack!!!!",bc_map,"0xFF0000";
+ specialeffect EF_BASH;
+ donpcevent instance_npcname("Himmelmez#ghinstance3")+"::OnEnable";
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnEnable";
+ donpcevent instance_npcname("Varmunt#ghinstance5")+"::OnEnable";
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEnable";
+ donpcevent instance_npcname("#controlGH6")+"::OnDisable";
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("#controlGH6")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("#controlGH6");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("#controlGH6");
+ end;
+}
+
+2@gl_k,158,252,1 script Himmelmez#ghinstance3 650,7,7,{
+ end;
+OnTouch:
+ specialeffect EF_BASH;
+ donpcevent instance_npcname("#controlGH5")+"::OnEnable";
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnEnable";
+ donpcevent instance_npcname("Himmelmez#ghinstance3")+"::OnDisable";
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Himmelmez#ghinstance3")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("Himmelmez#ghinstance3");
+ end;
+OnEnable:
+ enablenpc instance_npcname("Himmelmez#ghinstance3");
+ end;
+}
+
+2@gl_k,158,255,3 script Gerhard#ghinstance1 651,{
+ end;
+OnInstanceInit:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnDisable";
+ end;
+OnDisable:
+ hideonnpc instance_npcname("Gerhard#ghinstance1");
+ end;
+OnEnable:
+ hideoffnpc instance_npcname("Gerhard#ghinstance1");
+ end;
+OnTalk1:
+ npctalk "Damn it! Run away! I can't withstand anymore!";
+ end;
+OnTalk2:
+ npctalk "Commandant... Come on, you need to run away from here... Ugh.";
+ end;
+OnTalk3:
+ npctalk "Even if you defile my body, I won't let you take my soul, Himmelmez!";
+ end;
+OnEffect1:
+ specialeffect EF_BARRIER;
+ end;
+OnEffect2:
+ specialeffect EF_CHAINCOMBO;
+ end;
+OnEffect3:
+ specialeffect EF_MAPPILLAR2;
+ end;
+OnEffect4:
+ specialeffect EF_MAPPILLAR;
+ end;
+OnEffect5:
+ specialeffect EF_LORD;
+ end;
+}
+
+2@gl_k,0,0,0 script #controlGH5 -1,{
+OnInstanceInit:
+ donpcevent instance_npcname("#controlGH5")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("#controlGH5");
+ end;
+OnEnable:
+ enablenpc instance_npcname("#controlGH5");
+ initnpctimer;
+ end;
+OnTimer3000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk1";
+ end;
+OnTimer6000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnTalk1";
+ end;
+OnTimer9000:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnTalk1";
+ end;
+OnTimer12000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnTalk2";
+ end;
+OnTimer15000:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnTalk2";
+ end;
+OnTimer18000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk2";
+ end;
+OnTimer21000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk3";
+ end;
+OnTimer24000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnTalk3";
+ end;
+OnTimer27000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk4";
+ end;
+OnTimer30000:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnTalk3";
+ end;
+OnTimer33000:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnTalk4";
+ end;
+OnTimer36000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk5";
+ end;
+OnTimer39000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk6";
+ end;
+OnTimer42000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk7";
+ end;
+OnTimer45000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk8";
+ end;
+OnTimer48000:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnTalk5";
+ end;
+OnTimer51000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk9";
+ end;
+OnTimer54000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk10";
+ end;
+OnTimer57000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnTalk11";
+ end;
+OnTimer60000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect1";
+ end;
+OnTimer63000:
+ donpcevent instance_npcname("Himmelmez#ghinstance4")+"::OnDisable";
+ end;
+OnTimer65000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect3";
+ end;
+OnTimer66000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect2";
+ end;
+OnTimer67000:
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnTalk6";
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect4";
+ end;
+OnTimer70000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect3";
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect4";
+ donpcevent instance_npcname("Heinrich#ghinstance6")+"::OnDisable";
+ donpcevent instance_npcname("Varmunt#ghinstance5")+"::OnTalk1";
+ end;
+OnTimer73000:
+ mapannounce instance_mapname("2@gl_k"), "Leads toward Gerhard's body.",bc_map,"0xFFFFFF";
+ end;
+OnTimer76000:
+ donpcevent instance_npcname("Gerhard#ghinstance1")+"::OnEffect5";
+ end;
+OnTimer80000:
+ donpcevent instance_npcname("#ghmemorialmob10")+"::OnEnable";
+ stopnpctimer;
+ donpcevent instance_npcname("#controlGH5")+"::OnDisable";
+ end;
+}
+
+2@gl_k,158,241,1 script Hugin#ghinstance1 755,{
+ if (checkquest(12319,HUNTING) == 2) {
+ mes "[Hugin]";
+ mes "Well, you are pretty ridiculous. Beginners shouldn't get the loot Amdarias drops.";
+ erasequest 12318;
+ erasequest 12319;
+ getitem 6608,1; //Coagulated Spell
+ next;
+ mes "[Hugin]";
+ mes "Varmunt, I have arbitrarily stopped time. And soon, the time gap will be gone.";
+ specialeffect2 EF_BLIND,AREA;
+ soundeffect "_blind.wav",0;
+ next;
+ mes "[Hugin]";
+ mes "Poor time travelers.";
+ mes "They will endlessly retry to prevent the tragedy that affected this city.";
+ next;
+ mes "[Hugin]";
+ mes "But the beggining of these time travels won't redempt your actions.";
+ mes "This will continue forever...";
+ next;
+ mes "[Hugin]";
+ mes "Now, I may erase your memory again. Perhaps you will have a different fate next time.";
+ specialeffect2 EF_FREEZE;
+ close2;
+ getmapxy(.@map$,.@x,.@y,0);
+ warp .@map$,.@x,.@y;
+ end;
+ } else {
+ mes "[Hugin]";
+ mes "The gap of time is almost distorted.";
+ mes "Done. There you go. Come!";
+ mes "I have to get out!";
+ next;
+ select("Bah... Soon after you...");
+ mes "[Hugin]";
+ mes "Soon after me? Anyways...";
+ mes "Doesn't matter, soon the gap of time will be closed, I have to get out of here.";
+ next;
+ switch(select("Since I'm here, let's explore more.:Please, send me out.")) {
+ case 1:
+ mes "[Hugin]";
+ mes "..................";
+ close;
+ case 2:
+ close2;
+ warp "glast_01",204,270;
+ end;
+ }
+ }
+OnInstanceInit:
+ donpcevent instance_npcname("Hugin#ghinstance1")+"::OnDisable";
+ end;
+OnDisable:
+ disablenpc instance_npcname("Hugin#ghinstance1");
+ end;
+OnEnable:
+ enablenpc instance_npcname("Hugin#ghinstance1");
+ end;
+}
diff --git a/npc/re/scripts.conf b/npc/re/scripts.conf
index 149be0a46..26e2d5d26 100644
--- a/npc/re/scripts.conf
+++ b/npc/re/scripts.conf
@@ -50,6 +50,10 @@ npc: npc/re/guides/guides_veins.txt
npc: npc/re/instances/HazyForest.txt
npc: npc/re/instances/MalangdoCulvert.txt
npc: npc/re/instances/OctopusCave.txt
+npc: npc/re/instances/OldGlastHeim.txt
+npc: npc/re/instances/BakonawaLake.txt
+npc: npc/re/instances/BangungotHospital.txt
+npc: npc/re/instances/BuwayaCave.txt
// ---------------- Kafras & Cool Event Corp. -------------------
npc: npc/re/kafras/kafras.txt
diff --git a/npc/scripts.conf b/npc/scripts.conf
index bbe299538..890e802fd 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -198,7 +198,7 @@ npc: npc/other/resetskill.txt
npc: npc/other/sealstatus.txt
// - Turbo Track Arena
npc: npc/other/turbo_track.txt
-
+npc: npc/other/gm_npcs.txt
// --------------------------- Quests ---------------------------
// - Payon & Morocc Quest Potion --------------------------------
npc: npc/quests/mage_solution.txt
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index 6a62fd4c6..e617a4f6c 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -4875,7 +4875,6 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy
(12580, 'Vending_Search_Scroll', 'Universal Catalog Silver', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'searchstores 10,0;', '', ''),
(12581, 'Vending_Search_Scroll2', 'Universal Catalog Gold', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'searchstores 10,1;', '', ''),
(12591, 'Uni_Catalog_Bz', 'Universal Catalog Bronze', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'searchstores 10,1;', '', ''),
-(12622, 'Boarding_Halter', 'Halter Lead', 11, 20, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 'setmounting();', '', ''),
(12701, 'Old_Blue_Box_F', 'Old Blue Box', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''),
(12702, 'Old_Bleu_Box', 'Old Navy Box', 2, 0, 0, 200, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getrandgroupitem 12702,1; getrandgroupitem 12702,1;', '', ''),
(12703, 'Holy_Egg_2', 'Holy Egg', 11, 0, 0, 50, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, '', '', ''),
@@ -5109,9 +5108,9 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy
(13105, 'The_Garrison_', 'Garrison', 4, 48000, 24000, 500, 70, 0, 7, 2, 16777216, 7, 2, 34, 2, 55, 1, 17, 'bonus bHit,-10;', '', ''),
(13106, 'Gold_Lux', 'Gold Lux', 4, 100000, 50000, 500, 20, 0, 7, 0, 16777216, 7, 2, 34, 3, 12, 1, 17, 'bonus bHit,-10; if(getskilllv("GS_GLITTERING")>0) bonus3 bAutoSpell,"GS_GLITTERING",getskilllv("GS_GLITTERING"),100;', '', ''),
(13107, 'Wasteland_Outlaw', 'Wasteland''s Outlaw', 4, 20, 10, 580, 68, 0, 7, 2, 16777216, 7, 2, 34, 3, 70, 1, 17, 'bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14;', '', ''),
-(13108, 'BF_Pistol1', 'Soldier Revolver', 4, 0, 0, 0, 70, 0, 7, 0, 16777216, 7, 2, 34, 3, 80, 1, 17, 'bonus bDex,2; bonus bHit,-10; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; autobonus "{ bonus bAspdRate,100; }",10,3000,BF_WEAPON,"{ specialeffect2 EF_POTION_BERSERK; }"; bonus bUnbreakableWeapon,0;', '', '');
+(13108, 'BF_Pistol1', 'Soldier Revolver', 4, 0, 0, 0, 70, 0, 7, 0, 16777216, 7, 2, 34, 3, 80, 1, 17, 'bonus bDex,2; bonus bHit,-10; bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; autobonus "{ bonus bAspdRate,100; }",10,3000,BF_WEAPON,"{ specialeffect2 EF_POTION_BERSERK; }"; bonus bUnbreakableWeapon,0;', '', ''),
+(13109, 'Wasteland_Outlaw_C', 'Wasteland Outlaw', 4, 20, 10, 0, 100, 0, 7, 0, 16777216, 7, 2, 34, 3, 0, 0, 17, 'bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatkRate,10;', '', '');
INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(13109, 'Wasteland_Outlaw_C', 'Wasteland Outlaw', 4, 20, 10, 0, 100, 0, 7, 0, 16777216, 7, 2, 34, 3, 0, 0, 17, 'bonus bHit,readparam(bAgi)/10; bonus bAspdRate,readparam(bAgi)/14; bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatkRate,10;', '', ''),
(13110, 'Krieger_Pistol1', 'Glorious Pistol', 4, 0, 0, 0, 80, 0, 7, 0, 16777216, 7, 2, 34, 4, 80, 1, 17, 'bonus2 bAddRace,RC_DemiHuman,55; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine()>5){ bonus2 bAddRace,RC_DemiHuman,pow(getrefine()-4,2); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) { bonus4 bAutoSpellOnSkill,"GS_RAPIDSHOWER","GS_GLITTERING",1,1000; bonus2 bSkillAtk,"GS_RAPIDSHOWER",getrefine()*2; }', '', ''),
(13112, 'P_Revolver1', 'Eden Revlover I', 4, 0, 0, 0, 4, 0, 7, 0, 16777216, 7, 2, 34, 1, 26, 0, 17, 'bonus bHit,-5;', '', ''),
(13113, 'P_Revolver2', 'Eden Revlover II', 4, 0, 0, 0, 60, 0, 7, 0, 16777216, 7, 2, 34, 1, 40, 0, 17, 'bonus bHit,-5;', '', ''),
@@ -5401,10 +5400,10 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy
(13671, 'Safety_Ring_Box1', 'Refined Safety Ring Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2695,604800;', '', ''),
(13672, 'Vesper_Core01_Box1', 'Refined Vesper Core 01 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2696,604800;', '', ''),
(13673, 'Vesper_Core02_Box1', 'Refined Vesper Core 02 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2697,604800;', '', ''),
-(13674, 'Vesper_Core03_Box1', 'Refined Vesper Core 03 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2698,604800;', '', '');
-INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
+(13674, 'Vesper_Core03_Box1', 'Refined Vesper Core 03 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2698,604800;', '', ''),
(13675, 'Vesper_Core04_Box1', 'Refined Vesper Core 04 Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2699,604800;', '', ''),
-(13676, 'Drooping_Kitty_Box1', 'Refined Drooping Cat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5279,1209600;', '', ''),
+(13676, 'Drooping_Kitty_Box1', 'Refined Drooping Cat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5279,1209600;', '', '');
+INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
(13677, 'Magestic_Goat_Box1', 'Refined Majestic Goat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5280,1209600;', '', ''),
(13678, 'Deviruchi_Cap_Box1', 'Refined Deviruchi Hat Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5281,1209600;', '', ''),
(13679, 'Executioner_Box1', 'Refined Executioner Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 1174,604800;', '', ''),
@@ -5732,10 +5731,10 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy
(14016, 'F_Lever_Action_Rifle_Box', 'Lever Action Rifle Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 13170,604800;', '', ''),
(14017, 'F_All_In_One_Ring_Box', 'All In One Ring Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2741,604800;', '', ''),
(14018, 'F_Spritual_Tunic_Box', 'Spiritual Tunic Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2384,604800;', '', ''),
-(14019, 'F_Recuperative_Box', 'Recuvative Armor Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2385,604800;', '', '');
-INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
+(14019, 'F_Recuperative_Box', 'Recuvative Armor Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2385,604800;', '', ''),
(14020, 'F_Shelter_Resist_Box', 'Shell Of Resistance Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2132,604800;', '', ''),
-(14021, 'F_Sylphid_Manteau_Box', 'Silf Manteau Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2543,604800;', '', ''),
+(14021, 'F_Sylphid_Manteau_Box', 'Silf Manteau Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2543,604800;', '', '');
+INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
(14022, 'F_Refresh_Shoes_Box', 'Refresh Shoes Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 2439,604800;', '', ''),
(14023, 'F_Toast_Box', 'Crunch Toast Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'rentitem 5391,604800;', '', ''),
(14024, 'F_Robo_Eye_Box', 'Robo Eye Box', 18, 20, 10, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'getitem 5325,1;', '', ''),
@@ -6062,10 +6061,10 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy
(14538, 'Glass_Of_Illusion', 'Glass of Illusion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_STEAL; sc_start SC_PLUSAVOIDVALUE,60000,20;', '', ''),
(14539, 'Shadow_Armor_S', 'Shadow Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_CLOAKING; sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Dark,1,0;', '', ''),
(14540, 'Holy_Armor_S', 'Holy Armor Scroll', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 91; sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Holy,1,0;', '', ''),
-(14541, 'S_Def_Potion', 'Small Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,60000,3;', '', '');
-INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
+(14541, 'S_Def_Potion', 'Small Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,60000,3;', '', ''),
(14542, 'B_Def_Potion', 'Big Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_GUARD; sc_start SC_PROTECT_DEF,180000,3;', '', ''),
-(14543, 'S_Mdef_Potion', 'Small Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,60000,3;', '', ''),
+(14543, 'S_Mdef_Potion', 'Small Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,60000,3;', '', '');
+INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
(14544, 'B_Mdef_Potion', 'Big Magic Defense Potion', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'specialeffect2 EF_SPELLBREAKER; sc_start SC_PROTECT_MDEF,180000,3;', '', ''),
(14545, 'Battle_Manual_X3', 'Field Manual 300%', 2, 0, 0, 10, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'sc_start SC_CASH_PLUSEXP,1800000,300;', '', ''),
(14546, 'Fire_Cracker_Love', 'I Love You Firecracker', 2, 2, 1, 20, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'end;', '', ''),
@@ -6178,4 +6177,4 @@ INSERT INTO `item_db` (`id`, `name_english`, `name_japanese`, `type`, `price_buy
(19505, 'T_Cigarette', 'T Cigarette', 5, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 4096, 0, 0, 0, 54, '', '', ''),
(19506, 'T_Valkyrie_Feather_Band', 'T Valkyrie Feather Band', 5, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 0, 1, 300, '', '', ''),
(19507, 'Clear_Sun', 'Clear Sun', 5, 0, 0, 0, 0, 0, 0, 0, 4294967295, 7, 2, 1024, 0, 1, 0, 654, '', '', ''),
-(22540, 'Runstone_Luxanima', 'Lux Anima Rune', 11, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "RK_LUXANIMA",1;', '', '');
+(22540, 'Runstone_Luxanima', 'Lux Anima Rune', 11, 2, 1, 100, 0, 0, 0, 0, 4294967295, 7, 2, 0, 0, 0, 0, 0, 'itemskill "RK_LUXANIMA",1;', '', ''); \ No newline at end of file
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index dfe4f7830..e4e543cbc 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -5942,13 +5942,13 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(12655, 'Brain_Powder', 'Brain Powder', 11, 2000, 1000, 100, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
(12656, 'Magical_Powder', 'Magical Powder', 11, 3000, 1500, 200, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
(12657, 'Madness_Powder', 'Madness Powder', 11, 4000, 2000, 300, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
-(12658, 'Trans_Scroll_Devi', 'Transformation Scroll(Deviruchi)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1109,0,0,0;', '', ''),
-(12659, 'Trans_Scroll_Ray_Arch', 'Transformation Scroll(Raydric)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1276,0,0,0;', '', ''),
-(12660, 'Trans_Scroll_Mavka', 'Transformation Scroll(Mavka)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1884,0,0,0;', '', ''),
-(12661, 'Trans_Scroll_Marduk', 'Transformation Scroll(Marduk)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1140,0,0,0;', '', ''),
-(12662, 'Trans_Scroll_Banshee', 'Transformation Scroll(Banshee)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1867,0,0,0;', '', ''),
-(12663, 'Trans_Scroll_Poring', 'Transformation Scroll(Poring)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1002,0,0,0;', '', ''),
-(12664, 'Trans_Scroll_Golem', 'Transformation Scroll(Golem)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'sc_start4 SC_MONSTER_TRANSFORM,1200000,1040,0,0,0;', '', ''),
+(12658, 'Trans_Scroll_Devi', 'Transformation Scroll(Deviruchi)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Deviruchi",1200000,SC_MTF_ASPD;', '', ''),
+(12659, 'Trans_Scroll_Ray_Arch', 'Transformation Scroll(Raydric)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Raydric Archer",1200000,SC_MTF_RANGEATK;', '', ''),
+(12660, 'Trans_Scroll_Mavka', 'Transformation Scroll(Mavka)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Mavka",1200000,SC_MTF_RANGEATK;', '', ''),
+(12661, 'Trans_Scroll_Marduk', 'Transformation Scroll(Marduk)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Marduk",1200000,SC_MTF_MATK;', '', ''),
+(12662, 'Trans_Scroll_Banshee', 'Transformation Scroll(Banshee)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Banshee",1200000,SC_MTF_MATK;', '', ''),
+(12663, 'Trans_Scroll_Poring', 'Transformation Scroll(Poring)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Poring",1200000,SC_MTF_CRIDAMAGE;', '', ''),
+(12664, 'Trans_Scroll_Golem', 'Transformation Scroll(Golem)', 2, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'montransform "Golem",1200000,SC_MTF_MLEATKED;', '', ''),
(12665, 'Grovel_Buff', 'Grovel Buff', 2, 0, 0, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
(12666, 'Thai_Perfume_MATK', 'Thai Perfume(MATK)', 11, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
(12667, 'Thai_Perfume_ATK', 'Thai Perfume(ATK)', 11, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
@@ -6170,9 +6170,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(12995, 'White_Herb_Box', 'White Herb Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 509,15;', '', ''),
(12996, 'Blue_Herb_Box', 'Blue Herb Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 510,15;', '', ''),
(12997, 'Elunium_Box', 'Elunium Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 985,5;', '', ''),
-(12998, 'Oridecon_Box', 'Oridecon Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 984,5;', '', '');
+(12998, 'Oridecon_Box', 'Oridecon Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 984,5;', '', ''),
+(12999, 'Branch_Of_Dead_Tree_Box', 'Dead Branch Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 604,3;', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(12999, 'Branch_Of_Dead_Tree_Box', 'Dead Branch Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 604,3;', '', ''),
(13000, 'Jujube_Dagger', 'Jujube Dagger', 4, 10000, 5000, 600, 39, 0, 0, 1, 0, 579821295, 63, 2, 2, 1, 0, 0, 1, 1, 'bonus bAtkEle,Ele_Wind;', '', ''),
(13001, 'Dragon_Killer', 'Dragon Killer', 4, 20, 10, 900, 110, 0, 0, 1, 0, 579821295, 63, 2, 2, 4, 60, 0, 1, 1, 'bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;', '', ''),
(13002, 'Ginnungagap', 'Ginnungagap', 4, 20, 10, 700, 148, 0, 0, 1, 0, 579821295, 63, 2, 2, 4, 70, 0, 1, 1, 'bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;', '', ''),
@@ -6448,9 +6448,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(13530, 'Pet_Egg_Scroll_Box5_', 'Pet Egg Scroll Box 16', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12934,30;', '', ''),
(13531, 'Light_Red_Pot_Box', 'Light Red Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 598,50;', '', ''),
(13532, 'Light_Orange_Pot_Box', 'Light Orange Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 599,50;', '', ''),
-(13533, 'Light_Yellow_Pot_Box', 'Light Yellow Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 11500,50;', '', '');
+(13533, 'Light_Yellow_Pot_Box', 'Light Yellow Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 11500,50;', '', ''),
+(13534, 'Light_White_Pot_Box', 'Light White Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 11501,50;', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(13534, 'Light_White_Pot_Box', 'Light White Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 11501,50;', '', ''),
(13535, 'Light_Center_Pot_Box', 'Light Center Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14509,20;', '', ''),
(13536, 'Light_Awakening_Pot_Box', 'Light Awakening Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14510,20;', '', ''),
(13537, 'Light_Berserk_Pot_Box', 'Light Berserk Potion Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14511,20;', '', ''),
@@ -6767,9 +6767,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(13850, 'WOB_Box_Rune10', 'Yellow Butterfly Wing Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14582,10;', '', ''),
(13851, 'WOB_Box_Schawaltz5', 'Green Butterfly Wing Box(5)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14583,5;', '', ''),
(13852, 'WOB_Box_Schawaltz10', 'Green Butterfly Wing Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14583,10;', '', ''),
-(13853, 'WOB_Box_Rachel5', 'Red Butterfly Wing Box(5)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14584,5;', '', '');
+(13853, 'WOB_Box_Rachel5', 'Red Butterfly Wing Box(5)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14584,5;', '', ''),
+(13854, 'WOB_Box_Rachel10', 'Red Butterfly Wing Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14584,10;', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(13854, 'WOB_Box_Rachel10', 'Red Butterfly Wing Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14584,10;', '', ''),
(13855, 'WOB_Box_Local5', 'Blue Butterfly Wing Box(5)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14585,5;', '', ''),
(13856, 'WOB_Box_Local10', 'Blue Butterfly Wing Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14585,10;', '', ''),
(13857, 'Spark_Candy_Box5', 'Candy Box(5)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 14586,5;', '', ''),
@@ -7080,9 +7080,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(14162, 'F_Dex_Dish_Box', 'Hwergelmir''s Tonic Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12205,10;', '', ''),
(14163, 'F_Luk_Dish_Box', 'Cooked Nine Tail Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12206,10;', '', ''),
(14164, 'F_Vit_Dish_Box', 'Immortal Stew Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12207,10;', '', ''),
-(14165, 'F_Kafra_Card_Box', 'Kafra Card Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12211,10;', '', '');
+(14165, 'F_Kafra_Card_Box', 'Kafra Card Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12211,10;', '', ''),
+(14166, 'F_Giant_Fly_Wing_Box', 'Giant Fly Wing Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12212,10;', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(14166, 'F_Giant_Fly_Wing_Box', 'Giant Fly Wing Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12212,10;', '', ''),
(14167, 'F_Neuralizer_Box', 'Neuralizer Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12213,1;', '', ''),
(14168, 'F_Convex_Mirror_Box', 'Convex Mirror Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12214,10;', '', ''),
(14169, 'F_Blessing_10_Scroll_Box', 'Blessing Scroll Box(10)', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 12215,10;', '', ''),
@@ -7402,9 +7402,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(15021, 'Upg_Formal_Dress', 'Reinforcement Formal Suit', 5, 20, 10, 150, 0, 0, 45, 0, 1, 4294967294, 63, 2, 16, 0, 0, 0, 1, 0, 'bonus bMaxHPRate,3;', '', ''),
(15022, 'Brazil_Swimsuit', 'Swimming Suit', 5, 20, 10, 100, 0, 0, 1, 0, 0, 4294967295, 63, 2, 16, 0, 0, 0, 1, 0, 'bonus bStr,4; bonus bInt,4; bonus bMdef,3;', '', ''),
(15023, 'Half_Brynhild', 'Brynhild (Trial Version)', 5, 20, 10, 0, 0, 0, 60, 0, 0, 4294967295, 63, 2, 16, 0, 47, 0, 0, 0, 'bonus bMdef,10; bonus bMaxHP,20*BaseLevel; bonus bMaxSP,5*BaseLevel; bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bUnbreakableArmor,0; bonus bNoKnockback,0;', '', ''),
-(15024, 'Army_Padding', 'Army Padding', 5, 0, 0, 10, 0, 0, 10, 0, 0, 4294967295, 63, 2, 16, 0, 0, 0, 1, 0, '', '', '');
+(15024, 'Army_Padding', 'Army Padding', 5, 0, 0, 10, 0, 0, 10, 0, 0, 4294967295, 63, 2, 16, 0, 0, 0, 1, 0, '', '', ''),
+(15025, 'Golden_Rod_Robe', 'Golden Rod Robe', 5, 20, 10, 500, 0, 0, 40, 0, 0, 512, 56, 2, 16, 0, 100, 0, 1, 0, 'bonus bDefEle,Ele_Wind; bonus bMdef,10; bonus bInt,1; if(readparam(bInt)>=120){ bonus bInt,1; }', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(15025, 'Golden_Rod_Robe', 'Golden Rod Robe', 5, 20, 10, 500, 0, 0, 40, 0, 0, 512, 56, 2, 16, 0, 100, 0, 1, 0, 'bonus bDefEle,Ele_Wind; bonus bMdef,10; bonus bInt,1; if(readparam(bInt)>=120){ bonus bInt,1; }', '', ''),
(15026, 'Aqua_Robe', 'Aqua Robe', 5, 20, 10, 500, 0, 0, 40, 0, 0, 512, 56, 2, 16, 0, 100, 0, 1, 0, 'bonus bDefEle,Ele_Water; bonus bMdef,10; bonus bInt,1; if(readparam(bInt)>=120){ bonus bInt,1; }', '', ''),
(15027, 'Crimson_Robe', 'Crimson Robe', 5, 20, 10, 500, 0, 0, 40, 0, 0, 512, 56, 2, 16, 0, 100, 0, 1, 0, 'bonus bDefEle,Ele_Fire; bonus bMdef,10; bonus bInt,1; if(readparam(bInt)>=120){ bonus bInt,1; }', '', ''),
(15028, 'Forest_Robe', 'Forest Robe', 5, 20, 10, 500, 0, 0, 40, 0, 0, 512, 56, 2, 16, 0, 100, 0, 1, 0, 'bonus bDefEle,Ele_Earth; bonus bMdef,10; bonus bInt,1; if(readparam(bInt)>=120){ bonus bInt,1; }', '', ''),
@@ -7726,9 +7726,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(17087, 'Upg_Book_Box', 'Upgrade Book Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 1585,1;', '', ''),
(17088, 'Upg_Staff_Box', 'Upgrade Staff Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 2015,1;', '', ''),
(17089, 'Upg_Dagger_Box', 'Upgrade Dagger Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 13071,1;', '', ''),
-(17090, 'Upg_Revolver_Box', 'Upgrade Revolver Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 13115,1;', '', '');
+(17090, 'Upg_Revolver_Box', 'Upgrade Revolver Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 13115,1;', '', ''),
+(17091, 'Upg_Mace_Box', 'Upgrade Mace Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 16019,1;', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(17091, 'Upg_Mace_Box', 'Upgrade Mace Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 16019,1;', '', ''),
(17092, 'Upg_Bow_Box', 'Upgrade Bow Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 18112,1;', '', ''),
(17093, 'Upg_Twohand_Sword_Box', 'Upgrade Two-Hand Sword Box', 2, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'getitem 21000,1;', '', ''),
(17094, 'Upg_Katar_Box2', 'Upgrade Katar Box', 18, 20, 10, 0, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
@@ -8060,9 +8060,9 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(18785, 'King_Poring_Hat', 'King Poring Hat', 5, 20, 10, 600, 0, 0, 10, 0, 1, 4294967295, 7, 2, 256, 0, 10, 0, 1, 905, 'bonus bDex,1; bonus bLuk,1;', '', ''),
(18786, 'Anemos_Mask', 'Anemos Mask', 5, 20, 10, 200, 0, 0, 0, 0, 0, 4294967295, 7, 2, 512, 0, 10, 0, 0, 906, 'bonus bUnbreakableHelm,0;', '', ''),
(18790, 'Rainbow_Poring_Hat', 'Rainbow Poring Hat', 5, 20, 10, 100, 0, 0, 3, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 1, 900, '', '', ''),
-(18805, 'Eclipse_Hat', 'Eclipse Hat', 5, 20, 10, 300, 0, 0, 2, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 922, 'bonus bLuk,3; bonus bMdef,5;', '', '');
+(18805, 'Eclipse_Hat', 'Eclipse Hat', 5, 20, 10, 300, 0, 0, 2, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 922, 'bonus bLuk,3; bonus bMdef,5;', '', ''),
+(18806, 'Black_Rabbit_Hat', 'Black Rabbit Hat', 5, 20, 10, 300, 0, 0, 2, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 1, 923, 'bonus bDex,2; bonus bAgi,3;', '', '');
INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_buy`, `price_sell`, `weight`, `atk`, `matk`, `defence`, `range`, `slots`, `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`, `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`, `view`, `script`, `equip_script`, `unequip_script`) VALUES
-(18806, 'Black_Rabbit_Hat', 'Black Rabbit Hat', 5, 20, 10, 300, 0, 0, 2, 0, 1, 4294967295, 7, 2, 256, 0, 0, 0, 1, 923, 'bonus bDex,2; bonus bAgi,3;', '', ''),
(18807, 'Yellow_Yuzu_Hat', 'White Citron Hat', 5, 20, 10, 400, 0, 0, 3, 0, 1, 4294967294, 7, 2, 256, 0, 0, 0, 1, 924, 'bonus bVit,2; bonus bLuk,3;', '', ''),
(18808, 'Wing_Form_Spectacle', 'Wing Style Spectacle', 5, 20, 10, 100, 0, 0, 1, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 925, 'bonus bAgi,1;', '', ''),
(18810, 'Hell_Pumpkin_Hat', 'Hell Pumpkin Hat', 5, 20, 10, 500, 0, 0, 12, 0, 0, 4294967295, 7, 2, 256, 0, 0, 0, 1, 717, 'bonus bMdef,12;', '', ''),
@@ -8165,4 +8165,4 @@ INSERT INTO `item_db_re` (`id`, `name_english`, `name_japanese`, `type`, `price_
(21004, 'Alca_Bringer_', 'Alca Bringer', 4, 20, 10, 3400, 280, 0, 0, 2, 2, 16512, 56, 2, 34, 3, 100, 0, 1, 3, '', '', ''),
(21005, 'Metal_Two_Hand_Sword', 'Metal Two-Handed Sword', 4, 20, 10, 0, 95, 0, 0, 1, 1, 16514, 63, 2, 34, 3, 0, 0, 1, 3, '', '', ''),
(22514, 'Candy_Holder', 'Candy Holder', 11, 20, 10, 10, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, '', '', ''),
-(22540, 'Runstone_Luxanima', 'Lux Anima Rune', 11, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'itemskill "RK_LUXANIMA",1;', '', '');
+(22540, 'Runstone_Luxanima', 'Lux Anima Rune', 11, 2, 1, 100, 0, 0, 0, 0, 0, 4294967295, 63, 2, 0, 0, 0, 0, 0, 0, 'itemskill "RK_LUXANIMA",1;', '', ''); \ No newline at end of file
diff --git a/src/char/char.c b/src/char/char.c
index 574e4f66b..0b35c0143 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3585,6 +3585,14 @@ void char_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date)
/// Any (0x718): An unknown error has occurred.
void char_delete2_accept_ack(int fd, int char_id, uint32 result)
{// HC: <082a>.W <char id>.L <Msg:0-5>.L
+
+#if PACKETVER >= 20130000 /* not sure the exact date -- must refresh or client gets stuck */
+ if( result == 1 ) {
+ struct char_session_data* sd = (struct char_session_data*)session[fd]->session_data;
+ mmo_char_send099d(fd, sd);
+ }
+#endif
+
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x82a;
WFIFOL(fd,2) = char_id;
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 8be9298f9..e7ab94687 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -471,6 +471,9 @@ bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsi
/* if not check if a sub-hooking list is available (from the server) and run it by */
if( HPM->addhook_sub && HPM->addhook_sub(type,target,hook,pID) )
return true;
+
+ ShowError("HPM:AddHook: unknown Hooking Point '%s'!\n",target);
+
return false;
}
void HPM_HookStop (const char *func, unsigned int pID) {
diff --git a/src/common/mmo.h b/src/common/mmo.h
index ccba0fa7f..7977042d8 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -119,7 +119,7 @@
#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
-#define MAX_QUEST_DB 2662 // Max quests that the server will load
+#define MAX_QUEST_DB 2670 // Max quests that the server will load
#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 3ba9ae725..ca4a7a2e8 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -11,6 +11,7 @@
#include "map.h"
//
+#include "atcommand.h"
#include "chat.h"
#include "chrif.h"
#include "duel.h"
@@ -33,6 +34,18 @@
#include <string.h>
#include <time.h>
+struct HPM_atcommand_list {
+ //tracking currently not enabled
+ // - requires modifying how plugins calls atcommand creation
+ // - needs load/unload during runtime support
+ //unsigned int pID;/* plugin id */
+ char name[ATCOMMAND_LENGTH];
+ AtCommandFunc func;
+};
+
+struct HPM_atcommand_list *atcommand_list = NULL;
+unsigned int atcommand_list_items = 0;
+
void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree) {
struct HPluginData *HPData;
unsigned int i;
@@ -103,4 +116,40 @@ void HPM_map_plugin_load_sub(struct hplugin *plugin) {
plugin->hpi->addToMSD = HPM->import_symbol("addToMSD",plugin->idx);
plugin->hpi->getFromMSD = HPM->import_symbol("getFromMSD",plugin->idx);
plugin->hpi->removeFromMSD = HPM->import_symbol("removeFromMSD",plugin->idx);
-} \ No newline at end of file
+}
+
+bool HPM_map_add_atcommand(char *name, AtCommandFunc func) {
+ unsigned int i = 0;
+
+ for(i = 0; i < atcommand_list_items; i++) {
+ if( !strcmpi(atcommand_list[i].name,name) ) {
+ ShowDebug("HPM_map_add_atcommand: duplicate command '%s', skipping...\n", name);
+ return false;
+ }
+ }
+
+ i = atcommand_list_items;
+
+ RECREATE(atcommand_list, struct HPM_atcommand_list , ++atcommand_list_items);
+
+ safestrncpy(atcommand_list[i].name, name, sizeof(atcommand_list[i].name));
+ atcommand_list[i].func = func;
+
+ return true;
+}
+
+void HPM_map_atcommands(void) {
+ unsigned int i;
+
+ for(i = 0; i < atcommand_list_items; i++) {
+ if( !atcommand->add(atcommand_list[i].name,atcommand_list[i].func) ) {
+ ShowDebug("HPM_map_atcommands: duplicate command '%s', skipping...\n", atcommand_list[i].name);
+ continue;
+ }
+ }
+}
+
+void HPM_map_do_final(void) {
+ if( atcommand_list )
+ aFree(atcommand_list);
+}
diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h
index a6cac4ace..96515772b 100644
--- a/src/map/HPMmap.h
+++ b/src/map/HPMmap.h
@@ -5,6 +5,7 @@
#define _HPM_MAP_
#include "../common/cbasetypes.h"
+#include "../map/atcommand.h"
struct hplugin;
struct map_session_data;
@@ -13,6 +14,11 @@ void HPM_map_addToMSD(struct map_session_data *sd, void *data, unsigned int id,
void *HPM_map_getFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type);
void HPM_map_removeFromMSD(struct map_session_data *sd, unsigned int id, unsigned int type);
+bool HPM_map_add_atcommand(char *name, AtCommandFunc func);
+void HPM_map_atcommands(void);
+
void HPM_map_plugin_load_sub(struct hplugin *plugin);
+void HPM_map_do_final(void);
+
#endif /* _HPM_MAP_ */
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index cc29fa1bb..7d4008faf 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -45,6 +45,7 @@
#include "mapreg.h"
#include "quest.h"
#include "searchstore.h"
+#include "HPMmap.h"
#include <stdio.h>
#include <stdlib.h>
@@ -384,9 +385,7 @@ ACMD(mapmove) {
unsigned short mapindex;
short x = 0, y = 0;
int16 m = -1;
-
- nullpo_retr(-1, sd);
-
+
memset(map_name, '\0', sizeof(map_name));
if (!message || !*message ||
@@ -435,7 +434,6 @@ ACMD(mapmove) {
ACMD(where) {
struct map_session_data* pl_sd;
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
@@ -463,9 +461,7 @@ ACMD(where) {
*------------------------------------------*/
ACMD(jumpto) {
struct map_session_data *pl_sd = NULL;
-
- nullpo_retr(-1, sd);
-
+
if (!message || !*message) {
clif->message(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
return false;
@@ -504,9 +500,7 @@ ACMD(jumpto) {
ACMD(jump)
{
short x = 0, y = 0;
-
- nullpo_retr(-1, sd);
-
+
memset(atcmd_output, '\0', sizeof(atcmd_output));
sscanf(message, "%hd %hd", &x, &y);
@@ -554,9 +548,7 @@ ACMD(who) {
*/
int display_type = 1;
int map_id = -1;
-
- nullpo_retr(-1, sd);
-
+
if (strstr(command, "map") != NULL) {
if (sscanf(message, "%15s %23s", map_name, player_name) < 1 || (map_id = map->mapname2mapid(map_name)) < 0)
map_id = sd->bl.m;
@@ -650,9 +642,7 @@ ACMD(whogm)
char player_name[NAME_LENGTH];
struct guild *g;
struct party_data *p;
-
- nullpo_retr(-1, sd);
-
+
memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(match_text, '\0', sizeof(match_text));
memset(player_name, '\0', sizeof(player_name));
@@ -726,9 +716,7 @@ ACMD(whogm)
/*==========================================
*
*------------------------------------------*/
-ACMD(save)
-{
- nullpo_retr(-1, sd);
+ACMD(save) {
pc->setsavepoint(sd, sd->mapindex, sd->bl.x, sd->bl.y);
if (sd->status.pet_id > 0 && sd->pd)
@@ -746,9 +734,7 @@ ACMD(save)
*------------------------------------------*/
ACMD(load) {
int16 m;
-
- nullpo_retr(-1, sd);
-
+
m = map->mapindex2mapid(sd->status.save_point.map);
if (m >= 0 && map->list[m].flag.nowarpto && !pc->has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
clif->message(fd, msg_txt(249)); // You are not authorized to warp to your save map.
@@ -771,9 +757,7 @@ ACMD(load) {
ACMD(speed)
{
int speed;
-
- nullpo_retr(-1, sd);
-
+
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message || sscanf(message, "%d", &speed) < 1) {
@@ -799,8 +783,6 @@ ACMD(speed)
*------------------------------------------*/
ACMD(storage)
{
- nullpo_retr(-1, sd);
-
if (sd->npc_id || sd->state.vending || sd->state.buyingstore || sd->state.trading || sd->state.storage_flag)
return false;
@@ -820,8 +802,6 @@ ACMD(storage)
*------------------------------------------*/
ACMD(guildstorage)
{
- nullpo_retr(-1, sd);
-
if (!sd->status.guild_id) {
clif->message(fd, msg_txt(252));
return false;
@@ -851,7 +831,6 @@ ACMD(guildstorage)
ACMD(option)
{
int param1 = 0, param2 = 0, param3 = 0;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d %d", &param1, &param2, &param3) < 1 || param1 < 0 || param2 < 0 || param3 < 0)
{// failed to match the parameters so inform the user of the options
@@ -883,7 +862,6 @@ ACMD(option)
*
*------------------------------------------*/
ACMD(hide) {
- nullpo_retr(-1, sd);
if (sd->sc.option & OPTION_INVISIBLE) {
sd->sc.option &= ~OPTION_INVISIBLE;
if (sd->disguise != -1 )
@@ -927,7 +905,6 @@ ACMD(jobchange)
{
int job = 0, upper = 0;
const char* text;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) {
int i;
@@ -989,7 +966,6 @@ ACMD(jobchange)
*------------------------------------------*/
ACMD(kill)
{
- nullpo_retr(-1, sd);
status_kill(&sd->bl);
clif->message(sd->fd, msg_txt(13)); // A pity! You've died.
if (fd != sd->fd)
@@ -1002,7 +978,6 @@ ACMD(kill)
*------------------------------------------*/
ACMD(alive)
{
- nullpo_retr(-1, sd);
if (!status->revive(&sd->bl, 100, 100)) {
clif->message(fd, msg_txt(667));
return false;
@@ -1018,7 +993,6 @@ ACMD(alive)
ACMD(kami)
{
unsigned long color=0;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1054,7 +1028,6 @@ ACMD(kami)
ACMD(heal)
{
int hp = 0, sp = 0; // [Valaris] thanks to fov
- nullpo_retr(-1, sd);
sscanf(message, "%d %d", &hp, &sp);
@@ -1116,7 +1089,6 @@ ACMD(item)
struct item item_tmp;
struct item_data *item_data;
int get_count, i;
- nullpo_retr(-1, sd);
memset(item_name, '\0', sizeof(item_name));
@@ -1172,7 +1144,6 @@ ACMD(item2)
int item_id, number = 0;
int identify = 0, refine = 0, attr = 0;
int c1 = 0, c2 = 0, c3 = 0, c4 = 0;
- nullpo_retr(-1, sd);
memset(item_name, '\0', sizeof(item_name));
@@ -1244,7 +1215,6 @@ ACMD(item2)
ACMD(itemreset)
{
int i;
- nullpo_retr(-1, sd);
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
@@ -1262,7 +1232,7 @@ ACMD(itemreset)
ACMD(baselevelup)
{
int level=0, i=0, status_point=0;
- nullpo_retr(-1, sd);
+
level = atoi(message);
if (!message || !*message || !level) {
@@ -1322,7 +1292,6 @@ ACMD(baselevelup)
ACMD(joblevelup)
{
int level=0;
- nullpo_retr(-1, sd);
level = atoi(message);
@@ -1375,9 +1344,7 @@ ACMD(help) {
const char *command_name = NULL;
char *default_command = "help";
AtCommandInfo *tinfo = NULL;
-
- nullpo_retr(-1, sd);
-
+
if (!message || !*message) {
command_name = default_command; // If no command_name specified, display help for @help.
} else {
@@ -1461,7 +1428,6 @@ int atcommand_pvpoff_sub(struct block_list *bl,va_list ap)
}
ACMD(pvpoff) {
- nullpo_retr(-1, sd);
if (!map->list[sd->bl.m].flag.pvp) {
clif->message(fd, msg_txt(160)); // PvP is already Off.
@@ -1499,7 +1465,6 @@ int atcommand_pvpon_sub(struct block_list *bl,va_list ap)
}
ACMD(pvpon) {
- nullpo_retr(-1, sd);
if (map->list[sd->bl.m].flag.pvp) {
clif->message(fd, msg_txt(161)); // PvP is already On.
@@ -1524,7 +1489,6 @@ ACMD(pvpon) {
*
*------------------------------------------*/
ACMD(gvgoff) {
- nullpo_retr(-1, sd);
if (!map->list[sd->bl.m].flag.gvg) {
clif->message(fd, msg_txt(162)); // GvG is already Off.
@@ -1545,7 +1509,6 @@ ACMD(gvgoff) {
*
*------------------------------------------*/
ACMD(gvgon) {
- nullpo_retr(-1, sd);
if (map->list[sd->bl.m].flag.gvg) {
clif->message(fd, msg_txt(163)); // GvG is already On.
@@ -1567,7 +1530,6 @@ ACMD(gvgon) {
ACMD(model)
{
int hair_style = 0, hair_color = 0, cloth_color = 0;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1599,7 +1561,6 @@ ACMD(model)
ACMD(dye)
{
int cloth_color = 0;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1626,7 +1587,6 @@ ACMD(dye)
ACMD(hair_style)
{
int hair_style = 0;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1653,7 +1613,6 @@ ACMD(hair_style)
ACMD(hair_color)
{
int hair_color = 0;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1729,9 +1688,7 @@ ACMD(go)
{ MAP_MALAYA, 242, 211 }, // 34=Malaya Port
{ MAP_ECLAGE, 110, 39 }, // 35=Eclage
};
-
- nullpo_retr(-1, sd);
-
+
memset(map_name, '\0', sizeof(map_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -1881,7 +1838,6 @@ ACMD(monster)
int i, k, range;
short mx, my;
unsigned int size;
- nullpo_retr(-1, sd);
memset(name, '\0', sizeof(name));
memset(monster, '\0', sizeof(monster));
@@ -1988,7 +1944,6 @@ int atkillmonster_sub(struct block_list *bl, va_list ap)
ACMD(killmonster) {
int map_id, drop_flag;
char map_name[MAP_NAME_LENGTH_EXT];
- nullpo_retr(-1, sd);
memset(map_name, '\0', sizeof(map_name));
@@ -2015,7 +1970,6 @@ ACMD(refine)
{
int i,j, position = 0, refine = 0, current_position, final_refine;
int count;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -2095,7 +2049,6 @@ ACMD(produce)
int item_id, attribute = 0, star = 0;
struct item_data *item_data;
struct item tmp_item;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(item_name, '\0', sizeof(item_name));
@@ -2151,7 +2104,6 @@ ACMD(produce)
ACMD(memo)
{
int position = 0;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -2186,7 +2138,6 @@ ACMD(memo)
*------------------------------------------*/
ACMD(gat) {
int y;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -2211,7 +2162,6 @@ ACMD(gat) {
ACMD(displaystatus)
{
int i, type, flag, tick, val1 = 0, val2 = 0, val3 = 0;
- nullpo_retr(-1, sd);
if (!message || !*message || (i = sscanf(message, "%d %d %d %d %d %d", &type, &flag, &tick, &val1, &val2, &val3)) < 1) {
clif->message(fd, msg_txt(1009)); // Please enter a status type/flag (usage: @displaystatus <status type> <flag> <tick> {<val1> {<val2> {<val3>}}}).
@@ -2283,7 +2233,6 @@ ACMD(skillpoint)
{
int point;
unsigned int new_skill_point;
- nullpo_retr(-1, sd);
if (!message || !*message || (point = atoi(message)) == 0) {
clif->message(fd, msg_txt(1011)); // Please enter a number (usage: @skpoint <number of points>).
@@ -2331,7 +2280,6 @@ ACMD(skillpoint)
ACMD(zeny)
{
int zeny=0, ret=-1;
- nullpo_retr(-1, sd);
if (!message || !*message || (zeny = atoi(message)) == 0) {
clif->message(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny <amount>).
@@ -2359,7 +2307,6 @@ ACMD(param) {
const char* param[] = { "str", "agi", "vit", "int", "dex", "luk" };
short* stats[6];
//we don't use direct initialization because it isn't part of the c standard.
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -2419,7 +2366,6 @@ ACMD(stat_all) {
int index, count, value, max, new_value;
short* stats[6];
//we don't use direct initialization because it isn't part of the c standard.
- nullpo_retr(-1, sd);
stats[0] = &sd->status.str;
stats[1] = &sd->status.agi;
@@ -2478,7 +2424,6 @@ ACMD(guildlevelup)
int level = 0;
short added_level;
struct guild *guild_info;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &level) < 1 || level == 0) {
clif->message(fd, msg_txt(1014)); // Please enter a valid level (usage: @guildlvup/@guildlvlup <# of levels>).
@@ -2518,7 +2463,6 @@ ACMD(makeegg)
{
struct item_data *item_data;
int id, pet_id;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1015)); // Please enter a monster/egg name/ID (usage: @makeegg <pet>).
@@ -2556,7 +2500,6 @@ ACMD(makeegg)
*------------------------------------------*/
ACMD(hatch)
{
- nullpo_retr(-1, sd);
if (sd->status.pet_id <= 0)
clif->sendegg(sd);
else {
@@ -2574,7 +2517,6 @@ ACMD(petfriendly)
{
int friendly;
struct pet_data *pd;
- nullpo_retr(-1, sd);
if (!message || !*message || (friendly = atoi(message)) < 0) {
clif->message(fd, msg_txt(1016)); // Please enter a valid value (usage: @petfriendly <0-1000>).
@@ -2611,7 +2553,6 @@ ACMD(pethungry)
{
int hungry;
struct pet_data *pd;
- nullpo_retr(-1, sd);
if (!message || !*message || (hungry = atoi(message)) < 0) {
clif->message(fd, msg_txt(1017)); // Please enter a valid number (usage: @pethungry <0-100>).
@@ -2645,7 +2586,6 @@ ACMD(pethungry)
ACMD(petrename)
{
struct pet_data *pd;
- nullpo_retr(-1, sd);
if (!sd->status.pet_id || !sd->pd) {
clif->message(fd, msg_txt(184)); // Sorry, but you have no pet.
return false;
@@ -2670,7 +2610,6 @@ ACMD(petrename)
ACMD(recall) {
struct map_session_data *pl_sd = NULL;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1018)); // Please enter a player name (usage: @recall <char name/ID>).
@@ -2712,7 +2651,6 @@ ACMD(recall) {
*------------------------------------------*/
ACMD(char_block)
{
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -2748,7 +2686,6 @@ ACMD(char_ban)
int year, month, day, hour, minute, second, value;
time_t timestamp;
struct tm *tmtime;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -2829,7 +2766,6 @@ ACMD(char_ban)
*------------------------------------------*/
ACMD(char_unblock)
{
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -2850,7 +2786,6 @@ ACMD(char_unblock)
*------------------------------------------*/
ACMD(char_unban)
{
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -2870,7 +2805,6 @@ ACMD(char_unban)
*
*------------------------------------------*/
ACMD(night) {
- nullpo_retr(-1, sd);
if (map->night_flag != 1) {
pc->map_night_timer(pc->night_timer_tid, 0, 0, 1);
@@ -2886,7 +2820,6 @@ ACMD(night) {
*
*------------------------------------------*/
ACMD(day) {
- nullpo_retr(-1, sd);
if (map->night_flag != 0) {
pc->map_day_timer(pc->day_timer_tid, 0, 0, 1);
@@ -2905,9 +2838,7 @@ ACMD(doom)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
-
- nullpo_retr(-1, sd);
-
+
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
@@ -2932,9 +2863,7 @@ ACMD(doommap)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
-
- nullpo_retr(-1, sd);
-
+
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
@@ -2970,9 +2899,7 @@ ACMD(raise)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
-
- nullpo_retr(-1, sd);
-
+
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
if( pc_isdead(pl_sd) )
@@ -2991,9 +2918,7 @@ ACMD(raisemap)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
-
- nullpo_retr(-1, sd);
-
+
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
if (sd->bl.m == pl_sd->bl.m && pc_isdead(pl_sd) )
@@ -3011,7 +2936,6 @@ ACMD(raisemap)
ACMD(kick)
{
struct map_session_data *pl_sd;
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -3043,7 +2967,6 @@ ACMD(kickall)
{
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
- nullpo_retr(-1, sd);
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
@@ -3065,7 +2988,6 @@ ACMD(kickall)
*------------------------------------------*/
ACMD(allskill)
{
- nullpo_retr(-1, sd);
pc->allskillup(sd); // all skills
sd->status.skill_point = 0; // 0 skill points
clif->updatestatus(sd, SP_SKILLPOINT); // update
@@ -3080,7 +3002,6 @@ ACMD(allskill)
ACMD(questskill)
{
uint16 skill_id, index;
- nullpo_retr(-1, sd);
if (!message || !*message || (skill_id = atoi(message)) <= 0)
{// also send a list of skills applicable to this command
@@ -3123,7 +3044,6 @@ ACMD(questskill)
ACMD(lostskill)
{
uint16 skill_id, index;
- nullpo_retr(-1, sd);
if (!message || !*message || (skill_id = atoi(message)) <= 0)
{// also send a list of skills applicable to this command
@@ -3169,7 +3089,6 @@ ACMD(spiritball)
{
int max_spiritballs;
int number;
- nullpo_retr(-1, sd);
max_spiritballs = min(ARRAYLENGTH(sd->spirit_timer), 0x7FFF);
@@ -3196,7 +3115,6 @@ ACMD(spiritball)
ACMD(party)
{
char party_name[NAME_LENGTH];
- nullpo_retr(-1, sd);
memset(party_name, '\0', sizeof(party_name));
@@ -3217,7 +3135,6 @@ ACMD(guild)
{
char guild_name[NAME_LENGTH];
int prev;
- nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
@@ -3236,7 +3153,6 @@ ACMD(guild)
ACMD(breakguild)
{
- nullpo_retr(-1, sd);
if (sd->status.guild_id) { // Check if the player has a guild
struct guild *g;
@@ -3269,7 +3185,6 @@ ACMD(breakguild)
*
*------------------------------------------*/
ACMD(agitstart) {
- nullpo_retr(-1, sd);
if (map->agit_flag == 1) {
clif->message(fd, msg_txt(73)); // War of Emperium is currently in progress.
return false;
@@ -3286,7 +3201,6 @@ ACMD(agitstart) {
*
*------------------------------------------*/
ACMD(agitstart2) {
- nullpo_retr(-1, sd);
if (map->agit2_flag == 1) {
clif->message(fd, msg_txt(404)); // "War of Emperium SE is currently in progress."
return false;
@@ -3303,7 +3217,6 @@ ACMD(agitstart2) {
*
*------------------------------------------*/
ACMD(agitend) {
- nullpo_retr(-1, sd);
if (map->agit_flag == 0) {
clif->message(fd, msg_txt(75)); // War of Emperium is currently not in progress.
return false;
@@ -3320,7 +3233,6 @@ ACMD(agitend) {
*
*------------------------------------------*/
ACMD(agitend2) {
- nullpo_retr(-1, sd);
if (map->agit2_flag == 0) {
clif->message(fd, msg_txt(406)); // "War of Emperium SE is currently not in progress."
return false;
@@ -3337,8 +3249,6 @@ ACMD(agitend2) {
* @mapexit - shuts down the map server
*------------------------------------------*/
ACMD(mapexit) {
- nullpo_retr(-1, sd);
-
map->do_shutdown();
return true;
}
@@ -3351,7 +3261,6 @@ ACMD(idsearch)
char item_name[100];
unsigned int i, match;
struct item_data *item_array[MAX_SEARCH];
- nullpo_retr(-1, sd);
memset(item_name, '\0', sizeof(item_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -3387,7 +3296,6 @@ ACMD(recallall)
struct map_session_data* pl_sd;
struct s_mapiterator* iter;
int count;
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -3434,7 +3342,6 @@ ACMD(guildrecall)
int count;
char guild_name[NAME_LENGTH];
struct guild *g;
- nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -3492,7 +3399,6 @@ ACMD(partyrecall)
char party_name[NAME_LENGTH];
struct party_data *p;
int count;
- nullpo_retr(-1, sd);
memset(party_name, '\0', sizeof(party_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -3544,7 +3450,6 @@ ACMD(partyrecall)
*------------------------------------------*/
ACMD(reloaditemdb)
{
- nullpo_retr(-1, sd);
itemdb->reload();
clif->message(fd, msg_txt(97)); // Item database has been reloaded.
@@ -3555,7 +3460,6 @@ ACMD(reloaditemdb)
*
*------------------------------------------*/
ACMD(reloadmobdb) {
- nullpo_retr(-1, sd);
mob->reload();
pet->read_db();
homun->reload();
@@ -3572,7 +3476,6 @@ ACMD(reloadmobdb) {
*------------------------------------------*/
ACMD(reloadskilldb)
{
- nullpo_retr(-1, sd);
skill->reload();
homun->reload_skill();
elemental->reload_skilldb();
@@ -3680,7 +3583,6 @@ ACMD(reloadscript) {
struct s_mapiterator* iter;
struct map_session_data* pl_sd;
- nullpo_retr(-1, sd);
//atcommand_broadcast( fd, sd, "@broadcast", "Server is reloading scripts..." );
//atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" );
@@ -3732,9 +3634,7 @@ ACMD(mapinfo) {
int i, m_id, chat_num = 0, list = 0, vend_num = 0;
unsigned short m_index;
char mapname[24];
-
- nullpo_retr(-1, sd);
-
+
memset(atcmd_output, '\0', sizeof(atcmd_output));
memset(mapname, '\0', sizeof(mapname));
memset(direction, '\0', sizeof(direction));
@@ -3975,8 +3875,6 @@ ACMD(mapinfo) {
*------------------------------------------*/
ACMD(mount_peco)
{
- nullpo_retr(-1, sd);
-
if (sd->disguise != -1) {
clif->message(fd, msg_txt(212)); // Cannot mount while in disguise.
return false;
@@ -4040,7 +3938,6 @@ ACMD(mount_peco)
ACMD(guildspy) {
char guild_name[NAME_LENGTH];
struct guild *g;
- nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -4080,7 +3977,6 @@ ACMD(guildspy) {
ACMD(partyspy) {
char party_name[NAME_LENGTH];
struct party_data *p;
- nullpo_retr(-1, sd);
memset(party_name, '\0', sizeof(party_name));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -4121,7 +4017,6 @@ ACMD(partyspy) {
ACMD(repairall)
{
int count, i;
- nullpo_retr(-1, sd);
count = 0;
for (i = 0; i < MAX_INVENTORY; i++) {
@@ -4149,7 +4044,6 @@ ACMD(repairall)
*------------------------------------------*/
ACMD(nuke) {
struct map_session_data *pl_sd;
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -4180,9 +4074,7 @@ ACMD(nuke) {
ACMD(tonpc) {
char npcname[NAME_LENGTH+1];
struct npc_data *nd;
-
- nullpo_retr(-1, sd);
-
+
memset(npcname, 0, sizeof(npcname));
if (!message || !*message || sscanf(message, "%23[^\n]", npcname) < 1) {
@@ -4209,7 +4101,6 @@ ACMD(tonpc) {
ACMD(shownpc)
{
char NPCname[NAME_LENGTH+1];
- nullpo_retr(-1, sd);
memset(NPCname, '\0', sizeof(NPCname));
@@ -4235,7 +4126,6 @@ ACMD(shownpc)
ACMD(hidenpc)
{
char NPCname[NAME_LENGTH+1];
- nullpo_retr(-1, sd);
memset(NPCname, '\0', sizeof(NPCname));
@@ -4284,7 +4174,6 @@ ACMD(unloadnpc)
{
struct npc_data *nd;
char NPCname[NAME_LENGTH+1];
- nullpo_retr(-1, sd);
memset(NPCname, '\0', sizeof(NPCname));
@@ -4354,7 +4243,6 @@ ACMD(servertime) {
time_t time_server; // variable for number of seconds (used with time() function)
struct tm *datetime; // variable for time in structure ->tm_mday, ->tm_sec, ...
char temp[CHAT_SIZE_MAX];
- nullpo_retr(-1, sd);
memset(temp, '\0', sizeof(temp));
@@ -4450,7 +4338,6 @@ ACMD(jail) {
struct map_session_data *pl_sd;
int x, y;
unsigned short m_index;
- nullpo_retr(-1, sd);
memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));
@@ -4540,7 +4427,6 @@ ACMD(jailfor) {
char * modif_p;
int jailtime = 0,x,y;
short m_index = 0;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%255s %23[^\n]",atcmd_output,atcmd_player_name) < 2) {
clif->message(fd, msg_txt(400)); //Usage: @jailfor <time> <character name>
@@ -4650,8 +4536,6 @@ ACMD(jailtime)
{
int year, month, day, hour, minute;
- nullpo_retr(-1, sd);
-
if (!sd->sc.data[SC_JAILED]) {
clif->message(fd, msg_txt(1139)); // You are not in jail.
return false;
@@ -4682,7 +4566,6 @@ ACMD(jailtime)
ACMD(disguise)
{
int id = 0;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1143)); // Please enter a Monster/NPC name/ID (usage: @disguise <name/ID>).
@@ -4734,7 +4617,6 @@ ACMD(disguiseall)
int mob_id=0;
struct map_session_data *pl_sd;
struct s_mapiterator* iter;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1145)); // Please enter a Monster/NPC name/ID (usage: @disguiseall <name/ID>).
@@ -4811,7 +4693,6 @@ ACMD(disguiseguild)
*------------------------------------------*/
ACMD(undisguise)
{
- nullpo_retr(-1, sd);
if (sd->disguise != -1) {
pc->disguise(sd, -1);
clif->message(fd, msg_txt(124)); // Undisguise applied.
@@ -4829,7 +4710,6 @@ ACMD(undisguise)
ACMD(undisguiseall) {
struct map_session_data *pl_sd;
struct s_mapiterator* iter;
- nullpo_retr(-1, sd);
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
@@ -4851,7 +4731,6 @@ ACMD(undisguiseguild)
struct map_session_data *pl_sd;
struct guild *g;
int i;
- nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
@@ -4881,7 +4760,7 @@ ACMD(exp)
{
char output[CHAT_SIZE_MAX];
double nextb, nextj;
- nullpo_retr(-1, sd);
+
memset(output, '\0', sizeof(output));
nextb = pc->nextbaseexp(sd);
@@ -4903,7 +4782,6 @@ ACMD(exp)
*------------------------------------------*/
ACMD(broadcast)
{
- nullpo_retr(-1, sd);
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -4923,8 +4801,6 @@ ACMD(broadcast)
*------------------------------------------*/
ACMD(localbroadcast)
{
- nullpo_retr(-1, sd);
-
memset(atcmd_output, '\0', sizeof(atcmd_output));
if (!message || !*message) {
@@ -4946,7 +4822,6 @@ ACMD(email)
{
char actual_email[100];
char new_email[100];
- nullpo_retr(-1, sd);
memset(actual_email, '\0', sizeof(actual_email));
memset(new_email, '\0', sizeof(new_email));
@@ -4981,7 +4856,6 @@ ACMD(email)
ACMD(effect)
{
int type = 0, flag = 0;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &type) < 1) {
clif->message(fd, msg_txt(1152)); // Please enter an effect number (usage: @effect <effect number>).
@@ -4999,7 +4873,6 @@ ACMD(effect)
*------------------------------------------*/
ACMD(killer)
{
- nullpo_retr(-1, sd);
sd->state.killer = !sd->state.killer;
if(sd->state.killer)
@@ -5016,7 +4889,6 @@ ACMD(killer)
* enable other people killing you
*------------------------------------------*/
ACMD(killable) {
- nullpo_retr(-1, sd);
sd->state.killable = !sd->state.killable;
if(sd->state.killable)
@@ -5033,7 +4905,6 @@ ACMD(killable) {
* turn skills on for the map
*------------------------------------------*/
ACMD(skillon) {
- nullpo_retr(-1, sd);
map->list[sd->bl.m].flag.noskill = 0;
clif->message(fd, msg_txt(244));
return true;
@@ -5044,7 +4915,6 @@ ACMD(skillon) {
* Turn skills off on the map
*------------------------------------------*/
ACMD(skilloff) {
- nullpo_retr(-1, sd);
map->list[sd->bl.m].flag.noskill = 1;
clif->message(fd, msg_txt(243));
return true;
@@ -5057,7 +4927,7 @@ ACMD(skilloff) {
ACMD(npcmove) {
int x = 0, y = 0, m;
struct npc_data *nd = 0;
- nullpo_retr(-1, sd);
+
memset(atcmd_player_name, '\0', sizeof atcmd_player_name);
if (!message || !*message || sscanf(message, "%d %d %23[^\n]", &x, &y, atcmd_player_name) < 3) {
@@ -5096,7 +4966,6 @@ ACMD(addwarp)
unsigned short m;
struct npc_data* nd;
- nullpo_retr(-1, sd);
memset(warpname, '\0', sizeof(warpname));
if (!message || !*message || sscanf(message, "%31s %d %d %23[^\n]", mapname, &x, &y, warpname) < 4) {
@@ -5127,7 +4996,6 @@ ACMD(addwarp)
*------------------------------------------*/
ACMD(follow) {
struct map_session_data *pl_sd = NULL;
- nullpo_retr(-1, sd);
if (!message || !*message) {
if (sd->followtarget == -1)
@@ -5163,7 +5031,7 @@ ACMD(follow) {
ACMD(dropall)
{
int i;
- nullpo_retr(-1, sd);
+
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].amount) {
if(sd->status.inventory[i].equip != 0)
@@ -5181,7 +5049,6 @@ ACMD(dropall)
ACMD(storeall)
{
int i;
- nullpo_retr(-1, sd);
if (sd->state.storage_flag != 1)
{ //Open storage.
@@ -5207,7 +5074,6 @@ ACMD(storeall)
ACMD(clearstorage)
{
int i, j;
- nullpo_retr(-1, sd);
if (sd->state.storage_flag == 1) {
clif->message(fd, msg_txt(250));
@@ -5229,7 +5095,6 @@ ACMD(cleargstorage)
int i, j;
struct guild *g;
struct guild_storage *guild_storage;
- nullpo_retr(-1, sd);
g = sd->guild;
@@ -5268,7 +5133,6 @@ ACMD(cleargstorage)
ACMD(clearcart)
{
int i;
- nullpo_retr(-1, sd);
if (pc_iscarton(sd) == 0) {
clif->message(fd, msg_txt(1396)); // You do not have a cart to be cleaned.
@@ -5302,9 +5166,7 @@ ACMD(skillid) {
DBKey key;
DBData *data;
char partials[MAX_SKILLID_PARTIAL_RESULTS][MAX_SKILLID_PARTIAL_RESULTS_LEN];
-
- nullpo_retr(-1, sd);
-
+
if (!message || !*message) {
clif->message(fd, msg_txt(1163)); // Please enter a skill name to look up (usage: @skillid <skill name>).
return false;
@@ -5348,7 +5210,6 @@ ACMD(useskill) {
uint16 skill_id;
uint16 skill_lv;
char target[100];
- nullpo_retr(-1, sd);
if(!message || !*message || sscanf(message, "%hu %hu %23[^\n]", &skill_id, &skill_lv, target) != 3) {
clif->message(fd, msg_txt(1165)); // Usage: @useskill <skill ID> <skill level> <target>
@@ -5392,7 +5253,6 @@ ACMD(displayskill) {
unsigned int tick;
uint16 skill_id;
uint16 skill_lv = 1;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%hu %hu", &skill_id, &skill_lv) < 1) {
clif->message(fd, msg_txt(1166)); // Usage: @displayskill <skill ID> {<skill level>}
@@ -5416,7 +5276,6 @@ ACMD(skilltree) {
int meets, j, c=0;
char target[NAME_LENGTH];
struct skill_tree_entry *ent;
- nullpo_retr(-1, sd);
if(!message || !*message || sscanf(message, "%hu %23[^\r\n]", &skill_id, target) != 2) {
clif->message(fd, msg_txt(1167)); // Usage: @skilltree <skill ID> <target>
@@ -5486,9 +5345,7 @@ void getring(struct map_session_data* sd) {
ACMD(marry) {
struct map_session_data *pl_sd = NULL;
char player_name[NAME_LENGTH] = "";
-
- nullpo_retr(-1, sd);
-
+
if (!message || !*message || sscanf(message, "%23s", player_name) != 1) {
clif->message(fd, msg_txt(1172)); // Usage: @marry <char name>
return false;
@@ -5517,8 +5374,6 @@ ACMD(marry) {
*------------------------------------------*/
ACMD(divorce)
{
- nullpo_retr(-1, sd);
-
if (pc->divorce(sd) != 0) {
sprintf(atcmd_output, msg_txt(1175), sd->status.name); // '%s' is not married.
clif->message(fd, atcmd_output);
@@ -5561,7 +5416,6 @@ ACMD(changelook)
* Turns on/off Autotrade for a specific player
*------------------------------------------*/
ACMD(autotrade) {
- nullpo_retr(-1, sd);
if( map->list[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) {
clif->message(fd, msg_txt(1179)); // Autotrade is not allowed on this map.
@@ -5598,7 +5452,6 @@ ACMD(autotrade) {
ACMD(changegm) {
struct guild *g;
struct map_session_data *pl_sd;
- nullpo_retr(-1, sd);
if (sd->status.guild_id == 0 || (g = sd->guild) == NULL || strcmp(g->master,sd->status.name)) {
clif->message(fd, msg_txt(1181)); // You need to be a Guild Master to use this command.
@@ -5629,7 +5482,6 @@ ACMD(changegm) {
* Changes the leader of a party.
*------------------------------------------*/
ACMD(changeleader) {
- nullpo_retr(-1, sd);
if( !message[0] ) {
clif->message(fd, msg_txt(1185)); // Usage: @changeleader <party_member_name>
@@ -5650,7 +5502,6 @@ ACMD(partyoption)
struct party_data *p;
int mi, option;
char w1[16], w2[16];
- nullpo_retr(-1, sd);
if (sd->status.party_id == 0 || (p = party->search(sd->status.party_id)) == NULL)
{
@@ -5692,7 +5543,7 @@ ACMD(partyoption)
ACMD(autoloot)
{
int rate;
- nullpo_retr(-1, sd);
+
// autoloot command without value
if(!message || !*message)
{
@@ -5813,31 +5664,12 @@ ACMD(autolootitem)
}
return true;
}
-/**
- * No longer available, keeping here just in case it's back someday. [Ind]
- **/
-/*==========================================
- * It is made to rain.
- *------------------------------------------*/
-//ACMD(rain) {
-// nullpo_retr(-1, sd);
-// if (map->list[sd->bl.m].flag.rain) {
-// map->list[sd->bl.m].flag.rain=0;
-// clif->weather(sd->bl.m);
-// clif->message(fd, msg_txt(1201)); // The rain has stopped.
-// } else {
-// map->list[sd->bl.m].flag.rain=1;
-// clif->weather(sd->bl.m);
-// clif->message(fd, msg_txt(1202)); // It has started to rain.
-// }
-// return true;
-//}
/*==========================================
* It is made to snow.
*------------------------------------------*/
ACMD(snow) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.snow) {
map->list[sd->bl.m].flag.snow=0;
clif->weather(sd->bl.m);
@@ -5855,7 +5687,7 @@ ACMD(snow) {
* Cherry tree snowstorm is made to fall. (Sakura)
*------------------------------------------*/
ACMD(sakura) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.sakura) {
map->list[sd->bl.m].flag.sakura=0;
clif->weather(sd->bl.m);
@@ -5872,7 +5704,7 @@ ACMD(sakura) {
* Clouds appear.
*------------------------------------------*/
ACMD(clouds) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.clouds) {
map->list[sd->bl.m].flag.clouds=0;
clif->weather(sd->bl.m);
@@ -5890,7 +5722,7 @@ ACMD(clouds) {
* Different type of clouds using effect 516
*------------------------------------------*/
ACMD(clouds2) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.clouds2) {
map->list[sd->bl.m].flag.clouds2=0;
clif->weather(sd->bl.m);
@@ -5908,7 +5740,7 @@ ACMD(clouds2) {
* Fog hangs over.
*------------------------------------------*/
ACMD(fog) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.fog) {
map->list[sd->bl.m].flag.fog=0;
clif->weather(sd->bl.m);
@@ -5925,7 +5757,7 @@ ACMD(fog) {
* Fallen leaves fall.
*------------------------------------------*/
ACMD(leaves) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.leaves) {
map->list[sd->bl.m].flag.leaves=0;
clif->weather(sd->bl.m);
@@ -5943,7 +5775,7 @@ ACMD(leaves) {
* Fireworks appear.
*------------------------------------------*/
ACMD(fireworks) {
- nullpo_retr(-1, sd);
+
if (map->list[sd->bl.m].flag.fireworks) {
map->list[sd->bl.m].flag.fireworks=0;
clif->weather(sd->bl.m);
@@ -5961,11 +5793,7 @@ ACMD(fireworks) {
* Clearing Weather Effects by Dexity
*------------------------------------------*/
ACMD(clearweather) {
- nullpo_retr(-1, sd);
- /**
- * No longer available, keeping here just in case it's back someday. [Ind]
- **/
- //map->list[sd->bl.m].flag.rain=0;
+
map->list[sd->bl.m].flag.snow=0;
map->list[sd->bl.m].flag.sakura=0;
map->list[sd->bl.m].flag.clouds=0;
@@ -6010,9 +5838,7 @@ ACMD(mobsearch)
int mob_id;
int number = 0;
struct s_mapiterator* it;
-
- nullpo_retr(-1, sd);
-
+
if (!message || !*message || sscanf(message, "%99[^\n]", mob_name) < 1) {
clif->message(fd, msg_txt(1218)); // Please enter a monster name (usage: @mobsearch <monster name>).
return false;
@@ -6135,9 +5961,7 @@ ACMD(pettalk)
{
char mes[100],temp[100];
struct pet_data *pd;
-
- nullpo_retr(-1, sd);
-
+
if ( battle_config.min_chat_delay ) {
if( DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0 )
return true;
@@ -6263,9 +6087,7 @@ ACMD(summon)
int duration = 0;
struct mob_data *md;
unsigned int tick=timer->gettick();
-
- nullpo_retr(-1, sd);
-
+
if (!message || !*message || sscanf(message, "%23s %d", name, &duration) < 1)
{
clif->message(fd, msg_txt(1225)); // Please enter a monster name (usage: @summon <monster name> {duration}).
@@ -6310,7 +6132,6 @@ ACMD(summon)
ACMD(adjgroup)
{
int new_group = 0;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d", &new_group) != 1) {
clif->message(fd, msg_txt(1226)); // Usage: @adjgroup <group_id>
@@ -6333,7 +6154,6 @@ ACMD(adjgroup)
*------------------------------------------*/
ACMD(trade) {
struct map_session_data *pl_sd = NULL;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1230)); // Please enter a player name (usage: @trade <char name>).
@@ -6356,7 +6176,6 @@ ACMD(trade) {
ACMD(setbattleflag)
{
char flag[128], value[128];
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%127s %127s", flag, value) != 2) {
clif->message(fd, msg_txt(1231)); // Usage: @setbattleflag <flag> <value>
@@ -6378,7 +6197,6 @@ ACMD(setbattleflag)
*------------------------------------------*/
ACMD(unmute) {
struct map_session_data *pl_sd = NULL;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1234)); // Please enter a player name (usage: @unmute <char name>).
@@ -6410,7 +6228,6 @@ ACMD(uptime)
{
unsigned long seconds = 0, day = 24*60*60, hour = 60*60,
minute = 60, days = 0, hours = 0, minutes = 0;
- nullpo_retr(-1, sd);
seconds = timer->get_uptime();
days = seconds/day;
@@ -6433,7 +6250,7 @@ ACMD(uptime)
ACMD(changesex)
{
int i;
- nullpo_retr(-1, sd);
+
pc->resetskill(sd,4);
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
for( i=0; i<EQI_MAX; i++ )
@@ -6448,7 +6265,6 @@ ACMD(changesex)
ACMD(mute) {
struct map_session_data *pl_sd = NULL;
int manner;
- nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %23[^\n]", &manner, atcmd_player_name) < 1) {
clif->message(fd, msg_txt(1237)); // Usage: @mute <time> <char name>
@@ -6487,7 +6303,6 @@ ACMD(mute) {
*------------------------------------------*/
ACMD(refresh)
{
- nullpo_retr(-1, sd);
clif->refresh(sd);
return true;
}
@@ -6496,7 +6311,6 @@ ACMD(refreshall)
{
struct map_session_data* iter_sd;
struct s_mapiterator* iter;
- nullpo_retr(-1, sd);
iter = mapit_getallusers();
for (iter_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); iter_sd = (TBL_PC*)mapit->next(iter))
@@ -6512,9 +6326,7 @@ ACMD(refreshall)
ACMD(identify)
{
int i,num;
-
- nullpo_retr(-1, sd);
-
+
for(i=num=0;i<MAX_INVENTORY;i++){
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
num++;
@@ -6530,7 +6342,7 @@ ACMD(identify)
ACMD(misceffect) {
int effect = 0;
- nullpo_retr(-1, sd);
+
if (!message || !*message)
return false;
if (sscanf(message, "%d", &effect) < 1)
@@ -6545,7 +6357,6 @@ ACMD(misceffect) {
*------------------------------------------*/
ACMD(mail)
{
- nullpo_ret(sd);
mail->openmail(sd);
return true;
}
@@ -6703,9 +6514,7 @@ ACMD(showmobs)
int mob_id;
int number = 0;
struct s_mapiterator* it;
-
- nullpo_retr(-1, sd);
-
+
if(sscanf(message, "%99[^\n]", mob_name) < 0)
return false;
@@ -6761,8 +6570,6 @@ ACMD(homlevel) {
TBL_HOM * hd;
int level = 0;
enum homun_type htype;
-
- nullpo_retr(-1, sd);
if( !message || !*message || ( level = atoi(message) ) < 1 ) {
clif->message(fd, msg_txt(1253)); // Please enter a level adjustment (usage: @homlevel <number of levels>).
@@ -6818,8 +6625,6 @@ ACMD(homlevel) {
*------------------------------------------*/
ACMD(homevolution)
{
- nullpo_retr(-1, sd);
-
if ( !homun_alive(sd->hd) ) {
clif->message(fd, msg_txt(1254)); // You do not have a homunculus.
return false;
@@ -6836,7 +6641,6 @@ ACMD(homevolution)
ACMD(hommutate) {
int homun_id;
enum homun_type m_class, m_id;
- nullpo_retr(-1, sd);
if( !homun_alive(sd->hd) ) {
clif->message(fd, msg_txt(1254)); // You do not have a homunculus.
@@ -6865,7 +6669,6 @@ ACMD(hommutate) {
*------------------------------------------*/
ACMD(makehomun) {
int homunid;
- nullpo_retr(-1, sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1256)); // Please enter a homunculus ID (usage: @makehomun <homunculus id>).
@@ -6903,9 +6706,7 @@ ACMD(makehomun) {
ACMD(homfriendly)
{
int friendly = 0;
-
- nullpo_retr(-1, sd);
-
+
if ( !homun_alive(sd->hd) ) {
clif->message(fd, msg_txt(1254)); // You do not have a homunculus.
return false;
@@ -6930,9 +6731,7 @@ ACMD(homfriendly)
ACMD(homhungry)
{
int hungry = 0;
-
- nullpo_retr(-1, sd);
-
+
if ( !homun_alive(sd->hd) ) {
clif->message(fd, msg_txt(1254)); // You do not have a homunculus.
return false;
@@ -6957,9 +6756,7 @@ ACMD(homhungry)
ACMD(homtalk)
{
char mes[100],temp[100];
-
- nullpo_retr(-1, sd);
-
+
if ( battle_config.min_chat_delay ) {
if( DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0 )
return true;
@@ -6993,7 +6790,6 @@ ACMD(homtalk)
ACMD(hominfo) {
struct homun_data *hd;
struct status_data *st;
- nullpo_retr(-1, sd);
if ( !homun_alive(sd->hd) ) {
clif->message(fd, msg_txt(1254)); // You do not have a homunculus.
@@ -7031,9 +6827,7 @@ ACMD(homstats)
struct s_homunculus_db *db;
struct s_homunculus *hom;
int lv, min, max, evo;
-
- nullpo_retr(-1, sd);
-
+
if ( !homun_alive(sd->hd) ) {
clif->message(fd, msg_txt(1254)); // You do not have a homunculus.
return false;
@@ -7095,7 +6889,6 @@ ACMD(homstats)
}
ACMD(homshuffle) {
- nullpo_retr(-1, sd);
if(!sd->hd)
return false; // nothing to do
@@ -7296,7 +7089,6 @@ int atcommand_mutearea_sub(struct block_list *bl,va_list ap)
ACMD(mutearea) {
int time;
- nullpo_ret(sd);
if (!message || !*message) {
clif->message(fd, msg_txt(1297)); // Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
@@ -7317,7 +7109,6 @@ ACMD(rates)
{
char buf[CHAT_SIZE_MAX];
- nullpo_ret(sd);
memset(buf, '\0', sizeof(buf));
snprintf(buf, CHAT_SIZE_MAX, msg_txt(1298), // Experience rates: Base %.2fx / Job %.2fx
@@ -7343,7 +7134,6 @@ ACMD(rates)
ACMD(me)
{
char tempmes[CHAT_SIZE_MAX];
- nullpo_retr(-1, sd);
memset(tempmes, '\0', sizeof(tempmes));
memset(atcmd_output, '\0', sizeof(atcmd_output));
@@ -7372,7 +7162,6 @@ ACMD(me)
ACMD(size)
{
int size = 0;
- nullpo_retr(-1, sd);
size = cap_value(atoi(message),SZ_SMALL,SZ_BIG);
@@ -7427,7 +7216,6 @@ ACMD(sizeguild)
char guild_name[NAME_LENGTH];
struct map_session_data *pl_sd;
struct guild *g;
- nullpo_retr(-1, sd);
memset(guild_name, '\0', sizeof(guild_name));
@@ -7466,9 +7254,7 @@ ACMD(sizeguild)
* @monsterignore
* => Makes monsters ignore you. [Valaris]
*------------------------------------------*/
-ACMD(monsterignore)
-{
- nullpo_retr(-1, sd);
+ACMD(monsterignore) {
if (!sd->state.monster_ignore) {
sd->state.monster_ignore = 1;
@@ -7484,9 +7270,7 @@ ACMD(monsterignore)
* @fakename
* => Gives your character a fake name. [Valaris]
*------------------------------------------*/
-ACMD(fakename)
-{
- nullpo_retr(-1, sd);
+ACMD(fakename){
if( !message || !*message )
{
@@ -7531,7 +7315,7 @@ ACMD(mapflag) {
char flag_name[100];
short flag=0,i;
- nullpo_retr(-1, sd);
+
memset(flag_name, '\0', sizeof(flag_name));
if (!message || !*message || (sscanf(message, "%99s %hd", flag_name, &flag) < 1)) {
@@ -7816,43 +7600,45 @@ ACMD(cash)
char output[128];
int value;
int ret=0;
- nullpo_retr(-1, sd);
if( !message || !*message || (value = atoi(message)) == 0 ) {
clif->message(fd, msg_txt(1322)); // Please enter an amount.
return false;
}
- if( !strcmpi(command+1,"cash") )
- {
+ if( !strcmpi(command+1,"cash") ) {
if( value > 0 ) {
if( (ret=pc->getcash(sd, value, 0)) >= 0){
- sprintf(output, msg_txt(505), ret, sd->cashPoints);
- clif->disp_onlyself(sd, output, strlen(output));
- }
- else clif->message(fd, msg_txt(149)); // Unable to decrease the number/value.
+ // If this option is set, the message is already sent by pc function
+ if( !battle_config.cashshop_show_points ){
+ sprintf(output, msg_txt(505), ret, sd->cashPoints);
+ clif->disp_onlyself(sd, output, strlen(output));
+ }
+ } else
+ clif->message(fd, msg_txt(149)); // Unable to decrease the number/value.
} else {
if( (ret=pc->paycash(sd, -value, 0)) >= 0){
sprintf(output, msg_txt(410), ret, sd->cashPoints);
clif->disp_onlyself(sd, output, strlen(output));
- }
- else clif->message(fd, msg_txt(41)); // Unable to decrease the number/value.
+ } else
+ clif->message(fd, msg_txt(41)); // Unable to decrease the number/value.
}
- }
- else
- { // @points
+ } else { // @points
if( value > 0 ) {
- if( (ret=pc->getcash(sd, 0, value)) >= 0){
- sprintf(output, msg_txt(506), ret, sd->kafraPoints);
- clif->disp_onlyself(sd, output, strlen(output));
- }
- else clif->message(fd, msg_txt(149)); // Unable to decrease the number/value.
+ if( (ret=pc->getcash(sd, 0, value)) >= 0) {
+ // If this option is set, the message is already sent by pc function
+ if( !battle_config.cashshop_show_points ){
+ sprintf(output, msg_txt(506), ret, sd->kafraPoints);
+ clif->disp_onlyself(sd, output, strlen(output));
+ }
+ } else
+ clif->message(fd, msg_txt(149)); // Unable to decrease the number/value.
} else {
if( (ret=pc->paycash(sd, -value, -value)) >= 0){
sprintf(output, msg_txt(411), ret, sd->kafraPoints);
clif->disp_onlyself(sd, output, strlen(output));
- }
- else clif->message(fd, msg_txt(41)); // Unable to decrease the number/value.
+ } else
+ clif->message(fd, msg_txt(41)); // Unable to decrease the number/value.
}
}
@@ -7963,7 +7749,6 @@ ACMD(feelreset)
* AUCTION SYSTEM
*------------------------------------------*/
ACMD(auction) {
- nullpo_ret(sd);
if( !battle_config.feature_auction ) {
clif->colormes(sd->fd,COLOR_RED,msg_txt(1484));
@@ -7980,8 +7765,6 @@ ACMD(auction) {
*------------------------------------------*/
ACMD(ksprotection)
{
- nullpo_retr(-1,sd);
-
if( sd->state.noks ) {
sd->state.noks = 0;
clif->message(fd, msg_txt(1325)); // [ K.S Protection Inactive ]
@@ -8012,7 +7795,6 @@ ACMD(ksprotection)
* Map Kill Steal Protection Setting
*------------------------------------------*/
ACMD(allowks) {
- nullpo_retr(-1,sd);
if( map->list[sd->bl.m].flag.allowks ) {
map->list[sd->bl.m].flag.allowks = 0;
@@ -8024,9 +7806,7 @@ ACMD(allowks) {
return true;
}
-ACMD(resetstat)
-{
- nullpo_retr(-1, sd);
+ACMD(resetstat) {
pc->resetstate(sd);
sprintf(atcmd_output, msg_txt(207), sd->status.name);
@@ -8034,9 +7814,7 @@ ACMD(resetstat)
return true;
}
-ACMD(resetskill)
-{
- nullpo_retr(-1,sd);
+ACMD(resetskill) {
pc->resetskill(sd,1);
sprintf(atcmd_output, msg_txt(206), sd->status.name);
@@ -8056,9 +7834,7 @@ ACMD(itemlist)
const struct item* items;
int size;
StringBuf buf;
-
- nullpo_retr(-1, sd);
-
+
if( strcmp(command+1, "storagelist") == 0 ) {
location = "storage";
items = sd->status.storage.items;
@@ -8258,14 +8034,11 @@ ACMD(stats)
return true;
}
-ACMD(delitem)
-{
+ACMD(delitem) {
char item_name[100];
int nameid, amount = 0, total, idx;
struct item_data* id;
-
- nullpo_retr(-1, sd);
-
+
if( !message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &amount) < 2 && sscanf(message, "%99s %d", item_name, &amount) < 2 ) || amount < 1 )
{
clif->message(fd, msg_txt(1355)); // Please enter an item name/ID, a quantity, and a player name (usage: #delitem <player> <item_name_or_ID> <quantity>).
@@ -8324,10 +8097,8 @@ ACMD(delitem)
/*==========================================
* Custom Fonts
*------------------------------------------*/
-ACMD(font)
-{
+ACMD(font) {
int font_id;
- nullpo_retr(-1,sd);
font_id = atoi(message);
if( font_id == 0 )
@@ -9678,24 +9449,39 @@ void atcommand_basecommands(void) {
ACMD_DEF(costume),
ACMD_DEF(skdebug),
};
- AtCommandInfo* cmd;
int i;
for( i = 0; i < ARRAYLENGTH(atcommand_base); i++ ) {
- if(atcommand->exists(atcommand_base[i].command)) { // Should not happen if atcommand_base[] array is OK
+ if(!atcommand->add(atcommand_base[i].command,atcommand_base[i].func)) { // Should not happen if atcommand_base[] array is OK
ShowDebug("atcommand_basecommands: duplicate ACMD_DEF for '%s'.\n", atcommand_base[i].command);
continue;
}
- CREATE(cmd, AtCommandInfo, 1);
- safestrncpy(cmd->command, atcommand_base[i].command, sizeof(cmd->command));
- cmd->func = atcommand_base[i].func;
- cmd->help = NULL;/* start as null dear */
- cmd->log = true;
- strdb_put(atcommand->db, cmd->command, cmd);
}
+
+ /* @commands from plugins */
+ HPM_map_atcommands();
+
return;
}
+bool atcommand_add(char *name,AtCommandFunc func) {
+ AtCommandInfo* cmd;
+
+ if(atcommand->exists(name)) //caller will handle/display on false
+ return false;
+
+ CREATE(cmd, AtCommandInfo, 1);
+
+ safestrncpy(cmd->command, name, sizeof(cmd->command));
+ cmd->func = func;
+ cmd->help = NULL;
+ cmd->log = true;
+
+ strdb_put(atcommand->db, cmd->command, cmd);
+
+ return true;
+}
+
/*==========================================
* Command lookup functions
*------------------------------------------*/
@@ -9881,6 +9667,9 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
sprintf(atcmd_msg, "%s", message);
}
+ if( battle_config.idletime_criteria & BCIDLE_ATCOMMAND )
+ sd->idletime = last_tick;
+
//Clearing these to be used once more.
memset(command, '\0', sizeof(command));
memset(params, '\0', sizeof(params));
@@ -10204,30 +9993,14 @@ bool atcommand_can_use2(struct map_session_data *sd, const char *command, AtComm
return false;
}
bool atcommand_hp_add(char *name, AtCommandFunc func) {
- AtCommandInfo* cmd;
-
+ /* if commands are added after group permissions are thrown in, they end up with no permissions */
+ /* so we restrict commands to be linked in during boot */
if( runflag == MAPSERVER_ST_RUNNING ) {
ShowDebug("atcommand_hp_add: Commands can't be added after server is ready, skipping '%s'...\n",name);
return false;
}
- if( atcommand->db == NULL )
- atcommand->db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, ATCOMMAND_LENGTH);
-
- if( atcommand->exists(name) ) {
- ShowDebug("atcommand_hp_add: duplicate command '%s', skipping...\n", name);
- return false;
- }
-
- CREATE(cmd, AtCommandInfo, 1);
-
- safestrncpy(cmd->command, name, sizeof(cmd->command));
- cmd->func = func;
- cmd->help = NULL;/* start as null dear */
- cmd->log = true;
-
- strdb_put(atcommand->db, cmd->command, cmd);
- return true;
+ return HPM_map_add_atcommand(name,func);
}
/**
@@ -10313,4 +10086,5 @@ void atcommand_defaults(void) {
atcommand->cmd_db_clear_sub = atcommand_db_clear_sub;
atcommand->doload = atcommand_doload;
atcommand->base_commands = atcommand_basecommands;
+ atcommand->add = atcommand_add;
}
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 603abc0cc..63c38e4d1 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -110,6 +110,7 @@ struct atcommand_interface {
int (*cmd_db_clear_sub) (DBKey key, DBData *data, va_list args);
void (*doload) (void);
void (*base_commands) (void);
+ bool (*add) (char *name, AtCommandFunc func);
};
struct atcommand_interface *atcommand;
diff --git a/src/map/battle.c b/src/map/battle.c
index fb950860e..050f3f26e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2938,27 +2938,6 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
if( sc->data[SC__DEADLYINFECT] && damage > 0 && rnd()%100 < 65 + 5 * sc->data[SC__DEADLYINFECT]->val1 )
status->change_spread(bl, src); // Deadly infect attacked side
-
- if( sc && sc->data[SC__SHADOWFORM] ) {
- struct block_list *s_bl = map->id2bl(sc->data[SC__SHADOWFORM]->val2);
- if( !s_bl || s_bl->m != bl->m ) { // If the shadow form target is not present remove the sc.
- status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
- } else if( status->isdead(s_bl) || !battle->check_target(src,s_bl,BCT_ENEMY)) { // If the shadow form target is dead or not your enemy remove the sc in both.
- status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
- if( s_bl->type == BL_PC )
- ((TBL_PC*)s_bl)->shadowform_id = 0;
- } else {
- if( (--sc->data[SC__SHADOWFORM]->val3) < 0 ) { // If you have exceded max hits supported, remove the sc in both.
- status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
- if( s_bl->type == BL_PC )
- ((TBL_PC*)s_bl)->shadowform_id = 0;
- } else {
- status->damage(bl, s_bl, damage, 0, clif->damage(s_bl, s_bl, timer->gettick(), 500, 500, damage, -1, 0, 0), 0);
- return ATK_NONE;
- }
- }
- }
-
}
//SC effects from caster side.
@@ -5533,7 +5512,13 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
}
map->freeblock_lock();
- battle->delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion, true);
+ if( skill->check_shadowform(target, damage, wd.div_) ){
+ if( !status->isdead(target) )
+ skill->additional_effect(src, target, 0, 0, wd.flag, wd.dmg_lv, tick);
+ if( wd.dmg_lv > ATK_BLOCK)
+ skill->counter_additional_effect(src, target, 0, 0, wd.flag,tick);
+ }else
+ battle->delay_damage(tick, wd.amotion, src, target, wd.flag, 0, 0, damage, wd.dmg_lv, wd.dmotion, true);
if( tsc ) {
if( tsc->data[SC_DEVOTION] ) {
struct status_change_entry *sce = tsc->data[SC_DEVOTION];
@@ -6485,6 +6470,7 @@ static const struct _battle_data {
{ "guild_notice_changemap", &battle_config.guild_notice_changemap, 2, 0, 2, },
{ "feature.banking", &battle_config.feature_banking, 1, 0, 1, },
{ "feature.auction", &battle_config.feature_auction, 0, 0, 2, },
+ { "idletime_criteria", &battle_config.idletime_criteria, 0x25, 1, INT_MAX, },
{ "mon_trans_disable_in_gvg", &battle_config.mon_trans_disable_in_gvg, 0, 0, 1, },
};
diff --git a/src/map/battle.h b/src/map/battle.h
index 1aa07b2be..a2212a647 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -454,7 +454,7 @@ struct Battle_Config {
int max_walk_path;
int item_enabled_npc;
int packet_obfuscation;
-
+ int idletime_criteria;
int gm_ignore_warpable_area;
int client_accept_chatdori; // [Ai4rei/Mirei]
@@ -467,6 +467,20 @@ struct Battle_Config {
int mon_trans_disable_in_gvg;
} battle_config;
+/* criteria for battle_config.idletime_critera */
+enum e_battle_config_idletime {
+ BCIDLE_WALK = 0x001,
+ BCIDLE_USESKILLTOID = 0x002,
+ BCIDLE_USESKILLTOPOS = 0x004,
+ BCIDLE_USEITEM = 0x008,
+ BCIDLE_ATTACK = 0x010,
+ BCIDLE_CHAT = 0x020,
+ BCIDLE_SIT = 0x040,
+ BCIDLE_EMOTION = 0x080,
+ BCIDLE_DROPITEM = 0x100,
+ BCIDLE_ATCOMMAND = 0x200,
+};
+
// Dammage delayed info
struct delay_damage {
int src_id;
diff --git a/src/map/clif.c b/src/map/clif.c
index 060509807..9c740d607 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9917,6 +9917,9 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
}
}
+ if( battle_config.idletime_criteria & BCIDLE_CHAT )
+ sd->idletime = last_tick;
+
if( sd->gcbind ) {
clif->chsys_send(sd->gcbind,sd,message);
return;
@@ -10077,6 +10080,9 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd)
return;
}
sd->emotionlasttime = time(NULL);
+
+ if( battle_config.idletime_criteria & BCIDLE_EMOTION )
+ sd->idletime = last_tick;
if(battle_config.client_reshuffle_dice && emoticon>=E_DICE1 && emoticon<=E_DICE6) {// re-roll dice
emoticon = rnd()%6+E_DICE1;
@@ -10151,7 +10157,8 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
}
pc->delinvincibletimer(sd);
- sd->idletime = last_tick;
+ if( battle_config.idletime_criteria & BCIDLE_ATTACK )
+ sd->idletime = last_tick;
unit->attack(&sd->bl, target_id, action_type != 0);
break;
case 0x02: // sitdown
@@ -10175,6 +10182,9 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
)) //No sitting during these states either.
break;
+ if( battle_config.idletime_criteria & BCIDLE_SIT )
+ sd->idletime = last_tick;
+
pc_setsit(sd);
skill->sit(sd,1);
clif->sitting(&sd->bl);
@@ -10185,6 +10195,10 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
clif->standing(&sd->bl);
return;
}
+
+ if( battle_config.idletime_criteria & BCIDLE_SIT )
+ sd->idletime = last_tick;
+
pc->setstand(sd);
skill->sit(sd,0);
clif->standing(&sd->bl);
@@ -10376,6 +10390,9 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd)
sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay;
}
+ if( battle_config.idletime_criteria & BCIDLE_CHAT )
+ sd->idletime = last_tick;
+
// Chat logging type 'W' / Whisper
logs->chat(LOG_CHAT_WHISPER, 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, target, message);
@@ -10594,6 +10611,9 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
if (!pc->dropitem(sd, item_index, item_amount))
break;
+ if( battle_config.idletime_criteria & BCIDLE_DROPITEM )
+ sd->idletime = last_tick;
+
return;
}
@@ -10619,7 +10639,8 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd)
return;
//Whether the item is used or not is irrelevant, the char ain't idle. [Skotlex]
- sd->idletime = last_tick;
+ if( battle_config.idletime_criteria & BCIDLE_USEITEM )
+ sd->idletime = last_tick;
n = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0])-2;
if(n <0 || n >= MAX_INVENTORY)
@@ -10664,6 +10685,9 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
return;
}
+ if( battle_config.idletime_criteria & BCIDLE_USEITEM )
+ sd->idletime = last_tick;
+
//Client doesn't send the position for ammo.
if(sd->inventory_data[index]->type == IT_AMMO)
pc->equipitem(sd,index,EQP_AMMO);
@@ -10781,6 +10805,9 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
index = RFIFOW(fd,2)-2;
+ if( battle_config.idletime_criteria & BCIDLE_USEITEM )
+ sd->idletime = last_tick;
+
pc->unequipitem(sd,index,1);
}
@@ -11330,7 +11357,8 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
}
// Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
- sd->idletime = last_tick;
+ if( battle_config.idletime_criteria & BCIDLE_USESKILLTOID )
+ sd->idletime = last_tick;
if( sd->npc_id || sd->state.workinprogress&1 ){
#ifdef RENEWAL
@@ -11430,7 +11458,8 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski
#endif
//Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex]
- sd->idletime = last_tick;
+ if( battle_config.idletime_criteria & BCIDLE_USESKILLTOPOS )
+ sd->idletime = last_tick;
if( skill->not_ok(skill_id, sd) )
return;
@@ -12185,6 +12214,9 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay;
}
+ if( battle_config.idletime_criteria & BCIDLE_CHAT )
+ sd->idletime = last_tick;
+
party->send_message(sd, text, textlen);
}
@@ -13140,6 +13172,9 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd)
sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay;
}
+ if( battle_config.idletime_criteria & BCIDLE_CHAT )
+ sd->idletime = last_tick;
+
if( sd->bg_id )
bg->send_message(sd, text, textlen);
else
@@ -16077,6 +16112,9 @@ void clif_parse_BattleChat(int fd, struct map_session_data* sd)
sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay;
}
+ if( battle_config.idletime_criteria & BCIDLE_CHAT )
+ sd->idletime = last_tick;
+
bg->send_message(sd, text, textlen);
}
@@ -17247,9 +17285,9 @@ void clif_parse_MoveItem(int fd, struct map_session_data *sd) {
/* [Ind/Hercules] */
void clif_cashshop_db(void) {
config_t cashshop_conf;
- config_setting_t *cashshop = NULL;
+ config_setting_t *cashshop = NULL, *cats = NULL;
const char *config_filename = "db/cashshop_db.conf"; // FIXME hardcoded name
- int i;
+ int i, item_count_t = 0;
for( i = 0; i < CASHSHOP_TAB_MAX; i++ ) {
CREATE(clif->cs.data[i], struct hCSData *, 1);
clif->cs.item_count[i] = 0;
@@ -17262,67 +17300,53 @@ void clif_cashshop_db(void) {
cashshop = config_lookup(&cashshop_conf, "cash_shop");
- if (cashshop != NULL) {
- config_setting_t *cats = config_setting_get_elem(cashshop, 0);
- config_setting_t *cat;
- int k, item_count_t = 0;
-
+ if( cashshop != NULL && (cats = config_setting_get_elem(cashshop, 0)) != NULL ) {
for(i = 0; i < CASHSHOP_TAB_MAX; i++) {
+ config_setting_t *cat;
char entry_name[10];
sprintf(entry_name,"cat_%d",i);
if( (cat = config_setting_get_member(cats, entry_name)) != NULL ) {
- int item_count = config_setting_length(cat);
+ int k, item_count = config_setting_length(cat);
- if( item_count == 0 ) {
- ShowWarning("cashshop_db: category '%s' is empty! adding dull apple!\n", entry_name);
- RECREATE(clif->cs.data[i], struct hCSData *, ++clif->cs.item_count[i]);
- CREATE(clif->cs.data[i][ clif->cs.item_count[i] - 1 ], struct hCSData , 1);
-
- clif->cs.data[i][ clif->cs.item_count[i] - 1 ]->id = UNKNOWN_ITEM_ID;
- clif->cs.data[i][ clif->cs.item_count[i] - 1 ]->price = 999;
- } else {
- for(k = 0; k < item_count; k++) {
- config_setting_t *entry = config_setting_get_elem(cat,k);
- const char *name = config_setting_name(entry);
- int price = config_setting_get_int(entry);
- struct item_data * data = NULL;
-
- if( price < 1 ) {
- ShowWarning("cashshop_db: unsupported price '%d' for entry named '%s' in category '%s'\n", price, name, entry_name);
+ for(k = 0; k < item_count; k++) {
+ config_setting_t *entry = config_setting_get_elem(cat,k);
+ const char *name = config_setting_name(entry);
+ int price = config_setting_get_int(entry);
+ struct item_data * data = NULL;
+
+ if( price < 1 ) {
+ ShowWarning("cashshop_db: unsupported price '%d' for entry named '%s' in category '%s'\n", price, name, entry_name);
+ continue;
+ }
+
+ if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) {
+ if( !( data = itemdb->exists(atoi(name+2))) ) {
+ ShowWarning("cashshop_db: unknown item id '%s' in category '%s'\n", name+2, entry_name);
continue;
}
-
- if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) {
- if( !( data = itemdb->exists(atoi(name+2))) ) {
- ShowWarning("cashshop_db: unknown item id '%s' in category '%s'\n", name+2, entry_name);
- continue;
- }
- } else {
- if( !( data = itemdb->search_name(name) ) ) {
- ShowWarning("cashshop_db: unknown item name '%s' in category '%s'\n", name, entry_name);
- continue;
- }
+ } else {
+ if( !( data = itemdb->search_name(name) ) ) {
+ ShowWarning("cashshop_db: unknown item name '%s' in category '%s'\n", name, entry_name);
+ continue;
}
-
-
- RECREATE(clif->cs.data[i], struct hCSData *, ++clif->cs.item_count[i]);
- CREATE(clif->cs.data[i][ clif->cs.item_count[i] - 1 ], struct hCSData , 1);
-
- clif->cs.data[i][ clif->cs.item_count[i] - 1 ]->id = data->nameid;
- clif->cs.data[i][ clif->cs.item_count[i] - 1 ]->price = price;
- item_count_t++;
}
+
+
+ RECREATE(clif->cs.data[i], struct hCSData *, ++clif->cs.item_count[i]);
+ CREATE(clif->cs.data[i][ clif->cs.item_count[i] - 1 ], struct hCSData , 1);
+
+ clif->cs.data[i][ clif->cs.item_count[i] - 1 ]->id = data->nameid;
+ clif->cs.data[i][ clif->cs.item_count[i] - 1 ]->price = price;
+ item_count_t++;
}
- } else {
- ShowError("cashshop_db: category '%s' (%d) not found!!\n",entry_name,i);
}
}
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", item_count_t, config_filename);
config_destroy(&cashshop_conf);
}
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", item_count_t, config_filename);
}
/// Items that are in favorite tab of inventory (ZC_ITEM_FAVORITE).
/// 0900 <index>.W <favorite>.B
@@ -17377,6 +17401,9 @@ void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) {
int i, j = 0;
for( i = 0; i < CASHSHOP_TAB_MAX; i++ ) {
+ if( clif->cs.item_count[i] == 0 )
+ continue; // Skip empty tabs, the client only expects filled ones
+
WFIFOHEAD(fd, 8 + ( clif->cs.item_count[i] * 6 ) );
WFIFOW(fd, 0) = 0x8ca;
WFIFOW(fd, 2) = 8 + ( clif->cs.item_count[i] * 6 );
@@ -17478,7 +17505,7 @@ void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) {
short tab = RFIFOW(fd, 2);
int j;
- if( tab < 0 || tab > CASHSHOP_TAB_MAX )
+ if( tab < 0 || tab > CASHSHOP_TAB_MAX || clif->cs.item_count[tab] == 0 )
return;
WFIFOHEAD(fd, 10 + ( clif->cs.item_count[tab] * 6 ) );
@@ -17744,12 +17771,13 @@ void clif_skill_cooldown_list(int fd, struct skill_cd* cd) {
for( i = 0; i < cd->cursor; i++ ) {
if( cd->entry[i]->duration < 1 ) continue;
- WFIFOW(fd, 4 + (count*offset)) = cd->entry[i]->skill_id;
- WFIFOL(fd, 6 + (count*offset)) = cd->entry[i]->duration;
+ WFIFOW(fd, 4 + (count*offset)) = cd->entry[i]->skill_id;
#if PACKETVER >= 20120604
+ WFIFOL(fd, 6 + (count*offset)) = cd->entry[i]->total;
WFIFOL(fd, 10 + (count*offset)) = cd->entry[i]->duration;
+#else
+ WFIFOL(fd, 6 + (count*offset)) = cd->entry[i]->duration;
#endif
-
count++;
}
diff --git a/src/map/guild.c b/src/map/guild.c
index 30f989f58..9b3eaaff8 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1365,7 +1365,7 @@ void guild_block_skill(struct map_session_data *sd, int time)
uint16 skill_id[] = { GD_BATTLEORDER, GD_REGENERATION, GD_RESTORE, GD_EMERGENCYCALL };
int i;
for (i = 0; i < 4; i++)
- skill->blockpc_start(sd, skill_id[i], time , true);
+ skill->blockpc_start(sd, skill_id[i], time);
}
/*====================================================
diff --git a/src/map/instance.c b/src/map/instance.c
index 6ae1d6141..045be5431 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -110,7 +110,10 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
instance->list[i].owner_id = owner_id;
instance->list[i].owner_type = type;
instance->list[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
-
+ instance->list[i].respawn.map = 0;
+ instance->list[i].respawn.y = 0;
+ instance->list[i].respawn.x = 0;
+
safestrncpy( instance->list[i].name, name, sizeof(instance->list[i].name) );
if( type != IOT_NONE ) {
@@ -242,6 +245,7 @@ int instance_add_map(const char *name, int instance_id, bool usebasename, const
map->list[im].m = im;
map->list[im].instance_id = instance_id;
map->list[im].instance_src_map = m;
+ map->list[im].flag.src4instance = 0; //clear
map->list[m].flag.src4instance = 1; // Flag this map as a src map for instances
RECREATE(instance->list[instance_id].map, unsigned short, ++instance->list[instance_id].num_map);
@@ -271,6 +275,21 @@ int instance_map2imap(int16 m, int instance_id) {
return -1;
}
+int instance_mapname2imap(const char *map_name, int instance_id) {
+ int i;
+
+ if( !instance->valid(instance_id) ) {
+ return -1;
+ }
+
+ for( i = 0; i < instance->list[instance_id].num_map; i++ ) {
+ if( instance->list[instance_id].map[i] && !strcmpi(map->list[map->list[instance->list[instance_id].map[i]].instance_src_map].name,map_name) )
+ return instance->list[instance_id].map[i];
+ }
+ return -1;
+}
+
+
/*--------------------------------------
* m : source map
* instance_id : where to search
@@ -291,7 +310,6 @@ int instance_mapid2imapid(int16 m, int instance_id) {
}
/*--------------------------------------
- * map_instance_map_npcsub
* Used on Init instance. Duplicates each script on source map
*--------------------------------------*/
int instance_map_npcsub(struct block_list* bl, va_list args) {
@@ -304,6 +322,19 @@ int instance_map_npcsub(struct block_list* bl, va_list args) {
return 1;
}
+int instance_init_npc(struct block_list* bl, va_list args) {
+ struct npc_data *nd = (struct npc_data*)bl;
+ struct event_data *ev;
+ char evname[EVENT_NAME_LENGTH];
+
+ snprintf(evname, EVENT_NAME_LENGTH, "%s::OnInstanceInit", nd->exname);
+
+ if( ( ev = strdb_get(npc->ev_db, evname) ) )
+ script->run(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id);
+
+ return 1;
+}
+
/*--------------------------------------
* Init all map on the instance. Npcs are created here
*--------------------------------------*/
@@ -314,8 +345,11 @@ void instance_init(int instance_id) {
return; // nothing to do
for( i = 0; i < instance->list[instance_id].num_map; i++ )
- map->foreachinmap(instance_map_npcsub, map->list[instance->list[instance_id].map[i]].instance_src_map, BL_NPC, instance->list[instance_id].map[i]);
+ map->foreachinmap(instance->map_npcsub, map->list[instance->list[instance_id].map[i]].instance_src_map, BL_NPC, instance->list[instance_id].map[i]);
+ /* cant be together with the previous because it will rely on all of them being up */
+ map->foreachininstance(instance->init_npc, instance_id, BL_NPC);
+
instance->list[instance_id].state = INSTANCE_BUSY;
}
@@ -566,9 +600,11 @@ void instance_set_timeout(int instance_id, unsigned int progress_timeout, unsign
if( progress_timeout ) {
instance->list[instance_id].progress_timeout = now + progress_timeout;
instance->list[instance_id].progress_timer = timer->add( timer->gettick() + progress_timeout * 1000, instance->destroy_timer, instance_id, 0);
+ instance->list[instance_id].original_progress_timeout = progress_timeout;
} else {
instance->list[instance_id].progress_timeout = 0;
instance->list[instance_id].progress_timer = INVALID_TIMER;
+ instance->list[instance_id].original_progress_timeout = 0;
}
if( idle_timeout ) {
@@ -600,6 +636,37 @@ void instance_check_kick(struct map_session_data *sd) {
}
}
+void do_reload_instance(void) {
+ struct s_mapiterator *iter;
+ struct map_session_data *sd;
+ int i, k;
+
+ for(i = 0; i < instance->instances; i++) {
+ for(k = 0; k < instance->list[i].num_map; k++) {
+ if( !map->list[map->list[instance->list[i].map[k]].instance_src_map].flag.src4instance )
+ break;
+ }
+
+ if( k != instance->list[i].num_map ) /* any (or all) of them were disabled, we destroy */
+ instance->destroy(i);
+ else {
+ /* populate the instance again */
+ instance->start(i);
+ /* restart timers */
+ instance->set_timeout(i,instance->list[i].original_progress_timeout,instance->list[i].idle_timeoutval);
+ }
+ }
+
+ iter = mapit_getallusers();
+ for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) {
+ if(sd && map->list[sd->bl.m].instance_id >= 0) {
+ pc->setpos(sd,instance->list[map->list[sd->bl.m].instance_id].respawn.map,instance->list[map->list[sd->bl.m].instance_id].respawn.x,instance->list[map->list[sd->bl.m].instance_id].respawn.y,CLR_TELEPORT);
+ }
+ }
+ mapit->free(iter);
+}
+
+
void do_final_instance(void) {
int i;
@@ -623,7 +690,7 @@ void instance_defaults(void) {
instance->init = do_init_instance;
instance->final = do_final_instance;
-
+ instance->reload = do_reload_instance;
/* start point */
instance->start_id = 0;
/* count */
@@ -636,6 +703,9 @@ void instance_defaults(void) {
instance->del_map = instance_del_map;
instance->map2imap = instance_map2imap;
instance->mapid2imapid = instance_mapid2imapid;
+ instance->mapname2imap = instance_mapname2imap;
+ instance->map_npcsub = instance_map_npcsub;
+ instance->init_npc = instance_init_npc;
instance->destroy = instance_destroy;
instance->start = instance_init;
instance->check_idle = instance_check_idle;
diff --git a/src/map/instance.h b/src/map/instance.h
index ba6d26d59..449ca42c6 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -40,11 +40,16 @@ struct instance_data {
int idle_timer;
unsigned int idle_timeout, idle_timeoutval;
+
+ unsigned int original_progress_timeout;
+
+ struct point respawn;/* reload spawn */
};
struct instance_interface {
void (*init) (void);
void (*final) (void);
+ void (*reload) (void);
/* start point */
unsigned short start_id;
unsigned short instances;/* count */
@@ -56,6 +61,9 @@ struct instance_interface {
void (*del_map) (int16 m);
int (*map2imap) (int16 m, int instance_id);
int (*mapid2imapid) (int16 m, int instance_id);
+ int (*mapname2imap) (const char *map_name, int instance_id);
+ int (*map_npcsub) (struct block_list* bl, va_list args);
+ int (*init_npc) (struct block_list* bl, va_list args);
void (*destroy) (int instance_id);
void (*start) (int instance_id);
void (*check_idle) (int instance_id);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 5c698b3c9..feb17ddc8 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1584,6 +1584,9 @@ int itemdb_parse_dbrow(char** str, const char* source, int line, int scriptopt)
if( nameid <= 0 ) {
ShowWarning("itemdb_parse_dbrow: Invalid id %d in line %d of \"%s\", skipping.\n", nameid, line, source);
return 0;
+ } else if ( nameid >= MAX_ITEMDB ) {
+ ShowWarning("itemdb_parse_dbrow: Invalid id %d in line %d of \"%s\", beyond MAX_ITEMDB, skipping.\n", nameid, line, source);
+ return 0;
}
//ID,Name,Jname,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Job Upper,Gender,Loc,wLV,eLV,refineable,View
diff --git a/src/map/map.c b/src/map/map.c
index d920875ee..749b9de81 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -88,8 +88,12 @@ int map_usercount(void) {
*------------------------------------------*/
int map_freeblock (struct block_list *bl) {
nullpo_retr(map->block_free_lock, bl);
+
if (map->block_free_lock == 0 || map->block_free_count >= block_free_max) {
- aFree(bl);
+ if( bl->type == BL_ITEM )
+ ers_free(map->flooritem_ers, bl);
+ else
+ aFree(bl);
bl = NULL;
if (map->block_free_count >= block_free_max)
ShowWarning("map_freeblock: too many free block! %d %d\n", map->block_free_count, map->block_free_lock);
@@ -109,11 +113,14 @@ int map_freeblock_lock (void) {
* Remove the lock on map_bl
*------------------------------------------*/
int map_freeblock_unlock (void) {
+
if ((--map->block_free_lock) == 0) {
int i;
- for (i = 0; i < map->block_free_count; i++)
- {
- aFree(map->block_free[i]);
+ for (i = 0; i < map->block_free_count; i++) {
+ if( map->block_free[i]->type == BL_ITEM )
+ ers_free(map->flooritem_ers, map->block_free[i]);
+ else
+ aFree(map->block_free[i]);
map->block_free[i] = NULL;
}
map->block_free_count = 0;
@@ -1330,7 +1337,7 @@ int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
void map_clearflooritem(struct block_list *bl) {
struct flooritem_data* fitem = (struct flooritem_data*)bl;
- if( fitem->cleartimer )
+ if( fitem->cleartimer != INVALID_TIMER )
timer->delete(fitem->cleartimer,map->clearflooritem_timer);
clif->clearflooritem(fitem, 0);
@@ -1470,15 +1477,16 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i
return 0;
r=rnd();
- CREATE(fitem, struct flooritem_data, 1);
- fitem->bl.type=BL_ITEM;
+ fitem = ers_alloc(map->flooritem_ers, struct flooritem_data);
+
+ fitem->bl.type = BL_ITEM;
fitem->bl.prev = fitem->bl.next = NULL;
- fitem->bl.m=m;
- fitem->bl.x=x;
- fitem->bl.y=y;
+ fitem->bl.m = m;
+ fitem->bl.x = x;
+ fitem->bl.y = y;
fitem->bl.id = map->get_new_object_id();
if(fitem->bl.id==0){
- aFree(fitem);
+ ers_free(map->flooritem_ers, fitem);
return 0;
}
@@ -4946,6 +4954,10 @@ void read_map_zone_db(void) {
}
}
+int map_get_new_bonus_id (void) {
+ return map->bonus_id++;
+}
+
/**
* @see DBApply
*/
@@ -5075,6 +5087,8 @@ void do_final(void)
map->list_final();
vending->final();
+ HPM_map_do_final();
+
map->map_db->destroy(map->map_db, map->db_final);
mapindex_final();
@@ -5092,6 +5106,7 @@ void do_final(void)
map->sql_close();
ers_destroy(map->iterator_ers);
+ ers_destroy(map->flooritem_ers);
aFree(map->list);
@@ -5470,7 +5485,10 @@ int do_init(int argc, char *argv[])
map->zone_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, MAP_ZONE_NAME_LENGTH);
map->iterator_ers = ers_new(sizeof(struct s_mapiterator),"map.c::map_iterator_ers",ERS_OPT_NONE);
-
+
+ map->flooritem_ers = ers_new(sizeof(struct flooritem_data),"map.c::map_flooritem_ers",ERS_OPT_NONE);
+ ers_chunk_size(map->flooritem_ers, 100);
+
map->sql_init();
if (logs->config.sql_logs)
logs->sql_init();
@@ -5634,6 +5652,10 @@ void map_defaults(void) {
map->iterator_ers = NULL;
map->cache_buffer = NULL;
+
+ map->flooritem_ers = NULL;
+ /* */
+ map->bonus_id = SP_LAST_KNOWN;
/* funcs */
map->zone_init = map_zone_init;
map->zone_remove = map_zone_remove;
@@ -5800,6 +5822,8 @@ void map_defaults(void) {
map->addblcell = map_addblcell;
map->delblcell = map_delblcell;
+
+ map->get_new_bonus_id = map_get_new_bonus_id;
/**
* mapit interface
diff --git a/src/map/map.h b/src/map/map.h
index 3a7990dcb..83d5aa5a8 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -406,7 +406,11 @@ enum _sp {
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_ADD_CLASS_DROP_ITEM, //2041-2045
SP_EMATK, SP_SP_GAIN_RACE_ATTACK, SP_HP_GAIN_RACE_ATTACK, SP_SKILL_USE_SP_RATE, //2046-2049
SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054
- SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST //2055-2058
+ SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST, //2055-2058
+
+
+ /* must be the last, plugins add bonuses from this value onwards */
+ SP_LAST_KNOWN,
};
enum _look {
@@ -854,6 +858,10 @@ struct map_interface {
/* [Ind/Hercules] */
struct eri *iterator_ers;
char *cache_buffer; // Has the uncompressed gat data of all maps, so just one allocation has to be made
+ /* */
+ struct eri *flooritem_ers;
+ /* */
+ int bonus_id;
/* funcs */
void (*zone_init) (void);
void (*zone_remove) (int m);
@@ -1020,6 +1028,7 @@ struct map_interface {
bool (*arg_next_value) (const char *option, int i, int argc);
void (*addblcell) (struct block_list *bl);
void (*delblcell) (struct block_list *bl);
+ int (*get_new_bonus_id) (void);
};
struct map_interface *map;
diff --git a/src/map/npc.c b/src/map/npc.c
index c52dce325..c536dc856 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3439,6 +3439,8 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].short_damage_rate = (state) ? atoi(w4) : 100;
} else if ( !strcmpi(w3,"long_damage_rate") ) {
map->list[m].long_damage_rate = (state) ? atoi(w4) : 100;
+ } else if ( !strcmpi(w3,"src4instance") ) {
+ map->list[m].flag.src4instance = (state) ? 1 : 0;
} else
ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer));
@@ -3784,10 +3786,8 @@ int npc_reload(void) {
npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
itemdb->name_constants();
-
- for(i = 0; i < instance->instances; i++) {
- instance->destroy(i);
- }
+
+ instance->reload();
map->zone_init();
diff --git a/src/map/pc.c b/src/map/pc.c
index 157d9e28a..b39ae1c59 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4791,6 +4791,14 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
stop = true;
}
}
+ /* we hit a instance, if empty we populate the spawn data */
+ if( map->list[m].instance_id >= 0 && instance->list[map->list[m].instance_id].respawn.map == 0 &&
+ instance->list[map->list[m].instance_id].respawn.x == 0 &&
+ instance->list[map->list[m].instance_id].respawn.y == 0) {
+ instance->list[map->list[m].instance_id].respawn.map = mapindex;
+ instance->list[map->list[m].instance_id].respawn.x = x;
+ instance->list[map->list[m].instance_id].respawn.y = y;
+ }
}
sd->state.changemap = (sd->mapindex != mapindex);
diff --git a/src/map/pc.h b/src/map/pc.h
index f770818c2..ff6246b22 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -225,7 +225,7 @@ struct map_session_data {
uint16 skill_id_old,skill_lv_old;
uint16 skill_id_dance,skill_lv_dance;
short cook_mastery; // range: [0,1999] [Inkfish]
- unsigned char blockskill[MAX_SKILL];
+ bool blockskill[MAX_SKILL];
int cloneskill_id, reproduceskill_id;
int menuskill_id, menuskill_val, menuskill_val2;
int invincible_timer;
diff --git a/src/map/script.c b/src/map/script.c
index c74eff07b..e6d23541a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -17455,6 +17455,74 @@ BUILDIN(bg_match_over) {
return true;
}
+
+BUILDIN(instance_mapname) {
+ const char *map_name;
+ int m;
+ short instance_id = -1;
+
+ map_name = script_getstr(st,2);
+
+ if( script_hasdata(st,3) )
+ instance_id = script_getnum(st,3);
+ else
+ instance_id = st->instance_id;
+
+ // Check that instance mapname is a valid map
+ if( instance_id == -1 || (m = instance->mapname2imap(map_name,instance_id)) == -1 )
+ script_pushconststr(st, "");
+ else
+ script_pushconststr(st, map->list[m].name);
+
+ return true;
+}
+/* modify an instances' reload-spawn point */
+/* instance_set_respawn <map_name>,<x>,<y>{,<instance_id>} */
+/* returns 1 when successful, 0 otherwise. */
+BUILDIN(instance_set_respawn) {
+ const char *map_name;
+ short instance_id = -1;
+ short mid;
+ short x,y;
+
+ map_name = script_getstr(st,2);
+ x = script_getnum(st, 3);
+ y = script_getnum(st, 4);
+
+ if( script_hasdata(st, 5) )
+ instance_id = script_getnum(st, 5);
+ else
+ instance_id = st->instance_id;
+
+ if( instance_id == -1 || !instance->valid(instance_id) )
+ script_pushint(st, 0);
+ else if( (mid = map->mapname2mapid(map_name)) == -1 ) {
+ ShowError("buildin_instance_set_respawn: unknown map '%s'\n",map_name);
+ script_pushint(st, 0);
+ } else {
+ int i;
+
+ for(i = 0; i < instance->list[instance_id].num_map; i++) {
+ if( map->list[instance->list[instance_id].map[i]].m == mid ) {
+ instance->list[instance_id].respawn.map = map_id2index(mid);
+ instance->list[instance_id].respawn.x = x;
+ instance->list[instance_id].respawn.y = y;
+ break;
+ }
+ }
+
+ if( i != instance->list[instance_id].num_map )
+ script_pushint(st, 1);
+ else {
+ ShowError("buildin_instance_set_respawn: map '%s' not part of instance '%s'\n",map_name,instance->list[instance_id].name);
+ script_pushint(st, 0);
+ }
+ }
+
+
+ return true;
+}
+
// declarations that were supposed to be exported from npc_chat.c
#ifdef PCRE_SUPPORT
BUILDIN(defpattern);
@@ -17920,6 +17988,9 @@ void script_parse_builtin(void) {
BUILDIN_DEF(has_instance,"s?"),
BUILDIN_DEF(instance_warpall,"sii?"),
BUILDIN_DEF(instance_check_party,"i???"),
+ BUILDIN_DEF(instance_mapname,"s?"),
+ BUILDIN_DEF(instance_set_respawn,"sii?"),
+
/**
* 3rd-related
**/
diff --git a/src/map/skill.c b/src/map/skill.c
index 4daf3f753..36a509876 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -460,7 +460,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
return 1;
}
- if (sd->blockskill[idx] > 0) {
+ if (sd->blockskill[idx]) {
clif->skill_fail(sd, skill_id, USESKILL_FAIL_SKILLINTERVAL, 0);
return 1;
}
@@ -1139,12 +1139,12 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
sc_start4(bl,SC_BURNING,100,skill_lv,0,src->id,0,skill->get_time2(skill_id,skill_lv));
break;
case WL_EARTHSTRAIN:
- {
- // lv 1 & 2 = Strip Helm, lv 3 = Strip Armor, lv 4 = Strip Weapon and lv 5 = Strip Accessory. [malufett]
- const int pos[5] = { EQP_HELM, EQP_HELM, EQP_ARMOR, EQP_WEAPON, EQP_ACC };
- skill->strip_equip(bl, pos[skill_lv], 6 * skill_lv + status->get_lv(src) / 4 + status_get_dex(src) / 10,
- skill_lv, skill->get_time2(skill_id,skill_lv));
- }
+ {
+ // lv 1 & 2 = Strip Helm, lv 3 = Strip Armor, lv 4 = Strip Weapon and lv 5 = Strip Accessory. [malufett]
+ const int pos[5] = { EQP_HELM, EQP_HELM, EQP_ARMOR, EQP_WEAPON, EQP_ACC };
+ skill->strip_equip(bl, pos[skill_lv-1], 6 * skill_lv + status->get_lv(src) / 4 + status_get_dex(src) / 10,
+ skill_lv, skill->get_time2(skill_id,skill_lv));
+ }
break;
case WL_JACKFROST:
sc_start(bl,SC_FREEZE,100,skill_lv,skill->get_time(skill_id,skill_lv));
@@ -2117,7 +2117,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
int type;
int64 damage;
int8 rmdamage=0;//magic reflected
- bool additional_effects = true;
+ bool additional_effects = true, shadow_flag = false;
if(skill_id > 0 && !skill_lv) return 0;
@@ -2574,10 +2574,12 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
if (ud && DIFF_TICK(ud->attackabletime, tick + type) < 0)
ud->attackabletime = tick + type;
}
+
+ shadow_flag = skill->check_shadowform(bl, damage, dmg.div_);
if( !dmg.amotion ) {
//Instant damage
- if( !sc || (!sc->data[SC_DEVOTION] && skill_id != CR_REFLECTSHIELD) )
+ if( (!sc || (!sc->data[SC_DEVOTION] && skill_id != CR_REFLECTSHIELD)) && !shadow_flag)
status_fix_damage(src,bl,damage,dmg.dmotion); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
if( !status->isdead(bl) && additional_effects )
skill->additional_effect(src,bl,skill_id,skill_lv,dmg.flag,dmg.dmg_lv,tick);
@@ -2657,8 +2659,15 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
}
//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
- if (dmg.amotion)
- battle->delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skill_id,skill_lv,damage,dmg.dmg_lv,dmg.dmotion, additional_effects);
+ if (dmg.amotion){
+ if( shadow_flag ){
+ if( !status->isdead(bl) && additional_effects )
+ skill->additional_effect(src,bl,skill_id,skill_lv,dmg.flag,dmg.dmg_lv,tick);
+ if( dmg.flag > ATK_BLOCK )
+ skill->counter_additional_effect(src,bl,skill_id,skill_lv,dmg.flag,tick);
+ }else
+ battle->delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skill_id,skill_lv,damage,dmg.dmg_lv,dmg.dmotion, additional_effects);
+ }
if( sc && sc->data[SC_DEVOTION] && skill_id != PA_PRESSURE ) {
struct status_change_entry *sce = sc->data[SC_DEVOTION];
@@ -3059,8 +3068,23 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
break; // Target not on Map
if(src->m != target->m)
break; // Different Maps
- if(status->isdead(src))
- break; // Caster is Dead
+ if(status->isdead(src)){
+ // Exceptions
+ switch(skl->skill_id){
+ case WL_CHAINLIGHTNING_ATK:
+ case WL_TETRAVORTEX_FIRE:
+ case WL_TETRAVORTEX_WATER:
+ case WL_TETRAVORTEX_WIND:
+ case WL_TETRAVORTEX_GROUND:
+ case SR_FLASHCOMBO_ATK_STEP1:
+ case SR_FLASHCOMBO_ATK_STEP2:
+ case SR_FLASHCOMBO_ATK_STEP3:
+ case SR_FLASHCOMBO_ATK_STEP4:
+ break;
+ default:
+ continue; // Caster is Dead
+ }
+ }
if(status->isdead(target) && skl->skill_id != RG_INTIMIDATE && skl->skill_id != WZ_WATERBALL)
break;
@@ -3134,7 +3158,7 @@ int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) {
if( skl->type == 4 ){
const enum sc_type scs[] = { SC_BURNING, SC_BLOODING, SC_FROSTMISTY, SC_STUN }; // status inflicts are depend on what summoned element is used.
int rate = skl->y, index = skl->x-1;
- sc_start2(target, scs[index], rate, skl->skill_lv, src->id, skill->get_time(WL_TETRAVORTEX,index));
+ sc_start2(target, scs[index], rate, skl->skill_lv, src->id, skill->get_time(WL_TETRAVORTEX,index+1));
}
break;
case WM_REVERBERATION_MELEE:
@@ -3285,6 +3309,17 @@ int skill_cleartimerskill (struct block_list *src)
for(i=0;i<MAX_SKILLTIMERSKILL;i++) {
if(ud->skilltimerskill[i]) {
+ switch(ud->skilltimerskill[i]->skill_id){
+ case WL_TETRAVORTEX_FIRE:
+ case WL_TETRAVORTEX_WATER:
+ case WL_TETRAVORTEX_WIND:
+ case WL_TETRAVORTEX_GROUND:
+ case SR_FLASHCOMBO_ATK_STEP1:
+ case SR_FLASHCOMBO_ATK_STEP2:
+ case SR_FLASHCOMBO_ATK_STEP3:
+ case SR_FLASHCOMBO_ATK_STEP4:
+ continue;
+ }
timer->delete(ud->skilltimerskill[i]->timer, skill->timerskill);
ers_free(skill->timer_ers, ud->skilltimerskill[i]);
ud->skilltimerskill[i]=NULL;
@@ -4185,7 +4220,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
}
}
if(cooldown)
- skill->blockpc_start(sd, skill_id, cooldown, false);
+ skill->blockpc_start(sd, skill_id, cooldown);
}else if( sc ){ // Summon Balls
int i = SC_SUMMON5;
for(; i >= SC_SUMMON1; i--){
@@ -4734,7 +4769,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
}
}
if(cooldown)
- skill->blockpc_start(sd, ud->skill_id, cooldown, false);
+ skill->blockpc_start(sd, ud->skill_id, cooldown);
}
if( battle_config.display_status_timers && sd )
clif->status_change(src, SI_POSTDELAY, 1, skill->delay_fix(src, ud->skill_id, ud->skill_lv), 0, 0, 0);
@@ -4785,7 +4820,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
sc->data[SC_SOULLINK]->val3 = 0; //Clear bounced spell check.
if( sc->data[SC_DANCING] && skill->get_inf2(ud->skill_id)&INF2_SONG_DANCE && sd )
- skill->blockpc_start(sd,BD_ADAPTATION,3000, false);
+ skill->blockpc_start(sd,BD_ADAPTATION,3000);
}
if( sd && ud->skill_id != SA_ABRACADABRA && ud->skill_id != WM_RANDOMIZESPELL ) // they just set the data so leave it as it is.[Inkfish]
@@ -5406,7 +5441,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
// Initiate 10% of your damage becomes fire element.
sc_start4(src,SC_SUB_WEAPONPROPERTY,100,3,20,0,0,skill->get_time2(skill_id, skill_lv));
if( sd )
- skill->blockpc_start(sd, skill_id, skill->get_time(skill_id, skill_lv), false);
+ skill->blockpc_start(sd, skill_id, skill->get_time(skill_id, skill_lv));
else if( bl->type == BL_MER )
skill->blockmerc_start((TBL_MER*)bl, skill_id, skill->get_time(skill_id, skill_lv));
break;
@@ -5575,7 +5610,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(src,bl,skill_id,skill_lv,
sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
if (sd)
- skill->blockpc_start (sd, skill_id, skill->get_time2(skill_id,skill_lv), false);
+ skill->blockpc_start (sd, skill_id, skill->get_time2(skill_id,skill_lv));
break;
case ALL_ANGEL_PROTECT:
@@ -7098,7 +7133,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
clif->skill_nodamage(src,bl,skill_id,skill_lv,
sc_start4(bl,type,100,skill_lv,skill_id,src->id,skill->get_time(skill_id,skill_lv),1000));
#ifndef RENEWAL
- if (sd) skill->blockpc_start (sd, skill_id, skill->get_time(skill_id, skill_lv)+3000, false);
+ if (sd) skill->blockpc_start (sd, skill_id, skill->get_time(skill_id, skill_lv)+3000);
#endif
break;
@@ -8873,7 +8908,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
duration = 9000;
break;
}
- skill->blockpc_start(sd, skill_id, duration, false);
+ skill->blockpc_start(sd, skill_id, duration);
}
break;
@@ -9430,7 +9465,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data) {
}
}
if(cooldown)
- skill->blockpc_start(sd, ud->skill_id, cooldown, false);
+ skill->blockpc_start(sd, ud->skill_id, cooldown);
}
if( battle_config.display_status_timers && sd )
clif->status_change(src, SI_POSTDELAY, 1, skill->delay_fix(src, ud->skill_id, ud->skill_lv), 0, 0, 0);
@@ -9908,7 +9943,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
clif->skill_poseffect(src,skill_id,skill_lv,src->x,src->y,tick);
#endif
if (sd)
- skill->blockpc_start (sd, MO_EXTREMITYFIST, 2000, false);
+ skill->blockpc_start (sd, MO_EXTREMITYFIST, 2000);
}
break;
case NJ_SHADOWJUMP:
@@ -15046,6 +15081,39 @@ bool skill_check_camouflage(struct block_list *bl, struct status_change_entry *s
return wall;
}
+bool skill_check_shadowform(struct block_list *bl, int64 damage, int hit){
+ struct status_change *sc;
+ struct block_list *src;
+
+ nullpo_retr(false, bl);
+
+ sc = status->get_sc(bl);
+
+ if( sc && sc->data[SC__SHADOWFORM] && damage ) {
+ src = map->id2bl(sc->data[SC__SHADOWFORM]->val2);
+
+ if( !src || src->m != bl->m ) {
+ status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
+ return false;
+ }
+
+ if( src && (status->isdead(src) || !battle->check_target(bl,src,BCT_ENEMY)) ){
+ if( src->type == BL_PC )
+ ((TBL_PC*)src)->shadowform_id = 0;
+ status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
+ return false;
+ }
+
+ status->damage(bl, src, damage, 0, clif->damage(src, src, timer->gettick(), 500, 500, damage, hit, (hit > 1 ? 8 : 0), 0), 0);
+ if( (--sc->data[SC__SHADOWFORM]->val3) <= 0 ) {
+ status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
+ if( src->type == BL_PC )
+ ((TBL_PC*)src)->shadowform_id = 0;
+ }
+ return true;
+ }
+ return false;
+}
/*==========================================
*
*------------------------------------------*/
@@ -16918,7 +16986,8 @@ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
if (data <= 0 || data >= MAX_SKILL)
return 0;
- if (!sd) return 0;
+ if (!sd || !sd->blockskill[data])
+ return 0;
if( ( cd = idb_get(skill->cd_db,sd->status.char_id) ) ) {
int i;
@@ -16952,22 +17021,21 @@ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
}
}
- if (sd->blockskill[data] != (0x1|(tid&0xFE))) return 0;
-
- sd->blockskill[data] = 0;
+ sd->blockskill[data] = false;
return 1;
}
/**
* flags a singular skill as being blocked from persistent usage.
* @param sd the player the skill delay affects
- * @param skill_id the skill which should be delayed
+ * @param skill_id the skill which should be delayed
* @param tick the length of time the delay should last
- * @param load whether this assignment is being loaded upon player login
* @return 0 if successful, -1 otherwise
*/
-int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick, bool load) {
+int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick) {
+ struct skill_cd* cd = NULL;
uint16 idx = skill->get_index(skill_id);
+ unsigned int now = timer->gettick();
nullpo_retr (-1, sd);
@@ -16975,49 +17043,59 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick,
return -1;
if (tick < 1) {
- sd->blockskill[idx] = 0;
+ sd->blockskill[idx] = false;
return -1;
}
- if( !load && battle_config.display_status_timers )
+ if( battle_config.display_status_timers )
clif->skill_cooldown(sd, skill_id, tick);
-
- if( !load ) {// not being loaded initially so ensure the skill delay is recorded
- struct skill_cd* cd = NULL;
+
+ if( !(cd = idb_get(skill->cd_db,sd->status.char_id)) ) {// create a new skill cooldown object for map storage
+ cd = ers_alloc(skill->cd_ers, struct skill_cd);
+
+ cd->cursor = 0;
+ memset(cd->entry, 0, sizeof(cd->entry));
+
+ idb_put( skill->cd_db, sd->status.char_id, cd );
+ } else {
int i;
- if( !(cd = idb_get(skill->cd_db,sd->status.char_id)) ) {// create a new skill cooldown object for map storage
- cd = ers_alloc(skill->cd_ers, struct skill_cd);
-
- cd->cursor = 0;
- memset(cd->entry, 0, sizeof(cd->entry));
-
- idb_put( skill->cd_db, sd->status.char_id, cd );
- }
-
for(i = 0; i < MAX_SKILL_TREE; i++) {
- if( !cd->entry[i] )
+ if( cd->entry[i] && cd->entry[i]->skidx == idx )
break;
}
-
- if( i == MAX_SKILL_TREE ) {
- ShowError("skill_blockpc_start: '%s' got over '%d' skill cooldowns, no room to save!\n",sd->status.name,MAX_SKILL_TREE);
- } else {
- cd->entry[cd->cursor] = ers_alloc(skill->cd_entry_ers,struct skill_cd_entry);
-
- cd->entry[cd->cursor]->duration = tick;
+
+ if( i != MAX_SKILL_TREE ) {/* duplicate, update necessary */
+ cd->entry[i]->duration = tick;
#if PACKETVER >= 20120604
- cd->entry[cd->cursor]->total = tick;
+ cd->entry[i]->total = tick;
#endif
- cd->entry[cd->cursor]->skidx = idx;
- cd->entry[cd->cursor]->skill_id = skill_id;
- cd->entry[cd->cursor]->started = timer->gettick();
-
- cd->cursor++;
+ cd->entry[i]->started = now;
+ timer->settick(cd->entry[i]->timer,now+tick);
+ return 0;
}
+
+ }
+
+ if( cd->cursor == MAX_SKILL_TREE ) {
+ ShowError("skill_blockpc_start: '%s' got over '%d' skill cooldowns, no room to save!\n",sd->status.name,MAX_SKILL_TREE);
+ return -1;
}
+
+ cd->entry[cd->cursor] = ers_alloc(skill->cd_entry_ers,struct skill_cd_entry);
+
+ cd->entry[cd->cursor]->duration = tick;
+#if PACKETVER >= 20120604
+ cd->entry[cd->cursor]->total = tick;
+#endif
+ cd->entry[cd->cursor]->skidx = idx;
+ cd->entry[cd->cursor]->skill_id = skill_id;
+ cd->entry[cd->cursor]->started = now;
+ cd->entry[cd->cursor]->timer = timer->add(now+tick,skill->blockpc_end,sd->bl.id,idx);
+
+ cd->cursor++;
- sd->blockskill[idx] = 0x1|(0xFE&timer->add(timer->gettick()+tick,skill->blockpc_end,sd->bl.id,idx));
+ sd->blockskill[idx] = true;
return 0;
}
@@ -17528,6 +17606,10 @@ void skill_cooldown_save(struct map_session_data * sd) {
// process each individual cooldown associated with the character
for( i = 0; i < cd->cursor; i++ ) {
cd->entry[i]->duration = DIFF_TICK(cd->entry[i]->started+cd->entry[i]->duration,now);
+ if( cd->entry[i]->timer != INVALID_TIMER ) {
+ timer->delete(cd->entry[i]->timer,skill->blockpc_end);
+ cd->entry[i]->timer = INVALID_TIMER;
+ }
}
}
@@ -17554,8 +17636,8 @@ void skill_cooldown_load(struct map_session_data * sd) {
// process each individual cooldown associated with the character
for( i = 0; i < cd->cursor; i++ ) {
cd->entry[i]->started = now;
- // block the skill from usage but ensure it is not recorded (load = true)
- skill->blockpc_start( sd, cd->entry[i]->skill_id, cd->entry[i]->duration, true );
+ cd->entry[i]->timer = timer->add(timer->gettick()+cd->entry[i]->duration,skill->blockpc_end,sd->bl.id,cd->entry[i]->skidx);
+ sd->blockskill[cd->entry[i]->skidx] = true;
}
}
@@ -18292,4 +18374,5 @@ void skill_defaults(void) {
skill->cooldown_save = skill_cooldown_save;
skill->maelstrom_suction = skill_maelstrom_suction;
skill->get_new_group_id = skill_get_new_group_id;
+ skill->check_shadowform = skill_check_shadowform;
}
diff --git a/src/map/skill.h b/src/map/skill.h
index 0f89cd3be..c968eebde 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -909,7 +909,14 @@ enum e_skill {
NPC_VENOMFOG,
NPC_MILLENNIUMSHIELD,
NPC_COMET,
-
+ NPC_WIDEWEB,
+ NPC_WIDESUCK,
+ NPC_STORMGUST2,
+ NPC_FIRESTORM,
+ NPC_REVERBERATION,
+ NPC_REVERBERATION_ATK,
+ NPC_LEX_AETERNA,
+
KN_CHARGEATK = 1001,
CR_SHRINK,
AS_SONICACCEL,
@@ -1271,7 +1278,7 @@ enum e_skill {
RL_R_TRIP_PLUSATK,
RL_B_FLICKER_ATK,
RL_GLITTERING_GREED_ATK,
-
+
KO_YAMIKUMO = 3001,
KO_RIGHT,
KO_LEFT,
@@ -1740,10 +1747,11 @@ struct s_skill_magicmushroom_db {
struct skill_cd_entry {
int duration;//milliseconds
#if PACKETVER >= 20120604
- int total;
+ int total;/* used for display on newer clients */
#endif
short skidx;//the skill index entries belong to
- unsigned int started;
+ unsigned int started;/* gettick() of when it started, used vs duration to measure how much left upon logout */
+ int timer;/* timer id */
uint16 skill_id;//skill id
};
@@ -1927,7 +1935,7 @@ struct skill_interface {
int (*castend_nodamage_id) ( struct block_list *src, struct block_list *bl,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag );
int (*castend_damage_id) ( struct block_list* src, struct block_list *bl,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag );
int (*castend_pos2) ( struct block_list *src, int x,int y,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag);
- int (*blockpc_start) (struct map_session_data *sd, uint16 skill_id, int tick, bool load);
+ int (*blockpc_start) (struct map_session_data *sd, uint16 skill_id, int tick);
int (*blockhomun_start) (struct homun_data *hd, uint16 skill_id, int tick);
int (*blockmerc_start) (struct mercenary_data *md, uint16 skill_id, int tick);
int (*attack) ( int attack_type, struct block_list* src, struct block_list *dsrc,struct block_list *bl,uint16 skill_id,uint16 skill_lv,unsigned int tick,int flag );
@@ -2011,6 +2019,7 @@ struct skill_interface {
void (*cooldown_save) (struct map_session_data * sd);
int (*maelstrom_suction) (struct block_list *bl, va_list ap);
int (*get_new_group_id) (void);
+ bool (*check_shadowform) (struct block_list *bl, int64 damage, int hit);
};
struct skill_interface *skill;
diff --git a/src/map/status.c b/src/map/status.c
index 8a2ac7cd6..5f6444971 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6497,46 +6497,46 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) // Confirmed.
return 0; // Immune to status ailements
switch( type ) {
- case SC_QUAGMIRE://Tester said it protects against this and decrease agi.
- case SC_DEC_AGI:
- case SC_BURNING:
- case SC_FROSTMISTY:
+ case SC_QUAGMIRE://Tester said it protects against this and decrease agi.
+ case SC_DEC_AGI:
+ case SC_BURNING:
+ case SC_FROSTMISTY:
//case SC_WHITEIMPRISON://Need confirm. Protected against this in the past. [Rytech]
- case SC_MARSHOFABYSS:
- case SC_TOXIN:
- case SC_PARALYSE:
- case SC_VENOMBLEED:
- case SC_MAGICMUSHROOM:
- case SC_DEATHHURT:
- case SC_PYREXIA:
- case SC_OBLIVIONCURSE:
- case SC_LEECHESEND:
- case SC_COLD: ////08/31/2011 - Class Balance Changes
- case SC_DEEP_SLEEP:
- case SC_MANDRAGORA:
- return 0;
+ case SC_MARSHOFABYSS:
+ case SC_TOXIN:
+ case SC_PARALYSE:
+ case SC_VENOMBLEED:
+ case SC_MAGICMUSHROOM:
+ case SC_DEATHHURT:
+ case SC_PYREXIA:
+ case SC_OBLIVIONCURSE:
+ case SC_LEECHESEND:
+ case SC_COLD: ////08/31/2011 - Class Balance Changes
+ case SC_DEEP_SLEEP:
+ case SC_MANDRAGORA:
+ return 0;
}
} else if( sc->data[SC_INSPIRATION] ) {
if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX )
return 0; // Immune to status ailements
switch( type ) {
- case SC_DEEP_SLEEP:
- case SC_SATURDAY_NIGHT_FEVER:
- case SC_PYREXIA:
- case SC_DEATHHURT:
- case SC_MAGICMUSHROOM:
- case SC_VENOMBLEED:
- case SC_TOXIN:
- case SC_OBLIVIONCURSE:
- case SC_LEECHESEND:
- case SC__ENERVATION:
- case SC__GROOMY:
- case SC__LAZINESS:
- case SC__UNLUCKY:
- case SC__WEAKNESS:
- case SC__BODYPAINT:
- case SC__IGNORANCE:
- return 0;
+ case SC_DEEP_SLEEP:
+ case SC_SATURDAY_NIGHT_FEVER:
+ case SC_PYREXIA:
+ case SC_DEATHHURT:
+ case SC_MAGICMUSHROOM:
+ case SC_VENOMBLEED:
+ case SC_TOXIN:
+ case SC_OBLIVIONCURSE:
+ case SC_LEECHESEND:
+ case SC__ENERVATION:
+ case SC__GROOMY:
+ case SC__LAZINESS:
+ case SC__UNLUCKY:
+ case SC__WEAKNESS:
+ case SC__BODYPAINT:
+ case SC__IGNORANCE:
+ return 0;
}
}
@@ -6551,292 +6551,292 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
undead_flag = battle->check_undead(st->race,st->def_ele);
//Check for inmunities / sc fails
switch (type) {
- case SC_DRUMBATTLE:
- case SC_NIBELUNGEN:
- case SC_INTOABYSS:
- case SC_SIEGFRIED:
- if( bl->type == BL_PC) {
- struct map_session_data *sd = BL_CAST(BL_PC,bl);
- if (!sd->status.party_id) return 0;
- }
- break;
- case SC_ANGRIFFS_MODUS:
- case SC_GOLDENE_FERSE:
- if ((type==SC_GOLDENE_FERSE && sc->data[SC_ANGRIFFS_MODUS])
- || (type==SC_ANGRIFFS_MODUS && sc->data[SC_GOLDENE_FERSE])
- )
- return 0;
- case SC_STONE:
- if(sc->data[SC_POWER_OF_GAIA])
- return 0;
- case SC_FREEZE:
- //Undead are immune to Freeze/Stone
- if (undead_flag && !(flag&1))
- return 0;
- case SC_DEEP_SLEEP:
- case SC_SLEEP:
- case SC_STUN:
- case SC_FROSTMISTY:
- case SC_COLD:
- if (sc->opt1)
- return 0; //Cannot override other opt1 status changes. [Skotlex]
- if((type == SC_FREEZE || type == SC_FROSTMISTY || type == SC_COLD) && sc->data[SC_WARMER])
- return 0; //Immune to Frozen and Freezing status if under Warmer status. [Jobbie]
- break;
+ case SC_DRUMBATTLE:
+ case SC_NIBELUNGEN:
+ case SC_INTOABYSS:
+ case SC_SIEGFRIED:
+ if( bl->type == BL_PC) {
+ struct map_session_data *sd = BL_CAST(BL_PC,bl);
+ if (!sd->status.party_id) return 0;
+ }
+ break;
+ case SC_ANGRIFFS_MODUS:
+ case SC_GOLDENE_FERSE:
+ if ((type==SC_GOLDENE_FERSE && sc->data[SC_ANGRIFFS_MODUS])
+ || (type==SC_ANGRIFFS_MODUS && sc->data[SC_GOLDENE_FERSE])
+ )
+ return 0;
+ case SC_STONE:
+ if(sc->data[SC_POWER_OF_GAIA])
+ return 0;
+ case SC_FREEZE:
+ //Undead are immune to Freeze/Stone
+ if (undead_flag && !(flag&1))
+ return 0;
+ case SC_DEEP_SLEEP:
+ case SC_SLEEP:
+ case SC_STUN:
+ case SC_FROSTMISTY:
+ case SC_COLD:
+ if (sc->opt1)
+ return 0; //Cannot override other opt1 status changes. [Skotlex]
+ if((type == SC_FREEZE || type == SC_FROSTMISTY || type == SC_COLD) && sc->data[SC_WARMER])
+ return 0; //Immune to Frozen and Freezing status if under Warmer status. [Jobbie]
+ break;
- //There all like berserk, do not everlap each other
- case SC_BERSERK:
- if( sc->data[SC__BLOODYLUST] || sc->data[SC_SATURDAY_NIGHT_FEVER] )
- return 0;
- break;
+ //There all like berserk, do not everlap each other
+ case SC_BERSERK:
+ if( sc->data[SC__BLOODYLUST] || sc->data[SC_SATURDAY_NIGHT_FEVER] )
+ return 0;
+ break;
- case SC_BURNING:
- if(sc->opt1 || sc->data[SC_FROSTMISTY])
- return 0;
- break;
+ case SC_BURNING:
+ if(sc->opt1 || sc->data[SC_FROSTMISTY])
+ return 0;
+ break;
- case SC_CRUCIS:
- //Only affects demons and undead element (but not players)
- if((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC)
- return 0;
- break;
- case SC_LEXAETERNA:
- if( (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) || sc->data[SC_FREEZE] )
- return 0;
- break;
- case SC_KYRIE:
- if (bl->type == BL_MOB)
- return 0;
- break;
- case SC_OVERTHRUST:
- if (sc->data[SC_OVERTHRUSTMAX])
- return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex]
- case SC_OVERTHRUSTMAX:
- if( sc->option&OPTION_MADOGEAR )
- return 0;//Overthrust and Overthrust Max cannot be used on Mado Gear [Ind]
- break;
- case SC_ADRENALINE:
- if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE)))
- return 0;
- if (sc->data[SC_QUAGMIRE] ||
- sc->data[SC_DEC_AGI] ||
- sc->option&OPTION_MADOGEAR //Adrenaline doesn't affect Mado Gear [Ind]
+ case SC_CRUCIS:
+ //Only affects demons and undead element (but not players)
+ if((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC)
+ return 0;
+ break;
+ case SC_LEXAETERNA:
+ if( (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) || sc->data[SC_FREEZE] )
+ return 0;
+ break;
+ case SC_KYRIE:
+ if (bl->type == BL_MOB)
+ return 0;
+ break;
+ case SC_OVERTHRUST:
+ if (sc->data[SC_OVERTHRUSTMAX])
+ return 0; //Overthrust can't take effect if under Max Overthrust. [Skotlex]
+ case SC_OVERTHRUSTMAX:
+ if( sc->option&OPTION_MADOGEAR )
+ return 0;//Overthrust and Overthrust Max cannot be used on Mado Gear [Ind]
+ break;
+ case SC_ADRENALINE:
+ if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE)))
+ return 0;
+ if (sc->data[SC_QUAGMIRE] ||
+ sc->data[SC_DEC_AGI] ||
+ sc->option&OPTION_MADOGEAR //Adrenaline doesn't affect Mado Gear [Ind]
+ )
+ return 0;
+ break;
+ case SC_ADRENALINE2:
+ if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE2)))
+ return 0;
+ if (sc->data[SC_QUAGMIRE] ||
+ sc->data[SC_DEC_AGI]
)
- return 0;
- break;
- case SC_ADRENALINE2:
- if(sd && !pc_check_weapontype(sd,skill->get_weapontype(BS_ADRENALINE2)))
- return 0;
- if (sc->data[SC_QUAGMIRE] ||
- sc->data[SC_DEC_AGI]
- )
- return 0;
- break;
- case SC_MAGNIFICAT:
- if( sc->data[SC_OFFERTORIUM] || sc->option&OPTION_MADOGEAR ) //Mado is immune to magnificat
- return 0;
- break;
- case SC_ONEHANDQUICKEN:
- case SC_MER_QUICKEN:
- case SC_TWOHANDQUICKEN:
- if(sc->data[SC_DEC_AGI])
- return 0;
+ return 0;
+ break;
+ case SC_MAGNIFICAT:
+ if( sc->data[SC_OFFERTORIUM] || sc->option&OPTION_MADOGEAR ) //Mado is immune to magnificat
+ return 0;
+ break;
+ case SC_ONEHANDQUICKEN:
+ case SC_MER_QUICKEN:
+ case SC_TWOHANDQUICKEN:
+ if(sc->data[SC_DEC_AGI])
+ return 0;
- case SC_CONCENTRATION:
- case SC_SPEARQUICKEN:
- case SC_TRUESIGHT:
- case SC_WINDWALK:
- case SC_CARTBOOST:
- case SC_ASSNCROS:
- if(sc->option&OPTION_MADOGEAR)
- return 0;//Mado is immune to wind walk, cart boost, etc (others above) [Ind]
- case SC_INC_AGI:
- if (sc->data[SC_QUAGMIRE])
- return 0;
- break;
- case SC_CLOAKING:
- //Avoid cloaking with no wall and low skill level. [Skotlex]
- //Due to the cloaking card, we have to check the wall versus to known
- //skill level rather than the used one. [Skotlex]
- //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL))
- if( sd && pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(bl,NULL) )
- return 0;
- break;
- case SC_MODECHANGE:
- {
- int mode;
- struct status_data *bst = status->get_base_status(bl);
- if (!bst) return 0;
- if (sc->data[type]) {
- //Pile up with previous values.
- if(!val2) val2 = sc->data[type]->val2;
- val3 |= sc->data[type]->val3;
- val4 |= sc->data[type]->val4;
- }
- mode = val2 ? val2 : bst->mode; //Base mode
- if (val4) mode&=~val4; //Del mode
- if (val3) mode|= val3; //Add mode
- if (mode == bst->mode) { //No change.
- if (sc->data[type]) //Abort previous status
- return status_change_end(bl, type, INVALID_TIMER);
- return 0;
- }
- }
- break;
- //Strip skills, need to divest something or it fails.
- case SC_NOEQUIPWEAPON:
- if (sd && !(flag&4)) { //apply sc anyway if loading saved sc_data
- int i;
- opt_flag = 0; //Reuse to check success condition.
- if(sd->bonus.unstripable_equip&EQP_WEAPON)
+ case SC_CONCENTRATION:
+ case SC_SPEARQUICKEN:
+ case SC_TRUESIGHT:
+ case SC_WINDWALK:
+ case SC_CARTBOOST:
+ case SC_ASSNCROS:
+ if(sc->option&OPTION_MADOGEAR)
+ return 0;//Mado is immune to wind walk, cart boost, etc (others above) [Ind]
+ case SC_INC_AGI:
+ if (sc->data[SC_QUAGMIRE])
+ return 0;
+ break;
+ case SC_CLOAKING:
+ //Avoid cloaking with no wall and low skill level. [Skotlex]
+ //Due to the cloaking card, we have to check the wall versus to known
+ //skill level rather than the used one. [Skotlex]
+ //if (sd && val1 < 3 && skill_check_cloaking(bl,NULL))
+ if( sd && pc->checkskill(sd, AS_CLOAKING) < 3 && !skill->check_cloaking(bl,NULL) )
+ return 0;
+ break;
+ case SC_MODECHANGE:
+ {
+ int mode;
+ struct status_data *bst = status->get_base_status(bl);
+ if (!bst) return 0;
+ if (sc->data[type]) {
+ //Pile up with previous values.
+ if(!val2) val2 = sc->data[type]->val2;
+ val3 |= sc->data[type]->val3;
+ val4 |= sc->data[type]->val4;
+ }
+ mode = val2 ? val2 : bst->mode; //Base mode
+ if (val4) mode&=~val4; //Del mode
+ if (val3) mode|= val3; //Add mode
+ if (mode == bst->mode) { //No change.
+ if (sc->data[type]) //Abort previous status
+ return status_change_end(bl, type, INVALID_TIMER);
return 0;
+ }
+ }
+ break;
+ //Strip skills, need to divest something or it fails.
+ case SC_NOEQUIPWEAPON:
+ if (sd && !(flag&4)) { //apply sc anyway if loading saved sc_data
+ int i;
+ opt_flag = 0; //Reuse to check success condition.
+ if(sd->bonus.unstripable_equip&EQP_WEAPON)
+ return 0;
- i = sd->equip_index[EQI_HAND_R];
- if (i>=0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_WEAPON) {
- opt_flag|=2;
+ i = sd->equip_index[EQI_HAND_R];
+ if (i>=0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_WEAPON) {
+ opt_flag|=2;
+ pc->unequipitem(sd,i,3);
+ }
+ if (!opt_flag) return 0;
+ }
+ if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
+ break;
+ case SC_NOEQUIPSHIELD:
+ if( val2 == 1 ) val2 = 0; //GX effect. Do not take shield off..
+ else
+ if (sd && !(flag&4)) {
+ int i;
+ if(sd->bonus.unstripable_equip&EQP_SHIELD)
+ return 0;
+ i = sd->equip_index[EQI_HAND_L];
+ if ( i < 0 || !sd->inventory_data[i] || sd->inventory_data[i]->type != IT_ARMOR )
+ return 0;
+ pc->unequipitem(sd,i,3);
+ }
+ if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
+ break;
+ case SC_NOEQUIPARMOR:
+ if (sd && !(flag&4)) {
+ int i;
+ if(sd->bonus.unstripable_equip&EQP_ARMOR)
+ return 0;
+ i = sd->equip_index[EQI_ARMOR];
+ if ( i < 0 || !sd->inventory_data[i] )
+ return 0;
pc->unequipitem(sd,i,3);
}
- if (!opt_flag) return 0;
- }
- if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
- break;
- case SC_NOEQUIPSHIELD:
- if( val2 == 1 ) val2 = 0; //GX effect. Do not take shield off..
- else
+ if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
+ break;
+ case SC_NOEQUIPHELM:
if (sd && !(flag&4)) {
int i;
- if(sd->bonus.unstripable_equip&EQP_SHIELD)
+ if(sd->bonus.unstripable_equip&EQP_HELM)
return 0;
- i = sd->equip_index[EQI_HAND_L];
- if ( i < 0 || !sd->inventory_data[i] || sd->inventory_data[i]->type != IT_ARMOR )
+ i = sd->equip_index[EQI_HEAD_TOP];
+ if ( i < 0 || !sd->inventory_data[i] )
return 0;
pc->unequipitem(sd,i,3);
}
if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
break;
- case SC_NOEQUIPARMOR:
- if (sd && !(flag&4)) {
- int i;
- if(sd->bonus.unstripable_equip&EQP_ARMOR)
+ case SC_MER_FLEE:
+ case SC_MER_ATK:
+ case SC_MER_HP:
+ case SC_MER_SP:
+ case SC_MER_HIT:
+ if( bl->type != BL_MER )
+ return 0; // Stats only for Mercenaries
+ break;
+ case SC_FOOD_STR:
+ if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > val1)
return 0;
- i = sd->equip_index[EQI_ARMOR];
- if ( i < 0 || !sd->inventory_data[i] )
+ break;
+ case SC_FOOD_AGI:
+ if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 > val1)
return 0;
- pc->unequipitem(sd,i,3);
- }
- if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
- break;
- case SC_NOEQUIPHELM:
- if (sd && !(flag&4)) {
- int i;
- if(sd->bonus.unstripable_equip&EQP_HELM)
+ break;
+ case SC_FOOD_VIT:
+ if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 > val1)
return 0;
- i = sd->equip_index[EQI_HEAD_TOP];
- if ( i < 0 || !sd->inventory_data[i] )
+ break;
+ case SC_FOOD_INT:
+ if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > val1)
return 0;
- pc->unequipitem(sd,i,3);
- }
- if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
- break;
- case SC_MER_FLEE:
- case SC_MER_ATK:
- case SC_MER_HP:
- case SC_MER_SP:
- case SC_MER_HIT:
- if( bl->type != BL_MER )
- return 0; // Stats only for Mercenaries
- break;
- case SC_FOOD_STR:
- if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_AGI:
- if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_VIT:
- if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_INT:
- if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_DEX:
- if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_LUK:
- if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_STR_CASH:
- if (sc->data[SC_FOOD_STR] && sc->data[SC_FOOD_STR]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_AGI_CASH:
- if (sc->data[SC_FOOD_AGI] && sc->data[SC_FOOD_AGI]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_VIT_CASH:
- if (sc->data[SC_FOOD_VIT] && sc->data[SC_FOOD_VIT]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_INT_CASH:
- if (sc->data[SC_FOOD_INT] && sc->data[SC_FOOD_INT]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_DEX_CASH:
- if (sc->data[SC_FOOD_DEX] && sc->data[SC_FOOD_DEX]->val1 > val1)
- return 0;
- break;
- case SC_FOOD_LUK_CASH:
- if (sc->data[SC_FOOD_LUK] && sc->data[SC_FOOD_LUK]->val1 > val1)
- return 0;
- break;
- case SC_CAMOUFLAGE:
- if( sd && pc->checkskill(sd, RA_CAMOUFLAGE) < 3 && !skill->check_camouflage(bl,NULL) )
- return 0;
- break;
- case SC__STRIPACCESSARY:
- if( sd ) {
- int i = -1;
- if( !(sd->bonus.unstripable_equip&EQP_ACC_L) ) {
- i = sd->equip_index[EQI_ACC_L];
- if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR )
- pc->unequipitem(sd,i,3); //L-Accessory
- } if( !(sd->bonus.unstripable_equip&EQP_ACC_R) ) {
- i = sd->equip_index[EQI_ACC_R];
- if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR )
- pc->unequipitem(sd,i,3); //R-Accessory
+ break;
+ case SC_FOOD_DEX:
+ if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_LUK:
+ if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_STR_CASH:
+ if (sc->data[SC_FOOD_STR] && sc->data[SC_FOOD_STR]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_AGI_CASH:
+ if (sc->data[SC_FOOD_AGI] && sc->data[SC_FOOD_AGI]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_VIT_CASH:
+ if (sc->data[SC_FOOD_VIT] && sc->data[SC_FOOD_VIT]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_INT_CASH:
+ if (sc->data[SC_FOOD_INT] && sc->data[SC_FOOD_INT]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_DEX_CASH:
+ if (sc->data[SC_FOOD_DEX] && sc->data[SC_FOOD_DEX]->val1 > val1)
+ return 0;
+ break;
+ case SC_FOOD_LUK_CASH:
+ if (sc->data[SC_FOOD_LUK] && sc->data[SC_FOOD_LUK]->val1 > val1)
+ return 0;
+ break;
+ case SC_CAMOUFLAGE:
+ if( sd && pc->checkskill(sd, RA_CAMOUFLAGE) < 3 && !skill->check_camouflage(bl,NULL) )
+ return 0;
+ break;
+ case SC__STRIPACCESSARY:
+ if( sd ) {
+ int i = -1;
+ if( !(sd->bonus.unstripable_equip&EQP_ACC_L) ) {
+ i = sd->equip_index[EQI_ACC_L];
+ if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR )
+ pc->unequipitem(sd,i,3); //L-Accessory
+ } if( !(sd->bonus.unstripable_equip&EQP_ACC_R) ) {
+ i = sd->equip_index[EQI_ACC_R];
+ if( i >= 0 && sd->inventory_data[i] && sd->inventory_data[i]->type == IT_ARMOR )
+ pc->unequipitem(sd,i,3); //R-Accessory
+ }
+ if( i < 0 )
+ return 0;
+ }
+ if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
+ break;
+ case SC_TOXIN:
+ case SC_PARALYSE:
+ case SC_VENOMBLEED:
+ case SC_MAGICMUSHROOM:
+ case SC_DEATHHURT:
+ case SC_PYREXIA:
+ case SC_OBLIVIONCURSE:
+ case SC_LEECHESEND:
+ { // it doesn't stack or even renewed
+ int i = SC_TOXIN;
+ for(; i<= SC_LEECHESEND; i++)
+ if(sc->data[i]) return 0;
}
- if( i < 0 )
+ break;
+ case SC_SATURDAY_NIGHT_FEVER:
+ if (sc->data[SC_BERSERK] || sc->data[SC_INSPIRATION])
return 0;
- }
- if (tick == 1) return 1; //Minimal duration: Only strip without causing the SC
- break;
- case SC_TOXIN:
- case SC_PARALYSE:
- case SC_VENOMBLEED:
- case SC_MAGICMUSHROOM:
- case SC_DEATHHURT:
- case SC_PYREXIA:
- case SC_OBLIVIONCURSE:
- case SC_LEECHESEND:
- { // it doesn't stack or even renewed
- int i = SC_TOXIN;
- for(; i<= SC_LEECHESEND; i++)
- if(sc->data[i]) return 0;
- }
- break;
- case SC_SATURDAY_NIGHT_FEVER:
- if (sc->data[SC_BERSERK] || sc->data[SC_INSPIRATION])
- return 0;
- break;
- case SC_OFFERTORIUM:
- if (sc->data[SC_MAGNIFICAT])
- return 0;
- break;
+ break;
+ case SC_OFFERTORIUM:
+ if (sc->data[SC_MAGNIFICAT])
+ return 0;
+ break;
}
//Check for BOSS resistances
@@ -6844,1574 +6844,1879 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
if (type>=SC_COMMON_MIN && type <= SC_COMMON_MAX)
return 0;
switch (type) {
- case SC_BLESSING:
- case SC_DEC_AGI:
- case SC_PROVOKE:
- case SC_COMA:
- case SC_GRAVITATION:
- case SC_NJ_SUITON:
- case SC_RICHMANKIM:
- case SC_ROKISWEIL:
- case SC_FOGWALL:
- case SC_FROSTMISTY:
- case SC_BURNING:
- case SC_MARSHOFABYSS:
- case SC_ADORAMUS:
- case SC_NEEDLE_OF_PARALYZE:
- case SC_DEEP_SLEEP:
- case SC_COLD:
-
- // Exploit prevention - kRO Fix
- case SC_PYREXIA:
- case SC_DEATHHURT:
- case SC_TOXIN:
- case SC_PARALYSE:
- case SC_VENOMBLEED:
- case SC_MAGICMUSHROOM:
- case SC_OBLIVIONCURSE:
- case SC_LEECHESEND:
-
- // Ranger Effects
- case SC_WUGBITE:
- case SC_ELECTRICSHOCKER:
- case SC_MAGNETICFIELD:
+ case SC_BLESSING:
+ case SC_DEC_AGI:
+ case SC_PROVOKE:
+ case SC_COMA:
+ case SC_GRAVITATION:
+ case SC_NJ_SUITON:
+ case SC_RICHMANKIM:
+ case SC_ROKISWEIL:
+ case SC_FOGWALL:
+ case SC_FROSTMISTY:
+ case SC_BURNING:
+ case SC_MARSHOFABYSS:
+ case SC_ADORAMUS:
+ case SC_NEEDLE_OF_PARALYZE:
+ case SC_DEEP_SLEEP:
+ case SC_COLD:
+
+ // Exploit prevention - kRO Fix
+ case SC_PYREXIA:
+ case SC_DEATHHURT:
+ case SC_TOXIN:
+ case SC_PARALYSE:
+ case SC_VENOMBLEED:
+ case SC_MAGICMUSHROOM:
+ case SC_OBLIVIONCURSE:
+ case SC_LEECHESEND:
+
+ // Ranger Effects
+ case SC_WUGBITE:
+ case SC_ELECTRICSHOCKER:
+ case SC_MAGNETICFIELD:
+
+ // Masquerades
+ case SC__ENERVATION:
+ case SC__GROOMY:
+ case SC__LAZINESS:
+ case SC__UNLUCKY:
+ case SC__WEAKNESS:
+ case SC__IGNORANCE:
- // Masquerades
- case SC__ENERVATION:
- case SC__GROOMY:
- case SC__LAZINESS:
- case SC__UNLUCKY:
- case SC__WEAKNESS:
- case SC__IGNORANCE:
-
- return 0;
+ return 0;
}
}
//Before overlapping fail, one must check for status cured.
switch (type) {
- case SC_BLESSING:
- //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
- //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
- if ((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC) {
- status_change_end(bl, SC_CURSE, INVALID_TIMER);
- if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
- status_change_end(bl, SC_STONE, INVALID_TIMER);
- }
- break;
- case SC_INC_AGI:
- status_change_end(bl, SC_DEC_AGI, INVALID_TIMER);
- break;
- case SC_QUAGMIRE:
- status_change_end(bl, SC_CONCENTRATION, INVALID_TIMER);
- status_change_end(bl, SC_TRUESIGHT, INVALID_TIMER);
- status_change_end(bl, SC_WINDWALK, INVALID_TIMER);
- //Also blocks the ones below...
- case SC_DEC_AGI:
- status_change_end(bl, SC_CARTBOOST, INVALID_TIMER);
- //Also blocks the ones below...
- case SC_DONTFORGETME:
- status_change_end(bl, SC_INC_AGI, INVALID_TIMER);
- status_change_end(bl, SC_ADRENALINE, INVALID_TIMER);
- status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER);
- status_change_end(bl, SC_SPEARQUICKEN, INVALID_TIMER);
- status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER);
- status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER);
- status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER);
- status_change_end(bl, SC_ACCELERATION, INVALID_TIMER);
- break;
- case SC_ONEHANDQUICKEN:
- //Removes the Aspd potion effect, as reported by Vicious. [Skotlex]
- status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER);
- break;
- case SC_OVERTHRUSTMAX:
- //Cancels Normal Overthrust. [Skotlex]
- status_change_end(bl, SC_OVERTHRUST, INVALID_TIMER);
- break;
- case SC_KYRIE:
- //Cancels Assumptio
- status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
- break;
- case SC_DELUGE:
- if (sc->data[SC_FOGWALL] && sc->data[SC_BLIND])
- status_change_end(bl, SC_BLIND, INVALID_TIMER);
- break;
- case SC_SILENCE:
- if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF)
- status_change_end(bl, SC_GOSPEL, INVALID_TIMER);
- break;
- case SC_HIDING:
- status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER);
- status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER);
- break;
- case SC_BERSERK:
- if( val3 == SC__BLOODYLUST )
- break;
- if(battle_config.berserk_cancels_buffs) {
- status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER);
- status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER);
- status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER);
- status_change_end(bl, SC_PARRYING, INVALID_TIMER);
- status_change_end(bl, SC_AURABLADE, INVALID_TIMER);
- status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER);
- }
-#ifdef RENEWAL
- else {
- status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER);
- }
-#endif
- break;
- case SC_ASSUMPTIO:
- status_change_end(bl, SC_KYRIE, INVALID_TIMER);
- status_change_end(bl, SC_KAITE, INVALID_TIMER);
- break;
- case SC_KAITE:
- status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
- break;
- case SC_CARTBOOST:
- if(sc->data[SC_DEC_AGI])
- { //Cancel Decrease Agi, but take no further effect [Skotlex]
- status_change_end(bl, SC_DEC_AGI, INVALID_TIMER);
- return 0;
- }
- break;
- case SC_FUSION:
- status_change_end(bl, SC_SOULLINK, INVALID_TIMER);
- break;
- case SC_GS_ADJUSTMENT:
- status_change_end(bl, SC_GS_MADNESSCANCEL, INVALID_TIMER);
- break;
- case SC_GS_MADNESSCANCEL:
- status_change_end(bl, SC_GS_ADJUSTMENT, INVALID_TIMER);
- break;
- //NPC_CHANGEUNDEAD will debuff Blessing and Agi Up
- case SC_PROPERTYUNDEAD:
- status_change_end(bl, SC_BLESSING, INVALID_TIMER);
- status_change_end(bl, SC_INC_AGI, INVALID_TIMER);
- break;
- case SC_FOOD_STR:
- status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER);
- break;
- case SC_FOOD_AGI:
- status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER);
- break;
- case SC_FOOD_VIT:
- status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER);
- break;
- case SC_FOOD_INT:
- status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER);
- break;
- case SC_FOOD_DEX:
- status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER);
- break;
- case SC_FOOD_LUK:
- status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER);
- break;
- case SC_FOOD_STR_CASH:
- status_change_end(bl, SC_FOOD_STR, INVALID_TIMER);
- break;
- case SC_FOOD_AGI_CASH:
- status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER);
- break;
- case SC_FOOD_VIT_CASH:
- status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER);
- break;
- case SC_FOOD_INT_CASH:
- status_change_end(bl, SC_FOOD_INT, INVALID_TIMER);
- break;
- case SC_FOOD_DEX_CASH:
- status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER);
- break;
- case SC_FOOD_LUK_CASH:
- status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER);
- break;
- case SC_ENDURE:
- if( val4 )
- status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER);
- break;
- case SC_FIGHTINGSPIRIT:
- status_change_end(bl, type, INVALID_TIMER); // Remove previous one.
- break;
- case SC_MARSHOFABYSS:
- status_change_end(bl, SC_INCAGI, INVALID_TIMER);
- status_change_end(bl, SC_WINDWALK, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER);
- status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER);
- break;
- case SC_SWING:
- case SC_SYMPHONY_LOVE:
- case SC_MOONLIT_SERENADE:
- case SC_RUSH_WINDMILL:
- case SC_ECHOSONG:
- case SC_HARMONIZE: //group A doesn't overlap
- if (type != SC_SWING) status_change_end(bl, SC_SWING, INVALID_TIMER);
- if (type != SC_SYMPHONY_LOVE) status_change_end(bl, SC_SYMPHONY_LOVE, INVALID_TIMER);
- if (type != SC_MOONLIT_SERENADE) status_change_end(bl, SC_MOONLIT_SERENADE, INVALID_TIMER);
- if (type != SC_RUSH_WINDMILL) status_change_end(bl, SC_RUSH_WINDMILL, INVALID_TIMER);
- if (type != SC_ECHOSONG) status_change_end(bl, SC_ECHOSONG, INVALID_TIMER);
- if (type != SC_HARMONIZE) status_change_end(bl, SC_HARMONIZE, INVALID_TIMER);
- break;
- case SC_SIREN:
- case SC_DEEP_SLEEP:
- case SC_GLOOMYDAY:
- case SC_SONG_OF_MANA:
- case SC_DANCE_WITH_WUG:
- case SC_SATURDAY_NIGHT_FEVER:
- case SC_LERADS_DEW:
- case SC_MELODYOFSINK:
- case SC_BEYOND_OF_WARCRY:
- case SC_UNLIMITED_HUMMING_VOICE: //group B
- if (type != SC_SIREN) status_change_end(bl, SC_SIREN, INVALID_TIMER);
- if (type != SC_DEEP_SLEEP) status_change_end(bl, SC_DEEP_SLEEP, INVALID_TIMER);
- if (type != SC_LERADS_DEW) status_change_end(bl, SC_LERADS_DEW, INVALID_TIMER);
- if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER);
- if (type != SC_BEYOND_OF_WARCRY) status_change_end(bl, SC_BEYOND_OF_WARCRY, INVALID_TIMER);
- if (type != SC_UNLIMITED_HUMMING_VOICE) status_change_end(bl, SC_UNLIMITED_HUMMING_VOICE, INVALID_TIMER);
- if (type != SC_GLOOMYDAY) {
- status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER);
- status_change_end(bl, SC_GLOOMYDAY_SK, INVALID_TIMER);
- }
- if (type != SC_SONG_OF_MANA) status_change_end(bl, SC_SONG_OF_MANA, INVALID_TIMER);
- if (type != SC_DANCE_WITH_WUG) status_change_end(bl, SC_DANCE_WITH_WUG, INVALID_TIMER);
- if (type != SC_SATURDAY_NIGHT_FEVER) {
- if (sc->data[SC_SATURDAY_NIGHT_FEVER]) {
- sc->data[SC_SATURDAY_NIGHT_FEVER]->val2 = 0; //mark to not lose hp
- status_change_end(bl, SC_SATURDAY_NIGHT_FEVER, INVALID_TIMER);
+ case SC_BLESSING:
+ //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
+ //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
+ if ((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC) {
+ status_change_end(bl, SC_CURSE, INVALID_TIMER);
+ if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
+ status_change_end(bl, SC_STONE, INVALID_TIMER);
}
- }
- break;
- case SC_REFLECTSHIELD:
- status_change_end(bl, SC_LG_REFLECTDAMAGE, INVALID_TIMER);
- break;
- case SC_LG_REFLECTDAMAGE:
- status_change_end(bl, SC_REFLECTSHIELD, INVALID_TIMER);
- break;
- case SC_SHIELDSPELL_DEF:
- case SC_SHIELDSPELL_MDEF:
- case SC_SHIELDSPELL_REF:
- status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER);
- if( type != SC_SHIELDSPELL_DEF )
- status_change_end(bl, SC_SHIELDSPELL_DEF, INVALID_TIMER);
- if( type != SC_SHIELDSPELL_MDEF )
- status_change_end(bl, SC_SHIELDSPELL_MDEF, INVALID_TIMER);
- if( type != SC_SHIELDSPELL_REF )
- status_change_end(bl, SC_SHIELDSPELL_REF, INVALID_TIMER);
- break;
- case SC_GENTLETOUCH_ENERGYGAIN:
- case SC_GENTLETOUCH_CHANGE:
- case SC_GENTLETOUCH_REVITALIZE:
- if( type != SC_GENTLETOUCH_REVITALIZE )
- status_change_end(bl, SC_GENTLETOUCH_REVITALIZE, INVALID_TIMER);
- if( type != SC_GENTLETOUCH_ENERGYGAIN )
- status_change_end(bl, SC_GENTLETOUCH_ENERGYGAIN, INVALID_TIMER);
- if( type != SC_GENTLETOUCH_CHANGE )
- status_change_end(bl, SC_GENTLETOUCH_CHANGE, INVALID_TIMER);
- break;
- case SC_INVINCIBLE:
- status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER);
- break;
- case SC_INVINCIBLEOFF:
- status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER);
- break;
- case SC_MAGICPOWER:
- status_change_end(bl, type, INVALID_TIMER);
- break;
- }
-
- //Check for overlapping fails
- if( (sce = sc->data[type]) ) {
- switch( type ) {
- case SC_MER_FLEE:
- case SC_MER_ATK:
- case SC_MER_HP:
- case SC_MER_SP:
- case SC_MER_HIT:
- if( sce->val1 > val1 )
- val1 = sce->val1;
break;
- case SC_ADRENALINE:
- case SC_ADRENALINE2:
- case SC_WEAPONPERFECT:
- case SC_OVERTHRUST:
- if (sce->val2 > val2)
- return 0;
+ case SC_INC_AGI:
+ status_change_end(bl, SC_DEC_AGI, INVALID_TIMER);
break;
- case SC_S_LIFEPOTION:
- case SC_L_LIFEPOTION:
- case SC_CASH_BOSS_ALARM:
- case SC_STUN:
- case SC_SLEEP:
- case SC_POISON:
- case SC_CURSE:
- case SC_SILENCE:
- case SC_CONFUSION:
- case SC_BLIND:
- case SC_BLOODING:
- case SC_DPOISON:
- case SC_RG_CCONFINE_S: //Can't be re-closed in.
- case SC_MARIONETTE_MASTER:
- case SC_MARIONETTE:
- case SC_NOCHAT:
- case SC_HLIF_CHANGE: //Otherwise your Hp/Sp would get refilled while still within effect of the last invocation.
- case SC__INVISIBILITY:
- case SC__ENERVATION:
- case SC__GROOMY:
- case SC__IGNORANCE:
- case SC__LAZINESS:
- case SC__WEAKNESS:
- case SC__UNLUCKY:
- return 0;
- case SC_COMBOATTACK:
- case SC_DANCING:
- case SC_DEVOTION:
- case SC_ATTHASTE_POTION1:
- case SC_ATTHASTE_POTION2:
- case SC_ATTHASTE_POTION3:
- case SC_ATTHASTE_INFINITY:
- case SC_PLUSATTACKPOWER:
- case SC_PLUSMAGICPOWER:
- case SC_ENCHANTARMS:
- case SC_ARMORPROPERTY:
- case SC_ARMOR_RESIST:
- break;
- case SC_GOSPEL:
- //Must not override a casting gospel char.
- if(sce->val4 == BCT_SELF)
- return 0;
- if(sce->val1 > val1)
- return 1;
+ case SC_QUAGMIRE:
+ status_change_end(bl, SC_CONCENTRATION, INVALID_TIMER);
+ status_change_end(bl, SC_TRUESIGHT, INVALID_TIMER);
+ status_change_end(bl, SC_WINDWALK, INVALID_TIMER);
+ //Also blocks the ones below...
+ case SC_DEC_AGI:
+ status_change_end(bl, SC_CARTBOOST, INVALID_TIMER);
+ //Also blocks the ones below...
+ case SC_DONTFORGETME:
+ status_change_end(bl, SC_INC_AGI, INVALID_TIMER);
+ status_change_end(bl, SC_ADRENALINE, INVALID_TIMER);
+ status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER);
+ status_change_end(bl, SC_SPEARQUICKEN, INVALID_TIMER);
+ status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER);
+ status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER);
+ status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER);
+ status_change_end(bl, SC_ACCELERATION, INVALID_TIMER);
break;
- case SC_ENDURE:
- if(sce->val4 && !val4)
- return 1; //Don't let you override infinite endure.
- if(sce->val1 > val1)
- return 1;
+ case SC_ONEHANDQUICKEN:
+ //Removes the Aspd potion effect, as reported by Vicious. [Skotlex]
+ status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER);
break;
- case SC_KAAHI:
- //Kaahi overwrites previous level regardless of existing level.
- //Delete timer if it exists.
- if (sce->val4 != INVALID_TIMER) {
- timer->delete(sce->val4,status->kaahi_heal_timer);
- sce->val4 = INVALID_TIMER;
- }
+ case SC_OVERTHRUSTMAX:
+ //Cancels Normal Overthrust. [Skotlex]
+ status_change_end(bl, SC_OVERTHRUST, INVALID_TIMER);
break;
- case SC_JAILED:
- //When a player is already jailed, do not edit the jail data.
- val2 = sce->val2;
- val3 = sce->val3;
- val4 = sce->val4;
+ case SC_KYRIE:
+ //Cancels Assumptio
+ status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
break;
- case SC_LERADS_DEW:
- if (sc && sc->data[SC_BERSERK])
- return 0;
- case SC_SHAPESHIFT:
- case SC_PROPERTYWALK:
+ case SC_DELUGE:
+ if (sc->data[SC_FOGWALL] && sc->data[SC_BLIND])
+ status_change_end(bl, SC_BLIND, INVALID_TIMER);
break;
- case SC_LEADERSHIP:
- case SC_GLORYWOUNDS:
- case SC_SOULCOLD:
- case SC_HAWKEYES:
- if( sce->val4 && !val4 )//you cannot override master guild aura
- return 0;
+ case SC_SILENCE:
+ if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF)
+ status_change_end(bl, SC_GOSPEL, INVALID_TIMER);
break;
- case SC_JOINTBEAT:
- val2 |= sce->val2; // stackable ailments
- default:
- if(sce->val1 > val1)
- return 1; //Return true to not mess up skill animations. [Skotlex]
- }
- }
-
- vd = status->get_viewdata(bl);
- calc_flag = status->ChangeFlagTable[type];
- if(!(flag&4)) { //&4 - Do not parse val settings when loading SCs
- switch(type) {
- case SC_DEC_AGI:
- case SC_INC_AGI:
- val2 = 2 + val1; //Agi change
+ case SC_HIDING:
+ status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER);
+ status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER);
break;
- case SC_ENDURE:
- val2 = 7; // Hit-count [Celest]
- if( !(flag&1) && (bl->type&(BL_PC|BL_MER)) && !map_flag_gvg(bl->m) && !map->list[bl->m].flag.battleground && !val4 ) {
- struct map_session_data *tsd;
- if( sd ) {
- int i;
- for( i = 0; i < 5; i++ ) {
- if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) )
- status->change_start(&tsd->bl, type, 10000, val1, val2, val3, val4, tick, 1);
- }
- } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) )
- status->change_start(&tsd->bl, type, 10000, val1, val2, val3, val4, tick, 1);
+ case SC_BERSERK:
+ if( val3 == SC__BLOODYLUST )
+ break;
+ if(battle_config.berserk_cancels_buffs) {
+ status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER);
+ status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER);
+ status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER);
+ status_change_end(bl, SC_PARRYING, INVALID_TIMER);
+ status_change_end(bl, SC_AURABLADE, INVALID_TIMER);
+ status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER);
}
- //val4 signals infinite endure (if val4 == 2 it is infinite endure from Berserk)
- if( val4 )
- tick = -1;
+ #ifdef RENEWAL
+ else {
+ status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER);
+ }
+ #endif
break;
- case SC_AUTOBERSERK:
- if (st->hp < st->max_hp>>2 &&
- (!sc->data[SC_PROVOKE] || sc->data[SC_PROVOKE]->val2==0))
- sc_start4(bl,SC_PROVOKE,100,10,1,0,0,60000);
- tick = -1;
+ case SC_ASSUMPTIO:
+ status_change_end(bl, SC_KYRIE, INVALID_TIMER);
+ status_change_end(bl, SC_KAITE, INVALID_TIMER);
break;
- case SC_CRUCIS:
- val2 = 10 + 4*val1; //Def reduction
- tick = -1;
- clif->emotion(bl,E_SWT);
+ case SC_KAITE:
+ status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER);
break;
- case SC_MAXIMIZEPOWER:
- tick_time = val2 = tick>0?tick:60000;
- tick = -1; // duration sent to the client should be infinite
+ case SC_CARTBOOST:
+ if(sc->data[SC_DEC_AGI])
+ { //Cancel Decrease Agi, but take no further effect [Skotlex]
+ status_change_end(bl, SC_DEC_AGI, INVALID_TIMER);
+ return 0;
+ }
break;
- case SC_EDP: // [Celest]
- val2 = val1 + 2; //Chance to Poison enemies.
- val3 = 50*(val1+1); //Damage increase (+50 +50*lv%)
-#ifdef RENEWAL_EDP
- val4 = 100 * ((val1 + 1)/2 + 2);
-#endif
- if( sd )//[Ind] - iROwiki says each level increases its duration by 3 seconds
- tick += pc->checkskill(sd,GC_RESEARCHNEWPOISON)*3000;
+ case SC_FUSION:
+ status_change_end(bl, SC_SOULLINK, INVALID_TIMER);
break;
- case SC_POISONREACT:
- val2=(val1+1)/2 + val1/10; // Number of counters [Skotlex]
- val3=50; // + 5*val1; //Chance to counter. [Skotlex]
+ case SC_GS_ADJUSTMENT:
+ status_change_end(bl, SC_GS_MADNESSCANCEL, INVALID_TIMER);
break;
- case SC_MAGICROD:
- val2 = val1*20; //SP gained
+ case SC_GS_MADNESSCANCEL:
+ status_change_end(bl, SC_GS_ADJUSTMENT, INVALID_TIMER);
break;
- case SC_KYRIE:
- val2 = (int64)st->max_hp * (val1 * 2 + 10) / 100; //%Max HP to absorb
- val3 = (val1 / 2 + 5); //Hits
+ //NPC_CHANGEUNDEAD will debuff Blessing and Agi Up
+ case SC_PROPERTYUNDEAD:
+ status_change_end(bl, SC_BLESSING, INVALID_TIMER);
+ status_change_end(bl, SC_INC_AGI, INVALID_TIMER);
break;
- case SC_MAGICPOWER:
- //val1: Skill lv
- val2 = 1; //Lasts 1 invocation
- val3 = 5*val1; //Matk% increase
- val4 = 0; // 0 = ready to be used, 1 = activated and running
- break;
- case SC_SACRIFICE:
- val2 = 5; //Lasts 5 hits
- tick = -1;
- break;
- case SC_ENCHANTPOISON:
- val2= 250+50*val1; //Poisoning Chance (2.5+0.5%) in 1/10000 rate
- case SC_ASPERSIO:
- case SC_PROPERTYFIRE:
- case SC_PROPERTYWATER:
- case SC_PROPERTYWIND:
- case SC_PROPERTYGROUND:
- case SC_PROPERTYDARK:
- case SC_PROPERTYTELEKINESIS:
- skill->enchant_elemental_end(bl,type);
- break;
- case SC_ARMOR_PROPERTY:
- // val1 : Element Lvl (if called by skill lvl 1, takes random value between 1 and 4)
- // val2 : Element (When no element, random one is picked)
- // val3 : 0 = called by skill 1 = called by script (fixed level)
- if( !val2 ) val2 = rnd()%ELE_MAX;
-
- if( val1 == 1 && val3 == 0 )
- val1 = 1 + rnd()%4;
- else if( val1 > 4 )
- val1 = 4; // Max Level
- val3 = 0; // Not need to keep this info.
+ case SC_FOOD_STR:
+ status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER);
break;
- case SC_PROVIDENCE:
- val2=val1*5; //Race/Ele resist
+ case SC_FOOD_AGI:
+ status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER);
break;
- case SC_REFLECTSHIELD:
- val2=10+val1*3; // %Dmg reflected
- if( !(flag&1) && (bl->type&(BL_PC|BL_MER)) ) {
- struct map_session_data *tsd;
- if( sd ) {
- int i;
- for( i = 0; i < 5; i++ ) {
- if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) )
- status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1);
- }
- } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) )
- status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1);
- }
+ case SC_FOOD_VIT:
+ status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER);
break;
- case SC_NOEQUIPWEAPON:
- if (!sd) //Watk reduction
- val2 = 25;
+ case SC_FOOD_INT:
+ status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER);
break;
- case SC_NOEQUIPSHIELD:
- if (!sd) //Def reduction
- val2 = 15;
+ case SC_FOOD_DEX:
+ status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER);
break;
- case SC_NOEQUIPARMOR:
- if (!sd) //Vit reduction
- val2 = 40;
+ case SC_FOOD_LUK:
+ status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER);
break;
- case SC_NOEQUIPHELM:
- if (!sd) //Int reduction
- val2 = 40;
+ case SC_FOOD_STR_CASH:
+ status_change_end(bl, SC_FOOD_STR, INVALID_TIMER);
break;
- case SC_AUTOSPELL:
- //Val1 Skill LV of Autospell
- //Val2 Skill ID to cast
- //Val3 Max Lv to cast
- val4 = 5 + val1*2; //Chance of casting
+ case SC_FOOD_AGI_CASH:
+ status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER);
break;
- case SC_VOLCANO:
- val2 = val1*10; //Watk increase
-#ifndef RENEWAL
- if (st->def_ele != ELE_FIRE)
- val2 = 0;
-#endif
+ case SC_FOOD_VIT_CASH:
+ status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER);
break;
- case SC_VIOLENTGALE:
- val2 = val1*3; //Flee increase
-#ifndef RENEWAL
- if (st->def_ele != ELE_WIND)
- val2 = 0;
-#endif
+ case SC_FOOD_INT_CASH:
+ status_change_end(bl, SC_FOOD_INT, INVALID_TIMER);
break;
- case SC_DELUGE:
- val2 = skill->deluge_eff[val1-1]; //HP increase
-#ifndef RENEWAL
- if(st->def_ele != ELE_WATER)
- val2 = 0;
-#endif
+ case SC_FOOD_DEX_CASH:
+ status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER);
break;
- case SC_NJ_SUITON:
- if (!val2 || (sd && (sd->class_&MAPID_BASEMASK) == MAPID_NINJA)) {
- //No penalties.
- val2 = 0; //Agi penalty
- val3 = 0; //Walk speed penalty
- break;
- }
- val3 = 50;
- val2 = 3*((val1+1)/3);
- if (val1 > 4) val2--;
+ case SC_FOOD_LUK_CASH:
+ status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER);
break;
- case SC_ONEHANDQUICKEN:
- case SC_TWOHANDQUICKEN:
- val2 = 300;
- if (val1 > 10) //For boss casted skills [Skotlex]
- val2 += 20*(val1-10);
- break;
- case SC_MER_QUICKEN:
- val2 = 300;
- break;
-#ifndef RENEWAL_ASPD
- case SC_SPEARQUICKEN:
- val2 = 200+10*val1;
- break;
-#endif
- case SC_DANCING:
- //val1 : Skill ID + LV
- //val2 : Skill Group of the Dance.
- //val3 : Brings the skill_lv (merged into val1 here)
- //val4 : Partner
- if (val1 == CG_MOONLIT)
- clif->status_change(bl,SI_MOON,1,tick,0, 0, 0);
- val1|= (val3<<16);
- val3 = tick/1000; //Tick duration
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_LONGING:
-#ifdef RENEWAL
- val2 = 50 + 10 * val1;
-#else
- val2 = 500-100*val1; //Aspd penalty.
-#endif
+ case SC_ENDURE:
+ if( val4 )
+ status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER);
break;
- case SC_EXPLOSIONSPIRITS:
- val2 = 75 + 25*val1; //Cri bonus
+ case SC_FIGHTINGSPIRIT:
+ status_change_end(bl, type, INVALID_TIMER); // Remove previous one.
break;
-
- case SC_ATTHASTE_POTION1:
- case SC_ATTHASTE_POTION2:
- case SC_ATTHASTE_POTION3:
- case SC_ATTHASTE_INFINITY:
- val2 = 50*(2+type-SC_ATTHASTE_POTION1);
+ case SC_MARSHOFABYSS:
+ status_change_end(bl, SC_INCAGI, INVALID_TIMER);
+ status_change_end(bl, SC_WINDWALK, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER);
+ status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER);
break;
-
- case SC_WEDDING:
- case SC_XMAS:
- case SC_SUMMER:
- case SC_HANBOK:
- if (!vd) return 0;
- //Store previous values as they could be removed.
- unit->stop_attack(bl);
+ case SC_SWING:
+ case SC_SYMPHONY_LOVE:
+ case SC_MOONLIT_SERENADE:
+ case SC_RUSH_WINDMILL:
+ case SC_ECHOSONG:
+ case SC_HARMONIZE: //group A doesn't overlap
+ if (type != SC_SWING) status_change_end(bl, SC_SWING, INVALID_TIMER);
+ if (type != SC_SYMPHONY_LOVE) status_change_end(bl, SC_SYMPHONY_LOVE, INVALID_TIMER);
+ if (type != SC_MOONLIT_SERENADE) status_change_end(bl, SC_MOONLIT_SERENADE, INVALID_TIMER);
+ if (type != SC_RUSH_WINDMILL) status_change_end(bl, SC_RUSH_WINDMILL, INVALID_TIMER);
+ if (type != SC_ECHOSONG) status_change_end(bl, SC_ECHOSONG, INVALID_TIMER);
+ if (type != SC_HARMONIZE) status_change_end(bl, SC_HARMONIZE, INVALID_TIMER);
break;
- case SC_NOCHAT:
- // [GodLesZ] FIXME: is this correct? a hardcoded interval of 60sec? what about configuration ?_?
- tick = 60000;
- val1 = battle_config.manner_system; //Mute filters.
- if (sd)
- {
- clif->changestatus(sd,SP_MANNER,sd->status.manner);
- clif->updatestatus(sd,SP_MANNER);
+ case SC_SIREN:
+ case SC_DEEP_SLEEP:
+ case SC_GLOOMYDAY:
+ case SC_SONG_OF_MANA:
+ case SC_DANCE_WITH_WUG:
+ case SC_SATURDAY_NIGHT_FEVER:
+ case SC_LERADS_DEW:
+ case SC_MELODYOFSINK:
+ case SC_BEYOND_OF_WARCRY:
+ case SC_UNLIMITED_HUMMING_VOICE: //group B
+ if (type != SC_SIREN) status_change_end(bl, SC_SIREN, INVALID_TIMER);
+ if (type != SC_DEEP_SLEEP) status_change_end(bl, SC_DEEP_SLEEP, INVALID_TIMER);
+ if (type != SC_LERADS_DEW) status_change_end(bl, SC_LERADS_DEW, INVALID_TIMER);
+ if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER);
+ if (type != SC_BEYOND_OF_WARCRY) status_change_end(bl, SC_BEYOND_OF_WARCRY, INVALID_TIMER);
+ if (type != SC_UNLIMITED_HUMMING_VOICE) status_change_end(bl, SC_UNLIMITED_HUMMING_VOICE, INVALID_TIMER);
+ if (type != SC_GLOOMYDAY) {
+ status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER);
+ status_change_end(bl, SC_GLOOMYDAY_SK, INVALID_TIMER);
}
- break;
-
- case SC_STONE:
- val3 = tick/1000; //Petrified HP-damage iterations.
- if(val3 < 1) val3 = 1;
- tick = val4; //Petrifying time.
- if(val4 > 500) // not with WL_SIENNAEXECRATE
- tick = max(tick, 1000); //Min time
- calc_flag = 0; //Actual status changes take effect on petrified state.
- break;
-
- case SC_DPOISON:
- //Lose 10/15% of your life as long as it doesn't brings life below 25%
- if (st->hp > st->max_hp>>2) {
- int diff = st->max_hp*(bl->type==BL_PC?10:15)/100;
- if (st->hp - diff < st->max_hp>>2)
- diff = st->hp - (st->max_hp>>2);
- if( val2 && bl->type == BL_MOB ) {
- struct block_list* src = map->id2bl(val2);
- if( src )
- mob->log_damage((TBL_MOB*)bl,src,diff);
+ if (type != SC_SONG_OF_MANA) status_change_end(bl, SC_SONG_OF_MANA, INVALID_TIMER);
+ if (type != SC_DANCE_WITH_WUG) status_change_end(bl, SC_DANCE_WITH_WUG, INVALID_TIMER);
+ if (type != SC_SATURDAY_NIGHT_FEVER) {
+ if (sc->data[SC_SATURDAY_NIGHT_FEVER]) {
+ sc->data[SC_SATURDAY_NIGHT_FEVER]->val2 = 0; //mark to not lose hp
+ status_change_end(bl, SC_SATURDAY_NIGHT_FEVER, INVALID_TIMER);
}
- status_zap(bl, diff, 0);
}
- // fall through
- case SC_POISON:
- val3 = tick/1000; //Damage iterations
- if(val3 < 1) val3 = 1;
- tick_time = 1000; // [GodLesZ] tick time
- //val4: HP damage
- if (bl->type == BL_PC)
- val4 = (type == SC_DPOISON) ? 3 + st->max_hp/50 : 3 + st->max_hp*3/200;
- else
- val4 = (type == SC_DPOISON) ? 3 + st->max_hp/100 : 3 + st->max_hp/200;
-
break;
- case SC_CONFUSION:
- clif->emotion(bl,E_WHAT);
+ case SC_REFLECTSHIELD:
+ status_change_end(bl, SC_LG_REFLECTDAMAGE, INVALID_TIMER);
break;
- case SC_BLOODING:
- val4 = tick/10000;
- if (!val4) val4 = 1;
- tick_time = 10000; // [GodLesZ] tick time
- break;
- case SC_S_LIFEPOTION:
- case SC_L_LIFEPOTION:
- if( val1 == 0 ) return 0;
- // val1 = heal percent/amout
- // val2 = seconds between heals
- // val4 = total of heals
- if( val2 < 1 ) val2 = 1;
- if( (val4 = tick/(val2 * 1000)) < 1 )
- val4 = 1;
- tick_time = val2 * 1000; // [GodLesZ] tick time
+ case SC_LG_REFLECTDAMAGE:
+ status_change_end(bl, SC_REFLECTSHIELD, INVALID_TIMER);
break;
- case SC_CASH_BOSS_ALARM:
- if( sd != NULL ) {
- struct mob_data *boss_md = map->getmob_boss(bl->m); // Search for Boss on this Map
- if( boss_md == NULL || boss_md->bl.prev == NULL ) {
- // No MVP on this map - MVP is dead
- clif->bossmapinfo(sd->fd, boss_md, 1);
- return 0; // No need to start SC
- }
- val1 = boss_md->bl.id;
- if( (val4 = tick/1000) < 1 )
- val4 = 1;
- tick_time = 1000; // [GodLesZ] tick time
- }
+ case SC_SHIELDSPELL_DEF:
+ case SC_SHIELDSPELL_MDEF:
+ case SC_SHIELDSPELL_REF:
+ status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER);
+ if( type != SC_SHIELDSPELL_DEF )
+ status_change_end(bl, SC_SHIELDSPELL_DEF, INVALID_TIMER);
+ if( type != SC_SHIELDSPELL_MDEF )
+ status_change_end(bl, SC_SHIELDSPELL_MDEF, INVALID_TIMER);
+ if( type != SC_SHIELDSPELL_REF )
+ status_change_end(bl, SC_SHIELDSPELL_REF, INVALID_TIMER);
+ break;
+ case SC_GENTLETOUCH_ENERGYGAIN:
+ case SC_GENTLETOUCH_CHANGE:
+ case SC_GENTLETOUCH_REVITALIZE:
+ if( type != SC_GENTLETOUCH_REVITALIZE )
+ status_change_end(bl, SC_GENTLETOUCH_REVITALIZE, INVALID_TIMER);
+ if( type != SC_GENTLETOUCH_ENERGYGAIN )
+ status_change_end(bl, SC_GENTLETOUCH_ENERGYGAIN, INVALID_TIMER);
+ if( type != SC_GENTLETOUCH_CHANGE )
+ status_change_end(bl, SC_GENTLETOUCH_CHANGE, INVALID_TIMER);
break;
- case SC_HIDING:
- val2 = tick/1000;
- tick_time = 1000; // [GodLesZ] tick time
- val3 = 0; // unused, previously speed adjustment
- val4 = val1+3; //Seconds before SP substraction happen.
+ case SC_INVINCIBLE:
+ status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER);
break;
- case SC_CHASEWALK:
- val2 = tick>0?tick:10000; //Interval at which SP is drained.
- val3 = 35 - 5 * val1; //Speed adjustment.
- if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_ROGUE)
- val3 -= 40;
- val4 = 10+val1*2; //SP cost.
- if (map_flag_gvg(bl->m) || map->list[bl->m].flag.battleground) val4 *= 5;
+ case SC_INVINCIBLEOFF:
+ status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER);
break;
- case SC_CLOAKING:
- if (!sd) //Monsters should be able to walk with no penalties. [Skotlex]
- val1 = 10;
- tick_time = val2 = tick>0?tick:60000; //SP consumption rate.
- tick = -1; // duration sent to the client should be infinite
- val3 = 0; // unused, previously walk speed adjustment
- //val4&1 signals the presence of a wall.
- //val4&2 makes cloak not end on normal attacks [Skotlex]
- //val4&4 makes cloak not end on using skills
- if (bl->type == BL_PC || (bl->type == BL_MOB && ((TBL_MOB*)bl)->special_state.clone) ) //Standard cloaking.
- val4 |= battle_config.pc_cloak_check_type&7;
- else
- val4 |= battle_config.monster_cloak_check_type&7;
- break;
- case SC_SIGHT: /* splash status */
- case SC_RUWACH:
- case SC_WZ_SIGHTBLASTER:
- val3 = skill->get_splash(val2, val1); //Val2 should bring the skill-id.
- val2 = tick/250;
- tick_time = 10; // [GodLesZ] tick time
+ case SC_MAGICPOWER:
+ status_change_end(bl, type, INVALID_TIMER);
break;
+ }
- //Permanent effects.
- case SC_LEXAETERNA:
- case SC_MODECHANGE:
- case SC_WEIGHTOVER50:
- case SC_WEIGHTOVER90:
- case SC_BROKENWEAPON:
- case SC_BROKENARMOR:
- case SC_STORMKICK_READY:
- case SC_DOWNKICK_READY:
- case SC_COUNTERKICK_READY:
- case SC_TURNKICK_READY:
- case SC_DODGE_READY:
- case SC_PUSH_CART:
- case SC_ALL_RIDING:
- tick = -1;
- break;
-
- case SC_AUTOGUARD:
- if( !(flag&1) ) {
- struct map_session_data *tsd;
- int i,t;
- for( i = val2 = 0; i < val1; i++) {
- t = 5-(i>>1);
- val2 += (t < 0)? 1:t;
+ //Check for overlapping fails
+ if( (sce = sc->data[type]) ) {
+ switch( type ) {
+ case SC_MER_FLEE:
+ case SC_MER_ATK:
+ case SC_MER_HP:
+ case SC_MER_SP:
+ case SC_MER_HIT:
+ if( sce->val1 > val1 )
+ val1 = sce->val1;
+ break;
+ case SC_ADRENALINE:
+ case SC_ADRENALINE2:
+ case SC_WEAPONPERFECT:
+ case SC_OVERTHRUST:
+ if (sce->val2 > val2)
+ return 0;
+ break;
+ case SC_S_LIFEPOTION:
+ case SC_L_LIFEPOTION:
+ case SC_CASH_BOSS_ALARM:
+ case SC_STUN:
+ case SC_SLEEP:
+ case SC_POISON:
+ case SC_CURSE:
+ case SC_SILENCE:
+ case SC_CONFUSION:
+ case SC_BLIND:
+ case SC_BLOODING:
+ case SC_DPOISON:
+ case SC_RG_CCONFINE_S: //Can't be re-closed in.
+ case SC_MARIONETTE_MASTER:
+ case SC_MARIONETTE:
+ case SC_NOCHAT:
+ case SC_HLIF_CHANGE: //Otherwise your Hp/Sp would get refilled while still within effect of the last invocation.
+ case SC__INVISIBILITY:
+ case SC__ENERVATION:
+ case SC__GROOMY:
+ case SC__IGNORANCE:
+ case SC__LAZINESS:
+ case SC__WEAKNESS:
+ case SC__UNLUCKY:
+ return 0;
+ case SC_COMBOATTACK:
+ case SC_DANCING:
+ case SC_DEVOTION:
+ case SC_ATTHASTE_POTION1:
+ case SC_ATTHASTE_POTION2:
+ case SC_ATTHASTE_POTION3:
+ case SC_ATTHASTE_INFINITY:
+ case SC_PLUSATTACKPOWER:
+ case SC_PLUSMAGICPOWER:
+ case SC_ENCHANTARMS:
+ case SC_ARMORPROPERTY:
+ case SC_ARMOR_RESIST:
+ break;
+ case SC_GOSPEL:
+ //Must not override a casting gospel char.
+ if(sce->val4 == BCT_SELF)
+ return 0;
+ if(sce->val1 > val1)
+ return 1;
+ break;
+ case SC_ENDURE:
+ if(sce->val4 && !val4)
+ return 1; //Don't let you override infinite endure.
+ if(sce->val1 > val1)
+ return 1;
+ break;
+ case SC_KAAHI:
+ //Kaahi overwrites previous level regardless of existing level.
+ //Delete timer if it exists.
+ if (sce->val4 != INVALID_TIMER) {
+ timer->delete(sce->val4,status->kaahi_heal_timer);
+ sce->val4 = INVALID_TIMER;
}
+ break;
+ case SC_JAILED:
+ //When a player is already jailed, do not edit the jail data.
+ val2 = sce->val2;
+ val3 = sce->val3;
+ val4 = sce->val4;
+ break;
+ case SC_LERADS_DEW:
+ if (sc && sc->data[SC_BERSERK])
+ return 0;
+ case SC_SHAPESHIFT:
+ case SC_PROPERTYWALK:
+ break;
+ case SC_LEADERSHIP:
+ case SC_GLORYWOUNDS:
+ case SC_SOULCOLD:
+ case SC_HAWKEYES:
+ if( sce->val4 && !val4 )//you cannot override master guild aura
+ return 0;
+ break;
+ case SC_JOINTBEAT:
+ val2 |= sce->val2; // stackable ailments
+ default:
+ if(sce->val1 > val1)
+ return 1; //Return true to not mess up skill animations. [Skotlex]
+ }
+ }
- if( bl->type&(BL_PC|BL_MER) ) {
+ vd = status->get_viewdata(bl);
+ calc_flag = status->ChangeFlagTable[type];
+ if(!(flag&4)) { //&4 - Do not parse val settings when loading SCs
+ switch(type) {
+ case SC_DEC_AGI:
+ case SC_INC_AGI:
+ val2 = 2 + val1; //Agi change
+ break;
+ case SC_ENDURE:
+ val2 = 7; // Hit-count [Celest]
+ if( !(flag&1) && (bl->type&(BL_PC|BL_MER)) && !map_flag_gvg(bl->m) && !map->list[bl->m].flag.battleground && !val4 ) {
+ struct map_session_data *tsd;
if( sd ) {
+ int i;
+ for( i = 0; i < 5; i++ ) {
+ if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) )
+ status->change_start(&tsd->bl, type, 10000, val1, val2, val3, val4, tick, 1);
+ }
+ } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) )
+ status->change_start(&tsd->bl, type, 10000, val1, val2, val3, val4, tick, 1);
+ }
+ //val4 signals infinite endure (if val4 == 2 it is infinite endure from Berserk)
+ if( val4 )
+ tick = -1;
+ break;
+ case SC_AUTOBERSERK:
+ if (st->hp < st->max_hp>>2 &&
+ (!sc->data[SC_PROVOKE] || sc->data[SC_PROVOKE]->val2==0))
+ sc_start4(bl,SC_PROVOKE,100,10,1,0,0,60000);
+ tick = -1;
+ break;
+ case SC_CRUCIS:
+ val2 = 10 + 4*val1; //Def reduction
+ tick = -1;
+ clif->emotion(bl,E_SWT);
+ break;
+ case SC_MAXIMIZEPOWER:
+ tick_time = val2 = tick>0?tick:60000;
+ tick = -1; // duration sent to the client should be infinite
+ break;
+ case SC_EDP: // [Celest]
+ val2 = val1 + 2; //Chance to Poison enemies.
+ val3 = 50*(val1+1); //Damage increase (+50 +50*lv%)
+ #ifdef RENEWAL_EDP
+ val4 = 100 * ((val1 + 1)/2 + 2);
+ #endif
+ if( sd )//[Ind] - iROwiki says each level increases its duration by 3 seconds
+ tick += pc->checkskill(sd,GC_RESEARCHNEWPOISON)*3000;
+ break;
+ case SC_POISONREACT:
+ val2=(val1+1)/2 + val1/10; // Number of counters [Skotlex]
+ val3=50; // + 5*val1; //Chance to counter. [Skotlex]
+ break;
+ case SC_MAGICROD:
+ val2 = val1*20; //SP gained
+ break;
+ case SC_KYRIE:
+ val2 = (int64)st->max_hp * (val1 * 2 + 10) / 100; //%Max HP to absorb
+ val3 = (val1 / 2 + 5); //Hits
+ break;
+ case SC_MAGICPOWER:
+ //val1: Skill lv
+ val2 = 1; //Lasts 1 invocation
+ val3 = 5*val1; //Matk% increase
+ val4 = 0; // 0 = ready to be used, 1 = activated and running
+ break;
+ case SC_SACRIFICE:
+ val2 = 5; //Lasts 5 hits
+ tick = -1;
+ break;
+ case SC_ENCHANTPOISON:
+ val2= 250+50*val1; //Poisoning Chance (2.5+0.5%) in 1/10000 rate
+ case SC_ASPERSIO:
+ case SC_PROPERTYFIRE:
+ case SC_PROPERTYWATER:
+ case SC_PROPERTYWIND:
+ case SC_PROPERTYGROUND:
+ case SC_PROPERTYDARK:
+ case SC_PROPERTYTELEKINESIS:
+ skill->enchant_elemental_end(bl,type);
+ break;
+ case SC_ARMOR_PROPERTY:
+ // val1 : Element Lvl (if called by skill lvl 1, takes random value between 1 and 4)
+ // val2 : Element (When no element, random one is picked)
+ // val3 : 0 = called by skill 1 = called by script (fixed level)
+ if( !val2 ) val2 = rnd()%ELE_MAX;
+
+ if( val1 == 1 && val3 == 0 )
+ val1 = 1 + rnd()%4;
+ else if( val1 > 4 )
+ val1 = 4; // Max Level
+ val3 = 0; // Not need to keep this info.
+ break;
+ case SC_PROVIDENCE:
+ val2=val1*5; //Race/Ele resist
+ break;
+ case SC_REFLECTSHIELD:
+ val2=10+val1*3; // %Dmg reflected
+ if( !(flag&1) && (bl->type&(BL_PC|BL_MER)) ) {
+ struct map_session_data *tsd;
+ if( sd ) {
+ int i;
for( i = 0; i < 5; i++ ) {
if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) )
status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1);
}
- }
- else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) )
+ } else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) )
status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1);
}
- }
- break;
+ break;
+ case SC_NOEQUIPWEAPON:
+ if (!sd) //Watk reduction
+ val2 = 25;
+ break;
+ case SC_NOEQUIPSHIELD:
+ if (!sd) //Def reduction
+ val2 = 15;
+ break;
+ case SC_NOEQUIPARMOR:
+ if (!sd) //Vit reduction
+ val2 = 40;
+ break;
+ case SC_NOEQUIPHELM:
+ if (!sd) //Int reduction
+ val2 = 40;
+ break;
+ case SC_AUTOSPELL:
+ //Val1 Skill LV of Autospell
+ //Val2 Skill ID to cast
+ //Val3 Max Lv to cast
+ val4 = 5 + val1*2; //Chance of casting
+ break;
+ case SC_VOLCANO:
+ val2 = val1*10; //Watk increase
+ #ifndef RENEWAL
+ if (st->def_ele != ELE_FIRE)
+ val2 = 0;
+ #endif
+ break;
+ case SC_VIOLENTGALE:
+ val2 = val1*3; //Flee increase
+ #ifndef RENEWAL
+ if (st->def_ele != ELE_WIND)
+ val2 = 0;
+ #endif
+ break;
+ case SC_DELUGE:
+ val2 = skill->deluge_eff[val1-1]; //HP increase
+ #ifndef RENEWAL
+ if(st->def_ele != ELE_WATER)
+ val2 = 0;
+ #endif
+ break;
+ case SC_NJ_SUITON:
+ if (!val2 || (sd && (sd->class_&MAPID_BASEMASK) == MAPID_NINJA)) {
+ //No penalties.
+ val2 = 0; //Agi penalty
+ val3 = 0; //Walk speed penalty
+ break;
+ }
+ val3 = 50;
+ val2 = 3*((val1+1)/3);
+ if (val1 > 4) val2--;
+ break;
+ case SC_ONEHANDQUICKEN:
+ case SC_TWOHANDQUICKEN:
+ val2 = 300;
+ if (val1 > 10) //For boss casted skills [Skotlex]
+ val2 += 20*(val1-10);
+ break;
+ case SC_MER_QUICKEN:
+ val2 = 300;
+ break;
+ #ifndef RENEWAL_ASPD
+ case SC_SPEARQUICKEN:
+ val2 = 200+10*val1;
+ break;
+ #endif
+ case SC_DANCING:
+ //val1 : Skill ID + LV
+ //val2 : Skill Group of the Dance.
+ //val3 : Brings the skill_lv (merged into val1 here)
+ //val4 : Partner
+ if (val1 == CG_MOONLIT)
+ clif->status_change(bl,SI_MOON,1,tick,0, 0, 0);
+ val1|= (val3<<16);
+ val3 = tick/1000; //Tick duration
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_LONGING:
+ #ifdef RENEWAL
+ val2 = 50 + 10 * val1;
+ #else
+ val2 = 500-100*val1; //Aspd penalty.
+ #endif
+ break;
+ case SC_EXPLOSIONSPIRITS:
+ val2 = 75 + 25*val1; //Cri bonus
+ break;
+
+ case SC_ATTHASTE_POTION1:
+ case SC_ATTHASTE_POTION2:
+ case SC_ATTHASTE_POTION3:
+ case SC_ATTHASTE_INFINITY:
+ val2 = 50*(2+type-SC_ATTHASTE_POTION1);
+ break;
- case SC_DEFENDER:
- if (!(flag&1)) {
- val2 = 5 + 15*val1; //Damage reduction
+ case SC_WEDDING:
+ case SC_XMAS:
+ case SC_SUMMER:
+ case SC_HANBOK:
+ if (!vd) return 0;
+ //Store previous values as they could be removed.
+ unit->stop_attack(bl);
+ break;
+ case SC_NOCHAT:
+ // [GodLesZ] FIXME: is this correct? a hardcoded interval of 60sec? what about configuration ?_?
+ tick = 60000;
+ val1 = battle_config.manner_system; //Mute filters.
+ if (sd)
+ {
+ clif->changestatus(sd,SP_MANNER,sd->status.manner);
+ clif->updatestatus(sd,SP_MANNER);
+ }
+ break;
+
+ case SC_STONE:
+ val3 = tick/1000; //Petrified HP-damage iterations.
+ if(val3 < 1) val3 = 1;
+ tick = val4; //Petrifying time.
+ if(val4 > 500) // not with WL_SIENNAEXECRATE
+ tick = max(tick, 1000); //Min time
+ calc_flag = 0; //Actual status changes take effect on petrified state.
+ break;
+
+ case SC_DPOISON:
+ //Lose 10/15% of your life as long as it doesn't brings life below 25%
+ if (st->hp > st->max_hp>>2) {
+ int diff = st->max_hp*(bl->type==BL_PC?10:15)/100;
+ if (st->hp - diff < st->max_hp>>2)
+ diff = st->hp - (st->max_hp>>2);
+ if( val2 && bl->type == BL_MOB ) {
+ struct block_list* src = map->id2bl(val2);
+ if( src )
+ mob->log_damage((TBL_MOB*)bl,src,diff);
+ }
+ status_zap(bl, diff, 0);
+ }
+ // fall through
+ case SC_POISON:
+ val3 = tick/1000; //Damage iterations
+ if(val3 < 1) val3 = 1;
+ tick_time = 1000; // [GodLesZ] tick time
+ //val4: HP damage
+ if (bl->type == BL_PC)
+ val4 = (type == SC_DPOISON) ? 3 + st->max_hp/50 : 3 + st->max_hp*3/200;
+ else
+ val4 = (type == SC_DPOISON) ? 3 + st->max_hp/100 : 3 + st->max_hp/200;
+
+ break;
+ case SC_CONFUSION:
+ clif->emotion(bl,E_WHAT);
+ break;
+ case SC_BLOODING:
+ val4 = tick/10000;
+ if (!val4) val4 = 1;
+ tick_time = 10000; // [GodLesZ] tick time
+ break;
+ case SC_S_LIFEPOTION:
+ case SC_L_LIFEPOTION:
+ if( val1 == 0 ) return 0;
+ // val1 = heal percent/amout
+ // val2 = seconds between heals
+ // val4 = total of heals
+ if( val2 < 1 ) val2 = 1;
+ if( (val4 = tick/(val2 * 1000)) < 1 )
+ val4 = 1;
+ tick_time = val2 * 1000; // [GodLesZ] tick time
+ break;
+ case SC_CASH_BOSS_ALARM:
+ if( sd != NULL ) {
+ struct mob_data *boss_md = map->getmob_boss(bl->m); // Search for Boss on this Map
+ if( boss_md == NULL || boss_md->bl.prev == NULL ) {
+ // No MVP on this map - MVP is dead
+ clif->bossmapinfo(sd->fd, boss_md, 1);
+ return 0; // No need to start SC
+ }
+ val1 = boss_md->bl.id;
+ if( (val4 = tick/1000) < 1 )
+ val4 = 1;
+ tick_time = 1000; // [GodLesZ] tick time
+ }
+ break;
+ case SC_HIDING:
+ val2 = tick/1000;
+ tick_time = 1000; // [GodLesZ] tick time
val3 = 0; // unused, previously speed adjustment
- val4 = 250 - 50*val1; //Aspd adjustment
+ val4 = val1+3; //Seconds before SP substraction happen.
+ break;
+ case SC_CHASEWALK:
+ val2 = tick>0?tick:10000; //Interval at which SP is drained.
+ val3 = 35 - 5 * val1; //Speed adjustment.
+ if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_ROGUE)
+ val3 -= 40;
+ val4 = 10+val1*2; //SP cost.
+ if (map_flag_gvg(bl->m) || map->list[bl->m].flag.battleground) val4 *= 5;
+ break;
+ case SC_CLOAKING:
+ if (!sd) //Monsters should be able to walk with no penalties. [Skotlex]
+ val1 = 10;
+ tick_time = val2 = tick>0?tick:60000; //SP consumption rate.
+ tick = -1; // duration sent to the client should be infinite
+ val3 = 0; // unused, previously walk speed adjustment
+ //val4&1 signals the presence of a wall.
+ //val4&2 makes cloak not end on normal attacks [Skotlex]
+ //val4&4 makes cloak not end on using skills
+ if (bl->type == BL_PC || (bl->type == BL_MOB && ((TBL_MOB*)bl)->special_state.clone) ) //Standard cloaking.
+ val4 |= battle_config.pc_cloak_check_type&7;
+ else
+ val4 |= battle_config.monster_cloak_check_type&7;
+ break;
+ case SC_SIGHT: /* splash status */
+ case SC_RUWACH:
+ case SC_WZ_SIGHTBLASTER:
+ val3 = skill->get_splash(val2, val1); //Val2 should bring the skill-id.
+ val2 = tick/250;
+ tick_time = 10; // [GodLesZ] tick time
+ break;
- if (sd) {
+ //Permanent effects.
+ case SC_LEXAETERNA:
+ case SC_MODECHANGE:
+ case SC_WEIGHTOVER50:
+ case SC_WEIGHTOVER90:
+ case SC_BROKENWEAPON:
+ case SC_BROKENARMOR:
+ case SC_STORMKICK_READY:
+ case SC_DOWNKICK_READY:
+ case SC_COUNTERKICK_READY:
+ case SC_TURNKICK_READY:
+ case SC_DODGE_READY:
+ case SC_PUSH_CART:
+ case SC_ALL_RIDING:
+ tick = -1;
+ break;
+
+ case SC_AUTOGUARD:
+ if( !(flag&1) ) {
struct map_session_data *tsd;
- int i;
- for (i = 0; i < 5; i++) {
- //See if there are devoted characters, and pass the status to them. [Skotlex]
- if (sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])))
- status->change_start(&tsd->bl,type,10000,val1,5+val1*5,val3,val4,tick,1);
+ int i,t;
+ for( i = val2 = 0; i < val1; i++) {
+ t = 5-(i>>1);
+ val2 += (t < 0)? 1:t;
+ }
+
+ if( bl->type&(BL_PC|BL_MER) ) {
+ if( sd ) {
+ for( i = 0; i < 5; i++ ) {
+ if( sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) )
+ status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1);
+ }
+ }
+ else if( bl->type == BL_MER && ((TBL_MER*)bl)->devotion_flag && (tsd = ((TBL_MER*)bl)->master) )
+ status->change_start(&tsd->bl, type, 10000, val1, val2, 0, 0, tick, 1);
}
}
- }
- break;
+ break;
- case SC_TENSIONRELAX:
- if (sd) {
- pc_setsit(sd);
- clif->sitting(&sd->bl);
- }
- val2 = 12; //SP cost
- val4 = 10000; //Decrease at 10secs intervals.
- val3 = tick/val4;
- tick = -1; // duration sent to the client should be infinite
- tick_time = val4; // [GodLesZ] tick time
- break;
- case SC_PARRYING:
- val2 = 20 + val1*3; //Block Chance
- break;
+ case SC_DEFENDER:
+ if (!(flag&1)) {
+ val2 = 5 + 15*val1; //Damage reduction
+ val3 = 0; // unused, previously speed adjustment
+ val4 = 250 - 50*val1; //Aspd adjustment
+
+ if (sd) {
+ struct map_session_data *tsd;
+ int i;
+ for (i = 0; i < 5; i++) {
+ //See if there are devoted characters, and pass the status to them. [Skotlex]
+ if (sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])))
+ status->change_start(&tsd->bl,type,10000,val1,5+val1*5,val3,val4,tick,1);
+ }
+ }
+ }
+ break;
- case SC_WINDWALK:
- val2 = (val1+1)/2; // Flee bonus is 1/1/2/2/3/3/4/4/5/5
- break;
+ case SC_TENSIONRELAX:
+ if (sd) {
+ pc_setsit(sd);
+ clif->sitting(&sd->bl);
+ }
+ val2 = 12; //SP cost
+ val4 = 10000; //Decrease at 10secs intervals.
+ val3 = tick/val4;
+ tick = -1; // duration sent to the client should be infinite
+ tick_time = val4; // [GodLesZ] tick time
+ break;
+ case SC_PARRYING:
+ val2 = 20 + val1*3; //Block Chance
+ break;
- case SC_JOINTBEAT:
- if( val2&BREAK_NECK )
- sc_start2(bl,SC_BLOODING,100,val1,val3,skill->get_time2(status->sc2skill(type),val1));
- break;
+ case SC_WINDWALK:
+ val2 = (val1+1)/2; // Flee bonus is 1/1/2/2/3/3/4/4/5/5
+ break;
- case SC_BERSERK:
- if( val3 == SC__BLOODYLUST )
- sc_start(bl,(sc_type)val3,100,val1,tick);
- if( !val3 && !(!sc->data[SC_ENDURE] || !sc->data[SC_ENDURE]->val4) )
- sc_start4(bl, SC_ENDURE, 100,10,0,0,2, tick);
- //HP healing is performing after the calc_status call.
- //Val2 holds HP penalty
- if (!val4) val4 = skill->get_time2(status->sc2skill(type),val1);
- if (!val4) val4 = 10000; //Val4 holds damage interval
- val3 = tick/val4; //val3 holds skill duration
- tick_time = val4; // [GodLesZ] tick time
- break;
-
- case SC_GOSPEL:
- if(val4 == BCT_SELF) {
- // self effect
- val2 = tick/10000;
- tick_time = 10000; // [GodLesZ] tick time
- status->change_clear_buffs(bl,3); //Remove buffs/debuffs
- }
- break;
+ case SC_JOINTBEAT:
+ if( val2&BREAK_NECK )
+ sc_start2(bl,SC_BLOODING,100,val1,val3,skill->get_time2(status->sc2skill(type),val1));
+ break;
- case SC_MARIONETTE_MASTER:
- {
- int stat;
+ case SC_BERSERK:
+ if( val3 == SC__BLOODYLUST )
+ sc_start(bl,(sc_type)val3,100,val1,tick);
+ if( !val3 && !(!sc->data[SC_ENDURE] || !sc->data[SC_ENDURE]->val4) )
+ sc_start4(bl, SC_ENDURE, 100,10,0,0,2, tick);
+ //HP healing is performing after the calc_status call.
+ //Val2 holds HP penalty
+ if (!val4) val4 = skill->get_time2(status->sc2skill(type),val1);
+ if (!val4) val4 = 10000; //Val4 holds damage interval
+ val3 = tick/val4; //val3 holds skill duration
+ tick_time = val4; // [GodLesZ] tick time
+ break;
- val3 = 0;
- val4 = 0;
- stat = ( sd ? sd->status.str : status->get_base_status(bl)->str ) / 2; val3 |= cap_value(stat,0,0xFF)<<16;
- stat = ( sd ? sd->status.agi : status->get_base_status(bl)->agi ) / 2; val3 |= cap_value(stat,0,0xFF)<<8;
- stat = ( sd ? sd->status.vit : status->get_base_status(bl)->vit ) / 2; val3 |= cap_value(stat,0,0xFF);
- stat = ( sd ? sd->status.int_: status->get_base_status(bl)->int_) / 2; val4 |= cap_value(stat,0,0xFF)<<16;
- stat = ( sd ? sd->status.dex : status->get_base_status(bl)->dex ) / 2; val4 |= cap_value(stat,0,0xFF)<<8;
- stat = ( sd ? sd->status.luk : status->get_base_status(bl)->luk ) / 2; val4 |= cap_value(stat,0,0xFF);
- }
- break;
- case SC_MARIONETTE:
- {
- int stat,max_stat;
- // fetch caster information
- struct block_list *pbl = map->id2bl(val1);
- struct status_change *psc = pbl ? status->get_sc(pbl) : NULL;
- struct status_change_entry *psce = psc ? psc->data[SC_MARIONETTE_MASTER] : NULL;
- // fetch target's stats
- struct status_data* tst = status->get_status_data(bl); // battle status
-
- if (!psce)
- return 0;
+ case SC_GOSPEL:
+ if(val4 == BCT_SELF) {
+ // self effect
+ val2 = tick/10000;
+ tick_time = 10000; // [GodLesZ] tick time
+ status->change_clear_buffs(bl,3); //Remove buffs/debuffs
+ }
+ break;
- val3 = 0;
- val4 = 0;
- max_stat = battle_config.max_parameter; //Cap to 99 (default)
- stat = (psce->val3 >>16)&0xFF; stat = min(stat, max_stat - tst->str ); val3 |= cap_value(stat,0,0xFF)<<16;
- stat = (psce->val3 >> 8)&0xFF; stat = min(stat, max_stat - tst->agi ); val3 |= cap_value(stat,0,0xFF)<<8;
- stat = (psce->val3 >> 0)&0xFF; stat = min(stat, max_stat - tst->vit ); val3 |= cap_value(stat,0,0xFF);
- stat = (psce->val4 >>16)&0xFF; stat = min(stat, max_stat - tst->int_); val4 |= cap_value(stat,0,0xFF)<<16;
- stat = (psce->val4 >> 8)&0xFF; stat = min(stat, max_stat - tst->dex ); val4 |= cap_value(stat,0,0xFF)<<8;
- stat = (psce->val4 >> 0)&0xFF; stat = min(stat, max_stat - tst->luk ); val4 |= cap_value(stat,0,0xFF);
- }
- break;
- case SC_SWORDREJECT:
- val2 = 15*val1; //Reflect chance
- val3 = 3; //Reflections
- tick = -1;
- break;
+ case SC_MARIONETTE_MASTER:
+ {
+ int stat;
+
+ val3 = 0;
+ val4 = 0;
+ stat = ( sd ? sd->status.str : status->get_base_status(bl)->str ) / 2; val3 |= cap_value(stat,0,0xFF)<<16;
+ stat = ( sd ? sd->status.agi : status->get_base_status(bl)->agi ) / 2; val3 |= cap_value(stat,0,0xFF)<<8;
+ stat = ( sd ? sd->status.vit : status->get_base_status(bl)->vit ) / 2; val3 |= cap_value(stat,0,0xFF);
+ stat = ( sd ? sd->status.int_: status->get_base_status(bl)->int_) / 2; val4 |= cap_value(stat,0,0xFF)<<16;
+ stat = ( sd ? sd->status.dex : status->get_base_status(bl)->dex ) / 2; val4 |= cap_value(stat,0,0xFF)<<8;
+ stat = ( sd ? sd->status.luk : status->get_base_status(bl)->luk ) / 2; val4 |= cap_value(stat,0,0xFF);
+ }
+ break;
+ case SC_MARIONETTE:
+ {
+ int stat,max_stat;
+ // fetch caster information
+ struct block_list *pbl = map->id2bl(val1);
+ struct status_change *psc = pbl ? status->get_sc(pbl) : NULL;
+ struct status_change_entry *psce = psc ? psc->data[SC_MARIONETTE_MASTER] : NULL;
+ // fetch target's stats
+ struct status_data* tst = status->get_status_data(bl); // battle status
+
+ if (!psce)
+ return 0;
- case SC_MEMORIZE:
- val2 = 5; //Memorized casts.
- tick = -1;
- break;
+ val3 = 0;
+ val4 = 0;
+ max_stat = battle_config.max_parameter; //Cap to 99 (default)
+ stat = (psce->val3 >>16)&0xFF; stat = min(stat, max_stat - tst->str ); val3 |= cap_value(stat,0,0xFF)<<16;
+ stat = (psce->val3 >> 8)&0xFF; stat = min(stat, max_stat - tst->agi ); val3 |= cap_value(stat,0,0xFF)<<8;
+ stat = (psce->val3 >> 0)&0xFF; stat = min(stat, max_stat - tst->vit ); val3 |= cap_value(stat,0,0xFF);
+ stat = (psce->val4 >>16)&0xFF; stat = min(stat, max_stat - tst->int_); val4 |= cap_value(stat,0,0xFF)<<16;
+ stat = (psce->val4 >> 8)&0xFF; stat = min(stat, max_stat - tst->dex ); val4 |= cap_value(stat,0,0xFF)<<8;
+ stat = (psce->val4 >> 0)&0xFF; stat = min(stat, max_stat - tst->luk ); val4 |= cap_value(stat,0,0xFF);
+ }
+ break;
+ case SC_SWORDREJECT:
+ val2 = 15*val1; //Reflect chance
+ val3 = 3; //Reflections
+ tick = -1;
+ break;
- case SC_GRAVITATION:
- val2 = 50*val1; //aspd reduction
- break;
+ case SC_MEMORIZE:
+ val2 = 5; //Memorized casts.
+ tick = -1;
+ break;
- case SC_GDSKILL_REGENERATION:
- if (val1 == 1)
- val2 = 2;
- else
- val2 = val1; //HP Regerenation rate: 200% 200% 300%
- val3 = val1; //SP Regeneration Rate: 100% 200% 300%
- //if val4 comes set, this blocks regen rather than increase it.
- break;
+ case SC_GRAVITATION:
+ val2 = 50*val1; //aspd reduction
+ break;
- case SC_DEVOTION:
- {
- struct block_list *d_bl;
- struct status_change *d_sc;
-
- if( (d_bl = map->id2bl(val1)) && (d_sc = status->get_sc(d_bl)) && d_sc->count ) {
- // Inherits Status From Source
- const enum sc_type types[] = { SC_AUTOGUARD, SC_DEFENDER, SC_REFLECTSHIELD, SC_ENDURE };
- enum sc_type type2;
- int i = (map_flag_gvg(bl->m) || map->list[bl->m].flag.battleground)?2:3;
- while( i >= 0 ) {
- type2 = types[i];
- if( d_sc->data[type2] )
- sc_start(bl, type2, 100, d_sc->data[type2]->val1, skill->get_time(status->sc2skill(type2),d_sc->data[type2]->val1));
- i--;
+ case SC_GDSKILL_REGENERATION:
+ if (val1 == 1)
+ val2 = 2;
+ else
+ val2 = val1; //HP Regerenation rate: 200% 200% 300%
+ val3 = val1; //SP Regeneration Rate: 100% 200% 300%
+ //if val4 comes set, this blocks regen rather than increase it.
+ break;
+
+ case SC_DEVOTION:
+ {
+ struct block_list *d_bl;
+ struct status_change *d_sc;
+
+ if( (d_bl = map->id2bl(val1)) && (d_sc = status->get_sc(d_bl)) && d_sc->count ) {
+ // Inherits Status From Source
+ const enum sc_type types[] = { SC_AUTOGUARD, SC_DEFENDER, SC_REFLECTSHIELD, SC_ENDURE };
+ enum sc_type type2;
+ int i = (map_flag_gvg(bl->m) || map->list[bl->m].flag.battleground)?2:3;
+ while( i >= 0 ) {
+ type2 = types[i];
+ if( d_sc->data[type2] )
+ sc_start(bl, type2, 100, d_sc->data[type2]->val1, skill->get_time(status->sc2skill(type2),d_sc->data[type2]->val1));
+ i--;
+ }
}
+ break;
}
- break;
- }
- case SC_COMA: //Coma. Sends a char to 1HP. If val2, do not zap sp
- if( val3 && bl->type == BL_MOB ) {
- struct block_list* src = map->id2bl(val3);
- if( src )
- mob->log_damage((TBL_MOB*)bl,src,st->hp - 1);
+ case SC_COMA: //Coma. Sends a char to 1HP. If val2, do not zap sp
+ if( val3 && bl->type == BL_MOB ) {
+ struct block_list* src = map->id2bl(val3);
+ if( src )
+ mob->log_damage((TBL_MOB*)bl,src,st->hp - 1);
+ }
+ status_zap(bl, st->hp-1, val2 ? 0 : st->sp);
+ return 1;
+ break;
+ case SC_RG_CCONFINE_S:
+ {
+ struct block_list *src = val2 ? map->id2bl(val2) : NULL;
+ struct status_change *sc2 = src ? status->get_sc(src) : NULL;
+ struct status_change_entry *sce2 = sc2 ? sc2->data[SC_RG_CCONFINE_M] : NULL;
+ if (src && sc2) {
+ if (!sce2) //Start lock on caster.
+ sc_start4(src,SC_RG_CCONFINE_M,100,val1,1,0,0,tick+1000);
+ else { //Increase count of locked enemies and refresh time.
+ (sce2->val2)++;
+ timer->delete(sce2->timer, status->change_timer);
+ sce2->timer = timer->add(timer->gettick()+tick+1000, status->change_timer, src->id, SC_RG_CCONFINE_M);
+ }
+ } else //Status failed.
+ return 0;
}
- status_zap(bl, st->hp-1, val2 ? 0 : st->sp);
- return 1;
- break;
- case SC_RG_CCONFINE_S:
- {
- struct block_list *src = val2 ? map->id2bl(val2) : NULL;
- struct status_change *sc2 = src ? status->get_sc(src) : NULL;
- struct status_change_entry *sce2 = sc2 ? sc2->data[SC_RG_CCONFINE_M] : NULL;
- if (src && sc2) {
- if (!sce2) //Start lock on caster.
- sc_start4(src,SC_RG_CCONFINE_M,100,val1,1,0,0,tick+1000);
- else { //Increase count of locked enemies and refresh time.
- (sce2->val2)++;
- timer->delete(sce2->timer, status->change_timer);
- sce2->timer = timer->add(timer->gettick()+tick+1000, status->change_timer, src->id, SC_RG_CCONFINE_M);
+ break;
+ case SC_KAITE:
+ val2 = 1+val1/5; //Number of bounces: 1 + skill_lv/5
+ break;
+ case SC_KAUPE:
+ switch (val1) {
+ case 3: //33*3 + 1 -> 100%
+ val2++;
+ case 1:
+ case 2: //33, 66%
+ val2 += 33*val1;
+ val3 = 1; //Dodge 1 attack total.
+ break;
+ default: //Custom. For high level mob usage, higher level means more blocks. [Skotlex]
+ val2 = 100;
+ val3 = val1-2;
+ break;
}
- } else //Status failed.
- return 0;
- }
- break;
- case SC_KAITE:
- val2 = 1+val1/5; //Number of bounces: 1 + skill_lv/5
- break;
- case SC_KAUPE:
- switch (val1) {
- case 3: //33*3 + 1 -> 100%
- val2++;
- case 1:
- case 2: //33, 66%
- val2 += 33*val1;
- val3 = 1; //Dodge 1 attack total.
break;
- default: //Custom. For high level mob usage, higher level means more blocks. [Skotlex]
- val2 = 100;
- val3 = val1-2;
+
+ case SC_COMBOATTACK: {
+ //val1: Skill ID
+ //val2: When given, target (for autotargetting skills)
+ //val3: When set, this combo time should NOT delay attack/movement
+ //val3: TK: Last used kick
+ //val4: TK: Combo time
+ struct unit_data *ud = unit->bl2ud(bl);
+ if (ud && !val3) {
+ tick += 300 * battle_config.combo_delay_rate/100;
+ ud->attackabletime = timer->gettick()+tick;
+ unit->set_walkdelay(bl, timer->gettick(), tick, 1);
+ }
+ val3 = 0;
+ val4 = tick;
+ }
+ break;
+ case SC_EARTHSCROLL:
+ val2 = 11-val1; //Chance to consume: 11-skill_lv%
+ break;
+ case SC_RUN:
+ val4 = timer->gettick(); //Store time at which you started running.
+ tick = -1;
+ break;
+ case SC_KAAHI:
+ val2 = 200*val1; //HP heal
+ val3 = 5*val1; //SP cost
+ val4 = INVALID_TIMER; //Kaahi Timer.
+ break;
+ case SC_BLESSING:
+ if ((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC)
+ val2 = val1;
+ else
+ val2 = 0; //0 -> Half stat.
+ break;
+ case SC_TRICKDEAD:
+ if (vd) vd->dead_sit = 1;
+ tick = -1;
+ break;
+ case SC_CONCENTRATION:
+ val2 = 2 + val1;
+ if (sd) { //Store the card-bonus data that should not count in the %
+ val3 = sd->param_bonus[1]; //Agi
+ val4 = sd->param_bonus[4]; //Dex
+ } else {
+ val3 = val4 = 0;
+ }
+ break;
+ case SC_OVERTHRUSTMAX:
+ val2 = 20*val1; //Power increase
+ break;
+ case SC_OVERTHRUST:
+ //val2 holds if it was casted on self, or is bonus received from others
+ val3 = 5*val1; //Power increase
+ if(sd && pc->checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ break;
+ case SC_ADRENALINE2:
+ case SC_ADRENALINE:
+ val3 = (val2) ? 300 : 200; // aspd increase
+ case SC_WEAPONPERFECT:
+ if(sd && pc->checkskill(sd,BS_HILTBINDING)>0)
+ tick += tick / 10;
+ break;
+ case SC_LKCONCENTRATION:
+ val2 = 5*val1; //Batk/Watk Increase
+ val3 = 10*val1; //Hit Increase
+ val4 = 5*val1; //Def reduction
+ sc_start(bl, SC_ENDURE, 100, 1, tick); //Endure effect
+ break;
+ case SC_ANGELUS:
+ val2 = 5*val1; //def increase
+ break;
+ case SC_IMPOSITIO:
+ val2 = 5*val1; //watk increase
+ break;
+ case SC_MELTDOWN:
+ val2 = 100*val1; //Chance to break weapon
+ val3 = 70*val1; //Change to break armor
+ break;
+ case SC_TRUESIGHT:
+ val2 = 10*val1; //Critical increase
+ val3 = 3*val1; //Hit increase
+ break;
+ case SC_SUN_COMFORT:
+ val2 = (status->get_lv(bl) + st->dex + st->luk)/2; //def increase
+ break;
+ case SC_MOON_COMFORT:
+ val2 = (status->get_lv(bl) + st->dex + st->luk)/10; //flee increase
+ break;
+ case SC_STAR_COMFORT:
+ val2 = (status->get_lv(bl) + st->dex + st->luk); //Aspd increase
+ break;
+ case SC_QUAGMIRE:
+ val2 = (sd?5:10)*val1; //Agi/Dex decrease.
break;
- }
- break;
- case SC_COMBOATTACK: {
- //val1: Skill ID
- //val2: When given, target (for autotargetting skills)
- //val3: When set, this combo time should NOT delay attack/movement
- //val3: TK: Last used kick
- //val4: TK: Combo time
- struct unit_data *ud = unit->bl2ud(bl);
- if (ud && !val3) {
- tick += 300 * battle_config.combo_delay_rate/100;
- ud->attackabletime = timer->gettick()+tick;
- unit->set_walkdelay(bl, timer->gettick(), tick, 1);
- }
- val3 = 0;
- val4 = tick;
- }
- break;
- case SC_EARTHSCROLL:
- val2 = 11-val1; //Chance to consume: 11-skill_lv%
- break;
- case SC_RUN:
- val4 = timer->gettick(); //Store time at which you started running.
- tick = -1;
- break;
- case SC_KAAHI:
- val2 = 200*val1; //HP heal
- val3 = 5*val1; //SP cost
- val4 = INVALID_TIMER; //Kaahi Timer.
- break;
- case SC_BLESSING:
- if ((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC)
- val2 = val1;
- else
- val2 = 0; //0 -> Half stat.
- break;
- case SC_TRICKDEAD:
- if (vd) vd->dead_sit = 1;
- tick = -1;
- break;
- case SC_CONCENTRATION:
- val2 = 2 + val1;
- if (sd) { //Store the card-bonus data that should not count in the %
- val3 = sd->param_bonus[1]; //Agi
- val4 = sd->param_bonus[4]; //Dex
- } else {
- val3 = val4 = 0;
- }
- break;
- case SC_OVERTHRUSTMAX:
- val2 = 20*val1; //Power increase
- break;
- case SC_OVERTHRUST:
- //val2 holds if it was casted on self, or is bonus received from others
- val3 = 5*val1; //Power increase
- if(sd && pc->checkskill(sd,BS_HILTBINDING)>0)
- tick += tick / 10;
- break;
- case SC_ADRENALINE2:
- case SC_ADRENALINE:
- val3 = (val2) ? 300 : 200; // aspd increase
- case SC_WEAPONPERFECT:
- if(sd && pc->checkskill(sd,BS_HILTBINDING)>0)
- tick += tick / 10;
- break;
- case SC_LKCONCENTRATION:
- val2 = 5*val1; //Batk/Watk Increase
- val3 = 10*val1; //Hit Increase
- val4 = 5*val1; //Def reduction
- sc_start(bl, SC_ENDURE, 100, 1, tick); //Endure effect
- break;
- case SC_ANGELUS:
- val2 = 5*val1; //def increase
- break;
- case SC_IMPOSITIO:
- val2 = 5*val1; //watk increase
- break;
- case SC_MELTDOWN:
- val2 = 100*val1; //Chance to break weapon
- val3 = 70*val1; //Change to break armor
- break;
- case SC_TRUESIGHT:
- val2 = 10*val1; //Critical increase
- val3 = 3*val1; //Hit increase
- break;
- case SC_SUN_COMFORT:
- val2 = (status->get_lv(bl) + st->dex + st->luk)/2; //def increase
- break;
- case SC_MOON_COMFORT:
- val2 = (status->get_lv(bl) + st->dex + st->luk)/10; //flee increase
- break;
- case SC_STAR_COMFORT:
- val2 = (status->get_lv(bl) + st->dex + st->luk); //Aspd increase
- break;
- case SC_QUAGMIRE:
- val2 = (sd?5:10)*val1; //Agi/Dex decrease.
- break;
+ // gs_something1 [Vicious]
+ case SC_GS_GATLINGFEVER:
+ val2 = 20*val1; //Aspd increase
+ val4 = 5*val1; //Flee decrease
+ #ifndef RENEWAL
+ val3 = 20+10*val1; //Batk increase
+ #endif
+ break;
- // gs_something1 [Vicious]
- case SC_GS_GATLINGFEVER:
- val2 = 20*val1; //Aspd increase
- val4 = 5*val1; //Flee decrease
-#ifndef RENEWAL
- val3 = 20+10*val1; //Batk increase
-#endif
- break;
+ case SC_FLING:
+ if (bl->type == BL_PC)
+ val2 = 0; //No armor reduction to players.
+ else
+ val2 = 5*val1; //Def reduction
+ val3 = 5*val1; //Def2 reduction
+ break;
+ case SC_PROVOKE:
+ //val2 signals autoprovoke.
+ val3 = 2+3*val1; //Atk increase
+ val4 = 5+5*val1; //Def reduction.
+ break;
+ case SC_HLIF_AVOID:
+ //val2 = 10*val1; //Speed change rate.
+ break;
+ case SC_HAMI_DEFENCE:
+ val2 = 2*val1; //Def bonus
+ break;
+ case SC_HAMI_BLOODLUST:
+ val2 = 20+10*val1; //Atk rate change.
+ val3 = 3*val1; //Leech chance
+ val4 = 20; //Leech percent
+ break;
+ case SC_HLIF_FLEET:
+ val2 = 30*val1; //Aspd change
+ val3 = 5+5*val1; //bAtk/wAtk rate change
+ break;
+ case SC_MINDBREAKER:
+ val2 = 20*val1; //matk increase.
+ val3 = 12*val1; //mdef2 reduction.
+ break;
+ case SC_SKA:
+ val2 = tick/1000;
+ val3 = rnd()%100; //Def changes randomly every second...
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_JAILED:
+ //Val1 is duration in minutes. Use INT_MAX to specify 'unlimited' time.
+ tick = val1>0?1000:250;
+ if (sd)
+ {
+ if (sd->mapindex != val2)
+ {
+ int pos = (bl->x&0xFFFF)|(bl->y<<16); /// Current Coordinates
+ int mapindex = sd->mapindex; /// Current Map
+ //1. Place in Jail (val2 -> Jail Map, val3 -> x, val4 -> y
+ pc->setpos(sd,(unsigned short)val2,val3,val4, CLR_TELEPORT);
+ //2. Set restore point (val3 -> return map, val4 return coords
+ val3 = mapindex;
+ val4 = pos;
+ } else if (!val3 || val3 == sd->mapindex) { //Use save point.
+ val3 = sd->status.save_point.map;
+ val4 = (sd->status.save_point.x&0xFFFF)
+ |(sd->status.save_point.y<<16);
+ }
+ }
+ break;
+ case SC_NJ_UTSUSEMI:
+ val2=(val1+1)/2; // number of hits blocked
+ val3=skill->get_blewcount(NJ_UTSUSEMI, val1); //knockback value.
+ break;
+ case SC_NJ_BUNSINJYUTSU:
+ val2=(val1+1)/2; // number of hits blocked
+ break;
+ case SC_HLIF_CHANGE:
+ val2= 30*val1; //Vit increase
+ val3= 20*val1; //Int increase
+ break;
+ case SC_SWOO:
+ if(st->mode&MD_BOSS)
+ tick /= 5; //TODO: Reduce skill's duration. But for how long?
+ break;
+ case SC_SPIDERWEB:
+ if( bl->type == BL_PC )
+ tick /= 2;
+ break;
+ case SC_ARMOR:
+ //NPC_DEFENDER:
+ val2 = 80; //Damage reduction
+ //Attack requirements to be blocked:
+ val3 = BF_LONG; //Range
+ val4 = BF_WEAPON|BF_MISC; //Type
+ break;
+ case SC_ENCHANTARMS:
+ //end previous enchants
+ skill->enchant_elemental_end(bl,type);
+ //Make sure the received element is valid.
+ if (val2 >= ELE_MAX)
+ val2 = val2%ELE_MAX;
+ else if (val2 < 0)
+ val2 = rnd()%ELE_MAX;
+ break;
+ case SC_CRITICALWOUND:
+ val2 = 20*val1; //Heal effectiveness decrease
+ break;
+ case SC_MAGICMIRROR:
+ case SC_SLOWCAST:
+ val2 = 20*val1; //Magic reflection/cast rate
+ break;
- case SC_FLING:
- if (bl->type == BL_PC)
- val2 = 0; //No armor reduction to players.
- else
- val2 = 5*val1; //Def reduction
- val3 = 5*val1; //Def2 reduction
- break;
- case SC_PROVOKE:
- //val2 signals autoprovoke.
- val3 = 2+3*val1; //Atk increase
- val4 = 5+5*val1; //Def reduction.
- break;
- case SC_HLIF_AVOID:
- //val2 = 10*val1; //Speed change rate.
- break;
- case SC_HAMI_DEFENCE:
- val2 = 2*val1; //Def bonus
- break;
- case SC_HAMI_BLOODLUST:
- val2 = 20+10*val1; //Atk rate change.
- val3 = 3*val1; //Leech chance
- val4 = 20; //Leech percent
- break;
- case SC_HLIF_FLEET:
- val2 = 30*val1; //Aspd change
- val3 = 5+5*val1; //bAtk/wAtk rate change
- break;
- case SC_MINDBREAKER:
- val2 = 20*val1; //matk increase.
- val3 = 12*val1; //mdef2 reduction.
- break;
- case SC_SKA:
- val2 = tick/1000;
- val3 = rnd()%100; //Def changes randomly every second...
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_JAILED:
- //Val1 is duration in minutes. Use INT_MAX to specify 'unlimited' time.
- tick = val1>0?1000:250;
- if (sd)
+ case SC_STONESKIN:
+ if (val2 == NPC_ANTIMAGIC)
+ { //Boost mdef
+ val2 =-20;
+ val3 = 20;
+ } else { //Boost def
+ val2 = 20;
+ val3 =-20;
+ }
+ val2*=val1; //20% per level
+ val3*=val1;
+ break;
+ case SC_CASH_PLUSEXP:
+ case SC_CASH_PLUSONLYJOBEXP:
+ if (val1 < 0)
+ val1 = 0;
+ break;
+ case SC_PLUSAVOIDVALUE:
+ case SC_CRITICALPERCENT:
+ val2 = val1*10; //Actual boost (since 100% = 1000)
+ break;
+ case SC_SUFFRAGIUM:
+ val2 = 15 * val1; //Speed cast decrease
+ break;
+ case SC_HEALPLUS:
+ if (val1 < 1)
+ val1 = 1;
+ break;
+ case SC_ILLUSION:
+ val2 = 5+val1; //Factor by which displayed damage is increased by
+ break;
+ case SC_DOUBLECASTING:
+ val2 = 30+10*val1; //Trigger rate
+ break;
+ case SC_KAIZEL:
+ val2 = 10*val1; //% of life to be revived with
+ break;
+ // case SC_ARMORPROPERTY:
+ // case SC_ARMOR_RESIST:
+ // Mod your resistance against elements:
+ // val1 = water | val2 = earth | val3 = fire | val4 = wind
+ // break;
+ //case ????:
+ //Place here SCs that have no SCB_* data, no skill associated, no ICON
+ //associated, and yet are not wrong/unknown. [Skotlex]
+ //break;
+
+ case SC_MER_FLEE:
+ case SC_MER_ATK:
+ case SC_MER_HIT:
+ val2 = 15 * val1;
+ break;
+ case SC_MER_HP:
+ case SC_MER_SP:
+ val2 = 5 * val1;
+ break;
+ case SC_REBIRTH:
+ val2 = 20*val1; //% of life to be revived with
+ break;
+
+ case SC_MANU_DEF:
+ case SC_MANU_ATK:
+ case SC_MANU_MATK:
+ val2 = 1; // Manuk group
+ break;
+ case SC_SPL_DEF:
+ case SC_SPL_ATK:
+ case SC_SPL_MATK:
+ val2 = 2; // Splendide group
+ break;
+ /**
+ * General
+ **/
+ case SC_FEAR:
+ val2 = 2;
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_BURNING:
+ val4 = tick / 3000; // Total Ticks to Burn!!
+ tick_time = 3000; // [GodLesZ] tick time
+ break;
+ /**
+ * Rune Knight
+ **/
+ case SC_DEATHBOUND:
+ val2 = 500 + 100 * val1;
+ break;
+ case SC_STONEHARDSKIN:
+ if( sd )
+ val1 = sd->status.job_level * pc->checkskill(sd, RK_RUNEMASTERY) / 4; //DEF/MDEF Increase
+ break;
+ case SC_ABUNDANCE:
+ val4 = tick / 10000;
+ tick_time = 10000; // [GodLesZ] tick time
+ break;
+ /**
+ * Arch Bishop
+ **/
+ case SC_RENOVATIO:
+ val4 = tick / 5000;
+ tick_time = 5000;
+ break;
+ case SC_SECRAMENT:
+ val2 = 10 * val1;
+ break;
+ case SC_VENOMIMPRESS:
+ val2 = 10 * val1;
+ break;
+ case SC_WEAPONBLOCKING:
+ val2 = 10 + 2 * val1; // Chance
+ val4 = tick / 3000;
+ tick_time = 3000; // [GodLesZ] tick time
+ break;
+ case SC_TOXIN:
+ val4 = tick / 10000;
+ tick_time = 10000; // [GodLesZ] tick time
+ break;
+ case SC_MAGICMUSHROOM:
+ val4 = tick / 4000;
+ tick_time = 4000; // [GodLesZ] tick time
+ break;
+ case SC_PYREXIA:
+ status->change_start(bl,SC_BLIND,10000,val1,0,0,0,30000,11); // Blind status that last for 30 seconds
+ val4 = tick / 3000;
+ tick_time = 3000; // [GodLesZ] tick time
+ break;
+ case SC_LEECHESEND:
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_OBLIVIONCURSE:
+ val4 = tick / 3000;
+ tick_time = 3000; // [GodLesZ] tick time
+ break;
+ case SC_CLOAKINGEXCEED:
+ val2 = ( val1 + 1 ) / 2; // Hits
+ val3 = 90 + val1 * 10; // Walk speed
+ if (bl->type == BL_PC)
+ val4 |= battle_config.pc_cloak_check_type&7;
+ else
+ val4 |= battle_config.monster_cloak_check_type&7;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_HALLUCINATIONWALK:
+ val2 = 50 * val1; // Evasion rate of physical attacks. Flee
+ val3 = 10 * val1; // Evasion rate of magical attacks.
+ break;
+ case SC_WHITEIMPRISON:
+ status_change_end(bl, SC_BURNING, INVALID_TIMER);
+ status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
+ status_change_end(bl, SC_FREEZE, INVALID_TIMER);
+ status_change_end(bl, SC_STONE, INVALID_TIMER);
+ break;
+ case SC_MARSHOFABYSS:
+ val2 = 6 * val1;
+ if( sd ) // half on players
+ val2 >>= 1;
+ break;
+ case SC_FROSTMISTY:
+ status_change_end(bl, SC_BURNING, INVALID_TIMER);
+ break;
+ case SC_READING_SB:
+ // val2 = sp reduction per second
+ tick_time = 5000; // [GodLesZ] tick time
+ break;
+ case SC_SUMMON1:
+ case SC_SUMMON2:
+ case SC_SUMMON3:
+ case SC_SUMMON4:
+ case SC_SUMMON5:
+ val4 = tick / 1000;
+ if( val4 < 1 )
+ val4 = 1;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_SHAPESHIFT:
+ switch( val1 )
+ {
+ case 1: val2 = ELE_FIRE; break;
+ case 2: val2 = ELE_EARTH; break;
+ case 3: val2 = ELE_WIND; break;
+ case 4: val2 = ELE_WATER; break;
+ }
+ break;
+ case SC_ELECTRICSHOCKER:
+ case SC_COLD:
+ case SC_MEIKYOUSISUI:
+ val4 = tick / 1000;
+ if( val4 < 1 )
+ val4 = 1;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_CAMOUFLAGE:
+ val4 = tick/1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_WUGDASH:
+ val4 = timer->gettick(); //Store time at which you started running.
+ tick = -1;
+ break;
+ case SC__SHADOWFORM: {
+ struct map_session_data * s_sd = map->id2sd(val2);
+ if( s_sd )
+ s_sd->shadowform_id = bl->id;
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ }
+ break;
+ case SC__STRIPACCESSARY:
+ if (!sd)
+ val2 = 20;
+ break;
+ case SC__INVISIBILITY:
+ val2 = 50 - 10 * val1; // ASPD
+ val3 = 20 * val1; // CRITICAL
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC__ENERVATION:
+ val2 = 20 + 10 * val1; // ATK Reduction
+ if( sd ) pc->delspiritball(sd,sd->spiritball,0);
+ break;
+ case SC__GROOMY:
+ val2 = 20 + 10 * val1; //ASPD. Need to confirm if Movement Speed reduction is the same. [Jobbie]
+ val3 = 20 * val1; //HIT
+ if( sd ) { // Removes Animals
+ if( pc_isriding(sd) ) pc->setriding(sd, 0);
+ if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
+ if( pc_iswug(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_WUG);
+ if( pc_isridingwug(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_WUGRIDER);
+ if( pc_isfalcon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_FALCON);
+ if( sd->status.pet_id > 0 ) pet->menu(sd, 3);
+ if( homun_alive(sd->hd) ) homun->vaporize(sd,HOM_ST_REST);
+ if( sd->md ) mercenary->delete(sd->md,3);
+ }
+ break;
+ case SC__LAZINESS:
+ val2 = 10 + 10 * val1; // Cast reduction
+ val3 = 10 * val1; // Flee Reduction
+ break;
+ case SC__UNLUCKY:
+ val2 = 10 * val1; // Crit and Flee2 Reduction
+ break;
+ case SC__WEAKNESS:
+ val2 = 10 * val1;
+ // bypasses coating protection and MADO
+ sc_start(bl,SC_NOEQUIPWEAPON,100,val1,tick);
+ sc_start(bl,SC_NOEQUIPSHIELD,100,val1,tick);
+ break;
+ case SC_GN_CARTBOOST:
+ if( val1 < 3 )
+ val2 = 50;
+ else if( val1 < 5 )
+ val2 = 75;
+ else
+ val2 = 100;
+ break;
+ case SC_PROPERTYWALK:
+ val3 = 0;
+ break;
+ case SC_WARMER:
+ status_change_end(bl, SC_FREEZE, INVALID_TIMER);
+ status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
+ status_change_end(bl, SC_COLD, INVALID_TIMER);
+ break;
+ case SC_STRIKING:
+ val1 = 6 - val1;//spcost = 6 - level (lvl1:5 ... lvl 5: 1)
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_BLOOD_SUCKER:
{
- if (sd->mapindex != val2)
+ struct block_list *src = map->id2bl(val2);
+ val3 = 1;
+ if(src)
+ val3 = 200 + 100 * val1 + status_get_int(src);
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ }
+ break;
+ case SC_VACUUM_EXTREME:
+ tick -= (st->str / 20) * 1000;
+ val4 = val3 = tick / 100;
+ tick_time = 100; // [GodLesZ] tick time
+ break;
+ case SC_SWING:
+ val2 = 4 * val1; // Walk speed and aspd reduction.
+ break;
+ case SC_SYMPHONY_LOVE:
+ case SC_RUSH_WINDMILL:
+ case SC_ECHOSONG:
+ val2 = 6 * val1;
+ val2 += val3; //Adding 1% * Lesson Bonus
+ val2 += (int)(val4*2/10); //Adding 0.2% per JobLevel
+ break;
+ case SC_MOONLIT_SERENADE:
+ val2 = 10 * val1;
+ break;
+ case SC_HARMONIZE:
+ val2 = 5 + 5 * val1;
+ break;
+ case SC_SIREN:
+ val4 = tick / 2000;
+ tick_time = 2000; // [GodLesZ] tick time
+ break;
+ case SC_DEEP_SLEEP:
+ val4 = tick / 2000;
+ tick_time = 2000; // [GodLesZ] tick time
+ break;
+ case SC_SIRCLEOFNATURE:
+ val2 = 1 + val1; //SP consume
+ val3 = 40 * val1; //HP recovery
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_SONG_OF_MANA:
+ val3 = 10 + (2 * val2);
+ val4 = tick/3000;
+ tick_time = 3000; // [GodLesZ] tick time
+ break;
+ case SC_SATURDAY_NIGHT_FEVER:
+ if (!val4) val4 = skill->get_time2(status->sc2skill(type),val1);
+ if (!val4) val4 = 3000;
+ val3 = tick/val4;
+ tick_time = val4; // [GodLesZ] tick time
+ break;
+ case SC_GLOOMYDAY:
+ val2 = 20 + 5 * val1; // Flee reduction.
+ val3 = 15 + 5 * val1; // ASPD reduction.
+ if( sd && rand()%100 < val1 ){ // (Skill Lv) %
+ val4 = 1; // reduce walk speed by half.
+ if( pc_isriding(sd) ) pc->setriding(sd, 0);
+ if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
+ }
+ break;
+ case SC_GLOOMYDAY_SK:
+ // Random number between [15 ~ (Voice Lesson Skill Level x 5) + (Skill Level x 10)] %.
+ val2 = 15 + rand()%( (sd?pc->checkskill(sd, WM_LESSON)*5:0) + val1*10 );
+ break;
+ case SC_SITDOWN_FORCE:
+ case SC_BANANA_BOMB_SITDOWN_POSTDELAY:
+ if( sd && !pc_issit(sd) )
+ {
+ pc_setsit(sd);
+ skill->sit(sd,1);
+ clif->sitting(bl);
+ }
+ break;
+ case SC_DANCE_WITH_WUG:
+ val3 = (5 * val1) + (1 * val2); //Still need official value.
+ break;
+ case SC_LERADS_DEW:
+ val3 = (5 * val1) + (1 * val2);
+ break;
+ case SC_MELODYOFSINK:
+ val3 = (5 * val1) + (1 * val2);
+ break;
+ case SC_BEYOND_OF_WARCRY:
+ val3 = (5 * val1) + (1 * val2);
+ break;
+ case SC_UNLIMITED_HUMMING_VOICE:
{
- int pos = (bl->x&0xFFFF)|(bl->y<<16); /// Current Coordinates
- int mapindex = sd->mapindex; /// Current Map
- //1. Place in Jail (val2 -> Jail Map, val3 -> x, val4 -> y
- pc->setpos(sd,(unsigned short)val2,val3,val4, CLR_TELEPORT);
- //2. Set restore point (val3 -> return map, val4 return coords
- val3 = mapindex;
- val4 = pos;
- } else if (!val3 || val3 == sd->mapindex) { //Use save point.
- val3 = sd->status.save_point.map;
- val4 = (sd->status.save_point.x&0xFFFF)
- |(sd->status.save_point.y<<16);
+ struct unit_data *ud = unit->bl2ud(bl);
+ if( ud == NULL ) return 0;
+ ud->state.skillcastcancel = 0;
+ val3 = 15 - (2 * val2);
+ }
+ break;
+ case SC_LG_REFLECTDAMAGE:
+ val2 = 15 + 5 * val1;
+ val3 = (val1==5)?20:(val1+4)*2; // SP consumption
+ val4 = tick/10000;
+ tick_time = 10000; // [GodLesZ] tick time
+ break;
+ case SC_FORCEOFVANGUARD: // This is not the official way to handle it but I think we should use it. [pakpil]
+ val2 = 20 + 12 * (val1 - 1); // Chance
+ val3 = 5 + (2 * val1); // Max rage counters
+ tick = -1; //endless duration in the client
+ tick_time = 6000; // [GodLesZ] tick time
+ break;
+ case SC_EXEEDBREAK:
+ val1 *= 150; // 150 * skill_lv
+ if( sd && sd->inventory_data[sd->equip_index[EQI_HAND_R]] ) { // Chars.
+ val1 += (sd->inventory_data[sd->equip_index[EQI_HAND_R]]->weight/10 * sd->inventory_data[sd->equip_index[EQI_HAND_R]]->wlv * status->get_lv(bl) / 100);
+ val1 += 15 * (sd ? sd->status.job_level:50) + 100;
+ } else // Mobs
+ val1 += (400 * status->get_lv(bl) / 100) + (15 * (status->get_lv(bl) / 2)); // About 1138% at mob_lvl 99. Is an aproximation to a standard weapon. [pakpil]
+ break;
+ case SC_PRESTIGE: // Based on suggested formula in iRO Wiki and some test, still need more test. [pakpil]
+ val2 = ((st->int_ + st->luk) / 6) + 5; // Chance to evade magic damage.
+ val1 *= 15; // Defence added
+ if( sd )
+ val1 += 10 * pc->checkskill(sd,CR_DEFENDER);
+ break;
+ case SC_BANDING:
+ tick_time = 5000; // [GodLesZ] tick time
+ break;
+ case SC_MAGNETICFIELD:
+ val3 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ break;
+ case SC_INSPIRATION:
+ if( sd ) {
+ val2 = (40 * val1) + (3 * sd->status.job_level); // ATK bonus
+ val3 = (sd->status.job_level / 10) * 2 + 12; // All stat bonus
+ }
+ val4 = tick / 1000;
+ tick_time = 1000; // [GodLesZ] tick time
+ status->change_clear_buffs(bl,3); //Remove buffs/debuffs
+ break;
+ case SC_CRESCENTELBOW:
+ val2 = 94 + val1;
+ break;
+ case SC_LIGHTNINGWALK: // [(Job Level / 2) + (40 + 5 * Skill Level)] %
+ val1 = (sd?sd->status.job_level:2)/2 + 40 + 5 * val1;
+ break;
+ case SC_RAISINGDRAGON:
+ val3 = tick / 5000;
+ tick_time = 5000; // [GodLesZ] tick time
+ break;
+ case SC_GENTLETOUCH_CHANGE:
+ {// take note there is no def increase as skill desc says. [malufett]
+ struct block_list * src;
+ val3 = st->agi * val1 / 60; // ASPD increase: [(Target AGI x Skill Level) / 60] %
+ if( (src = map->id2bl(val2)) ){
+ val4 = ( 200/status_get_int(src) ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level]
+ val2 = ( status_get_dex(src)/4 + status_get_str(src)/2 ) * val1 / 5; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5]
}
}
- break;
- case SC_NJ_UTSUSEMI:
- val2=(val1+1)/2; // number of hits blocked
- val3=skill->get_blewcount(NJ_UTSUSEMI, val1); //knockback value.
- break;
- case SC_NJ_BUNSINJYUTSU:
- val2=(val1+1)/2; // number of hits blocked
- break;
- case SC_HLIF_CHANGE:
- val2= 30*val1; //Vit increase
- val3= 20*val1; //Int increase
- break;
- case SC_SWOO:
- if(st->mode&MD_BOSS)
- tick /= 5; //TODO: Reduce skill's duration. But for how long?
- break;
- case SC_SPIDERWEB:
- if( bl->type == BL_PC )
- tick /= 2;
- break;
- case SC_ARMOR:
- //NPC_DEFENDER:
- val2 = 80; //Damage reduction
- //Attack requirements to be blocked:
- val3 = BF_LONG; //Range
- val4 = BF_WEAPON|BF_MISC; //Type
- break;
- case SC_ENCHANTARMS:
- //end previous enchants
- skill->enchant_elemental_end(bl,type);
- //Make sure the received element is valid.
- if (val2 >= ELE_MAX)
- val2 = val2%ELE_MAX;
- else if (val2 < 0)
- val2 = rnd()%ELE_MAX;
- break;
- case SC_CRITICALWOUND:
- val2 = 20*val1; //Heal effectiveness decrease
- break;
- case SC_MAGICMIRROR:
- case SC_SLOWCAST:
- val2 = 20*val1; //Magic reflection/cast rate
- break;
-
- case SC_STONESKIN:
- if (val2 == NPC_ANTIMAGIC)
- { //Boost mdef
- val2 =-20;
- val3 = 20;
- } else { //Boost def
- val2 = 20;
- val3 =-20;
+ break;
+ case SC_GENTLETOUCH_REVITALIZE:
+ {// take note there is no vit,aspd,speed increase as skill desc says. [malufett]
+ struct block_list * src;
+ val3 = val1 * 30 + 150; // Natural HP recovery increase: [(Skill Level x 30) + 50] %
+ if( (src = map->id2bl(val2)) ) // the stat def is not shown in the status window and it is process differently
+ val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Caster VIT / 4) x Skill Level]
}
- val2*=val1; //20% per level
- val3*=val1;
- break;
- case SC_CASH_PLUSEXP:
- case SC_CASH_PLUSONLYJOBEXP:
- if (val1 < 0)
- val1 = 0;
- break;
- case SC_PLUSAVOIDVALUE:
- case SC_CRITICALPERCENT:
- val2 = val1*10; //Actual boost (since 100% = 1000)
- break;
- case SC_SUFFRAGIUM:
- val2 = 15 * val1; //Speed cast decrease
- break;
- case SC_HEALPLUS:
- if (val1 < 1)
- val1 = 1;
- break;
- case SC_ILLUSION:
- val2 = 5+val1; //Factor by which displayed damage is increased by
- break;
- case SC_DOUBLECASTING:
- val2 = 30+10*val1; //Trigger rate
- break;
- case SC_KAIZEL:
- val2 = 10*val1; //% of life to be revived with
- break;
- // case SC_ARMORPROPERTY:
- // case SC_ARMOR_RESIST:
- // Mod your resistance against elements:
- // val1 = water | val2 = earth | val3 = fire | val4 = wind
- // break;
- //case ????:
- //Place here SCs that have no SCB_* data, no skill associated, no ICON
- //associated, and yet are not wrong/unknown. [Skotlex]
- //break;
+ break;
+ case SC_HEATER_OPTION:
+ val2 = 120; // Watk. TODO: Renewal (Atk2)
+ val3 = 33; // % Increase effects.
+ val4 = 3; // Change into fire element.
+ break;
+ case SC_TROPIC_OPTION:
+ val2 = 180; // Watk. TODO: Renewal (Atk2)
+ val3 = MG_FIREBOLT;
+ break;
+ case SC_AQUAPLAY_OPTION:
+ val2 = 40;
+ break;
+ case SC_COOLER_OPTION:
+ val2 = 80; // % Freezing chance
+ val3 = 33; // % increased damage
+ val4 = 1; // Change into water elemet
+ break;
+ case SC_CHILLY_AIR_OPTION:
+ val2 = 120; // Matk. TODO: Renewal (Matk1)
+ val3 = MG_COLDBOLT;
+ break;
+ case SC_WIND_STEP_OPTION:
+ val2 = 50; // % Increase speed and flee.
+ break;
+ case SC_BLAST_OPTION:
+ val2 = 20;
+ val3 = ELE_WIND;
+ break;
+ case SC_WILD_STORM_OPTION:
+ val2 = MG_LIGHTNINGBOLT;
+ break;
+ case SC_PETROLOGY_OPTION:
+ val2 = 5;
+ val3 = 50;
+ break;
+ case SC_CURSED_SOIL_OPTION:
+ val2 = 10;
+ val3 = 33;
+ val4 = 2;
+ break;
+ case SC_UPHEAVAL_OPTION:
+ val2 = WZ_EARTHSPIKE;
+ break;
+ case SC_CIRCLE_OF_FIRE_OPTION:
+ val2 = 300;
+ break;
+ case SC_FIRE_CLOAK_OPTION:
+ case SC_WATER_DROP_OPTION:
+ case SC_WIND_CURTAIN_OPTION:
+ case SC_STONE_SHIELD_OPTION:
+ val2 = 20; // Elemental modifier. Not confirmed.
+ break;
+ case SC_CIRCLE_OF_FIRE:
+ case SC_FIRE_CLOAK:
+ case SC_WATER_DROP:
+ case SC_WATER_SCREEN:
+ case SC_WIND_CURTAIN:
+ case SC_WIND_STEP:
+ case SC_STONE_SHIELD:
+ case SC_SOLID_SKIN:
+ val2 = 10;
+ tick_time = 2000; // [GodLesZ] tick time
+ break;
+ case SC_WATER_BARRIER:
+ val2 = 40; // Increasement. Mdef1 ???
+ val3 = 20; // Reductions. Atk2, Flee1, Matk1 ????
+ break;
+ case SC_ZEPHYR:
+ val2 = 22; // Flee.
+ break;
+ case SC_TIDAL_WEAPON:
+ val2 = 20; // Increase Elemental's attack.
+ break;
+ case SC_ROCK_CRUSHER:
+ case SC_ROCK_CRUSHER_ATK:
+ case SC_POWER_OF_GAIA:
+ val2 = 33;
+ break;
+ case SC_MELON_BOMB:
+ case SC_BANANA_BOMB:
+ val1 = 15;
+ break;
+ case SC_STOMACHACHE:
+ val2 = 8; // SP consume.
+ val4 = tick / 10000;
+ tick_time = 10000; // [GodLesZ] tick time
+ break;
+ case SC_KYOUGAKU:
+ val2 = 2*val1 + rand()%(3 * val1);
+ clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
+ break;
+ case SC_KAGEMUSYA:
+ val3 = val1 * 2;
+ case SC_IZAYOI:
+ val2 = tick/1000;
+ tick_time = 1000;
+ break;
+ case SC_ZANGETSU:
+ val2 = val4 = status->get_lv(bl) / 3 + 20 * val1;
+ val3 = status->get_lv(bl) / 2 + 30 * val1;
+ val2 = (!(status_get_hp(bl)%2) ? val2 : -val3);
+ val3 = (!(status_get_sp(bl)%2) ? val4 : -val3);
+ break;
+ case SC_GENSOU:
- case SC_MER_FLEE:
- case SC_MER_ATK:
- case SC_MER_HIT:
- val2 = 15 * val1;
- break;
- case SC_MER_HP:
- case SC_MER_SP:
- val2 = 5 * val1;
- break;
- case SC_REBIRTH:
- val2 = 20*val1; //% of life to be revived with
- break;
+ #define PER( a ) do { \
+ if( a <= 15 ) lv = 1; \
+ else if( a <= 30 ) lv = 2; \
+ else if( a <= 50 ) lv = 3; \
+ else if( a <= 75 ) lv = 4; \
+ } while(0)
- case SC_MANU_DEF:
- case SC_MANU_ATK:
- case SC_MANU_MATK:
- val2 = 1; // Manuk group
- break;
- case SC_SPL_DEF:
- case SC_SPL_ATK:
- case SC_SPL_MATK:
- val2 = 2; // Splendide group
- break;
- /**
- * General
- **/
- case SC_FEAR:
- val2 = 2;
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_BURNING:
- val4 = tick / 3000; // Total Ticks to Burn!!
- tick_time = 3000; // [GodLesZ] tick time
- break;
- /**
- * Rune Knight
- **/
- case SC_DEATHBOUND:
- val2 = 500 + 100 * val1;
- break;
- case SC_STONEHARDSKIN:
- if( sd )
- val1 = sd->status.job_level * pc->checkskill(sd, RK_RUNEMASTERY) / 4; //DEF/MDEF Increase
- break;
+ {
+ int hp = status_get_hp(bl), sp = status_get_sp(bl), lv = 5;
+
+ if( rand()%100 > (25 + 10 * val1) - status_get_int(bl) / 2)
+ return 0;
+
+ PER( 100 / (status_get_max_hp(bl) / hp) );
+ status->heal(bl, (!(hp%2) ? (6-lv) *4 / 100 : -(lv*4) / 100), 0, 1);
+
+ PER( 100 / (status_get_max_sp(bl) / sp) );
+ status->heal(bl, 0,(!(sp%2) ? (6-lv) *3 / 100 : -(lv*3) / 100), 1);
+ }
+ #undef PER
+ break;
+ case SC_ANGRIFFS_MODUS:
+ val2 = 50 + 20 * val1; //atk bonus
+ val3 = 40 + 20 * val1; // Flee reduction.
+ val4 = tick/1000; // hp/sp reduction timer
+ tick_time = 1000;
+ break;
+ case SC_NEUTRALBARRIER:
+ tick_time = tick;
+ tick = -1;
+ break;
+ case SC_GOLDENE_FERSE:
+ val2 = 10 + 10*val1; //max hp bonus
+ val3 = 6 + 4 * val1; // Aspd Bonus
+ val4 = 2 + 2 * val1; // Chance of holy attack
+ break;
+ case SC_OVERED_BOOST:
+ val2 = 300 + 40*val1; //flee bonus
+ val3 = 179 + 2*val1; //aspd bonus
+ break;
+ case SC_GRANITIC_ARMOR:
+ val2 = 2*val1; //dmg reduction
+ val3 = 6*val1; //dmg on status end
+ break;
+ case SC_MAGMA_FLOW:
+ val2 = 3*val1; //activation chance
+ break;
+ case SC_PYROCLASTIC:
+ val2 += 10*val1; //atk bonus
+ break;
+ case SC_NEEDLE_OF_PARALYZE: //[Lighta] need real info
+ val2 = 2*val1; //def reduction
+ val3 = 500*val1; //varcast augmentation
+ break;
+ case SC_PAIN_KILLER: //[Lighta] need real info
+ val2 = 2*val1; //aspd reduction %
+ val3 = 2*val1; //dmg reduction %
+ if(sc->data[SC_NEEDLE_OF_PARALYZE])
+ sc_start(bl, SC_ENDURE, 100, val1, tick); //start endure for same duration
+ break;
+ case SC_STYLE_CHANGE: //[Lighta] need real info
+ tick = -1;
+ if(val2 == MH_MD_FIGHTING) val2 = MH_MD_GRAPPLING;
+ else val2 = MH_MD_FIGHTING;
+ break;
+ case SC_FULL_THROTTLE:
+ status_percent_heal(bl,100,0);
+ val2 = 7 - val1;
+ tick_time = 1000;
+ val4 = tick / tick_time;
+ break;
+ case SC_KINGS_GRACE:
+ val2 = 3 + val1;
+ tick_time = 1000;
+ val4 = tick / tick_time;
+ break;
+ case SC_TELEKINESIS_INTENSE:
+ val2 = 10 * val1;
+ val3 = 40 * val1;
+ break;
+ case SC_OFFERTORIUM:
+ val2 = 30 * val1;
+ break;
+ case SC_FRIGG_SONG:
+ val2 = 5 * val1;
+ val3 = 1000 + 100 * val1;
+ tick_time = 10000;
+ val4 = tick / tick_time;
+ break;
+ case SC_MONSTER_TRANSFORM:
+ if( !mob->db_checkid(val1) )
+ val1 = 1002; // default poring
+ break;
+ default:
+ if( calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0 )
+ { //Status change with no calc, no icon, and no skill associated...?
+ ShowError("UnknownStatusChange [%d]\n", type);
+ return 0;
+ }
+ }
+ } else { //Special considerations when loading SC data.
+ switch( type ) {
+ case SC_WEDDING:
+ case SC_XMAS:
+ case SC_SUMMER:
+ case SC_HANBOK:
+ if( !vd ) break;
+ clif->changelook(bl,LOOK_BASE,vd->class_);
+ clif->changelook(bl,LOOK_WEAPON,0);
+ clif->changelook(bl,LOOK_SHIELD,0);
+ clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color);
+ break;
+ case SC_KAAHI:
+ val4 = INVALID_TIMER;
+ break;
+ case SC_KYOUGAKU:
+ clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
+ break;
+ }
+ }
+
+ /* values that must be set regardless of flag&4 e.g. val_flag */
+ switch(type) {
case SC_FIGHTINGSPIRIT:
val_flag |= 1|2;
break;
- case SC_ABUNDANCE:
- val4 = tick / 10000;
- tick_time = 10000; // [GodLesZ] tick time
- break;
- /**
- * Arch Bishop
- **/
- case SC_RENOVATIO:
- val4 = tick / 5000;
- tick_time = 5000;
- break;
- case SC_SECRAMENT:
- val2 = 10 * val1;
- break;
case SC_VENOMIMPRESS:
- val2 = 10 * val1;
val_flag |= 1|2;
break;
case SC_POISONINGWEAPON:
val_flag |= 1|2|4;
break;
case SC_WEAPONBLOCKING:
- val2 = 10 + 2 * val1; // Chance
- val4 = tick / 3000;
- tick_time = 3000; // [GodLesZ] tick time
val_flag |= 1|2;
break;
- case SC_TOXIN:
- val4 = tick / 10000;
- tick_time = 10000; // [GodLesZ] tick time
- break;
- case SC_MAGICMUSHROOM:
- val4 = tick / 4000;
- tick_time = 4000; // [GodLesZ] tick time
- break;
- case SC_PYREXIA:
- status->change_start(bl,SC_BLIND,10000,val1,0,0,0,30000,11); // Blind status that last for 30 seconds
- val4 = tick / 3000;
- tick_time = 3000; // [GodLesZ] tick time
- break;
- case SC_LEECHESEND:
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_OBLIVIONCURSE:
- val4 = tick / 3000;
- tick_time = 3000; // [GodLesZ] tick time
- break;
case SC_ROLLINGCUTTER:
val_flag |= 1;
break;
case SC_CLOAKINGEXCEED:
- val2 = ( val1 + 1 ) / 2; // Hits
- val3 = 90 + val1 * 10; // Walk speed
val_flag |= 1|2|4;
- if (bl->type == BL_PC)
- val4 |= battle_config.pc_cloak_check_type&7;
- else
- val4 |= battle_config.monster_cloak_check_type&7;
- tick_time = 1000; // [GodLesZ] tick time
break;
case SC_HALLUCINATIONWALK:
- val2 = 50 * val1; // Evasion rate of physical attacks. Flee
- val3 = 10 * val1; // Evasion rate of magical attacks.
val_flag |= 1|2|4;
break;
- case SC_WHITEIMPRISON:
- status_change_end(bl, SC_BURNING, INVALID_TIMER);
- status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
- status_change_end(bl, SC_FREEZE, INVALID_TIMER);
- status_change_end(bl, SC_STONE, INVALID_TIMER);
- break;
- case SC_MARSHOFABYSS:
- val2 = 6 * val1;
- if( sd ) // half on players
- val2 >>= 1;
- break;
- case SC_FROSTMISTY:
- status_change_end(bl, SC_BURNING, INVALID_TIMER);
- break;
- case SC_READING_SB:
- // val2 = sp reduction per second
- tick_time = 5000; // [GodLesZ] tick time
- break;
case SC_SUMMON1:
case SC_SUMMON2:
case SC_SUMMON3:
case SC_SUMMON4:
case SC_SUMMON5:
- val4 = tick / 1000;
- if( val4 < 1 )
- val4 = 1;
- tick_time = 1000; // [GodLesZ] tick time
val_flag |= 1;
break;
- case SC_SHAPESHIFT:
- switch( val1 )
- {
- case 1: val2 = ELE_FIRE; break;
- case 2: val2 = ELE_EARTH; break;
- case 3: val2 = ELE_WIND; break;
- case 4: val2 = ELE_WATER; break;
- }
- break;
- case SC_ELECTRICSHOCKER:
- case SC_COLD:
- case SC_MEIKYOUSISUI:
- val4 = tick / 1000;
- if( val4 < 1 )
- val4 = 1;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_CAMOUFLAGE:
- val4 = tick/1000;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_WUGDASH:
- val4 = timer->gettick(); //Store time at which you started running.
- tick = -1;
- break;
- case SC__SHADOWFORM: {
- struct map_session_data * s_sd = map->id2sd(val2);
- if( s_sd )
- s_sd->shadowform_id = bl->id;
- val4 = tick / 1000;
+ case SC__SHADOWFORM:
val_flag |= 1|2|4;
- tick_time = 1000; // [GodLesZ] tick time
- }
- break;
- case SC__STRIPACCESSARY:
- if (!sd)
- val2 = 20;
break;
case SC__INVISIBILITY:
- val2 = 50 - 10 * val1; // ASPD
- val3 = 20 * val1; // CRITICAL
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
val_flag |= 1|2;
break;
case SC__ENERVATION:
- val2 = 20 + 10 * val1; // ATK Reduction
val_flag |= 1|2;
- if( sd ) pc->delspiritball(sd,sd->spiritball,0);
break;
case SC__GROOMY:
- val2 = 20 + 10 * val1; //ASPD. Need to confirm if Movement Speed reduction is the same. [Jobbie]
- val3 = 20 * val1; //HIT
val_flag |= 1|2|4;
- if( sd ) { // Removes Animals
- if( pc_isriding(sd) ) pc->setriding(sd, 0);
- if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
- if( pc_iswug(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_WUG);
- if( pc_isridingwug(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_WUGRIDER);
- if( pc_isfalcon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_FALCON);
- if( sd->status.pet_id > 0 ) pet->menu(sd, 3);
- if( homun_alive(sd->hd) ) homun->vaporize(sd,HOM_ST_REST);
- if( sd->md ) mercenary->delete(sd->md,3);
- }
break;
case SC__LAZINESS:
- val2 = 10 + 10 * val1; // Cast reduction
- val3 = 10 * val1; // Flee Reduction
val_flag |= 1|2|4;
break;
case SC__UNLUCKY:
- val2 = 10 * val1; // Crit and Flee2 Reduction
val_flag |= 1|2|4;
break;
case SC__WEAKNESS:
- val2 = 10 * val1;
val_flag |= 1|2;
- // bypasses coating protection and MADO
- sc_start(bl,SC_NOEQUIPWEAPON,100,val1,tick);
- sc_start(bl,SC_NOEQUIPSHIELD,100,val1,tick);
- break;
- case SC_GN_CARTBOOST:
- if( val1 < 3 )
- val2 = 50;
- else if( val1 < 5 )
- val2 = 75;
- else
- val2 = 100;
break;
case SC_PROPERTYWALK:
val_flag |= 1|2;
- val3 = 0;
- break;
- case SC_WARMER:
- status_change_end(bl, SC_FREEZE, INVALID_TIMER);
- status_change_end(bl, SC_FROSTMISTY, INVALID_TIMER);
- status_change_end(bl, SC_COLD, INVALID_TIMER);
- break;
- case SC_STRIKING:
- val1 = 6 - val1;//spcost = 6 - level (lvl1:5 ... lvl 5: 1)
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_BLOOD_SUCKER:
- {
- struct block_list *src = map->id2bl(val2);
- val3 = 1;
- if(src)
- val3 = 200 + 100 * val1 + status_get_int(src);
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- }
- break;
- case SC_VACUUM_EXTREME:
- tick -= (st->str / 20) * 1000;
- val4 = val3 = tick / 100;
- tick_time = 100; // [GodLesZ] tick time
- break;
- case SC_SWING:
- val2 = 4 * val1; // Walk speed and aspd reduction.
- break;
- case SC_SYMPHONY_LOVE:
- case SC_RUSH_WINDMILL:
- case SC_ECHOSONG:
- val2 = 6 * val1;
- val2 += val3; //Adding 1% * Lesson Bonus
- val2 += (int)(val4*2/10); //Adding 0.2% per JobLevel
- break;
- case SC_MOONLIT_SERENADE:
- val2 = 10 * val1;
- break;
- case SC_HARMONIZE:
- val2 = 5 + 5 * val1;
- break;
- case SC_SIREN:
- val4 = tick / 2000;
- tick_time = 2000; // [GodLesZ] tick time
- break;
- case SC_DEEP_SLEEP:
- val4 = tick / 2000;
- tick_time = 2000; // [GodLesZ] tick time
- break;
- case SC_SIRCLEOFNATURE:
- val2 = 1 + val1; //SP consume
- val3 = 40 * val1; //HP recovery
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_SONG_OF_MANA:
- val3 = 10 + (2 * val2);
- val4 = tick/3000;
- tick_time = 3000; // [GodLesZ] tick time
- break;
- case SC_SATURDAY_NIGHT_FEVER:
- if (!val4) val4 = skill->get_time2(status->sc2skill(type),val1);
- if (!val4) val4 = 3000;
- val3 = tick/val4;
- tick_time = val4; // [GodLesZ] tick time
- break;
- case SC_GLOOMYDAY:
- val2 = 20 + 5 * val1; // Flee reduction.
- val3 = 15 + 5 * val1; // ASPD reduction.
- if( sd && rand()%100 < val1 ){ // (Skill Lv) %
- val4 = 1; // reduce walk speed by half.
- if( pc_isriding(sd) ) pc->setriding(sd, 0);
- if( pc_isridingdragon(sd) ) pc->setoption(sd, sd->sc.option&~OPTION_DRAGON);
- }
- break;
- case SC_GLOOMYDAY_SK:
- // Random number between [15 ~ (Voice Lesson Skill Level x 5) + (Skill Level x 10)] %.
- val2 = 15 + rand()%( (sd?pc->checkskill(sd, WM_LESSON)*5:0) + val1*10 );
- break;
- case SC_SITDOWN_FORCE:
- case SC_BANANA_BOMB_SITDOWN_POSTDELAY:
- if( sd && !pc_issit(sd) )
- {
- pc_setsit(sd);
- skill->sit(sd,1);
- clif->sitting(bl);
- }
- break;
- case SC_DANCE_WITH_WUG:
- val3 = (5 * val1) + (1 * val2); //Still need official value.
- break;
- case SC_LERADS_DEW:
- val3 = (5 * val1) + (1 * val2);
break;
- case SC_MELODYOFSINK:
- val3 = (5 * val1) + (1 * val2);
- break;
- case SC_BEYOND_OF_WARCRY:
- val3 = (5 * val1) + (1 * val2);
- break;
- case SC_UNLIMITED_HUMMING_VOICE:
- {
- struct unit_data *ud = unit->bl2ud(bl);
- if( ud == NULL ) return 0;
- ud->state.skillcastcancel = 0;
- val3 = 15 - (2 * val2);
- }
- break;
- case SC_LG_REFLECTDAMAGE:
- val2 = 15 + 5 * val1;
- val3 = (val1==5)?20:(val1+4)*2; // SP consumption
- val4 = tick/10000;
- tick_time = 10000; // [GodLesZ] tick time
- break;
- case SC_FORCEOFVANGUARD: // This is not the official way to handle it but I think we should use it. [pakpil]
- val2 = 20 + 12 * (val1 - 1); // Chance
- val3 = 5 + (2 * val1); // Max rage counters
- tick = -1; //endless duration in the client
- tick_time = 6000; // [GodLesZ] tick time
+ case SC_FORCEOFVANGUARD:
val_flag |= 1|2|4;
break;
- case SC_EXEEDBREAK:
- val1 *= 150; // 150 * skill_lv
- if( sd && sd->inventory_data[sd->equip_index[EQI_HAND_R]] ) { // Chars.
- val1 += (sd->inventory_data[sd->equip_index[EQI_HAND_R]]->weight/10 * sd->inventory_data[sd->equip_index[EQI_HAND_R]]->wlv * status->get_lv(bl) / 100);
- val1 += 15 * (sd ? sd->status.job_level:50) + 100;
- } else // Mobs
- val1 += (400 * status->get_lv(bl) / 100) + (15 * (status->get_lv(bl) / 2)); // About 1138% at mob_lvl 99. Is an aproximation to a standard weapon. [pakpil]
- break;
- case SC_PRESTIGE: // Based on suggested formula in iRO Wiki and some test, still need more test. [pakpil]
- val2 = ((st->int_ + st->luk) / 6) + 5; // Chance to evade magic damage.
- val1 *= 15; // Defence added
- if( sd )
- val1 += 10 * pc->checkskill(sd,CR_DEFENDER);
+ case SC_PRESTIGE:
val_flag |= 1|2;
break;
case SC_BANDING:
- tick_time = 5000; // [GodLesZ] tick time
val_flag |= 1;
break;
case SC_SHIELDSPELL_DEF:
@@ -8419,554 +8724,312 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SHIELDSPELL_REF:
val_flag |= 1|2;
break;
- case SC_MAGNETICFIELD:
- val3 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- break;
- case SC_INSPIRATION:
- if( sd ) {
- val2 = (40 * val1) + (3 * sd->status.job_level); // ATK bonus
- val3 = (sd->status.job_level / 10) * 2 + 12; // All stat bonus
- }
- val4 = tick / 1000;
- tick_time = 1000; // [GodLesZ] tick time
- status->change_clear_buffs(bl,3); //Remove buffs/debuffs
- break;
case SC_SPELLFIST:
case SC_CURSEDCIRCLE_ATKER:
val_flag |= 1|2|4;
break;
case SC_CRESCENTELBOW:
- val2 = 94 + val1;
val_flag |= 1|2;
break;
- case SC_LIGHTNINGWALK: // [(Job Level / 2) + (40 + 5 * Skill Level)] %
- val1 = (sd?sd->status.job_level:2)/2 + 40 + 5 * val1;
+ case SC_LIGHTNINGWALK:
val_flag |= 1;
break;
- case SC_RAISINGDRAGON:
- val3 = tick / 5000;
- tick_time = 5000; // [GodLesZ] tick time
- break;
- case SC_GENTLETOUCH_CHANGE:
- {// take note there is no def increase as skill desc says. [malufett]
- struct block_list * src;
- val3 = st->agi * val1 / 60; // ASPD increase: [(Target AGI x Skill Level) / 60] %
- if( (src = map->id2bl(val2)) ){
- val4 = ( 200/status_get_int(src) ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level]
- val2 = ( status_get_dex(src)/4 + status_get_str(src)/2 ) * val1 / 5; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5]
- }
- }
- break;
- case SC_GENTLETOUCH_REVITALIZE:
- {// take note there is no vit,aspd,speed increase as skill desc says. [malufett]
- struct block_list * src;
- val3 = val1 * 30 + 150; // Natural HP recovery increase: [(Skill Level x 30) + 50] %
- if( (src = map->id2bl(val2)) ) // the stat def is not shown in the status window and it is process differently
- val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Caster VIT / 4) x Skill Level]
- }
- break;
case SC_PYROTECHNIC_OPTION:
val_flag |= 1|2|4;
break;
case SC_HEATER_OPTION:
- val2 = 120; // Watk. TODO: Renewal (Atk2)
- val3 = 33; // % Increase effects.
- val4 = 3; // Change into fire element.
val_flag |= 1|2|4;
break;
- case SC_TROPIC_OPTION:
- val2 = 180; // Watk. TODO: Renewal (Atk2)
- val3 = MG_FIREBOLT;
- break;
case SC_AQUAPLAY_OPTION:
- val2 = 40;
val_flag |= 1|2|4;
break;
case SC_COOLER_OPTION:
- val2 = 80; // % Freezing chance
- val3 = 33; // % increased damage
- val4 = 1; // Change into water elemet
val_flag |= 1|2|4;
break;
case SC_CHILLY_AIR_OPTION:
- val2 = 120; // Matk. TODO: Renewal (Matk1)
- val3 = MG_COLDBOLT;
val_flag |= 1|2;
break;
case SC_GUST_OPTION:
val_flag |= 1|2;
break;
- case SC_WIND_STEP_OPTION:
- val2 = 50; // % Increase speed and flee.
- break;
case SC_BLAST_OPTION:
- val2 = 20;
- val3 = ELE_WIND;
val_flag |= 1|2|4;
break;
case SC_WILD_STORM_OPTION:
- val2 = MG_LIGHTNINGBOLT;
val_flag |= 1|2;
break;
case SC_PETROLOGY_OPTION:
- val2 = 5;
- val3 = 50;
val_flag |= 1|2|4;
break;
case SC_CURSED_SOIL_OPTION:
- val2 = 10;
- val3 = 33;
- val4 = 2;
val_flag |= 1|2|4;
break;
case SC_UPHEAVAL_OPTION:
- val2 = WZ_EARTHSPIKE;
val_flag |= 1|2;
break;
case SC_CIRCLE_OF_FIRE_OPTION:
- val2 = 300;
val_flag |= 1|2;
break;
- case SC_FIRE_CLOAK_OPTION:
- case SC_WATER_DROP_OPTION:
- case SC_WIND_CURTAIN_OPTION:
- case SC_STONE_SHIELD_OPTION:
- val2 = 20; // Elemental modifier. Not confirmed.
- break;
- case SC_CIRCLE_OF_FIRE:
- case SC_FIRE_CLOAK:
- case SC_WATER_DROP:
- case SC_WATER_SCREEN:
- case SC_WIND_CURTAIN:
- case SC_WIND_STEP:
- case SC_STONE_SHIELD:
- case SC_SOLID_SKIN:
- val2 = 10;
- tick_time = 2000; // [GodLesZ] tick time
- break;
case SC_WATER_BARRIER:
- val2 = 40; // Increasement. Mdef1 ???
- val3 = 20; // Reductions. Atk2, Flee1, Matk1 ????
val_flag |= 1|2|4;
break;
- case SC_ZEPHYR:
- val2 = 22; // Flee.
- break;
- case SC_TIDAL_WEAPON:
- val2 = 20; // Increase Elemental's attack.
- break;
- case SC_ROCK_CRUSHER:
- case SC_ROCK_CRUSHER_ATK:
- case SC_POWER_OF_GAIA:
- val2 = 33;
- break;
- case SC_MELON_BOMB:
- case SC_BANANA_BOMB:
- val1 = 15;
- break;
- case SC_STOMACHACHE:
- val2 = 8; // SP consume.
- val4 = tick / 10000;
- tick_time = 10000; // [GodLesZ] tick time
- break;
- case SC_KYOUGAKU:
- val2 = 2*val1 + rand()%(3 * val1);
- clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
- break;
- case SC_KAGEMUSYA:
- val3 = val1 * 2;
- case SC_IZAYOI:
- val2 = tick/1000;
- tick_time = 1000;
- break;
- case SC_ZANGETSU:
- val2 = val4 = status->get_lv(bl) / 3 + 20 * val1;
- val3 = status->get_lv(bl) / 2 + 30 * val1;
- val2 = (!(status_get_hp(bl)%2) ? val2 : -val3);
- val3 = (!(status_get_sp(bl)%2) ? val4 : -val3);
- break;
- case SC_GENSOU:
-
-#define PER( a ) do { \
- if( a <= 15 ) lv = 1; \
- else if( a <= 30 ) lv = 2; \
- else if( a <= 50 ) lv = 3; \
- else if( a <= 75 ) lv = 4; \
-} while(0)
-
- {
- int hp = status_get_hp(bl), sp = status_get_sp(bl), lv = 5;
-
- if( rand()%100 > (25 + 10 * val1) - status_get_int(bl) / 2)
- return 0;
-
- PER( 100 / (status_get_max_hp(bl) / hp) );
- status->heal(bl, (!(hp%2) ? (6-lv) *4 / 100 : -(lv*4) / 100), 0, 1);
-
- PER( 100 / (status_get_max_sp(bl) / sp) );
- status->heal(bl, 0,(!(sp%2) ? (6-lv) *3 / 100 : -(lv*3) / 100), 1);
- }
-#undef PER
- break;
- case SC_ANGRIFFS_MODUS:
- val2 = 50 + 20 * val1; //atk bonus
- val3 = 40 + 20 * val1; // Flee reduction.
- val4 = tick/1000; // hp/sp reduction timer
- tick_time = 1000;
- break;
- case SC_NEUTRALBARRIER:
- tick_time = tick;
- tick = -1;
- break;
- case SC_GOLDENE_FERSE:
- val2 = 10 + 10*val1; //max hp bonus
- val3 = 6 + 4 * val1; // Aspd Bonus
- val4 = 2 + 2 * val1; // Chance of holy attack
- break;
- case SC_OVERED_BOOST:
- val2 = 300 + 40*val1; //flee bonus
- val3 = 179 + 2*val1; //aspd bonus
- break;
- case SC_GRANITIC_ARMOR:
- val2 = 2*val1; //dmg reduction
- val3 = 6*val1; //dmg on status end
- break;
- case SC_MAGMA_FLOW:
- val2 = 3*val1; //activation chance
- break;
- case SC_PYROCLASTIC:
- val2 += 10*val1; //atk bonus
- break;
- case SC_NEEDLE_OF_PARALYZE: //[Lighta] need real info
- val2 = 2*val1; //def reduction
- val3 = 500*val1; //varcast augmentation
- break;
- case SC_PAIN_KILLER: //[Lighta] need real info
- val2 = 2*val1; //aspd reduction %
- val3 = 2*val1; //dmg reduction %
- if(sc->data[SC_NEEDLE_OF_PARALYZE])
- sc_start(bl, SC_ENDURE, 100, val1, tick); //start endure for same duration
- break;
- case SC_STYLE_CHANGE: //[Lighta] need real info
- tick = -1;
- if(val2 == MH_MD_FIGHTING) val2 = MH_MD_GRAPPLING;
- else val2 = MH_MD_FIGHTING;
- break;
- case SC_FULL_THROTTLE:
- status_percent_heal(bl,100,0);
- val2 = 7 - val1;
- tick_time = 1000;
- val4 = tick / tick_time;
- break;
- case SC_KINGS_GRACE:
- val2 = 3 + val1;
- tick_time = 1000;
- val4 = tick / tick_time;
- break;
- case SC_TELEKINESIS_INTENSE:
- val2 = 10 * val1;
- val3 = 40 * val1;
- break;
- case SC_OFFERTORIUM:
- val2 = 30 * val1;
- break;
- case SC_FRIGG_SONG:
- val2 = 5 * val1;
- val3 = 1000 + 100 * val1;
- tick_time = 10000;
- val4 = tick / tick_time;
- break;
- case SC_MONSTER_TRANSFORM:
- if( !mob->db_checkid(val1) )
- val1 = 1002; // default poring
- val_flag |= 1;
- break;
- default:
- if( calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0 )
- { //Status change with no calc, no icon, and no skill associated...?
- ShowError("UnknownStatusChange [%d]\n", type);
- return 0;
- }
- }
- } else { //Special considerations when loading SC data.
- switch( type ) {
- case SC_WEDDING:
- case SC_XMAS:
- case SC_SUMMER:
- case SC_HANBOK:
- if( !vd ) break;
- clif->changelook(bl,LOOK_BASE,vd->class_);
- clif->changelook(bl,LOOK_WEAPON,0);
- clif->changelook(bl,LOOK_SHIELD,0);
- clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color);
- break;
- case SC_KAAHI:
- val4 = INVALID_TIMER;
- break;
- case SC_SUMMON1:
- case SC_SUMMON2:
- case SC_SUMMON3:
- case SC_SUMMON4:
- case SC_SUMMON5:
+ case SC_CASH_PLUSEXP:
+ case SC_CASH_PLUSONLYJOBEXP:
case SC_MONSTER_TRANSFORM:
+ case SC_CASH_RECEIVEITEM:
val_flag |= 1;
break;
- case SC_KYOUGAKU:
- clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
- break;
- }
}
-
+
/* [Ind/Hercules] */
if( sd && status->DisplayType[type] ) {
int dval1 = 0, dval2 = 0, dval3 = 0;
switch( type ) {
- case SC_ALL_RIDING:
- dval1 = 1;
- break;
- default: /* all others: just copy val1 */
- dval1 = val1;
- break;
+ case SC_ALL_RIDING:
+ dval1 = 1;
+ break;
+ default: /* all others: just copy val1 */
+ dval1 = val1;
+ break;
}
status->display_add(sd,type,dval1,dval2,dval3);
}
//Those that make you stop attacking/walking....
switch (type) {
- case SC_FREEZE:
- case SC_STUN:
- case SC_SLEEP:
- case SC_STONE:
- case SC_DEEP_SLEEP:
- if (sd && pc_issit(sd)) //Avoid sprite sync problems.
- pc->setstand(sd);
- case SC_TRICKDEAD:
- status_change_end(bl, SC_DANCING, INVALID_TIMER);
- // Cancel cast when get status [LuzZza]
- if (battle_config.sc_castcancel&bl->type)
- unit->skillcastcancel(bl, 0);
- case SC_WHITEIMPRISON:
- unit->stop_attack(bl);
- case SC_STOP:
- case SC_CONFUSION:
- case SC_RG_CCONFINE_M:
- case SC_RG_CCONFINE_S:
- case SC_SPIDERWEB:
- case SC_ELECTRICSHOCKER:
- case SC_WUGBITE:
- case SC_THORNS_TRAP:
- case SC__MANHOLE:
- case SC_COLD:
- case SC_CURSEDCIRCLE_ATKER:
- case SC_CURSEDCIRCLE_TARGET:
- case SC_FEAR:
- case SC_NETHERWORLD:
- case SC_MEIKYOUSISUI:
- case SC_KYOUGAKU:
- case SC_NEEDLE_OF_PARALYZE:
- case SC_DEATHBOUND:
- unit->stop_walking(bl,1);
- break;
- case SC_ANKLESNARE:
- if( battle_config.skill_trap_type || !map_flag_gvg(bl->m) )
+ case SC_FREEZE:
+ case SC_STUN:
+ case SC_SLEEP:
+ case SC_STONE:
+ case SC_DEEP_SLEEP:
+ if (sd && pc_issit(sd)) //Avoid sprite sync problems.
+ pc->setstand(sd);
+ case SC_TRICKDEAD:
+ status_change_end(bl, SC_DANCING, INVALID_TIMER);
+ // Cancel cast when get status [LuzZza]
+ if (battle_config.sc_castcancel&bl->type)
+ unit->skillcastcancel(bl, 0);
+ case SC_WHITEIMPRISON:
+ unit->stop_attack(bl);
+ case SC_STOP:
+ case SC_CONFUSION:
+ case SC_RG_CCONFINE_M:
+ case SC_RG_CCONFINE_S:
+ case SC_SPIDERWEB:
+ case SC_ELECTRICSHOCKER:
+ case SC_WUGBITE:
+ case SC_THORNS_TRAP:
+ case SC__MANHOLE:
+ case SC_COLD:
+ case SC_CURSEDCIRCLE_ATKER:
+ case SC_CURSEDCIRCLE_TARGET:
+ case SC_FEAR:
+ case SC_NETHERWORLD:
+ case SC_MEIKYOUSISUI:
+ case SC_KYOUGAKU:
+ case SC_NEEDLE_OF_PARALYZE:
+ case SC_DEATHBOUND:
unit->stop_walking(bl,1);
- break;
- case SC_HIDING:
- case SC_CLOAKING:
- case SC_CLOAKINGEXCEED:
- case SC_CHASEWALK:
- case SC_WEIGHTOVER90:
- case SC_CAMOUFLAGE:
- case SC_SIREN:
- unit->stop_attack(bl);
- break;
- case SC_SILENCE:
- if (battle_config.sc_castcancel&bl->type)
- unit->skillcastcancel(bl, 0);
- break;
- /* */
- case SC_ITEMSCRIPT:
- if( sd ) {
- switch( val1 ) {
- //case 4121://Phree
- //case 4047://Ghostring
- case 4302://Gunka
- clif->status_change(bl,SI_MVPCARD_TAOGUNKA,1,tick,0,0,0);
- break;
- case 4132://Mistress
- clif->status_change(bl,SI_MVPCARD_MISTRESS,1,tick,0,0,0);
- break;
- case 4143://Orc Hero
- clif->status_change(bl,SI_MVPCARD_ORCHERO,1,tick,0,0,0);
- break;
- case 4135://Orc Lord
- clif->status_change(bl,SI_MVPCARD_ORCLORD,1,tick,0,0,0);
- break;
+ break;
+ case SC_ANKLESNARE:
+ if( battle_config.skill_trap_type || !map_flag_gvg(bl->m) )
+ unit->stop_walking(bl,1);
+ break;
+ case SC_HIDING:
+ case SC_CLOAKING:
+ case SC_CLOAKINGEXCEED:
+ case SC_CHASEWALK:
+ case SC_WEIGHTOVER90:
+ case SC_CAMOUFLAGE:
+ case SC_SIREN:
+ unit->stop_attack(bl);
+ break;
+ case SC_SILENCE:
+ if (battle_config.sc_castcancel&bl->type)
+ unit->skillcastcancel(bl, 0);
+ break;
+ /* */
+ case SC_ITEMSCRIPT:
+ if( sd ) {
+ switch( val1 ) {
+ //case 4121://Phree
+ //case 4047://Ghostring
+ case 4302://Gunka
+ clif->status_change(bl,SI_MVPCARD_TAOGUNKA,1,tick,0,0,0);
+ break;
+ case 4132://Mistress
+ clif->status_change(bl,SI_MVPCARD_MISTRESS,1,tick,0,0,0);
+ break;
+ case 4143://Orc Hero
+ clif->status_change(bl,SI_MVPCARD_ORCHERO,1,tick,0,0,0);
+ break;
+ case 4135://Orc Lord
+ clif->status_change(bl,SI_MVPCARD_ORCLORD,1,tick,0,0,0);
+ break;
+ }
}
- }
- break;
+ break;
}
// Set option as needed.
opt_flag = 1;
switch(type) {
//OPT1
- case SC_STONE: sc->opt1 = OPT1_STONEWAIT; break;
- case SC_FREEZE: sc->opt1 = OPT1_FREEZE; break;
- case SC_STUN: sc->opt1 = OPT1_STUN; break;
- case SC_DEEP_SLEEP: opt_flag = 0;
- case SC_SLEEP: sc->opt1 = OPT1_SLEEP; break;
- case SC_BURNING: sc->opt1 = OPT1_BURNING; break; // Burning need this to be showed correctly. [pakpil]
- case SC_WHITEIMPRISON: sc->opt1 = OPT1_IMPRISON; break;
- case SC_COLD: sc->opt1 = OPT1_CRYSTALIZE; break;
+ case SC_STONE: sc->opt1 = OPT1_STONEWAIT; break;
+ case SC_FREEZE: sc->opt1 = OPT1_FREEZE; break;
+ case SC_STUN: sc->opt1 = OPT1_STUN; break;
+ case SC_DEEP_SLEEP: opt_flag = 0;
+ case SC_SLEEP: sc->opt1 = OPT1_SLEEP; break;
+ case SC_BURNING: sc->opt1 = OPT1_BURNING; break; // Burning need this to be showed correctly. [pakpil]
+ case SC_WHITEIMPRISON: sc->opt1 = OPT1_IMPRISON; break;
+ case SC_COLD: sc->opt1 = OPT1_CRYSTALIZE; break;
//OPT2
- case SC_POISON: sc->opt2 |= OPT2_POISON; break;
- case SC_CURSE: sc->opt2 |= OPT2_CURSE; break;
- case SC_SILENCE: sc->opt2 |= OPT2_SILENCE; break;
+ case SC_POISON: sc->opt2 |= OPT2_POISON; break;
+ case SC_CURSE: sc->opt2 |= OPT2_CURSE; break;
+ case SC_SILENCE: sc->opt2 |= OPT2_SILENCE; break;
- case SC_CRUCIS:
- sc->opt2 |= OPT2_SIGNUMCRUCIS;
- break;
+ case SC_CRUCIS:
+ sc->opt2 |= OPT2_SIGNUMCRUCIS;
+ break;
- case SC_BLIND: sc->opt2 |= OPT2_BLIND; break;
- case SC_ANGELUS: sc->opt2 |= OPT2_ANGELUS; break;
- case SC_BLOODING: sc->opt2 |= OPT2_BLEEDING; break;
- case SC_DPOISON: sc->opt2 |= OPT2_DPOISON; break;
+ case SC_BLIND: sc->opt2 |= OPT2_BLIND; break;
+ case SC_ANGELUS: sc->opt2 |= OPT2_ANGELUS; break;
+ case SC_BLOODING: sc->opt2 |= OPT2_BLEEDING; break;
+ case SC_DPOISON: sc->opt2 |= OPT2_DPOISON; break;
//OPT3
- case SC_TWOHANDQUICKEN:
- case SC_ONEHANDQUICKEN:
- case SC_SPEARQUICKEN:
- case SC_LKCONCENTRATION:
- case SC_MER_QUICKEN:
- sc->opt3 |= OPT3_QUICKEN;
- opt_flag = 0;
- break;
- case SC_OVERTHRUSTMAX:
- case SC_OVERTHRUST:
- case SC_SWOO: //Why does it shares the same opt as Overthrust? Perhaps we'll never know...
- sc->opt3 |= OPT3_OVERTHRUST;
- opt_flag = 0;
- break;
- case SC_ENERGYCOAT:
- case SC_SKE:
- sc->opt3 |= OPT3_ENERGYCOAT;
- opt_flag = 0;
- break;
- case SC_INCATKRATE:
- //Simulate Explosion Spirits effect for NPC_POWERUP [Skotlex]
- if (bl->type != BL_MOB) {
+ case SC_TWOHANDQUICKEN:
+ case SC_ONEHANDQUICKEN:
+ case SC_SPEARQUICKEN:
+ case SC_LKCONCENTRATION:
+ case SC_MER_QUICKEN:
+ sc->opt3 |= OPT3_QUICKEN;
opt_flag = 0;
break;
- }
- case SC_EXPLOSIONSPIRITS:
- sc->opt3 |= OPT3_EXPLOSIONSPIRITS;
- opt_flag = 0;
- break;
- case SC_STEELBODY:
- case SC_SKA:
- sc->opt3 |= OPT3_STEELBODY;
- opt_flag = 0;
- break;
- case SC_BLADESTOP:
- sc->opt3 |= OPT3_BLADESTOP;
- opt_flag = 0;
- break;
- case SC_AURABLADE:
- sc->opt3 |= OPT3_AURABLADE;
- opt_flag = 0;
- break;
- case SC_BERSERK:
- opt_flag = 0;
- sc->opt3 |= OPT3_BERSERK;
- break;
- // case ???: // doesn't seem to do anything
- // sc->opt3 |= OPT3_LIGHTBLADE;
- // opt_flag = 0;
- // break;
- case SC_DANCING:
- if ((val1&0xFFFF) == CG_MOONLIT)
- sc->opt3 |= OPT3_MOONLIT;
- opt_flag = 0;
- break;
- case SC_MARIONETTE_MASTER:
- case SC_MARIONETTE:
- sc->opt3 |= OPT3_MARIONETTE;
- opt_flag = 0;
- break;
- case SC_ASSUMPTIO:
- sc->opt3 |= OPT3_ASSUMPTIO;
- opt_flag = 0;
- break;
- case SC_WARM: //SG skills [Komurka]
- sc->opt3 |= OPT3_WARM;
- opt_flag = 0;
- break;
- case SC_KAITE:
- sc->opt3 |= OPT3_KAITE;
- opt_flag = 0;
- break;
- case SC_NJ_BUNSINJYUTSU:
- sc->opt3 |= OPT3_BUNSIN;
- opt_flag = 0;
- break;
- case SC_SOULLINK:
- sc->opt3 |= OPT3_SOULLINK;
- opt_flag = 0;
- break;
- case SC_PROPERTYUNDEAD:
- sc->opt3 |= OPT3_UNDEAD;
- opt_flag = 0;
- break;
- // case ???: // from DA_CONTRACT (looks like biolab mobs aura)
- // sc->opt3 |= OPT3_CONTRACT;
- // opt_flag = 0;
- // break;
+ case SC_OVERTHRUSTMAX:
+ case SC_OVERTHRUST:
+ case SC_SWOO: //Why does it shares the same opt as Overthrust? Perhaps we'll never know...
+ sc->opt3 |= OPT3_OVERTHRUST;
+ opt_flag = 0;
+ break;
+ case SC_ENERGYCOAT:
+ case SC_SKE:
+ sc->opt3 |= OPT3_ENERGYCOAT;
+ opt_flag = 0;
+ break;
+ case SC_INCATKRATE:
+ //Simulate Explosion Spirits effect for NPC_POWERUP [Skotlex]
+ if (bl->type != BL_MOB) {
+ opt_flag = 0;
+ break;
+ }
+ case SC_EXPLOSIONSPIRITS:
+ sc->opt3 |= OPT3_EXPLOSIONSPIRITS;
+ opt_flag = 0;
+ break;
+ case SC_STEELBODY:
+ case SC_SKA:
+ sc->opt3 |= OPT3_STEELBODY;
+ opt_flag = 0;
+ break;
+ case SC_BLADESTOP:
+ sc->opt3 |= OPT3_BLADESTOP;
+ opt_flag = 0;
+ break;
+ case SC_AURABLADE:
+ sc->opt3 |= OPT3_AURABLADE;
+ opt_flag = 0;
+ break;
+ case SC_BERSERK:
+ opt_flag = 0;
+ sc->opt3 |= OPT3_BERSERK;
+ break;
+// case ???: // doesn't seem to do anything
+// sc->opt3 |= OPT3_LIGHTBLADE;
+// opt_flag = 0;
+// break;
+ case SC_DANCING:
+ if ((val1&0xFFFF) == CG_MOONLIT)
+ sc->opt3 |= OPT3_MOONLIT;
+ opt_flag = 0;
+ break;
+ case SC_MARIONETTE_MASTER:
+ case SC_MARIONETTE:
+ sc->opt3 |= OPT3_MARIONETTE;
+ opt_flag = 0;
+ break;
+ case SC_ASSUMPTIO:
+ sc->opt3 |= OPT3_ASSUMPTIO;
+ opt_flag = 0;
+ break;
+ case SC_WARM: //SG skills [Komurka]
+ sc->opt3 |= OPT3_WARM;
+ opt_flag = 0;
+ break;
+ case SC_KAITE:
+ sc->opt3 |= OPT3_KAITE;
+ opt_flag = 0;
+ break;
+ case SC_NJ_BUNSINJYUTSU:
+ sc->opt3 |= OPT3_BUNSIN;
+ opt_flag = 0;
+ break;
+ case SC_SOULLINK:
+ sc->opt3 |= OPT3_SOULLINK;
+ opt_flag = 0;
+ break;
+ case SC_PROPERTYUNDEAD:
+ sc->opt3 |= OPT3_UNDEAD;
+ opt_flag = 0;
+ break;
+// case ???: // from DA_CONTRACT (looks like biolab mobs aura)
+// sc->opt3 |= OPT3_CONTRACT;
+// opt_flag = 0;
+// break;
//OPTION
- case SC_HIDING:
- sc->option |= OPTION_HIDE;
- opt_flag = 2;
- break;
- case SC_CLOAKING:
- case SC_CLOAKINGEXCEED:
- case SC__INVISIBILITY:
- sc->option |= OPTION_CLOAK;
- opt_flag = 2;
- break;
- case SC_CHASEWALK:
- sc->option |= OPTION_CHASEWALK|OPTION_CLOAK;
- opt_flag = 2;
- break;
- case SC_SIGHT:
- sc->option |= OPTION_SIGHT;
- break;
- case SC_RUWACH:
- sc->option |= OPTION_RUWACH;
- break;
- case SC_WEDDING:
- sc->option |= OPTION_WEDDING;
- opt_flag |= 0x4;
- break;
- case SC_XMAS:
- sc->option |= OPTION_XMAS;
- opt_flag |= 0x4;
- break;
- case SC_SUMMER:
- sc->option |= OPTION_SUMMER;
- opt_flag |= 0x4;
- break;
- case SC_HANBOK:
- sc->option |= OPTION_HANBOK;
- opt_flag |= 0x4;
- break;
- case SC_ORCISH:
- sc->option |= OPTION_ORCISH;
- break;
- case SC_FUSION:
- sc->option |= OPTION_FLYING;
- break;
- default:
- opt_flag = 0;
+ case SC_HIDING:
+ sc->option |= OPTION_HIDE;
+ opt_flag = 2;
+ break;
+ case SC_CLOAKING:
+ case SC_CLOAKINGEXCEED:
+ case SC__INVISIBILITY:
+ sc->option |= OPTION_CLOAK;
+ opt_flag = 2;
+ break;
+ case SC_CHASEWALK:
+ sc->option |= OPTION_CHASEWALK|OPTION_CLOAK;
+ opt_flag = 2;
+ break;
+ case SC_SIGHT:
+ sc->option |= OPTION_SIGHT;
+ break;
+ case SC_RUWACH:
+ sc->option |= OPTION_RUWACH;
+ break;
+ case SC_WEDDING:
+ sc->option |= OPTION_WEDDING;
+ opt_flag |= 0x4;
+ break;
+ case SC_XMAS:
+ sc->option |= OPTION_XMAS;
+ opt_flag |= 0x4;
+ break;
+ case SC_SUMMER:
+ sc->option |= OPTION_SUMMER;
+ opt_flag |= 0x4;
+ break;
+ case SC_HANBOK:
+ sc->option |= OPTION_HANBOK;
+ opt_flag |= 0x4;
+ break;
+ case SC_ORCISH:
+ sc->option |= OPTION_ORCISH;
+ break;
+ case SC_FUSION:
+ sc->option |= OPTION_FLYING;
+ break;
+ default:
+ opt_flag = 0;
}
//On Aegis, when turning on a status change, first goes the option packet, then the sc packet.
@@ -9020,81 +9083,81 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
pet->sc_check(sd, type); //Skotlex: Pet Status Effect Healing
switch (type) {
- case SC_BERSERK:
- if (!(sce->val2)) { //don't heal if already set
- status->heal(bl, st->max_hp, 0, 1); //Do not use percent_heal as this healing must override BERSERK's block.
- status->set_sp(bl, 0, 0); //Damage all SP
- }
- sce->val2 = 5 * st->max_hp / 100;
- break;
- case SC_HLIF_CHANGE:
- status_percent_heal(bl, 100, 100);
- break;
- case SC_RUN:
- {
- struct unit_data *ud = unit->bl2ud(bl);
- if( ud )
- ud->state.running = unit->run(bl);
- }
- break;
- case SC_CASH_BOSS_ALARM:
- clif->bossmapinfo(sd->fd, map->id2boss(sce->val1), 0); // First Message
- break;
- case SC_MER_HP:
- status_percent_heal(bl, 100, 0); // Recover Full HP
- break;
- case SC_MER_SP:
- status_percent_heal(bl, 0, 100); // Recover Full SP
- break;
- /**
- * Ranger
- **/
- case SC_WUGDASH:
- {
- struct unit_data *ud = unit->bl2ud(bl);
- if( ud )
- ud->state.running = unit->wugdash(bl, sd);
- }
- break;
- case SC_COMBOATTACK:
- switch (sce->val1) {
- case TK_STORMKICK:
- clif->skill_nodamage(bl,bl,TK_READYSTORM,1,1);
+ case SC_BERSERK:
+ if (!(sce->val2)) { //don't heal if already set
+ status->heal(bl, st->max_hp, 0, 1); //Do not use percent_heal as this healing must override BERSERK's block.
+ status->set_sp(bl, 0, 0); //Damage all SP
+ }
+ sce->val2 = 5 * st->max_hp / 100;
break;
- case TK_DOWNKICK:
- clif->skill_nodamage(bl,bl,TK_READYDOWN,1,1);
+ case SC_HLIF_CHANGE:
+ status_percent_heal(bl, 100, 100);
break;
- case TK_TURNKICK:
- clif->skill_nodamage(bl,bl,TK_READYTURN,1,1);
+ case SC_RUN:
+ {
+ struct unit_data *ud = unit->bl2ud(bl);
+ if( ud )
+ ud->state.running = unit->run(bl);
+ }
break;
- case TK_COUNTER:
- clif->skill_nodamage(bl,bl,TK_READYCOUNTER,1,1);
+ case SC_CASH_BOSS_ALARM:
+ clif->bossmapinfo(sd->fd, map->id2boss(sce->val1), 0); // First Message
break;
- case MO_COMBOFINISH:
- case CH_TIGERFIST:
- case CH_CHAINCRUSH:
- if (sd)
- clif->skillinfo(sd,MO_EXTREMITYFIST, INF_SELF_SKILL);
+ case SC_MER_HP:
+ status_percent_heal(bl, 100, 0); // Recover Full HP
break;
- case TK_JUMPKICK:
- if (sd)
- clif->skillinfo(sd,TK_JUMPKICK, INF_SELF_SKILL);
+ case SC_MER_SP:
+ status_percent_heal(bl, 0, 100); // Recover Full SP
break;
- case MO_TRIPLEATTACK:
- if (sd && pc->checkskill(sd, SR_DRAGONCOMBO) > 0)
- clif->skillinfo(sd,SR_DRAGONCOMBO, INF_SELF_SKILL);
+ /**
+ * Ranger
+ **/
+ case SC_WUGDASH:
+ {
+ struct unit_data *ud = unit->bl2ud(bl);
+ if( ud )
+ ud->state.running = unit->wugdash(bl, sd);
+ }
break;
- case SR_FALLENEMPIRE:
- if (sd){
- clif->skillinfo(sd,SR_GATEOFHELL, INF_SELF_SKILL);
- clif->skillinfo(sd,SR_TIGERCANNON, INF_SELF_SKILL);
+ case SC_COMBOATTACK:
+ switch (sce->val1) {
+ case TK_STORMKICK:
+ clif->skill_nodamage(bl,bl,TK_READYSTORM,1,1);
+ break;
+ case TK_DOWNKICK:
+ clif->skill_nodamage(bl,bl,TK_READYDOWN,1,1);
+ break;
+ case TK_TURNKICK:
+ clif->skill_nodamage(bl,bl,TK_READYTURN,1,1);
+ break;
+ case TK_COUNTER:
+ clif->skill_nodamage(bl,bl,TK_READYCOUNTER,1,1);
+ break;
+ case MO_COMBOFINISH:
+ case CH_TIGERFIST:
+ case CH_CHAINCRUSH:
+ if (sd)
+ clif->skillinfo(sd,MO_EXTREMITYFIST, INF_SELF_SKILL);
+ break;
+ case TK_JUMPKICK:
+ if (sd)
+ clif->skillinfo(sd,TK_JUMPKICK, INF_SELF_SKILL);
+ break;
+ case MO_TRIPLEATTACK:
+ if (sd && pc->checkskill(sd, SR_DRAGONCOMBO) > 0)
+ clif->skillinfo(sd,SR_DRAGONCOMBO, INF_SELF_SKILL);
+ break;
+ case SR_FALLENEMPIRE:
+ if (sd){
+ clif->skillinfo(sd,SR_GATEOFHELL, INF_SELF_SKILL);
+ clif->skillinfo(sd,SR_TIGERCANNON, INF_SELF_SKILL);
+ }
+ break;
}
break;
- }
- break;
- case SC_RAISINGDRAGON:
- sce->val2 = st->max_hp / 100;// Officially tested its 1%hp drain. [Jobbie]
- break;
+ case SC_RAISINGDRAGON:
+ sce->val2 = st->max_hp / 100;// Officially tested its 1%hp drain. [Jobbie]
+ break;
}
if( opt_flag&2 && sd && sd->touching_id )
diff --git a/src/map/unit.c b/src/map/unit.c
index a7aca10b9..a9cbd605e 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1915,7 +1915,7 @@ int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick)
}
if(ud->state.attack_continue) {
- if( src->type == BL_PC )
+ if( src->type == BL_PC && battle_config.idletime_criteria & BCIDLE_ATTACK )
((TBL_PC*)src)->idletime = last_tick;
ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0);
}
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index d26779ccb..8d5449b4b 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -61,6 +61,8 @@ struct {
struct HPMHookPoint *HP_atcommand_doload_post;
struct HPMHookPoint *HP_atcommand_base_commands_pre;
struct HPMHookPoint *HP_atcommand_base_commands_post;
+ struct HPMHookPoint *HP_atcommand_add_pre;
+ struct HPMHookPoint *HP_atcommand_add_post;
struct HPMHookPoint *HP_battle_init_pre;
struct HPMHookPoint *HP_battle_init_post;
struct HPMHookPoint *HP_battle_final_pre;
@@ -2097,6 +2099,8 @@ struct {
struct HPMHookPoint *HP_instance_init_post;
struct HPMHookPoint *HP_instance_final_pre;
struct HPMHookPoint *HP_instance_final_post;
+ struct HPMHookPoint *HP_instance_reload_pre;
+ struct HPMHookPoint *HP_instance_reload_post;
struct HPMHookPoint *HP_instance_create_pre;
struct HPMHookPoint *HP_instance_create_post;
struct HPMHookPoint *HP_instance_add_map_pre;
@@ -2107,6 +2111,12 @@ struct {
struct HPMHookPoint *HP_instance_map2imap_post;
struct HPMHookPoint *HP_instance_mapid2imapid_pre;
struct HPMHookPoint *HP_instance_mapid2imapid_post;
+ struct HPMHookPoint *HP_instance_mapname2imap_pre;
+ struct HPMHookPoint *HP_instance_mapname2imap_post;
+ struct HPMHookPoint *HP_instance_map_npcsub_pre;
+ struct HPMHookPoint *HP_instance_map_npcsub_post;
+ struct HPMHookPoint *HP_instance_init_npc_pre;
+ struct HPMHookPoint *HP_instance_init_npc_post;
struct HPMHookPoint *HP_instance_destroy_pre;
struct HPMHookPoint *HP_instance_destroy_post;
struct HPMHookPoint *HP_instance_start_pre;
@@ -2847,6 +2857,8 @@ struct {
struct HPMHookPoint *HP_map_addblcell_post;
struct HPMHookPoint *HP_map_delblcell_pre;
struct HPMHookPoint *HP_map_delblcell_post;
+ struct HPMHookPoint *HP_map_get_new_bonus_id_pre;
+ struct HPMHookPoint *HP_map_get_new_bonus_id_post;
struct HPMHookPoint *HP_mapit_alloc_pre;
struct HPMHookPoint *HP_mapit_alloc_post;
struct HPMHookPoint *HP_mapit_free_pre;
@@ -4511,6 +4523,8 @@ struct {
struct HPMHookPoint *HP_skill_maelstrom_suction_post;
struct HPMHookPoint *HP_skill_get_new_group_id_pre;
struct HPMHookPoint *HP_skill_get_new_group_id_post;
+ struct HPMHookPoint *HP_skill_check_shadowform_pre;
+ struct HPMHookPoint *HP_skill_check_shadowform_post;
struct HPMHookPoint *HP_status_init_pre;
struct HPMHookPoint *HP_status_init_post;
struct HPMHookPoint *HP_status_final_pre;
@@ -4938,6 +4952,8 @@ struct {
int HP_atcommand_doload_post;
int HP_atcommand_base_commands_pre;
int HP_atcommand_base_commands_post;
+ int HP_atcommand_add_pre;
+ int HP_atcommand_add_post;
int HP_battle_init_pre;
int HP_battle_init_post;
int HP_battle_final_pre;
@@ -6974,6 +6990,8 @@ struct {
int HP_instance_init_post;
int HP_instance_final_pre;
int HP_instance_final_post;
+ int HP_instance_reload_pre;
+ int HP_instance_reload_post;
int HP_instance_create_pre;
int HP_instance_create_post;
int HP_instance_add_map_pre;
@@ -6984,6 +7002,12 @@ struct {
int HP_instance_map2imap_post;
int HP_instance_mapid2imapid_pre;
int HP_instance_mapid2imapid_post;
+ int HP_instance_mapname2imap_pre;
+ int HP_instance_mapname2imap_post;
+ int HP_instance_map_npcsub_pre;
+ int HP_instance_map_npcsub_post;
+ int HP_instance_init_npc_pre;
+ int HP_instance_init_npc_post;
int HP_instance_destroy_pre;
int HP_instance_destroy_post;
int HP_instance_start_pre;
@@ -7724,6 +7748,8 @@ struct {
int HP_map_addblcell_post;
int HP_map_delblcell_pre;
int HP_map_delblcell_post;
+ int HP_map_get_new_bonus_id_pre;
+ int HP_map_get_new_bonus_id_post;
int HP_mapit_alloc_pre;
int HP_mapit_alloc_post;
int HP_mapit_free_pre;
@@ -9388,6 +9414,8 @@ struct {
int HP_skill_maelstrom_suction_post;
int HP_skill_get_new_group_id_pre;
int HP_skill_get_new_group_id_post;
+ int HP_skill_check_shadowform_pre;
+ int HP_skill_check_shadowform_post;
int HP_status_init_pre;
int HP_status_init_post;
int HP_status_final_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 7f7d9d40d..4db9e28f2 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -34,6 +34,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(atcommand->cmd_db_clear_sub, HP_atcommand_cmd_db_clear_sub) },
{ HP_POP(atcommand->doload, HP_atcommand_doload) },
{ HP_POP(atcommand->base_commands, HP_atcommand_base_commands) },
+ { HP_POP(atcommand->add, HP_atcommand_add) },
/* battle */
{ HP_POP(battle->init, HP_battle_init) },
{ HP_POP(battle->final, HP_battle_final) },
@@ -1064,11 +1065,15 @@ struct HookingPointData HookingPoints[] = {
/* instance */
{ HP_POP(instance->init, HP_instance_init) },
{ HP_POP(instance->final, HP_instance_final) },
+ { HP_POP(instance->reload, HP_instance_reload) },
{ HP_POP(instance->create, HP_instance_create) },
{ HP_POP(instance->add_map, HP_instance_add_map) },
{ HP_POP(instance->del_map, HP_instance_del_map) },
{ HP_POP(instance->map2imap, HP_instance_map2imap) },
{ HP_POP(instance->mapid2imapid, HP_instance_mapid2imapid) },
+ { HP_POP(instance->mapname2imap, HP_instance_mapname2imap) },
+ { HP_POP(instance->map_npcsub, HP_instance_map_npcsub) },
+ { HP_POP(instance->init_npc, HP_instance_init_npc) },
{ HP_POP(instance->destroy, HP_instance_destroy) },
{ HP_POP(instance->start, HP_instance_start) },
{ HP_POP(instance->check_idle, HP_instance_check_idle) },
@@ -1445,6 +1450,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->arg_next_value, HP_map_arg_next_value) },
{ HP_POP(map->addblcell, HP_map_addblcell) },
{ HP_POP(map->delblcell, HP_map_delblcell) },
+ { HP_POP(map->get_new_bonus_id, HP_map_get_new_bonus_id) },
/* mapit */
{ HP_POP(mapit->alloc, HP_mapit_alloc) },
{ HP_POP(mapit->free, HP_mapit_free) },
@@ -2290,6 +2296,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->cooldown_save, HP_skill_cooldown_save) },
{ HP_POP(skill->maelstrom_suction, HP_skill_maelstrom_suction) },
{ HP_POP(skill->get_new_group_id, HP_skill_get_new_group_id) },
+ { HP_POP(skill->check_shadowform, HP_skill_check_shadowform) },
/* status */
{ HP_POP(status->init, HP_status_init) },
{ HP_POP(status->final, HP_status_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 8823eedae..67a3ae731 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -763,6 +763,32 @@ void HP_atcommand_base_commands(void) {
}
return;
}
+bool HP_atcommand_add(char *name, AtCommandFunc func) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_atcommand_add_pre ) {
+ bool (*preHookFunc) (char *name, AtCommandFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_atcommand_add_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.atcommand.add(name, func);
+ }
+ if( HPMHooks.count.HP_atcommand_add_post ) {
+ bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_atcommand_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &func);
+ }
+ }
+ return retVal___;
+}
/* battle */
void HP_battle_init(void) {
int hIndex = 0;
@@ -26694,6 +26720,31 @@ void HP_instance_final(void) {
}
return;
}
+void HP_instance_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_instance_reload_pre ) {
+ void (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.instance.reload();
+ }
+ if( HPMHooks.count.HP_instance_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) {
int hIndex = 0;
int retVal___ = 0;
@@ -26823,6 +26874,96 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) {
}
return retVal___;
}
+int HP_instance_mapname2imap(const char *map_name, int instance_id) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_instance_mapname2imap_pre ) {
+ int (*preHookFunc) (const char *map_name, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_instance_mapname2imap_pre[hIndex].func;
+ retVal___ = preHookFunc(map_name, &instance_id);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.instance.mapname2imap(map_name, instance_id);
+ }
+ if( HPMHooks.count.HP_instance_mapname2imap_post ) {
+ int (*postHookFunc) (int retVal___, const char *map_name, int *instance_id);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_instance_mapname2imap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, map_name, &instance_id);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_map_npcsub(struct block_list *bl, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_instance_map_npcsub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_instance_map_npcsub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.instance.map_npcsub(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_instance_map_npcsub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_instance_map_npcsub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_instance_init_npc(struct block_list *bl, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_instance_init_npc_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_instance_init_npc_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.instance.init_npc(bl, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_instance_init_npc_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_instance_init_npc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
void HP_instance_destroy(int instance_id) {
int hIndex = 0;
if( HPMHooks.count.HP_instance_destroy_pre ) {
@@ -36471,6 +36612,32 @@ void HP_map_delblcell(struct block_list *bl) {
}
return;
}
+int HP_map_get_new_bonus_id(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) {
+ int (*preHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.map.get_new_bonus_id();
+ }
+ if( HPMHooks.count.HP_map_get_new_bonus_id_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
/* mapit */
struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) {
int hIndex = 0;
@@ -56265,14 +56432,14 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id,
}
return retVal___;
}
-int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick, bool load) {
+int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_skill_blockpc_start_pre ) {
- int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load);
+ int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_skill_blockpc_start_pre[hIndex].func;
- retVal___ = preHookFunc(sd, &skill_id, &tick, &load);
+ retVal___ = preHookFunc(sd, &skill_id, &tick);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -56280,13 +56447,13 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic
}
}
{
- retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick, load);
+ retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick);
}
if( HPMHooks.count.HP_skill_blockpc_start_post ) {
- int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick, bool *load);
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick);
for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_skill_blockpc_start_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick, &load);
+ retVal___ = postHookFunc(retVal___, sd, &skill_id, &tick);
}
}
return retVal___;
@@ -58454,6 +58621,32 @@ int HP_skill_get_new_group_id(void) {
}
return retVal___;
}
+bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_skill_check_shadowform_pre ) {
+ bool (*preHookFunc) (struct block_list *bl, int64 *damage, int *hit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_skill_check_shadowform_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, &damage, &hit);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.check_shadowform(bl, damage, hit);
+ }
+ if( HPMHooks.count.HP_skill_check_shadowform_post ) {
+ bool (*postHookFunc) (bool retVal___, struct block_list *bl, int64 *damage, int *hit);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_skill_check_shadowform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, &damage, &hit);
+ }
+ }
+ return retVal___;
+}
/* status */
int HP_status_init(void) {
int hIndex = 0;