summaryrefslogtreecommitdiff
path: root/npc/magic
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-12-24 07:14:20 -0300
committerJesusaves <cpntb1@ymail.com>2021-12-24 07:14:20 -0300
commite90014e862ca97244f73c5c3ebbfa3b9c8373de4 (patch)
tree839c4260f65939be92ed83fcb46b93e607b7b2aa /npc/magic
parente6494d1ef2fd3e34f4c71a03a5ad9b7802c5b461 (diff)
downloadserverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.tar.gz
serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.tar.bz2
serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.tar.xz
serverdata-e90014e862ca97244f73c5c3ebbfa3b9c8373de4.zip
Add summoning scrolls (untested)
Diffstat (limited to 'npc/magic')
-rw-r--r--npc/magic/scrolls.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/npc/magic/scrolls.txt b/npc/magic/scrolls.txt
new file mode 100644
index 000000000..39672db54
--- /dev/null
+++ b/npc/magic/scrolls.txt
@@ -0,0 +1,36 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Scroll System
+
+// SummonScroll(mob, life, {mob2, minlv})
+function script SummonScroll {
+ .@mob = getarg(0);
+ .@tim = getarg(1, 60);
+ .@mbb = getarg(2, 0);
+ .@blv = getarg(3, 0);
+
+ // Depending on alignment status, invoke superior form
+ if (alignment_cansummon() && BaseLevel > .@blv && .@mbb) {
+ .@mids = summon("Summoned Monster", .@mbb, .@tim);
+ } else {
+ .@mids = summon("Summoned Monster", .@mob, .@tim);
+ }
+
+ // Reconfigure monster modes
+ .@opt=getunitdata(.@mids, UDT_MODE);
+ // Disable looting
+ if (.@opt & MD_LOOTER)
+ .@opt=.@opt^MD_LOOTER;
+ // All summons can suffer knockback
+ if (.@opt & MD_NOKNOCKBACK)
+ .@opt=.@opt^MD_NOKNOCKBACK;
+ // Strip summons from BOSS mode and immunity
+ if (.@opt & MD_BOSS)
+ .@opt=.@opt^MD_BOSS;
+ // Save new options
+ setunitdata(.@mids, UDT_MODE, .@opt);
+ return;
+}
+