Equipment Learning

Discussion in 'Javascript/Plugin Support' started by Tatsumaro, Feb 15, 2018.

  1. Tatsumaro

    Tatsumaro Veteran Veteran

    Likes Received:
    First Language:
    Primarily Uses:
    Equipment Learning by Moogle_X, he was a "Lunatic Code" in this plugin. But according to a post its code JavaScript:
    Sorry, my eval is not really "friendly" compares to Yanfly.
    You need to write the code just like you would code the JavaScript directly.

    <EQL AP Gain Eval>
    this.hp -= this.mhp * 0.1;
    </EQL AP Gain Eval>

    Some tips:
    • this // The actor who gain the AP.
    • $dataSkills[x] // Skill with id x.
    • $dataSkills[x].eqlShowSwitch // Skill x's binded switch id.
    • this.forgetSkill(x) // Forget (and also reset AP to 0) skill with id x.
    • this._eqlAp[skillId] = 0; // Only reset AP to 0.
    • this._eqlAp[x] // Skill x current AP.
    • this.eqlIsMastered(skillId) // Is this actor "mastered" or learned the skill?

    I don't know any javaScript, but i need a code like this:

    <EQL AP Gain Eval>
    if (this.eqlIsMastered(610)){
    value = true;}
    value = false;
    </EQL AP Gain Eval>

    What i mente is a code that prevent Skill (611) to gain any AP until Skill (610) as ben "mastered"
  2. Zarsla

    Zarsla Veteran Veteran

    Likes Received:
    First Language:
    Try this:
    <EQL AP Gain Eval>
    var skillid = 611;
    if (this.eqlIsMastered(610)){
    this._eqlAp[skillid] += x;
    this._eqlAp[skillid] = 0;
    </EQL AP Gain Eval>
    And place this code on skill 611.
    Where x is the amount you want to gain.

Share This Page