设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1590|回复: 1
打印 上一主题 下一主题

[已经过期] 求大神帮修改一个脚本和取消掉MP的显示

[复制链接]

Lv1.梦旅人

梦石
0
星屑
60
在线时间
56 小时
注册时间
2012-12-23
帖子
79
跳转到指定楼层
1
发表于 2014-6-9 23:03:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
  1. ===========================================================================
  2. # * Falcao Pearl ABS script shelf # 7
  3. #
  4. # 演员/敌人的HP和MP栏显示V 2.0
  5. #
  6. # T他的剧本就像一个附加,主系统可以在没有这块运行
  7. #
  8. #-------------------------------------------------------------------------------

  9. # - 显示HP,MP,经验和当前玩家的演员TP条
  10. # - 显示敌人的HP酒吧被打时
  11. # - BOSS的HP酒吧anabled
  12. # - 显示敌人的状态和BUFF / DEBUFF图标
  13. # - 非图形化的酒吧,但hightly定制
  14. # - 2.0现在支持图像而不是文字绘制棒
  15. #
  16. #
  17. #*用途及安装
  18. #只需复制并粘贴珍珠ABS系统下
  19. #
  20. #*命令
  21. # PearlBars.hide - 隐藏的演员吧
  22. # PearlBars.show - 显示演员棒(默认情况下)
  23. #
  24. # PearlBars.enemy_auto(id)- 自动显示敌人的HP条,而不需要打,
  25. # 这主要是用于BOSS,更改ID为事件ID
  26. # 标签与敌人 Enemy Boss Bar = true 使BOSS栏模式
  27. #------------------------------------------------------------------------------
  28. module PearlBars
  29. #=============================================================================
  30. # * 演员的配置吧
  31. #
  32. # 酒吧x和屏幕上的y位置
  33. ScreenPos_X = 10
  34. ScreenPos_Y = 10
  35. #
  36. # 酒吧的尺寸不能超过300宽x100高
  37. # x y 宽度 高度
  38. HP_BarDimentions = [8, 16, 118, 14]
  39. MP_BarDimentions = [8, 36, 118, 14]
  40. EX_BarDimentions = [8, 57, 118, 10]

  41. # TP 资讯 x y
  42. TP_Info = [8, 64]
  43. #
  44. # 颜色定义
  45. # color 1 R G B Opa color 2 R G B Opa
  46. HP_Color = [Color.new(205, 255, 205, 200), Color.new(10, 220, 45, 200)]
  47. MP_Color = [Color.new(180, 225, 245, 200), Color.new(20, 160, 225, 200)]
  48. EX_Color = [Color.new(180, 225, 245, 200), Color.new(20, 160, 225, 200)]

  49. #你想要显示的,而不是脚本绘制图形吧?
  50. #如果是的话,填补了这一角色酒吧显卡的要求

  51. ActorsHp = "" # 角色 Hp 图形条名称(在引号内)
  52. ActorsMp = "" # 角色 Mp 图形条名称
  53. ActorsExp = "" # 角色 的经验,如果你不希望它离开它 ""
  54. ActorsBack = "" # 背景半透明栏

  55. #=============================================================================
  56. # * 正常的敌人吧
  57. #
  58. # 正常的敌人酒吧x和屏幕上的y位置
  59. NeScreenPos_X = 390
  60. NeScreenPos_Y = 10
  61. #
  62. # 酒吧的尺寸不能超过300宽x100高
  63. # x y 宽度 高度
  64. EHP_BarDimentions = [8, 16, 126, 10]
  65. #
  66. # 颜色定义
  67. # color 1 R G B Opa color 2 R G B Opa
  68. EHP_Color = [Color.new(205, 255, 205, 200), Color.new(10, 220, 45, 200)]

  69. # 如果你想显示的图形吧图片填补了这一
  70. NormalEne = "" # 正常的敌人HP吧
  71. NormalBack = "" # 背景半透明栏

  72. #=============================================================================
  73. # * 敌方BOSS的HP酒吧
  74. #
  75. # BOSS的敌人吧x和屏幕上的y位置
  76. BeScreenPos_X = 100
  77. BeScreenPos_Y = 286
  78. #
  79. # 酒吧的尺寸不能超过640宽x100高
  80. # x y 宽度 高度
  81. BHP_BarDimentions = [8, 22, 330, 12]
  82. #
  83. # color 1 R G B Opa color 2 R G B Opa
  84. BHP_Color = [Color.new(205, 255, 205, 200), Color.new(10, 220, 45, 200)]

  85. # 如果你想显示的图形吧图片填补了这一
  86. BossEne = "" # 敌方BOSS HP吧
  87. BossBack = "" # 背景半透明栏
  88. #=============================================================================

  89. def self.show() $game_system.pearlbars = nil end
  90. def self.hide() $game_system.pearlbars = true end

  91. def self.enemy_auto(event_id)
  92. $game_system.enemy_lifeobject = $game_map.events[event_id]
  93. end

  94. end

  95. ($imported ||= {})["Falcao Pearl ABS Life"] = true

  96. class Spriteset_Map

  97. alias falcaopearl_lifebars_create create_pictures
  98. def create_pictures
  99. create_hud_lifebars
  100. falcaopearl_lifebars_create
  101. end

  102. def create_hud_lifebars
  103. @enemy_lifeobject = $game_system.enemy_lifeobject
  104. @enemyhpsp = Sprite_LifeBars.new(@viewport2, @enemy_lifeobject) if
  105. not @enemy_lifeobject.nil?
  106. end

  107. def create_actorlifebars
  108. return if !@actor_lifebar.nil?
  109. @actor_lifebar = Sprite_LifeBars.new(@viewport2, $game_player)
  110. end

  111. def dispose_actorlifebars
  112. return if @actor_lifebar.nil?
  113. @actor_lifebar.dispose
  114. @actor_lifebar = nil
  115. end

  116. alias falcaopearl_lifebars_update update
  117. def update
  118. update_lifebars_sprites
  119. falcaopearl_lifebars_update
  120. end

  121. def update_lifebars_sprites
  122. $game_system.pearlbars.nil? ? create_actorlifebars : dispose_actorlifebars
  123. @actor_lifebar.update unless @actor_lifebar.nil?

  124. # enemy
  125. if [email protected]?
  126. unless @enemyhpsp.disposed?
  127. @enemyhpsp.update
  128. else
  129. @enemyhpsp.dispose
  130. @enemyhpsp = nil
  131. $game_system.enemy_lifeobject = nil
  132. @enemy_lifeobject = nil
  133. end
  134. end

  135. if @enemy_lifeobject != $game_system.enemy_lifeobject
  136. @enemyhpsp.dispose if [email protected]?
  137. @enemyhpsp = nil
  138. @enemyhpsp = Sprite_LifeBars.new(@viewport2,$game_system.enemy_lifeobject)
  139. @enemy_lifeobject = $game_system.enemy_lifeobject
  140. end
  141. end

  142. alias falcaopearl_lifebars_dispose dispose
  143. def dispose
  144. dispose_actorlifebars
  145. @enemyhpsp.dispose unless @enemyhpsp.nil?
  146. falcaopearl_lifebars_dispose
  147. end
  148. end

  149. # Life bars sprite
  150. class Sprite_LifeBars < Sprite
  151. include PearlBars
  152. def initialize(viewport, character)
  153. super(viewport)
  154. @character = character
  155. self.bitmap = Bitmap.new(boss? ? 640 : 300, 120)
  156. @old_hp = battler.hp
  157. @old_mp = battler.mp
  158. @erasetimer = 180
  159. @state_checker = []
  160. @buff_checker = []
  161. refresh_contents
  162. @view = viewport
  163. update
  164. end

  165. def boss?
  166. return true if battler.is_a?(Game_Enemy) && battler.boss_hud
  167. return false
  168. end

  169. def battler
  170. return @character.battler
  171. end

  172. def refresh_contents
  173. self.bitmap.clear
  174. self.bitmap.font.size = 19
  175. @erasetimer = 180
  176. self.opacity = 255
  177. if battler.is_a?(Game_Actor)
  178. @old_exp = battler.exp
  179. @old_tp = battler.tp
  180. self.x = ScreenPos_X
  181. self.y = ScreenPos_Y
  182. h = HP_BarDimentions ; m = MP_BarDimentions ; e = EX_BarDimentions
  183. if PearlBars::ActorsHp != ""
  184. @pimg = Cache.picture(PearlBars::ActorsHp) if @pimg.nil?
  185. @bimg = Cache.picture(PearlBars::ActorsBack) if @bimg.nil?
  186. @pimp = Cache.picture(PearlBars::ActorsMp) if @pimp.nil?
  187. PearlKernel.image_hp(self.bitmap, h[0] + 4, h[1],@bimg,
  188. @pimg, battler,true)
  189. PearlKernel.image_mp(self.bitmap, m[0] + 4, m[1], @bimg, @pimp, battler)
  190. if PearlBars::ActorsExp != ""
  191. @piexp = Cache.picture(PearlBars::ActorsExp) if @piexp.nil?
  192. PearlKernel.image_exp(self.bitmap,e[0] + 4,e[1],@bimg,@piexp, battler)
  193. end
  194. else
  195. hc = HP_Color ; mc = MP_Color ; ec = EX_Color
  196. PearlKernel.draw_hp(self.bitmap,battler, h[0], h[1], h[2], h[3], hc)
  197. PearlKernel.draw_mp(self.bitmap,battler, m[0], m[1], m[2], m[3], mc)
  198. PearlKernel.draw_exp(self.bitmap,battler, e[0], e[1], e[2], e[3], ec)
  199. end
  200. PearlKernel.draw_tp(self.bitmap, TP_Info[0], TP_Info[1], battler)
  201. else battler.is_a?(Game_Enemy)
  202. if boss?
  203. self.x = BeScreenPos_X
  204. self.y = BeScreenPos_Y
  205. h = BHP_BarDimentions ; hc = BHP_Color
  206. if PearlBars::BossEne != ""
  207. @n_img = Cache.picture(PearlBars::BossEne) if @n_img.nil?
  208. @n_back = Cache.picture(PearlBars::BossBack) if @n_back.nil?
  209. PearlKernel.image_hp(self.bitmap, h[0] + 4, h[1],@n_back,
  210. @n_img, battler,true)
  211. else
  212. PearlKernel.draw_hp(self.bitmap,battler, h[0],h[1],h[2], h[3],hc,true)
  213. end
  214. else
  215. self.x = NeScreenPos_X
  216. self.y = NeScreenPos_Y
  217. h = EHP_BarDimentions ; hc = EHP_Color
  218. if PearlBars::NormalEne != ""
  219. @n_img = Cache.picture(PearlBars::NormalEne) if @n_img.nil?
  220. @n_back = Cache.picture(PearlBars::NormalBack) if @n_back.nil?
  221. PearlKernel.image_hp(self.bitmap, h[0] + 4, h[1],@n_back,
  222. @n_img, battler,true)
  223. else
  224. PearlKernel.draw_hp(self.bitmap,battler,h[0],h[1],h[2], h[3], hc,true)
  225. end
  226. end
  227. end
  228. end

  229. def update
  230. super
  231. if @old_hp != battler.hp
  232. refresh_contents
  233. @old_hp = battler.hp
  234. end
  235. if @old_mp != battler.mp
  236. refresh_contents
  237. @character.actor.apply_usability if @character.is_a?(Game_Player)
  238. @old_mp = battler.mp
  239. end

  240. if battler.is_a?(Game_Actor)
  241. if @old_exp != battler.exp
  242. @old_exp = battler.exp
  243. refresh_contents
  244. end
  245. if @old_tp != battler.tp
  246. @old_tp = battler.tp
  247. @character.actor.apply_usability if @character.is_a?(Game_Player)
  248. refresh_contents
  249. end

  250. elsif battler.is_a?(Game_Enemy)
  251. if boss?
  252. dispose if battler.dead?
  253. else
  254. if @erasetimer > 0
  255. @erasetimer -= 1
  256. self.opacity -= 10 if @erasetimer <= 25
  257. @states.opacity = self.opacity if [email protected]?
  258. dispose if @erasetimer == 0
  259. end
  260. end
  261. update_enemy_status_icons
  262. end
  263. end

  264. # enemy status icons engine
  265. def update_enemy_status_icons
  266. display_status? ? create_states_icons : dispose_state_icons
  267. 4.times.each {|i| refresh_states_icons if
  268. @state_checker[i] != battler.state_icons[i]}
  269. 2.times.each {|i| refresh_states_icons if
  270. @buff_checker[i] != battler.buff_icons[i]}
  271. end

  272. def display_status?
  273. return true if !battler.state_icons.empty?
  274. return true if !battler.buff_icons.empty?
  275. return false
  276. end

  277. def create_states_icons
  278. return if disposed?
  279. return if [email protected]?
  280. @states = ::Sprite.new(@view)
  281. @states.bitmap = Bitmap.new(144, 24)
  282. @n_back.nil? ? y_plus = BHP_BarDimentions[3] : y_plus = @n_back.height
  283. pos = [BeScreenPos_X, BeScreenPos_Y, y_plus] if boss?
  284. pos = [NeScreenPos_X, NeScreenPos_Y, y_plus] if !boss?
  285. @states.x = pos[0] + 10
  286. @states.y = pos[1] + pos[2] + 24
  287. @states.zoom_x = 0.8
  288. @states.zoom_y = 0.8
  289. refresh_states_icons
  290. end

  291. def dispose_state_icons
  292. return if @states.nil?
  293. @states.bitmap.dispose
  294. @states.dispose
  295. @states = nil
  296. end

  297. def refresh_states_icons
  298. 4.times.each {|i| @state_checker[i] = battler.state_icons[i]}
  299. 2.times.each {|i| @buff_checker[i] = battler.buff_icons[i]}
  300. return if @states.nil?
  301. @states.bitmap.clear
  302. x = 0
  303. battler.state_icons.each {|icon| draw_icon(icon, x, 0) ; x += 24
  304. break if x == 96}
  305. count = 0
  306. battler.buff_icons.each {|icon| draw_icon(icon, x, 0) ; x += 24 ; count += 1
  307. break if count == 2}
  308. end

  309. def draw_icon(icon_index, x, y, enabled = true)
  310. bit = Cache.system("Iconset")
  311. rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  312. @states.bitmap.blt(x, y, bit, rect, enabled ? 255 : 150)
  313. end

  314. def dispose
  315. self.bitmap.dispose
  316. dispose_state_icons
  317. super
  318. end
  319. end

  320. # Make the enemy bars to load when enemy is hited
  321. class Projectile < Game_Character
  322. alias falcao_lifebars_execute execute_damageto_enemy
  323. def execute_damageto_enemy(event)
  324. $game_system.enemy_lifeobject = event if @user.is_a?(Game_Player) &&
  325. !event.battler.object
  326. falcao_lifebars_execute(event)
  327. end
  328. end
复制代码
求大神帮把这个里面对于MP的显示去掉







再求一个能把菜单里面和各个显示菜单里面对于MP的显示遮盖掉或者去掉的脚本

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

2
发表于 2014-6-10 06:12:57 | 只看该作者
本帖最后由 taroxd 于 2014-6-10 06:14 编辑

注释掉218和223行试试~ 顺便这缩进无法直视
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-30 01:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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