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

Project1

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

[RM脚本] 很漂亮的重新排版菜单、窗口

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
2 小时
注册时间
2006-9-3
帖子
61
跳转到指定楼层
1
发表于 2006-10-1 12:10:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
呵呵
问题很多,希望大家修改。

第一部分

  1. # Custom Menu System
  2. #============================================================
  3. class Window_Base < Window

  4. def draw_actor_level(actor, x, y)
  5. self.contents.font.color = normal_color
  6. self.contents.draw_text(x + 4, y + 20, 24, 32, actor.level.to_s, 2)
  7. end

  8. def draw_actor_battler(actor, x, y)
  9. bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  10. cw = bitmap.width
  11. ch = bitmap.height
  12. src_rect = Rect.new(0, 0, cw, ch)
  13. self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  14. end

  15. def draw_sprite(x, y, name, hue, pose, frame)
  16. bitmap = RPG::Cache.character(name, hue)
  17. cw = bitmap.width / 4
  18. ch = bitmap.height / 4
  19. case pose
  20. when 0;a = 0
  21. when 1;a = ch
  22. when 2;a = ch * 3
  23. when 3;a = ch * 2
  24. end

  25. case frame
  26. when 0;b = 0
  27. when 1;b = cw
  28. when 2;b = cw * 2
  29. when 3;b = cw * 3
  30. end
  31. src_rect = Rect.new(b, a, cw, ch)
  32. self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  33. end

  34. def draw_actor_hp(actor, x, y, width = 144)
  35. self.contents.font.name = "Tahoma"
  36. self.contents.font.size = 20
  37. self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  38. if width - 32 >= 108
  39. hp_x = x + width - 108
  40. flag = true
  41. elsif width - 32 >= 48
  42. hp_x = x + width - 48
  43. flag = false
  44. end
  45. self.contents.font.color = actor.hp == 0 ? knockout_color :
  46. actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  47. self.contents.draw_text(hp_x + 30, y, 48, 32, actor.hp.to_s, 2)
  48. if flag
  49. self.contents.font.color = normal_color
  50. self.contents.draw_text(hp_x + 30 + 48, y, 12, 32, "/", 1)
  51. self.contents.draw_text(hp_x + 30 + 60, y, 48, 32, actor.maxhp.to_s)
  52. end
  53. end
  54. #============================================
  55. def draw_actor_sp(actor, x, y, width = 144)
  56. self.contents.font.name = "Tahoma"
  57. self.contents.font.size = 20
  58. self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  59. self.contents.font.color = Color.new(74, 230, 51, 225)
  60. if width - 32 >= 108
  61. sp_x = x + width - 108
  62. flag = true
  63. elsif width - 32 >= 48
  64. sp_x = x + width - 48
  65. flag = false
  66. end
  67. self.contents.font.color = actor.sp == 0 ? knockout_color :
  68. actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  69. self.contents.draw_text(sp_x + 30, y, 48, 32, actor.sp.to_s, 2)
  70. if flag
  71. self.contents.font.color = normal_color
  72. self.contents.draw_text(sp_x + 30 + 48, y, 12, 32, "/", 1)
  73. self.contents.draw_text(sp_x + 30 + 60, y, 48, 32, actor.maxsp.to_s)
  74. end
  75. end

  76. def draw_actor_level3(actor, x, y)
  77. self.contents.font.color = system_color
  78. self.contents.draw_text(x, y, 32, 32, "Lv")
  79. self.contents.font.color = normal_color
  80. self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
  81. end

  82. def draw_actor_hp2(actor, x, y, width = 144)
  83. self.contents.font.color = system_color
  84. self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  85. if width - 32 >= 108
  86. hp_x = x + width - 108
  87. flag = true
  88. elsif width - 32 >= 48
  89. hp_x = x + width - 48
  90. flag = false
  91. end
  92. self.contents.font.color = actor.hp == 0 ? knockout_color :
  93. actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  94. self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  95. if flag
  96. self.contents.font.color = normal_color
  97. self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  98. self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
  99. end
  100. end

  101. def draw_actor_sp2(actor, x, y, width = 144)
  102. self.contents.font.color = system_color
  103. self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  104. if width - 32 >= 108
  105. sp_x = x + width - 108
  106. flag = true
  107. elsif width - 32 >= 48
  108. sp_x = x + width - 48
  109. flag = false
  110. end
  111. self.contents.font.color = actor.sp == 0 ? knockout_color :
  112. actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  113. self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
  114. if flag
  115. self.contents.font.color = normal_color
  116. self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  117. self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
  118. end
  119. end

  120. def draw_actor_name(actor, x, y)
  121. self.contents.font.color = normal_color
  122. self.contents.draw_text(x, y, 144, 32, actor.name)
  123. end

  124. def draw_actor_parameter2(actor, x, y, type)
  125. case type
  126. when 0
  127. parameter_name = $data_system.words.atk
  128. parameter_value = actor.atk
  129. when 1
  130. parameter_name = $data_system.words.pdef
  131. parameter_value = actor.pdef
  132. when 2
  133. parameter_name = "Magic Defense"
  134. parameter_value = actor.mdef
  135. when 3
  136. parameter_name = $data_system.words.str
  137. parameter_value = actor.str
  138. when 4
  139. parameter_name = $data_system.words.dex
  140. parameter_value = actor.dex
  141. when 5
  142. parameter_name = $data_system.words.agi
  143. parameter_value = actor.agi
  144. when 6
  145. parameter_name = $data_system.words.int
  146. parameter_value = actor.int
  147. end
  148. self.contents.font.color = system_color
  149. self.contents.font.size = 20
  150. self.contents.draw_text(x, y, 120, 32, parameter_name)
  151. self.contents.font.color = normal_color
  152. self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  153. end

  154. def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
  155. if type == "horizontal"
  156. width = length
  157. height = thick
  158. self.contents.fill_rect(x-1, y - 1, width + 1, height + 3, Color.new(0, 0, 0, 255))
  159. self.contents.fill_rect(x, y, width + 1, height + 1, Color.new(0, 0, 0, 255))
  160. w = width * e1.to_f / e2.to_f
  161. for i in 0..height
  162. r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
  163. g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
  164. b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
  165. a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
  166. self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
  167. end
  168. end
  169. end
  170. end

  171. class Window_Selectable2 < Window_Base

  172. attr_reader :index
  173. attr_reader :help_window

  174. def initialize(x, y, width, height)
  175. super(x, y, width, height)
  176. @item_max = 1
  177. @column_max = 1
  178. @index = -1
  179. end

  180. def index=(index)
  181. @index = index
  182. if self.active and @help_window != nil
  183. update_help
  184. end
  185. update_cursor_rect
  186. end

  187. def row_max
  188. return (@item_max + @column_max - 1) / @column_max
  189. end

  190. def top_row
  191. return self.oy / 32
  192. end

  193. def top_row=(row)
  194. if row < 0
  195. row = 0
  196. end
  197. if row > row_max - 1
  198. row = row_max - 1
  199. end
  200. self.oy = row * 32
  201. end

  202. def page_row_max
  203. return (self.height - 32) / 32
  204. end
  205. def page_item_max
  206. return page_row_max * @column_max
  207. end

  208. def help_window=(help_window)
  209. @help_window = help_window
  210. if self.active and @help_window != nil
  211. update_help
  212. end
  213. end

  214. def update_cursor_rect
  215. if @index < 0
  216. self.cursor_rect.empty
  217. return
  218. end
  219. row = @index / @column_max
  220. if row < self.top_row
  221. self.top_row = row
  222. end

  223. if row > self.top_row + (self.page_row_max - 1)
  224. self.top_row = row - (self.page_row_max - 1)
  225. end
  226. cursor_width = self.width / @column_max - 32
  227. x = @index % @column_max * (cursor_width + 32)
  228. y = @index / @column_max * 32 - self.oy
  229. self.cursor_rect.set(x, y, 65, 32)
  230. end

  231. def update
  232. super
  233. if self.active and @item_max > 0 and @index >= 0
  234. if Input.repeat?(Input::DOWN)
  235. if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  236. @index < @item_max - @column_max
  237. $game_system.se_play($data_system.cursor_se)
  238. @index = (@index + @column_max) % @item_max
  239. end
  240. end
  241. if Input.repeat?(Input::UP)
  242. if (@column_max == 1 and Input.trigger?(Input::UP)) or
  243. @index >= @column_max
  244. $game_system.se_play($data_system.cursor_se)
  245. @index = (@index - @column_max + @item_max) % @item_max
  246. end
  247. end
  248. if Input.repeat?(Input::RIGHT)
  249. if @column_max >= 2 and @index < @item_max - 1
  250. $game_system.se_play($data_system.cursor_se)
  251. @index += 1
  252. end
  253. end

  254. if Input.repeat?(Input::LEFT)
  255. if @column_max >= 2 and @index > 0
  256. $game_system.se_play($data_system.cursor_se)
  257. @index -= 1
  258. end
  259. end
  260. if Input.repeat?(Input::R)
  261. if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  262. $game_system.se_play($data_system.cursor_se)
  263. @index = [@index + self.page_item_max, @item_max - 1].min
  264. self.top_row += self.page_row_max
  265. end
  266. end

  267. if Input.repeat?(Input::L)
  268. if self.top_row > 0
  269. $game_system.se_play($data_system.cursor_se)
  270. @index = [@index - self.page_item_max, 0].max
  271. self.top_row -= self.page_row_max
  272. end
  273. end
  274. end
  275. if self.active and @help_window != nil
  276. update_help
  277. end
  278. update_cursor_rect
  279. end
  280. end

  281. class Window_Command2 < Window_Selectable2

  282. attr_accessor :commands

  283. def initialize(commands)
  284. super(0, 0, 270, 101)
  285. self.contents = Bitmap.new(width - 32, height - 32)
  286. @commands = commands
  287. @width = width
  288. @item_max = 6
  289. @column_max = 3
  290. @commands = commands
  291. self.index = 0
  292. end
  293. end

  294. class Dummy_Window_Command < Window_Base

  295. def initialize
  296. super(0, 0, 270, 101)
  297. self.contents = Bitmap.new(width - 32, height - 32)
  298. self.contents.font.name = "Tahoma"
  299. self.contents.font.size = 22
  300. refresh
  301. end

  302. def refresh
  303. self.contents.clear
  304. self.contents.draw_text(-35, 0, 124, 32, $data_system.words.item, 1)
  305. self.contents.draw_text(50, 0, 124, 32, $data_system.words.skill, 1)
  306. self.contents.draw_text(145, 0, 124, 32, $data_system.words.equip, 1)
  307. self.contents.draw_text(-35, 35, 124, 32, "Load", 1)
  308. self.contents.draw_text(50, 35, 124, 32, "Save", 1)
  309. self.contents.draw_text(140, 35, 124, 32, "Exit", 1)
  310. end
  311. end


  312. class Dummy_Window_Command2 < Window_Base

  313. def initialize
  314. super(0, 0, 270, 101)
  315. self.contents = Bitmap.new(width - 32, height - 32)
  316. self.contents.font.name = "Tahoma"
  317. self.contents.font.size = 22
  318. refresh
  319. end

  320. def refresh
  321. self.contents.clear
  322. bitmap = RPG::Cache.icon("034-Item03")
  323. self.contents.blt(35, 4, bitmap, Rect.new(0, 0, 24, 24))

  324. bitmap = RPG::Cache.icon("050-Skill07")
  325. self.contents.blt(115, 4, bitmap, Rect.new(0, 0, 24, 24))

  326. bitmap = RPG::Cache.icon("013-Body01")
  327. self.contents.blt(205, 4, bitmap, Rect.new(0, 0, 24, 24))

  328. bitmap = RPG::Cache.icon("033-Item02")
  329. self.contents.blt(35, 39, bitmap, Rect.new(0, 0, 24, 24))

  330. bitmap = RPG::Cache.icon("037-Item06")
  331. self.contents.blt(115, 39, bitmap, Rect.new(0, 0, 24, 24))

  332. bitmap = RPG::Cache.icon("039-Item08")
  333. self.contents.blt(205, 39, bitmap, Rect.new(0, 0, 24, 24))
  334. end
  335. end

  336. class Scene_Title
  337. $map_infos = load_data("Data/MapInfos.rxdata")
  338. for key in $map_infos.keys
  339. $map_infos[key] = $map_infos[key].name
  340. end
  341. end

  342. class Game_Actor < Game_Battler
  343. def now_exp
  344. return @exp - @exp_list[@level]
  345. end
  346. def next_exp
  347. return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  348. end

  349. end

  350. class Game_Map

  351. def name
  352. $map_infos[@map_id]
  353. end

  354. end

  355. class Window_PlayTime < Window_Base

  356. def initialize
  357. super(0, 0, 150, 101)
  358. self.contents = Bitmap.new(width - 32, height - 32)
  359. refresh
  360. end

  361. def refresh
  362. self.contents.clear
  363. self.contents.font.color = system_color
  364. self.contents.font.size = 20
  365. self.contents.draw_text(4, 0, 120, 32, "Playtime:")
  366. @total_sec = Graphics.frame_count / Graphics.frame_rate
  367. hour = @total_sec / 60 / 60
  368. min = @total_sec / 60 % 60
  369. sec = @total_sec % 60
  370. text = sprintf("%02d:%02d:%02d", hour, min, sec)
  371. self.contents.font.color = normal_color
  372. self.contents.draw_text(-15, 32, 120, 32, text, 2)
  373. end

  374. def update
  375. super
  376. if Graphics.frame_count / Graphics.frame_rate != @total_sec
  377. refresh
  378. end
  379. end
  380. end

  381. class Window_Location < Window_Base
  382. def initialize
  383. super(0, 0, 220,101)
  384. self.contents = Bitmap.new(width - 32, height - 32)
  385. self.contents.font.name = "Tahoma"
  386. self.contents.font.size = 22
  387. refresh
  388. end

  389. def refresh
  390. bitmap = RPG::Cache.icon("032-Item01")
  391. self.contents.blt(165, y + 40, bitmap, Rect.new(0, 0, 24, 24))
  392. cx = contents.text_size($data_system.words.gold).width
  393. self.contents.font.color = normal_color
  394. self.contents.font.size = 20
  395. self.contents.draw_text(44, 40, 120-cx-2, 32, $game_party.gold.to_s, 2)
  396. self.contents.font.color = system_color
  397. self.contents.draw_text(164-cx, 40, cx, 32, $data_system.words.gold, 2)
  398. lx = contents.text_size("Location:").width
  399. self.contents.draw_text(4, -55, lx, 144, "Location:", 1)
  400. self.contents.font.color = normal_color
  401. self.contents.font.size = 20
  402. self.contents.draw_text(10 + lx, 1, lx + 40, 32, $game_map.name.to_s, 1)
  403. end

  404. end

  405. class Window_GraphicCharacter1 < Window_Base
  406. def initialize
  407. super(0, 0, 200,180)
  408. self.contents = Bitmap.new(width - 32, height - 32)
  409. self.contents.font.name = "Tahoma"
  410. self.contents.font.size = 22
  411. @pose, @frame = 0, 0
  412. refresh
  413. end

  414. def refresh
  415. self.contents.clear
  416. actor = $game_party.actors[0]
  417. draw_sprite(25, 55, actor.character_name, actor.character_hue , @pose, @frame)
  418. end

  419. def frame_update
  420. @frame == 3 ? @frame = 0 : @frame += 1
  421. refresh
  422. end

  423. def update_pose(direction)
  424. if direction == 0
  425. @pose == 0 ? @pose = 3 : @pose -= 1
  426. else
  427. @pose == 3 ? @pose = 0 : @pose += 1
  428. end
  429. refresh
  430. end
  431. end

  432. class Window_GraphicCharacter2 < Window_Base
  433. def initialize
  434. super(0, 0, 200,180)
  435. self.contents = Bitmap.new(width - 32, height - 32)
  436. self.contents.font.name = "Tahoma"
  437. self.contents.font.size = 22
  438. @pose, @frame = 0, 0
  439. refresh
  440. end

  441. def refresh
  442. self.contents.clear
  443. if $game_party.actors.size < 2
  444. self.contents.draw_text(25, 55, 50, 28, "Empty")
  445. else
  446. actor = $game_party.actors[1]
  447. draw_sprite(25, 55, actor.character_name, actor.character_hue , @pose, @frame)
  448. end
  449. end

  450. def frame_update
  451. @frame == 3 ? @frame = 0 : @frame += 1
  452. refresh
  453. end

  454. def update_pose(direction)
  455. if direction == 0
  456. @pose == 0 ? @pose = 3 : @pose -= 1
  457. else
  458. @pose == 3 ? @pose = 0 : @pose += 1
  459. end
  460. refresh
  461. end
  462. end

  463. class Window_Character1 < Window_Base

  464. def initialize
  465. super(0, 0, 200,180)
  466. self.contents = Bitmap.new(width - 32, height - 32)
  467. self.contents.font.name = "Tahoma"
  468. self.contents.font.size = 22
  469. @pose, @frame = 0, 0
  470. refresh
  471. end

  472. def refresh
  473. self.contents.clear
  474. actor = $game_party.actors[0]
  475. draw_actor_hp(actor, x + 4, y + 55, 144)
  476. draw_actor_barz(actor, x + 4, y + 81, "horizontal", 160, 4, actor.hp, actor.maxhp, Color.new(102, --200, 160, 0), Color.new(0, 0, 0, 0))
  477. draw_actor_sp(actor, x + 4, y + 110, 144)
  478. draw_actor_barz(actor, x + 4, y + 136, "horizontal", 160, 4, actor.sp, actor.maxsp, Color.new(0, 0, 0, 0), Color.new(-102, 160, -200, 0))
  479. self.contents.font.size = 20
  480. self.contents.draw_text(x + 50, y - 55, 144, 144, "Class:")
  481. draw_actor_class(actor, x + 100, y + 1)
  482. self.contents.draw_text(x + 50, y - 62, 144, 170, "_____________________")
  483. self.contents.draw_text(x + 80, y - 30, 144, 144, "Lv:")
  484. draw_actor_level(actor, x + 95, y + 6)
  485. end

  486. end

  487. class Window_Character2 < Window_Base

  488. def initialize
  489. super(0, 0, 200,200)
  490. self.contents = Bitmap.new(width - 32, height - 32)
  491. self.contents.font.name = "Tahoma"
  492. self.contents.font.size = 22
  493. refresh
  494. end

  495. def refresh
  496. self.contents.clear
  497. if $game_party.actors.size < 2
  498. self.contents.draw_text(25, 55, 50, 28, "Empty")
  499. else
  500. actor = $game_party.actors[1]
  501. draw_actor_hp(actor, x + 4, y + 55, 144)
  502. draw_actor_barz(actor, x + 4, y + 81, "horizontal", 160, 4, actor.hp, actor.maxhp, Color.new(102, --200, 160, 0), Color.new(0, 0, 0, 0))
  503. draw_actor_sp(actor, x + 4, y + 110, 144)
  504. draw_actor_barz(actor, x + 4, y + 136, "horizontal", 160, 4, actor.sp, actor.maxsp, Color.new(0, 0, 0, 0), Color.new(-102, 160, -200, 0))
  505. self.contents.font.size = 20
  506. self.contents.draw_text(x + 50, y - 55, 144, 144, "Class:")
  507. draw_actor_class(actor, x + 100, y + 1)
  508. self.contents.draw_text(x + 50, y - 62, 144, 170, "_____________________")
  509. self.contents.draw_text(x + 80, y - 30, 144, 144, "Lv:")
  510. draw_actor_level(actor, x + 95, y + 6)
  511. end
  512. end

  513. end

  514. class Window_Character_Selection2 < Window_Base

  515. def initialize
  516. super(0, 0, 640, 51)
  517. self.contents = Bitmap.new(width - 32, height - 32)
  518. self.visible = false
  519. self.z = 2000
  520. refresh
  521. end

  522. def refresh
  523. self.contents.clear
  524. self.contents.font.color = system_color
  525. cx = contents.text_size("Which Character would you like to select?").width
  526. self.contents.draw_text(145, -6, cx, 32, "Which Character would you like to select?", 2)
  527. end
  528. end

  529. #==============================================================================
  530. # ** Window_Selectable
  531. #------------------------------------------------------------------------------
  532. # This window class contains cursor movement and scroll functions.
  533. #==============================================================================

  534. class Window_Selectable3 < Window_Base
  535. #--------------------------------------------------------------------------
  536. # * Public Instance Variables
  537. #--------------------------------------------------------------------------
  538. attr_reader :index # cursor position
  539. attr_reader :help_window # help window
  540. #--------------------------------------------------------------------------
  541. # * Object Initialization
  542. # x : window x-coordinate
  543. # y : window y-coordinate
  544. # width : window width
  545. # height : window height
  546. #--------------------------------------------------------------------------
  547. def initialize(x, y, width, height)
  548. super(x, y, width, height)
  549. @item_max = 1
  550. @column_max = 1
  551. @index = -1
  552. end
  553. #--------------------------------------------------------------------------
  554. # * Set Cursor Position
  555. # index : new cursor position
  556. #--------------------------------------------------------------------------
  557. def index=(index)
  558. @index = index
  559. # Update Help Text (update_help is defined by the subclasses)
  560. if self.active and @help_window != nil
  561. update_help
  562. end
  563. # Update cursor rectangle
  564. update_cursor_rect
  565. end
  566. #--------------------------------------------------------------------------
  567. # * Get Row Count
  568. #--------------------------------------------------------------------------
  569. def row_max
  570. # Compute rows from number of items and columns
  571. return (@item_max + @column_max - 1) / @column_max
  572. end
  573. #--------------------------------------------------------------------------
  574. # * Get Top Row
  575. #--------------------------------------------------------------------------
  576. def top_row
  577. # Divide y-coordinate of window contents transfer origin by 1 row
  578. # height of 32
  579. return self.oy / 32
  580. end
  581. #--------------------------------------------------------------------------
  582. # * Set Top Row
  583. # row : row shown on top
  584. #--------------------------------------------------------------------------
  585. def top_row=(row)
  586. # If row is less than 0, change it to 0
  587. if row < 0
  588. row = 0
  589. end
  590. # If row exceeds row_max - 1, change it to row_max - 1
  591. if row > row_max - 1
  592. row = row_max - 1
  593. end
  594. # Multiply 1 row height by 32 for y-coordinate of window contents
  595. # transfer origin
  596. self.oy = row * 32
  597. end
  598. #--------------------------------------------------------------------------
  599. # * Get Number of Rows Displayable on 1 Page
  600. #--------------------------------------------------------------------------
  601. def page_row_max
  602. # Subtract a frame height of 32 from the window height, and divide it by
  603. # 1 row height of 32
  604. return (self.height - 32) / 32
  605. end
  606. #--------------------------------------------------------------------------
  607. # * Get Number of Items Displayable on 1 Page
  608. #--------------------------------------------------------------------------
  609. def page_item_max
  610. # Multiply row count (page_row_max) times column count (@column_max)
  611. return page_row_max * @column_max
  612. end
  613. #--------------------------------------------------------------------------
  614. # * Set Help Window
  615. # help_window : new help window
  616. #--------------------------------------------------------------------------
  617. def help_window=(help_window)
  618. @help_window = help_window
  619. # Update help text (update_help is defined by the subclasses)
  620. if self.active and @help_window != nil
  621. update_help
  622. end
  623. end
  624. #--------------------------------------------------------------------------
  625. # * Update Cursor Rectangle
  626. #--------------------------------------------------------------------------
  627. def update_cursor_rect
  628. # If cursor position is less than 0
  629. if @index < 0
  630. self.cursor_rect.empty
  631. return
  632. end
  633. # Get current row
  634. row = @index / @column_max
  635. # If current row is before top row
  636. if row < self.top_row
  637. # Scroll so that current row becomes top row
  638. self.top_row = row
  639. end
  640. # If current row is more to back than back row
  641. if row > self.top_row + (self.page_row_max - 1)
  642. # Scroll so that current row becomes back row
  643. self.top_row = row - (self.page_row_max - 1)
  644. end
  645. # Calculate cursor width
  646. cursor_width = self.width / @column_max - 32
  647. # Calculate cursor coordinates
  648. x = @index % @column_max * (cursor_width + 32)
  649. y = @index / @column_max * 32 - self.oy
  650. # Update cursor rectangle
  651. if $game_party.actors.size < 2
  652. self.cursor_rect.set(250 + @index * 140, y, 100, 20)
  653.   else
  654. self.cursor_rect.set(160 + @index * 140, y, 150, 20)
  655. end
  656. end
  657. #--------------------------------------------------------------------------
  658. # * Frame Update
  659. #--------------------------------------------------------------------------
  660. def update
  661. super
  662. # If cursor is movable
  663. if self.active and @item_max > 0 and @index >= 0
  664. # If pressing down on the directional buttons
  665. if Input.repeat?(Input::DOWN)
  666. # If column count is 1 and directional button was pressed down with no
  667. # repeat, or if cursor position is more to the front than
  668. # (item count - column count)
  669. if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  670. @index < @item_max - @column_max
  671. # Move cursor down
  672. $game_system.se_play($data_system.cursor_se)
  673. @index = (@index + @column_max) % @item_max
  674. end
  675. end
  676. # If the up directional button was pressed
  677. if Input.repeat?(Input::UP)
  678. # If column count is 1 and directional button was pressed up with no
  679. # repeat, or if cursor position is more to the back than column count
  680. if (@column_max == 1 and Input.trigger?(Input::UP)) or
  681. @index >= @column_max
  682. # Move cursor up
  683. $game_system.se_play($data_system.cursor_se)
  684. @index = (@index - @column_max + @item_max) % @item_max
  685. end
  686. end
  687. # If the right directional button was pressed
  688. if Input.repeat?(Input::RIGHT)
  689. # If column count is 2 or more, and cursor position is closer to front
  690. # than (item count -1)
  691. if @column_max >= 2 and @index < @item_max - 1
  692. # Move cursor right
  693. $game_system.se_play($data_system.cursor_se)
  694. @index += 1
  695. end
  696. end
  697. # If the left directional button was pressed
  698. if Input.repeat?(Input::LEFT)
  699. # If column count is 2 or more, and cursor position is more back than 0
  700. if @column_max >= 2 and @index > 0
  701. # Move cursor left
  702. $game_system.se_play($data_system.cursor_se)
  703. @index -= 1
  704. end
  705. end
  706. # If R button was pressed
  707. if Input.repeat?(Input::R)
  708. # If bottom row being displayed is more to front than bottom data row
  709. if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  710. # Move cursor 1 page back
  711. $game_system.se_play($data_system.cursor_se)
  712. @index = [@index + self.page_item_max, @item_max - 1].min
  713. self.top_row += self.page_row_max
  714. end
  715. end
  716. # If L button was pressed
  717. if Input.repeat?(Input::L)
  718. # If top row being displayed is more to back than 0
  719. if self.top_row > 0
  720. # Move cursor 1 page forward
  721. $game_system.se_play($data_system.cursor_se)
  722. @index = [@index - self.page_item_max, 0].max
  723. self.top_row -= self.page_row_max
  724. end
  725. end
  726. end
  727. # Update help text (update_help is defined by the subclasses)
  728. if self.active and @help_window != nil
  729. update_help
  730. end
  731. # Update cursor rectangle
  732. update_cursor_rect
  733. end
  734. end

  735. class Window_StatusCharacter1 < Window_Base

  736. def initialize
  737. super(0, 0, 440,180)
  738. self.contents = Bitmap.new(width - 32, height - 32)
  739. self.contents.font.name = "Tahoma"
  740. self.contents.font.size = 22
  741. refresh
  742. end

  743. def refresh
  744. self.contents.clear
  745. self.contents.font.color = system_color
  746. self.contents.font.size = 20
  747. self.contents.draw_text(215, -63, 144, 144, "Current State:")
  748. self.contents.draw_text(190, 114, 120, 32, "Experience:")
  749. self.contents.draw_text(0, -7, 120, 32, "Name:")
  750. actor = @actor
  751. @actor = $game_party.actors[0]
  752. draw_actor_name(@actor, x + 55, y - 7)
  753. draw_actor_state(@actor, 325, -8, 144)
  754. draw_actor_parameter2(@actor, 0, 15 + 10, 0)
  755. draw_actor_parameter2(@actor, 0, 15 + 40, 1)
  756. draw_actor_parameter2(@actor, 0, 15 + 70, 2)
  757. draw_actor_parameter2(@actor, 0, 15 + 100, 3)
  758. draw_actor_parameter2(@actor, 190, 15 + 10, 4)
  759. draw_actor_parameter2(@actor, 190, 15 + 40, 5)
  760. draw_actor_parameter2(@actor, 190, 15 + 70, 6)
  761. draw_actor_barz(@actor, 0, 15 + 37, "horizontal", 168, 1, @actor.atk, 999, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
  762. draw_actor_barz(@actor, 0, 15 + 67, "horizontal", 168, 1, @actor.pdef, 999, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
  763. draw_actor_barz(@actor, 0, 15 + 97, "horizontal", 168, 1, @actor.mdef, 999, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
  764. draw_actor_barz(@actor, 0, 15 + 127, "horizontal", 168, 1, @actor.str, 999, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
  765. draw_actor_barz(@actor, 190, 15 + 37, "horizontal", 168, 1, @actor.dex, 999, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
  766. draw_actor_barz(@actor, 190, 15 + 67, "horizontal", 168, 1, @actor.agi, 999, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
  767. draw_actor_barz(@actor, 190, 15 + 97, "horizontal", 168, 1, @actor.int, 999, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
  768. draw_actor_barz(@actor, 190, 15 + 127, "horizontal", 168, 1, @actor.now_exp.to_f, @actor.next_exp, Color.new(-255, 200, -86, 255), Color.new(-168, -157, 184, 255))
  769. end

  770. end

  771. class Window_StatusCharacter2 < Window_Base

  772. def initialize
  773. super(0, 0, 440,200)
  774. self.contents = Bitmap.new(width - 32, height - 32)
  775. self.contents.font.name = "Tahoma"
  776. self.contents.font.size = 22
  777. refresh
  778. end

  779. def refresh
  780. self.contents.clear
  781. if $game_party.actors.size < 2
  782. self.contents.draw_text(25, 55, 50, 28, "Empty")
  783. else
  784. self.contents.font.color = system_color
  785. self.contents.font.size = 20
  786. self.contents.draw_text(215, -63, 144, 144, "Current State:")
  787. self.contents.draw_text(190, 114, 120, 32, "Experience:")
  788. self.contents.draw_text(0, -7, 120, 32, "Name:")
  789. actor = @actor
  790. @actor = $game_party.actors[1]
  791. draw_actor_name(@actor, x + 55, y - 7)
  792. draw_actor_state(@actor, 325, -8, 144)
  793. draw_actor_parameter2(@actor, 0, 15 + 10, 0)
  794. draw_actor_parameter2(@actor, 0, 15 + 40, 1)
  795. draw_actor_parameter2(@actor, 0, 15 + 70, 2)
  796. draw_actor_parameter2(@actor, 0, 15 + 100, 3)
  797. draw_actor_parameter2(@actor, 190, 15 + 10, 4)
  798. draw_actor_parameter2(@actor, 190, 15 + 40, 5)
  799. draw_actor_parameter2(@actor, 190, 15 + 70, 6)
  800. draw_actor_barz(@actor, 0, 15 + 37, "horizontal", 168, 1, @actor.atk, 999, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
  801. draw_actor_barz(@actor, 0, 15 + 67, "horizontal", 168, 1, @actor.pdef, 999, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
  802. draw_actor_barz(@actor, 0, 15 + 97, "horizontal", 168, 1, @actor.mdef, 999, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
  803. draw_actor_barz(@actor, 0, 15 + 127, "horizontal", 168, 1, @actor.str, 999, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
  804. draw_actor_barz(@actor, 190, 15 + 37, "horizontal", 168, 1, @actor.dex, 999, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
  805. draw_actor_barz(@actor, 190, 15 + 67, "horizontal", 168, 1, @actor.agi, 999, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
  806. draw_actor_barz(@actor, 190, 15 + 97, "horizontal", 168, 1, @actor.int, 999, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
  807. draw_actor_barz(@actor, 190, 15 + 127, "horizontal", 168, 1, @actor.now_exp.to_f, @actor.next_exp, Color.new(-255, 200, -86, 255), Color.new(-168, -157, 184, 255))
  808. end
  809. end

  810. end

  811. class Scene_Load2 < Scene_File

  812. def initialize
  813. $game_temp = Game_Temp.new
  814. $game_temp.last_file_index = 0
  815. latest_time = Time.at(0)
  816. for i in 0..3
  817. filename = make_filename(i)
  818. if FileTest.exist?(filename)
  819. file = File.open(filename, "r")
  820. if file.mtime > latest_time
  821. latest_time = file.mtime
  822. $game_temp.last_file_index = i
  823. end
  824. file.close
  825. end
  826. end
  827. super("Which file would you like to load?")
  828. end

  829. def on_decision(filename)
  830. unless FileTest.exist?(filename)
  831. $game_system.se_play($data_system.buzzer_se)
  832. return
  833. end
  834. $game_system.se_play($data_system.load_se)
  835. file = File.open(filename, "rb")
  836. read_save_data(file)
  837. file.close
  838. $game_system.bgm_play($game_system.playing_bgm)
  839. $game_system.bgs_play($game_system.playing_bgs)
  840. $game_map.update
  841. $scene = Scene_Map.new
  842. end

  843. def on_cancel
  844. $game_system.se_play($data_system.cancel_se)
  845. $scene = Scene_Menu.new(3)
  846. end

  847. def read_save_data(file)
  848. characters = Marshal.load(file)
  849. Graphics.frame_count = Marshal.load(file)
  850. $game_system = Marshal.load(file)
  851. $game_switches = Marshal.load(file)
  852. $game_variables = Marshal.load(file)
  853. $game_self_switches = Marshal.load(file)
  854. $game_screen = Marshal.load(file)
  855. $game_actors = Marshal.load(file)
  856. $game_party = Marshal.load(file)
  857. $game_troop = Marshal.load(file)
  858. $game_map = Marshal.load(file)
  859. $game_player = Marshal.load(file)

  860. if $game_system.magic_number != $data_system.magic_number
  861. $game_map.setup($game_map.map_id)
  862. $game_player.center($game_player.x, $game_player.y)
  863. end
  864. $game_party.refresh
  865. end
  866. end

  867. class Window_EquipLeft2 < Window_Base

  868. def initialize(actor)
  869. super(0, 64, 272, 192)
  870. self.contents = Bitmap.new(width - 32, height - 32)
  871. @actor = actor
  872. refresh
  873. end

  874. def refresh
  875. self.contents.clear
  876. draw_actor_name(@actor, 4, 0)
  877. draw_actor_level3(@actor, 4, 32)
  878. draw_actor_parameter(@actor, 4, 64, 0)
  879. draw_actor_parameter(@actor, 4, 96, 1)
  880. draw_actor_parameter(@actor, 4, 128, 2)
  881. if @new_atk != nil
  882. self.contents.font.color = system_color
  883. self.contents.draw_text(160, 64, 40, 32, "->", 1)
  884. self.contents.font.color = normal_color
  885. self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
  886. end
  887. if @new_pdef != nil
  888. self.contents.font.color = system_color
  889. self.contents.draw_text(160, 96, 40, 32, "->", 1)
  890. self.contents.font.color = normal_color
  891. self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
  892. end
  893. if @new_mdef != nil
  894. self.contents.font.color = system_color
  895. self.contents.draw_text(160, 128, 40, 32, "->", 1)
  896. self.contents.font.color = normal_color
  897. self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
  898. end
  899. end

  900. def set_new_parameters(new_atk, new_pdef, new_mdef)
  901. if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
  902. @new_atk = new_atk
  903. @new_pdef = new_pdef
  904. @new_mdef = new_mdef
  905. refresh
  906. end
  907. end
  908. end
复制代码

Lv1.梦旅人

梦石
0
星屑
50
在线时间
2 小时
注册时间
2006-9-3
帖子
61
2
 楼主| 发表于 2006-10-1 12:10:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
呵呵
问题很多,希望大家修改。

第一部分

  1. # Custom Menu System
  2. #============================================================
  3. class Window_Base < Window

  4. def draw_actor_level(actor, x, y)
  5. self.contents.font.color = normal_color
  6. self.contents.draw_text(x + 4, y + 20, 24, 32, actor.level.to_s, 2)
  7. end

  8. def draw_actor_battler(actor, x, y)
  9. bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  10. cw = bitmap.width
  11. ch = bitmap.height
  12. src_rect = Rect.new(0, 0, cw, ch)
  13. self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  14. end

  15. def draw_sprite(x, y, name, hue, pose, frame)
  16. bitmap = RPG::Cache.character(name, hue)
  17. cw = bitmap.width / 4
  18. ch = bitmap.height / 4
  19. case pose
  20. when 0;a = 0
  21. when 1;a = ch
  22. when 2;a = ch * 3
  23. when 3;a = ch * 2
  24. end

  25. case frame
  26. when 0;b = 0
  27. when 1;b = cw
  28. when 2;b = cw * 2
  29. when 3;b = cw * 3
  30. end
  31. src_rect = Rect.new(b, a, cw, ch)
  32. self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  33. end

  34. def draw_actor_hp(actor, x, y, width = 144)
  35. self.contents.font.name = "Tahoma"
  36. self.contents.font.size = 20
  37. self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  38. if width - 32 >= 108
  39. hp_x = x + width - 108
  40. flag = true
  41. elsif width - 32 >= 48
  42. hp_x = x + width - 48
  43. flag = false
  44. end
  45. self.contents.font.color = actor.hp == 0 ? knockout_color :
  46. actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  47. self.contents.draw_text(hp_x + 30, y, 48, 32, actor.hp.to_s, 2)
  48. if flag
  49. self.contents.font.color = normal_color
  50. self.contents.draw_text(hp_x + 30 + 48, y, 12, 32, "/", 1)
  51. self.contents.draw_text(hp_x + 30 + 60, y, 48, 32, actor.maxhp.to_s)
  52. end
  53. end
  54. #============================================
  55. def draw_actor_sp(actor, x, y, width = 144)
  56. self.contents.font.name = "Tahoma"
  57. self.contents.font.size = 20
  58. self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  59. self.contents.font.color = Color.new(74, 230, 51, 225)
  60. if width - 32 >= 108
  61. sp_x = x + width - 108
  62. flag = true
  63. elsif width - 32 >= 48
  64. sp_x = x + width - 48
  65. flag = false
  66. end
  67. self.contents.font.color = actor.sp == 0 ? knockout_color :
  68. actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  69. self.contents.draw_text(sp_x + 30, y, 48, 32, actor.sp.to_s, 2)
  70. if flag
  71. self.contents.font.color = normal_color
  72. self.contents.draw_text(sp_x + 30 + 48, y, 12, 32, "/", 1)
  73. self.contents.draw_text(sp_x + 30 + 60, y, 48, 32, actor.maxsp.to_s)
  74. end
  75. end

  76. def draw_actor_level3(actor, x, y)
  77. self.contents.font.color = system_color
  78. self.contents.draw_text(x, y, 32, 32, "Lv")
  79. self.contents.font.color = normal_color
  80. self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
  81. end

  82. def draw_actor_hp2(actor, x, y, width = 144)
  83. self.contents.font.color = system_color
  84. self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  85. if width - 32 >= 108
  86. hp_x = x + width - 108
  87. flag = true
  88. elsif width - 32 >= 48
  89. hp_x = x + width - 48
  90. flag = false
  91. end
  92. self.contents.font.color = actor.hp == 0 ? knockout_color :
  93. actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  94. self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  95. if flag
  96. self.contents.font.color = normal_color
  97. self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  98. self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
  99. end
  100. end

  101. def draw_actor_sp2(actor, x, y, width = 144)
  102. self.contents.font.color = system_color
  103. self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  104. if width - 32 >= 108
  105. sp_x = x + width - 108
  106. flag = true
  107. elsif width - 32 >= 48
  108. sp_x = x + width - 48
  109. flag = false
  110. end
  111. self.contents.font.color = actor.sp == 0 ? knockout_color :
  112. actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  113. self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
  114. if flag
  115. self.contents.font.color = normal_color
  116. self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  117. self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
  118. end
  119. end

  120. def draw_actor_name(actor, x, y)
  121. self.contents.font.color = normal_color
  122. self.contents.draw_text(x, y, 144, 32, actor.name)
  123. end

  124. def draw_actor_parameter2(actor, x, y, type)
  125. case type
  126. when 0
  127. parameter_name = $data_system.words.atk
  128. parameter_value = actor.atk
  129. when 1
  130. parameter_name = $data_system.words.pdef
  131. parameter_value = actor.pdef
  132. when 2
  133. parameter_name = "Magic Defense"
  134. parameter_value = actor.mdef
  135. when 3
  136. parameter_name = $data_system.words.str
  137. parameter_value = actor.str
  138. when 4
  139. parameter_name = $data_system.words.dex
  140. parameter_value = actor.dex
  141. when 5
  142. parameter_name = $data_system.words.agi
  143. parameter_value = actor.agi
  144. when 6
  145. parameter_name = $data_system.words.int
  146. parameter_value = actor.int
  147. end
  148. self.contents.font.color = system_color
  149. self.contents.font.size = 20
  150. self.contents.draw_text(x, y, 120, 32, parameter_name)
  151. self.contents.font.color = normal_color
  152. self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  153. end

  154. def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
  155. if type == "horizontal"
  156. width = length
  157. height = thick
  158. self.contents.fill_rect(x-1, y - 1, width + 1, height + 3, Color.new(0, 0, 0, 255))
  159. self.contents.fill_rect(x, y, width + 1, height + 1, Color.new(0, 0, 0, 255))
  160. w = width * e1.to_f / e2.to_f
  161. for i in 0..height
  162. r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
  163. g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
  164. b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
  165. a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
  166. self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
  167. end
  168. end
  169. end
  170. end

  171. class Window_Selectable2 < Window_Base

  172. attr_reader :index
  173. attr_reader :help_window

  174. def initialize(x, y, width, height)
  175. super(x, y, width, height)
  176. @item_max = 1
  177. @column_max = 1
  178. @index = -1
  179. end

  180. def index=(index)
  181. @index = index
  182. if self.active and @help_window != nil
  183. update_help
  184. end
  185. update_cursor_rect
  186. end

  187. def row_max
  188. return (@item_max + @column_max - 1) / @column_max
  189. end

  190. def top_row
  191. return self.oy / 32
  192. end

  193. def top_row=(row)
  194. if row < 0
  195. row = 0
  196. end
  197. if row > row_max - 1
  198. row = row_max - 1
  199. end
  200. self.oy = row * 32
  201. end

  202. def page_row_max
  203. return (self.height - 32) / 32
  204. end
  205. def page_item_max
  206. return page_row_max * @column_max
  207. end

  208. def help_window=(help_window)
  209. @help_window = help_window
  210. if self.active and @help_window != nil
  211. update_help
  212. end
  213. end

  214. def update_cursor_rect
  215. if @index < 0
  216. self.cursor_rect.empty
  217. return
  218. end
  219. row = @index / @column_max
  220. if row < self.top_row
  221. self.top_row = row
  222. end

  223. if row > self.top_row + (self.page_row_max - 1)
  224. self.top_row = row - (self.page_row_max - 1)
  225. end
  226. cursor_width = self.width / @column_max - 32
  227. x = @index % @column_max * (cursor_width + 32)
  228. y = @index / @column_max * 32 - self.oy
  229. self.cursor_rect.set(x, y, 65, 32)
  230. end

  231. def update
  232. super
  233. if self.active and @item_max > 0 and @index >= 0
  234. if Input.repeat?(Input::DOWN)
  235. if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  236. @index < @item_max - @column_max
  237. $game_system.se_play($data_system.cursor_se)
  238. @index = (@index + @column_max) % @item_max
  239. end
  240. end
  241. if Input.repeat?(Input::UP)
  242. if (@column_max == 1 and Input.trigger?(Input::UP)) or
  243. @index >= @column_max
  244. $game_system.se_play($data_system.cursor_se)
  245. @index = (@index - @column_max + @item_max) % @item_max
  246. end
  247. end
  248. if Input.repeat?(Input::RIGHT)
  249. if @column_max >= 2 and @index < @item_max - 1
  250. $game_system.se_play($data_system.cursor_se)
  251. @index += 1
  252. end
  253. end

  254. if Input.repeat?(Input::LEFT)
  255. if @column_max >= 2 and @index > 0
  256. $game_system.se_play($data_system.cursor_se)
  257. @index -= 1
  258. end
  259. end
  260. if Input.repeat?(Input::R)
  261. if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  262. $game_system.se_play($data_system.cursor_se)
  263. @index = [@index + self.page_item_max, @item_max - 1].min
  264. self.top_row += self.page_row_max
  265. end
  266. end

  267. if Input.repeat?(Input::L)
  268. if self.top_row > 0
  269. $game_system.se_play($data_system.cursor_se)
  270. @index = [@index - self.page_item_max, 0].max
  271. self.top_row -= self.page_row_max
  272. end
  273. end
  274. end
  275. if self.active and @help_window != nil
  276. update_help
  277. end
  278. update_cursor_rect
  279. end
  280. end

  281. class Window_Command2 < Window_Selectable2

  282. attr_accessor :commands

  283. def initialize(commands)
  284. super(0, 0, 270, 101)
  285. self.contents = Bitmap.new(width - 32, height - 32)
  286. @commands = commands
  287. @width = width
  288. @item_max = 6
  289. @column_max = 3
  290. @commands = commands
  291. self.index = 0
  292. end
  293. end

  294. class Dummy_Window_Command < Window_Base

  295. def initialize
  296. super(0, 0, 270, 101)
  297. self.contents = Bitmap.new(width - 32, height - 32)
  298. self.contents.font.name = "Tahoma"
  299. self.contents.font.size = 22
  300. refresh
  301. end

  302. def refresh
  303. self.contents.clear
  304. self.contents.draw_text(-35, 0, 124, 32, $data_system.words.item, 1)
  305. self.contents.draw_text(50, 0, 124, 32, $data_system.words.skill, 1)
  306. self.contents.draw_text(145, 0, 124, 32, $data_system.words.equip, 1)
  307. self.contents.draw_text(-35, 35, 124, 32, "Load", 1)
  308. self.contents.draw_text(50, 35, 124, 32, "Save", 1)
  309. self.contents.draw_text(140, 35, 124, 32, "Exit", 1)
  310. end
  311. end


  312. class Dummy_Window_Command2 < Window_Base

  313. def initialize
  314. super(0, 0, 270, 101)
  315. self.contents = Bitmap.new(width - 32, height - 32)
  316. self.contents.font.name = "Tahoma"
  317. self.contents.font.size = 22
  318. refresh
  319. end

  320. def refresh
  321. self.contents.clear
  322. bitmap = RPG::Cache.icon("034-Item03")
  323. self.contents.blt(35, 4, bitmap, Rect.new(0, 0, 24, 24))

  324. bitmap = RPG::Cache.icon("050-Skill07")
  325. self.contents.blt(115, 4, bitmap, Rect.new(0, 0, 24, 24))

  326. bitmap = RPG::Cache.icon("013-Body01")
  327. self.contents.blt(205, 4, bitmap, Rect.new(0, 0, 24, 24))

  328. bitmap = RPG::Cache.icon("033-Item02")
  329. self.contents.blt(35, 39, bitmap, Rect.new(0, 0, 24, 24))

  330. bitmap = RPG::Cache.icon("037-Item06")
  331. self.contents.blt(115, 39, bitmap, Rect.new(0, 0, 24, 24))

  332. bitmap = RPG::Cache.icon("039-Item08")
  333. self.contents.blt(205, 39, bitmap, Rect.new(0, 0, 24, 24))
  334. end
  335. end

  336. class Scene_Title
  337. $map_infos = load_data("Data/MapInfos.rxdata")
  338. for key in $map_infos.keys
  339. $map_infos[key] = $map_infos[key].name
  340. end
  341. end

  342. class Game_Actor < Game_Battler
  343. def now_exp
  344. return @exp - @exp_list[@level]
  345. end
  346. def next_exp
  347. return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  348. end

  349. end

  350. class Game_Map

  351. def name
  352. $map_infos[@map_id]
  353. end

  354. end

  355. class Window_PlayTime < Window_Base

  356. def initialize
  357. super(0, 0, 150, 101)
  358. self.contents = Bitmap.new(width - 32, height - 32)
  359. refresh
  360. end

  361. def refresh
  362. self.contents.clear
  363. self.contents.font.color = system_color
  364. self.contents.font.size = 20
  365. self.contents.draw_text(4, 0, 120, 32, "Playtime:")
  366. @total_sec = Graphics.frame_count / Graphics.frame_rate
  367. hour = @total_sec / 60 / 60
  368. min = @total_sec / 60 % 60
  369. sec = @total_sec % 60
  370. text = sprintf("%02d:%02d:%02d", hour, min, sec)
  371. self.contents.font.color = normal_color
  372. self.contents.draw_text(-15, 32, 120, 32, text, 2)
  373. end

  374. def update
  375. super
  376. if Graphics.frame_count / Graphics.frame_rate != @total_sec
  377. refresh
  378. end
  379. end
  380. end

  381. class Window_Location < Window_Base
  382. def initialize
  383. super(0, 0, 220,101)
  384. self.contents = Bitmap.new(width - 32, height - 32)
  385. self.contents.font.name = "Tahoma"
  386. self.contents.font.size = 22
  387. refresh
  388. end

  389. def refresh
  390. bitmap = RPG::Cache.icon("032-Item01")
  391. self.contents.blt(165, y + 40, bitmap, Rect.new(0, 0, 24, 24))
  392. cx = contents.text_size($data_system.words.gold).width
  393. self.contents.font.color = normal_color
  394. self.contents.font.size = 20
  395. self.contents.draw_text(44, 40, 120-cx-2, 32, $game_party.gold.to_s, 2)
  396. self.contents.font.color = system_color
  397. self.contents.draw_text(164-cx, 40, cx, 32, $data_system.words.gold, 2)
  398. lx = contents.text_size("Location:").width
  399. self.contents.draw_text(4, -55, lx, 144, "Location:", 1)
  400. self.contents.font.color = normal_color
  401. self.contents.font.size = 20
  402. self.contents.draw_text(10 + lx, 1, lx + 40, 32, $game_map.name.to_s, 1)
  403. end

  404. end

  405. class Window_GraphicCharacter1 < Window_Base
  406. def initialize
  407. super(0, 0, 200,180)
  408. self.contents = Bitmap.new(width - 32, height - 32)
  409. self.contents.font.name = "Tahoma"
  410. self.contents.font.size = 22
  411. @pose, @frame = 0, 0
  412. refresh
  413. end

  414. def refresh
  415. self.contents.clear
  416. actor = $game_party.actors[0]
  417. draw_sprite(25, 55, actor.character_name, actor.character_hue , @pose, @frame)
  418. end

  419. def frame_update
  420. @frame == 3 ? @frame = 0 : @frame += 1
  421. refresh
  422. end

  423. def update_pose(direction)
  424. if direction == 0
  425. @pose == 0 ? @pose = 3 : @pose -= 1
  426. else
  427. @pose == 3 ? @pose = 0 : @pose += 1
  428. end
  429. refresh
  430. end
  431. end

  432. class Window_GraphicCharacter2 < Window_Base
  433. def initialize
  434. super(0, 0, 200,180)
  435. self.contents = Bitmap.new(width - 32, height - 32)
  436. self.contents.font.name = "Tahoma"
  437. self.contents.font.size = 22
  438. @pose, @frame = 0, 0
  439. refresh
  440. end

  441. def refresh
  442. self.contents.clear
  443. if $game_party.actors.size < 2
  444. self.contents.draw_text(25, 55, 50, 28, "Empty")
  445. else
  446. actor = $game_party.actors[1]
  447. draw_sprite(25, 55, actor.character_name, actor.character_hue , @pose, @frame)
  448. end
  449. end

  450. def frame_update
  451. @frame == 3 ? @frame = 0 : @frame += 1
  452. refresh
  453. end

  454. def update_pose(direction)
  455. if direction == 0
  456. @pose == 0 ? @pose = 3 : @pose -= 1
  457. else
  458. @pose == 3 ? @pose = 0 : @pose += 1
  459. end
  460. refresh
  461. end
  462. end

  463. class Window_Character1 < Window_Base

  464. def initialize
  465. super(0, 0, 200,180)
  466. self.contents = Bitmap.new(width - 32, height - 32)
  467. self.contents.font.name = "Tahoma"
  468. self.contents.font.size = 22
  469. @pose, @frame = 0, 0
  470. refresh
  471. end

  472. def refresh
  473. self.contents.clear
  474. actor = $game_party.actors[0]
  475. draw_actor_hp(actor, x + 4, y + 55, 144)
  476. draw_actor_barz(actor, x + 4, y + 81, "horizontal", 160, 4, actor.hp, actor.maxhp, Color.new(102, --200, 160, 0), Color.new(0, 0, 0, 0))
  477. draw_actor_sp(actor, x + 4, y + 110, 144)
  478. draw_actor_barz(actor, x + 4, y + 136, "horizontal", 160, 4, actor.sp, actor.maxsp, Color.new(0, 0, 0, 0), Color.new(-102, 160, -200, 0))
  479. self.contents.font.size = 20
  480. self.contents.draw_text(x + 50, y - 55, 144, 144, "Class:")
  481. draw_actor_class(actor, x + 100, y + 1)
  482. self.contents.draw_text(x + 50, y - 62, 144, 170, "_____________________")
  483. self.contents.draw_text(x + 80, y - 30, 144, 144, "Lv:")
  484. draw_actor_level(actor, x + 95, y + 6)
  485. end

  486. end

  487. class Window_Character2 < Window_Base

  488. def initialize
  489. super(0, 0, 200,200)
  490. self.contents = Bitmap.new(width - 32, height - 32)
  491. self.contents.font.name = "Tahoma"
  492. self.contents.font.size = 22
  493. refresh
  494. end

  495. def refresh
  496. self.contents.clear
  497. if $game_party.actors.size < 2
  498. self.contents.draw_text(25, 55, 50, 28, "Empty")
  499. else
  500. actor = $game_party.actors[1]
  501. draw_actor_hp(actor, x + 4, y + 55, 144)
  502. draw_actor_barz(actor, x + 4, y + 81, "horizontal", 160, 4, actor.hp, actor.maxhp, Color.new(102, --200, 160, 0), Color.new(0, 0, 0, 0))
  503. draw_actor_sp(actor, x + 4, y + 110, 144)
  504. draw_actor_barz(actor, x + 4, y + 136, "horizontal", 160, 4, actor.sp, actor.maxsp, Color.new(0, 0, 0, 0), Color.new(-102, 160, -200, 0))
  505. self.contents.font.size = 20
  506. self.contents.draw_text(x + 50, y - 55, 144, 144, "Class:")
  507. draw_actor_class(actor, x + 100, y + 1)
  508. self.contents.draw_text(x + 50, y - 62, 144, 170, "_____________________")
  509. self.contents.draw_text(x + 80, y - 30, 144, 144, "Lv:")
  510. draw_actor_level(actor, x + 95, y + 6)
  511. end
  512. end

  513. end

  514. class Window_Character_Selection2 < Window_Base

  515. def initialize
  516. super(0, 0, 640, 51)
  517. self.contents = Bitmap.new(width - 32, height - 32)
  518. self.visible = false
  519. self.z = 2000
  520. refresh
  521. end

  522. def refresh
  523. self.contents.clear
  524. self.contents.font.color = system_color
  525. cx = contents.text_size("Which Character would you like to select?").width
  526. self.contents.draw_text(145, -6, cx, 32, "Which Character would you like to select?", 2)
  527. end
  528. end

  529. #==============================================================================
  530. # ** Window_Selectable
  531. #------------------------------------------------------------------------------
  532. # This window class contains cursor movement and scroll functions.
  533. #==============================================================================

  534. class Window_Selectable3 < Window_Base
  535. #--------------------------------------------------------------------------
  536. # * Public Instance Variables
  537. #--------------------------------------------------------------------------
  538. attr_reader :index # cursor position
  539. attr_reader :help_window # help window
  540. #--------------------------------------------------------------------------
  541. # * Object Initialization
  542. # x : window x-coordinate
  543. # y : window y-coordinate
  544. # width : window width
  545. # height : window height
  546. #--------------------------------------------------------------------------
  547. def initialize(x, y, width, height)
  548. super(x, y, width, height)
  549. @item_max = 1
  550. @column_max = 1
  551. @index = -1
  552. end
  553. #--------------------------------------------------------------------------
  554. # * Set Cursor Position
  555. # index : new cursor position
  556. #--------------------------------------------------------------------------
  557. def index=(index)
  558. @index = index
  559. # Update Help Text (update_help is defined by the subclasses)
  560. if self.active and @help_window != nil
  561. update_help
  562. end
  563. # Update cursor rectangle
  564. update_cursor_rect
  565. end
  566. #--------------------------------------------------------------------------
  567. # * Get Row Count
  568. #--------------------------------------------------------------------------
  569. def row_max
  570. # Compute rows from number of items and columns
  571. return (@item_max + @column_max - 1) / @column_max
  572. end
  573. #--------------------------------------------------------------------------
  574. # * Get Top Row
  575. #--------------------------------------------------------------------------
  576. def top_row
  577. # Divide y-coordinate of window contents transfer origin by 1 row
  578. # height of 32
  579. return self.oy / 32
  580. end
  581. #--------------------------------------------------------------------------
  582. # * Set Top Row
  583. # row : row shown on top
  584. #--------------------------------------------------------------------------
  585. def top_row=(row)
  586. # If row is less than 0, change it to 0
  587. if row < 0
  588. row = 0
  589. end
  590. # If row exceeds row_max - 1, change it to row_max - 1
  591. if row > row_max - 1
  592. row = row_max - 1
  593. end
  594. # Multiply 1 row height by 32 for y-coordinate of window contents
  595. # transfer origin
  596. self.oy = row * 32
  597. end
  598. #--------------------------------------------------------------------------
  599. # * Get Number of Rows Displayable on 1 Page
  600. #--------------------------------------------------------------------------
  601. def page_row_max
  602. # Subtract a frame height of 32 from the window height, and divide it by
  603. # 1 row height of 32
  604. return (self.height - 32) / 32
  605. end
  606. #--------------------------------------------------------------------------
  607. # * Get Number of Items Displayable on 1 Page
  608. #--------------------------------------------------------------------------
  609. def page_item_max
  610. # Multiply row count (page_row_max) times column count (@column_max)
  611. return page_row_max * @column_max
  612. end
  613. #--------------------------------------------------------------------------
  614. # * Set Help Window
  615. # help_window : new help window
  616. #--------------------------------------------------------------------------
  617. def help_window=(help_window)
  618. @help_window = help_window
  619. # Update help text (update_help is defined by the subclasses)
  620. if self.active and @help_window != nil
  621. update_help
  622. end
  623. end
  624. #--------------------------------------------------------------------------
  625. # * Update Cursor Rectangle
  626. #--------------------------------------------------------------------------
  627. def update_cursor_rect
  628. # If cursor position is less than 0
  629. if @index < 0
  630. self.cursor_rect.empty
  631. return
  632. end
  633. # Get current row
  634. row = @index / @column_max
  635. # If current row is before top row
  636. if row < self.top_row
  637. # Scroll so that current row becomes top row
  638. self.top_row = row
  639. end
  640. # If current row is more to back than back row
  641. if row > self.top_row + (self.page_row_max - 1)
  642. # Scroll so that current row becomes back row
  643. self.top_row = row - (self.page_row_max - 1)
  644. end
  645. # Calculate cursor width
  646. cursor_width = self.width / @column_max - 32
  647. # Calculate cursor coordinates
  648. x = @index % @column_max * (cursor_width + 32)
  649. y = @index / @column_max * 32 - self.oy
  650. # Update cursor rectangle
  651. if $game_party.actors.size < 2
  652. self.cursor_rect.set(250 + @index * 140, y, 100, 20)
  653.   else
  654. self.cursor_rect.set(160 + @index * 140, y, 150, 20)
  655. end
  656. end
  657. #--------------------------------------------------------------------------
  658. # * Frame Update
  659. #--------------------------------------------------------------------------
  660. def update
  661. super
  662. # If cursor is movable
  663. if self.active and @item_max > 0 and @index >= 0
  664. # If pressing down on the directional buttons
  665. if Input.repeat?(Input::DOWN)
  666. # If column count is 1 and directional button was pressed down with no
  667. # repeat, or if cursor position is more to the front than
  668. # (item count - column count)
  669. if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  670. @index < @item_max - @column_max
  671. # Move cursor down
  672. $game_system.se_play($data_system.cursor_se)
  673. @index = (@index + @column_max) % @item_max
  674. end
  675. end
  676. # If the up directional button was pressed
  677. if Input.repeat?(Input::UP)
  678. # If column count is 1 and directional button was pressed up with no
  679. # repeat, or if cursor position is more to the back than column count
  680. if (@column_max == 1 and Input.trigger?(Input::UP)) or
  681. @index >= @column_max
  682. # Move cursor up
  683. $game_system.se_play($data_system.cursor_se)
  684. @index = (@index - @column_max + @item_max) % @item_max
  685. end
  686. end
  687. # If the right directional button was pressed
  688. if Input.repeat?(Input::RIGHT)
  689. # If column count is 2 or more, and cursor position is closer to front
  690. # than (item count -1)
  691. if @column_max >= 2 and @index < @item_max - 1
  692. # Move cursor right
  693. $game_system.se_play($data_system.cursor_se)
  694. @index += 1
  695. end
  696. end
  697. # If the left directional button was pressed
  698. if Input.repeat?(Input::LEFT)
  699. # If column count is 2 or more, and cursor position is more back than 0
  700. if @column_max >= 2 and @index > 0
  701. # Move cursor left
  702. $game_system.se_play($data_system.cursor_se)
  703. @index -= 1
  704. end
  705. end
  706. # If R button was pressed
  707. if Input.repeat?(Input::R)
  708. # If bottom row being displayed is more to front than bottom data row
  709. if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  710. # Move cursor 1 page back
  711. $game_system.se_play($data_system.cursor_se)
  712. @index = [@index + self.page_item_max, @item_max - 1].min
  713. self.top_row += self.page_row_max
  714. end
  715. end
  716. # If L button was pressed
  717. if Input.repeat?(Input::L)
  718. # If top row being displayed is more to back than 0
  719. if self.top_row > 0
  720. # Move cursor 1 page forward
  721. $game_system.se_play($data_system.cursor_se)
  722. @index = [@index - self.page_item_max, 0].max
  723. self.top_row -= self.page_row_max
  724. end
  725. end
  726. end
  727. # Update help text (update_help is defined by the subclasses)
  728. if self.active and @help_window != nil
  729. update_help
  730. end
  731. # Update cursor rectangle
  732. update_cursor_rect
  733. end
  734. end

  735. class Window_StatusCharacter1 < Window_Base

  736. def initialize
  737. super(0, 0, 440,180)
  738. self.contents = Bitmap.new(width - 32, height - 32)
  739. self.contents.font.name = "Tahoma"
  740. self.contents.font.size = 22
  741. refresh
  742. end

  743. def refresh
  744. self.contents.clear
  745. self.contents.font.color = system_color
  746. self.contents.font.size = 20
  747. self.contents.draw_text(215, -63, 144, 144, "Current State:")
  748. self.contents.draw_text(190, 114, 120, 32, "Experience:")
  749. self.contents.draw_text(0, -7, 120, 32, "Name:")
  750. actor = @actor
  751. @actor = $game_party.actors[0]
  752. draw_actor_name(@actor, x + 55, y - 7)
  753. draw_actor_state(@actor, 325, -8, 144)
  754. draw_actor_parameter2(@actor, 0, 15 + 10, 0)
  755. draw_actor_parameter2(@actor, 0, 15 + 40, 1)
  756. draw_actor_parameter2(@actor, 0, 15 + 70, 2)
  757. draw_actor_parameter2(@actor, 0, 15 + 100, 3)
  758. draw_actor_parameter2(@actor, 190, 15 + 10, 4)
  759. draw_actor_parameter2(@actor, 190, 15 + 40, 5)
  760. draw_actor_parameter2(@actor, 190, 15 + 70, 6)
  761. draw_actor_barz(@actor, 0, 15 + 37, "horizontal", 168, 1, @actor.atk, 999, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
  762. draw_actor_barz(@actor, 0, 15 + 67, "horizontal", 168, 1, @actor.pdef, 999, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
  763. draw_actor_barz(@actor, 0, 15 + 97, "horizontal", 168, 1, @actor.mdef, 999, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
  764. draw_actor_barz(@actor, 0, 15 + 127, "horizontal", 168, 1, @actor.str, 999, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
  765. draw_actor_barz(@actor, 190, 15 + 37, "horizontal", 168, 1, @actor.dex, 999, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
  766. draw_actor_barz(@actor, 190, 15 + 67, "horizontal", 168, 1, @actor.agi, 999, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
  767. draw_actor_barz(@actor, 190, 15 + 97, "horizontal", 168, 1, @actor.int, 999, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
  768. draw_actor_barz(@actor, 190, 15 + 127, "horizontal", 168, 1, @actor.now_exp.to_f, @actor.next_exp, Color.new(-255, 200, -86, 255), Color.new(-168, -157, 184, 255))
  769. end

  770. end

  771. class Window_StatusCharacter2 < Window_Base

  772. def initialize
  773. super(0, 0, 440,200)
  774. self.contents = Bitmap.new(width - 32, height - 32)
  775. self.contents.font.name = "Tahoma"
  776. self.contents.font.size = 22
  777. refresh
  778. end

  779. def refresh
  780. self.contents.clear
  781. if $game_party.actors.size < 2
  782. self.contents.draw_text(25, 55, 50, 28, "Empty")
  783. else
  784. self.contents.font.color = system_color
  785. self.contents.font.size = 20
  786. self.contents.draw_text(215, -63, 144, 144, "Current State:")
  787. self.contents.draw_text(190, 114, 120, 32, "Experience:")
  788. self.contents.draw_text(0, -7, 120, 32, "Name:")
  789. actor = @actor
  790. @actor = $game_party.actors[1]
  791. draw_actor_name(@actor, x + 55, y - 7)
  792. draw_actor_state(@actor, 325, -8, 144)
  793. draw_actor_parameter2(@actor, 0, 15 + 10, 0)
  794. draw_actor_parameter2(@actor, 0, 15 + 40, 1)
  795. draw_actor_parameter2(@actor, 0, 15 + 70, 2)
  796. draw_actor_parameter2(@actor, 0, 15 + 100, 3)
  797. draw_actor_parameter2(@actor, 190, 15 + 10, 4)
  798. draw_actor_parameter2(@actor, 190, 15 + 40, 5)
  799. draw_actor_parameter2(@actor, 190, 15 + 70, 6)
  800. draw_actor_barz(@actor, 0, 15 + 37, "horizontal", 168, 1, @actor.atk, 999, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
  801. draw_actor_barz(@actor, 0, 15 + 67, "horizontal", 168, 1, @actor.pdef, 999, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
  802. draw_actor_barz(@actor, 0, 15 + 97, "horizontal", 168, 1, @actor.mdef, 999, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
  803. draw_actor_barz(@actor, 0, 15 + 127, "horizontal", 168, 1, @actor.str, 999, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
  804. draw_actor_barz(@actor, 190, 15 + 37, "horizontal", 168, 1, @actor.dex, 999, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
  805. draw_actor_barz(@actor, 190, 15 + 67, "horizontal", 168, 1, @actor.agi, 999, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
  806. draw_actor_barz(@actor, 190, 15 + 97, "horizontal", 168, 1, @actor.int, 999, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
  807. draw_actor_barz(@actor, 190, 15 + 127, "horizontal", 168, 1, @actor.now_exp.to_f, @actor.next_exp, Color.new(-255, 200, -86, 255), Color.new(-168, -157, 184, 255))
  808. end
  809. end

  810. end

  811. class Scene_Load2 < Scene_File

  812. def initialize
  813. $game_temp = Game_Temp.new
  814. $game_temp.last_file_index = 0
  815. latest_time = Time.at(0)
  816. for i in 0..3
  817. filename = make_filename(i)
  818. if FileTest.exist?(filename)
  819. file = File.open(filename, "r")
  820. if file.mtime > latest_time
  821. latest_time = file.mtime
  822. $game_temp.last_file_index = i
  823. end
  824. file.close
  825. end
  826. end
  827. super("Which file would you like to load?")
  828. end

  829. def on_decision(filename)
  830. unless FileTest.exist?(filename)
  831. $game_system.se_play($data_system.buzzer_se)
  832. return
  833. end
  834. $game_system.se_play($data_system.load_se)
  835. file = File.open(filename, "rb")
  836. read_save_data(file)
  837. file.close
  838. $game_system.bgm_play($game_system.playing_bgm)
  839. $game_system.bgs_play($game_system.playing_bgs)
  840. $game_map.update
  841. $scene = Scene_Map.new
  842. end

  843. def on_cancel
  844. $game_system.se_play($data_system.cancel_se)
  845. $scene = Scene_Menu.new(3)
  846. end

  847. def read_save_data(file)
  848. characters = Marshal.load(file)
  849. Graphics.frame_count = Marshal.load(file)
  850. $game_system = Marshal.load(file)
  851. $game_switches = Marshal.load(file)
  852. $game_variables = Marshal.load(file)
  853. $game_self_switches = Marshal.load(file)
  854. $game_screen = Marshal.load(file)
  855. $game_actors = Marshal.load(file)
  856. $game_party = Marshal.load(file)
  857. $game_troop = Marshal.load(file)
  858. $game_map = Marshal.load(file)
  859. $game_player = Marshal.load(file)

  860. if $game_system.magic_number != $data_system.magic_number
  861. $game_map.setup($game_map.map_id)
  862. $game_player.center($game_player.x, $game_player.y)
  863. end
  864. $game_party.refresh
  865. end
  866. end

  867. class Window_EquipLeft2 < Window_Base

  868. def initialize(actor)
  869. super(0, 64, 272, 192)
  870. self.contents = Bitmap.new(width - 32, height - 32)
  871. @actor = actor
  872. refresh
  873. end

  874. def refresh
  875. self.contents.clear
  876. draw_actor_name(@actor, 4, 0)
  877. draw_actor_level3(@actor, 4, 32)
  878. draw_actor_parameter(@actor, 4, 64, 0)
  879. draw_actor_parameter(@actor, 4, 96, 1)
  880. draw_actor_parameter(@actor, 4, 128, 2)
  881. if @new_atk != nil
  882. self.contents.font.color = system_color
  883. self.contents.draw_text(160, 64, 40, 32, "->", 1)
  884. self.contents.font.color = normal_color
  885. self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
  886. end
  887. if @new_pdef != nil
  888. self.contents.font.color = system_color
  889. self.contents.draw_text(160, 96, 40, 32, "->", 1)
  890. self.contents.font.color = normal_color
  891. self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
  892. end
  893. if @new_mdef != nil
  894. self.contents.font.color = system_color
  895. self.contents.draw_text(160, 128, 40, 32, "->", 1)
  896. self.contents.font.color = normal_color
  897. self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
  898. end
  899. end

  900. def set_new_parameters(new_atk, new_pdef, new_mdef)
  901. if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
  902. @new_atk = new_atk
  903. @new_pdef = new_pdef
  904. @new_mdef = new_mdef
  905. refresh
  906. end
  907. end
  908. end
复制代码

Lv1.梦旅人

梦石
0
星屑
50
在线时间
2 小时
注册时间
2006-9-3
帖子
61
3
 楼主| 发表于 2006-10-1 12:10:41 | 只看该作者
第二部分:

  1. class Window_EquipRight2 < Window_Selectable

  2. def initialize(actor)
  3. super(272, 64, 368, 192)
  4. self.contents = Bitmap.new(width - 32, height - 32)
  5. @actor = actor
  6. refresh
  7. self.index = 0
  8. end

  9. def item
  10. return @data[self.index]
  11. end

  12. def refresh
  13. self.contents.clear
  14. @data = []
  15. @data.push($data_weapons[@actor.weapon_id])
  16. @data.push($data_armors[@actor.armor1_id])
  17. @data.push($data_armors[@actor.armor2_id])
  18. @data.push($data_armors[@actor.armor3_id])
  19. @data.push($data_armors[@actor.armor4_id])
  20. @item_max = @data.size
  21. self.contents.font.color = system_color
  22. self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
  23. self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
  24. self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
  25. self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
  26. self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
  27. draw_item_name(@data[0], 92, 32 * 0)
  28. draw_item_name(@data[1], 92, 32 * 1)
  29. draw_item_name(@data[2], 92, 32 * 2)
  30. draw_item_name(@data[3], 92, 32 * 3)
  31. draw_item_name(@data[4], 92, 32 * 4)
  32. end

  33. def update_help
  34. @help_window.set_text(self.item == nil ? "" : self.item.description)
  35. end
  36. end

  37. class Window_Character_Selection1 < Window_Selectable3

  38. attr_accessor :commands

  39. def initialize(commands)
  40. super(0, 50, 640, 50)
  41. self.contents = Bitmap.new(width - 32, height - 32)
  42. @commands = commands
  43. @width = width
  44. if $game_party.actors.size < 2
  45. @item_max = 1
  46. @column_max = 1
  47. else
  48. @item_max = 2
  49. @column_max =2
  50. end
  51. @commands = 2
  52. self.visible = false
  53. self.active = false
  54. self.index = -1
  55. self.z = 2000
  56. refresh
  57. end


  58. def refresh
  59. self.contents.clear
  60. self.contents.font.color = system_color
  61. if $game_party.actors.size < 2
  62. self.contents.draw_text(180, -6, 144, 32, $game_party.actors[0].name, 2)
  63. else
  64. self.contents.draw_text(120, -6, 144, 32, $game_party.actors[0].name, 2)
  65. self.contents.draw_text(240, -6, 144, 32, $game_party.actors[1].name, 2)
  66. end
  67. end
  68. end

  69. class Scene_Equip2

  70. def initialize(actor_index = 0, equip_index = 0)
  71. @actor_index = actor_index
  72. @equip_index = equip_index
  73. end

  74. def main
  75. @actor = $game_party.actors[@actor_index]
  76. @help_window = Window_Help.new
  77. @left_window = Window_EquipLeft2.new(@actor)
  78. @right_window = Window_EquipRight2.new(@actor)
  79. @item_window1 = Window_EquipItem.new(@actor, 0)
  80. @item_window2 = Window_EquipItem.new(@actor, 1)
  81. @item_window3 = Window_EquipItem.new(@actor, 2)
  82. @item_window4 = Window_EquipItem.new(@actor, 3)
  83. @item_window5 = Window_EquipItem.new(@actor, 4)
  84. @right_window.help_window = @help_window
  85. @item_window1.help_window = @help_window
  86. @item_window2.help_window = @help_window
  87. @item_window3.help_window = @help_window
  88. @item_window4.help_window = @help_window
  89. @item_window5.help_window = @help_window
  90. @right_window.index = @equip_index
  91. refresh
  92. Graphics.transition
  93. loop do
  94. Graphics.update
  95. Input.update
  96. update
  97. if $scene != self
  98. break
  99. end
  100. end
  101. Graphics.freeze
  102. @help_window.dispose
  103. @left_window.dispose
  104. @right_window.dispose
  105. @item_window1.dispose
  106. @item_window2.dispose
  107. @item_window3.dispose
  108. @item_window4.dispose
  109. @item_window5.dispose
  110. end

  111. def refresh
  112. @item_window1.visible = (@right_window.index == 0)
  113. @item_window2.visible = (@right_window.index == 1)
  114. @item_window3.visible = (@right_window.index == 2)
  115. @item_window4.visible = (@right_window.index == 3)
  116. @item_window5.visible = (@right_window.index == 4)
  117. item1 = @right_window.item
  118. case @right_window.index
  119. when 0
  120. @item_window = @item_window1
  121. when 1
  122. @item_window = @item_window2
  123. when 2
  124. @item_window = @item_window3
  125. when 3
  126. @item_window = @item_window4
  127. when 4
  128. @item_window = @item_window5
  129. end

  130. if @right_window.active
  131. @left_window.set_new_parameters(nil, nil, nil)
  132. end
  133. if @item_window.active
  134. item2 = @item_window.item
  135. last_hp = @actor.hp
  136. last_sp = @actor.sp
  137. @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
  138. new_atk = @actor.atk
  139. new_pdef = @actor.pdef
  140. new_mdef = @actor.mdef
  141. @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
  142. @actor.hp = last_hp
  143. @actor.sp = last_sp
  144. @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
  145. end
  146. end

  147. def update
  148. @left_window.update
  149. @right_window.update
  150. @item_window.update
  151. refresh
  152. if @right_window.active
  153. update_right
  154. return
  155. end

  156. if @item_window.active
  157. update_item
  158. return
  159. end
  160. end

  161. def update_right
  162. if Input.trigger?(Input::B)
  163. $game_system.se_play($data_system.cancel_se)
  164. $scene = Scene_Menu.new(2)
  165. return
  166. end

  167. if Input.trigger?(Input::C)
  168. if @actor.equip_fix?(@right_window.index)
  169. $game_system.se_play($data_system.buzzer_se)
  170. return
  171. end

  172. $game_system.se_play($data_system.decision_se)
  173. @right_window.active = false
  174. @item_window.active = true
  175. @item_window.index = 0
  176. return
  177. end

  178. if Input.trigger?(Input::R)
  179. $game_system.se_play($data_system.cursor_se)
  180. @actor_index += 1
  181. @actor_index %= $game_party.actors.size
  182. $scene = Scene_Equip2.new(@actor_index, @right_window.index)
  183. return
  184. end

  185. if Input.trigger?(Input::L)
  186. $game_system.se_play($data_system.cursor_se)
  187. @actor_index += $game_party.actors.size - 1
  188. @actor_index %= $game_party.actors.size
  189. $scene = Scene_Equip2.new(@actor_index, @right_window.index)
  190. return
  191. end
  192. end

  193. def update_item
  194. if Input.trigger?(Input::B)
  195. $game_system.se_play($data_system.cancel_se)
  196. @right_window.active = true
  197. @item_window.active = false
  198. @item_window.index = -1
  199. return
  200. end

  201. if Input.trigger?(Input::C)
  202. $game_system.se_play($data_system.equip_se)
  203. item = @item_window.item
  204. @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  205. @right_window.active = true
  206. @item_window.active = false
  207. @item_window.index = -1
  208. @right_window.refresh
  209. @item_window.refresh
  210. return
  211. end
  212. end
  213. end

  214. class Window_Graphic1 < Window_Base

  215. def initialize
  216. super(0, 0, 280, 200)
  217. self.contents = Bitmap.new(width - 32, height - 32)
  218. refresh
  219. end

  220. def refresh
  221. self.contents.clear
  222. actor = $game_party.actors[0]
  223. draw_actor_battler(actor, x + 130, y + 200)
  224. end
  225. end

  226. class Window_Graphic2 < Window_Base

  227. def initialize
  228. super(0, 0, 280, 220)
  229. self.contents = Bitmap.new(width - 32, height - 32)
  230. refresh
  231. end

  232. def refresh
  233. self.contents.clear
  234. if $game_party.actors.size < 2
  235. self.contents.clear
  236. else
  237. actor = $game_party.actors[1]
  238. draw_actor_battler(actor, x + 130, y + 200)
  239. end
  240. end
  241. end

  242. class Window_SkillStatus < Window_Base

  243. def initialize(actor)
  244. super(0, 64, 640, 64)
  245. self.contents = Bitmap.new(width - 32, height - 32)
  246. @actor = actor
  247. refresh
  248. end

  249. def refresh
  250. self.contents.clear
  251. draw_actor_name(@actor, 0, 0)
  252. draw_actor_state(@actor, 150, 0)
  253. draw_actor_hp2(@actor, 270, 0)
  254. draw_actor_sp2(@actor, 440, 0)
  255. end
  256. end

  257. class Scene_Skill2

  258. def initialize(actor_index = 0, equip_index = 0)
  259. @actor_index = actor_index
  260. end

  261. def main
  262. @actor = $game_party.actors[@actor_index]
  263. @help_window = Window_Help.new
  264. @status_window = Window_SkillStatus.new(@actor)
  265. @skill_window = Window_Skill.new(@actor)
  266. @skill_window.help_window = @help_window
  267. @target_window = Window_Target.new
  268. @target_window.visible = false
  269. @target_window.active = false
  270. Graphics.transition
  271. loop do
  272. Graphics.update
  273. Input.update
  274. update
  275. if $scene != self
  276. break
  277. end
  278. end
  279. Graphics.freeze
  280. @help_window.dispose
  281. @status_window.dispose
  282. @skill_window.dispose
  283. @target_window.dispose
  284. end

  285. def update
  286. @help_window.update
  287. @status_window.update
  288. @skill_window.update
  289. @target_window.update
  290. if @skill_window.active
  291. update_skill
  292. return
  293. end

  294. if @target_window.active
  295. update_target
  296. return
  297. end
  298. end

  299. def update_skill
  300. if Input.trigger?(Input::B)
  301. $game_system.se_play($data_system.cancel_se)
  302. $scene = Scene_Menu.new(1)
  303. return
  304. end

  305. if Input.trigger?(Input::C)
  306. @skill = @skill_window.skill
  307. if @skill == nil or not @actor.skill_can_use?(@skill.id)
  308. $game_system.se_play($data_system.buzzer_se)
  309. return
  310. end
  311. $game_system.se_play($data_system.decision_se)

  312. if @skill.scope >= 3
  313. @skill_window.active = false
  314. @target_window.x = (@skill_window.index + 1) % 2 * 304
  315. @target_window.visible = true
  316. @target_window.active = true
  317. if @skill.scope == 4 || @skill.scope == 6
  318. @target_window.index = -1
  319. elsif @skill.scope == 7
  320. @target_window.index = @actor_index - 10
  321. else
  322. @target_window.index = 0
  323. end
  324. else
  325. if @skill.common_event_id > 0
  326. $game_temp.common_event_id = @skill.common_event_id
  327. $game_system.se_play(@skill.menu_se)
  328. @actor.sp -= @skill.sp_cost
  329. @status_window.refresh
  330. @skill_window.refresh
  331. @target_window.refresh
  332. $scene = Scene_Map.new
  333. return
  334. end
  335. end
  336. return
  337. end
  338. if Input.trigger?(Input::R)
  339. $game_system.se_play($data_system.cursor_se)
  340. @actor_index += 1
  341. @actor_index %= $game_party.actors.size
  342. $scene = Scene_Skill.new(@actor_index)
  343. return
  344. end

  345. if Input.trigger?(Input::L)
  346. $game_system.se_play($data_system.cursor_se)
  347. @actor_index += $game_party.actors.size - 1
  348. @actor_index %= $game_party.actors.size
  349. $scene = Scene_Skill.new(@actor_index)
  350. return
  351. end
  352. end

  353. def update_target
  354. if Input.trigger?(Input::B)
  355. $game_system.se_play($data_system.cancel_se)
  356. @skill_window.active = true
  357. @target_window.visible = false
  358. @target_window.active = false
  359. return
  360. end

  361. if Input.trigger?(Input::C)
  362. unless @actor.skill_can_use?(@skill.id)
  363. $game_system.se_play($data_system.buzzer_se)
  364. return
  365. end

  366. if @target_window.index == -1
  367. used = false
  368. for i in $game_party.actors
  369. used |= i.skill_effect(@actor, @skill)
  370. end
  371. end

  372. if @target_window.index <= -2
  373. target = $game_party.actors[@target_window.index + 10]
  374. used = target.skill_effect(@actor, @skill)
  375. end

  376. if @target_window.index >= 0
  377. target = $game_party.actors[@target_window.index]
  378. used = target.skill_effect(@actor, @skill)
  379. end

  380. if used
  381. $game_system.se_play(@skill.menu_se)
  382. @actor.sp -= @skill.sp_cost
  383. @status_window.refresh
  384. @skill_window.refresh
  385. @target_window.refresh
  386. if $game_party.all_dead?
  387. $scene = Scene_Gameover.new
  388. return
  389. end
  390. if @skill.common_event_id > 0
  391. $game_temp.common_event_id = @skill.common_event_id
  392. $scene = Scene_Map.new
  393. return
  394. end
  395. end
  396. unless used
  397. $game_system.se_play($data_system.buzzer_se)
  398. end
  399. return
  400. end
  401. end
  402. end


  403. class Scene_Menu

  404. def initialize(menu_index = 0)
  405. @menu_index = menu_index
  406. end

  407. def main
  408. @update_frame = 0

  409. @window_location = Window_Location.new
  410. @window_location.x =420

  411. @window_character_selection1 = Window_Character_Selection1.new(@commands)
  412. @window_character_selection1.y = 50

  413. @window_character_selection2 = Window_Character_Selection2 .new


  414. @window_character1_graphic = Window_GraphicCharacter1.new
  415. @window_character1_graphic.y =100
  416. @window_character1_graphic.frame_update
  417. @window_character1_graphic.opacity = 0
  418. @window_character1_graphic.back_opacity = 0

  419. @window_character2_graphic = Window_GraphicCharacter2.new
  420. @window_character2_graphic.y =280
  421. @window_character2_graphic.frame_update
  422. @window_character2_graphic.opacity = 0
  423. @window_character2_graphic.back_opacity = 0

  424. @window_character1 = Window_Character1.new
  425. @window_character1.y =100

  426. @window_character2 = Window_Character2.new
  427. @window_character2.y =280

  428. @window_status_character1 = Window_StatusCharacter1.new
  429. @window_status_character1.x =200
  430. @window_status_character1.y =100

  431. @window_status_character2 = Window_StatusCharacter2.new
  432. @window_status_character2.x =200
  433. @window_status_character2.y =280

  434. @playtime_window = Window_PlayTime.new
  435. @playtime_window.x = 270

  436. @graphic1 = Window_Graphic1.new
  437. @graphic1.x = 240
  438. @graphic1.y = 92
  439. @graphic1.z = 501
  440. @graphic1.opacity = 0
  441. @graphic1.back_opacity = 0
  442. @graphic1.contents_opacity = 100

  443. @graphic2 = Window_Graphic2.new
  444. @graphic2.x = 240
  445. @graphic2.y = 272
  446. @graphic2.z = 501
  447. @graphic2.opacity = 0
  448. @graphic2.back_opacity = 0
  449. @graphic2.contents_opacity = 100

  450. @command_window = Window_Command2.new(["Item", "Skill", "Equip", "Load", "Save", "Quit"])
  451. @command_window.index = @menu_index

  452. @dummy_window = Dummy_Window_Command.new
  453. @dummy_window.z = 500
  454. @dummy_window.opacity = 0
  455. @dummy_window.back_opacity = 0

  456. @dummy_window_icons = Dummy_Window_Command2.new
  457. @dummy_window_icons.opacity = 0
  458. @dummy_window_icons.back_opacity = 0
  459. @dummy_window_icons.contents_opacity = 100

  460. Graphics.transition
  461. loop do
  462. Graphics.update
  463. Input.update
  464. @update_frame += 1
  465. if @update_frame == 5
  466. @update_frame = 0
  467. @window_character2_graphic.frame_update
  468. @window_character1_graphic.frame_update
  469. end

  470. update
  471. if $scene != self
  472. break
  473. end
  474. end

  475. Graphics.freeze
  476. @window_location.dispose
  477. @window_character1.dispose
  478. @window_status_character1.dispose
  479. @window_character2.dispose
  480. @window_status_character2.dispose
  481. @playtime_window.dispose
  482. @command_window.dispose
  483. @graphic1.dispose
  484. @graphic2.dispose
  485. @dummy_window.dispose
  486. @dummy_window_icons.dispose
  487. @window_character1_graphic.dispose
  488. @window_character2_graphic.dispose
  489. @window_character_selection1.dispose
  490. @window_character_selection2.dispose
  491. end

  492. def update
  493. @playtime_window.update
  494. @command_window.update
  495. @window_character_selection1.update

  496. if @command_window.active
  497. update_command
  498. return
  499. end

  500. if @window_character_selection1.active
  501. update_character
  502. return
  503. end
  504. end

  505. def update_command
  506. if Input.trigger?(Input::B)
  507. $game_system.se_play($data_system.cancel_se)
  508. $scene = Scene_Map.new
  509. return
  510. end

  511. if Input.trigger?(Input::C)
  512. if $game_party.actors.size == 0 and @command_window.index < 4
  513. $game_system.se_play($data_system.buzzer_se)
  514. return
  515. end
  516. case @command_window.index
  517. when 0
  518. $game_system.se_play($data_system.decision_se)
  519. $scene = Scene_Item.new
  520. when 1
  521. $game_system.se_play($data_system.decision_se)
  522. @window_character_selection1.visible = true
  523. @window_character_selection2.visible = true
  524. @window_character_selection1.active = true
  525. @window_character_selection1.index = 0
  526. @command_window.active = false
  527. when 2
  528. $game_system.se_play($data_system.decision_se)
  529. @window_character_selection1.visible = true
  530. @window_character_selection1.active = true
  531. @window_character_selection2.visible = true
  532. @window_character_selection1.index = 0
  533. @command_window.active = false
  534. when 3
  535. $game_system.se_play($data_system.decision_se)
  536. $scene = Scene_Load2.new
  537. when 4
  538. if $game_system.save_disabled
  539. $game_system.se_play($data_system.buzzer_se)
  540. return
  541. end
  542. $game_system.se_play($data_system.decision_se)
  543. $scene = Scene_Save.new
  544. when 5
  545. $game_system.se_play($data_system.decision_se)
  546. $scene = Scene_End.new
  547. end
  548. return
  549. end
  550. end

  551. def update_character
  552. if Input.trigger?(Input::B)
  553. $game_system.se_play($data_system.cancel_se)
  554. @command_window.active = true
  555. @window_character_selection1.visible = false
  556. @window_character_selection1.active = false
  557. @window_character_selection2.visible = false
  558. @window_character_selection1.index = -1
  559. return
  560. end

  561. if Input.trigger?(Input::C)
  562. if $game_party.actors.size == 0 and @command_window.index < 4
  563. $game_system.se_play($data_system.buzzer_se)
  564. return
  565. end
  566. case @command_window.index
  567. when 1
  568. $game_system.se_play($data_system.decision_se)
  569. case @window_character_selection1.index
  570. when 0
  571. $scene = Scene_Skill2.new(@window_character_selection1.index)
  572. when 1
  573. $scene = Scene_Skill2.new(@window_character_selection1.index)
  574. end
  575. when 2
  576. $game_system.se_play($data_system.decision_se)
  577. case @window_character_selection1.index
  578. when 0
  579. $scene = Scene_Equip2.new(@window_character_selection1.index)
  580. when 1
  581. $scene = Scene_Equip2.new(@window_character_selection1.index)
  582. end
  583. end
  584. return
  585. end
  586. end
  587. end
复制代码
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
25470
在线时间
1535 小时
注册时间
2006-1-10
帖子
2063

开拓者第一届地图绘制大赛RTP组第四名

4
发表于 2006-10-9 02:48:53 | 只看该作者
确实很长!效果还不错!
不过好象只能显示两个人的信息!奇怪
随便截张效果图片
MV帮助 http://miaowm5.github.io/RMMV-F1/日复一日,年复一年人还是保留一点自我兴趣的好啊~~~忘记过去 ,这样我就可以  放弃未来了……哭~~终于找回以前的头像了,哎~~原来我是那么的想念阿……
画地图没灵感?很烦?很无聊 【 戳 我 】一 大 波 地 图 在 等 你  \^0^/
我的游戏
回复 支持 反对

使用道具 举报

Lv1.梦旅人

66RPG站长

梦石
0
星屑
54
在线时间
615 小时
注册时间
2005-10-10
帖子
5734

RMVX自由创作大赛亚军第2届短篇游戏比赛亚军第5届短篇游戏比赛冠军

5
发表于 2006-12-13 08:51:41 | 只看该作者
嗯,这个排版设计还不错呢,呵呵~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2006-3-23
帖子
25
6
发表于 2006-12-25 23:00:07 | 只看该作者
这个脚本排版出来的是很好看,不过有几个问题:
一是:居然是英文的,我晕~不过这个很容易,汉化它!哈哈哈。
二是:只有两个角色可以查看,目前我还在看怎么修改,郁闷,我才学脚本几天,哎,艰巨的工程啊!
三是:这个的实际可用性并没有想象中的好,不过真的很漂亮。我觉得还应该提高适用性。
以上三点是个人愚见,见笑了~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-25 15:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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