Jail script

Is there any scripts for a jailing system?  Usually people in jail don't have swords, armor and such and wondered if there was a script that can be used to remove all of the players inventory, inc gold and place the stuff in a chest or something?

Joe
No need for a script, just do:

Change Items, Armor, Weapons and whatever else you want, then use decrease. Then make a chest filled with all the stuff 🙂

In page 1 under PARTY 
The only problem with that, is that it's hard to tell what items the player has as well as the count of said items.

Joe
An alternate solution is to use Fomar0153's multiple inventory scripts. And switch the inventory setting via script to "jail".

then when jail time is over you can merge the two inventory to the script's default one. (in case if you can get item while your in jail anyways) but you should know a little basic scripting since it's a bit complicated.

But you can make chest with a different event content to get the desire effect of getting the item in the chest upon merging.

Links to the script is below.

Script:

Multiple inventory

http://www.rpgmakervxace.net/topic/1433-multiple-inventories/

And here a quick tutorial on how to get the chest effect via that script.

1. Make a chest or guard event that trigger if a particular condition branch switch set to true

2. Make a text that say that you got your item back.

3. Make a another line in the event via script command with the text.

$game_party.merge_inventories(DEFAULT, JAIL)4. Make sure that the script settings  "ERASE_WHEN_MERGE" is set to true to avoid duplicate but it's optional. But make sure that the inventory you like to erase "(DEFAULT, JAIL)" (Marked in red) is in the second after the first inventory.

5. Use a switch to disable the event to avoid duplicating.

But make sure that you set your inventory from the beginning of your jail time to jail or anything you like to called it.

$game_party.change_inventory(name)Edited for better understanding.
Thanks for the help!  I finally got around to trying this and it works! however.....

These

$game_party.merge_inventories(DEFAULT, JAIL)

$game_party.change_inventory(name)

Change to these

$game_party.merge_inventories("DEFAULT", "JAIL")

$game_party.change_inventory("name")

Just thought I'd put that in to anyone who see's this and wants to use it, but it doesn't effect ANY equiped equipment menu items, but the event editor made that a QUICK n FAST fix!

Joe
I 'marked solved' the post that actually solved the issue for you (give credit where credit is due, and all), not the one where you said it was solved.


You could also do the same thing without using a script, but with a Script event command that unequips all your actors then puts all the equipment into an array, storing it into a variable. Then when you need it back again, you just read all the equipment from the variable and give it back to the party again.
Ok thanks. I thought I had to click the last post. Sorry,

Joe
ah, no. You "mark solved" the one that actually provides the answer. If you look at the top of the thread, you'll see that post has been copied to the top - this means anyone else who has the same question can immediately see the solution and doesn't have to read through the entire thread (which sometimes can have several incorrect suggestions before the final solution is provided).


If you then want the thread closed, you report the first post, and a mod will be able to close it for you 🙂 But since I'm here and it appears you don't need anymore help, I'll go ahead and close it now. If you find there's a problem and you do need further assistance, just report the first post and ask for the thread to be reopened.

Original thread: https://forums.rpgmakerweb.com/threads/jail-script.36057/