查看: 5307|回复: 6

[已经解决] 请问一下MV里怎样设置升级时血蓝补满?

[复制链接]
梦石
0
星屑
50
在线时间
31 小时
注册时间
2015-12-31
回帖
11
发表于 2016-1-21 13:36:10 | 显示全部楼层 |阅读模式

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

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

×
刚才搜了半天,似乎都搜到XP里的脚本、、
插在main之前连游戏测试都打不开了....

求老司机指教。
梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2016-1-21 14:49:10 | 显示全部楼层
見過一個Lv up插件
你可到這找找
http://mvplugins.com/
HimeWorks - Level Up Events
Heal on Level Up
Frysning_Leveler
回复

使用道具 举报

梦石
0
星屑
60
在线时间
306 小时
注册时间
2014-8-5
回帖
403
发表于 2016-1-21 15:21:41 | 显示全部楼层
本帖最后由 夏末渐离 于 2016-1-21 15:23 编辑
  1. 以下为伪代码
  2. //初始化函数
  3. this.actor=$gameParty.members()[0];  //队伍1号角色
  4. this.lastlevel=this.actor.level;
  5. //刷新函数
  6. if(this.actor.level!=this.lastlevel)
  7. {
  8.   this.actor.setHp(this.actor.mHp);
  9.   this.actor.setMp(this.actor.mMp);
  10.   this.lastlevel=this.actor.level;
  11. }
复制代码
  点我进入    
       ↓      
回复

使用道具 举报

梦石
0
星屑
50
在线时间
31 小时
注册时间
2015-12-31
回帖
11
 楼主| 发表于 2016-1-21 15:27:01 | 显示全部楼层
tseyik 发表于 2016-1-21 14:49
見過一個Lv up插件
你可到這找找
http://mvplugins.com/

好伤心,找到那个Heal on level up似乎可用,作者也说自由使用,但是下载地址要科学上网才行。。。VPN前几天刚过期{:2_254:}
回复

使用道具 举报

梦石
0
星屑
50
在线时间
31 小时
注册时间
2015-12-31
回帖
11
 楼主| 发表于 2016-1-21 15:35:09 | 显示全部楼层
夏末渐离 发表于 2016-1-21 15:21

请问一下这个代码是怎么用法的?
我新建一个JS进去,需要改什么参数吗

点评

用楼下的吧。  发表于 2016-1-21 16:17
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2016-1-21 15:53:05 | 显示全部楼层
本帖最后由 tseyik 于 2016-1-21 15:58 编辑
yingkui 发表于 2016-1-21 15:27
好伤心,找到那个Heal on level up似乎可用,作者也说自由使用,但是下载地址要科学上网才行。。。VPN前 ...


[fold=Heal on Level Up][pre lang="javascript"]//=============================================================================
// Heal on Level Up
// by Shaz
// Last Update: 2015.10.25
//=============================================================================

/*:
* @plugindesc Allows you to heal actors on level up
* @author Shaz
*
* @param All HP
* @desc Heal HP for all party members (Y/N)
* @default Y
*
* @param All MP
* @desc Heal MP for all party members (Y/N)
* @default Y
*
* @param All States
* @desc Remove states for all party members (Y/N)
* @default Y
*
* @help This plugin does not provide plugin commands
*
* If you only want to set SOME actors to have the above properties, add
* the following tags to the actor notebox:
* <LUHealHP>
* <LUHealMP>
* <LUHealStates>
*/

(function() {

  var parameters = PluginManager.parameters('HealOnLevelUp');
  var healHP = (parameters['All HP'].toUpperCase() || '') === 'Y';
  var healMP = (parameters['All MP'].toUpperCase() || '') === 'Y';
  var healStates = (parameters['All States'].toUpperCase() || '') === 'Y';

  var _Game_Actor_levelUp = Game_Actor.prototype.levelUp;
  Game_Actor.prototype.levelUp = function() {
    _Game_Actor_levelUp.call(this);

    if (healHP || this.actor().meta.LUHealHP) {
      this._hp = this.mhp;
    }

    if (healMP || this.actor().meta.LUHealMP) {
      this._mp = this.mmp;
    }

    if (healStates || this.actor().meta.LUHealStates) {
      this.clearStates();
    }
  };


})();[/pre][/fold]





