Advertisement
Guest User

CiM 1.1

a guest
Jul 21st, 2011
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.04 KB | None | 0 0
  1. #==============================================================================
  2. # ** Catergorized Items Menu
  3. # EDITED BY GRIVER03 AKA BUDDYSIEVERS 01.06.2011
  4. # ITS A "Guillaume777's Multi-Slot" ADDON
  5. # CHECK LINE 648-659
  6. #------------------------------------------------------------------------------
  7. # * Created by: albertfish
  8. # * Version: 1.1
  9. # * Last edited: September 13, 2009
  10. #------------------------------------------------------------------------------
  11. # Version History:
  12. # Version 1.1: September 13, 2009
  13. # - The variable for recent items is no longer global
  14. # - Some code removed
  15. # - Changed it so when you are in items window and you hit escape
  16. # it goes back to the category window.
  17. # - You can also select a category with enter now.
  18. # Version 1.0: September 13, 2009
  19. # - Initial release
  20. #------------------------------------------------------------------------------
  21. # Description:
  22. # This is a complete redesign of the default items menu that sorts items
  23. # into categories for better organization.
  24. #------------------------------------------------------------------------------
  25. # Features:
  26. # - Includes 10 different categories to sort items
  27. # - Easy to set up items to be sorted
  28. # - Easy to customize appearance
  29. # - Easy to customize which categories are active
  30. # - Extremely customizeable which allows you to set it up the way
  31. # you want it set up.
  32. #------------------------------------------------------------------------------
  33. # Item Setup Instructions:
  34. # This script sorts items automatically based on certain aspects of the
  35. # item. To set up items to be sorted into correct categories follow this
  36. # guide.
  37. #
  38. # Consumable Items - Must have Consumable flag set to yes
  39. # - Must have Occasion flag set to anything other than
  40. # never.
  41. # Weapons - All items in Weapons tab in the database
  42. # Equipment - All items in the Weapons and Armors tab
  43. # Body Equipment - Must be under Armors tab
  44. # - Kind must be Body Armor
  45. # Head Equipment - Must be under Armors tab
  46. # - Kind must be Helmet
  47. # Arm Equipment - Must be under Armors tab
  48. # - Kind must be Shield
  49. # Accessory - Must be under Armors tab
  50. # - Kind must be Accessory
  51. # Raw Materials - Must be consumable
  52. # - Must have occasion of never
  53. # Story Items - Must be non consumable
  54. # All Items - All of the above
  55. #------------------------------------------------------------------------------
  56. # Install Instructions:
  57. # Place this script above the main script and below the default scripts.
  58. #==============================================================================
  59.  
  60. #==============================================================================
  61. # ** CIM_Config
  62. #------------------------------------------------------------------------------
  63. # This module contains the configuration data of the menu.
  64. #------------------------------------------------------------------------------
  65. # Begin Editable Area.
  66. #==============================================================================
  67.  
  68. module CIM_Config
  69. # If this value is true the category icons will be displayed in a
  70. # separate window. If you set it to false, the icons will be displayed
  71. # in the category title bar.
  72. # Default value: true
  73. CATEGORIES_WINDOW = true
  74.  
  75. # This value determines if there is a recent items category.
  76. # Default value: true
  77. RECENT_ITEMS = false
  78.  
  79. # This value determines if there is a consumable items category.
  80. # Default value: true
  81. CONSUME_ITEMS = true
  82.  
  83. # This value determines if there is equipment categories.
  84. # Default value: true
  85. EQUIPMENT = true
  86.  
  87. # This value determines if the equipment is displayed as a single
  88. # category.
  89. # Default value: false
  90. SINGLE_EQUIPMENT_CATEGORY = false
  91.  
  92. # This value determines if there is a raw materials category.
  93. # Default value: true
  94. RAW_MATERIALS = true
  95.  
  96. # This value determines if there is a quest items category.
  97. # Default value: true
  98. QUEST_ITEMS = true
  99.  
  100. # This value determines if there is a all items category.
  101. # Default value: true
  102. ALL_ITEMS = true
  103.  
  104. # This values determines where the all items category will be.
  105. # 1 is the very first position, 2 the second, and so on.
  106. # Warning! If this number is larger than the number of categories
  107. # then it will cause an error.
  108. # For example, if there are 5 categories and the number is set to 7
  109. # an error will occur.
  110. # Default Value: 2
  111. ALL_ITEMS_POSITION = 9
  112.  
  113. # This value determines if the unhighlighted category icons are translucent
  114. # or opaque.
  115. # Default value: true
  116. UNSELECTED_TRANSLUCENT = true
  117.  
  118. # This value determines if there is a selection cursor for the category
  119. # window.
  120. # Default Value: true
  121. CATEGORY_CURSOR = true
  122.  
  123. # This is where you set the category title alignment.
  124. # 0 = Left
  125. # 1 = Center
  126. # 2 = Right
  127. # Default value: 1
  128. TITLE_ALIGNMENT = 1
  129.  
  130. # This is where you set how the icon in the help window is displayed.
  131. # 0 = Not displayd
  132. # 1 = Normal Size
  133. # 2 = Double Size
  134. # Default value: 2
  135. ICON_DISPLAY = 2
  136.  
  137. # Set the menu item icons. These must be size 24px by 24px.
  138. # The icons must be placed in the icons folder in the games directory
  139. # and the file name of the icons must be placed between the quotation
  140. # marks.
  141. I_RECENT = "032-Item01"
  142. I_CONSUME = "CIM_ITEMS"
  143. I_WEAPONS = "CIM_WAFFEN"
  144. I_BODY = "CIM_RÜSTUNG"
  145. I_HEAD = "CIM_HELM"
  146. I_ARM = "CIM_SCHILD"
  147. I_ACCESSORY = "CIM_ACCESSOIRE"
  148. I_RAW = "CIM_SCHÄTZE"
  149. I_QUEST = "CIM_SCHLÜSSELOBJEKT"
  150. I_ALL = "CIM_ALLE_ITEMS"
  151. # This next one is used when you group the different equipment into
  152. # one category.
  153. I_EQUIPMENT = "009-Shield01"
  154.  
  155. # Set the menu item text. This is the text that will display at the bottom
  156. # informing the player what each category is.
  157. T_RECENT = "Recent Items"
  158. T_CONSUME = "Items"
  159. T_WEAPONS = "Equipment: Waffen"
  160. T_BODY = "Equipment: Körper"
  161. T_HEAD = "Equipment: Kopf"
  162. T_ARM = "Equipment: Schilde"
  163. T_ACCESSORY = "Equipment: Sonstiges"
  164. T_RAW = "Schätze"
  165. T_QUEST = "Schlüsselobjekte"
  166. T_ALL = "Alle Items"
  167. # This next one is used when you group the different equipment into
  168. # one category.
  169. T_EQUIPMENT = "Equipment"
  170.  
  171. #============================================================================
  172. # End Editable Area.
  173. #----------------------------------------------------------------------------
  174. # Warning! Do not edit beyond this point unless you know what you are doing!
  175. #============================================================================
  176. ITEMS_MENU_ICONS = []
  177. ITEMS_MENU_TEXT = []
  178. ITEM_ID = []
  179.  
  180. # Add recent items category
  181. if RECENT_ITEMS
  182. ITEMS_MENU_TEXT.push(T_RECENT)
  183. ITEMS_MENU_ICONS.push(I_RECENT)
  184. ITEM_ID.push("Recent")
  185. end
  186. # Add consumable items category
  187. if CONSUME_ITEMS
  188. ITEMS_MENU_TEXT.push(T_CONSUME)
  189. ITEMS_MENU_ICONS.push(I_CONSUME)
  190. ITEM_ID.push("Consume")
  191. end
  192. # Add equipment category(s)
  193. if SINGLE_EQUIPMENT_CATEGORY && EQUIPMENT
  194. ITEMS_MENU_TEXT.push(T_EQUIPMENT)
  195. ITEMS_MENU_ICONS.push(I_EQUIPMENT)
  196. ITEM_ID.push("Equip")
  197. elsif EQUIPMENT
  198. ITEMS_MENU_TEXT.push(T_WEAPONS)
  199. ITEMS_MENU_ICONS.push(I_WEAPONS)
  200. ITEM_ID.push("Weapon")
  201.  
  202.  
  203. ITEMS_MENU_TEXT.push(T_HEAD)
  204. ITEMS_MENU_ICONS.push(I_HEAD)
  205. ITEM_ID.push("Head")
  206. ITEMS_MENU_TEXT.push(T_BODY)
  207. ITEMS_MENU_ICONS.push(I_BODY)
  208. ITEM_ID.push("Body")
  209.  
  210. ITEMS_MENU_TEXT.push(T_ARM)
  211. ITEMS_MENU_ICONS.push(I_ARM)
  212. ITEM_ID.push("Arm")
  213. ITEMS_MENU_TEXT.push(T_ACCESSORY)
  214. ITEMS_MENU_ICONS.push(I_ACCESSORY)
  215. ITEM_ID.push("Accessory")
  216. end
  217. # Add raw materials category
  218. if RAW_MATERIALS
  219. ITEMS_MENU_TEXT.push(T_RAW)
  220. ITEMS_MENU_ICONS.push(I_RAW)
  221. ITEM_ID.push("Raw")
  222. end
  223. # Add quest items category
  224. if QUEST_ITEMS
  225. ITEMS_MENU_TEXT.push(T_QUEST)
  226. ITEMS_MENU_ICONS.push(I_QUEST)
  227. ITEM_ID.push("Quest")
  228. end
  229. # Add all items category
  230. if QUEST_ITEMS
  231. ITEMS_MENU_TEXT.insert(ALL_ITEMS_POSITION - 1, T_ALL)
  232. ITEMS_MENU_ICONS.insert(ALL_ITEMS_POSITION - 1, I_ALL)
  233. ITEM_ID.insert(ALL_ITEMS_POSITION - 1, "All")
  234. end
  235. end
  236.  
  237. #==============================================================================
  238. # ** Window_Blank
  239. #------------------------------------------------------------------------------
  240. # This window deals with blank window backgrounds.
  241. #==============================================================================
  242.  
  243. class Window_Blank < Window_Base
  244. #--------------------------------------------------------------------------
  245. # * Object Initialization
  246. # x : window x coordinate
  247. # y : window y coordinate
  248. # width : window width
  249. # height : window height
  250. #--------------------------------------------------------------------------
  251. def initialize(x, y, width, height)
  252. super(x, y, width, height)
  253. end
  254. end
  255.  
  256. #==============================================================================
  257. # ** Window_Category
  258. #------------------------------------------------------------------------------
  259. # This window deals with item category command choices.
  260. #==============================================================================
  261.  
  262. class Window_Category < Window_Selectable
  263. #--------------------------------------------------------------------------
  264. # * include the CMS_Config module
  265. #--------------------------------------------------------------------------
  266. include CIM_Config
  267.  
  268. #--------------------------------------------------------------------------
  269. # * Object Initialization
  270. # width : window width
  271. # commands : command text string array
  272. #--------------------------------------------------------------------------
  273. def initialize(width, commands)
  274. # Compute window height from command quantity
  275. cw = 32 + ITEMS_MENU_TEXT.size * 32
  276. super(640 - cw, 0, cw, 64)
  277. @column_max = ITEMS_MENU_TEXT.size
  278. @item_max = ITEMS_MENU_TEXT.size
  279. @commands = commands
  280. @select = 0
  281. self.contents = Bitmap.new(cw - 32, height - 32)
  282. refresh
  283. self.index = 0
  284. self.opacity = 0 unless CATEGORIES_WINDOW
  285. end
  286. #--------------------------------------------------------------------------
  287. # * Refresh
  288. #--------------------------------------------------------------------------
  289. def refresh
  290. self.contents.clear
  291. for i in 0...@item_max
  292. draw_item(i)
  293. end
  294. end
  295. #--------------------------------------------------------------------------
  296. # * Draw Item
  297. # index : item number
  298. # color : text color
  299. #--------------------------------------------------------------------------
  300. def draw_item(index)
  301. rect = Rect.new(0, 0, 24, 24)
  302. bitmap = RPG::Cache.icon(ITEMS_MENU_ICONS[index])
  303. self.contents.blt(4 + 32 * index, 4, bitmap, rect) unless UNSELECTED_TRANSLUCENT && index != @select
  304. self.contents.blt(4 + 32 * index, 4, bitmap, rect, 160) if UNSELECTED_TRANSLUCENT && index != @select
  305. end
  306. #--------------------------------------------------------------------------
  307. # * Disable Item
  308. # index : item number
  309. #--------------------------------------------------------------------------
  310. def disable_item(index)
  311. draw_item(index)
  312. end
  313. #--------------------------------------------------------------------------
  314. # * Update Cursor Rectangle
  315. #--------------------------------------------------------------------------
  316. def update_cursor_rect
  317. @select = @index
  318. # If cursor position is less than 0
  319. if @index < 0 || !CATEGORY_CURSOR
  320. self.cursor_rect.empty
  321. return
  322. end
  323. # Update cursor rectangle
  324. self.cursor_rect.set(@index*32, 0, 32, 32)
  325. end
  326. #--------------------------------------------------------------------------
  327. # * Help Text Update
  328. #--------------------------------------------------------------------------
  329. def update_help
  330. @help_window.set_text(ITEMS_MENU_TEXT[self.index])
  331. end
  332. end
  333.  
  334. #==============================================================================
  335. # ** Window_ItemTop
  336. #------------------------------------------------------------------------------
  337. # This window shows top bar with the title "Items" on it.
  338. #==============================================================================
  339.  
  340. class Window_ItemTop < Window_Base
  341. #--------------------------------------------------------------------------
  342. # * include the CMS_Config module
  343. #--------------------------------------------------------------------------
  344. include CIM_Config
  345.  
  346. #--------------------------------------------------------------------------
  347. # * Object Initialization
  348. #--------------------------------------------------------------------------
  349. def initialize
  350. cw = 32 + ITEMS_MENU_TEXT.size * 32
  351. super(0, 0, 640 - cw, 64)
  352. self.contents = Bitmap.new(width - 32, height - 32)
  353. @text = ITEMS_MENU_TEXT[0]
  354. @width = 640 - cw
  355. update
  356. self.opacity = 0 unless CATEGORIES_WINDOW
  357. end
  358. #--------------------------------------------------------------------------
  359. # * Frame Update
  360. #--------------------------------------------------------------------------
  361. def update
  362. self.contents.clear
  363. self.contents.draw_text(0, 0, @width - 32, 32, @text, TITLE_ALIGNMENT)
  364. end
  365. def set_text(text)
  366. @text = text
  367. end
  368. end
  369.  
  370. #==============================================================================
  371. # ** Window_ItemHelp
  372. #------------------------------------------------------------------------------
  373. # This window shows skill and item explanations along with actor status.
  374. #==============================================================================
  375.  
  376. class Window_ItemHelp < Window_Base
  377. #--------------------------------------------------------------------------
  378. # * include the CMS_Config module
  379. #--------------------------------------------------------------------------
  380. include CIM_Config
  381.  
  382. #--------------------------------------------------------------------------
  383. # * Object Initialization
  384. #--------------------------------------------------------------------------
  385. def initialize
  386. super(0, 0, 640, 128)
  387. self.contents = Bitmap.new(width - 32, height - 32)
  388. self.opacity = 0
  389. end
  390. #--------------------------------------------------------------------------
  391. # * Set Text
  392. # text : text string displayed in window
  393. # align : alignment (0..flush left, 1..center, 2..flush right)
  394. #--------------------------------------------------------------------------
  395. def set_text(text, item, align = 0)
  396. # If at least one part of text and alignment differ from last time
  397. if text != @text or align != @align
  398. # Redraw text
  399. self.contents.clear
  400. # Redraw icon
  401. if item
  402. bitmap = RPG::Cache.icon(item.icon_name)
  403. width = bitmap.width
  404. height = bitmap.height
  405. src_rect = Rect.new(0, 0, width, height)
  406. dest_rect = Rect.new(0, 24, width * 2, height * 2)
  407. self.contents.stretch_blt(dest_rect, bitmap, src_rect) if ICON_DISPLAY == 2
  408. self.contents.blt(0, 36, bitmap, src_rect)if ICON_DISPLAY == 1
  409. else
  410. width = 0
  411. end
  412. self.contents.font.color = normal_color
  413. self.contents.draw_text(4 + width * ICON_DISPLAY, 32, self.width - 40, 32, text, align)
  414. @text = text
  415. @align = align
  416. @actor = nil
  417. end
  418. self.visible = true
  419. end
  420. #--------------------------------------------------------------------------
  421. # * Set Display
  422. # text : text string displayed in window
  423. # align : alignment (0..flush left, 1..center, 2..flush right)
  424. #--------------------------------------------------------------------------
  425. def set_display(text, icon, align = 0)
  426. # If at least one part of text and alignment differ from last time
  427. if text != @text or align != @align
  428. # Redraw text
  429. self.contents.clear
  430. # Redraw icon
  431. if icon
  432. bitmap = RPG::Cache.icon(icon)
  433. width = bitmap.width
  434. height = bitmap.height
  435. src_rect = Rect.new(0, 0, width, height)
  436. dest_rect = Rect.new(0, 24, width * 2, height * 2)
  437. self.contents.stretch_blt(dest_rect, bitmap, src_rect)
  438. else
  439. width = 0
  440. end
  441. self.contents.font.color = normal_color
  442. self.contents.draw_text(4 + width * 2, 32, self.width - 40, 32, text, align)
  443. @text = text
  444. @align = align
  445. @actor = nil
  446. end
  447. self.visible = true
  448. end
  449. #--------------------------------------------------------------------------
  450. # * Set Actor
  451. # actor : status displaying actor
  452. #--------------------------------------------------------------------------
  453. def set_actor(actor)
  454. if actor != @actor
  455. self.contents.clear
  456. draw_actor_name(actor, 4, 0)
  457. draw_actor_state(actor, 140, 0)
  458. draw_actor_hp(actor, 284, 0)
  459. draw_actor_sp(actor, 460, 0)
  460. @actor = actor
  461. @text = nil
  462. self.visible = true
  463. end
  464. end
  465. #--------------------------------------------------------------------------
  466. # * Set Enemy
  467. # enemy : name and status displaying enemy
  468. #--------------------------------------------------------------------------
  469. def set_enemy(enemy)
  470. text = enemy.name
  471. state_text = make_battler_state_text(enemy, 112, false)
  472. if state_text != ""
  473. text += " " + state_text
  474. end
  475. set_text(text, 1, 1)
  476. end
  477. end
  478.  
  479. #==============================================================================
  480. # ** Window_Item
  481. #------------------------------------------------------------------------------
  482. # This window displays items in possession on the item and battle screens.
  483. #==============================================================================
  484.  
  485. class Window_ItemMenu < Window_Selectable
  486. #--------------------------------------------------------------------------
  487. # * include the CMS_Config module
  488. #--------------------------------------------------------------------------
  489. include CIM_Config
  490.  
  491. #--------------------------------------------------------------------------
  492. # * Object Initialization
  493. #--------------------------------------------------------------------------
  494. def initialize
  495. super(0, 64, 640, 352)
  496. @column_max = 2
  497. @category = ITEM_ID[0]
  498. refresh
  499. self.index = -1
  500. @category_select = true
  501. # If in battle, move window to center of screen
  502. # and make it semi-transparent
  503. if $game_temp.in_battle
  504. self.y = 64
  505. self.height = 256
  506. self.back_opacity = 160
  507. end
  508. end
  509. #--------------------------------------------------------------------------
  510. # * Get Item
  511. #--------------------------------------------------------------------------
  512. def item
  513. case @category
  514. when "Recent"
  515. if @items_max > 20
  516. return @recent[self.index + (@items_max - 20)]
  517. else
  518. return @recent[self.index]
  519. end
  520. when "Consume"
  521. return @consumable[self.index]
  522. when "Weapon"
  523. return @weapon[self.index]
  524. when "Body"
  525. return @body[self.index]
  526. when "Head"
  527. return @head[self.index]
  528. when "Arm"
  529. return @arm[self.index]
  530. when "Accessory"
  531. return @accessory[self.index]
  532. when "Raw"
  533. return @raw[self.index]
  534. when "Quest"
  535. return @quest[self.index]
  536. when "Equip"
  537. return @equipment[self.index]
  538. when "All"
  539. return @all[self.index]
  540. end
  541. end
  542. #--------------------------------------------------------------------------
  543. # * Set Category
  544. #--------------------------------------------------------------------------
  545. def category(index)
  546. @category = ITEM_ID[index]
  547. end
  548. #--------------------------------------------------------------------------
  549. # * Refresh
  550. #--------------------------------------------------------------------------
  551. def refresh
  552. if self.contents != nil
  553. self.contents.dispose
  554. self.contents = nil
  555. end
  556.  
  557. @recent = []
  558. @consumable = []
  559. @weapon = []
  560. @body = []
  561. @head = []
  562. @arm = []
  563. @accessory = []
  564. @raw = []
  565. @quest = []
  566. @equipment = []
  567. @all = []
  568. # Add item
  569. for i in 1...$data_items.size
  570. if $game_party.item_number(i) > 0
  571. # Add recent items
  572. if $game_party.recent_items.size < 20
  573. for u in 0...$game_party.recent_items.size
  574. if $data_items[i].id == $game_party.recent_items[u].id && $game_party.recent_items[u].is_a?(RPG::Item)
  575. @recent[($game_party.recent_items.size - 1) - u] = ($data_items[i])
  576. end
  577. end
  578. else
  579. for u in $game_party.recent_items.size-20...$game_party.recent_items.size
  580. if $data_items[i].id == $game_party.recent_items[u].id && $game_party.recent_items[u].is_a?(RPG::Item)
  581. @recent[21 - (u - ($game_party.recent_items.size-20))] = ($data_items[i])
  582. end
  583. end
  584. end
  585.  
  586. # Add consumable, raw and quest items
  587. if $data_items[i].consumable
  588. if $data_items[i].occasion == 3
  589. @raw.push($data_items[i])
  590. else
  591. @consumable.push($data_items[i])
  592. end
  593. else
  594. @quest.push($data_items[i])
  595. end
  596. @all.push($data_items[i])
  597. end
  598. end
  599.  
  600. # Also add weapons and armors if outside of battle
  601. unless $game_temp.in_battle
  602. for i in 1...$data_weapons.size
  603. if $game_party.weapon_number(i) > 0
  604. # Add recent items
  605. if $game_party.recent_items.size < 20
  606. for u in 0...$game_party.recent_items.size
  607. if $data_weapons[i].id == $game_party.recent_items[u].id && $game_party.recent_items[u].is_a?(RPG::Weapon)
  608. @recent[($game_party.recent_items.size - 1) - u] = ($data_weapons[i])
  609. end
  610. end
  611. else
  612. for u in $game_party.recent_items.size-20...$game_party.recent_items.size
  613. if $data_weapons[i].id == $game_party.recent_items[u].id && $game_party.recent_items[u].is_a?(RPG::Weapon)
  614. @recent[21 - (u - ($game_party.recent_items.size-20))] = ($data_weapons[i])
  615. end
  616. end
  617. end
  618.  
  619. # Add weapons
  620. @weapon.push($data_weapons[i])
  621. @equipment.push($data_weapons[i])
  622. @all.push($data_weapons[i])
  623. end
  624. end
  625. for i in 1...$data_armors.size
  626. if $game_party.armor_number(i) > 0
  627. # Add recent armors
  628. if $game_party.recent_items.size < 20
  629. for u in 0...$game_party.recent_items.size
  630. if $data_armors[i].id == $game_party.recent_items[u].id && $game_party.recent_items[u].is_a?(RPG::Armor)
  631. @recent[($game_party.recent_items.size - 1) - u] = ($data_armors[i])
  632. end
  633. end
  634. else
  635. for u in $game_party.recent_items.size-20...$game_party.recent_items.size
  636. if $data_armors[i].id == $game_party.recent_items[u].id && $game_party.recent_items[u].is_a?(RPG::Armor)
  637. @recent[21 - (u - ($game_party.recent_items.size-20))] = ($data_armors[i])
  638. end
  639. end
  640. end
  641.  
  642. # Add armors
  643. if $data_armors[i].kind == 2 # Body Armor
  644. @body.push($data_armors[i])
  645. elsif $data_armors[i].kind == 1 # Head Armor
  646. @head.push($data_armors[i])
  647. elsif $data_armors[i].kind == 0 # Arm Armor
  648. @arm.push($data_armors[i])
  649. elsif $data_armors[i].kind == 3 # Accessories
  650. @accessory.push($data_armors[i])
  651. ################################################################################
  652. elsif $data_armors[i].kind == 4 # Extraslot 1 (5)
  653. @accessory.push($data_armors[i])
  654. elsif $data_armors[i].kind == 5 # Extraslot 2 (6)
  655. @accessory.push($data_armors[i])
  656. elsif $data_armors[i].kind == 6 # Extraslot 3 (7)
  657. @accessory.push($data_armors[i])
  658. elsif $data_armors[i].kind == 7 # Extraslot 4 (8)
  659. @accessory.push($data_armors[i])
  660. elsif $data_armors[i].kind == 8 # Extraslot 5 (9)
  661. @accessory.push($data_armors[i])
  662. ################################################################################
  663. end
  664. @equipment.push($data_armors[i])
  665. @all.push($data_armors[i])
  666. end
  667. end
  668. end
  669.  
  670. # Repaint
  671. if @category == "Recent"
  672. @item_max = @recent.size
  673. elsif @category == "Consume"
  674. @item_max = @consumable.size
  675. elsif @category == "Weapon"
  676. @item_max = @weapon.size
  677. elsif @category == "Body"
  678. @item_max = @body.size
  679. elsif @category == "Head"
  680. @item_max = @head.size
  681. elsif @category == "Arm"
  682. @item_max = @arm.size
  683. elsif @category == "Accessory"
  684. @item_max = @accessory.size
  685. elsif @category == "Raw"
  686. @item_max = @raw.size
  687. elsif @category == "Quest"
  688. @item_max = @quest.size
  689. elsif @category == "Equip"
  690. @item_max = @equipment.size
  691. elsif @category == "All"
  692. @item_max = @all.size
  693. end
  694. @items_max = @item_max
  695. if @item_max == 0
  696. self.contents.dispose if self.contents != nil
  697. self.contents = Bitmap.new(width - 32, height - 32)
  698. end
  699. if @item_max > 20 && @category == "Recent"
  700. self.contents = Bitmap.new(width - 32, height - 32)
  701. for i in @recent.size-20...@recent.size
  702. draw_item(i)
  703. end
  704. @items_max = @item_max
  705. @item_max = 20
  706. elsif @item_max > 0
  707. self.contents = Bitmap.new(width - 32, row_max * 32)
  708. for i in 0...@item_max
  709. draw_item(i)
  710. end
  711. end
  712. end
  713. #--------------------------------------------------------------------------
  714. # * Draw Item
  715. # index : item number
  716. #--------------------------------------------------------------------------
  717. def draw_item(index)
  718. case @category
  719. when "Recent"
  720. item = @recent[index]
  721. when "Consume"
  722. item = @consumable[index]
  723. when "Weapon"
  724. item = @weapon[index]
  725. when "Body"
  726. item = @body[index]
  727. when "Head"
  728. item = @head[index]
  729. when "Arm"
  730. item = @arm[index]
  731. when "Accessory"
  732. item = @accessory[index]
  733. when "Raw"
  734. item = @raw[index]
  735. when "Quest"
  736. item = @quest[index]
  737. when "Equip"
  738. item = @equipment[index]
  739. when "All"
  740. item = @all[index]
  741. end
  742. case item
  743. when RPG::Item
  744. number = $game_party.item_number(item.id)
  745. when RPG::Weapon
  746. number = $game_party.weapon_number(item.id)
  747. when RPG::Armor
  748. number = $game_party.armor_number(item.id)
  749. end
  750. if item.is_a?(RPG::Item) and
  751. $game_party.item_can_use?(item.id)
  752. self.contents.font.color = normal_color
  753. else
  754. self.contents.font.color = disabled_color
  755. end
  756. x = 4 + index % 2 * (288 + 32)
  757. if @item_max > 20 && @category == "Recent"
  758. y = (index - (@item_max - 20)) / 2 * 32
  759. else
  760. y = index / 2 * 32
  761. end
  762. if item != nil
  763. rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  764. self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  765. bitmap = RPG::Cache.icon(item.icon_name)
  766. opacity = self.contents.font.color == normal_color ? 255 : 128
  767. self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  768. self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  769. self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  770. self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  771. end
  772. end
  773. #--------------------------------------------------------------------------
  774. # * Help Text Update
  775. #--------------------------------------------------------------------------
  776. def update_help
  777. if @index >= 0
  778. @help_window.set_text(self.item == nil ? "" : self.item.description, self.item)
  779. end
  780. end
  781. #--------------------------------------------------------------------------
  782. # * Frame Update
  783. #--------------------------------------------------------------------------
  784. def update
  785. if self.active and @item_max >= 0 and @index >= 0
  786. if Input.trigger?(Input::UP) && @index <= 1
  787. @index = -1
  788. end
  789. end
  790. super
  791. end
  792. def cat_select(tf)
  793. @category_select = tf
  794. end
  795. #--------------------------------------------------------------------------
  796. # * Update Cursor Rectangle
  797. #--------------------------------------------------------------------------
  798. def update_cursor_rect
  799. # If cursor position is less than 0
  800. if @index < 0 || @category_select
  801. self.cursor_rect.empty
  802. return
  803. end
  804. # Get current row
  805. row = @index / @column_max
  806. # If current row is before top row
  807. if row < self.top_row
  808. # Scroll so that current row becomes top row
  809. self.top_row = row
  810. end
  811. # If current row is more to back than back row
  812. if row > self.top_row + (self.page_row_max - 1)
  813. # Scroll so that current row becomes back row
  814. self.top_row = row - (self.page_row_max - 1)
  815. end
  816. # Calculate cursor width
  817. cursor_width = self.width / @column_max - 32
  818. # Calculate cursor coordinates
  819. x = @index % @column_max * (cursor_width + 32)
  820. y = @index / @column_max * 32 - self.oy
  821. # Update cursor rectangle
  822. self.cursor_rect.set(x, y, cursor_width, 32)
  823. end
  824. #--------------------------------------------------------------------------
  825. # * Draw Items after use
  826. #--------------------------------------------------------------------------
  827. def draw_items(index)
  828. if @category == "Recent" && @recent.size > 20
  829. draw_item(index + (@item_max - 20))
  830. else
  831. draw_item(index)
  832. end
  833. end
  834. end
  835.  
  836. #==============================================================================
  837. # ** Scene_Item
  838. #------------------------------------------------------------------------------
  839. # This class performs item screen processing.
  840. #==============================================================================
  841.  
  842. class Scene_Item
  843. #--------------------------------------------------------------------------
  844. # * Main Processing
  845. #--------------------------------------------------------------------------
  846. def main
  847. # Make help window, item window
  848. @top_window = Window_Blank.new(0, 0, 640, 64) unless CIM_Config::CATEGORIES_WINDOW
  849. @help_window = Window_ItemHelp.new
  850. @itemtop_window = Window_ItemTop.new
  851. @help_windowback = Window_Blank.new(0, 416, 640, 64)
  852. @help_window.y = 384
  853. @item_window = Window_ItemMenu.new
  854. @item_window.active = false
  855. # Associate help window
  856. @item_window.help_window = @help_window
  857. # Make target window (set to active)
  858. @category_window = Window_Category.new(320, [])
  859. @category_window.active = true
  860. @category_window.help_window = @itemtop_window
  861. # Make target window (set to invisible / inactive)
  862. @target_window = Window_Target.new
  863. @target_window.visible = false
  864. @target_window.active = false
  865. @item_window.refresh
  866. # Execute transition
  867. Graphics.transition
  868. # Main loop
  869. loop do
  870. # Update game screen
  871. Graphics.update
  872. # Update input information
  873. Input.update
  874. # Frame update
  875. update
  876. # Abort loop if screen is changed
  877. if $scene != self
  878. break
  879. end
  880. end
  881. # Prepare for transition
  882. Graphics.freeze
  883. # Dispose of windows
  884. @help_window.dispose
  885. @item_window.dispose
  886. @target_window.dispose
  887. @help_windowback.dispose
  888. @category_window.dispose
  889. @itemtop_window.dispose
  890. @top_window.dispose unless CIM_Config::CATEGORIES_WINDOW
  891. end
  892. #--------------------------------------------------------------------------
  893. # * Frame Update
  894. #--------------------------------------------------------------------------
  895. def update
  896. # Update windows
  897. @help_window.update
  898. @item_window.update
  899. @target_window.update
  900. @help_windowback.update
  901. @category_window.update
  902. @category_window.refresh
  903. @itemtop_window.update
  904. @top_window.update unless CIM_Config::CATEGORIES_WINDOW
  905. # If item window is active: call update_item
  906. if @item_window.active
  907. update_item
  908. return
  909. end
  910. # If target window is active: call update_target
  911. if @target_window.active
  912. update_target
  913. return
  914. end
  915. # If target window is active: call update_target
  916. if @category_window.active
  917. @help_window.set_display ("", "")
  918. update_category
  919. return
  920. end
  921. end
  922. #--------------------------------------------------------------------------
  923. # * Frame Update (when item window is active)
  924. #--------------------------------------------------------------------------
  925. def update_item
  926. # If B button was pressed
  927. if Input.trigger?(Input::B)
  928. # Set category window active
  929. @item_window.active = false
  930. @item_window.cat_select(true)
  931. @category_window.active = true
  932. # Play decision SE
  933. $game_system.se_play($data_system.decision_se)
  934. return
  935. end
  936. # If C button was pressed
  937. if Input.trigger?(Input::C)
  938. # Get currently selected data on the item window
  939. @item = @item_window.item
  940. # If not a use item
  941. unless @item.is_a?(RPG::Item)
  942. # Play buzzer SE
  943. $game_system.se_play($data_system.buzzer_se)
  944. return
  945. end
  946. # If it can't be used
  947. unless $game_party.item_can_use?(@item.id)
  948. # Play buzzer SE
  949. $game_system.se_play($data_system.buzzer_se)
  950. return
  951. end
  952. # Play decision SE
  953. $game_system.se_play($data_system.decision_se)
  954. # If effect scope is an ally
  955. if @item.scope >= 3
  956. # Activate target window
  957. @item_window.active = false
  958. @target_window.x = (@item_window.index + 1) % 2 * 304
  959. @target_window.visible = true
  960. @target_window.active = true
  961. # Set cursor position to effect scope (single / all)
  962. if @item.scope == 4 || @item.scope == 6
  963. @target_window.index = -1
  964. else
  965. @target_window.index = 0
  966. end
  967. # If effect scope is other than an ally
  968. else
  969. # If command event ID is valid
  970. if @item.common_event_id > 0
  971. # Command event call reservation
  972. $game_temp.common_event_id = @item.common_event_id
  973. # Play item use SE
  974. $game_system.se_play(@item.menu_se)
  975. # If consumable
  976. if @item.consumable
  977. # Decrease used items by 1
  978. $game_party.lose_item(@item.id, 1)
  979. # Draw item window item
  980. @item_window.draw_item(@item_window.index)
  981. end
  982. # Switch to map screen
  983. $scene = Scene_Map.new
  984. return
  985. end
  986. end
  987. return
  988. end
  989. # If UP button was pressed
  990. if Input.trigger?(Input::UP) && @item_window.index == -1
  991. # Set category window active
  992. @item_window.active = false
  993. @item_window.cat_select(true)
  994. @category_window.active = true
  995. # Play cursor SE
  996. $game_system.se_play($data_system.cursor_se)
  997. return
  998. end
  999. end
  1000. #--------------------------------------------------------------------------
  1001. # * Frame Update (when target window is active)
  1002. #--------------------------------------------------------------------------
  1003. def update_target
  1004. # If B button was pressed
  1005. if Input.trigger?(Input::B)
  1006. # Play cancel SE
  1007. $game_system.se_play($data_system.cancel_se)
  1008. # If unable to use because items ran out
  1009. unless $game_party.item_can_use?(@item.id)
  1010. # Remake item window contents
  1011. @item_window.refresh
  1012. end
  1013. # Erase target window
  1014. @item_window.active = true
  1015. @target_window.visible = false
  1016. @target_window.active = false
  1017. @item_window.refresh
  1018. return
  1019. end
  1020. # If C button was pressed
  1021. if Input.trigger?(Input::C)
  1022. # If items are used up
  1023. if $game_party.item_number(@item.id) == 0
  1024. # Play buzzer SE
  1025. $game_system.se_play($data_system.buzzer_se)
  1026. return
  1027. end
  1028. # If target is all
  1029. if @target_window.index == -1
  1030. # Apply item effects to entire party
  1031. used = false
  1032. for i in $game_party.actors
  1033. used |= i.item_effect(@item)
  1034. end
  1035. end
  1036. # If single target
  1037. if @target_window.index >= 0
  1038. # Apply item use effects to target actor
  1039. target = $game_party.actors[@target_window.index]
  1040. used = target.item_effect(@item)
  1041. end
  1042. # If an item was used
  1043. if used
  1044. # Play item use SE
  1045. $game_system.se_play(@item.menu_se)
  1046. # If consumable
  1047. if @item.consumable
  1048. # Decrease used items by 1
  1049. $game_party.lose_item(@item.id, 1)
  1050. # Redraw item window item
  1051. @item_window.draw_items(@item_window.index)
  1052. end
  1053. # Remake target window contents
  1054. @target_window.refresh
  1055. # If all party members are dead
  1056. if $game_party.all_dead?
  1057. # Switch to game over screen
  1058. $scene = Scene_Gameover.new
  1059. return
  1060. end
  1061. # If common event ID is valid
  1062. if @item.common_event_id > 0
  1063. # Common event call reservation
  1064. $game_temp.common_event_id = @item.common_event_id
  1065. # Switch to map screen
  1066. $scene = Scene_Map.new
  1067. return
  1068. end
  1069. end
  1070. # If item wasn't used
  1071. unless used
  1072. # Play buzzer SE
  1073. $game_system.se_play($data_system.buzzer_se)
  1074. end
  1075. return
  1076. end
  1077. end
  1078. #--------------------------------------------------------------------------
  1079. # * Frame Update (when category window is active)
  1080. #--------------------------------------------------------------------------
  1081. def update_category
  1082. @item_window.category(@category_window.index)
  1083. @item_window.cat_select(true)
  1084. if Input.repeat? (Input::RIGHT) || Input.repeat? (Input::LEFT)
  1085. @item_window.refresh
  1086. end
  1087. # If B button was pressed
  1088. if Input.trigger?(Input::B)
  1089. # Play cancel SE
  1090. $game_system.se_play($data_system.cancel_se)
  1091. # Switch to menu screen
  1092. $scene = Scene_Menu.new(0)
  1093. return
  1094. end
  1095. # If C button was pressed
  1096. if Input.trigger?(Input::C)
  1097. # Get currently selected data on the item window
  1098. @item = @category_window.index
  1099. # Set item window active
  1100. @item_window.active = true
  1101. @item_window.index = 0
  1102. @category_window.active = false
  1103. @item_window.cat_select(false)
  1104. # Play decision SE
  1105. $game_system.se_play($data_system.decision_se)
  1106. return
  1107. end
  1108. # If DOWN button was pressed
  1109. if Input.trigger?(Input::DOWN)
  1110. # Set item window active
  1111. @item_window.active = true
  1112. @item_window.index = 0
  1113. @category_window.active = false
  1114. @item_window.cat_select(false)
  1115. # Play cursor SE
  1116. $game_system.se_play($data_system.cursor_se)
  1117. return
  1118. end
  1119. end
  1120. end
  1121.  
  1122. #==============================================================================
  1123. # ** Game_Party
  1124. #------------------------------------------------------------------------------
  1125. # This class handles the party. It includes information on amount of gold
  1126. # and items. Refer to "$game_party" for the instance of this class.
  1127. #==============================================================================
  1128.  
  1129. class Game_Party
  1130. attr_reader :recent_items
  1131. #--------------------------------------------------------------------------
  1132. # * Object Initialization
  1133. #--------------------------------------------------------------------------
  1134. alias af_cim_init_gp initialize
  1135. def initialize
  1136. af_cim_init_gp
  1137. @recent_items = []
  1138. end
  1139. #--------------------------------------------------------------------------
  1140. # * Gain Items (or lose)
  1141. # item_id : item ID
  1142. # n : quantity
  1143. #--------------------------------------------------------------------------
  1144. def gain_item(item_id, n)
  1145. # Update quantity data in the hash.
  1146. if item_id > 0
  1147. @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min
  1148. gain_recent_item(item_id) if n >= 0
  1149. end
  1150. end
  1151. #--------------------------------------------------------------------------
  1152. # * Gain Weapons (or lose)
  1153. # weapon_id : weapon ID
  1154. # n : quantity
  1155. #--------------------------------------------------------------------------
  1156. def gain_weapon(weapon_id, n)
  1157. # Update quantity data in the hash.
  1158. if weapon_id > 0
  1159. @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min
  1160. gain_recent_weapon(weapon_id) if n >= 0
  1161. end
  1162. end
  1163. #--------------------------------------------------------------------------
  1164. # * Gain Armor (or lose)
  1165. # armor_id : armor ID
  1166. # n : quantity
  1167. #--------------------------------------------------------------------------
  1168. def gain_armor(armor_id, n)
  1169. # Update quantity data in the hash.
  1170. if armor_id > 0
  1171. @armors[armor_id] = [[armor_number(armor_id) + n, 0].max, 99].min
  1172. gain_recent_armor(armor_id) if n >= 0
  1173. end
  1174. end
  1175. #--------------------------------------------------------------------------
  1176. # * Lose Items
  1177. # item_id : item ID
  1178. # n : quantity
  1179. #--------------------------------------------------------------------------
  1180. def lose_item(item_id, n)
  1181. # Reverse the numerical value and call it gain_item
  1182. gain_item(item_id, -n)
  1183. for i in 0...@recent_items.size
  1184. if $game_party.item_number(@recent_items[i].id) == 0 && @recent_items[i].is_a?(RPG::Item) && @recent_items[i].id == item_id
  1185. @recent_items.delete_at(i)
  1186. end
  1187. end
  1188. end
  1189. #--------------------------------------------------------------------------
  1190. # * Lose Weapons
  1191. # weapon_id : weapon ID
  1192. # n : quantity
  1193. #--------------------------------------------------------------------------
  1194. def lose_weapon(weapon_id, n)
  1195. # Reverse the numerical value and call it gain_weapon
  1196. gain_weapon(weapon_id, -n)
  1197. for i in 0...@recent_items.size
  1198. if $game_party.item_number(@recent_items[i].id) == 0 && @recent_items[i].is_a?(RPG::Weapon) && @recent_items[i].id == weapon_id
  1199. @recent_items.delete_at(i)
  1200. end
  1201. end
  1202. end
  1203. #--------------------------------------------------------------------------
  1204. # * Lose Armor
  1205. # armor_id : armor ID
  1206. # n : quantity
  1207. #--------------------------------------------------------------------------
  1208. def lose_armor(armor_id, n)
  1209. # Reverse the numerical value and call it gain_armor
  1210. gain_armor(armor_id, -n)
  1211. if $game_party.item_number(armor_id) <= 0
  1212. for i in 0...@recent_items.size
  1213. if $game_party.item_number(@recent_items[i].id) == 0 && @recent_items[i].is_a?(RPG::Armor) && @recent_items[i].id == armor_id
  1214. @recent_items.delete_at(i)
  1215. end
  1216. end
  1217. end
  1218. end
  1219. #--------------------------------------------------------------------------
  1220. # * Gain Recent Items
  1221. # item_id : item ID
  1222. #--------------------------------------------------------------------------
  1223. def gain_recent_item(item_id)
  1224. for i in 0...@recent_items.size
  1225. if @recent_items[i].id == $data_items[item_id].id && @recent_items[i].is_a?(RPG::Item)
  1226. @recent_items.delete_at(i)
  1227. end
  1228. end
  1229. @recent_items.push($data_items[item_id])
  1230. if @recent_items.size > 40
  1231. @recent_items.delete_at(0)
  1232. end
  1233. end
  1234. #--------------------------------------------------------------------------
  1235. # * Gain Recent Weapons
  1236. # weapon_id : weapon ID
  1237. #--------------------------------------------------------------------------
  1238. def gain_recent_weapon(weapon_id)
  1239. for i in 0...@recent_items.size
  1240. if @recent_items[i].id == $data_weapons[weapon_id].id && @recent_items[i].is_a?(RPG::Weapon)
  1241. @recent_items.delete_at(i)
  1242. end
  1243. end
  1244. @recent_items.push($data_weapons[weapon_id])
  1245. if @recent_items.size > 40
  1246. @recent_items.delete_at(0)
  1247. end
  1248. end
  1249. #--------------------------------------------------------------------------
  1250. # * Gain Recent Armor
  1251. # armor_id : armor ID
  1252. #--------------------------------------------------------------------------
  1253. def gain_recent_armor(armor_id)
  1254. for i in 0...@recent_items.size
  1255. if @recent_items[i].id == $data_armors[armor_id].id && @recent_items[i].is_a?(RPG::Armor)
  1256. @recent_items.delete_at(i)
  1257. end
  1258. end
  1259. @recent_items.push($data_armors[armor_id])
  1260. if @recent_items.size > 40
  1261. @recent_items.delete_at(0)
  1262. end
  1263. end
  1264. #--------------------------------------------------------------------------
  1265. # * Gain Items (or lose)
  1266. # item_id : item ID
  1267. # n : quantity
  1268. #--------------------------------------------------------------------------
  1269. def equip_item(item_id, n)
  1270. # Update quantity data in the hash.
  1271. if item_id > 0
  1272. @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min
  1273. end
  1274. end
  1275. #--------------------------------------------------------------------------
  1276. # * Gain Weapons (or lose)
  1277. # weapon_id : weapon ID
  1278. # n : quantity
  1279. #--------------------------------------------------------------------------
  1280. def equip_weapon(weapon_id, n)
  1281. # Update quantity data in the hash.
  1282. if weapon_id > 0
  1283. @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min
  1284. end
  1285. end
  1286. #--------------------------------------------------------------------------
  1287. # * Gain Armor (or lose)
  1288. # armor_id : armor ID
  1289. # n : quantity
  1290. #--------------------------------------------------------------------------
  1291. def equip_armor(armor_id, n)
  1292. # Update quantity data in the hash.
  1293. if armor_id > 0
  1294. @armors[armor_id] = [[armor_number(armor_id) + n, 0].max, 99].min
  1295. end
  1296. end
  1297. end
  1298.  
  1299. #==============================================================================
  1300. # ** Game_Actor
  1301. #------------------------------------------------------------------------------
  1302. # This class handles the actor. It's used within the Game_Actors class
  1303. # ($game_actors) and refers to the Game_Party class ($game_party).
  1304. #==============================================================================
  1305. class Game_Actor
  1306. #--------------------------------------------------------------------------
  1307. # * Change Equipment
  1308. # equip_type : type of equipment
  1309. # id : weapon or armor ID (If 0, remove equipment)
  1310. #--------------------------------------------------------------------------
  1311. def equip(equip_type, id)
  1312. case equip_type
  1313. when 0 # Weapon
  1314. if id == 0 or $game_party.weapon_number(id) > 0
  1315. $game_party.equip_weapon(@weapon_id, 1)
  1316. @weapon_id = id
  1317. $game_party.lose_weapon(id, 1)
  1318. end
  1319. when 1 # Shield
  1320. if id == 0 or $game_party.armor_number(id) > 0
  1321. update_auto_state($data_armors[@armor1_id], $data_armors[id])
  1322. $game_party.equip_armor(@armor1_id, 1)
  1323. @armor1_id = id
  1324. $game_party.lose_armor(id, 1)
  1325. end
  1326. when 2 # Head
  1327. if id == 0 or $game_party.armor_number(id) > 0
  1328. update_auto_state($data_armors[@armor2_id], $data_armors[id])
  1329. $game_party.equip_armor(@armor2_id, 1)
  1330. @armor2_id = id
  1331. $game_party.lose_armor(id, 1)
  1332. end
  1333. when 3 # Body
  1334. if id == 0 or $game_party.armor_number(id) > 0
  1335. update_auto_state($data_armors[@armor3_id], $data_armors[id])
  1336. $game_party.equip_armor(@armor3_id, 1)
  1337. @armor3_id = id
  1338. $game_party.lose_armor(id, 1)
  1339. end
  1340. when 4 # Accessory
  1341. if id == 0 or $game_party.armor_number(id) > 0
  1342. update_auto_state($data_armors[@armor4_id], $data_armors[id])
  1343. $game_party.equip_armor(@armor4_id, 1)
  1344. @armor4_id = id
  1345. $game_party.lose_armor(id, 1)
  1346. end
  1347. end
  1348. end
  1349. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement