查看: 3068|回复: 2

[已经过期] 求教模仿HP伤害值美化脚本实现SP伤害美化

[复制链接]
梦石
0
星屑
80
在线时间
196 小时
注册时间
2013-8-7
回帖
13
发表于 2016-8-20 03:55:48 | 显示全部楼层 |阅读模式

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

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

×
如题,范例里的脚本只能美化HP伤害值,众所周知XP里的SP伤害变化是不直接显示的,例如我想让角色吃魔法剂恢复500SP,让500以蓝色的数字显示出来,而如果发生SP减少的情况也要以别的颜色显示出来

Project1.rar

206 KB, 下载次数: 43

梦石
0
星屑
125
在线时间
171 小时
注册时间
2014-4-14
回帖
135
发表于 2016-8-20 14:18:27 | 显示全部楼层
本帖最后由 2357691704 于 2016-8-20 14:20 编辑

美化不会弄。
sp伤害显示
  1. #==========================================================================
  2. # 本脚本来自[url]www.66rpg.com[/url],用于任何游戏请保留此信息。别以为加密就可以del哦
  3. #==========================================================================
  4. #==============================================================================
  5. # SP伤害显示 v1.0
  6. #==============================================================================
  7. # By 叶子  Date: 12-25-2005
  8. # “23种战斗特效的公共事件版”作者:SailCat
  9. # 本脚本同时整合了 SailCat 的“23种战斗特效的公共事件版”脚本
  10. # 请访问shownews.asp?id=19 学习“23种战斗特效的公共事件版”的使用
  11. # 感谢 SailCat,为战斗特效创造了无数可能
  12. #==============================================================================
  13. # SP伤害颜色设定:
  14. #搜索 bitmap.font.color.set
  15. # 显示使用者SP变化的特技:
  16. # 在SHOW_SP_DAMAGE_SKILLS后面的中括号中填上需要显示使用者SP变化的特技ID,
  17. # 中间以逗号“ , ”隔开
  18. # 例如要5号,8号,16号特技显示使用者SP变化:
  19. # SHOW_SP_DAMAGE_SKILLS = [5,8,16]
  20. class Scene_Battle
  21. SHOW_SP_DAMAGE_SKILLS = [1,2,3,4,5,6,7,8,9,10,57,58,59,60]
  22. end
  23. class Game_Battler
  24.   attr_accessor :sp_damage_pop
  25.   attr_accessor :sp_damage
  26.   end
  27. #==============================================================================
  28. # ■ Sprite_Battler
  29. #------------------------------------------------------------------------------
  30. #  战斗显示用活动块。Game_Battler 类的实例监视、
  31. # 活动块的状态的监视。
  32. #==============================================================================
  33. class Sprite_Battler < RPG::Sprite
  34. #--------------------------------------------------------------------------
  35. # ● 刷新画面
  36. #--------------------------------------------------------------------------
  37. def update
  38.    super
  39.    # 战斗者为 nil 的情况下
  40.    if [url=home.php?mod=space&uid=133701]@battler[/url] == nil
  41.      self.bitmap = nil
  42.      loop_animation(nil)
  43.      return
  44.    end
  45.    # 文件名和色相与当前情况有差异的情况下
  46.    if @battler.battler_name != @battler_name or
  47.       @battler.battler_hue != @battler_hue
  48.      # 获取、设置位图
  49.      @battler_name = @battler.battler_name
  50.      @battler_hue = @battler.battler_hue
  51.      self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
  52.      @width = bitmap.width
  53.      [url=home.php?mod=space&uid=291977]@height[/url] = bitmap.height
  54.      self.ox = @width / 2
  55.      self.oy = @height
  56.      # 如果是战斗不能或者是隐藏状态就把透明度设置成 0
  57.      if @battler.dead? or @battler.hidden
  58.        self.opacity = 0
  59.      end
  60.    end
  61.    # 动画 ID 与当前的情况有差异的情况下
  62.    if @battler.damage == nil and
  63.       @battler.state_animation_id != @state_animation_id
  64.      @state_animation_id = @battler.state_animation_id
  65.      loop_animation($data_animations[@state_animation_id])
  66.    end
  67.    # 应该被显示的角色的情况下
  68.    if @battler.is_a?(Game_Actor) and @battler_visible
  69.      # 不是主状态的时候稍稍降低点透明度
  70.      if $game_temp.battle_main_phase
  71.        self.opacity += 3 if self.opacity < 255
  72.      else
  73.        self.opacity -= 3 if self.opacity > 207
  74.      end
  75.    end
  76.    # 明灭
  77.    if @battler.blink
  78.      blink_on
  79.    else
  80.      blink_off
  81.    end
  82.    # 不可见的情况下
  83.    unless @battler_visible
  84.      # 出现
  85.      if not @battler.hidden and not @battler.dead? and
  86.         (@battler.damage == nil or @battler.damage_pop)
  87.        appear
  88.        @battler_visible = true
  89.      end
  90.    end
  91.    # 可见的情况下
  92.    if @battler_visible
  93.      # 逃跑
  94.      if @battler.hidden
  95.        $game_system.se_play($data_system.escape_se)
  96.        escape
  97.        @battler_visible = false
  98.      end
  99.      # 白色闪烁
  100.      if @battler.white_flash
  101.        whiten
  102.        @battler.white_flash = false
  103.      end
  104.      # 动画
  105.      if @battler.animation_id != 0
  106.        animation = $data_animations[@battler.animation_id]
  107.        animation(animation, @battler.animation_hit)
  108.        @battler.animation_id = 0
  109.      end
  110.      # 伤害
  111.      if @battler.damage_pop
  112.        damage(@battler.damage, @battler.critical)
  113.        @battler.damage = nil
  114.        @battler.critical = false
  115.        @battler.damage_pop = false
  116.      end
  117.      #---------------------------------
  118.      # SP伤害
  119.      if @battler.sp_damage_pop
  120.        sp_damage(@battler.sp_damage)
  121.        @battler.sp_damage = nil
  122.        @battler.sp_damage_pop = false
  123.      end
  124.      #---------------------------------
  125.      # korapusu
  126.      if @battler.damage == nil and @battler.dead?
  127.        if @battler.is_a?(Game_Enemy)
  128.          $game_system.se_play($data_system.enemy_collapse_se)
  129.        else
  130.          $game_system.se_play($data_system.actor_collapse_se)
  131.        end
  132.        collapse
  133.        @battler_visible = false
  134.      end
  135.    end
  136.    # 设置活动块的坐标
  137.    self.x = @battler.screen_x
  138.    self.y = @battler.screen_y
  139.    self.z = @battler.screen_z
  140. end
  141. end

  142. #==============================================================================
  143. #--
  144. # RPG::Sprite
  145. # 追加了 RPGXP 使用的各种效果处理的精灵的类。
  146. #--
  147. #==============================================================================
  148. module RPG
  149. class Sprite < ::Sprite
  150.    def initialize(viewport = nil)
  151.      super(viewport)
  152.      @_whiten_duration = 0
  153.      @_appear_duration = 0
  154.      @_escape_duration = 0
  155.      @_collapse_duration = 0
  156.      @_damage_duration = 0
  157.      @_sp_damage_duration = 0
  158.      @_animation_duration = 0
  159.      @_blink = false
  160.    end
  161.    def dispose
  162.      dispose_damage
  163.      dispose_sp_damage
  164.      dispose_animation
  165.      dispose_loop_animation
  166.      super
  167.    end
  168.    def sp_damage(value)
  169.      dispose_sp_damage
  170.      if value.is_a?(Numeric)
  171.        damage_string = value.abs.to_s
  172.      else
  173.        damage_string = value.to_s
  174.      end
  175.      bitmap = Bitmap.new(160, 48)
  176.      bitmap.font.name = "Arial Black"
  177.      bitmap.font.size = 32
  178.      bitmap.font.color.set(0, 0, 0)
  179.      bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
  180.      bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
  181.      bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
  182.      bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
  183.      if value.is_a?(Numeric) and value < 0
  184.        bitmap.font.color.set(170, 11, 127) # 粉紫
  185.      else
  186.        bitmap.font.color.set(0, 0, 205) # 适中的蓝色
  187.      end
  188.      bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
  189.      @_sp_damage_sprite = ::Sprite.new(self.viewport)
  190.      @_sp_damage_sprite.bitmap = bitmap
  191.      @_sp_damage_sprite.ox = 80
  192.      @_sp_damage_sprite.oy = 100
  193.      @_sp_damage_sprite.x = self.x
  194.      @_sp_damage_sprite.y = self.y - self.oy / 2
  195.      @_sp_damage_sprite.z = 3000
  196.      @_sp_damage_duration = 40
  197.    end
  198.    def dispose_sp_damage
  199.      if @_sp_damage_sprite != nil
  200.        @_sp_damage_sprite.bitmap.dispose
  201.        @_sp_damage_sprite.dispose
  202.        @_sp_damage_sprite = nil
  203.        @_sp_damage_duration = 0
  204.      end
  205.    end
  206.    def effect?
  207.      @_whiten_duration > 0 or
  208.      @_appear_duration > 0 or
  209.      @_escape_duration > 0 or
  210.      @_collapse_duration > 0 or
  211.      @_damage_duration > 0 or
  212.      @_sp_damage_duration > 0 or
  213.      @_animation_duration > 0
  214.    end
  215.    def update
  216.      super
  217.      if @_whiten_duration > 0
  218.        @_whiten_duration -= 1
  219.        self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  220.      end
  221.      if @_appear_duration > 0
  222.        @_appear_duration -= 1
  223.        self.opacity = (16 - @_appear_duration) * 16
  224.      end
  225.      if @_escape_duration > 0
  226.        @_escape_duration -= 1
  227.        self.opacity = 256 - (32 - @_escape_duration) * 10
  228.      end
  229.      if @_collapse_duration > 0
  230.        @_collapse_duration -= 1
  231.        self.opacity = 256 - (48 - @_collapse_duration) * 6
  232.      end
  233.      if @_damage_duration > 0
  234.        @_damage_duration -= 1
  235.        case @_damage_duration
  236.        when 38..39
  237.          @_damage_sprite.y -= 4
  238.        when 36..37
  239.          @_damage_sprite.y -= 2
  240.        when 34..35
  241.          @_damage_sprite.y += 2
  242.        when 28..33
  243.          @_damage_sprite.y += 4
  244.        end
  245.        @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
  246.        if @_damage_duration == 0
  247.          dispose_damage
  248.        end
  249.      end
  250.      #---------------------------------
  251.      if @_sp_damage_duration > 0
  252.        @_sp_damage_duration -= 1
  253.        case @_sp_damage_duration
  254.        # 这里把SP伤害数值的显示设成往上飘了
  255.        # 如要往下飘,把@_sp_damage_sprite.y后的-换成+
  256.        when 0..39
  257.          @_sp_damage_sprite.y -= 1
  258.        end
  259.        @_sp_damage_sprite.opacity = 256 - (40 - @_sp_damage_duration) * 7
  260.        if @_sp_damage_duration == 0
  261.          dispose_sp_damage
  262.        end
  263.      end
  264.      #---------------------------------
  265.      if @_animation != nil and (Graphics.frame_count % 2 == 0)
  266.        @_animation_duration -= 1
  267.        update_animation
  268.      end
  269.      if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  270.        update_loop_animation
  271.        @_loop_animation_index += 1
  272.        @_loop_animation_index %= @_loop_animation.frame_max
  273.      end
  274.      if @_blink
  275.        @_blink_count = (@_blink_count + 1) % 32
  276.        if @_blink_count < 16
  277.          alpha = (16 - @_blink_count) * 6
  278.        else
  279.          alpha = (@_blink_count - 16) * 6
  280.        end
  281.        self.color.set(255, 255, 255, alpha)
  282.      end
  283.      @@_animations.clear
  284.    end
  285. end
  286. end
  287. #==============================================================================
  288. #23种战斗特效的公共事件版(整合SP伤害显示)
  289. #原作者:SailCat
  290. #整合:叶子
  291. #Date: 12-25-2005
  292. #==============================================================================
  293. class Game_Battler
  294. #--------------------------------------------------------------------------
  295. # ● 定义实例变量
  296. #--------------------------------------------------------------------------
  297. attr_reader   :last_hp                  # 受效前的HP
  298. attr_accessor :sp_damage                   # SP伤害值
  299. attr_accessor :last_sp                            # 受效前的SP
  300. attr_accessor :sp_damage_pop               # 显示SP伤害标志
  301. end
  302. class Scene_Battle
  303. #--------------------------------------------------------------------------
  304. # ● 定义实例变量
  305. #--------------------------------------------------------------------------
  306. attr_accessor :target_battlers
  307. attr_accessor :active_battler
  308. attr_reader :skill
  309. #--------------------------------------------------------------------------
  310. # ● 开始主回合
  311. #--------------------------------------------------------------------------
  312. def start_phase4
  313.    #---------------------------------
  314.    # 记录上回合SP
  315.    for actor in $game_party.actors
  316.      actor.last_sp = actor.sp
  317.    end
  318.    for enemy in $game_troop.enemies
  319.      enemy.last_sp = enemy.sp
  320.    end
  321.    #---------------------------------
  322.    # 转移到回合 4
  323.    @phase = 4
  324.    # 回合数计数
  325.    $game_temp.battle_turn += 1
  326.    # 搜索全页的战斗事件
  327.    for index in 0...$data_troops[@troop_id].pages.size
  328.      # 获取事件页
  329.      page = $data_troops[@troop_id].pages[index]
  330.      # 本页的范围是 [回合] 的情况下
  331.      if page.span == 1
  332.        # 设置已经执行标志
  333.        $game_temp.battle_event_flags[index] = false
  334.      end
  335.    end
  336.    # 设置角色为非选择状态
  337.    @actor_index = -1
  338.    @active_battler = nil
  339.    # 有效化同伴指令窗口
  340.    @party_command_window.active = false
  341.    @party_command_window.visible = false
  342.    # 无效化角色指令窗口
  343.    @actor_command_window.active = false
  344.    @actor_command_window.visible = false
  345.    # 设置主回合标志
  346.    $game_temp.battle_main_phase = true
  347.    # 生成敌人行动
  348.    for enemy in $game_troop.enemies
  349.      enemy.make_action
  350.    end
  351.    # 生成行动顺序
  352.    make_action_orders
  353.    # 移动到步骤 1
  354.    @phase4_step = 1
  355. end
  356. #--------------------------------------------------------------------------
  357. # ● 刷新画面
  358. #--------------------------------------------------------------------------
  359. def update
  360.    # 执行战斗事件中的情况下
  361.    if $game_system.battle_interpreter.running?
  362.      # 刷新解释器
  363.      $game_system.battle_interpreter.update
  364.      # 强制行动的战斗者不存在的情况下
  365.      if $game_temp.forcing_battler == nil
  366.        # 执行战斗事件结束的情况下
  367.        unless $game_system.battle_interpreter.running?
  368.          # 继续战斗的情况下、再执行战斗事件的设置
  369.          unless @common_event_id != 0
  370.            unless judge
  371.              setup_battle_event
  372.            end
  373.          end
  374.        end
  375.        # 如果不是结束战斗回合的情况下
  376.        if @phase != 5 and @common_event_id == 0
  377.          # 刷新状态窗口
  378.          @status_window.refresh
  379.        end
  380.      end
  381.    end
  382.    # 系统 (计时器)、刷新画面
  383.    $game_system.update
  384.    $game_screen.update
  385.    # 计时器为 0 的情况下
  386.    if $game_system.timer_working and $game_system.timer == 0
  387.      # 中断战斗
  388.      $game_temp.battle_abort = true
  389.    end
  390.    # 刷新窗口
  391.    @help_window.update
  392.    @party_command_window.update
  393.    @actor_command_window.update
  394.    @status_window.update
  395.    @message_window.update
  396.    # 刷新活动块
  397.    @spriteset.update
  398.    # 处理过渡中的情况下
  399.    if $game_temp.transition_processing
  400.      # 清除处理过渡中标志
  401.      $game_temp.transition_processing = false
  402.      # 执行过渡
  403.      if $game_temp.transition_name == ""
  404.        Graphics.transition(20)
  405.      else
  406.        Graphics.transition(40, "Graphics/Transitions/" +
  407.          $game_temp.transition_name)
  408.      end
  409.    end
  410.    # 显示信息窗口中的情况下
  411.    if $game_temp.message_window_showing
  412.      return
  413.    end
  414.    # 显示效果中的情况下
  415.    if @spriteset.effect?
  416.      return
  417.    end
  418.    # 游戏结束的情况下
  419.    if $game_temp.gameover
  420.      # 切换到游戏结束画面
  421.      $scene = Scene_Gameover.new
  422.      return
  423.    end
  424.    # 返回标题画面的情况下
  425.    if $game_temp.to_title
  426.      # 切换到标题画面
  427.      $scene = Scene_Title.new
  428.      return
  429.    end
  430.    # 中断战斗的情况下
  431.    if $game_temp.battle_abort
  432.      # 还原为战斗前的 BGM
  433.      $game_system.bgm_play($game_temp.map_bgm)
  434.      # 战斗结束
  435.      battle_end(1)
  436.      return
  437.    end
  438.    # 等待中的情况下
  439.    if @wait_count > 0
  440.      # 减少等待计数
  441.      @wait_count -= 1
  442.      return
  443.    end
  444.    # 强制行动的角色存在、
  445.    # 并且战斗事件正在执行的情况下
  446.    if $game_temp.forcing_battler == nil and
  447.       $game_system.battle_interpreter.running?
  448.      return
  449.    end
  450.    # 回合分支
  451.    case @phase
  452.    when 1  # 自由战斗回合
  453.      update_phase1
  454.    when 2  # 同伴命令回合
  455.      update_phase2
  456.    when 3  # 角色命令回合
  457.      update_phase3
  458.    when 4  # 主回合
  459.      update_phase4
  460.    when 5  # 战斗结束回合
  461.      update_phase5
  462.    end
  463. end
  464. #--------------------------------------------------------------------------
  465. # ● 刷新画面 (主回合步骤 3 : 行动方动画)
  466. #--------------------------------------------------------------------------
  467. def update_phase4_step3
  468.    # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  469.    if @animation1_id == 0
  470.      @active_battler.white_flash = true
  471.    else
  472.      @active_battler.animation_id = @animation1_id
  473.      @active_battler.animation_hit = true
  474.    end
  475.    # 公共事件 ID 有效的情况下
  476.    if @common_event_id > 0
  477.      # 设置事件
  478.      common_event = $data_common_events[@common_event_id]
  479.      $game_system.battle_interpreter.setup(common_event.list, 0)
  480.    end
  481.    # 移至步骤 4
  482.    @phase4_step = 4
  483. end
  484. #--------------------------------------------------------------------------
  485. # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  486. #--------------------------------------------------------------------------
  487. def update_phase4_step5
  488.    # 隐藏帮助窗口
  489.    @help_window.visible = false
  490.    # 刷新状态窗口
  491.    @status_window.refresh
  492.    # 显示伤害
  493.    for target in @target_battlers
  494.      if target.damage != nil
  495.        target.damage_pop = true
  496.      end
  497.      #---------------------------------
  498.      # 显示SP伤害
  499.      if target.last_sp != nil and target.exist?
  500.        target.sp_damage = target.sp - target.last_sp
  501.        unless target.sp_damage == 0
  502.          target.sp_damage_pop = true
  503.        end
  504.      end
  505.      #---------------------------------
  506.    end
  507.    if @active_battler.damage != nil
  508.      @active_battler.damage_pop = true
  509.    end
  510.    #---------------------------------
  511.    # 特定技能显示SP伤害
  512.    if SHOW_SP_DAMAGE_SKILLS.include?(@active_battler.current_action.skill_id)
  513.      @active_battler.sp_damage = @active_battler.sp - @active_battler.last_sp
  514.      @active_battler.sp_damage_pop = true
  515.    end
  516.    #---------------------------------
  517.    # 移至步骤 6
  518.    @phase4_step = 6
  519. end
  520. #--------------------------------------------------------------------------
  521. # ● 刷新画面 (主回合步骤 6 : 刷新)
  522. #--------------------------------------------------------------------------
  523. def update_phase4_step6
  524.    # 清除强制行动对像的战斗者
  525.    $game_temp.forcing_battler = nil
  526.    # 移至步骤 1
  527.    @phase4_step = 1
  528. end
  529. end
  530. #==========================================================================
  531. # 本脚本来自[url]www.66rpg.com[/url],用于任何游戏请保留此信息。别以为加密就可以del哦
  532. #==========================================================================
