RMMV Learn random skill upon equipping a weapon utilizing Yanfly Item Core

Klammsi

Veteran
Veteran
Joined
Nov 19, 2016
Messages
62
Reaction score
10
First Language
English
Primarily Uses
Hello everyone,

I hope you are well.

I was hoping somebody could point me into the right direction with this.

I would like the player to get access to a skill upon equipping a staff. I wanted this skill to be from a random list of skills.
So every time the player finds a Staff in the game it will contain a random skill.

After doing a bit of research I understand that I could do this by using Yanflys Item Core function:

Sadly my Java Script knowledge is very limited, this is what I gathered so far and I was hoping somebody could give me a bit of advice.
Thanks in advance

<On Creation Eval>

var possibleSkills = [8, 9, 10];

var index = Math.randomInt(possibleSkills.length);

var skillId = possibleSkills[index];

</On Creation Eval>
 

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

Latest Threads

Latest Posts

Latest Profile Posts

It took really long to gather the 4 siblings to make this pictur- where did the fourth one go!?

misterdovah wrote on RyanYe's profile.
Hiiiii :rwink:
RPG Maker is working for me such as a College Degree: I've so much to learn to create, explore and try on...
You ever get really into a tv show...then realize after the first season you were really only into the opening theme for said show, and now that it's changed you're kinda done with it?

Forum statistics

Threads
107,368
Messages
1,029,159
Members
139,459
Latest member
rupawan
Top