summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-22 16:18:58 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-22 16:18:58 -0300
commita2a0047ddbe74db5b846d5da2471d3fe559bb246 (patch)
treeebd00185631681fb6a85d462f62a866be082d99c /npc
parent93d9e1bc1e9f2f19bbd227a90d9a614cc36db0da (diff)
downloadserverdata-a2a0047ddbe74db5b846d5da2471d3fe559bb246.tar.gz
serverdata-a2a0047ddbe74db5b846d5da2471d3fe559bb246.tar.bz2
serverdata-a2a0047ddbe74db5b846d5da2471d3fe559bb246.tar.xz
serverdata-a2a0047ddbe74db5b846d5da2471d3fe559bb246.zip
mescordialog (magic function) - Returns mesc() or dispbottom() for abizit()
Diffstat (limited to 'npc')
-rw-r--r--npc/config/magic.txt28
1 files changed, 20 insertions, 8 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index f0e9f09a0..5d4df94bd 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -76,23 +76,35 @@ function script SummonMagic {
return;
}
-// abizit()
+// mescordialog(text, color, {dialog=1})
+function script mescordialog {
+ if (getarg(2, true))
+ mesc getarg(0), getarg(1);
+ else
+ dispbottom col(getarg(0), getarg(1));
+ return;
+}
+
+// abizit({dialog=1})
function script abizit {
- mesn l("Current Magic Control");
+ .@dial=getarg(0, true);
+ if (.@dial)
+ mesn l("Current Magic Control");
+
.@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5);
.@base=(MAGIC_LVL**3);
if (.@val > .@base*5)
- mesc l("You are perfectly in control of your magic."), 3;
+ mescordialog l("You are perfectly in control of your magic."), 3, .@dial;
else if (.@val > .@base*4)
- mesc l("You are mostly in control of your magic."), 2;
+ mescordialog l("You are mostly in control of your magic."), 2, .@dial;
else if (.@val > .@base*3)
- mesc l("You are somewhat in control of your magic."), 4;
+ mescordialog l("You are somewhat in control of your magic."), 4, .@dial;
else if (.@val > .@base*2)
- mesc l("Your magic is more powerful than you, but you can control."), 7;
+ mescordialog l("Your magic is more powerful than you, but you can control."), 7, .@dial;
else if (.@val > .@base)
- mesc l("You still are overwhelmed by your magic."), 6;
+ mescordialog l("You still are overwhelmed by your magic."), 6, .@dial;
else
- mesc l("You are completly overwhelmed by your magic."), 1;
+ mescordialog l("You are completly overwhelmed by your magic."), 1, .@dial;
return;
}