- Joined
- Feb 15, 2015
- Messages
- 76
- Reaction score
- 9
- First Language
- Portuguese
- Primarily Uses
- N/A
Hey guys!
I'm making a plugin that changes the price of an weapon/armor according it's basis params (HP, MP, ATK, DEF, etc). I already made the buying price, now I'm struggling to make the selling price. I'm still getting the price on database, not the new price altered by my plugin. can anyone help me?
The buying price code:
I'm making a plugin that changes the price of an weapon/armor according it's basis params (HP, MP, ATK, DEF, etc). I already made the buying price, now I'm struggling to make the selling price. I'm still getting the price on database, not the new price altered by my plugin. can anyone help me?
The buying price code:
Code:
var _WindowShopBuy_price = Window_ShopBuy.prototype.price;
Window_ShopBuy.prototype.price = function(item) {
var _priceMod = newMod[8];
for (i = 0; i < 7; i++) {
_priceMod += item.params[i] * newMod[i];
}
var price = _WindowShopBuy_price.call(this, item);
price += _priceMod;
return price;
};

