| 赞 | 22  | 
 
| VIP | 917 | 
 
| 好人卡 | 110 | 
 
| 积分 | 218 | 
 
| 经验 | 288474 | 
 
| 最后登录 | 2022-10-15 | 
 
| 在线时间 | 6925 小时 | 
 
 
 
 
 
Lv5.捕梦者 (版主) 
	- 梦石
 - 20 
 
        - 星屑
 - 1840 
 
        - 在线时间
 - 6925 小时
 
        - 注册时间
 - 2012-12-14
 
        - 帖子
 - 11485
 
 
     
 
 | 
	
覆盖掉原来的脚本就可以了- #==============================================================================
 
 - # 本脚本来自www.66RPG.com,使用和转载请保留此信息
 
 - #==============================================================================
 
 - class Window_Base < Window
 
 -   def draw_actor_hp2222(actor, x, y, width = 100, height=8)
 
 -     y+=3
 
 -     olx = x
 
 -     oly = y
 
 -     w = width * actor.hp / [actor.maxhp,1].max 
 
 -     hp_color_1 = Color.new(255, 0, 0, 192) 
 
 -     hp_color_2 = Color.new(255, 255, 0, 192) 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2) 
 
 -     x -= 1 
 
 -     y += (height/4).floor 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2) 
 
 -     x -= 1 
 
 -     y += (height/4).ceil 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2) 
 
 -     x -= 1 
 
 -     y += (height/4).ceil 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2) 
 
 -     x = olx
 
 -     y = oly-14   
 
 -     # 描绘字符串 "HP"
 
 -   #  self.contents.font.color = system_color
 
 -   #  self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
 
 -     # 计算描绘 MaxHP 所需的空间 
 
 -     if width - 32 >= 108
 
 -       hp_x = x + width - 108
 
 -       flag = true
 
 -     elsif width - 32 >= 48
 
 -       hp_x = x + width - 48
 
 -       flag = false
 
 -     end
 
 -     # 描绘 HP
 
 -   #  self.contents.font.color = actor.hp == 0 ? knockout_color :
 
 -   #    actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
 
 -   #  self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
 
 -     # 描绘 MaxHP
 
 -     if flag
 
 -       self.contents.font.color = normal_color
 
 -       self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
 
 -       self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
 
 -     end    
 
 -   end
 
 -   def draw_actor_sp2222(actor, x, y, width = 100, height = 8)
 
 -     y+=3
 
 -     olx = x
 
 -     oly = y
 
 -     w = width * actor.sp / [actor.maxsp,1].max 
 
 -     hp_color_1 = Color.new( 0, 0, 255, 192) 
 
 -     hp_color_2 = Color.new( 0, 255, 255, 192) 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2) 
 
 -     x -= 1 
 
 -     y += (height/4).floor 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2) 
 
 -     x -= 1 
 
 -     y += (height/4).ceil 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2) 
 
 -     x -= 1 
 
 -     y += (height/4).ceil 
 
 -     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128)) 
 
 -     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2) 
 
 -     x = olx
 
 -     y = oly-14
 
 -     # 描绘字符串 "SP" 
 
 -   #  self.contents.font.color = system_color
 
 -   #  self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
 
 -     # 计算描绘 MaxSP 所需的空间
 
 -     if width - 32 >= 108
 
 -       sp_x = x + width - 108
 
 -       flag = true
 
 -     elsif width - 32 >= 48
 
 -       sp_x = x + width - 48
 
 -       flag = false
 
 -     end
 
 -     # 描绘 SP
 
 -  #   self.contents.font.color = actor.sp == 0 ? knockout_color :
 
 -  #     actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
 
 -  #   self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
 
 -     # 描绘 MaxSP
 
 -     if flag
 
 -       self.contents.font.color = normal_color
 
 -       self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
 
 -       self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
 
 -     end    
 
 -   end
 
 -   #-------------------------------------------------------------------------- 
 
 -   # ● ライン描画 by 桜雅 在土 
 
 -   #-------------------------------------------------------------------------- 
 
 -   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color) 
 
 -     # 描写距離の計算。大きめに直角時の長さ。 
 
 -     distance = (start_x - end_x).abs + (start_y - end_y).abs 
 
 -     # 描写開始 
 
 -     if end_color == start_color 
 
 -       for i in 1..distance 
 
 -         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i 
 
 -         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i 
 
 -         if width == 1 
 
 -           self.contents.set_pixel(x, y, start_color) 
 
 -         else 
 
 -           self.contents.fill_rect(x, y, width, width, start_color) 
 
 -         end 
 
 -       end 
 
 -     else 
 
 -       for i in 1..distance 
 
 -         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i 
 
 -         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i 
 
 -         r = start_color.red * (distance-i)/distance + end_color.red * i/distance 
 
 -         g = start_color.green * (distance-i)/distance + end_color.green * i/distance 
 
 -         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance 
 
 -         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance 
 
 -         if width == 1 
 
 -           self.contents.set_pixel(x, y, Color.new(r, g, b, a)) 
 
 -         else 
 
 -           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a)) 
 
 -         end 
 
 -       end 
 
 -     end 
 
 -   end 
 
 - end
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |