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

Project1

 找回密码
 注册会员
搜索
查看: 5284|回复: 4

[已经解决] 跪求等级破限脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
19 小时
注册时间
2015-1-24
帖子
9
发表于 2015-2-22 18:05:11 | 显示全部楼层 |阅读模式

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

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

x
跪求等级破限脚本

Lv1.梦旅人

石油鸡

梦石
0
星屑
179
在线时间
287 小时
注册时间
2014-1-27
帖子
232
发表于 2015-2-22 18:37:21 | 显示全部楼层
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自[url]http://www.66rpg.com/[/url],使用和转载请保留此信息
  3. #==============================================================================
  4. #以下可根据需要修改
  5.    BASE_FINAL_LEVEL = 9999       #等级上限
  6.    MAXHP_LIMIT = 999999999      #HP上限
  7.    MAXSP_LIMIT = 999999999      #SP上限
  8.    STR_LIMIT    = 9999999       #力量上限
  9.    DEX_LIMIT    = 9999999       #灵巧上限
  10.    AGI_LIMIT    = 9999999       #敏捷上限
  11.    INT_LIMIT    = 9999999       #智力上限
  12. #以上可根据需要修改
  13. "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"
  14. "┃        自定义内容到此结束,以下内容切勿随意修改        ┃"
  15. "┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛"
  16.  
  17. class Game_Actor < Game_Battler
  18.    def new_final_level
  19.      lv = BASE_FINAL_LEVEL
  20.      #以下上限LV个别指定用
  21.      #case self.id
  22.      #when 1
  23.      #   lv = 255
  24.      #when 2
  25.      #   lv = 999
  26.      #when 8
  27.      #   lv = 15600
  28.      #end
  29.      return lv
  30.    end
  31.    #--------------------------------------------------------------------------
  32.    # ● EXP 计算
  33.    #--------------------------------------------------------------------------
  34.    def make_exp_list
  35.      actor = $data_actors[@actor_id]
  36.      @exp_list = Array.new(new_final_level + 2)
  37.      @exp_list[1] = 0
  38.      pow_i = 2.4 + actor.exp_inflation / 100.0
  39.      for i in 2..new_final_level + 1
  40.        if i > new_final_level
  41.          @exp_list[i] = 0
  42.        else
  43.          n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
  44.          @exp_list[i] = @exp_list[i-1] + Integer(n)
  45.        end
  46.      end
  47.    end
  48.    #--------------------------------------------------------------------------
  49.    # ● MaxHP の取得
  50.    #--------------------------------------------------------------------------
  51.    def maxhp
  52.      n = [[base_maxhp + @maxhp_plus, 1].max, MAXHP_LIMIT].min
  53.      for i in @states
  54.        n *= $data_states[i].maxhp_rate / 100.0
  55.      end
  56.      n = [[Integer(n), 1].max, MAXHP_LIMIT].min
  57.  
  58. return n
  59.    end
  60.    #--------------------------------------------------------------------------
  61.    # ● 基本 MaxHP の取得
  62.    #--------------------------------------------------------------------------
  63.    def base_maxhp
  64.      n = $data_actors[@actor_id].parameters[0, 1]
  65.      n += $data_actors[@actor_id].parameters[0, 2] * @level
  66.      return n
  67.    end
  68.    #--------------------------------------------------------------------------
  69.    # ● 基本 MaxSP の取得
  70.    #--------------------------------------------------------------------------
  71.    def base_maxsp
  72.      n = $data_actors[@actor_id].parameters[1, 1]
  73.      n += $data_actors[@actor_id].parameters[1, 2] * @level
  74.      return n
  75.    end
  76.    #--------------------------------------------------------------------------
  77.    # ● 基本腕力の取得
  78.    #--------------------------------------------------------------------------
  79.    def base_str
  80.      n = $data_actors[@actor_id].parameters[2, 1]
  81.      n += $data_actors[@actor_id].parameters[2, 2] * @level
  82.      weapon = $data_weapons[@weapon_id]
  83.      armor1 = $data_armors[@armor1_id]
  84.      armor2 = $data_armors[@armor2_id]
  85.      armor3 = $data_armors[@armor3_id]
  86.      armor4 = $data_armors[@armor4_id]
  87.      n += weapon != nil ? weapon.str_plus : 0
  88.      n += armor1 != nil ? armor1.str_plus : 0
  89.      n += armor2 != nil ? armor2.str_plus : 0
  90.      n += armor3 != nil ? armor3.str_plus : 0
  91.      n += armor4 != nil ? armor4.str_plus : 0
  92.      return [[n, 1].max, STR_LIMIT].min
  93.    end
  94.    #--------------------------------------------------------------------------
  95.    # ● 基本器用さの取得
  96.    #--------------------------------------------------------------------------
  97.    def base_dex
  98.      n = $data_actors[@actor_id].parameters[3, 1]
  99.      n += $data_actors[@actor_id].parameters[3, 2] * @level
  100.      weapon = $data_weapons[@weapon_id]
  101.      armor1 = $data_armors[@armor1_id]
  102.      armor2 = $data_armors[@armor2_id]
  103.      armor3 = $data_armors[@armor3_id]
  104.      armor4 = $data_armors[@armor4_id]
  105.      n += weapon != nil ? weapon.dex_plus : 0
  106.      n += armor1 != nil ? armor1.dex_plus : 0
  107.      n += armor2 != nil ? armor2.dex_plus : 0
  108.      n += armor3 != nil ? armor3.dex_plus : 0
  109.  
  110.   n += armor4 != nil ? armor4.dex_plus : 0
  111.      return [[n, 1].max, DEX_LIMIT].min
  112.    end
  113.    #--------------------------------------------------------------------------
  114.    # ● 基本素早さの取得
  115.    #--------------------------------------------------------------------------
  116.    def base_agi
  117.      n = $data_actors[@actor_id].parameters[4, 1]
  118.      n += $data_actors[@actor_id].parameters[4, 2] * @level
  119.      weapon = $data_weapons[@weapon_id]
  120.      armor1 = $data_armors[@armor1_id]
  121.      armor2 = $data_armors[@armor2_id]
  122.      armor3 = $data_armors[@armor3_id]
  123.      armor4 = $data_armors[@armor4_id]
  124.      n += weapon != nil ? weapon.agi_plus : 0
  125.      n += armor1 != nil ? armor1.agi_plus : 0
  126.      n += armor2 != nil ? armor2.agi_plus : 0
  127.      n += armor3 != nil ? armor3.agi_plus : 0
  128.      n += armor4 != nil ? armor4.agi_plus : 0
  129.      return [[n, 1].max, AGI_LIMIT].min
  130.    end
  131.    #--------------------------------------------------------------------------
  132.    # ● 基本魔力の取得
  133.    #--------------------------------------------------------------------------
  134.    def base_int
  135.      n = $data_actors[@actor_id].parameters[5, 1]
  136.      n += $data_actors[@actor_id].parameters[5, 2] * @level
  137.      weapon = $data_weapons[@weapon_id]
  138.      armor1 = $data_armors[@armor1_id]
  139.      armor2 = $data_armors[@armor2_id]
  140.      armor3 = $data_armors[@armor3_id]
  141.      armor4 = $data_armors[@armor4_id]
  142.      n += weapon != nil ? weapon.int_plus : 0
  143.      n += armor1 != nil ? armor1.int_plus : 0
  144.      n += armor2 != nil ? armor2.int_plus : 0
  145.      n += armor3 != nil ? armor3.int_plus : 0
  146.      n += armor4 != nil ? armor4.int_plus : 0
  147.      return [[n, 1].max, INT_LIMIT].min
  148.    end
  149.    #--------------------------------------------------------------------------
  150.    # ● EXP の変更
  151.    #      exp : 新しい EXP
  152.    #--------------------------------------------------------------------------
  153.    def exp=(exp)
  154.      # ★EXPの上限チェックを解除
  155.      @exp = [exp, 0].max
  156.      # レベルアップ
  157.      while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  158.        @level += 1
  159.        # スキル习得
  160.  
  161. for j in $data_classes[@class_id].learnings
  162.          if j.level == @level
  163.            learn_skill(j.skill_id)
  164.          end
  165.        end
  166.      end
  167.      # レベルダウン
  168.      while @exp < @exp_list[@level]
  169.        @level -= 1
  170.      end
  171.      # 现在の HP と SP が最大値を超えていたら修正
  172.      @hp = [@hp, self.maxhp].min
  173.      @sp = [@sp, self.maxsp].min
  174.    end
  175.    #--------------------------------------------------------------------------
  176.    # ● レベルの変更
  177.    #      level : 新しいレベル
  178.    #--------------------------------------------------------------------------
  179.    def level=(level)
  180.      # 上下限チェック
  181.      # ★LV上限をnew_final_levelでチェックするように変更
  182.      level = [[level, new_final_level].min, 1].max
  183.      # EXP を変更
  184.      self.exp = @exp_list[level]
  185.    end
  186. end
  187.  
  188.  
  189. class Game_Battler
  190.    #--------------------------------------------------------------------------
  191.    # ● MaxSP の取得
  192.    #--------------------------------------------------------------------------
  193.    def maxsp
  194.      n = [[base_maxsp + @maxsp_plus, 0].max, MAXSP_LIMIT].min
  195.      for i in @states
  196.        n *= $data_states[i].maxsp_rate / 100.0
  197.      end
  198.      n = [[Integer(n), 0].max, MAXSP_LIMIT].min
  199.      return n
  200.    end
  201.    #--------------------------------------------------------------------------
  202.    # ● 腕力の取得
  203.    #--------------------------------------------------------------------------
  204.    def str
  205.      n = [[base_str + @str_plus, 1].max, STR_LIMIT].min
  206.      for i in @states
  207.        n *= $data_states[i].str_rate / 100.0
  208.      end
  209.      n = [[Integer(n), 1].max, STR_LIMIT].min
  210.      return n
  211.    end
  212.    #--------------------------------------------------------------------------
  213.    # ● 器用さの取得
  214.    #--------------------------------------------------------------------------
  215.    def dex
  216.      n = [[base_dex + @dex_plus, 1].max, DEX_LIMIT].min
  217.      for i in @states
  218.        n *= $data_states[i].dex_rate / 100.0
  219.  
  220. end
  221.      n = [[Integer(n), 1].max, DEX_LIMIT].min
  222.      return n
  223.    end
  224.    #--------------------------------------------------------------------------
  225.    # ● 素早さの取得
  226.    #--------------------------------------------------------------------------
  227.    def agi
  228.      n = [[base_agi + @agi_plus, 1].max, AGI_LIMIT].min
  229.      for i in @states
  230.        n *= $data_states[i].agi_rate / 100.0
  231.      end
  232.      n = [[Integer(n), 1].max, AGI_LIMIT].min
  233.      return n
  234.    end
  235.    #--------------------------------------------------------------------------
  236.    # ● 魔力の取得
  237.    #--------------------------------------------------------------------------
  238.    def int
  239.      n = [[base_int + @int_plus, 1].max, INT_LIMIT].min
  240.      for i in @states
  241.        n *= $data_states[i].int_rate / 100.0
  242.      end
  243.      n = [[Integer(n), 1].max, INT_LIMIT].min
  244.      return n
  245.    end
  246.    #--------------------------------------------------------------------------
  247.    # ● MaxHP の设定
  248.    #      maxhp : 新しい MaxHP
  249.    #--------------------------------------------------------------------------
  250.    def maxhp=(maxhp)
  251.      @maxhp_plus += maxhp - self.maxhp
  252.      @maxhp_plus = [[@maxhp_plus, -MAXHP_LIMIT].max, MAXHP_LIMIT].min
  253.      @hp = [@hp, self.maxhp].min
  254.    end
  255.    #--------------------------------------------------------------------------
  256.    # ● MaxSP の设定
  257.    #      maxsp : 新しい MaxSP
  258.    #--------------------------------------------------------------------------
  259.    def maxsp=(maxsp)
  260.      @maxsp_plus += maxsp - self.maxsp
  261.      @maxsp_plus = [[@maxsp_plus, -MAXSP_LIMIT].max, MAXSP_LIMIT].min
  262.      @sp = [@sp, self.maxsp].min
  263.    end
  264.    #--------------------------------------------------------------------------
  265.    # ● 腕力の设定
  266.    #      str : 新しい腕力
  267.    #--------------------------------------------------------------------------
  268.    def str=(str)
  269.      @str_plus += str - self.str
  270.      @str_plus = [[@str_plus, -STR_LIMIT].max, STR_LIMIT].min
  271.    end
  272.    #--------------------------------------------------------------------------
  273.    # ● 器用さの设定
  274.    #      dex : 新しい器用さ
  275.    #--------------------------------------------------------------------------
  276.    def dex=(dex)
  277.      @dex_plus += dex - self.dex
  278.      @dex_plus = [[@dex_plus, -DEX_LIMIT].max, DEX_LIMIT].min
  279.    end
  280.    #--------------------------------------------------------------------------
  281.    # ● 素早さの设定
  282.    #      agi : 新しい素早さ
  283.    #--------------------------------------------------------------------------
  284.    def agi=(agi)
  285.      @agi_plus += agi - self.agi
  286.      @agi_plus = [[@agi_plus, -AGI_LIMIT].max, AGI_LIMIT].min
  287.    end
  288.    #--------------------------------------------------------------------------
  289.    # ● 魔力の设定
  290.    #      int : 新しい魔力
  291.    #--------------------------------------------------------------------------
  292.    def int=(int)
  293.      @int_plus += int - self.int
  294.      @int_plus = [[@int_plus, -INT_LIMIT].max, INT_LIMIT].min
  295.    end
  296. end
  297. #==============================================================================
  298. # 本脚本来自[url]http://www.66rpg.com/[/url],使用和转载请保留此信息
  299. #==============================================================================

评分

参与人数 1星屑 +200 收起 理由
RyanBern + 200 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
19 小时
注册时间
2015-1-24
帖子
9
 楼主| 发表于 2015-2-22 18:42:10 | 显示全部楼层
1041235896 发表于 2015-2-22 18:37
#==============================================================================
# 本脚本来自http://w ...

谢谢,拿走了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
25 小时
注册时间
2015-7-11
帖子
18
发表于 2015-8-14 18:08:55 | 显示全部楼层
完全没看懂脚本该怎么用...

点评

坟贴勿回,谢谢合作  发表于 2015-8-14 18:44
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
25 小时
注册时间
2015-7-11
帖子
18
发表于 2015-8-14 18:49:49 | 显示全部楼层
1级就有千血....

评分

参与人数 1星屑 -10 收起 理由
RyanBern -10 坟贴勿回,如果有问题请重新开一帖询问.

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-28 16:24

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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