Question about healing

So i just got the game with the resent steam sale and after watching several tutorials on youtube I think I have most of the basics down for standard damage and healing but, have a question about making a more complex healing formula.

My idea is that a item would check if you're below 25% hp and if you where it would heal you up to that 25% mark. I'm none to savvy yet at this scripting language so any help would be great.
The provided link is a great read by Mr. Trivel. You can use all sorts of evals with skills and items.
https://www.rpgmakercentral.com/topic/36290-damage-formulas-101-mv-edition/
Definitely read that link that @NinjaKittyProductions provided.

I believe the formula would be if (b.hp * 4 < b.mhp) { Math.ceil(b.mhp / 4) - b.hp } else { 0 } and if that doesn't work you may need to remove the spaces directly inside the { curly brackets } or place a semicolon (;) after the final b.hp and after 0.
Thank you very much after an hour or two of trial and error i was about to figure one out last night, but mine keep giving me decimals which it looks like yours does not.
The reason @Wavelength code doesn't have decimals is because he's using Math.ceil() which rounds the number up the nearest whole number. I'd still check out the link that was posted, it's full of useful information you can use later on.
Yeah I checked the link, which was how i was able to cobble together my functional-ish healing formula. I had tried putting the math.ceil bit in but it was still not rounding and i wasnt sure why.

Just to be clear though the version he posted did work and I'll try and build off that to learn where my mistake was.

Original thread: https://forums.rpgmakerweb.com/threads/question-about-healing.107033/