summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-08-26 16:40:20 -0300
committerJesusaves <cpntb1@ymail.com>2024-08-26 16:40:20 -0300
commit737fb4a3f9a1de1d19e80b725330ec7a147a9941 (patch)
treedc259e54f25307ff22d6b8b69291f7bb24882d72
parentc15215debc616e3b4dbc0485b729dd4acf8ea2f5 (diff)
downloadserverdata-737fb4a3f9a1de1d19e80b725330ec7a147a9941.tar.gz
serverdata-737fb4a3f9a1de1d19e80b725330ec7a147a9941.tar.bz2
serverdata-737fb4a3f9a1de1d19e80b725330ec7a147a9941.tar.xz
serverdata-737fb4a3f9a1de1d19e80b725330ec7a147a9941.zip
You no longer can get more magic power if you're overwhelmed by your own magic.
-rw-r--r--npc/011-1/manastone.txt2
-rw-r--r--npc/functions/util.txt24
2 files changed, 16 insertions, 10 deletions
diff --git a/npc/011-1/manastone.txt b/npc/011-1/manastone.txt
index 6034546cd..e072325d5 100644
--- a/npc/011-1/manastone.txt
+++ b/npc/011-1/manastone.txt
@@ -63,6 +63,8 @@ L_Level:
L_NotWorthy:
if (readparam(Sp) != readparam(MaxSp))
dispbottom l("I must have full MP to touch it... Which I don't.");
+ else if (MAGIC_LVL && abizit() < 2)
+ dispbottom l("I am currently overwhelmed by my magic. Forcing the Mana Stone to give me more magic would be foolishness.");
else
dispbottom l("I should train my intelligence, and level up, both my base as my Job Level.");
npctalk3 l("You are not worthy!");
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 989027502..cbac0246e 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -802,12 +802,24 @@ function script rif2 {
}
+// Returns a value defining your current magic control (affects success ratio, higher is better)
+// A value of '5' means perfect control, and a value of '0' means overwhelm.
+// abizit()
+function script abizit {
+ if (!MAGIC_LVL) return 0;
+ .@base=((MAGIC_LVL*2)**3);
+ return min(MAGIC_EXP/.@base, 5);
+}
+
// Prepare Mana Stone
// mstone( lvl )
function script mstone {
// Fill variable
.@v=getarg(0);
+ // Abizit requirement
+ .@abz = (MAGIC_LVL ? abizit() : 5);
+
// Determine how much stats you need, this is based on players
// and change based on $Global Variables
.int=7;
@@ -825,7 +837,8 @@ function script mstone {
readparam2(bInt) >= $MANA_BINT+(.int*.@v) &&
BaseLevel >= $MANA_BLVL+(.lvl*.@v) &&
JobLevel >= $MANA_JLVL+(.jlv*.@v) &&
- readparam(Sp) == readparam(MaxSp));
+ readparam(Sp) == readparam(MaxSp) &&
+ .@abz > 1);
}
// MAGIC_PTS → Amount of used Magic Skill Points
@@ -1002,15 +1015,6 @@ function script transcheck {
return true;
}
-// Returns a value defining your current magic control (affects success ratio, higher is better)
-// A value of '5' means perfect control, and a value of '0' means overwhelm.
-// abizit()
-function script abizit {
- if (!MAGIC_LVL) return 0;
- .@base=((MAGIC_LVL*2)**3);
- return min(MAGIC_EXP/.@base, 5);
-}
-
// anyloot( {item 1, amount 1, chance 1}, {item 2, amount 2, chance 2}... )
// Give chance (standard 1~10000 roll) to obtain item, capped at amount.
// TODO: Fill an array, then inventoryplace() and getitem()