じ☆ve冰风 发表于 2024-2-24 07:52:12

这到底是哪里出了问题 完全按照教程来的

JAVASCRIPT 代码
/**
* Created by Administrator on 2016/9/10.
*/
//==========================================================================================================
// RandomWeapon.js
//==========================================================================================================
/*:
* @plugindesc 随机获取一把武器.
* @author DYART
*
* @param price
* @desc 每次购买所需要的钱.
* @default 1000
* @help This plugin does not provide plugin commands. 这个插件没有提供插件命令。
* 使用方法: 在事件指令里输入: RandomWeapon get
*/
//这东西是定义一个对象,然后把插件里面的东西都藏在这对象里面,防止和别人起名字冲突了.
var RandomWeapon = window.RandomWeapon || {};
//外面调用的话,都要用RandomWeapon.来调用
//读取参数的对象
RandomWeapon.parameters = PluginManager.parameters('RandomWeapon');
//这是我们允许随机获得武器的id,id是根据dataWeapons.js里面的id属性确定的.
RandomWeapon.weaponsList = ;
//每次随机的价格.从参数里面获得
RandomWeapon.price = parseInt (RandomWeapon.parameters['price'] || '1000') ;

RandomWeapon._Game_Interpreter_pluginCommand =Game_Interpreter. prototype.pluginCommand;
Game_Interpreter . prototype. pluginCommand = function(command, args ){
    RandomWeapon._Game_Interpreter.pluginCommand.call(this, command, args);
    if(command === 'RandomWeapon'){
      switch(args){
            case' get ': //命令 get
                RandomWeapon.getWeapon();
                break;
      }
    }
};


//这是获得武器的函数,在面向对象里面,我们叫它"方法".
RandomWeapon.getWeapon = function(){
    if($gameParty.gold()
页: [1]
查看完整版本: 这到底是哪里出了问题 完全按照教程来的