赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 6059 |
最后登录 | 2017-5-29 |
在线时间 | 274 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 274 小时
- 注册时间
- 2008-2-18
- 帖子
- 219
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
下载地址:http://rpg.blue/upload_program/f ... 脚本_94376596.rar
脚本:- class Window_Base < Window
- #--------------------------------------------------------------------------
- # * Draw Slant Bar # 角色HP,SP 坐标在151 152 行 敌人坐标在 47行
- #--------------------------------------------------------------------------
- def draw_slant_bar(x, y, min, max, width = 152, height = 6,
- bar_color = Color.new(231, 47, 35, 255), end_color = Color.new(150, 150, 150, 255))
- # Draw Border
- for i in 0..height
- self.contents.fill_rect(x, y + height - i, width + 1, 1, Color.new(255, 255, 255, 255))
- end
- # Draw Background
- for i in 1..(height - 1)
- r = 100 * (height - i) / height + 0 * i / height
- g = 100 * (height - i) / height + 0 * i / height
- b = 100 * (height - i) / height + 0 * i / height
- a = 255 * (height - i) / height + 255 * i / height
- self.contents.fill_rect(x + 1, y + height - i, width - 1, 1, Color.new(r, b, g, a))
- end
- # Draws Bar
- for i in 1..( (min / max.to_f) * width - 1)
- for j in 1..(height - 1)
- r = bar_color.red * (width - i) / width + end_color.red * i / width
- g = bar_color.green * (width - i) / width + end_color.green * i / width
- b = bar_color.blue * (width - i) / width + end_color.blue * i / width
- a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
- self.contents.fill_rect(x + i, y + height - j, 1, 1, Color.new(r, g, b, a))
- end
- end
- end
- end
- class Window_EnemyHP < Window_Base
-
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0
- refresh
- end
- def refresh
- self.contents.clear
- for i in 0...$game_troop.enemies.size
- @enemy = $game_troop.enemies[i]
- @percent = (@enemy.hp * 100) / @enemy.maxhp
- unless @enemy.hp == 0
- draw_slant_bar(@enemy.screen_x - 50, @enemy.screen_y - 20, @enemy.hp, @enemy.maxhp, width = 55, height = 4, bar_color = Color.new(231, 47, 35, 255), end_color = Color.new(231, 47, 35, 255))
-
- end
- end
- end
- end
- class Scene_Battle
-
- alias raz_update update
- alias raz_update_phase5 update_phase5
- alias raz_update_phase4_step1 update_phase4_step1
- alias raz_update_phase4_step5 update_phase4_step5
- alias raz_enemy_hp_main main
-
- def main
- @troop_id = $game_temp.battle_troop_id
- $game_troop.setup(@troop_id)
- @enemy_window = Window_EnemyHP.new
-
- raz_enemy_hp_main
- @enemy_window.dispose
- end
-
- def update
- @enemy_window.update
- raz_update
- end
- def update_phase5
- # If wait count is larger than 0
- if @phase5_wait_count > 0
- # Decrease wait count
- @phase5_wait_count -= 1
- # If wait count reaches 0
- if @phase5_wait_count == 0
- @enemy_window.visible = false
- # Show result window
- @result_window.visible = true
- # Clear main phase flag
- $game_temp.battle_main_phase = false
- # Refresh status window
- @status_window.refresh
- @enemy_window.refresh
- end
- return
- end
- raz_update_phase5
- end
- def update_phase4_step1
- raz_update_phase4_step1
- @enemy_window.refresh
- end
- def update_phase4_step5
- # Hide help window
- @help_window.visible = false
- # Refresh status window
- @status_window.refresh
- @enemy_window.refresh
- raz_update_phase4_step5
- end
- end
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 640, 480) #super(0, 320, 640, 160)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0
- @level_up_flags = [false, false, false, false]
- refresh
- end
- #--------------------------------------------------------------------------
- # * Dispose
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # * Set Level Up Flag
- # actor_index : actor index
- #--------------------------------------------------------------------------
- def level_up(actor_index)
- @level_up_flags[actor_index] = true
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- actor_x = actor.screen_x
- actor_y = actor.screen_y
- draw_slant_bar(actor_x-180,actor.screen_y - 120, actor.hp, actor.maxhp, 35, 4, bar_color = Color.new(231, 47, 35, 255), end_color = Color.new(231, 47, 35, 255))
- draw_slant_bar(actor_x-180,actor.screen_y - 113, actor.sp, actor.maxsp, 35, 4, bar_color = Color.new(44, 102, 199, 225), end_color = Color.new(44, 102, 199, 2255))
- draw_actor_name(actor, actor_x - 190,actor.screen_y - 30)
- if @level_up_flags[i]
- self.contents.font.color = normal_color
- self.z = 0
- self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
- else
-
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Frame Update By ZiQianXiu
- #--------------------------------------------------------------------------
- def update
- super
- # Slightly lower opacity level during main phase
- if $game_temp.battle_main_phase
- self.contents_opacity -= 4 if self.contents_opacity > 191
- else
- self.contents_opacity += 4 if self.contents_opacity < 255
- end
- end
- def draw_actor_name(actor, x, y)
- self.contents.font.color = Color.new(0, 255, 0, 255)
- self.contents.draw_text(x, y, 120, 32, actor.name)
- end
- end
复制代码
这个是根据主站的脚本更改,仿梦幻的也许大家需要就发了上来。(角色头上显血条脚下显姓名)
脚本冲突:与一些战斗脚本会有冲突吧~不过很少
另外这个脚本配合 16字体大小宋体 和文字描边效果更好(工程附,用的时候请复制)
有事请 Q我916984561
版务信息:本贴由楼主自主结贴~ |
|