RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Help Please

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 85
Does anybody know how to create a bank-like event where players can store items and get them back later?
:chocobo:

**
Rep:
Level 87
I've had to work a double-party system that involved item storage before... Without scripting, it seems to resorts to having a whole chain of tedious forks for each and every item, as RM2K/3 doesn't allow to fork to see if a variable item is held. No references allowed there... It's one of the things that makes these makers a nightmare... Luckily you can add the item simply with a loop and array index. It's the checking the inventory that's difficult.
When Wombats Strike!
WombatRPGs - RPG design and Discussion
-And Team Olympus beta test now open!

*
Rep:
Level 88
Something something events
Project of the Month winner for December 2008
actually this is pretty easy to do. It just requires a lot of "Show choices" for a basic item bank. If you wanted a nice looking one then it would require something like a custom menu. But here is how to make a basic item bank:

First off, at the very start of the event make sure you have this variable (more if they can store more items)



So now you should have the number of potions being held saved into that variable. Now lets move on to the npc it self.



As you can see, at the very top is what we just did with the potion variable. Now for this example, I'm just doing a potion withdraw npc. Now where it says 'How many?' I decided to give them the options of 1 and 5.

Now in the [1] handler this is what I put:



This is the part where we check and make sure the player isn't trying to store a non-existing item. Make a condition branch that is "If [Potion] Variable is equal to or greater" then make sure you click the option for a "Else" branch. Now if this condition is met, we will add '1' to another variable which I named 'Potion store'. Then after that, make sure you use the 'Item Management' option and remove that 1 potion. The Else branch is easy to do. Just give them some message about not having any potions to store.

Now to withdraw you pretty much do everything backwards. If one of the choices is withdrawing 1 potion, then your condition branch should check the [Potion Store] variable seeing if [Potion Store] is equal to or greater then 1. Then you would -1 from the [Potion Store] variable (no need to add 1 to the [Potion] variable as that is checked when you talk to the npc). Then of course do 'Item Management' and give them their potion back.

It's pretty simple, just can get messy if there are a lot of "Show Choice" commands. Hope this helped ^^