summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-11-29 14:21:20 -0700
committerFate <fate-tmw@googlemail.com>2008-11-29 14:21:20 -0700
commit3ba5d56d872bf0a6afe2ef612ab74ffdc0eae2f7 (patch)
tree98a7d3cbfed5bd5bf1adf2f362704461c5de8f69 /npc/functions
parent9d118e3451f59035cc575c99fd7fff40139baa68 (diff)
downloadserverdata-3ba5d56d872bf0a6afe2ef612ab74ffdc0eae2f7.tar.gz
serverdata-3ba5d56d872bf0a6afe2ef612ab74ffdc0eae2f7.tar.bz2
serverdata-3ba5d56d872bf0a6afe2ef612ab74ffdc0eae2f7.tar.xz
serverdata-3ba5d56d872bf0a6afe2ef612ab74ffdc0eae2f7.zip
Added mana seed NPC
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/magic.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/npc/functions/magic.txt b/npc/functions/magic.txt
new file mode 100644
index 00000000..9cce48c2
--- /dev/null
+++ b/npc/functions/magic.txt
@@ -0,0 +1,19 @@
+// Basic magic functionality
+
+// Magic system uses:
+// - MAGIC_EXP (magic experience points, gained for spellcasting)
+// - MAGIC_FLAGS
+
+// ------------------------------------------------------------
+// Gain initial magic skill
+// ------------------------------------------------------------
+function script MagicGainBasic {
+
+ set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DRANK_POTION;
+ close;
+
+}
+
+function script MagicGainExp {
+ set MAGIC_EXP, MAGIC_EXP + (@value * @value);
+}