summaryrefslogtreecommitdiff
path: root/world/map/npc/items
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/items')
-rw-r--r--world/map/npc/items/manapearl_item.txt29
1 files changed, 29 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;
+}