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.
The script I'm using
And here is the common event I have for the item.
I would really appreciate any help on this matter. I hope I clarified this enough.
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>
<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.
I would really appreciate any help on this matter. I hope I clarified this enough.