summaryrefslogtreecommitdiff
path: root/npc/config/magic.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-26 01:44:26 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-26 01:44:26 -0300
commitb9d13e8d1d9a675c84b1422152a320f56233352c (patch)
treec2df5b7fe4398ede62427bde787a9eb2ff91ce1c /npc/config/magic.txt
parent7dde5a1b2b8338dfea84ef5d4671f3bf7927fd75 (diff)
downloadserverdata-b9d13e8d1d9a675c84b1422152a320f56233352c.tar.gz
serverdata-b9d13e8d1d9a675c84b1422152a320f56233352c.tar.bz2
serverdata-b9d13e8d1d9a675c84b1422152a320f56233352c.tar.xz
serverdata-b9d13e8d1d9a675c84b1422152a320f56233352c.zip
Summoning when blacklisted will, for the first time, cause nature to fight you
Later attempts will silently fail.
Diffstat (limited to 'npc/config/magic.txt')
-rw-r--r--npc/config/magic.txt17
1 files changed, 16 insertions, 1 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 81c23de5f..675f36e42 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -185,6 +185,21 @@ function script ShowAbizit {
}
+// alignment_cansummon()
+function script alignment_cansummon {
+ if (alignment() < 0 && !isequippedcnt(AegisShield)) {
+ if (!@hatesummon) {
+ dispbottom l("Nature itself express hate against you!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@opo=monster(.@m$, .@x, .@y, "Failed summon", .@mob, 1);
+ unitattack(.@opo, getcharid(3));
+ @hatesummon=true;
+ }
+ return false;
+ }
+ return true;
+}
+
// SK_summon(ID, amount, mexp)
function script SK_summon {
.@mob=getarg(0);
@@ -193,7 +208,7 @@ function script SK_summon {
if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
// Blocked from summoning magic
- if (alignment() < 0 && !isequippedcnt(AegisShield))
+ if (!alignment_cansummon())
return;
if (rand2(5) < abizit()) {