RMMV I need a script that makes some items restricted to certain classes

Okuro

Warper
Member
Joined
Jun 18, 2019
Messages
3
Reaction score
0
First Language
Portuguese
Primarily Uses
RMMV
In the project that I'm doing there are human actors and robot actors. I was doing the healing items in the game and I noticed that it doesn't make much sense for a robot taking aspirins to heal itself, so I need a script that limits the consumption of items for certain classes, that allows me to block a actor or class "X" from consuming a item "Y"
Can someone please help me with this? I don't know anything about java script :(
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
652
Reaction score
281
First Language
english
Primarily Uses
RMMV
theres yanfly item requirments.
but this i find only works good for self target items and attack items.
and only good for battle use items. not good for items can use from main menu.

if want human to be able to use a repair kit on robot character that plugins doesnt work so great.
so ally target items like this would use selection control so repair kit can only target someone with Machine state. (or could use javascript to target class)
 

Johnny_Ray

Also known as Toby Yasha
Veteran
Joined
Sep 11, 2019
Messages
61
Reaction score
38
First Language
English
Primarily Uses
RMMV
<Custom Select Condition>
if (user.isClass($dataClasses[n])) {
condition = true;
} else {
condition = false;
}
</Custom Select Condition>

You will need Yanfly selection control

Replace n with the class number.
Put this inside an item's notetag box.
 

Okuro

Warper
Member
Joined
Jun 18, 2019
Messages
3
Reaction score
0
First Language
Portuguese
Primarily Uses
RMMV
thanks Johnny and Tiamat for the tips, but I found another very good plugin that limits the use of items by classes, but different from the "selection control", it is free. in case anyone is interested in the plugin, it is called "class-items" (https://forums.rpgmakerweb.com/index.php?threads/class-items.50155/) and is very simple to use
 

Latest Threads

Latest Profile Posts

I once thought about a boss gauntled game. I actually did it.
Stream will be live shortly with some Gex 3! Feel free to drop by!
Snippet from a game I'm working on. Not much happening here. Mostly look at atmosphere. May upload a longer version. Still need to make up some enemy arts.
Been slightly struggling with developing the latest chapter, I think I will downscale my ambitions and make it more linear.

Forum statistics

Threads
109,056
Messages
1,041,687
Members
141,541
Latest member
spectrallax
Top