Project1

标题: 求一个改好的脚本 [打印本页]

作者: yehaojie    时间: 2007-8-26 20:37
标题: 求一个改好的脚本
注:要把
  1. class Game_Actor < Game_Battler
  2. def now_exp
  3.   return @exp - @exp_list[@level]
  4. end
  5. def next_exp
  6.   return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  7. end
  8. end
  9. #==============================================================================
  10. # 描绘角色血条
  11. #==============================================================================
  12. class Window_BattleStatus < Window_Base
  13. #--------------------------------------------------------------------------
  14. # ● 初始化
  15. #--------------------------------------------------------------------------
  16. alias xrxs_bp2_refresh refresh
  17. def refresh
  18. xrxs_bp2_refresh
  19. @item_max = $game_party.actors.size
  20. for i in 0...$game_party.actors.size
  21.    actor = $game_party.actors[i]
  22.    actor_x = i * 65+ 300
  23.    x1=self.x
  24.    y1=self.y
  25.    draw_actor_hp_meter(actor, actor_x, 1,55)
  26.    draw_actor_sp_meter(actor, actor_x, 13, 55)
  27.    draw_actor_exp_meter(actor, actor_x, 25, 55)
  28. end
  29. end
  30. end
  31. #==============================================================================
  32. # ■ Window_Base
  33. #==============================================================================
  34. class Window_Base < Window
  35. #--------------------------------------------------------------------------
  36. # ● HP描画
  37. #--------------------------------------------------------------------------
  38. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  39. if type == 1 and actor.hp == 0
  40.    return
  41. end
  42. self.contents.fill_rect(x-1, y+82, width+2,6, Color.new(0, 0, 0, 255))
  43. w = width * actor.hp / [actor.maxhp,1].max
  44. self.contents.fill_rect(x, y+83, w,1, Color.new(153, 0, 0, 255))
  45. self.contents.fill_rect(x, y+84, w,1, Color.new(255, 140, 140, 255))
  46. self.contents.fill_rect(x, y+85, w,1, Color.new(180, 18, 0, 255))
  47. self.contents.fill_rect(x, y+86, w,1, Color.new(209, 33, 0,255))
  48. self.contents.fill_rect(x, y+87, w,1, Color.new(180, 18, 0, 255))
  49. self.contents.fill_rect(x, y+88, w,1, Color.new(153, 0, 0, 255))
  50. end
  51. #--------------------------------------------------------------------------
  52. # ● SP描画
  53. #--------------------------------------------------------------------------
  54. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  55. if type == 1 and actor.hp == 0
  56.    return
  57. end
  58. self.contents.fill_rect(x-1, y+82, width+2,6, Color.new(0, 0, 0, 255))
  59. w = width * actor.sp / [actor.maxsp,1].max
  60. self.contents.fill_rect(x, y+83, w,1, Color.new(56, 10, 143, 255))
  61. self.contents.fill_rect(x, y+84, w,1, Color.new(40, 176, 255, 255))
  62. self.contents.fill_rect(x, y+85, w,1, Color.new(78, 10, 175, 255))
  63. self.contents.fill_rect(x, y+86, w,1, Color.new(94, 10, 214, 255))
  64. self.contents.fill_rect(x, y+87, w,1, Color.new(78, 10, 175, 255))
  65. self.contents.fill_rect(x, y+88, w,1, Color.new(56, 10, 143,  255))
  66. end
  67. #--------------------------------------------------------------------------
  68. # ● exp描画
  69. #--------------------------------------------------------------------------
  70. def draw_actor_exp_meter(actor, x, y, width = 156, type = 0)
  71. if type == 1 and actor.hp == 0
  72.   return
  73. end
  74. self.contents.fill_rect(x-1, y+83, width+2,6, Color.new(0, 0, 0, 255))
  75. w = width * actor.now_exp/[ actor.next_exp,1].max
  76. self.contents.fill_rect(x, y+83, w,1, Color.new(77, 140, 140, 255))
  77. self.contents.fill_rect(x, y+85, w,1, Color.new(100, 220, 220, 255))
  78. self.contents.fill_rect(x, y+86, w,1, Color.new(77, 173, 173, 255))
  79. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 207, 207, 255))
  80. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 173, 173, 255))
  81. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 140, 140, 255))
  82. end
  83. end
复制代码

