From b04e65c9404c658d7c00118e4b6615d005cba4cf Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 27 Aug 2018 20:22:25 -0300 Subject: 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? --- npc/003-3/malindou.txt | 10 ++++++++++ npc/011-1/manastone.txt | 25 ++++++++++++++++--------- npc/functions/util.txt | 20 ++++++++++++++++++++ 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 { -- cgit v1.2.3-70-g09d2