From ef482f992da69694409e38eef45c02a741d12014 Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Wed, 14 Apr 2021 04:31:23 +0200 Subject: Assassin set and Mana Pearl item db and function (#580) Add a few new items for brawling --- world/map/npc/items/manapearl_item.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 world/map/npc/items/manapearl_item.txt (limited to 'world/map/npc/items') 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; +} -- cgit v1.2.3-70-g09d2