[fold= Level Up Events][pre lang="javascript"/*:
-------------------------------------------------------------------------
@title Level Up Events
@author Hime --> HimeWorks (http://himeworks.com)
@date Nov 30, 2015
@filename HIME_LevelUpEvents.js
@url http://himeworks.com/2015/10/level-up-events/

If you enjoy my work, consider supporting me on Patreon!

* https://www.patreon.com/himeworks

If you have any questions or concerns, you can contact me at any of
the following sites:

* Main Website: http://himeworks.com
* Facebook: https://www.facebook.com/himeworkscom/
* Twitter: https://twitter.com/HimeWorks
* Youtube: https://www.youtube.com/c/HimeWorks
* Tumblr: http://himeworks.tumblr.com/

-------------------------------------------------------------------------
@plugindesc Allows you to run common events when an actor levels up
@help
-------------------------------------------------------------------------
== Description ==

When an actor levels up, you may want to execute some custom logic.

Rather than writing a plugin to handle all of the possible behavior,
this plugin lets you build common events that will execute when an
actor levels up.

Each actor has their own level up common event, so you can easily
organize what should happen for each individual actor.

It is highly recommended that you install Common Event Queue as well
so that you can properly handle multiple level up's.

== Terms of Use ==

- Free for use in non-commercial projects with credits
- Contact me for commercial use

== Change Log ==
Nov 30, 2015
  - added conditions where level up event should not be reserved
Nov 5, 2015
  - Fixed error where I cleared out Imported
Oct 27, 2015
  - Initial release

== Usage ==

Note-tag actors with

  <level up event: COMMON_EVENT_ID>
  
Where the COMMON_EVENT_ID is the number of your common event.
For example you might say

  <level up event: 2>
  
To run the second common event in your database.
-------------------------------------------------------------------------
*/
var Imported = Imported || {}
var TH = TH || {};
Imported.LevelUpEvents = 1;
TH.LevelUpEvents = TH.LevelUpEvents || {};

(function ($) {

  $.Regex = /<level[-_ ]up[-_ ]event:\s*(\d+)>/i;

  var TH_LevelUpEvent_GameActorLevelUp = Game_Actor.prototype.levelUp;
  Game_Actor.prototype.levelUp = function() {
    TH_LevelUpEvent_GameActorLevelUp.call(this);   
    console.log('level up')
    this.onLevelUp();
  }
  
  /* New */
  Game_Actor.prototype.onLevelUp = function() {
    if (this.canRunLevelUpEvent()) {
      $gameTemp.reserveCommonEvent(this.levelUpEventId());
    }   
  }
  
  Game_Actor.prototype.canRunLevelUpEvent = function() {
    if (DataManager.isBattleTest()) {
      return false;
    }
    return true;
  }
  
  /* Returns level up event ID. Lazy-load as needed */
  Game_Actor.prototype.levelUpEventId = function() {
    if (this._levelUpEventId !== undefined) {
      return this._levelUpEventId;
    }
    this._levelUpEventId = 0;
    var res = $.Regex.exec(this.actor().note);
    if (res) {
      this._levelUpEventId = Math.floor(res[1]);
    }
    return this._levelUpEventId;
  }  
})(TH.LevelUpEvents);[/pre][/fold]

评分

参与人数 1梦石 +1 收起 理由
余烬之中 + 1 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
50
在线时间
31 小时
注册时间
2015-12-31
回帖
11
 楼主| 发表于 2016-1-21 21:37:59 | 显示全部楼层
tseyik 发表于 2016-1-21 15:53
[fold=Heal on Level Up]//========================================================================= ...

十分感谢!
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部