I am trying to make an Inn where the price is equal to how much HP is lost, I found a script on another forum but I'm having some trouble understanding how to use it. Any help would be appreciated.
[ISPOILER]
[/ISPOILER]
[ISPOILER]
$gameVariables.setValue(1, totalAmount); //note the 5 has been changed to 1
$gameParty.gold() >= $gameVariables.value(1)
var tmpcost=0;
var actorid;
for(i=1;i<$gameParty._actors.length;i++){
actorid=$gameParty._actors[i];
tmpcost += $gameActors._data[actorid].mhp - $gameActors._data[actorid]._hp;
}
Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-an-inn-where-price-is-equal-to-how-much-hp-is-lost.139898/