MZ Script call to regain hp/mp points per designated time/frames while standing on specific region IDs?

I feel like the title is self explanatory but i'll further elaborate. I'm wondering if there is a script that will allow for the player to regain a specific number of MP/HP points based on how long they are standing on a specific region ID.
I'm wanting to make a sort of hot spring, that restores your HP/MP gradually while you're standing in the water, but only while you're in the water, so the amount you regain is based off how long you stayed, and doesn't count unless you're actually /in/ the spring, and not just based off what map you're on.
I was more of less thinking 2 points per 1 second//60 frames. ( could change it to 5 or 10 points maybe )
The character only has a party member during a specific point of the game, but healing the entire party would be ideal if it happens to be that part of the game when the player wants to use it.
If worst comes to worst, i could just set it up as a rabbit hole, so you go in, and time automatically passes a specific amount and you're fully healed, but i would prefer it the other way if possible, since it allows the player to leave the spring if they are on a time limit for whatever reason.
I don't want to make it so if they /step on/ the tile, it regains, i want it to regain even while the player is standing still on said tile. this way if the player wants, they can also walk away from their computer for a minute and let it regain manually while they're gone.
i believe i've seen this in reverse, where it causes damage while on a specific tile. but i don't want to have to make every water tile and event, which is why i'd prefer to setup a region ID for it through a single event.
I have all the free visustella plugins if any of those would somehow make it easier, or in case one that i'd need doesn't run well with those or something.
I don't see why you'd need any script calls, there are basic event commands to use in a parallel event.

As a tip, you really should take a moment when you're posting to apply some basic formatting. Seeing most of a screen of block of text is quite off-putting to read. (thus, I did not try to read your entire post to give you a more specific answer)
I don't see why you'd need any script calls, there are basic event commands to use in a parallel event.

As a tip, you really should take a moment when you're posting to apply some basic formatting. Seeing most of a screen of block of text is quite off-putting to read. (thus, I did not try to read your entire post to give you a more specific answer)
Ok well maybe i'm just tired then because i have no idea how to set up what i'm wanting to do.

And sorry, whenever i put spaces between lines in the past on this website, it shoved all my text back into a wall and removed the spaces, don't know what i was doing wrong or why it was doing that so i just stopped trying to separate things :/
Put an event on the area you want to replenish stuff. It's activated by Player Touch. It turns a switch on.

Make a parallel event activated by that switch. It has Wait 60 then uses the Change HP and Change MP (on the first tab of event commands) to restore 2 of each.

Put an event outside of the area you want to replenish stuff, where it goes back to normal ground. It's activated by Player Touch. It turns the switch off.

Copy and paste the two map events to cover the perimeter of the healing lake and the border around it.
Put an event on the area you want to replenish stuff. It's activated by Player Touch. It turns a switch on.

Make a parallel event activated by that switch. It has Wait 60 then uses the Change HP and Change MP (on the first tab of event commands) to restore 2 of each.

Put an event outside of the area you want to replenish stuff, where it goes back to normal ground. It's activated by Player Touch. It turns the switch off.

Copy and paste the two map events to cover the perimeter of the healing lake and the border around it.

I was wanting to avoid using dozens of events, which is why i was hoping to find something that would work with region IDs, but this is a good solution over all, thank you!
Then you use a plugin that runs a common event from region IDs? And that turns the switch on and off.

Either way, it's entirely doable with eventing, no script calls required. Good luck.
Hi, you could accomplish this with a single parallel on the map if you wanted as well.

Page 3: Get Location Info...
Store Player Region to variable.
Conditional to check if the variable is the correct region ID.
Example,
◆Get Location Info:#0001, Region ID, Player
◆If:#0001 = 100
◆Wait:60 frames
◆Comment:Change HP/MP Here.
◆
:End
I'd suggest a plugin like RegionBase by triacontane. You can find it at:
  • <MZ install folder>/dlc/BasicResources/plugins/official/RegionBase.js
Amongst other things, it has an option to toggle a switch ID when entering/leaving a given region ID or terrain tag. It should be loaded after PluginCommonBase, found in the same folder.

I think some of its parameters will still show help in Japanese instead of English, in which case:
It seems to be a small omission in the plugin code. I just tried this and it seemed to fix the problem:
  • Open the plugin in a text editor.
  • Find line 155: /*:ja (i.e. the start of the main Japanese plugin header).
  • Scroll down until you see these lines:
    • 194: /*~struct~Record:
    • 280: /*~struct~CommonEvent:
    These should both have the locale code ja after the :, i.e.
    • 194: /*~struct~Record:ja
    • 280: /*~struct~CommonEvent:ja

(A bug patch has been released, too (2024-01-28). Looks like it fixes airships being able to land on impassable regions/terrains.)
I'd suggest a plugin like RegionBase by triacontane. You can find it at:
  • <MZ install folder>/dlc/BasicResources/plugins/official/RegionBase.js
Amongst other things, it has an option to toggle a switch ID when entering/leaving a given region ID or terrain tag. It should be loaded after PluginCommonBase, found in the same folder.

I think some of its parameters will still show help in Japanese instead of English, in which case:


(A bug patch has been released, too (2024-01-28). Looks like it fixes airships being able to land on impassable regions/terrains.)

Thank you and everyone else for the help, i didn't even realize this plugin existed xD

should be exactly what i'm looking for if it works correctly.
Edit: It works perfectly, EXACTLY what i wanted, thank you guys so much for your help!

Original thread: https://forums.rpgmakerweb.com/threads/script-call-to-regain-hp-mp-points-per-designated-time-frames-while-standing-on-specific-region-ids.172043/