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

Project1

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

[已经解决] 菜单头像显示问题、

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2011-7-14
帖子
38
跳转到指定楼层
1
发表于 2011-8-6 18:28:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. #_______________________________________________________________________________
  2. # MOG Scene Menu Itigo V1.5            
  3. #_______________________________________________________________________________
  4. # By Moghunter  
  5. # http://www.atelier-rgss.com
  6. #_______________________________________________________________________________
  7. module MOG
  8. #Tipo de fundo.
  9. # 0 = Imagens em movimento.
  10. # 1 = Mapa de fundo.
  11. MENU_BACKGROUND = 0
  12. #Transition Time.
  13. MNTT = 20
  14. #Transition Type (Name)
  15. MNTP = "006-Stripe02"
  16. end
  17. $mogscript = {} if $mogscript == nil
  18. $mogscript["menu_itigo"] = true
  19. ##############
  20. # Game_Actor #
  21. ##############
  22. class Game_Actor < Game_Battler
  23. def now_exp
  24. return @exp - @exp_list[@level]
  25. end
  26. def next_exp
  27. return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  28. end
  29. end
  30. ############
  31. # Game_Map #
  32. ############
  33. class Game_Map
  34. attr_reader   :map_id  
  35. def mpname
  36. $mpname = load_data("Data/MapInfos.rxdata")
  37. $mpname[@map_id].name
  38. end
  39. end
  40. ###############
  41. # Window_Base #
  42. ###############
  43. class Window_Base < Window
  44. def nada
  45. face = RPG::Cache.picture("")
  46. end   
  47. def drw_face(actor,x,y)
  48. face = RPG::Cache.picture(actor.name + "_fc") rescue nada
  49. cw = face.width
  50. ch = face.height
  51. src_rect = Rect.new(0, 0, cw, ch)
  52. self.contents.blt(x , y - ch, face, src_rect)   
  53. end   
  54. def draw_maphp3(actor, x, y)
  55. back = RPG::Cache.picture("BAR0")   
  56. cw = back.width  
  57. ch = back.height
  58. src_rect = Rect.new(0, 0, cw, ch)   
  59. self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  60. meter = RPG::Cache.picture("HP_Bar")   
  61. cw = meter.width  * actor.hp / actor.maxhp
  62. ch = meter.height
  63. src_rect = Rect.new(0, 0, cw, ch)
  64. self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  65. text = RPG::Cache.picture("HP_Tx")   
  66. cw = text.width  
  67. ch = text.height
  68. src_rect = Rect.new(0, 0, cw, ch)
  69. self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  70. self.contents.font.color = Color.new(0,0,0,255)
  71. self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
  72. self.contents.font.color = Color.new(255,255,255,255)
  73. self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)   
  74. end  
  75. def draw_mapsp3(actor, x, y)
  76. back = RPG::Cache.picture("BAR0")   
  77. cw = back.width  
  78. ch = back.height
  79. src_rect = Rect.new(0, 0, cw, ch)   
  80. self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  81. meter = RPG::Cache.picture("SP_Bar")   
  82. cw = meter.width  * actor.sp / actor.maxsp
  83. ch = meter.height
  84. src_rect = Rect.new(0, 0, cw, ch)
  85. self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  86. text = RPG::Cache.picture("SP_Tx")   
  87. cw = text.width  
  88. ch = text.height
  89. src_rect = Rect.new(0, 0, cw, ch)
  90. self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  91. self.contents.font.color = Color.new(0,0,0,255)
  92. self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2)
  93. self.contents.font.color = Color.new(255,255,255,255)
  94. self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2)   
  95. end  
  96. def draw_mexp2(actor, x, y)
  97. bitmap2 = RPG::Cache.picture("Exp_Back")
  98. cw = bitmap2.width
  99. ch = bitmap2.height
  100. src_rect = Rect.new(0, 0, cw, ch)
  101. self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
  102. if actor.next_exp != 0
  103. rate = actor.now_exp.to_f / actor.next_exp
  104. else
  105. rate = 1
  106. end
  107. bitmap = RPG::Cache.picture("Exp_Meter")
  108. if actor.level < 99
  109. cw = bitmap.width * rate
  110. else
  111. cw = bitmap.width
  112. end   
  113. ch = bitmap.height
  114. src_rect = Rect.new(0, 0, cw, ch)
  115. self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
  116. exp_tx = RPG::Cache.picture("Exp_tx")
  117. cw = exp_tx.width
  118. ch = exp_tx.height
  119. src_rect = Rect.new(0, 0, cw, ch)
  120. self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect)
  121. lv_tx = RPG::Cache.picture("LV_tx")
  122. cw = lv_tx.width
  123. ch = lv_tx.height
  124. src_rect = Rect.new(0, 0, cw, ch)
  125. self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect)
  126. self.contents.font.color = Color.new(0,0,0,255)
  127. self.contents.draw_text(x + 161, y + 7, 24, 32, actor.level.to_s, 1)
  128. self.contents.font.color = Color.new(255,255,255,255)
  129. self.contents.draw_text(x + 160, y + 6, 24, 32, actor.level.to_s, 1)
  130. end
  131. def draw_actor_state2(actor, x, y, width = 80)
  132. text = make_battler_state_text(actor, width, true)
  133. self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
  134. self.contents.draw_text(x, y, width, 32, text,2)
  135. end  
  136. end
  137. ######################
  138. # Window_MenuStatus2 #
  139. ######################
  140. class Window_MenuStatus2 < Window_Selectable
  141. def initialize
  142. super(0, 0, 415, 280)
  143. self.contents = Bitmap.new(width - 32, height - 32)
  144. self.windowskin = RPG::Cache.windowskin("")
  145. self.opacity = 0
  146. self.z = 15
  147. refresh
  148. self.active = false
  149. self.index = -1
  150. end
  151. def refresh
  152. self.contents.clear
  153. @item_max = $game_party.actors.size
  154. for i in 0...$game_party.actors.size
  155. x = 20
  156. y = i * 62
  157. actor = $game_party.actors[i]
  158. self.contents.font.name = "Georgia"
  159. if $mogscript["TP_System"] == true
  160. draw_actor_tp(actor ,x + 285, y - 5,4)  
  161. draw_actor_state2(actor ,x + 190, y - 5)
  162. else  
  163. draw_actor_state2(actor ,x + 220, y - 5)
  164. end
  165. drw_face(actor,x,y + 50)
  166. draw_maphp3(actor,x + 40, y - 5)
  167. draw_mapsp3(actor,x + 40, y + 20 )
  168. draw_mexp2(actor,x + 140, y + 15 )
  169. end
  170. end
  171. def update_cursor_rect
  172. if @index < 0
  173. self.cursor_rect.empty
  174. else
  175. self.cursor_rect.set(5, @index * 62, self.width - 32, 50)
  176. end
  177. end
  178. end
  179. ################
  180. # Window_Gold2 #
  181. ################
  182. class Window_Gold2 < Window_Base
  183. def initialize
  184. super(0, 0, 160, 64)
  185. self.contents = Bitmap.new(width - 32, height - 32)
  186. self.windowskin = RPG::Cache.windowskin("")
  187. self.opacity = 0
  188. self.z = 15
  189. refresh
  190. end
  191. def refresh
  192. self.contents.clear
  193. cx = contents.text_size($data_system.words.gold).width
  194. self.contents.font.color = normal_color
  195. self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
  196. self.contents.font.color = system_color
  197. self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  198. end
  199. end
  200. ####################
  201. # Window_PlayTime2 #
  202. ####################
  203. class Window_PlayTime2 < Window_Base
  204. def initialize
  205. super(0, 0, 160, 96)
  206. self.contents = Bitmap.new(width - 32, height - 32)
  207. self.windowskin = RPG::Cache.windowskin("")
  208. self.opacity = 0
  209. self.z = 15
  210. refresh
  211. end
  212. def refresh
  213. self.contents.clear
  214. @total_sec = Graphics.frame_count / Graphics.frame_rate
  215. hour = @total_sec / 60 / 60
  216. min = @total_sec / 60 % 60
  217. sec = @total_sec % 60
  218. text = sprintf("%02d:%02d:%02d", hour, min, sec)
  219. self.contents.font.color = normal_color
  220. self.contents.draw_text(4, 32, 120, 32, text, 2)
  221. end
  222. def update
  223. super
  224. if Graphics.frame_count / Graphics.frame_rate != @total_sec
  225. refresh
  226. end
  227. end
  228. end
  229. #################
  230. # Window_Steps2 #
  231. #################
  232. class Window_Steps2 < Window_Base
  233. def initialize
  234. super(0, 0, 160, 96)
  235. self.contents = Bitmap.new(width - 32, height - 32)
  236. self.windowskin = RPG::Cache.windowskin("")
  237. self.opacity = 0
  238. self.z = 15
  239. refresh
  240. end
  241. def refresh
  242. self.contents.clear
  243. self.contents.font.color = normal_color
  244. self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
  245. end
  246. end
  247. ###################
  248. # Window_Map_Name #
  249. ###################
  250. class Window_Map_Name < Window_Base
  251. def initialize
  252. super(0, 0, 160, 96)
  253. self.contents = Bitmap.new(width - 32, height - 32)
  254. self.windowskin = RPG::Cache.windowskin("")
  255. self.opacity = 0
  256. self.z = 15
  257. refresh
  258. end
  259. def refresh
  260. self.contents.clear
  261. self.contents.font.color = normal_color
  262. self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 1)
  263. end
  264. end
  265. ##############
  266. # Scene_Menu #
  267. ##############
  268. class Scene_Menu
  269. def initialize(menu_index = 0)
  270. @menu_index = menu_index
  271. end
  272. def main
  273. s1 = ""
  274. s2 = ""
  275. s3 = ""
  276. s4 = ""
  277. s5 = ""
  278. s6 = ""
  279. @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  280. @command_window.index = @menu_index
  281. if $game_party.actors.size == 0
  282. @command_window.disable_item(0)
  283. @command_window.disable_item(1)
  284. @command_window.disable_item(2)
  285. @command_window.disable_item(3)
  286. end
  287. @command_window.visible = false
  288. @command_window.x = -640
  289. @mnlay = Sprite.new
  290. @mnlay.bitmap = RPG::Cache.picture("Mn_lay")
  291. @mnlay.z = 10
  292. @mnlay.opacity = 0
  293. @mnlay.x = -100
  294. if MOG::MENU_BACKGROUND == 0
  295. @mnback = Plane.new
  296. @mnback.bitmap = RPG::Cache.picture("Mn_back")
  297. @mnback.blend_type = 0
  298. @mnback.z = 5
  299. @mnback2 = Plane.new
  300. @mnback2.bitmap = RPG::Cache.picture("Mn_back")
  301. @mnback2.blend_type = 0
  302. @mnback2.z = 5
  303. @mnback2.opacity = 60
  304. else
  305. @spriteset = Spriteset_Map.new
  306. end
  307. @mnsel = Sprite.new
  308. @mnsel.bitmap = RPG::Cache.picture("Mn_Sel")
  309. @mnsel.z = 20
  310. @mnsel.x = 0
  311. @mnsel.y = 110
  312. @mnop = 150
  313. if $game_system.save_disabled
  314. @command_window.disable_item(4)
  315. end
  316. @playtime_window = Window_PlayTime2.new
  317. @playtime_window.x = 30
  318. @playtime_window.y = 375
  319. @playtime_window.contents_opacity = 0
  320. @mapname_window = Window_Map_Name.new
  321. @mapname_window.x = 425
  322. @mapname_window.y = 25
  323. @mapname_window.contents_opacity = 0
  324. @steps_window = Window_Steps2.new
  325. @steps_window.x = 230
  326. @steps_window.y = 375
  327. @steps_window.contents_opacity = 0
  328. @gold_window = Window_Gold2.new
  329. @gold_window.x = 455
  330. @gold_window.y = 405
  331. @gold_window.contents_opacity = 0
  332. @status_window = Window_MenuStatus2.new
  333. @status_window.x = 295
  334. @status_window.y = 110
  335. @status_window.contents_opacity = 0
  336. if MOG::MENU_BACKGROUND == 0
  337. Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP)
  338. else
  339. Graphics.transition  
  340. end
  341. loop do
  342. Graphics.update
  343. Input.update
  344. update
  345. if $scene != self
  346. break
  347. end
  348. end
  349. for i in 0..10  
  350. if MOG::MENU_BACKGROUND == 0
  351. @mnback.oy += 1
  352. @mnback.ox += 1
  353. @mnback2.oy += 1
  354. @mnback2.ox -= 1
  355. end
  356. @status_window.x += 20
  357. @status_window.contents_opacity -= 25
  358. @mnsel.opacity -= 25
  359. @mnsel.zoom_x += 0.03
  360. @mnlay.x -= 10
  361. @mnlay.opacity -= 25
  362. @mapname_window.x += 5
  363. @mapname_window.contents_opacity -= 20
  364. @steps_window.contents_opacity -= 25
  365. @gold_window.contents_opacity -= 25
  366. @playtime_window.contents_opacity -= 25
  367. Graphics.update   
  368. end
  369. Graphics.freeze
  370. @command_window.dispose
  371. @playtime_window.dispose
  372. @steps_window.dispose
  373. @gold_window.dispose   
  374. @status_window.dispose
  375. @mnlay.dispose
  376. if MOG::MENU_BACKGROUND == 0
  377. @mnback.dispose
  378. @mnback2.dispose
  379. else
  380. @spriteset.dispose
  381. end
  382. @mnsel.dispose
  383. @mapname_window.dispose
  384. Graphics.update
  385. end
  386. def update
  387. if @mnsel.zoom_x <= 1.6
  388. @mnsel.zoom_x += 0.03
  389. @mnsel.opacity -= 10
  390. elsif @mnsel.zoom_x > 1.6
  391. @mnsel.zoom_x = 1.0
  392. @mnsel.opacity = 255
  393. end     
  394. if @mnlay.x < 0
  395. @mnlay.opacity += 25
  396. @mnlay.x += 10
  397. elsif @mnlay.x >= 0  
  398. @mnlay.opacity = 255
  399. @mnlay.x = 0
  400. end
  401. @command_window.update if @command_window.active
  402. @playtime_window.update
  403. @status_window.update if @status_window.active
  404. if MOG::MENU_BACKGROUND == 0
  405. @mnback.oy += 1
  406. @mnback.ox += 1
  407. @mnback2.oy += 1
  408. @mnback2.ox -= 1
  409. end
  410. @mnop += 5
  411. @mapname_window.contents_opacity += 15
  412. @playtime_window.contents_opacity += 15
  413. @gold_window.contents_opacity += 15
  414. @playtime_window.contents_opacity += 15
  415. @steps_window.contents_opacity += 15
  416. if @status_window.x > 195
  417. @status_window.x -= 10
  418. @status_window.contents_opacity += 10
  419. elsif @status_window.x <= 195
  420. @status_window.x = 195
  421. @status_window.contents_opacity = 255
  422. end
  423. if @mnop >= 255
  424. @mnop = 120
  425. end   
  426. if @command_window.active
  427. update_command
  428. return
  429. end
  430. if @status_window.active
  431. update_status
  432. return
  433. end
  434. end
  435. def update_command
  436. case @command_window.index
  437. when 0  
  438. @mnsel.x = 0
  439. @mnsel.y = 110
  440. when 1
  441. @mnsel.x = 25
  442. @mnsel.y = 155
  443. when 2
  444. @mnsel.x = 40
  445. @mnsel.y = 197
  446. when 3
  447. @mnsel.x = 45
  448. @mnsel.y = 242
  449. when 4
  450. @mnsel.x = 25
  451. @mnsel.y = 285
  452. when 5
  453. @mnsel.x = 0
  454. @mnsel.y = 325
  455. end   
  456. if Input.trigger?(Input::B)
  457. $game_system.se_play($data_system.cancel_se)
  458. $scene = Scene_Map.new
  459. return
  460. end
  461. if Input.trigger?(Input::C)
  462. if $game_party.actors.size == 0 and @command_window.index < 4
  463. $game_system.se_play($data_system.buzzer_se)
  464. return
  465. end
  466. case @command_window.index
  467. when 0
  468. $game_system.se_play($data_system.decision_se)
  469. $scene = Scene_Item.new
  470. when 1
  471. $game_system.se_play($data_system.decision_se)
  472. @command_window.active = false
  473. @status_window.active = true
  474. @status_window.index = 0
  475. when 2
  476. $game_system.se_play($data_system.decision_se)
  477. @command_window.active = false
  478. @status_window.active = true
  479. @status_window.index = 0
  480. when 3
  481. $game_system.se_play($data_system.decision_se)
  482. @command_window.active = false
  483. @status_window.active = true
  484. @status_window.index = 0
  485. when 4
  486. if $game_system.save_disabled
  487. $game_system.se_play($data_system.buzzer_se)
  488. return
  489. end
  490. $game_system.se_play($data_system.decision_se)
  491. $scene = Scene_Save.new
  492. when 5
  493. $game_system.se_play($data_system.decision_se)
  494. $scene = Scene_End.new
  495. end
  496. return
  497. end
  498. end
  499. def update_status  
  500. case @status_window.index
  501. when 0  
  502. @mnsel.x = 180
  503. @mnsel.y = 130
  504. when 1
  505. @mnsel.x = 180
  506. @mnsel.y = 195
  507. when 2
  508. @mnsel.x = 180
  509. @mnsel.y = 255
  510. when 3
  511. @mnsel.x = 180
  512. @mnsel.y = 320
  513. end  
  514. if Input.trigger?(Input::B)
  515. $game_system.se_play($data_system.cancel_se)
  516. @command_window.active = true
  517. @status_window.active = false
  518. @status_window.index = -1
  519. return
  520. end
  521. if Input.trigger?(Input::C)
  522. case @command_window.index
  523. when 1
  524. if $game_party.actors[@status_window.index].restriction >= 2
  525. $game_system.se_play($data_system.buzzer_se)
  526. return
  527. end
  528. $game_system.se_play($data_system.decision_se)
  529. $scene = Scene_Skill.new(@status_window.index)
  530. when 2  
  531. $game_system.se_play($data_system.decision_se)
  532. $scene = Scene_Equip.new(@status_window.index)
  533. when 3  
  534. $game_system.se_play($data_system.decision_se)
  535. $scene = Scene_Status.new(@status_window.index)
  536. end
  537. return
  538. end
  539. end
  540. end