复制代码

顺便把你的脚本贴出来,让大神修改。
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #==============================================================================
  4. # ============================================================================
  5. # 伤害效果美化 v1.0 by SailCat
  6. # ============================================================================

  7. # 脚本使用说明:

  8. # 1.使用时需要将Damage.png复制到你的游戏的Graphics/Pictures目录下

  9. # 2.Damage.png文件的格式:

  10. #   大小为180 x 96

  11. #   (0, 0) - (179, 31)为伤害值的数字表,其中每个数字宽18,高32

  12. #   (0, 32) - (179, 63)为回复值(伤害负值)的数字表,其中每个数字宽18,高32

  13. #   (0, 64) - (89, 95)为会心一击标记的图画,长宽为90 x 32

  14. #   (90, 64) - (179, 95)为未命中标记的图画,长宽为90 x 32

  15. # ============================================================================

  16. module RPG

  17.   class Sprite < ::Sprite

  18.     #--------------------------------------------------------------------------

  19.     # ● 伤害值描画

  20.     #--------------------------------------------------------------------------

  21.     def damage(value, critical)

  22.       # 释放伤害

  23.       dispose_damage

  24.       # 如果伤害值是数值

  25.       if value.is_a?(Numeric)

  26.         # 绝对值转为字符串

  27.         damage_string = value.abs.to_s

  28.       else

  29.         # 转为字符串

  30.         damage_string = value.to_s

  31.       end

  32.       # 初始化位图

  33.       bitmap = Bitmap.new(162, 64)

  34.       bitmap.font.name = "Arial Black"

  35.       bitmap.font.size = 32

  36.       # 伤害值是数值的情况下

  37.       if value.is_a?(Numeric)

  38.         # 分割伤害值字符串

  39.         damage_array = damage_string.scan(/./)

  40.         damage_x = 81 - damage_string.size * 9

  41.         # 伤害值为负的情况下

  42.         if value < 0

  43.           # 调用回复数字表

  44.           rect_y = 32

  45.         else

  46.           # 调用伤害数字表

  47.           rect_y = 0

  48.         end

  49.         # 循环伤害值字符串

  50.         for char in damage_array

  51.           number = char.to_i

  52.           # 显示伤害数字

  53.           bitmap.blt(damage_x, 32, RPG::Cache.picture("Damage"),

  54.             Rect.new(number * 18, rect_y, 18, 32))

  55.           # 后移一位

  56.           damage_x += 18

  57.         end

  58.       # 伤害值不是数值的情况

  59.       else

  60.         # 如果伤害值不是 Miss

  61.         unless value == "Miss"

  62.           # 系统默认描画字符串

  63.           bitmap.font.color.set(0, 0, 0)

  64.           bitmap.draw_text(-1, 27, 162, 36, damage_string, 1)

  65.           bitmap.draw_text(+1, 27, 162, 36, damage_string, 1)

  66.           bitmap.draw_text(-1, 29, 162, 36, damage_string, 1)

  67.           bitmap.draw_text(+1, 29, 162, 36, damage_string, 1)

  68.           bitmap.font.color.set(255, 255, 255)

  69.           bitmap.draw_text(0, 28, 162, 36, damage_string, 1)

  70.         # Miss 的情况下

  71.         else

  72.           # 显示未击中图画

  73.           bitmap.blt(36, 28, RPG::Cache.picture("Damage"), Rect.new(90, 64, 90, 32))

  74.         end

  75.       end

  76.       # 会心一击标志打开的情况

  77.       if critical

  78.         # 显示会心一击图画

  79.         bitmap.blt(36, 0, RPG::Cache.picture("Damage"), Rect.new(0, 64, 90, 32))

  80.       end

  81.       # 伤害值定位

  82.       @_damage_sprite = ::Sprite.new(self.viewport)

  83.       @_damage_sprite.bitmap = bitmap

  84.       @_damage_sprite.ox = 81

  85.       @_damage_sprite.oy = 20

  86.       @_damage_sprite.x = self.x

  87.       @_damage_sprite.y = self.y - self.oy / 2

  88.       @_damage_sprite.z = 3000

  89.       @_damage_duration = 40

  90.     end

  91.   end

  92. end
  93. #==============================================================================
  94. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  95. #==============================================================================
复制代码

点评

厉害,不过恢复SP还是不显示的,另外40和53行脚本多了一些代码,需要删除~  发表于 2016-8-20 18:49
Vanyogin
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部