summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-08-27 20:22:25 -0300
committerJesusaves <cpntb1@ymail.com>2018-08-27 20:22:25 -0300
commitb04e65c9404c658d7c00118e4b6615d005cba4cf (patch)
treec4273a706f35e410a700748a57ea446fd2ec64e2
parent6c428c2b63420a4dfe98535ea213ad6622722fed (diff)
downloadserverdata-b04e65c9404c658d7c00118e4b6615d005cba4cf.tar.gz
serverdata-b04e65c9404c658d7c00118e4b6615d005cba4cf.tar.bz2
serverdata-b04e65c9404c658d7c00118e4b6615d005cba4cf.tar.xz
serverdata-b04e65c9404c658d7c00118e4b6615d005cba4cf.zip
Make Mana Stone requeriments more flexible and more obscure.
Values are exactly the same as before, but we can now have some special, massive, hardcoded, risky events betting the Mana Fragments on it. Winning the event means easier to get magic: Less int required, for example. Losing the event means the opposite. Isn't cool how many cool things we can do?
-rw-r--r--npc/003-3/malindou.txt10
-rw-r--r--npc/011-1/manastone.txt25
-rw-r--r--npc/functions/util.txt20
3 files changed, 46 insertions, 9 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 101e5488b..f10455cd4 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -79,6 +79,16 @@ OnInit:
debugmes "";
DelItemFromEveryPlayer(SilverMirror);
}
+ // Current UPDATE value: Seg Ago 27 20:20:21 -03 2018
+ if ($UPDATE < 1535412021) {
+ $UPDATE=1535412021;
+ debugmes "";
+ debugmes "* SETUP mana stone default values.";
+ debugmes "";
+ $MANA_BINT=30;
+ $MANA_BLVL=40;
+ $MANA_JLVL=10;
+ }
diff --git a/npc/011-1/manastone.txt b/npc/011-1/manastone.txt
index 9dd19feea..ba3e07f9c 100644
--- a/npc/011-1/manastone.txt
+++ b/npc/011-1/manastone.txt
@@ -10,6 +10,14 @@
//
// Notes: During sieges, Monster King and Human Council apparitions, it may hide
// itself.
+//
+// Variables:
+// $MANA_BINT => Base Intelligence for Mana Stone
+// $MANA_BLVL => Base Level for Mana Stone
+// $MANA_JLVL => Base Job Level for Mana Stone
+// .int => Int Increment
+// .lvl => Lvl Increment
+// .jlvl => Jlv Increment
011-1,0,0,0 script Mana Stone NPC_MANA_STONE,{
@@ -37,15 +45,14 @@ L_NotWorthy:
end;
L_Level:
- if (MAGIC_LVL == 0 && readparam(bInt) >= 30 && BaseLevel >= 40 && JobLevel >= 10 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 1 && readparam(bInt) >= 45 && BaseLevel >= 60 && JobLevel >= 25 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 2 && readparam(bInt) >= 60 && BaseLevel >= 80 && JobLevel >= 40 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
-
- // Everything below this line is garbage
- if (MAGIC_LVL == 3 && readparam(bInt) >= 75 && BaseLevel >= 100 && JobLevel >= 55 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 4 && readparam(bInt) >= 90 && BaseLevel >= 120 && JobLevel >= 70 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 5 && readparam(bInt) >= 105 && BaseLevel >= 140 && JobLevel >= 85 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
- if (MAGIC_LVL == 6 && readparam(bInt) >= 120 && BaseLevel >= 160 && JobLevel >= 100 && readparam(Sp) == readparam(MaxSp)) goto L_LevelUp;
+ // See functions/util.txt for *mstone() details
+ if (mstone(0)) goto L_LevelUp;
+ if (mstone(1)) goto L_LevelUp;
+ if (mstone(2)) goto L_LevelUp;
+ if (mstone(3)) goto L_LevelUp;
+ if (mstone(4)) goto L_LevelUp;
+ if (mstone(5)) goto L_LevelUp;
+ if (mstone(6)) goto L_LevelUp;
if (MAGIC_LVL >= 7) npctalk3 l("You already got all power I could grant you!");
if (is_gm()) percentheal -20, -50;
if (MAGIC_LVL >= 7 || is_gm()) close;
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index ca1947df7..181f02ca0 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -248,6 +248,26 @@ function script party_expon {
}
+// Prepare Mana Stone
+// mstone( lvl )
+function script mstone {
+ // Fill variable
+ .@v=getarg(0);
+
+ // Determine how much stats you need, this is based on players
+ // and change based on $Global Variables
+ .int=15;
+ .lvl=20;
+ .jlv=15;
+
+ return (
+ MAGIC_LVL == .@v &&
+ readparam(bInt) >= $MANA_BINT+(.int*.@v) &&
+ BaseLevel >= $MANA_BLVL+(.lvl*.@v) &&
+ JobLevel >= $MANA_JLVL+(.jlv*.@v) &&
+ readparam(Sp) == readparam(MaxSp));
+}
+
// Gets how many subclasses were actually filled
// total_subclass( )
function script total_subclass {