[XP] Pay to Heal

Started by Blizzard, July 28, 2009, 03:23:22 pm

Previous topic - Next topic

Blizzard

July 28, 2009, 03:23:22 pm Last Edit: March 23, 2019, 11:25:49 am by Blizzard
Pay to Heal
Authors: Blizzard
Version: 2.1
Type: Healing System
Key Term: Misc System



Introduction

This script will allow you to heal your characters as you see fit and pay only for the healing you have made use of.

This work is licensed under BSD License 2.0:
Quote
Copyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.


You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
Quote
Pay to Heal licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić


Alternatively, if your font doesn't support diacritic characters, you may use this variant:
Quote
Pay to Heal licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic


In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Pay to Heal created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.



Features


  • allows healing of HP, SP and states separately
  • gold-per-HP cost
  • gold-per-SP cost
  • different cost for each state
  • every undefined state is treated as "positive" state and will not be removed upon healing

v2.0

  • completely improved

v2.1

  • added new license
  • added usage and crediting instructions




Screenshots




Demo

Pay to Heal


Script

Just make a new script above main and paste this code into it.
Script Download


Instructions

Inside the script in the first comment.


Compatibility

99% compatible with SDK v1.x. 90% compatible with SDK v2.x.


Credits and Thanks


  • Boris "Blizzard" Mikić



Author's Notes

After the HP healing and SP healing costs have been calculated, they will rounded up if the numbers are not integers.

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

Nice, simple, yet nice feature :P

Blizzard

I made this when we started with TTM 3 years ago. I released it once in "Blizzard Script Collection v1.0", but after that it pretty much go lost. vacancydenied reminded me of it when (s)he asked for a script like that. So I figured I'd update it and finally release it publicly, hence why it's v2.0.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

legacyblade

Hey cool. This makes having a healer a lot more easier. Great script blizz!

vacancydenied

Nice =). I will make good use of this script. Is it pretty simple to edit? Like if I wanted to raise the price by 3 fold or something. Anyways thank you for this. I probably would've made a huge even script if you didn't make this lol.
Nothing goes as planned but I keep going forward.

Blizzard

There's a configuration.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Jragyn

May 17, 2010, 12:12:24 am #6 Last Edit: May 17, 2010, 12:14:19 am by jragyn00
$scene = Scene_PayToHeal(x,y) doesn't werk cuz the Scene's real name is Scene_PayToParty in the script.

lolol. :knight:

Quote
#==============================================================================
# Scene_PayToParty
#==============================================================================

class Scene_PayToParty
 
  def initialize(hp_cost = BlizzCFG::HP_COST, sp_cost = BlizzCFG::SP_COST)
    @hp_cost, @sp_cost = hp_cost, sp_cost
  end
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Blizzard

Oh lol! I'll put up a fixed version.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.