Hey all,
I am starting to look into MV Scripting using js code.
Now I got my script to do something when I talk to an NPC which is a shop:
Fancy.FTrader.Scene_Shop_doBuy = Scene_Shop.prototype.doBuy;
Scene_Shop.prototype.doBuy = function(number) {
console.log(this);
Fancy.FTrader.Scene_Shop_doBuy.call(this, number);
};
so far so good. I can access this and this._item and this._actor
Now I am looking to find a reference to the NPC I am talking too, like an ID or something unique would be ideal.
Would be great if someone can give me a hint where to look or a code snippet.
Many thanks in advance!
Snap
I am starting to look into MV Scripting using js code.
Now I got my script to do something when I talk to an NPC which is a shop:
Fancy.FTrader.Scene_Shop_doBuy = Scene_Shop.prototype.doBuy;
Scene_Shop.prototype.doBuy = function(number) {
console.log(this);
Fancy.FTrader.Scene_Shop_doBuy.call(this, number);
};
so far so good. I can access this and this._item and this._actor
Now I am looking to find a reference to the NPC I am talking too, like an ID or something unique would be ideal.
Would be great if someone can give me a hint where to look or a code snippet.
Many thanks in advance!
Snap