summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authorHoraK-FDF <HoraK-FDF@web.de>2021-04-14 04:31:23 +0200
committerGitHub <noreply@github.com>2021-04-14 02:31:23 +0000
commitef482f992da69694409e38eef45c02a741d12014 (patch)
treedf19fde1e9248526e34bd29c7c307fe94b17e94c /world/map/npc
parentece96b02219466c873dede327fee0d668716e5dc (diff)
downloadserverdata-ef482f992da69694409e38eef45c02a741d12014.tar.gz
serverdata-ef482f992da69694409e38eef45c02a741d12014.tar.bz2
serverdata-ef482f992da69694409e38eef45c02a741d12014.tar.xz
serverdata-ef482f992da69694409e38eef45c02a741d12014.zip
Assassin set and Mana Pearl item db and function (#580)
Add a few new items for brawling
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/items/manapearl_item.txt29
-rw-r--r--world/map/npc/scripts.conf1
2 files changed, 30 insertions, 0 deletions
diff --git a/world/map/npc/items/manapearl_item.txt b/world/map/npc/items/manapearl_item.txt
new file mode 100644
index 00000000..9c1f1c04
--- /dev/null
+++ b/world/map/npc/items/manapearl_item.txt
@@ -0,0 +1,29 @@
+// The Mana Pearl can only be used when player has a natural mana flow:
+// "Magic flows naturally from you, readily and with ease. Your understanding of what you can currently control at present is flawless, far beyond your requirements to cast magic at this level.";
+// 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|ManaPearlItem
+{
+
+ set @debug_mask, 65535;
+ set @debug_shift, 0;
+ set @mexp, ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift);
+
+ set @manapearl_mexp_needed, 5404;
+
+ if ( @mexp >= @manapearl_mexp_needed )
+ goto L_Return;
+
+ message strcharinfo(0), "You are not expirienced enough to keep up the mana flow that is needed to stay in resonance with the Mana Pearl.";
+
+ // This is for debug
+ if (debug)
+ goto L_Return;
+
+ callfunc "UnequipLater";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index de85f8b4..114cc924 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -54,6 +54,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/manapearl_item.txt
import: npc/_import.txt
// magic