summaryrefslogtreecommitdiff
path: root/npc/magic/config.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-11 07:44:20 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-11 07:44:20 -0300
commite1275b296d4927554672a372ec53b933053cfa51 (patch)
tree0046d93488b6507180df51ad492c90564fde991f /npc/magic/config.txt
parent810316e16633122c4a25affbeeaa711652187ad7 (diff)
downloadserverdata-e1275b296d4927554672a372ec53b933053cfa51.tar.gz
serverdata-e1275b296d4927554672a372ec53b933053cfa51.tar.bz2
serverdata-e1275b296d4927554672a372ec53b933053cfa51.tar.xz
serverdata-e1275b296d4927554672a372ec53b933053cfa51.zip
Start working out on the focus skills
Diffstat (limited to 'npc/magic/config.txt')
-rw-r--r--npc/magic/config.txt111
1 files changed, 77 insertions, 34 deletions
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index 141c2dd3..608b2223 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -190,40 +190,6 @@ function script rectharm {
}
-// 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;
-}
-
-// ShowAbizit({dialog=1})
-function script ShowAbizit {
- .@dial=getarg(0, true);
- if (.@dial)
- mesn l("Current Magic Control");
-
- // FIXME
- .@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5);
- .@base=((MAGIC_LVL*2)**3);
- if (.@val > .@base*5)
- mescordialog l("You are perfectly in control of your magic."), 3, .@dial;
- else if (.@val > .@base*4)
- mescordialog l("You are mostly in control of your magic."), 2, .@dial;
- else if (.@val > .@base*3)
- mescordialog l("You are somewhat in control of your magic."), 4, .@dial;
- else if (.@val > .@base*2)
- mescordialog l("Your magic is more powerful than you, but you can control."), 7, .@dial;
- else if (.@val > .@base)
- mescordialog l("You still are overwhelmed by your magic."), 6, .@dial;
- else
- mescordialog l("You are completly overwhelmed by your magic."), 1, .@dial;
- return;
-}
-
-
// SK_summon(ID, amount, mexp)
function script SK_summon {
.@mob=getarg(0);
@@ -344,12 +310,89 @@ function script massprovoke {
return;
}
+
+// 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;
+}
+
+// ShowAbizit({dialog=1})
+function script ShowAbizit {
+ .@dial=getarg(0, true);
+ if (.@dial)
+ mesn l("Current Magic Control");
+
+ // FIXME
+ .@val=MAGIC_EXP+rand(-MAGIC_LVL*5, MAGIC_LVL*5);
+ .@base=((MAGIC_LVL*2)**3);
+ if (.@val > .@base*5)
+ mescordialog l("You are perfectly in control of your magic."), 3, .@dial;
+ else if (.@val > .@base*4)
+ mescordialog l("You are mostly in control of your magic."), 2, .@dial;
+ else if (.@val > .@base*3)
+ mescordialog l("You are somewhat in control of your magic."), 4, .@dial;
+ else if (.@val > .@base*2)
+ mescordialog l("Your magic is more powerful than you, but you can control."), 7, .@dial;
+ else if (.@val > .@base)
+ mescordialog l("You still are overwhelmed by your magic."), 6, .@dial;
+ else
+ mescordialog l("You are completly overwhelmed by your magic."), 1, .@dial;
+ return;
+}
+
+// getactivatedpoolskilllist(?)
+function script getactivatedpoolskilllist {
+ @skilllist_count=bitmask_count(FOCUSING);
+ // FIXME @skilllist_name$ @skilllist_id? Or just rewrite Luca
+ return @skilllist_count;
+}
+
+// getdeactivatedpoolskilllist(?)
+function script getdeactivatedpoolskilllist {
+ @skilllist_count=bitmask_count(FOCUSING)-FSKILL_TOTAL;
+ return @skilllist_count;
+}
+
+// getpoolskillFID(ID)
+function script getpoolskillFID {
+ switch (getarg(0)) {
+ case SKILL_MALLARDS_EYE: return FSKILL_MALLARDS_EYE;
+ case SKILL_BRAWLING: return FSKILL_BRAWLING;
+ case SKILL_SPEED: return FSKILL_SPEED;
+ case SKILL_RESIST_POISON: return FSKILL_RESIST_POISON;
+ case SKILL_ASTRAL_SOUL: return FSKILL_ASTRAL_SOUL;
+ case SKILL_RAGING: return FSKILL_RAGING;
+ }
+ return Exception("Invalid focus skill ID: "+getarg(0), RB_DEFAULT|RB_ISFATAL);
+}
+
+// poolskill(skill)
+function script poolskill {
+ if (bitmask_count(FOCUSING) < getskilllv(SKILL_POOL))
+ FOCUSING=FOCUSING | getpoolskillFID(getarg(0));
+ return;
+}
+
+// unpoolskill(skill)
+function script unpoolskill {
+ .@f=getpoolskillFID(getarg(0);
+ if (FOCUSING & .@f)
+ FOCUSING=FOCUSING ^ .@f);
+ return;
+}
+
- script Magic Load NPC_HIDDEN,{
OnInit:
end;
OnSkillInvoke:
+ callfunc("HUB_SkillInvoke");
end;
OnPCBonusEvent:
+ callfunc("HUB_PCBonus");
end;
}