复制代码
这个脚本我都复制了,图片都复制完了,就是不显示头像啊,,哪位高人帮帮我。

Lv1.梦旅人

梦石
0
星屑
50
在线时间
68 小时
注册时间
2010-8-8
帖子
68
2
发表于 2011-8-7 15:55:44 | 只看该作者
晕啊你有脚本没图片啊
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2011-7-14
帖子
38
3
 楼主| 发表于 2011-8-7 17:23:42 | 只看该作者
865491990 发表于 2011-8-7 15:55
晕啊你有脚本没图片啊

图片也有了啊。
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
145
在线时间
698 小时
注册时间
2009-11-15
帖子
538
4
发表于 2011-8-7 17:39:53 | 只看该作者
图片的名字为角色名+"_fc",是不是图片名有问题啊?
考上三级了!
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
95 小时
注册时间
2011-7-14
帖子
38
5
 楼主| 发表于 2011-8-8 10:05:55 | 只看该作者
2719358 发表于 2011-8-7 17:39
图片的名字为角色名+"_fc",是不是图片名有问题啊?

图片名字也没问题啊:'(
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
217
在线时间
828 小时
注册时间
2010-6-22
帖子
120

开拓者

6
发表于 2011-8-18 14:08:50 | 只看该作者
系統沒找到圖片,就執行nada這方法。圖片名稱必須為資料庫角色的名稱+_fc,圖片路徑必須位於pictures下。如果真的不行,就連nada方法裡的圖取路徑也改吧。
回复

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
16 小时
注册时间
2011-8-16
帖子
63
7
发表于 2011-8-23 02:47:53 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
365
在线时间
142 小时
注册时间
2008-11-20
帖子
231
8
发表于 2011-8-23 09:26:54 | 只看该作者
去看某侠的视频教学,

