summaryrefslogtreecommitdiff
path: root/npc/magic/config.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/magic/config.txt')
-rw-r--r--npc/magic/config.txt62
1 files changed, 31 insertions, 31 deletions
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index 85693d64..89f9dd25 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -149,6 +149,37 @@ function script SummonMagic {
return;
}
+
+// SK_summon(ID, amount, mexp{, summon=True})
+function script SK_summon {
+ .@mob=getarg(0);
+ .@amt=getarg(1);
+ .@mex=getarg(2, 1);
+ .@sum=getarg(3, true);
+ if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
+
+ if (rand2(10) < abizit()) {
+ // Summon Magic (with magic level bonus)
+ SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+@skillLv-1, @skillLv, .@sum);
+ } else if (rand2(10) < abizit()) {
+ // Re-roll
+ dispbottom l("You cannot complete the casting correctly!");
+ SummonMagic(@skillId, .@mob, 1, 1, 1, .@sum);
+ } else if (abizit() <= rand2(3)) {
+ // Spell overwhelms you, causing it to be spawned as aggro vs you. (33%)
+ dispbottom l("The spell takes a mind of its own backfires!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@opo=monster(.@m$, .@x, .@y, "Failed summon", .@mob, 1);
+ unitattack(.@opo, getcharid(3));
+ } else {
+ dispbottom l("The spell fails!");
+ }
+
+ // Get a single mana experience point (FIXME)
+ GetManaExp(@skillId, .@mex);
+ return;
+}
+
// areaharm(target, range, DMG, {type, element, filter, bl})
// Defaults to HARM_MISC, Ele_Neutral, filter filter_hostile and all BLs
// Valid BL: BL_MOB | BL_PC | BL_HOM | BL_MER
@@ -204,37 +235,6 @@ function script rectharm {
return;
}
-
-// SK_summon(ID, amount, mexp{, summon=True})
-function script SK_summon {
- .@mob=getarg(0);
- .@amt=getarg(1);
- .@mex=getarg(2, 1);
- .@sum=getarg(3, true);
- if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
-
- if (rand2(10) < abizit()) {
- // Summon Magic (with magic level bonus)
- SummonMagic(@skillId, .@mob, .@amt, MAGIC_LVL+@skillLv-1, @skillLv, .@sum);
- } else if (rand2(10) < abizit()) {
- // Re-roll
- dispbottom l("You cannot complete the casting correctly!");
- SummonMagic(@skillId, .@mob, 1, 1, 1, .@sum);
- } else if (abizit() <= rand2(3)) {
- // Spell overwhelms you, causing it to be spawned as aggro vs you. (33%)
- dispbottom l("The spell takes a mind of its own backfires!");
- getmapxy(.@m$, .@x, .@y, 0);
- .@opo=monster(.@m$, .@x, .@y, "Failed summon", .@mob, 1);
- unitattack(.@opo, getcharid(3));
- } else {
- dispbottom l("The spell fails!");
- }
-
- // Get a single mana experience point (FIXME)
- GetManaExp(@skillId, .@mex);
- return;
-}
-
// areasc(range, time, sc, bl, value, filter, target, chances)
// Defaults to 3x3 square, sleep mob for 500ms. Ignores you.
// Centered on player attached, 100% success chance