Equipment Learning

Tatsumaro

Veteran
Veteran
Joined
Aug 11, 2016
Messages
205
Reaction score
40
First Language
Portugues
Primarily Uses
RMMV
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;}
else{
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"
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
690
Reaction score
205
First Language
English
Primarily Uses
Try this:
<EQL AP Gain Eval>
var skillid = 611;
if (this.eqlIsMastered(610)){
this._eqlAp[skillid] += x;
}else{
this._eqlAp[skillid] = 0;
}
</EQL AP Gain Eval>
And place this code on skill 611.
Where x is the amount you want to gain.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Setup a system to cull enemies that are too far from the player to matter, and to spawn new ones just outside of view. Take that lag! :LZSexcite:
That trope is alive more than ever, not so much elemental Crystal's but gathering magical objects or doing "task" to unlock this oddly specific thing is everywhere, I saw it saw it in the IT 2 remake, avengers and every season of supernatural
It's raining...in winter :")
I was stunned-STUNNED-to find that I have been working on my current project since November. It feels like so much less time than that.
Stream will be live shortly with some art! Going to do a recolor, then start on a new monster! Feel free to drop by!

Forum statistics

Threads
93,712
Messages
914,858
Members
123,316
Latest member
Ceoxy-
Top