Project1

标题: 用了战斗血条简洁版脚本 为什么血条中间一条吧人物给遮住了 求修改 [打印本页]

作者: 只为歌笑    时间: 2012-7-28 08:58
标题: 用了战斗血条简洁版脚本 为什么血条中间一条吧人物给遮住了 求修改
大家帮帮我  用了战斗血条简洁版脚本 为什么血条中间一条吧人物给遮住了  求修改  就是把血条透明的显示在人物下方不要遮住人物   
dsu_plus_rewardpost_czw
作者: 只为歌笑    时间: 2012-7-28 09:01
本帖最后由 hcm 于 2012-8-14 08:53 编辑
  1. #========================================================================
  2. # 本脚本来自www. 66RPG .com,使用和转载请保留此信息
  3. #========================================================================
  4. # —————————————————————————————————
  5. # ▼▲▼ XRXS_BP 2. HP,SPメーター表示 ▼▲▼
  6. # by 桜雅 在土
  7. #========================================================================
  8. # ■ Window_BattleStatus
  9. #========================================================================
  10. class Window_BattleStatus < Window_Base
  11.   #-----------------------------------------------------------------------
  12.   # ● 初始化
  13.   #-----------------------------------------------------------------------
  14.   alias xrxs_bp2_refresh refresh
  15.   def refresh
  16.     xrxs_bp2_refresh
  17.     @item_max = $game_party.actors.size
  18.     for i in 0...$game_party.actors.size
  19.       actor = $game_party.actors[i]
  20.       actor_x = i * 160 + 4
  21.       draw_actor_hp_meter(actor, actor_x, 32, 120)
  22.       draw_actor_sp_meter(actor, actor_x, 64, 120)
  23.     end
  24.   end
  25. end
  26. #========================================================================
  27. # ■ Window_Base
  28. #========================================================================
  29. class Window_Base < Window
  30.   #-----------------------------------------------------------------------
  31.   # ● HP描画
  32.   #-----------------------------------------------------------------------
  33.   def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  34.     if type == 1 and actor.hp == 0
  35.       return
  36.     end
  37.     self.contents.font.color = system_color
  38.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  39.     w = width * actor.hp / [actor.maxhp,1].max
  40.     self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  41.     self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  42.     self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  43.     self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  44.   end
  45.   #-----------------------------------------------------------------------
  46.   # ● SP描画
  47.   #-----------------------------------------------------------------------
  48.   def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  49.     if type == 1 and actor.hp == 0
  50.       return
  51.     end
  52.     self.contents.font.color = system_color
  53.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  54.     w = width * actor.sp / [actor.maxsp,1].max
  55.     self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  56.     self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  57.     self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  58.     self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  59.   end
  60. end
  61. #========================================================================
  62. # 本脚本来自www. 66RPG .com,使用和转载请保留此信息
  63. #========================================================================
复制代码

作者: 只为歌笑    时间: 2012-7-28 09:03
以上脚本求人修改为血条稍透明显示在人物内不要遮住人物
作者: 爆焰    时间: 2012-7-29 23:57

  1. #========================================================================
  2. # ■ Window_Base
  3. #========================================================================
  4. class Window_Base < Window
  5.   #-----------------------------------------------------------------------
  6.   # ● HP描画
  7.   #-----------------------------------------------------------------------
  8.   def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  9.     if type == 1 and actor.hp == 0
  10.       return
  11.     end
  12.     self.contents.font.color = system_color
  13.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  14.     w = width * actor.hp / [actor.maxhp,1].max
  15.     self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  16.     self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  17.     self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  18.     self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  19.   end
  20.   #-----------------------------------------------------------------------
  21.   # ● SP描画
  22.   #-----------------------------------------------------------------------
  23.   def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  24.     if type == 1 and actor.hp == 0
  25.       return
  26.     end
  27.     self.contents.font.color = system_color
  28.     self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  29.     w = width * actor.sp / [actor.maxsp,1].max
  30.     self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  31.     self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  32.     self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  33.     self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  34.   end
  35. end

  36. class Window_BattleStatus < Window_Base
  37.   #--------------------------------------------------------------------------
  38.   # ● 初始化对像
  39.   #--------------------------------------------------------------------------
  40.   def initialize
  41.     super(0, 320, 640, 160)
  42.     self.contents = Bitmap.new(width - 32, height - 32)
  43.     @level_up_flags = [false, false, false, false]
  44.     refresh
  45.   end
  46.   #--------------------------------------------------------------------------
  47.   # ● 释放
  48.   #--------------------------------------------------------------------------
  49.   def dispose
  50.     super
  51.   end
  52.   #--------------------------------------------------------------------------
  53.   # ● 设置升级标志
  54.   #     actor_index : 角色索引
  55.   #--------------------------------------------------------------------------
  56.   def level_up(actor_index)
  57.     @level_up_flags[actor_index] = true
  58.   end
  59.   #--------------------------------------------------------------------------
  60.   # ● 刷新
  61.   #--------------------------------------------------------------------------
  62.   def refresh
  63.     self.contents.clear
  64.     @item_max = $game_party.actors.size
  65.     for i in 0...$game_party.actors.size
  66.       actor = $game_party.actors[i]
  67.       actor_x = i * 160 + 4
  68.       draw_actor_name(actor, actor_x, 0)
  69.       draw_actor_hp_meter(actor, actor_x, 48, 120)
  70.       draw_actor_sp_meter(actor, actor_x, 64, 120)
  71.       draw_actor_hp(actor, actor_x, 55, 120)
  72.       draw_actor_sp(actor, actor_x, 71, 120)
  73.       if @level_up_flags[i]
  74.         self.contents.font.color = normal_color
  75.         self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
  76.       else
  77.         draw_actor_state(actor, actor_x, 96)
  78.       end
  79.     end
  80.   end
  81. end
复制代码





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1