じ☆ve冰风 发表于 2026-7-26 17:27:01

Get All Items

GetAllItems - 2017/04/13

Creator name: kido0617

Overview
All item accessibility with plugin command

Features
- You don't have to go through Event Commands each time to add 1 of everything.
- Short code

Example-
                Code:       
GetAllItems item 99      # Get all items of 99 each
GetAllItems armor 10   # Get all armors of 10 each
GetAllItems weapon 1   # Get all weapons of 1 each


Preview

https://kek.gg/i/6M9fvb.png

If you add something like this at the beginning, you start out with whole possession of things.

                Code:       
/*---------------------------------------------------------------------------*
* 2017/04/13 kido0617
* http://kido0617.github.io/
* MIT License
* http://opensource.org/licenses/mit-license.php
*---------------------------------------------------------------------------*/

/*:
* @plugindesc All item accessibility with plugin command
* @author kido0617
*
* @help
*   Plug-in to get all weapons, armors, items
* plugin command:
*   GetAllItems item 99      # Get all items of 99 each
*   GetAllItems armor 1      # Get all armors of 1 each
*   GetAllItems weapon 1   # Get all weapons of 1 each
*/

/*:ja
* @plugindesc 全アイテム取得プラグイン
* @author kido0617
*
* @help
*   全武器、防具、アイテムを取得するプラグイン
* プラグインコマンド:
*   GetAllItems item 99      # 全アイテムを99個獲得
*   GetAllItems armor 1      # 全防具を1個獲得
*   GetAllItems weapon 1   # 全武器を1個獲得
*/

(function(){

var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
    _Game_Interpreter_pluginCommand.call(this, command, args);
    if (command === 'GetAllItems') {
      switch (args) {
      case 'item':
      getAlls($dataItems, Number(args));
      break;
      case 'armor':
      getAlls($dataArmors, Number(args));
      break;
      case 'weapon':
      getAlls($dataWeapons, Number(args));
      break;
      }
    }
};

function getAlls(data, num){
    for(var i = 1 ; i < data.length; i++){
      if(data.name == "")continue;
      $gameParty.gainItem(data, num);
    }
}

})();



Credit and Thanks: kido0617

Terms of Use- Free for commercial and non-commercial use.

License - MIT License: http://opensource.org/licenses/mit-license.php

You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/h4t7t12cs6bf41m/GetAllItems.js?dl=1


本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/get-all-items.95414/
页: [1]
查看完整版本: Get All Items