RMXP脚本教程[下周一更新下一讲.持续更新中...]
http://rpg.blue/forum.php?mod=vi ... 8&fromuid=47560

PS:完全没明白LZ的头像显示有什么问题!!!
  
【RPGXP视频教学】脚本不是高手的专利 (正在更新...)
http://rpg.blue/thread-238457-1-1.html



回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
6 小时
注册时间
2011-8-25
帖子
20
9
发表于 2011-8-26 10:16:32 | 只看该作者
显示头像其实只需要修改一下脚本就可以了,如果楼主不太懂脚本的话,那就把一下这段脚本插到Window_MenuStatus的下面:
  1. #==============================================================================
  2. # ■ Window_MenuStatus
  3. #------------------------------------------------------------------------------
  4. #  显示菜单画面和同伴状态的窗口。
  5. #==============================================================================

  6. class Window_MenuStatus < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化目标
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 480, 480)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     refresh
  14.     self.active = false
  15.     self.index = -1
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     @item_max = $game_party.actors.size
  23.     for i in 0...$game_party.actors.size
  24.       x = 108
  25.       y = i * 116
  26.       actor = $game_party.actors[i]
  27.       testname = actor.battler_name+"_f.png"
  28.       if $加密 == true
  29.         bitmap=Bitmap.new("Graphics/Touxiang/#{testname}")
  30.         src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
  31.         self.contents.blt(0, y, bitmap, src_rect)
  32.         draw_actor_name(actor, x, y)
  33.         draw_actor_class(actor, x + 190, y)
  34.         draw_actor_level(actor, x, y + 32)
  35.         draw_actor_state(actor, x + 90, y + 32)
  36.         draw_actor_exp(actor, x, y + 64,180)        
  37.         draw_actor_hp(actor, x + 190, y + 32)
  38.         draw_actor_sp(actor, x + 190, y + 64)
  39.       else         
  40.         if FileTest.exist?("Graphics/Touxiang/#{testname}")
  41.           bitmap=Bitmap.new("Graphics/Touxiang/#{testname}")
  42.           src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
  43.           self.contents.blt(0, y, bitmap, src_rect)
  44.         else
  45.           draw_actor_graphic(actor, x - 60, y + 80)
  46.         end
  47.         draw_actor_name(actor, x, y)
  48.         draw_actor_class(actor, x + 190, y)
  49.         draw_actor_level(actor, x, y + 32)
  50.         draw_actor_state(actor, x + 90, y + 32)
  51.         draw_actor_exp(actor, x, y + 64,180)
  52.         draw_actor_hp(actor, x + 190, y + 32)
  53.         draw_actor_sp(actor, x + 190, y + 64)
  54.       end
  55.     end
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 刷新光标矩形
  59.   #--------------------------------------------------------------------------
  60.   def update_cursor_rect
  61.     if @index < 0
  62.       self.cursor_rect.empty
  63.     else
  64.       self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
  65.     end
  66.   end
  67. end
复制代码
然后再把下面这段插到所有脚本的最前面,也就是第一个。
  1. #如果打算加密,请将下面的false改为true
  2. #更改后,将会完全使用新脚本,而对于没有头像和半身像的角色将会出错(如果没有加密则不会出错)

  3. $加密 = true
复制代码
在这段里的bitmap=Bitmap.new("Graphics/Touxiang/#{testname}")
“Touxiang”是指你存放头像的文件目录,可自己修改。

点评

声明一下可以了,前辈写出来的脚本就是让新手或脚本盲用的,谈不上厚不厚道的问题  发表于 2011-8-26 15:19
66RPG整合脚本 这剪太不厚道了  发表于 2011-8-26 12:24
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-23 14:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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