How can I make it so that an inn restores HP, but not MP?

Jump to navigation Jump to search

Short Answer, You Can't[edit]

An Inn restores both health (HP) and magic (MP). There is no simple way to restore HP but not MP.

Long Answer, Fake It[edit]

To do so, you'll need to make a text box with choices, which will trigger a plotscript which restores HP.

Make three text boxes, and remember their numbers. For this example, we will use box numbers 56, 57, and 58.

Box 56

It will cost $600 to stay the night

On this box, enable choices and put "Stay the night." and "No, sorry."

Box 57

Thanks for staying! Have a good night!

Box 58

Sorry, you do not have enough money.

Now pick a free tag and name it "stay at Inn" (or any other name that describes the purpose of the tag). Let's say it's tag (21). Now you can save your changes and exit.

Then you have to write a plotscript. You will need to use the set hero stat, get hero stat, and lose money commands. Here is an example you can add to into your HSS file.

plotscript, inn script, begin
  if(pay money(600)), then, begin
    set hero stat(1,stat:hp, get hero stat(1,stat:hp,maximum stat), current stat)
    set hero stat(2,stat:hp, get hero stat(2,stat:hp,maximum stat), current stat)
    set hero stat(3,stat:hp, get hero stat(3,stat:hp,maximum stat), current stat)
    set hero stat(4,stat:hp, get hero stat(4,stat:hp,maximum stat), current stat)
    show text box (57)
    show text box (58)
  wait for text box

Compile your scripts, then go back under custom and import the scripts. Edit the conditions for text box 56. Change the last conditional Always (Use [box or script] next) and put if tag 21 = ON, run script inn script next (the script we made above).

Once it's done you, just have to edit your map, pick the NPC that will be the innkeeper, make it display text box 56, and place it on the map.

Save it all and make tests. You can improve the inn script with more restore stats lines, or adding walk hero commands to make the heroes automatically go to bed, or tweak palette commands to make night effects.

See Also[edit]