Crossroadrpg

Villager
Member
Joined
May 19, 2021
Messages
21
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Hi, I am trying to make a situation where some characters, but not all of them can use some items.

I have been using this script for VisuStella Items and Equips Core from this board.

<JS Item Enable>
enabled = user._classId === <id of class that can use item>
</JS Item Enable>

and it worked like a charm, until I tried to allow the Item to work for multiple classes. Like a magic scroll that A Mage, a Witch, and an thief can use, but not the Fighter, Priest, or Hunter. Any help would be great.

 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,710
Reaction score
2,820
First Language
English
Primarily Uses
RMMZ
In that case, compare the class ID with an array. Let's say Mage, Witch and Thief are class IDs 5, 7 and 8 respectively:

<JS Item Enable>
enabled = [5, 7, 8].contains(user._classId)
</JS Item Enable>
 

Latest Threads

Latest Posts

Latest Profile Posts

I have made 60 new skills! ''after test'' I have made 3 new skills!

Made a new battleback this week! How's it look?
"This is the real secret to life - To be completely engaged with what you are doing in the here and now. And instead of calling it work, realize it is play."
Me: "I don't to use other engines because I'd have to do a lot of coding."

Also my desktop right now....
mycurrentdesktop.jpg

...I literally spend more time using VS Code than MZ. :kaoswt:
actually, are there any JRPG type games (I guess turn based, so not ARPGs like say, Vagrant Story) where you have only one party member for the majority of the game? (I wonder if I'm forgetting something obvious.)

Forum statistics

Threads
113,803
Messages
1,077,612
Members
147,865
Latest member
raw2na
Top