MV Script Steal from NPC

Hello!
I want to make a possibilty in my game, that you can sneak up behind a NPC and steal out of it's pockets.
I have used some scripts from hime and yanfly to sneak behind the NPC and press a button to start the "steal-event"
I searched for scripts like that, but I didn't find something I liked (Yanfly has a stealth script, but only in battle, not for random events/NPCs on the map)

Now my problem:
I would like to have NPCs have a little inventory (of like 3-4 Items) and I just want to have a little window pop up, when I try to steal (like in my screenshot)
Of course I could just make a choice and let the player choose from that, but I would love to have a script, in which randomize the inventory of the NPCs (maybe with the help of notes in the notebox of the items)

Like I prepare:
Pocket 1 - 3 Items with note in Notebox "cheap stuff"
pocket 2 - 3 Items with note in Notebox "expensive stuff"
Pocket 3 - 1 item with note in Notebox "legendary item" and 2 "cheap stuff"

And I could just give the NPC in my game a comment in its event page like "Pocket 1"
-> of course the NPC/the event would need to save which items it had, and not have random items everytime you talk to it

When I sneak behind the NPC and trigger it (with alt-Button atm) the little window would pop up, with the stealable items + "steal all" option.
Bonus would be, that you can configurate which succsess rate the Item-notes have (so how easy it is to steal, or not) and that I can let a common event happen, when I get catched by stealing.
Also Bonus, If I can set up Items or amor or something to increase, decrease the chance of stealing!

So kinda like Galvs storage event, but I don't want the option to put something in the pockets. And I don't want a fullscreen Scene pop up, just the little window with Items and steal all option.

I would also be open to commission such a script, depending on the price, btw!
Let me know, if you have questions!
1697038269491.png
Do you really need a script for that though? This is all doable with events.

  • Conditional branch if event facing away from player.
  • Variables 1, 2, 3, to store which items can be stolen.
  • Show choice: \V[1], \V[2], \V[3].
So instead of setting tags on the event, you'll just set your variables.
I agree, I don't see a need for a plugin here.

It might be made easier by using Yanfly's Self Variables, so each event can keep track of which of its items it still has without you having to clutter up your global variables. But either way I think you only need event commands.
You would however benefit from a choice customisation plugin with show/enable conditions (like Hime's) to prevent the player from seeing/selecting choices for items that aren't there any more.
I didn't think of the self variables to use.
I will try and work a little with it, thank you 🙂

Original thread: https://forums.rpgmakerweb.com/threads/script-steal-from-npc.161916/