查看: 3503|回复: 3

[已经过期] 有没有手动升级

[复制链接]
梦石
0
星屑
110
在线时间
85 小时
注册时间
2010-8-19
回帖
98
发表于 2017-6-18 10:07:16 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
求一个,当前经验超过升级所需经验的时候也不会升级,需要玩家手动选择以后才能升级的插件
梦石
0
星屑
50
在线时间
370 小时
注册时间
2016-1-7
回帖
81
发表于 2017-6-21 22:14:17 | 显示全部楼层
本帖最后由 在野月光 于 2017-6-21 22:19 编辑


  1. //------------------------------------------
  2. // 人工升级@MV1.3.5 for Win7-32
  3. //------------------------------------------
  4. var MLC = MLC || {};

  5. //----------------------- 更改经验值(角色当前的经验值, 是否显示升级效果)
  6. Game_Actor.prototype.changeExp = function(exp, show) {
  7.     this._exp[this._classId] = Math.max(exp, 0);
  8.     var lastLevel = this._level;
  9.     var lastSkills = this.skills();
  10.         if($gameTemp._upGrade){                // <<<
  11.                 while (!this.isMaxLevel() && this.currentExp() >= this.nextLevelExp()) {
  12.                         this.levelUp();
  13.                 }
  14.                 while (this.currentExp() < this.currentLevelExp()) {
  15.                         this.levelDown();
  16.                 }
  17.                 if (show && this._level > lastLevel) {
  18.                         this.displayLevelUp(this.findNewSkills(lastSkills));
  19.                 }
  20.                 this.refresh();
  21.                
  22.         };                // <<<
  23. };

  24. //----------------------- 刷新角色状态窗口
  25. MLC.windowStatus_refresh = Window_Status.prototype.refresh;
  26. Window_Status.prototype.refresh = function() {
  27.         MLC.windowStatus_refresh.call(this);
  28.         if (this._actor) {
  29.                 this.createButton();
  30.         };
  31. };

  32. //----------------------- 创建按钮(图片文件名, 单元图像大小)
  33. Window_Status.prototype.createButton = function(filename, spec) {
  34.         var sz= spec || 48;        // 图片规格(宽×高):288×96,样式:6×2 ,预置单元大小:48×48
  35.         var name = filename || 'ButtonSet';
  36.         var levelUpButton = ImageManager.loadSystem(name);
  37.         this.buttonSprite  = new Sprite_Button();
  38.         this.buttonSprite.bitmap = levelUpButton;
  39.         this.addChild(this.buttonSprite);
  40.         this.buttonSprite.setColdFrame(sz*3, sz, sz, sz);
  41.         this.buttonSprite.setHotFrame(sz*3, 0, sz, sz);
  42.         this.buttonSprite.x = this.width / 2;       // 按钮水平坐标
  43.         this.buttonSprite.y = sz * 7 / 4;            // 按钮垂直坐标
  44.         this.buttonSprite.setClickHandler(this.onButtonOk.bind(this));
  45. };

  46. //----------------------- 点击按钮
  47. Window_Status.prototype.onButtonOk = function() {
  48.         var exp = this._actor.currentExp();
  49.         $gameTemp._upGrade = true;
  50.         this._actor.changeExp(exp, false);        // 已屏蔽升级效果
  51.         SceneManager.goto(Scene_Status)
  52.         $gameTemp._upGrade = false;                                               
  53. };

  54. //----------------------- 刷新画面
  55. MLC.windowStatus_drawExpInfo = Window_Status.prototype.drawExpInfo;
  56. Window_Status.prototype.drawExpInfo = function(x, y) {
  57.         MLC.windowStatus_drawExpInfo.call(this, x, y);
  58.         if(this._actor.nextRequiredExp() < 0){
  59.                 var h = this.lineHeight();
  60.                 this.contents.clearRect(x, y + h * 3, 270, h);
  61.                 this.drawText('0', x, y + h * 3, 270, 'right');
  62.         };
  63. };

复制代码


aa.gif
回复

使用道具 举报

梦石
0
星屑
110
在线时间
85 小时
注册时间
2010-8-19
回帖
98
 楼主| 发表于 2017-6-21 22:21:32 | 显示全部楼层
在野月光 发表于 2017-6-21 22:14
//------------------------------------------
// 人工升级@MV1.3.5 for Win7-32
//------------------- ...

这个升级按钮在哪
回复

使用道具 举报

梦石
0
星屑
50
在线时间
370 小时
注册时间
2016-1-7
回帖
81
发表于 2017-6-21 22:27:25 | 显示全部楼层
aa.png

QQ截图20170621222755.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部