幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1644|回复: 6

[RMVX] 求助!杀鸡进下咯~

[复制链接]

55

主题

222

帖子

2474

积分

⑥精研

心.永恒.爱.

积分
2474
发表于 2006-10-29 13:48:50 | 显示全部楼层 |阅读模式
这个综合脚本中的SP只支持2个字,我设置的是查克拉,却只显示“查克”请教一下在该脚本哪里
修改??还有、显示人物攻击,特技的那个对话框坐标如何修改至人物头顶?
  1. # ————————————————————————————————————
  2. #==============================================================================
  3. # ■ Game_Actor
  4. #------------------------------------------------------------------------------
  5. #  处理角色的类。本类在 Game_Actors 类 ($game_actors)
  6. # 的内部使用、Game_Party 类请参考 ($game_party) 。
  7. #==============================================================================
  8. class Game_Actor < Game_Battler
  9. #--------------------------------------------------------------------------
  10. # ● 取得战斗画面的 X 坐标
  11. #--------------------------------------------------------------------------
  12. def screen_x
  13. case self.index
  14. when 0
  15.    return 350
  16. when 1
  17.    return 430
  18. when 2
  19.    return 510
  20. when 3
  21.    return 580
  22. else
  23.    return 600
  24.   end
  25. end
  26. #--------------------------------------------------------------------------
  27. # ● 取得战斗画面的 Y 坐标
  28. #--------------------------------------------------------------------------
  29. def screen_y
  30. case self.index
  31. when 0
  32.    return 430
  33. when 1
  34.    return 395
  35. when 2
  36.    return 360
  37. when 3
  38.    return 325
  39. else
  40.    return 1000
  41.   end
  42. end
  43. #--------------------------------------------------------------------------
  44. # ● 取得战斗画面的 Z 坐标
  45. #--------------------------------------------------------------------------
  46. def screen_z
  47. case self.index
  48. when 0
  49.    return 10
  50. when 1
  51.    return 9
  52. when 2
  53.    return 8
  54. when 3
  55.    return 7
  56. else
  57.    return 0
  58.    end
  59. end
  60. end
  61. #==============================================================================
  62. # ■ Window_Base
  63. #------------------------------------------------------------------------------
  64. #  游戏中全部窗口的超级类。
  65. #==============================================================================
  66. class Window_Base < Window
  67. #--------------------------------------------------------------------------
  68. # ● 描绘 HP
  69. #     actor : 角色
  70. #     x     : 描画目标 X 坐标
  71. #     y     : 描画目标 Y 坐标
  72. #     width : 描画目标的宽
  73. #--------------------------------------------------------------------------
  74. def draw_actor_hp1(actor, x, y, width = 72)
  75.    # 描绘字符串 "HP"
  76.    self.contents.font.color = system_color
  77.    self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  78.    # 计算描绘 MaxHP 所需的空间
  79.    if width - 24 >= 32
  80.      hp_x = x + 32# + width - 24
  81.    end
  82.    # 描绘 HP
  83.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  84.      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  85.    self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  86. end
  87. #--------------------------------------------------------------------------
  88. # ● 描绘 SP
  89. #     actor : 角色
  90. #     x     : 描画目标 X 坐标
  91. #     y     : 描画目标 Y 坐标
  92. #     width : 描画目标的宽
  93. #--------------------------------------------------------------------------
  94. def draw_actor_sp1(actor, x, y, width = 72)
  95.    # 描绘字符串 "SP"
  96.    self.contents.font.color = system_color
  97.    self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
  98.    # 计算描绘 MaxSP 所需的空间
  99.    if width - 24 >= 32
  100.      sp_x = x + 32# + width - 24
  101.    end
  102.    # 描绘 SP
  103.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  104.      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  105.    self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  106. end
  107. end
  108. #==============================================================================
  109. # ■ Window_BattleStatus
  110. #------------------------------------------------------------------------------
  111. #  显示战斗画面同伴状态的窗口。
  112. #==============================================================================
  113. class Window_BattleStatus < Window_Base
  114. #--------------------------------------------------------------------------
  115. # ● 初始化对像
  116. #--------------------------------------------------------------------------
  117. #$data_system_level_up_me = "Audio/ME/升级音乐"
  118. def initialize
  119.    super(0, 0, 640, 480)
  120.    self.contents = Bitmap.new(width - 10, height - 32)
  121.    self.opacity = 0
  122.    @level_up_flags = [false, false, false, false]
  123.    refresh
  124. end
  125. #--------------------------------------------------------------------------
  126. # ● 释放
  127. #--------------------------------------------------------------------------
  128. def dispose
  129.    super
  130. end
  131. #--------------------------------------------------------------------------
  132. # ● 设置升级标志
  133. #     actor_index : 角色索引
  134. #--------------------------------------------------------------------------
  135. def level_up(actor_index)
  136.    @level_up_flags[actor_index] = true
  137. end
  138. #--------------------------------------------------------------------------
  139. # ● 刷新
  140. #--------------------------------------------------------------------------
  141. def refresh
  142.    self.contents.clear
  143.    @item_max = $game_party.actors.size
  144.     for i in 0...$game_party.actors.size
  145.      actor = $game_party.actors[i]
  146.      case i
  147.        when 0
  148.         x = 310
  149.         y = 390
  150.        when 1
  151.         x = 390
  152.         y = 340
  153.        when 2
  154.         x = 480
  155.         y = 300
  156.        when 3
  157.         x = 550
  158.         y = 270
  159.       end
  160.      if @level_up_flags[i]
  161.        self.contents.font.color = normal_color
  162.        self.contents.draw_text(x, y, 80, 24, "LEVEL UP!")
  163.        Audio.me_stop
  164. #        Audio.me_play($data_system_level_up_me)
  165.      else
  166.      draw_actor_hp1(actor, x-15, y-15, 80)
  167.      draw_actor_sp1(actor, x-15, y+5, 80)
  168.     end
  169.    end
  170. end
  171. #--------------------------------------------------------------------------
  172. # ● 刷新画面
  173. #--------------------------------------------------------------------------
  174. def update
  175.    super
  176.    # 主界面的不透明度下降
  177.    if $game_temp.battle_main_phase
  178.      self.contents_opacity -= 50 if self.contents_opacity > 1
  179.    else
  180.      self.contents_opacity += 50 if self.contents_opacity < 255
  181.    end
  182. end
  183. end
  184. #==============================================================================
  185. # ■ Window_BattleStatus
  186. #==============================================================================
  187. class Window_BattleStatus < Window_Base
  188. #--------------------------------------------------------------------------
  189. # ● 初始化
  190. #--------------------------------------------------------------------------
  191. alias xrxs_bp2_refresh refresh
  192. def refresh
  193.    xrxs_bp2_refresh
  194.    @item_max = $game_party.actors.size
  195.     for i in 0...$game_party.actors.size
  196.      actor = $game_party.actors[i]
  197.      case i
  198.        when 0
  199.         x = 310
  200.         y = 390
  201.        when 1
  202.         x = 390
  203.         y = 340
  204.        when 2
  205.         x = 480
  206.         y = 300
  207.        when 3
  208.         x = 550
  209.         y = 270
  210.       end
  211.      draw_actor_hp_meter(actor, x, y, 50)
  212.      draw_actor_sp_meter(actor, x, y + 8, 50)
  213.    end
  214. end
  215. end
  216. #==============================================================================
  217. # ■ Window_Base
  218. #==============================================================================
  219. class Window_Base < Window
  220. #--------------------------------------------------------------------------
  221. # ● HP描画
  222. #--------------------------------------------------------------------------
  223. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  224.    if type == 1 and actor.hp == 0
  225.      return
  226.    end
  227.    self.contents.font.color = system_color
  228.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
  229.    w = width * actor.hp / actor.maxhp
  230.    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  231.    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  232.    self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  233.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  234.    
  235.    end
  236. #--------------------------------------------------------------------------
  237. # ● SP描画
  238. #--------------------------------------------------------------------------
  239. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  240.    if type == 1 and actor.hp == 0
  241.      return
  242.    end
  243.    self.contents.font.color = system_color
  244.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  245.    w = width * actor.sp / actor.maxsp
  246.    self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  247.    self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  248.    self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  249.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  250. end
  251. end
