summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/001-1/stat_reset.txt4
-rw-r--r--world/map/npc/001-2/pauline.txt4
-rw-r--r--world/map/npc/001-2/tondar.txt4
-rw-r--r--world/map/npc/001-2/wizards.txt13
-rw-r--r--world/map/npc/002-1/elanore.txt6
-rw-r--r--world/map/npc/002-1/soul-menhir.txt4
-rw-r--r--world/map/npc/002-1/traveler.txt4
-rw-r--r--world/map/npc/002-3/traveler.txt4
-rw-r--r--world/map/npc/003-4/time-traveler.txt8
-rw-r--r--world/map/npc/006-1/spirit.txt12
-rw-r--r--world/map/npc/006-1/traveler.txt4
-rw-r--r--world/map/npc/006-1/tree.txt6
-rw-r--r--world/map/npc/008-1/diryn.txt4
-rw-r--r--world/map/npc/009-1/soul-menhir.txt5
-rw-r--r--world/map/npc/009-2/trader.txt28
-rw-r--r--world/map/npc/009-2/wyara.txt6
-rw-r--r--world/map/npc/009-3/sword.txt6
-rw-r--r--world/map/npc/009-4/orum.txt8
-rw-r--r--world/map/npc/009-4/waric.txt8
-rw-r--r--world/map/npc/011-1/auldsbel.txt8
-rw-r--r--world/map/npc/012-1/flowerpentagram2.txt4
-rw-r--r--world/map/npc/012-3/mana-seed.txt6
-rw-r--r--world/map/npc/012-3/traveler.txt4
-rw-r--r--world/map/npc/013-1/flowerpentagram.txt4
-rw-r--r--world/map/npc/013-1/sagatha.txt6
-rw-r--r--world/map/npc/013-1/traveler.txt4
-rw-r--r--world/map/npc/013-2/notes.txt32
-rw-r--r--world/map/npc/013-2/wizard.txt6
-rw-r--r--world/map/npc/013-3/barrier.txt6
-rw-r--r--world/map/npc/015-1/sword.txt6
-rw-r--r--world/map/npc/017-1/flowerpentagram1.txt4
-rw-r--r--world/map/npc/017-1/flowerpentagram5.txt4
-rw-r--r--world/map/npc/017-4/guardingspirit.txt6
-rw-r--r--world/map/npc/017-4/orum.txt4
-rw-r--r--world/map/npc/017-4/waric.txt4
-rw-r--r--world/map/npc/018-1/flowerpentagram3.txt4
-rw-r--r--world/map/npc/018-1/sword.txt6
-rw-r--r--world/map/npc/018-3/evil-obelisk.txt4
-rw-r--r--world/map/npc/018-3/sword.txt6
-rw-r--r--world/map/npc/020-1/soul-menhir.txt4
-rw-r--r--world/map/npc/020-1/traveler.txt4
-rw-r--r--world/map/npc/025-4/battlecaves.txt32
-rw-r--r--world/map/npc/026-1/headless_man.txt41
-rw-r--r--world/map/npc/026-1/traveler.txt4
-rw-r--r--world/map/npc/026-2/golbenez.txt2
-rw-r--r--world/map/npc/029-1/soul-menhir.txt4
-rw-r--r--world/map/npc/029-1/traveler.txt4
-rw-r--r--world/map/npc/029-2/morgan.txt6
-rw-r--r--world/map/npc/029-2/stat_reset.txt4
-rw-r--r--world/map/npc/029-4/time-traveler.txt8
-rw-r--r--world/map/npc/030-1/time-traveler.txt8
-rw-r--r--world/map/npc/030-2/avalia.txt4
-rw-r--r--world/map/npc/030-3/orum_homunculus.txt4
-rw-r--r--world/map/npc/033-1/traveler.txt4
-rw-r--r--world/map/npc/048-2/sageNikolai.txt4
-rw-r--r--world/map/npc/048-2/traveler.txt4
-rw-r--r--world/map/npc/055-1/flowerpentagram4.txt4
-rw-r--r--world/map/npc/055-1/traveler.txt4
-rw-r--r--world/map/npc/056-2/barrier.txt1
-rw-r--r--world/map/npc/056-2/mirak.txt4
-rw-r--r--world/map/npc/058-1/griffen.txt4
-rw-r--r--world/map/npc/058-2/griffen.txt4
-rw-r--r--world/map/npc/069-2/wizard.txt4
-rw-r--r--world/map/npc/099-1/main.txt4
-rw-r--r--world/map/npc/099-2/logic.txt29
-rw-r--r--world/map/npc/099-5/boss.txt11
-rw-r--r--world/map/npc/099-7/boss.txt23
-rw-r--r--world/map/npc/099-7/chronos.txt6
-rw-r--r--world/map/npc/099-8/mobs.txt5
-rw-r--r--world/map/npc/annuals/2022.txt3
-rw-r--r--world/map/npc/annuals/xmas/2020.txt5
-rw-r--r--world/map/npc/commands/destroynpc.txt2
-rw-r--r--world/map/npc/commands/hug.txt3
-rw-r--r--world/map/npc/functions/doomsday.txt4
-rw-r--r--world/map/npc/items/magicring_item.txt27
-rw-r--r--world/map/npc/magic/level1-detect-magic.txt33
-rw-r--r--world/map/npc/magic/level2-make-bones.txt2
-rw-r--r--world/map/npc/magic/level2-protect.txt5
-rw-r--r--world/map/npc/magic/level2-rain.txt11
-rw-r--r--world/map/npc/scripts.conf1
80 files changed, 522 insertions, 84 deletions
diff --git a/world/map/npc/001-1/stat_reset.txt b/world/map/npc/001-1/stat_reset.txt
index e8c61ca3..78835d1a 100644
--- a/world/map/npc/001-1/stat_reset.txt
+++ b/world/map/npc/001-1/stat_reset.txt
@@ -5,4 +5,8 @@
set @npcname$, "Malivox";
callfunc "StatReset";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/001-2/pauline.txt b/world/map/npc/001-2/pauline.txt
index 497116f6..8c67e00d 100644
--- a/world/map/npc/001-2/pauline.txt
+++ b/world/map/npc/001-2/pauline.txt
@@ -283,6 +283,10 @@ L_Close:
S_Update_Mask:
set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Pauline_MASK)) | (@pauline_state << @Pauline_SHIFT);
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
001-2,79,74,0|script|PaulineDebug|208
diff --git a/world/map/npc/001-2/tondar.txt b/world/map/npc/001-2/tondar.txt
index cb3a1070..e36cb66a 100644
--- a/world/map/npc/001-2/tondar.txt
+++ b/world/map/npc/001-2/tondar.txt
@@ -55,4 +55,8 @@ L_nopay:
L_end:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/001-2/wizards.txt b/world/map/npc/001-2/wizards.txt
index e51e7a66..aedeaa7b 100644
--- a/world/map/npc/001-2/wizards.txt
+++ b/world/map/npc/001-2/wizards.txt
@@ -11,7 +11,7 @@
close;
OnInit:
- if (puppet("001-2", 104, 19, "Desert Mana Seed#_M", 166) < 1) mapexit;
+ if (puppet("001-2", 104, 19, "Desert Mana Seed", 166) < 1) mapexit;
if (puppet("001-2", 99, 22, "Wizard#1", 355) < 1) mapexit;
if (puppet("001-2", 92, 24, "Wizard#2", 356) < 1) mapexit;
if (puppet("001-2", 92, 30, "Wizard#3", 357) < 1) mapexit;
@@ -21,5 +21,16 @@ OnInit:
if (puppet("001-2", 117, 30, "Wizard#7", 361) < 1) mapexit;
if (puppet("001-2", 110, 32, "Wizard#8", 362) < 1) mapexit;
if (puppet("001-2", 104, 27, "Arch-Wizard#9", 354) < 1) mapexit;
+ set .IS_MAGIC, 1, getnpcid("Desert Mana Seed");
+ set .IS_MAGIC, 1, getnpcid("Wizard#1");
+ set .IS_MAGIC, 1, getnpcid("Wizard#2");
+ set .IS_MAGIC, 1, getnpcid("Wizard#3");
+ set .IS_MAGIC, 1, getnpcid("Wizard#4");
+ set .IS_MAGIC, 1, getnpcid("Wizard#5");
+ set .IS_MAGIC, 1, getnpcid("Wizard#6");
+ set .IS_MAGIC, 1, getnpcid("Wizard#7");
+ set .IS_MAGIC, 1, getnpcid("Wizard#8");
+ set .IS_MAGIC, 1, getnpcid("Arch-Wizard#9");
end;
+
}
diff --git a/world/map/npc/002-1/elanore.txt b/world/map/npc/002-1/elanore.txt
index 15e8439e..3d398454 100644
--- a/world/map/npc/002-1/elanore.txt
+++ b/world/map/npc/002-1/elanore.txt
@@ -36,7 +36,7 @@ L_Return:
return;
}
-002-1,75,62,0|script|Elanore#_M|108
+002-1,75,62,0|script|Elanore|108
{
set @has_magic, getskilllv(SKILL_MAGIC);
@@ -619,4 +619,8 @@ L_Close:
S_update_var:
set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT));
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/002-1/soul-menhir.txt b/world/map/npc/002-1/soul-menhir.txt
index fa2a4508..06387baf 100644
--- a/world/map/npc/002-1/soul-menhir.txt
+++ b/world/map/npc/002-1/soul-menhir.txt
@@ -14,4 +14,8 @@
set @x, 0;
set @y, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/002-1/traveler.txt b/world/map/npc/002-1/traveler.txt
index 975786ae..dadbeff0 100644
--- a/world/map/npc/002-1/traveler.txt
+++ b/world/map/npc/002-1/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@tulimshar_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/002-3/traveler.txt b/world/map/npc/002-3/traveler.txt
index 48175be8..ebaf07da 100644
--- a/world/map/npc/002-3/traveler.txt
+++ b/world/map/npc/002-3/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@tul_mine_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/003-4/time-traveler.txt b/world/map/npc/003-4/time-traveler.txt
index 00a875f5..148ab95e 100644
--- a/world/map/npc/003-4/time-traveler.txt
+++ b/world/map/npc/003-4/time-traveler.txt
@@ -11,6 +11,10 @@ L_Warp:
close2;
warp "003-4", 171, 76;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
003-4,165,73,0|script|Time Traveler#34|184
@@ -30,4 +34,8 @@ L_What:
L_Leave:
mes "Walk East from here to escape the time dilation bubble.";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/006-1/spirit.txt b/world/map/npc/006-1/spirit.txt
index 4796121a..3c464383 100644
--- a/world/map/npc/006-1/spirit.txt
+++ b/world/map/npc/006-1/spirit.txt
@@ -282,14 +282,22 @@ S_update_var:
return;
}
-006-1,67,68,0|script|#EarthImp0#_M|400
+006-1,67,68,0|script|#EarthImp0|400
{
callfunc "EarthImpTouch";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
-006-1,68,68,0|script|#EarthImp1#_M|400
+006-1,68,68,0|script|#EarthImp1|400
{
callfunc "EarthImpTouch";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/006-1/traveler.txt b/world/map/npc/006-1/traveler.txt
index 7c84e040..a2f02b24 100644
--- a/world/map/npc/006-1/traveler.txt
+++ b/world/map/npc/006-1/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@pachua_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/006-1/tree.txt b/world/map/npc/006-1/tree.txt
index 57209d24..ef5fb113 100644
--- a/world/map/npc/006-1/tree.txt
+++ b/world/map/npc/006-1/tree.txt
@@ -155,8 +155,12 @@ L_Close:
}
-006-1,82,59,0|script|#DruidTree0#_M|400
+006-1,82,59,0|script|#DruidTree0|400
{
callfunc "QuestTreeTouch";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/008-1/diryn.txt b/world/map/npc/008-1/diryn.txt
index 6570f1d8..7e27e4e0 100644
--- a/world/map/npc/008-1/diryn.txt
+++ b/world/map/npc/008-1/diryn.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@hurnscald_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/009-1/soul-menhir.txt b/world/map/npc/009-1/soul-menhir.txt
index 3b8c5cee..da8a1224 100644
--- a/world/map/npc/009-1/soul-menhir.txt
+++ b/world/map/npc/009-1/soul-menhir.txt
@@ -1,5 +1,4 @@
//
-
009-1,53,40,0|script|Soul Menhir#hurnscald|344
{
set @map$, "009-1";
@@ -14,4 +13,8 @@
set @x, 0;
set @y, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/009-2/trader.txt b/world/map/npc/009-2/trader.txt
index 46ccafac..a872117c 100644
--- a/world/map/npc/009-2/trader.txt
+++ b/world/map/npc/009-2/trader.txt
@@ -62,6 +62,7 @@ L_Trademenu:
"Do you have Iron Powder?", L_Iron,
"How about Sulphur Powder?", L_Sulphur,
"I need Medium Healing Potions.", L_Healpots,
+ "I'd like to acquire an Enchanter's Amulet.", L_Eamulet,
"I think I have everything I need, thanks.", L_Close;
L_Iron:
@@ -85,6 +86,13 @@ L_Healpots:
"Alright.", L_Pots,
"Whoa, that's way too much.", L_Close;
+L_Eamulet:
+ mes "[Trader]";
+ mes "\"These amulets are quite rare. Three times as rare as a Magic Ring, they say. I do have one though and would trade it off for three Magic Rings and thirteen Blood Stones. I've had a hard time finding those stones.\"";
+ menu
+ "Alright.", L_GetEamuletConfirm,
+ "I'd better check the shops out first.", L_Close;
+
L_Ipowder:
if (countitem("IronOre") < 1) goto L_Missing;
if (Zeny < @Ironprice) goto L_NotEnoughMoney;
@@ -127,6 +135,26 @@ L_Pots:
"Yes.", L_Trademenu,
"No.", L_No;
+L_GetEamuletConfirm:
+ mes "[Trader]";
+ mes "\"Are you sure you wish to trade for the Enchanter's Amulet? All trades are final.\"";
+ menu
+ "No, I'd better think this over a bit more.", L_No,
+ "No thanks. I've changed my mind. What else do you trade, again?", L_Trademenu,
+ "Yes, I'm positive.", L_GetEamulet;
+
+L_GetEamulet:
+ if (countitem("MagicRing") < 3) goto L_Missing;
+ if (countitem("Bloodstone") < 13) goto L_Missing;
+ delitem "MagicRing", 3;
+ delitem "Bloodstone", 13;
+ getitem "EnchantersAmulet", 1;
+ mes "[Trader]";
+ mes "\"Make good use of your new amulet. Would you like to trade anything else?\"";
+ menu
+ "Yes.", L_Trademenu,
+ "No.", L_No;
+
L_Full:
mes "[Trader]";
mes "\"You must have been making a lot of trades...your bag is completely full! Come back after you've made some room.\"";
diff --git a/world/map/npc/009-2/wyara.txt b/world/map/npc/009-2/wyara.txt
index 1b912019..51e2ada6 100644
--- a/world/map/npc/009-2/wyara.txt
+++ b/world/map/npc/009-2/wyara.txt
@@ -1,7 +1,7 @@
// ----------------------------------------
// Wyara the Hurnscald witch
// ----------------------------------------
-009-2,121,26,0|script|Wyara#_M|103
+009-2,121,26,0|script|Wyara|103
{
set @Q_MASK, NIBBLE_2_MASK;
set @Q_SHIFT, NIBBLE_2_SHIFT;
@@ -554,4 +554,8 @@ L_Close:
S_update_var:
set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT));
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/009-3/sword.txt b/world/map/npc/009-3/sword.txt
index 1a427731..9649d730 100644
--- a/world/map/npc/009-3/sword.txt
+++ b/world/map/npc/009-3/sword.txt
@@ -1,4 +1,4 @@
-009-3,26,100,0|script|#MysticSword#_M|400
+009-3,26,100,0|script|#MysticSword|400
{
if (getskilllv(SKILL_MAGIC))
goto L_message;
@@ -173,4 +173,8 @@ L_farewell:
S_update_var:
set QUEST_MAGIC, (QUEST_MAGIC & ~(@Q_MASK) | (@Q_status << @Q_SHIFT));
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/009-4/orum.txt b/world/map/npc/009-4/orum.txt
index df9ac2d9..f7fea706 100644
--- a/world/map/npc/009-4/orum.txt
+++ b/world/map/npc/009-4/orum.txt
@@ -591,6 +591,10 @@ L_Close:
set @Torch, 0;
set @TorchColor, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
function|script|SetUpOrumQuest
{
@@ -626,4 +630,8 @@ function|script|SetUpOrumQuest
callfunc "SetTorchColor";
callfunc "SetTorchIntensity";
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/009-4/waric.txt b/world/map/npc/009-4/waric.txt
index aa366318..075c340c 100644
--- a/world/map/npc/009-4/waric.txt
+++ b/world/map/npc/009-4/waric.txt
@@ -19,6 +19,10 @@
next;
mes "\"Your fate is up to Waric now... don't expect me to do anything else for you.\"";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
009-4,118,42,0|script|Waric#trap|153
@@ -94,4 +98,8 @@ L_Explain:
L_Close:
set @EXP_LEARNED_ALOT, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/011-1/auldsbel.txt b/world/map/npc/011-1/auldsbel.txt
index 8f8fe66c..a289f86a 100644
--- a/world/map/npc/011-1/auldsbel.txt
+++ b/world/map/npc/011-1/auldsbel.txt
@@ -1,7 +1,7 @@
// Auldsbel the Wizard
// Transmutation Magic expert
-011-1,50,68,0|script|Auldsbel#_M|168
+011-1,50,68,0|script|Auldsbel|168
{
set @mexp, MAGIC_EXPERIENCE & 65535;
@@ -943,7 +943,7 @@ L_Next8:
mes "\"I suggest that you run.\"";
next;
misceffect sfx_magic_transmute;
- monster "this", 50, 68, "", 1034, 4, "Auldsbel#_M::OnSnakeDeath";
+ monster "this", 50, 68, "", 1034, 4, "Auldsbel::OnSnakeDeath";
close;
OnSnakeDeath:
@@ -1287,4 +1287,8 @@ S_update_var:
(QUEST_MAGIC & ~(@Q_MASK)
| (@Q_status << @Q_SHIFT));
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/012-1/flowerpentagram2.txt b/world/map/npc/012-1/flowerpentagram2.txt
index 3ce479e9..715b2611 100644
--- a/world/map/npc/012-1/flowerpentagram2.txt
+++ b/world/map/npc/012-1/flowerpentagram2.txt
@@ -94,4 +94,8 @@ L_PlacedFifthFlower:
L_Close:
set @localMonsterCount, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/012-3/mana-seed.txt b/world/map/npc/012-3/mana-seed.txt
index 057665e0..73e1828f 100644
--- a/world/map/npc/012-3/mana-seed.txt
+++ b/world/map/npc/012-3/mana-seed.txt
@@ -1,4 +1,4 @@
-012-3,62,130,0|script|Forest Mana Seed#_M|166
+012-3,62,130,0|script|Forest Mana Seed|166
{
setarray @magic_exp_needed,
0, // level 0
@@ -279,4 +279,8 @@ L_magic_destroy:
L_end:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/012-3/traveler.txt b/world/map/npc/012-3/traveler.txt
index b3c158ea..9f497dab 100644
--- a/world/map/npc/012-3/traveler.txt
+++ b/world/map/npc/012-3/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@terranite_cave_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/013-1/flowerpentagram.txt b/world/map/npc/013-1/flowerpentagram.txt
index 001b7e0a..5c5ec79b 100644
--- a/world/map/npc/013-1/flowerpentagram.txt
+++ b/world/map/npc/013-1/flowerpentagram.txt
@@ -86,6 +86,10 @@ S_CleanUp:
killmonster "013-1", "#FlowerPentagram::OnAScorpionDeath";
killmonster "013-1", "#FlowerPentagram::OnBScorpionDeath";
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
function|script|FlowerPentagramCount
diff --git a/world/map/npc/013-1/sagatha.txt b/world/map/npc/013-1/sagatha.txt
index fe2a4e6f..07348181 100644
--- a/world/map/npc/013-1/sagatha.txt
+++ b/world/map/npc/013-1/sagatha.txt
@@ -72,7 +72,7 @@ L_next:
}
//----------------------------------------
-013-1,131,24,0|script|Sagatha#_M|167
+013-1,131,24,0|script|Sagatha|167
{
callfunc "SagathaStatus";
@@ -444,4 +444,8 @@ S_update_var:
(QUEST_MAGIC & ~(@Q_MASK)
| (@Q_status << @Q_SHIFT));
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/013-1/traveler.txt b/world/map/npc/013-1/traveler.txt
index 7439b8d8..acbe4d29 100644
--- a/world/map/npc/013-1/traveler.txt
+++ b/world/map/npc/013-1/traveler.txt
@@ -4,4 +4,8 @@
set @NpcTravelBit, $@magic_house_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/013-2/notes.txt b/world/map/npc/013-2/notes.txt
index 3a0215b9..f412668b 100644
--- a/world/map/npc/013-2/notes.txt
+++ b/world/map/npc/013-2/notes.txt
@@ -39,6 +39,10 @@ L_Close:
set @fixedMirror, 1;
callfunc "useMirror";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Warp to wood clearings
@@ -72,6 +76,10 @@ L_PlaceThree:
L_Close:
set @dest, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Warp to desert
@@ -104,6 +112,10 @@ L_PlaceThree:
L_Close:
set @dest, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Warp to snow area
@@ -135,6 +147,10 @@ L_Cave:
L_Close:
set @dest, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Warp to Inns
@@ -166,6 +182,10 @@ L_PlaceThree:
L_Close:
set @dest, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Warp to mines
@@ -197,6 +217,10 @@ L_PlaceThree:
L_Close:
set @dest, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Death
@@ -208,6 +232,10 @@ L_Close:
next;
heal -Hp, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// Naked
@@ -219,4 +247,8 @@ L_Close:
next;
nude;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/013-2/wizard.txt b/world/map/npc/013-2/wizard.txt
index 13f3fc9c..7a3fd822 100644
--- a/world/map/npc/013-2/wizard.txt
+++ b/world/map/npc/013-2/wizard.txt
@@ -1,4 +1,4 @@
-013-2,66,39,0|script|Old Wizard#_W|116
+013-2,66,39,0|script|Old Wizard|116
{
set @has_magic, getskilllv(SKILL_MAGIC);
set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD;
@@ -155,4 +155,8 @@ L_Agree:
L_Close:
set @has_magic, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/013-3/barrier.txt b/world/map/npc/013-3/barrier.txt
index d7875009..680bb0a4 100644
--- a/world/map/npc/013-3/barrier.txt
+++ b/world/map/npc/013-3/barrier.txt
@@ -1,6 +1,6 @@
//
-013-3,71,21,0|script|#DemonMineBarrier1#_M|32767,1,0
+013-3,71,21,0|script|#DemonMineBarrier1|32767,1,0
{
set @state, ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
@@ -26,4 +26,8 @@ L_End:
S_Update_Mask:
set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT);
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/015-1/sword.txt b/world/map/npc/015-1/sword.txt
index be23e23a..bbf60b72 100644
--- a/world/map/npc/015-1/sword.txt
+++ b/world/map/npc/015-1/sword.txt
@@ -1,4 +1,4 @@
-015-1,97,97,0|script|#MagicSword#_M|400
+015-1,97,97,0|script|#MagicSword|400
{
if (getskilllv(SKILL_MAGIC))
goto L_message;
@@ -321,4 +321,8 @@ S_update_var:
(QUEST_MAGIC & ~(@Q_MASK)
| (@Q_status << @Q_SHIFT));
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/017-1/flowerpentagram1.txt b/world/map/npc/017-1/flowerpentagram1.txt
index 64128b4b..5480ad60 100644
--- a/world/map/npc/017-1/flowerpentagram1.txt
+++ b/world/map/npc/017-1/flowerpentagram1.txt
@@ -79,4 +79,8 @@ L_PlacedFifthFlower:
L_Close:
set @localMonsterCount, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/017-1/flowerpentagram5.txt b/world/map/npc/017-1/flowerpentagram5.txt
index f8947dbd..628a9433 100644
--- a/world/map/npc/017-1/flowerpentagram5.txt
+++ b/world/map/npc/017-1/flowerpentagram5.txt
@@ -137,4 +137,8 @@ L_PlacedFifthFlower:
L_Close:
set @localMonsterCount, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/017-4/guardingspirit.txt b/world/map/npc/017-4/guardingspirit.txt
index 8fef95ed..06dc0a6b 100644
--- a/world/map/npc/017-4/guardingspirit.txt
+++ b/world/map/npc/017-4/guardingspirit.txt
@@ -1,6 +1,6 @@
// Author: Jenalya
-017-4,173,47,0|script|#Guarding Spirit#_M|204,0,0
+017-4,173,47,0|script|#Guarding Spirit|204,0,0
{
goto L_Talk;
@@ -94,4 +94,8 @@ OnTouch:
goto L_Block;
warp "017-4", 201, 26;
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/017-4/orum.txt b/world/map/npc/017-4/orum.txt
index 213f14af..58c605a4 100644
--- a/world/map/npc/017-4/orum.txt
+++ b/world/map/npc/017-4/orum.txt
@@ -840,4 +840,8 @@ L_Close:
set @REWARD_MONEY, 0;
set @REWARD_EXP, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/017-4/waric.txt b/world/map/npc/017-4/waric.txt
index 1fc489f3..55b794c8 100644
--- a/world/map/npc/017-4/waric.txt
+++ b/world/map/npc/017-4/waric.txt
@@ -383,6 +383,10 @@ L_Close:
set @SUP_lvl, 0;
set @SUP_xp, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
017-1,74,32,0|script|DebugFlowerP|153
diff --git a/world/map/npc/018-1/flowerpentagram3.txt b/world/map/npc/018-1/flowerpentagram3.txt
index 857c412d..7f90965e 100644
--- a/world/map/npc/018-1/flowerpentagram3.txt
+++ b/world/map/npc/018-1/flowerpentagram3.txt
@@ -108,4 +108,8 @@ L_PlacedFifthFlower:
L_Close:
set @localMonsterCount, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/018-1/sword.txt b/world/map/npc/018-1/sword.txt
index 8d5dc827..885c9532 100644
--- a/world/map/npc/018-1/sword.txt
+++ b/world/map/npc/018-1/sword.txt
@@ -1,4 +1,4 @@
-018-1,110,43,0|script|#IceSword#_M|400
+018-1,110,43,0|script|#IceSword|400
{
if (getskilllv(SKILL_MAGIC))
goto L_message;
@@ -8,4 +8,8 @@ L_message:
mes "[Sword in Pond]";
mes "\"Zzzzzz.....\"";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/018-3/evil-obelisk.txt b/world/map/npc/018-3/evil-obelisk.txt
index 4ecc00b3..1d4cea7d 100644
--- a/world/map/npc/018-3/evil-obelisk.txt
+++ b/world/map/npc/018-3/evil-obelisk.txt
@@ -15,4 +15,8 @@
set @x1, 0;
set @y1, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/018-3/sword.txt b/world/map/npc/018-3/sword.txt
index 83e9c6f2..5dfbedbf 100644
--- a/world/map/npc/018-3/sword.txt
+++ b/world/map/npc/018-3/sword.txt
@@ -1,4 +1,4 @@
-018-3,71,127,0|script|#DemonSword#_M|400
+018-3,71,127,0|script|#DemonSword|400
{
if (getskilllv(SKILL_MAGIC))
goto L_message;
@@ -8,4 +8,8 @@ L_message:
mes "[Sword in Rock]";
mes "\"Ouch... my head...\"";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/020-1/soul-menhir.txt b/world/map/npc/020-1/soul-menhir.txt
index c8f7740a..d9471f2b 100644
--- a/world/map/npc/020-1/soul-menhir.txt
+++ b/world/map/npc/020-1/soul-menhir.txt
@@ -14,4 +14,8 @@
set @x, 0;
set @y, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/020-1/traveler.txt b/world/map/npc/020-1/traveler.txt
index 421ed0e7..a5a5b9cf 100644
--- a/world/map/npc/020-1/traveler.txt
+++ b/world/map/npc/020-1/traveler.txt
@@ -4,4 +4,8 @@
set @NpcTravelBit, $@nivalis_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/025-4/battlecaves.txt b/world/map/npc/025-4/battlecaves.txt
index 8acebf2a..8c281a35 100644
--- a/world/map/npc/025-4/battlecaves.txt
+++ b/world/map/npc/025-4/battlecaves.txt
@@ -75,6 +75,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 1 Checker ----------------------------
@@ -167,6 +170,10 @@ L_Close:
L_no_root:
mes "I don't have any roots in my inventory!";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 2 Checker ----------------------------
@@ -258,6 +265,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 3 Checker ----------------------------
@@ -351,6 +361,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 4 Checker ----------------------------
@@ -445,6 +458,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 5 Checker ----------------------------
@@ -539,6 +555,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 6 Checker ----------------------------
@@ -635,6 +654,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 7 Checker ----------------------------
@@ -731,6 +753,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 8 Checker ----------------------------
@@ -827,6 +852,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Cave 9 Checker ----------------------------
@@ -945,6 +973,9 @@ L_no_root:
mes "I don't have any roots in my inventory!";
close;
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
// --------------------- Boss Cave Checker ----------------------------
@@ -1015,4 +1046,3 @@ L_Save:
message strcharinfo(0), "You can't leave Julia here, all alone!";
end;
}
-
diff --git a/world/map/npc/026-1/headless_man.txt b/world/map/npc/026-1/headless_man.txt
index f922406d..96c8cd49 100644
--- a/world/map/npc/026-1/headless_man.txt
+++ b/world/map/npc/026-1/headless_man.txt
@@ -59,18 +59,21 @@ L_Quest_ask:
L_Quest_start:
mes "[Thurstan]";
mes "\"Great! I will need the following things.\"";
- mes "\"" + @Wisp_Powder + " Wisp Powder,\"";
- mes "\"" + @Polt_Powder + " Poltergeist Powder,\"";
- mes "\"" + @Spec_Powder + " Spectre Powder,\"";
- mes "\"" + @Iron_Pot + " Iron Potion,\"";
- mes "\"" + @Conc_Pot + " Concentration Potion,\"";
- mes "\"" + @Red_Dye + " vials of Red Dye,\"";
- mes "\"" + @Yellow_Dye + " vials of Yellow Dye,\"";
+ mes "\"" + @Wisp_Powder + " [@@"+WispPowder+"|@@],\"";
+ mes "\"" + @Polt_Powder + " [@@"+PoltergeistPowder+"|@@],\"";
+ mes "\"" + @Spec_Powder + " [@@"+SpectrePowder+"|@@],\"";
+ mes "\"" + @Iron_Pot + " [@@"+IronPotion+"|@@],\"";
+ mes "\"" + @Conc_Pot + " [@@"+ConcentrationPotion+"|@@],\"";
+ mes "\"" + @Red_Dye + " vials of [@@"+RedDye+"|@@],\"";
+ mes "\"" + @Yellow_Dye + " vials of [@@"+YellowDye+"|@@],\"";
mes "\"and...\"";
- mes "\"" + @LB_Dye + " vials of Light Blue Dye,\"";
+ mes "\"" + @LB_Dye + " vials of [@@"+LightBlueDye+"|@@],\"";
next;
mes "[Thurstan]";
- mes "\"My friend also said that I should use a metal bowl instead of a wooden one. I don't have one and I think a cauldron from the kitchen would be too big. Perhaps we could use an Infantry Helmet to serve that task.\"";
+ mes "\"My friend also said that I should use a metal bowl instead of a wooden one. I don't have one and I think a cauldron from the kitchen would be too big. Perhaps we could use an [@@"+InfantryHelmet+"|@@] to serve that task.\"";
+ next;
+ mes "[Thurstan]";
+ mes "\"He also said that a [@@"+PinkieHat+"|@@] is a perfect whisk for stirring this recipe since the glue does not stick to it.\"";
next;
mes "[Thurstan]";
mes "\"I know it probably doesn't seem like that much to you, but it is a really big deal for me. I will try to find something to compensate you for your efforts.\"";
@@ -100,6 +103,7 @@ L_Quest_check:
|| countitem("RedDye") < @Red_Dye
|| countitem("YellowDye") < @Yellow_Dye
|| countitem("LightBlueDye") < @LB_Dye
+ || countitem("PinkieHat") < 1
|| countitem("InfantryHelmet") < 1)
goto L_Quest_notenough;
@@ -111,6 +115,7 @@ L_Quest_check:
delitem "RedDye", @Red_Dye;
delitem "YellowDye", @Yellow_Dye;
delitem "LightBlueDye", @LB_Dye;
+ delitem "PinkieHat", 1;
delitem "InfantryHelmet", 1;
getexp @Glue_Exp, 0;
mes "[Thurstan]";
@@ -146,15 +151,15 @@ L_Quest_notenough:
L_Quest_items:
mes "[Thurstan]";
- mes "\"" + @Wisp_Powder + " Wisp Powder,\"";
- mes "\"" + @Polt_Powder + " Poltergeist Powder,\"";
- mes "\"" + @Spec_Powder + " Spectre Powder,\"";
- mes "\"" + @Iron_Pot + " Iron Potion,\"";
- mes "\"" + @Conc_Pot + " Concentration Potion,\"";
- mes "\"" + @Red_Dye + " vials of Red Dye,\"";
- mes "\"" + @Yellow_Dye + " vials of Yellow Dye,\"";
- mes "\"" + @LB_Dye + " vials of Light Blue Dye,\"";
- mes "\"We'll also need 1 Infantry Helmet to use as a bowl for mixing everything together.\"";
+ mes "\"" + @Wisp_Powder + " [@@"+WispPowder+"|@@],\"";
+ mes "\"" + @Polt_Powder + " [@@"+PoltergeistPowder+"|@@],\"";
+ mes "\"" + @Spec_Powder + " [@@"+SpectrePowder+"|@@],\"";
+ mes "\"" + @Iron_Pot + " [@@"+IronPotion+"|@@],\"";
+ mes "\"" + @Conc_Pot + " [@@"+ConcentrationPotion+"|@@],\"";
+ mes "\"" + @Red_Dye + " vials of [@@"+RedDye+"|@@],\"";
+ mes "\"" + @Yellow_Dye + " vials of [@@"+YellowDye+"|@@],\"";
+ mes "\"" + @LB_Dye + " vials of [@@"+LightBlueDye+"|@@],\"";
+ mes "\"We'll also need 1 [@@"+InfantryHelmet+"|@@] to use as a bowl for mixing everything together and 1 [@@"+PinkieHat+"|@@] as whisk for stirring since the glue does not stick to it.\"";
goto L_Close;
L_Quest_finished:
diff --git a/world/map/npc/026-1/traveler.txt b/world/map/npc/026-1/traveler.txt
index de743c14..ab905120 100644
--- a/world/map/npc/026-1/traveler.txt
+++ b/world/map/npc/026-1/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@graveyard_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/026-2/golbenez.txt b/world/map/npc/026-2/golbenez.txt
index 6cf76de1..2bcd29c6 100644
--- a/world/map/npc/026-2/golbenez.txt
+++ b/world/map/npc/026-2/golbenez.txt
@@ -416,7 +416,7 @@ S_Reidsmem:
next;
mes "It seems you're not only seeing Reid's memories, but also feeling them!";
next;
- mes "Reid turns away from Savaric's door and walks to her rooms quickly. She is shivering. You feel her heart pounding.";
+ mes "Reid turns away from Savaric's door and walks to her room quickly. She is shivering. You feel her heart pounding.";
next;
mes "She enters the room and pulls a red dress out of a chest and changes into it. As you feel her heart pounding even faster, you recognize the dress as the one her ghost is wearing.";
next;
diff --git a/world/map/npc/029-1/soul-menhir.txt b/world/map/npc/029-1/soul-menhir.txt
index 8113d9c5..702356bf 100644
--- a/world/map/npc/029-1/soul-menhir.txt
+++ b/world/map/npc/029-1/soul-menhir.txt
@@ -14,4 +14,8 @@
set @x, 0;
set @y, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/029-1/traveler.txt b/world/map/npc/029-1/traveler.txt
index befa8eef..0add5765 100644
--- a/world/map/npc/029-1/traveler.txt
+++ b/world/map/npc/029-1/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@candor_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/029-2/morgan.txt b/world/map/npc/029-2/morgan.txt
index c6dfa306..c5d48b43 100644
--- a/world/map/npc/029-2/morgan.txt
+++ b/world/map/npc/029-2/morgan.txt
@@ -23,7 +23,7 @@ OnInit:
disablenpc "MorganDebug";
end;
}
-029-2,101,57,0|script|Morgan#_M|355
+029-2,101,57,0|script|Morgan|355
{
callfunc "PCtoNPCRange";
if(@npc_check) end;
@@ -137,6 +137,10 @@ L_LearningDone:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
029-2,113,59,0|shop|Zitoni|103,CactusDrink:*1,CactusPotion:*1,TinyManaElixir:*5,SmallManaElixir:*5,EnlighteningElixir:*1,ManaDust:*1
diff --git a/world/map/npc/029-2/stat_reset.txt b/world/map/npc/029-2/stat_reset.txt
index d66cd2f9..17be61b9 100644
--- a/world/map/npc/029-2/stat_reset.txt
+++ b/world/map/npc/029-2/stat_reset.txt
@@ -48,4 +48,8 @@ L_Sorry:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/029-4/time-traveler.txt b/world/map/npc/029-4/time-traveler.txt
index 1242e7c4..1407e949 100644
--- a/world/map/npc/029-4/time-traveler.txt
+++ b/world/map/npc/029-4/time-traveler.txt
@@ -11,6 +11,10 @@ L_Warp:
close2;
warp "029-4", 24, 38;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
029-4,26,36,0|script|Time Traveler#294|184
@@ -28,4 +32,8 @@ L_What:
L_Leave:
mes "Walk West from here to escape the time dilation bubble.";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/030-1/time-traveler.txt b/world/map/npc/030-1/time-traveler.txt
index a79b812d..7c6aba65 100644
--- a/world/map/npc/030-1/time-traveler.txt
+++ b/world/map/npc/030-1/time-traveler.txt
@@ -11,6 +11,10 @@ L_Warp:
close2;
warp "030-1", 61, 29;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
030-1,64,33,0|script|Time Traveler#30|184
@@ -31,4 +35,8 @@ L_What:
L_Leave:
mes "Walk North from here to exit the time dilation bubble.";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/030-2/avalia.txt b/world/map/npc/030-2/avalia.txt
index 818fabae..9c5034d4 100644
--- a/world/map/npc/030-2/avalia.txt
+++ b/world/map/npc/030-2/avalia.txt
@@ -187,6 +187,10 @@ L_ThankYou:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
030-2,190,64,0|script|Milis|330
diff --git a/world/map/npc/030-3/orum_homunculus.txt b/world/map/npc/030-3/orum_homunculus.txt
index 503374ff..0208d331 100644
--- a/world/map/npc/030-3/orum_homunculus.txt
+++ b/world/map/npc/030-3/orum_homunculus.txt
@@ -473,4 +473,8 @@ L_ThankYou:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/033-1/traveler.txt b/world/map/npc/033-1/traveler.txt
index 462e2586..11f93bcf 100644
--- a/world/map/npc/033-1/traveler.txt
+++ b/world/map/npc/033-1/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@barbarians_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/048-2/sageNikolai.txt b/world/map/npc/048-2/sageNikolai.txt
index fdc6e76d..fb121552 100644
--- a/world/map/npc/048-2/sageNikolai.txt
+++ b/world/map/npc/048-2/sageNikolai.txt
@@ -283,4 +283,8 @@ L_Close:
set @bookpages, 0;
set @slimes, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/048-2/traveler.txt b/world/map/npc/048-2/traveler.txt
index 7b654d85..9f323eac 100644
--- a/world/map/npc/048-2/traveler.txt
+++ b/world/map/npc/048-2/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@blue_sage_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/055-1/flowerpentagram4.txt b/world/map/npc/055-1/flowerpentagram4.txt
index 1fdd64cf..cc2d5191 100644
--- a/world/map/npc/055-1/flowerpentagram4.txt
+++ b/world/map/npc/055-1/flowerpentagram4.txt
@@ -122,4 +122,8 @@ L_PlacedFifthFlower:
L_Close:
set @localMonsterCount, 0;
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/055-1/traveler.txt b/world/map/npc/055-1/traveler.txt
index 1f36de77..233671bf 100644
--- a/world/map/npc/055-1/traveler.txt
+++ b/world/map/npc/055-1/traveler.txt
@@ -8,4 +8,8 @@
set @NpcTravelBit, $@hurns_farms_bit;
callfunc "Traveler";
end;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/056-2/barrier.txt b/world/map/npc/056-2/barrier.txt
index 956dc630..9552623f 100644
--- a/world/map/npc/056-2/barrier.txt
+++ b/world/map/npc/056-2/barrier.txt
@@ -14,5 +14,4 @@ L_Block:
L_Weak:
message strcharinfo(0), "I can't enter because this magic field is too strong. Maybe I should train some more....";
end;
-
}
diff --git a/world/map/npc/056-2/mirak.txt b/world/map/npc/056-2/mirak.txt
index e1a37347..8719e4b4 100644
--- a/world/map/npc/056-2/mirak.txt
+++ b/world/map/npc/056-2/mirak.txt
@@ -149,4 +149,8 @@ S_Update_Mask:
(QUEST_Mirak & ~(@Mirak_MASK))
| (@talk << @Mirak_SHIFT);
return;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/058-1/griffen.txt b/world/map/npc/058-1/griffen.txt
index 4b81e9a6..8f794c55 100644
--- a/world/map/npc/058-1/griffen.txt
+++ b/world/map/npc/058-1/griffen.txt
@@ -42,4 +42,8 @@ L_Quest:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/058-2/griffen.txt b/world/map/npc/058-2/griffen.txt
index c6bce716..d2824dc8 100644
--- a/world/map/npc/058-2/griffen.txt
+++ b/world/map/npc/058-2/griffen.txt
@@ -40,4 +40,8 @@ L_Quest:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/069-2/wizard.txt b/world/map/npc/069-2/wizard.txt
index c94258ec..35c2926d 100644
--- a/world/map/npc/069-2/wizard.txt
+++ b/world/map/npc/069-2/wizard.txt
@@ -172,4 +172,8 @@ OnWarp:
L_Close:
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/099-1/main.txt b/world/map/npc/099-1/main.txt
index cbe03c7c..e428f865 100644
--- a/world/map/npc/099-1/main.txt
+++ b/world/map/npc/099-1/main.txt
@@ -86,5 +86,9 @@ L_Yes:
if (!$@DD5_STATUS)
donpcevent "#TMWFinalExam::OnWarn0";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
diff --git a/world/map/npc/099-2/logic.txt b/world/map/npc/099-2/logic.txt
index 29d7e96d..16f3fc3f 100644
--- a/world/map/npc/099-2/logic.txt
+++ b/world/map/npc/099-2/logic.txt
@@ -318,10 +318,14 @@ L_UseLens:
mes "Rest in Peace. Damnatio memoriae. Effective immediately.";
// ;-- TRANSLATORS: Damnatio memoriae - "condemnation of memory", indicating that a person is to be excluded from official accounts. History rewrite if required.
next;
- //mes "The lens break! They were not only poorly effective but also of bad quality.";
+ //mes "The lens breaks! It was not only poorly effective, but also of bad quality.";
mes "If only we could make the real Lens, we would have been able to find out";
- mes "what is up with this ominous, eerie feeling this picture gives.";
+ mes "What is up with this ominous, eerie feeling this picture gives?";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
099-1,35,22,0|script|Fireplace#099-1|400
@@ -392,6 +396,10 @@ L_UseLens:
mes "There is also a spell here: \"##B#storage##b\".";
mes "I assume it only works at specific times.";
close;
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
099-3,39,46,0|script|Outstanding Book#099-3|400
@@ -429,20 +437,19 @@ L_UseLens:
goto L_Potion;
L_Shock:
- mes "Some was trying to make Shock Sweets here.";
- mes "However, it doesn't seems to have been finished.";
+ mes "Someone was trying to make Shock Sweets here.";
+ mes "However, they don't seem to be finished.";
next;
- mes "There are the initials \"To stop F.F.\" nearby.";
+ mes "An inscription reads, \"To stop F.F.\", nearby.";
mes "One can only wonder who or what F.F. is.";
close;
L_Potion:
- mes "Some was trying to make a Mana Potion here.";
- mes "However, it doesn't seems to have been finished.";
+ mes "Someone was trying to make a Mana Potion here.";
+ mes "However, it doesn't seem to have been finished.";
next;
- mes "There are the initials \"To stop Bob\" nearby.";
- mes "Well, I assume it is \"Bob\", text is fainted.";
- mes "it could be \"boo\" as well. Maybe from Mouboo?";
+ mes "An inscription reads, \"To stop Bob\", nearby.";
+ mes "Well, I assume it is \"Bob\". The text is faded.";
+ mes "It could be \"boo\", as well. Maybe from Mouboo?";
close;
}
-
diff --git a/world/map/npc/099-5/boss.txt b/world/map/npc/099-5/boss.txt
index 1ab584fd..3ef8b66b 100644
--- a/world/map/npc/099-5/boss.txt
+++ b/world/map/npc/099-5/boss.txt
@@ -46,9 +46,9 @@
// bool
// $@DD5_DEFCON - Defensive mode of Zax De'Kagen
// 0 - Defenseless (#------- TRANSPARENT)
-// 1 - Invencible (except to shearing) (#CC79A7 PURPLE)
+// 1 - Invincible (except to shearing) (#CC79A7 PURPLE)
// 2 - All damage is halved (#E69F00 ORANGE)
-// 3 - Immune to potion'ed attackers (#D55E00 BROWN)
+// 3 - Immune to potioned attackers (#D55E00 BROWN)
// 4 - Vulnerable only when wet (#56B4E9 CYAN)
// 5 - Vulnerable only to melee (#999999 GRAY)
// 6 - Vulnerable to Bone Knife/Bone Arrow (#FFFFFF WHITE)
@@ -1302,6 +1302,7 @@ L_Return:
end;
OnInit:
disablenpc strnpcinfo(0);
+ set .IS_MAGIC, 1;
end;
}
@@ -1312,6 +1313,7 @@ OnInit:
end;
OnInit:
disablenpc strnpcinfo(0);
+ set .IS_MAGIC, 1;
end;
}
@@ -1322,6 +1324,7 @@ OnInit:
end;
OnInit:
disablenpc strnpcinfo(0);
+ set .IS_MAGIC, 1;
end;
}
@@ -1332,6 +1335,7 @@ OnInit:
end;
OnInit:
disablenpc strnpcinfo(0);
+ set .IS_MAGIC, 1;
end;
}
@@ -1525,6 +1529,7 @@ L_TooEarly:
OnInit:
disablenpc "Gema III";
+ set .IS_MAGIC, 1;
end;
}
/////////////////////////////////////////////////////
@@ -1535,6 +1540,7 @@ OnInit:
end;
OnInit:
disablenpc "Xakelbael the Dark#0";
+ set .IS_MAGIC, 1;
end;
OnTimer50000:
@@ -1562,6 +1568,7 @@ OnDisable:
end;
OnInit:
disablenpc "Zax De'Kagen#0";
+ set .IS_MAGIC, 1;
end;
OnTimer18000:
diff --git a/world/map/npc/099-7/boss.txt b/world/map/npc/099-7/boss.txt
index 7d68bca8..b572c7cc 100644
--- a/world/map/npc/099-7/boss.txt
+++ b/world/map/npc/099-7/boss.txt
@@ -532,8 +532,8 @@ L_Off:
if (!#CRYPT_PASSWORD) end;
mes "There's an inscription on the gate.";
next;
- mes "\"The candle shall lit you, but if you mess up, a different light will show.";
- mes "Alas did you knew, that Razha came before Krukan?\"";
+ mes "\"The candle should be lit, but if you mess up a different light will show.";
+ mes "Alas, did you know that Razha came before Krukan?\"";
close;
}
@@ -552,7 +552,7 @@ L_Off:
mes "There's an inscription on the gate.";
next;
mes "\"The master's candlesticks are like the fingers of his hand.";
- mes "And if it is not to kill, they will never move.\"";
+ mes "And if they are not to kill, they will never move.\"";
close;
}
@@ -563,9 +563,9 @@ L_Off:
next;
mes "\"##B"+get(.invocation$, "reapercry")+"##b\"";
next;
- mes "##9You hear the sounds of battle. Candle lights shines in distance.";
+ mes "##9You hear the sounds of battle. Candle light shines in the distance.";
next;
- mes "##9However, when you turn towards the source - both the light as the sound have already stopped.";
+ mes "##9However, when you turn towards the source, the light, as the sound, have already stopped.";
next;
mes "##9Is this a clue of some sort?";
close;
@@ -581,7 +581,7 @@ L_Off:
mes "Thanks to the lens on your inventory, you can read this:";
mes "";
mes "\"Nu'rem perished here, after the fight with Jande, Tal and Di'Tal.";
- mes "For this very reason, this land is plagued forever. We shall give Nu'Rem a proper burrial.\"";
+ mes "For this very reason, this land is plagued forever. We shall give Nu'Rem a proper burial.\"";
next;
mes "-- The Sparron";
close;
@@ -590,7 +590,7 @@ L_Tools:
mes "It is too faint to read without some good lens, but you can make the following words out of the engraving:";
next;
mes "\"Nu'rem .... here .... fight .... Jande ....";
- mes ".... land .... plagued forever. .... Nu'Rem .... proper burrial.\"";
+ mes ".... land .... plagued forever. .... Nu'Rem .... proper burial.\"";
next;
mes "-- The ....";
close;
@@ -694,8 +694,8 @@ L_FlawedLens:
L_Rare:
getexp 15000000, 0;
set KESHLAM_STATE, KESHLAM_STATE | FLAG_KESHLAM_RAREDROP;
- if (rand(4) == 1) goto L_Amulet; // 25% chance
- goto L_Ring; // 75% chance
+ if (rand(3) == 1) goto L_Amulet; // 33.33% chance
+ goto L_Ring; // 66.66% chance
L_Amulet:
getitem "EnchantersAmulet", 1;
@@ -704,9 +704,9 @@ L_Amulet:
close;
L_Ring:
- getitem "MageRing", 1;
+ getitem "MagicRing", 1;
mes "[Chest]";
- mes "You opened it and found...! A Mage Ring! Lucky!";
+ mes "You opened it and found...! A Magic Ring! Lucky!";
close;
L_Not_Enough:
@@ -786,4 +786,3 @@ L_No:
warp "099-7", 92, 36;
end;
}
-
diff --git a/world/map/npc/099-7/chronos.txt b/world/map/npc/099-7/chronos.txt
index c0e0c9e8..a2623aeb 100644
--- a/world/map/npc/099-7/chronos.txt
+++ b/world/map/npc/099-7/chronos.txt
@@ -293,12 +293,12 @@ OnInit:
"Carbon Gas Mask", "Groovy Hat", "Jazzy Hat", "Anniversary Hat", "Chic Santa Hat", "Reading Glasses", "Eggshell Hat", "Smoking Pipe", "Scarab Armlet",
"Mask of Blinking Evil (Green)", "Mask of Blinking Evil (Red)", "Mask of Blinking Evil (Blue)", "Mask of Blinking Evil (Pink)", "Mask of Blinking Evil (Yellow)", "Mask of Blinking Hocus", "Golden Platemail", "Earmuffs";
- setarray $@chronos_3_medal$, "BlinkingEvilHalloween", "MoonshroomHat", "WhiteEvokersRobeBlue", "BlackEvokersRobeBlue", "ApprenticeRobe", "GoldenWarlordPlate", "MageRing";
+ setarray $@chronos_3_medal$, "BlinkingEvilHalloween", "MoonshroomHat", "WhiteEvokersRobeBlue", "BlackEvokersRobeBlue", "ApprenticeRobe", "GoldenWarlordPlate", "MagicRing";
setarray $@chronos_3_medal_n$, "Mask of Blinking Evil (Orange)", "Moonshroom Hat", "White Evoker's Robe (Blue)", "Black Evoker's Robe (Blue)", "Apprentice Robe", "Golden Warlord Plate", "Magic Ring";
- setarray $@chronos_4_medal$, "OverlordsHelmet", "DarkTalisman", "Aureole", "PaladinsHelmet", "EnchantersAmulet",
+ setarray $@chronos_4_medal$, "OverlordsHelmet", "DarkTalisman", "Aureole", "PaladinsHelmet", "EnchantersAmulet", "DragonShield",
"HeartOfIsis", "BansheeBow", "BullHelmet", "AssassinShirt", "LazuriteRobe", "DarkHelm", "UnderworldMask", "Phylactery";
- setarray $@chronos_4_medal_n$, "Overlord's Helmet", "Dark Talisman", "Prsm Aura", "Paladin's Helmet", "Enchanter's Amulet",
+ setarray $@chronos_4_medal_n$, "Overlord's Helmet", "Dark Talisman", "Prsm Aura", "Paladin's Helmet", "Enchanter's Amulet", "Dragon Shield",
"Heart of Isis", "Banshee Bow", "Bull Helmet", "Assassin Shirt", "Lazurite Robe", "Dark Helm", "Underworld Mask", "Phylactery";
end;
}
diff --git a/world/map/npc/099-8/mobs.txt b/world/map/npc/099-8/mobs.txt
index b46efc08..c7c998a3 100644
--- a/world/map/npc/099-8/mobs.txt
+++ b/world/map/npc/099-8/mobs.txt
@@ -163,7 +163,7 @@ OnBoss:
next;
mes "##9The controls seems to have been destroyed!";
mes "##9The panel says the situtation is critical.";
- mes "##9Why the final defensive measures didn't engage?";
+ mes "##9Why didn't the final defensive measures engage?";
next;
mes "What's happening?";
close;
@@ -211,7 +211,7 @@ OnBoss:
mes "##9The controls seems to have been destroyed!";
mes "##9I wonder where these three rooms are.";
mes "##9What sort of research was being conducted?";
- mes "##9What is a Crystal Room? I don't saw any passage.";
+ mes "##9What is a Crystal Room? I didn't see any passage.";
next;
mes "What's happening?";
close;
@@ -234,4 +234,3 @@ OnBoss:
mes "What's happening?";
close;
}
-
diff --git a/world/map/npc/annuals/2022.txt b/world/map/npc/annuals/2022.txt
index 4752b137..d5595d48 100644
--- a/world/map/npc/annuals/2022.txt
+++ b/world/map/npc/annuals/2022.txt
@@ -88,6 +88,3 @@ OnInit:
registercmd "#crcend", strnpcinfo(0)+"::OnEndEv";
end;
}
-
-
-
diff --git a/world/map/npc/annuals/xmas/2020.txt b/world/map/npc/annuals/xmas/2020.txt
index 0490d1a7..dc7a66d8 100644
--- a/world/map/npc/annuals/xmas/2020.txt
+++ b/world/map/npc/annuals/xmas/2020.txt
@@ -402,6 +402,10 @@ OnClock2124:
OnClock0024:
goto OnClock2359;
*/
+
+OnInit:
+ set .IS_MAGIC, 1;
+ end;
}
@@ -832,4 +836,3 @@ OnNearbyNpc:
set @nearby, @nearby + 1;
end;
}
-
diff --git a/world/map/npc/commands/destroynpc.txt b/world/map/npc/commands/destroynpc.txt
index 1ebede9e..552f9693 100644
--- a/world/map/npc/commands/destroynpc.txt
+++ b/world/map/npc/commands/destroynpc.txt
@@ -22,7 +22,7 @@ L_Confirm:
end;
L_Failed:
- message strcharinfo(0), "destroynpc : Impossible to find the target npc. Did you try putting the name in \"quotation marks\"? Some npcs also have an invisible postfix in their name, ie `#_M`.";
+ message strcharinfo(0), "destroynpc : Impossible to find the target npc. Did you try putting the name in \"quotation marks\"? Some npcs also have an invisible postfix in their name, ie `#barrier`.";
end;
L_GM:
diff --git a/world/map/npc/commands/hug.txt b/world/map/npc/commands/hug.txt
index f97c81e4..af8bd6e1 100644
--- a/world/map/npc/commands/hug.txt
+++ b/world/map/npc/commands/hug.txt
@@ -18,8 +18,9 @@
close;
OnInit:
- set .tree_id, getnpcid("#DruidTree0#_M");
+ set .tree_id, getnpcid("#DruidTree0");
registercmd "*hugs", strnpcinfo(0); // eq: /me hugs (target)
registercmd "*hugs*", strnpcinfo(0); // eq: /me hugs
+ set .IS_MAGIC, 1;
end;
}
diff --git a/world/map/npc/functions/doomsday.txt b/world/map/npc/functions/doomsday.txt
index bba08e75..2be517c3 100644
--- a/world/map/npc/functions/doomsday.txt
+++ b/world/map/npc/functions/doomsday.txt
@@ -979,7 +979,3 @@ OnDeathAct4:
end;
}
-
-
-
-
diff --git a/world/map/npc/items/magicring_item.txt b/world/map/npc/items/magicring_item.txt
new file mode 100644
index 00000000..2c2eb7aa
--- /dev/null
+++ b/world/map/npc/items/magicring_item.txt
@@ -0,0 +1,27 @@
+// Variables passed to this script:
+// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
+
+function|script|MagicRingItem
+{
+
+ set @debug_mask, 65535;
+ set @debug_shift, 0;
+ set @mexp, ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift);
+
+ set @magicring_mexp_needed, 5404;
+
+ if ( @mexp >= @magicring_mexp_needed )
+ goto L_Return;
+
+ message strcharinfo(0), "You are not expirienced enough to use the Magic Ring.";
+
+ // This is for debug
+ if (debug)
+ goto L_Return;
+
+ callfunc "UnequipLater";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/magic/level1-detect-magic.txt b/world/map/npc/magic/level1-detect-magic.txt
index 33597d02..420b457c 100644
--- a/world/map/npc/magic/level1-detect-magic.txt
+++ b/world/map/npc/magic/level1-detect-magic.txt
@@ -12,6 +12,9 @@
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_DETECT_CAST, strcharinfo(0);
set .@range, (@spellpower/50)+1;
+ set .caster, getcharid(3);
+ foreach 0, getmap(), POS_X - .@range, POS_Y - .@range, POS_X + .@range, POS_Y + .@range,
+ strnpcinfo(0) + "::OnNearbyPlayer";
foreach 1, getmap(), POS_X - .@range, POS_Y - .@range, POS_X + .@range, POS_Y + .@range,
strnpcinfo(0) + "::OnNearbyNpc";
if (getmap() == "099-4")
@@ -21,9 +24,17 @@
callfunc "magic_exp";
end;
+OnNearbyPlayer:
+ if (@target_id == BL_ID) end; // Dont do lookups on caster.
+ if (sc_check(SC_HIDE, @target_id)) end; // Also skip hidden (anwiltyp) players.
+ if (attachrid(@target_id) < 1) end; // Switch context -> found player (to look up focused skills)
+ if (call("is_magician")) misceffect FX_MAGIC_DETECT_HIT, BL_ID; // BL_ID because now attached to target
+ if (attachrid(.caster) < 1) end; // Try to reattach back -> caster (is it needed?)
+ end;
+
OnNearbyNpc:
set .@e$, strnpcinfo(2,@target_id);
- if(.@e$ == "#_M" || .@e$ == "#MAGIC" || get(.IS_MAGIC, @target_id))
+ if(.@e$ == "#_M" || .@e$ == "#MAGIC" || get(.IS_MAGIC, @target_id)) //#_M and #MAGIC can be used for problematic situations, like shops
misceffect FX_MAGIC_DETECT_HIT, @target_id;
end;
@@ -35,3 +46,23 @@ OnInit:
set .exp_gain, 0;
end;
}
+
+// This function tests if current RID is a magician (Astral soul skill Lv 9).
+function|script|is_magician
+{
+ getactivatedpoolskilllist;
+ if (@skilllist_count != 0) goto L_iterate_focused; // Had some focused skills -> look further
+ goto L_focus_notfound; // No focused skills at all -> bail out.
+
+L_iterate_focused:
+ set @skilllist_count, @skilllist_count-1;
+ if ((@skilllist_id[@skilllist_count] == SKILL_ASTRAL_SOUL) && (getskilllv(SKILL_ASTRAL_SOUL) >= 2)) goto L_focus_found;
+ if (@skilllist_count == 0) goto L_focus_notfound;
+ goto L_iterate_focused; // iterate via array of focused skills.
+
+L_focus_found:
+ return 1;
+
+L_focus_notfound:
+ return 0;
+}
diff --git a/world/map/npc/magic/level2-make-bones.txt b/world/map/npc/magic/level2-make-bones.txt
index bc9bc6e5..b84cae6c 100644
--- a/world/map/npc/magic/level2-make-bones.txt
+++ b/world/map/npc/magic/level2-make-bones.txt
@@ -25,7 +25,7 @@ L_Resume:
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_ARROW_CAST, strcharinfo(0);
- setarray @create_params[0], (@spellpower/32)+1+(rand(max(1,(800-@spellpower)))/80), 500;
+ setarray @create_params[0], (@spellpower/6)+1+(rand(max(1,(800-@spellpower)))/80), 500;
setarray @create_items$[0], "BoneArrows", "IronArrow";
callfunc "magic_create_item";
callfunc "magic_exp";
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index 7abc9a1a..87d010f8 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -1,5 +1,6 @@
-|script|protect|32767
{
+ if (sc_check(SC_PHYS_SHIELD_ITEM)) goto L_Itsanc; // itsanc has top priority and cant be overwritten by betsanc
if(call("magic_checks")) end;
if (Sp < 14) end;
set .@level, getskilllv(.school);
@@ -44,6 +45,10 @@ OnEnd:
misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0);
end;
+L_Itsanc:
+ message strcharinfo(0), "Shield : You are still itsanced, This blocks your spell.";
+ end;
+
L_SpecialRules6:
if ($@KIMARR_EVENT < 1) goto L_Pay;
if (@target_id == BL_ID) goto L_Pay;
diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt
index 6a7f288b..291af009 100644
--- a/world/map/npc/magic/level2-rain.txt
+++ b/world/map/npc/magic/level2-rain.txt
@@ -102,9 +102,18 @@ OnHit:
if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing
if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map
if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end;
- if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc
+ if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc
if(get(ELTTYPE, @target_id) == ELT_FIRE)
injure .caster, @target_id, ((rand((@spellpower/15)+5)+2) * (100 - get(MDEF1, @target_id))) / 100;
+ if ($NO_RAIN_SPAWNS) end; // server-wide killswitch for rain pranks if spawns logic would backfire.
+ if (mobcount(getmap(), "rain::OnRainSpawnDeath") > 30) end; // Abort if too crowded.
+ if(get(Class, @target_id) == EntAbomination) // Rain hit Ent? This scores little perk!
+ monster getmap(), getnpcx(), getnpcy(), "", LogHead, 1+rand(1+(.max/150)), "rain::OnRainSpawnDeath";
+ if((get(Class, @target_id) == LogHead) && (rand(5) == 3)) // Rain hit LogHead? Little perk as well (plants)
+ monster getmap(), getnpcx(), getnpcy(), "", MauvePlant+rand(5), 1, "rain::OnRainSpawnDeath";
+ end;
+
+OnRainSpawnDeath:
end;
OnDestroy:
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index b0a5f0c2..448e0947 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -59,6 +59,7 @@ npc: npc/items/drugs.txt
npc: npc/items/max_stat.txt
npc: npc/items/nobow_item.txt
npc: npc/items/love_potion.txt
+npc: npc/items/magicring_item.txt
npc: npc/items/manapearl_item.txt
npc: npc/items/underworld_troll.txt
npc: npc/items/silver_bell.txt