这个血条脚本弄到脚色上方,我主战。论坛都找过,就是没有,急啊!!!!! [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: yehaojie    时间: 2007-8-26 20:37
标题: 求一个改好的脚本
注:要把
  1. class Game_Actor < Game_Battler
  2. def now_exp
  3.   return @exp - @exp_list[@level]
  4. end
  5. def next_exp
  6.   return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  7. end
  8. end
  9. #==============================================================================
  10. # 描绘角色血条
  11. #==============================================================================
  12. class Window_BattleStatus < Window_Base
  13. #--------------------------------------------------------------------------
  14. # ● 初始化
  15. #--------------------------------------------------------------------------
  16. alias xrxs_bp2_refresh refresh
  17. def refresh
  18. xrxs_bp2_refresh
  19. @item_max = $game_party.actors.size
  20. for i in 0...$game_party.actors.size
  21.    actor = $game_party.actors[i]
  22.    actor_x = i * 65+ 300
  23.    x1=self.x
  24.    y1=self.y
  25.    draw_actor_hp_meter(actor, actor_x, 1,55)
  26.    draw_actor_sp_meter(actor, actor_x, 13, 55)
  27.    draw_actor_exp_meter(actor, actor_x, 25, 55)
  28. end
  29. end
  30. end
  31. #==============================================================================
  32. # ■ Window_Base
  33. #==============================================================================
  34. class Window_Base < Window
  35. #--------------------------------------------------------------------------
  36. # ● HP描画
  37. #--------------------------------------------------------------------------
  38. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  39. if type == 1 and actor.hp == 0
  40.    return
  41. end
  42. self.contents.fill_rect(x-1, y+82, width+2,6, Color.new(0, 0, 0, 255))
  43. w = width * actor.hp / [actor.maxhp,1].max
  44. self.contents.fill_rect(x, y+83, w,1, Color.new(153, 0, 0, 255))
  45. self.contents.fill_rect(x, y+84, w,1, Color.new(255, 140, 140, 255))
  46. self.contents.fill_rect(x, y+85, w,1, Color.new(180, 18, 0, 255))
  47. self.contents.fill_rect(x, y+86, w,1, Color.new(209, 33, 0,255))
  48. self.contents.fill_rect(x, y+87, w,1, Color.new(180, 18, 0, 255))
  49. self.contents.fill_rect(x, y+88, w,1, Color.new(153, 0, 0, 255))
  50. end
  51. #--------------------------------------------------------------------------
  52. # ● SP描画
  53. #--------------------------------------------------------------------------
  54. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  55. if type == 1 and actor.hp == 0
  56.    return
  57. end
  58. self.contents.fill_rect(x-1, y+82, width+2,6, Color.new(0, 0, 0, 255))
  59. w = width * actor.sp / [actor.maxsp,1].max
  60. self.contents.fill_rect(x, y+83, w,1, Color.new(56, 10, 143, 255))
  61. self.contents.fill_rect(x, y+84, w,1, Color.new(40, 176, 255, 255))
  62. self.contents.fill_rect(x, y+85, w,1, Color.new(78, 10, 175, 255))
  63. self.contents.fill_rect(x, y+86, w,1, Color.new(94, 10, 214, 255))
  64. self.contents.fill_rect(x, y+87, w,1, Color.new(78, 10, 175, 255))
  65. self.contents.fill_rect(x, y+88, w,1, Color.new(56, 10, 143,  255))
  66. end
  67. #--------------------------------------------------------------------------
  68. # ● exp描画
  69. #--------------------------------------------------------------------------
  70. def draw_actor_exp_meter(actor, x, y, width = 156, type = 0)
  71. if type == 1 and actor.hp == 0
  72.   return
  73. end
  74. self.contents.fill_rect(x-1, y+83, width+2,6, Color.new(0, 0, 0, 255))
  75. w = width * actor.now_exp/[ actor.next_exp,1].max
  76. self.contents.fill_rect(x, y+83, w,1, Color.new(77, 140, 140, 255))
  77. self.contents.fill_rect(x, y+85, w,1, Color.new(100, 220, 220, 255))
  78. self.contents.fill_rect(x, y+86, w,1, Color.new(77, 173, 173, 255))
  79. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 207, 207, 255))
  80. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 173, 173, 255))
  81. self.contents.fill_rect(x, y+87, w,1, Color.new(77, 140, 140, 255))
  82. end
  83. end
复制代码

这个血条脚本弄到脚色上方,我主战。论坛都找过,就是没有,急啊!!!!! [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: yehaojie    时间: 2007-8-26 20:56
为什么没人??我是脚本盲,个位大人快来啊{/pz}
作者: 鬥转星移    时间: 2007-8-26 22:16
估计是都不 明白你说的什么吧?
作者: yehaojie    时间: 2007-8-26 22:59
以下引用鬥转星移于2007-8-26 14:16:08的发言:

估计是都不 明白你说的什么吧?

.....就是把血条脚本移到角色头上啊!{/gg}{/gg}
作者: 永劫的咎人    时间: 2007-8-26 23:51
提示: 作者被禁止或删除 内容自动屏蔽
作者: yehaojie    时间: 2007-8-27 00:01
以下引用永劫的咎人于2007-8-26 15:51:15的发言:

draw_actor_hp_meter(actor, actor_x, 1,55)
draw_actor_sp_meter(actor, actor_x, 13, 55)
draw_actor_exp_meter(actor, actor_x, 25, 55)

好党员=v=
括号里面的actor是定义角色是谁的,不用动
actor_x是x坐标,1,13,25是y坐标。
向上移动缩小y坐标即可,明白的?


[本贴由作者于 2007-8-26 15:52:33 最后编辑]

哦,但改到多少?
作者: yehaojie    时间: 2007-8-27 00:05
能否帮我把整个脚本发出来?
作者: 永劫的咎人    时间: 2007-8-27 00:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: 光£郎    时间: 2007-8-27 00:20
以下引用永劫的咎人于2007-8-26 16:14:44的发言:

自己去调试...
自己去脚本中搜索...
可以吗?不要什么都不想动手光伸手让别人帮忙。

恩恩~基本上都可以用伸手党来帮忙新人了
作者: yehaojie    时间: 2007-8-27 00:23
不行啊!!
作者: yehaojie    时间: 2007-8-27 00:28
好了,谢了{/se}




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