复制代码
[原创]火影忍者45度RPG玄月篇。。。测试版本 http://webdisk.cech.com.cn/download/file_share_3188798.html
回复

使用道具 举报

38

主题

3468

帖子

1

积分

超级版主

传说中的Bunny火神~!

Rank: 8Rank: 8

积分
1
发表于 2006-10-29 14:24:26 | 显示全部楼层
你经常有些不知从何处搞来的脚本啊= =|||,下次注明一下吧(如果是JQSP的就请去找那个脚本的原地址)……
  1. #==============================================================================
  2. # ■ Window_Base
  3. #------------------------------------------------------------------------------
  4. #  游戏中全部窗口的超级类。
  5. #==============================================================================
  6. class Window_Base < Window
  7. #--------------------------------------------------------------------------
  8. # ● 描绘 HP
  9. #   actor : 角色
  10. #   x   : 描画目标 X 坐标
  11. #   y   : 描画目标 Y 坐标
  12. #   width : 描画目标的宽
  13. #--------------------------------------------------------------------------
  14. def draw_actor_hp1(actor, x, y, width = 72)
  15.   # 描绘字符串 "HP"
  16.   self.contents.font.color = system_color
  17.   self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  18.   # 计算描绘 MaxHP 所需的空间
  19.   if width - 24 >= 32
  20.   hp_x = x + 32# + width - 24
  21.   end
  22.   # 描绘 HP
  23.   self.contents.font.color = actor.hp == 0 ? knockout_color :
  24.   actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  25.   self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  26. end
  27. #--------------------------------------------------------------------------
  28. # ● 描绘 SP
  29. #   actor : 角色
  30. #   x   : 描画目标 X 坐标
  31. #   y   : 描画目标 Y 坐标
  32. #   width : 描画目标的宽
  33. #--------------------------------------------------------------------------
  34. def draw_actor_sp1(actor, x, y, width = 72)
  35.   # 描绘字符串 "SP"
  36.   self.contents.font.color = system_color
  37. ######################################
  38.   self.contents.draw_text(x, y, 32, 24, "查克拉")
  39. ######################################
  40.   # 计算描绘 MaxSP 所需的空间
  41.   if width - 24 >= 32
  42.   sp_x = x + 32# + width - 24
  43.   end
  44.   # 描绘 SP
  45.   self.contents.font.color = actor.sp == 0 ? knockout_color :
  46.   actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  47.   self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  48. end
  49. end
