summaryrefslogtreecommitdiff
path: root/npc/magic/parum.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-13 23:01:44 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-13 23:01:44 -0300
commit4e279bcf145eac9ebf49b95a702a1fc62680a10a (patch)
treefb085715c09413446aab0a08e05e476a5503b2b2 /npc/magic/parum.txt
parentbcbf02427b21c6d3fb35fb9bb91a3660e4cef5f5 (diff)
downloadserverdata-4e279bcf145eac9ebf49b95a702a1fc62680a10a.tar.gz
serverdata-4e279bcf145eac9ebf49b95a702a1fc62680a10a.tar.bz2
serverdata-4e279bcf145eac9ebf49b95a702a1fc62680a10a.tar.xz
serverdata-4e279bcf145eac9ebf49b95a702a1fc62680a10a.zip
Introduce #parum and the Magic Experience System.
If you re-cast something, no Mana Exp Points are gained. Only pseudo-magic skills count.
Diffstat (limited to 'npc/magic/parum.txt')
-rw-r--r--npc/magic/parum.txt69
1 files changed, 69 insertions, 0 deletions
diff --git a/npc/magic/parum.txt b/npc/magic/parum.txt
new file mode 100644
index 000000000..951a71699
--- /dev/null
+++ b/npc/magic/parum.txt
@@ -0,0 +1,69 @@
+// TMW2 script
+// Author: Jesusalva <admin@tmw2.org>
+//
+// Magic Script: TMW2_PARUM
+//
+// Attempts to transmutate Raw Logs.
+// May create arrows, Mouboo Figurines, Warped Logs.
+// With enough ManaExp may create WoodenLog.
+// Is not powerful enough to create overly complex stuff like Wooden Sword, Wooden Shield or Wooden Bow
+// Final item is random
+
+- script sk#parum 32767,{
+ end;
+
+/*
+OnFriendlyDeath:
+ emote 4;
+ end;
+*/
+
+OnCall:
+ // Other requeriments
+ if (countitem(RawLog) < 1) {
+ dispbottom l("You need @@ to cast this skill.", getitemlink(RawLog));
+ end;
+ }
+
+ // Check cooldown
+ /* TODO */
+ // This will only vanish upon logout =/
+ if (@parum_at > gettimetick(2)) {
+ dispbottom l("Skill is in cooldown.");
+ end;
+ }
+
+ // Check requisites
+ if (!MagicCheck(TMW2_PARUM, 50))
+ end;
+
+ // Create the stuff based on MAGIC_EXP
+ .@r=rand(1,41);
+ if (.@r < 42-(MAGIC_EXP/2)) {
+ getitem WarpedLog, 1;
+ } else {
+ if (.@r > 30)
+ getitem MoubooFigurine, 1;
+ else if (.@r > 20 && MAGIC_EXP > 82)
+ getitem WoodenLog, 1;
+ else
+ getitem Arrow, .@r;
+ }
+ // I know, the code is not very sane. A number from 0 to 40 is cast.
+ // You will get lots of useless Warped Logs until you have 82 MExp.
+ // If you do not get a Warped Log, you have 25% chances of getting the
+ // Mouboo figurine. The other will be arrows, unless you hit the 82 MExp value
+ // which will add 25% chances to get a Wooden Log too. These values are estimate.
+
+
+ // Get a few mana experience points (this is NOT used by Soul Menhir)
+ GetManaExp(TMW2_PARUM, rand(1,3));
+
+ // set cooldown
+ @parum_at=gettimetick(2)+4;
+ end;
+
+OnInit:
+ bindatcmd "sk-parum", "sk#parum::OnCall", 0, 100, 0;
+ end;
+}