summaryrefslogtreecommitdiff
path: root/npc/magic
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-14 03:10:20 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-14 03:10:20 -0300
commited52033f5630be649cf0b0c3e4bd4e618011b54e (patch)
treeb451becca03b8fd35fb68dcbda84987cbf9035a1 /npc/magic
parentd19385d0fc05d3649bfb74df584d0dd676620da0 (diff)
downloadserverdata-ed52033f5630be649cf0b0c3e4bd4e618011b54e.tar.gz
serverdata-ed52033f5630be649cf0b0c3e4bd4e618011b54e.tar.bz2
serverdata-ed52033f5630be649cf0b0c3e4bd4e618011b54e.tar.xz
serverdata-ed52033f5630be649cf0b0c3e4bd4e618011b54e.zip
Better ordering
Diffstat (limited to 'npc/magic')
-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