Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // Maliki's Last Item Register
- // Mal_lastitemRegister.js
- // version 1.0
- //=============================================================================
- /*:
- * @plugindesc This plugin snippet gives users the ability to record the last item recieved
- * into a variable. From there, the data can be more freely used.
- * @author Maliki79
- *
- * @help Version 1.0
- * First, choose a variable to store the item data.
- * After a game is started, once an item is obtained, it will have all data copied into the variable.
- * You will then need to manipulate the data for your needs.
- * For example, if you wanted to put the ID in Variable 100, you would make the script call:
- * $GameVariables.setValue(100, $gameVariables.value(x).id)
- * Where x is the variable number you chose.
- *
- * @param chosenVariable
- * @type number
- * @min 1
- * @desc Chosen Variable to store item values.
- * @default 1
- */
- var newestItemV = (PluginManager.parameters('Mal_lastitemRegister').chosenVariable) || 1;
- console.log(newestItemV);
- var MalRegisterNewItem = Game_Party.prototype.registerNewItem;
- Game_Party.prototype.registerNewItem = function(baseItem, newItem) {
- MalRegisterNewItem.call(this, baseItem, newItem);
- $gameVariables.setValue(newestItemV, newItem);
- console.log($gameVariables.value(newestItemV);
- };
Advertisement
Add Comment
Please, Sign In to add comment