summaryrefslogtreecommitdiff
path: root/world/map/conf
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/conf')
-rw-r--r--world/map/conf/magic-level1.sex2
-rw-r--r--world/map/conf/magic-procedures.sex21
2 files changed, 22 insertions, 1 deletions
diff --git a/world/map/conf/magic-level1.sex b/world/map/conf/magic-level1.sex
index 88478c82..3e673170 100644
--- a/world/map/conf/magic-level1.sex
+++ b/world/map/conf/magic-level1.sex
@@ -19,7 +19,7 @@
(/ spellpower 10))
1200
3
- 33)
+ (script_int caster "@WandID"))
(CALL gain_xp 1 3)
(ATTRIGGER
(CALL attack_check target)
diff --git a/world/map/conf/magic-procedures.sex b/world/map/conf/magic-procedures.sex
index 2a8258cb..6f9c3246 100644
--- a/world/map/conf/magic-procedures.sex
+++ b/world/map/conf/magic-procedures.sex
@@ -335,3 +335,24 @@
(BLOCK "1 is Tulimshar, 9 is Hurnscald and 20 is Nivalis"
(message caster "A powerful magic drains your spell just as it is beginning to take shape!")
(ABORT))))
+
+(PROCEDURE script_split_str (d str v m)
+ (FOR a 0 m
+ (BLOCK
+ (IF (< (strlen str) 1) (BREAK))
+ (SET arglen (strlen str))
+ (SET argoffset
+ (if_then_else
+ (contains_string str d)
+ (strstr str d)
+ arglen))
+ (SET arg
+ (if_then_else (== arglen argoffset)
+ str
+ (substr str 0 argoffset)))
+ (set_script_str caster (+ (+ "@" v) (+ a "$")) arg)
+ (SET str
+ (if_then_else
+ (> arglen (- argoffset 1))
+ (substr str (+ argoffset 1) arglen)
+ "")))))