复制代码

PS:下次请不要指名道姓的找谁帮忙……世界上懂这个的人很多……
我突然发现,我是一个很幸运的好人。老婆真好~ 点我进入JQ(激情)教程范例收集!
回复 支持 反对

使用道具 举报

55

主题

222

帖子

2474

积分

⑥精研

心.永恒.爱.

积分
2474
 楼主| 发表于 2006-10-29 17:41:01 | 显示全部楼层
e  ..我是很信任前辈才请你进的`请看我之前的贴!3贴都没人帮忙.....- -
电机很多0回复...我也不想老是麻烦你...但是最近很忙不能全心全仪学习脚本
只能零碎的学...所以急了嘛...前辈觉的困扰吗? [s:5]  [s:6]
[原创]火影忍者45度RPG玄月篇。。。测试版本 http://webdisk.cech.com.cn/download/file_share_3188798.html
回复 支持 反对

使用道具 举报

55

主题

222

帖子

2474

积分

⑥精研

心.永恒.爱.

积分
2474
 楼主| 发表于 2006-10-29 17:42:06 | 显示全部楼层
PS脚本出自66,我本来注明的,但惊讶的发现66居然被论坛列为禁止字符....
难道就是你说的那个站?? [s:5]
[原创]火影忍者45度RPG玄月篇。。。测试版本 http://webdisk.cech.com.cn/download/file_share_3188798.html
回复 支持 反对

使用道具 举报

218

主题

1万

帖子

10万

积分

⑧专业

赋予你第五自由

积分
108021
发表于 2006-10-29 18:11:05 | 显示全部楼层
是的,就是这个意思

第 五 自 由 -   5th  Freedom   -

回复 支持 反对

使用道具 举报

55

主题

222

帖子

2474

积分

⑥精研

心.永恒.爱.

积分
2474
 楼主| 发表于 2006-10-29 18:15:00 | 显示全部楼层
难道那个站是因为RP的问题,比如不注重作者版权等....被大家所讨厌?? [s:5]
[原创]火影忍者45度RPG玄月篇。。。测试版本 http://webdisk.cech.com.cn/download/file_share_3188798.html
回复 支持 反对

使用道具 举报

48

主题

580

帖子

6509

积分

⑦老手

积分
6509
发表于 2006-10-30 20:05:47 | 显示全部楼层
是的,就是这个意思。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2025-6-28 07:15 , Processed in 0.012087 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表