RMMV Help making sure an item is not consumed in less special conditions are met

Mr_Mime_1983

Veteran
Veteran
Joined
Aug 22, 2021
Messages
41
Reaction score
7
First Language
en
Primarily Uses
RMMV
I am trying to figure out how to make sure an item is not used up if it is used on an invalid actor. I am using this plugin and I've got it to work as I wanted, but every time I use the item, it stays in my inventory. It would not use it up. I would like it so that if I use it on a valid actor, it uses the item but if I use it on a non-valid actor, it will say that is not a valid actor and stays in my inventory. Here are some provided screenshots for clarification.


help1.png

The script I'm using
// Humans can use it

<effect condition: 1>

b.isClass($dataClasses[1]) ||

b.isClass($dataClasses[2])

</effect condition>

// Everyone else does not use

<effect condition: 2>

b.isClass($dataClasses[3]) ||

b.isClass($dataClasses[4]) ||

b.isClass($dataClasses[5]) ||

b.isClass($dataClasses[6]) ||

b.isClass($dataClasses[7])

</effect condition>

And here is the common event I have for the item.
help2.png

I would really appreciate any help on this matter. I hope I clarified this enough.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,089
Reaction score
15,502
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.



Please use meaningful thread titles - say what you want help with in the title. Every person who posts in MV Support or Plugin Support has a problem that they need help with.
 

redmedved2

Veteran
Veteran
Joined
Nov 2, 2020
Messages
90
Reaction score
37
First Language
Belarusian
Primarily Uses
RMMV
This is the first time I've seen this plugin (I've actually been looking for something like this for a very long time and thank you so much for showing it to me), but the plugin page has a tutorial, in which the item has only one effect and says that if the conditions for this effect are not met, you simply can not use the item on another member of the group.
And also here's a screenshot from the comments:
1634850956514.png
Maybe I'm missing something.
 

Mr_Mime_1983

Veteran
Veteran
Joined
Aug 22, 2021
Messages
41
Reaction score
7
First Language
en
Primarily Uses
RMMV
@redmedved2 You're very much welcome I was looking for a long time too probably not as long as you but for a few days. Because Yanflys plugin just does not work the way I want it to for my needs anyway. I followed your suggestion and followed the tutorial to a tee and it works now the second part in my code was what was messing it up.
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm listening to iiluminaughtii talking about the secrets behind shady businesses and scams. Meanwhile I'm writing a fanfic about Sephiroth from FF7, one specifically for my stepmom. I'll get to give it to her, too, because my boss said I could take the holidays off! Dec. 22-27 I will be in Orlando, and maybe Fort Myers too, visiting my dad and stepmom!
Of course, I bought a handful of games on the Steam Black Friday sale. Will I try them? Will I complete any? Who knows...
I don't really have any neat updates today about how I screwed up programming... But if you want to observe the intensenes of me programming, then you can check out my stream :)
New Weapons.gif
No more spam from me today, I promise! Just wanted to upload this, people have been giving me feedback that my weapon sprites (which were RTP) clashed badly with my battlers for ages, so today I finally took the plunge and updated them! Really happy with how they came out :D :D
So Facebook fraudulently took money from me. They even went through my PayPal accounts to find a card that had the money on it. Thinking about deleting my Facebook account because this doesn't happen on twitter, not even close.

Forum statistics

Threads
117,007
Messages
1,103,779
Members
152,904
Latest member
gumi16
Top