设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3705|回复: 3
打印 上一主题 下一主题

[已经解决] 国外网站的持续伤害脚本下载不了,求帮忙

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2920
在线时间
713 小时
注册时间
2010-7-25
帖子
813

开拓者

跳转到指定楼层
1
发表于 2015-11-14 17:32:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 jianyulei 于 2015-11-14 17:35 编辑

下载地址:
http://pastebin.com/TiJxL4xi

这是国外论坛的一个持续伤害状态的脚本,但是我下载不了,希望能点进去的人忙个下。

论坛地址:
http://forums.rpgmakerweb.com/in ... llyes-state-damage/

顺便问一下www.mediafire.com这个国外网盘大家是用什么方法进去的

Lv1.梦旅人

梦石
0
星屑
65
在线时间
385 小时
注册时间
2007-7-27
帖子
4106

开拓者

2
发表于 2015-11-14 17:54:58 | 只看该作者
本帖最后由 余烬之中 于 2015-11-21 15:17 编辑

JAVASCRIPT 代码复制
  1. // Place file inside /js/plugins
  2.     // Remember to save after adding plugins or changing parameters.
  3.     //=============================================================================
  4.     // Ellye's States Damage
  5.     //=============================================================================
  6.     /*:
  7.      * Version: 2015-11-08-0156
  8.      *
  9.      * CHANGE LOG:
  10.      * 2015-11-08-0156 - Changed the _stateCaster array to no longer store direct object references, that could easily result in infinite data loops. Thanks, Bobstah.
  11.      * 2015-11-05-1029 - Added tags <drain>, <mp_drain>, <mp_heal>, <mp_damage>, <can_critical>.
  12.      * 2015-11-04-2327 - Made this compatible with Yanfly's Cooldowns (that plugin wasn't expecting the possibility of its attributes being undefined in a skill)
  13.      * 2015-11-03-3442 - Fixed _stateCaster information being unintentionaly shared between battlers.
  14.      * 2015-11-03-0948 - Fixed an issue that could cause compatibility problems.
  15.      * 2015-11-01-1141 - Added collapse animation for enemies that die due to status effects.
  16.      * 2015-10-31-2112 - Some combinations of plugins would cause the damage popup to appear twice. So I added a compatibility parameter.
  17.      * 2015-10-31-1802 - Fixed a bug that made the plugin not work properly in many cases.
  18.      * 2015-10-31-1434 - Fixed a crash at turn end.
  19.      * 2015-10-31-1225 - Fixed a few potential crashes.
  20.      * 2015-10-31-0221 - Beta Release.
  21.      *
  22.      *
  23.      *
  24.      * @plugindesc Ver.2015-11-08-0156. Customized state damage/healing. See help.
  25.      * <Ellye SD>
  26.      * @author [url]https://ellyeblog.wordpress.com/[/url] || [url]http://steamcommunity.com/id/Ellye[/url]
  27.      *
  28.      * @param Damage Popup Compatibility
  29.      * @desc Change this to "1" if you're having an issue that causes damage numbers to appear twice per turn (compatibility).
  30.      * @default 0
  31.      *
  32.      *
  33.      * @help This plugin allows you to set up custom damage or healing for States.
  34.      * Use the notes field, and swap FORMULA_HERE for the formula you want to use (exactly like you'd do for a Skill).
  35.      * <formula:FORMULA_HERE>
  36.      * <element:ELEMENT_ID>
  37.      * <variance:VARIANCE_PERCENT>
  38.      *
  39.      * You can also set:
  40.      * <can_critical>
  41.      * If the state has a chance to critical hit (based on caster's critical hit chance)
  42.      *
  43.      * You can also set the following flags (mutually exclusive):
  44.      * <heal>
  45.      * <drain>
  46.      * <mp_damage>
  47.      * <mp_heal>
  48.      * <mp_drain>
  49.      *
  50.      * For example, let's say we want to create a "Burning" state:
  51.      * <formula:a.mat/(1+(b.mdf/100))>
  52.      * <element:2>
  53.      * <variance:20>
  54.      *
  55.      * Or a "Regeneration" state:
  56.      * <formula:a.mat>
  57.      * <element:6>
  58.      * <variance:10>
  59.      *
  60.      * Keep in mind, "a" is always the person who have casted the state, and "b" is always the afflicted person.
  61.      * Sometimes they might both be the same (if a person casts Regeneration on himself, for an easy example).
  62.      */
  63.     (function() {
  64.  
  65.         var parameters = $plugins.filter(function(p) {
  66.             return p.description.contains('<Ellye SD>');
  67.         })[0].parameters; //Thanks to Iavra
  68.         var damage_popup_compatibility = Number(parameters['Damage Popup Compatibility'] || 0);
  69.  
  70.         //Let's add a new property for battlers, called "_stateCaster". It will be array holding the caster of each state we have.
  71.         Object.defineProperties(Game_Battler.prototype, {
  72.             _stateCasterIndex: {
  73.                 writable: true,
  74.                 value: [],
  75.                 configurable: true,
  76.                 enumerable: true
  77.             }
  78.         });
  79.  
  80.         Game_Battler.prototype.stateCasters = function() {
  81.             var stateCasters = [];
  82.             this._stateCasterIndex.forEach(function(index, state) {
  83.                 //Actors receive a positive id on the array
  84.                 if (index > 0 && $gameActors._data.length >= index - 1 && typeof $gameActors._data[index] !== 'undefined')
  85.                 {
  86.                     stateCasters[state] = $gameActors._data[index];
  87.                 }
  88.                 else
  89.                 {
  90.                     index *= -1;
  91.                     if ($gameTroop._enemies.length >= index - 1 && typeof $gameTroop._enemies[index] !== 'undefined')
  92.                     {
  93.                         stateCasters[state] = $gameTroop._enemies[index];
  94.                     }
  95.                 }
  96.             }, this);
  97.             return stateCasters;
  98.         };
  99.  
  100.         //We need to initialize _stateCaster for our Game Battlers:
  101.         _alis_gb_init = Game_Battler.prototype.initMembers;
  102.         Game_Battler.prototype.initMembers = function() {
  103.             _alis_gb_init.call(this);
  104.             this._stateCasterIndex = [];
  105.         };
  106.  
  107.  
  108.         //We modify the function that adds states, so that it shall pass the caster as a parameter:
  109.         Game_Action.prototype.itemEffectAddNormalState = function(target, effect) {
  110.             var caster = this.subject();
  111.             var chance = effect.value1;
  112.             if (!this.isCertainHit()) {
  113.                 chance *= target.stateRate(effect.dataId);
  114.                 chance *= this.lukEffectRate(target);
  115.             }
  116.             if (Math.random() < chance) {
  117.                 target.addState(effect.dataId, caster);
  118.                 this.makeSuccess(target);
  119.             }
  120.         };
  121.  
  122.         //We start receiving a parameter:
  123.         Game_Battler.prototype.addState = function(stateId, caster) {
  124.             if (typeof caster === 'undefined') {
  125.                 caster = this;
  126.             }
  127.             if (this.isStateAddable(stateId)) {
  128.                 if (!this.isStateAffected(stateId)) {
  129.                     this.addNewState(stateId);
  130.                     this.refresh();
  131.                 }
  132.                 this.resetStateCounts(stateId);
  133.                 this._result.pushAddedState(stateId);
  134.             }
  135.             //We could also override AddNewState() to make it receive the parameter and assign values, but we might be compromising compatibility a bit too much.
  136.             //So we are going to add those values here. This also means that receiving a second Poison will override the values from the first one.
  137.             if (caster.isActor())
  138.             {
  139.                 this._stateCasterIndex[stateId] = $gameActors._data.indexOf(caster);
  140.             }
  141.             else
  142.             {
  143.                 this._stateCasterIndex[stateId] = -$gameTroop._enemies.indexOf(caster);
  144.             }
  145.         };
  146.  
  147.         //At end of turn, we need to call our method that will deal with those parameters:
  148.         _game_battler_onTurnEnd_alias = Game_Battler.prototype.onTurnEnd;
  149.         Game_Battler.prototype.onTurnEnd = function() {
  150.             this.ProcessEllyeStatesDamage();
  151.             _game_battler_onTurnEnd_alias.call(this);
  152.         };
  153.  
  154.         //And our method:
  155.         Game_Battler.prototype.ProcessEllyeStatesDamage = function() {
  156.             this.states().forEach(function(state) {
  157.                 if (typeof state.meta !== 'undefined' && state.meta !== null && typeof state.meta.formula !== 'undefined')
  158.                 {
  159.                     var caster = this;
  160.                     var element = 1;
  161.                     var type = 1;
  162.                     var variance = 0;
  163.                     var formula = state.meta.formula;
  164.                     var critical = false;
  165.                     var stateCasters = this.stateCasters();
  166.                     if (typeof stateCasters[state.id] !== 'undefined') {
  167.                         caster = stateCasters[state.id];
  168.                     }
  169.                     if (typeof state.meta.element !== 'undefined')
  170.                     {
  171.                         element = Number(state.meta.element || 1);
  172.                     }
  173.                     //Type:
  174.                     if (typeof state.meta.drain !== 'undefined' && caster !== this && caster.isAlive())
  175.                     {
  176.                         type = 5;
  177.                     }
  178.                     else if (typeof state.meta.heal !== 'undefined')
  179.                     {
  180.                         type = 3;
  181.                     }
  182.                     else if (typeof state.meta.mp_damage !== 'undefined')
  183.                     {
  184.                         type = 2;
  185.                     }
  186.                     else if (typeof state.meta.mp_recover !== 'undefined' || typeof state.meta.mp_heal !== 'undefined')
  187.                     {
  188.                         type = 4;
  189.                     }
  190.                     else if (typeof state.meta.mp_drain !== 'undefined' && caster !== this && caster.isAlive())
  191.                     {
  192.                         type = 6;
  193.                     }
  194.                     //Types above.
  195.                     if (typeof state.meta.variance !== 'undefined')
  196.                     {
  197.                         variance = Number(state.meta.variance || 0);
  198.                     }
  199.                     if (typeof state.meta.can_critical !== 'undefined')
  200.                     {
  201.                         critical = true;
  202.                     }
  203.  
  204.                     var action = new Game_Action(this);
  205.                     var item_data = {
  206.                         damage: {
  207.                             critical: critical,
  208.                             elementId: element,
  209.                             formula: formula,
  210.                             type: type,
  211.                             variance: variance
  212.                         },
  213.                         hitType: 0,
  214.                         message1: "",
  215.                         message2: "",
  216.                         occasion: 1,
  217.                         repeats: 1,
  218.                         requiredWtypeId1: 0,
  219.                         requiredWtypeId2: 0,
  220.                         scope: 1,
  221.                         speed: 0,
  222.                         stypeId: 1,
  223.                         tpCost: 0,
  224.                         tpGain: 0,
  225.                         effects: [],
  226.                         animationId: null,
  227.                         meta: {},
  228.                         //For compatibility with  Yanfly's cooldown (it doesn't check for the possibility of those being undefined):
  229.                         cooldownChange: {},
  230.                         stypeCooldownChange: {},
  231.                         globalCooldownChange: 0,
  232.                         warmupChange: {},
  233.                         stypeWarmupChange: {},
  234.                         globalWarmupChange: 0
  235.                                 //End of Yanfly's cooldown compatibility
  236.                     };
  237.                     var item = new Game_Item();
  238.                     item._item = item_data;
  239.                     item.object = function() {
  240.                         return this._item;
  241.                     };
  242.                     item.effects = [];
  243.                     action._item = item;
  244.                     action.setSubject(caster);
  245.                     action.apply(this);
  246.                     BattleManager.refreshStatus();
  247.                     if (damage_popup_compatibility !== 1)
  248.                     {
  249.                         this.startDamagePopup();
  250.                     }
  251.                     if (this.isActor())
  252.                     {
  253.                         BattleManager._spriteset._actorSprites.forEach(function(sprite)
  254.                         {
  255.                             if (typeof sprite._battler !== 'undefined' && sprite._battler === this)
  256.                             {
  257.                                 sprite.update();
  258.                             }
  259.                         }, this);
  260.                     }
  261.                     else
  262.                     {
  263.                         BattleManager._spriteset._enemySprites.forEach(function(sprite)
  264.                         {
  265.                             if (typeof sprite._battler !== 'undefined' && sprite._battler === this)
  266.                             {
  267.                                 sprite.update();
  268.                             }
  269.                         }, this);
  270.                     }
  271.                     if (this.isDead())
  272.                     {
  273.                         this.performCollapse();
  274.                     }
  275.                 }
  276.             }, this);
  277.         };
  278.  
  279.         //Clear everything on battle end:
  280.         _alias_gb_obe = Game_Battler.prototype.onBattleEnd;
  281.         Game_Battler.prototype.onBattleEnd = function() {
  282.           _alias_gb_obe.call(this);
  283.           this._stateCasterIndex = [];
  284.         };
  285.     }());

点评

非常感谢!  发表于 2015-11-14 19:50

评分

参与人数 1星屑 +66 收起 理由
余烬之中 + 66 非常感谢

查看全部评分

吸吸
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
248 小时
注册时间
2010-8-22
帖子
127
3
发表于 2015-11-14 20:56:15 | 只看该作者
我也觉得很奇怪 为什么用了ss都打不开 MF……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
81 小时
注册时间
2015-4-19
帖子
68
4
发表于 2015-11-16 15:19:05 | 只看该作者
也可以在F9状态里面设置个”掉血“或”燃烧“状态,没回合持续掉血,这貌似一样吧...
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-15 01:49

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表