#=============================================================================== # ¡á CSSR14-«¢«¤«Æ«àùêà÷ ver 1.0 # by Clum-Sea #------------------------------------------------------------------------------- # «¢«¤«Æ«àªòùêà÷ªÇª­ªëªèª¦ªËª·ªÞª¹¡£ #=============================================================================== # Óôìý«Õ«é«°ªòONªËª¹ªë $cssr_script["CSSR14"] = true #------------------------------------------------------------------------------- # ¡Ü «««¹«¿«Þ«¤«ºú£ÙÍ #------------------------------------------------------------------------------- module CSSR14_MODULE # ùêà÷?ØüªÎàÔ?ò¶1¡¡¡ØàÔ?ò¶ªÎ?ªò?ª¨ªÊª¤ªÇª¯ªÀªµª¤¡£ ITEM_COMMAND = ["«¢«¤«Æ«ààÔ?", "ªäªáªë"] # àÔ?ò¶1ªÎ«Ø«ë«×(àÔ?ò¶1ªÈÖ§ÔÑ) ITEM_HELP = ["ùêà÷ª¹ªë«¢«¤«Æ«àªòàÔ?ª·ªÞª¹¡£", "àÔ?ªòªäªáªÞª¹¡£"] # ùêà÷?ØüªÎàÔ?ò¶2 ITEM_COMMAND2 = ["ùêà÷ª¹ªë", "ªäªáªë"] # àÔ?ò¶2ªÎ«Ø«ë«× ITEM_HELP2 = "«¢«¤«Æ«àªòùêà÷ª·ªÞª¹ª«£¿" # ùêà÷«ê«¹«ÈªòàÔ?ª·ªÆª¤ªëªÈª­ªÎ«Ø«ë«× ITEM_HELP3 = "ªÉªÎ«¢«¤«Æ«àªËùêà÷ª¹ªëª«àÔ?ª·ªÆª¯ªÀªµª¤¡£" end #------------------------------------------------------------------------------- # ¡Ü ?àõàâïÒ(ªïª«ªëìѪΪß?ª¨ªÆª¯ªÀªµª¤) #------------------------------------------------------------------------------- module CSSR14_ELEMENT # ùêà÷?àõ COMPOSITION = /.*ùêà÷([0-9]+),([WAI])([0-9]+):([0-9]+),([WAIN])([0-9]+):([0-9]+),([WAIN])([0-9]+):([0-9]+),([WAIN])([0-9]+):([0-9]+)/i end #=============================================================================== # ¡á RPG::Item #------------------------------------------------------------------------------- # «¢«¤«Æ«àªÎ«Ç?«¿«¯«é«¹ªÇª¹¡£ #=============================================================================== class RPG::Item #-------------------------------------------------------------------------- # ¡Ü «¤«ó«¯«ë?«É #-------------------------------------------------------------------------- include CSSR_ELEMENT include CSSR14_ELEMENT #-------------------------------------------------------------------------- # ¡Ü ùêà÷ʦÒö÷÷ïÒ #-------------------------------------------------------------------------- def composition?(id) # ù±é©ªÊáÈòö¢Ôð material = composition_material(id) # ËÁ?ªòö¢Ôð number = composition_material_number(id) # ù±é©ªÊÑѪòö¢Ôð price = composition_price(id) # ù±é©ªÊáÈòò¥ªÃªÆª¤ªëª«ªÉª¦ª« for i in 0..3 case material[i] when RPG::Weapon # á¶ò¥ª·ªÆª¤ªÊª¤íÞùê if $game_party.weapon_number(material[i].id) < number[i] return false end when RPG::Armor # á¶ò¥ª·ªÆª¤ªëíÞùê if $game_party.armor_number(material[i].id) < number[i] return false end when RPG::Item # á¶ò¥ª·ªÆª¤ªëíÞùê if $game_party.item_number(material[i].id) < number[i] return false end end end # Ì¿ÍýªòÚ÷ª¹¡£ return true end #-------------------------------------------------------------------------- # ¡Ü ùêà÷ªËù±é©ªÊáÈÎö¢Ôð # id : «¢«¤«Æ«àªÎID #-------------------------------------------------------------------------- def composition_material(id) # ?àõIDªòö¢Ôð element_id = get_element_id(COMPOSITION) # ÙëÐïªòö¢Ôð item = $data_items[id] return [] if item == nil # ôøÑ¢ûù material = [] # ?ßã for i in element_id # ?àõª¬ðí·ª¿íÞùê if item.element_set.include?(i) # ü¬ìã if COMPOSITION =~ $data_system.elements[i] # áÈòõÚÊ¥ n = 2 for i in 1..4 # «¢«¤«Æ«àªÎðú×¾ªËªèªÃªÆ?×âªòݪ±ªë case eval("$#{n}") when "W", "w" material.push($data_weapons[eval("$#{n + 1} ").to_i]) when "A", "a" material.push($data_armors[eval("$#{n + 1}").to_i]) when "I", "i" material.push($data_items[eval("$#{n + 1}").to_i]) when "N", "n" # "N"ª¬ª¢ªÃª¿íÞùê¡¢ì¤Ë½ªÏù¼ªâªÊª¤ªÈªßªÊª·ªÆ«ë?«×ðûÖõ break end n += 3 end # õÚÊ¥ª¬ðûªïªÃª¿ªéÌ¿ÍýªòÚ÷ª¹ return material end end end # Ì¿ÍýªòÚ÷ª¹(ÛÕÖª) return material end #-------------------------------------------------------------------------- # ¡Ü ùêà÷ªËù±é©ªÊáÈÎù±é©?ªÎö¢Ôð # id : «¢«¤«Æ«àªÎID #-------------------------------------------------------------------------- def composition_material_number(id) # ?àõIDªòö¢Ôð element_id = get_element_id(COMPOSITION) # ÙëÐïªòö¢Ôð item = $data_items[id] # ôøÑ¢ûù number = [] # ?ßã for i in element_id # ?àõª¬ðí·ª¿íÞùê if item.element_set.include?(i) # ü¬ìã if COMPOSITION =~ $data_system.elements[i] # áÈî§ËÁ?ªòõÚÊ¥ n = 4 for i in 1..4 # 0 ªÇªÏÙíª¤íÞùê if eval("$#{n}.to_i").to_i != 0 # õÚÊ¥ number.push(eval("$#{n}.to_i").to_i) end n += 3 end # õÚÊ¥ªòðûª¨ª¿ªéÌ¿ÍýªòÚ÷ª¹ return number end end end # Ì¿ÍýªòÚ÷ª¹(ÛÕÖª) return number end #------------------------------------------------------------------------- # ¡Ü ùêà÷ªËù±é©ªÊÑѪÎö¢Ôð #------------------------------------------------------------------------- def composition_price(id) # ?àõIDªòö¢Ôð element_id = get_element_id(COMPOSITION) # ÙëÐïªòö¢Ôð item = $data_items[id] # ôøÑ¢ûù price = 0 # ?ßã for i in element_id # ?àõª¬ðí·ª¿íÞùê if item.element_set.include?(i) # ü¬ìã if COMPOSITION =~ $data_system.elements[i] # ÑѪòõÚÊ¥ price = $1.to_i end # õÚÊ¥ªòðûª¨ª¿ªéÌ¿ÍýªòÚ÷ª¹ return price end end # Ì¿ÍýªòÚ÷ª¹ return price end end #============================================================================== # ¡á Window_CompositionCommand #------------------------------------------------------------------------------ # ùêà÷?ØüªÇ¡¢ú¼ÔѪòàÔ?ª¹ªë«¦«£«ó«É«¦ªÇª¹¡£ #============================================================================== class Window_CompositionCommand < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü «¤«ó«¯«ë?«É #-------------------------------------------------------------------------- include CSSR14_MODULE #-------------------------------------------------------------------------- # ¡Ü «ª«Ö«¸«§«¯«ÈôøÑ¢ûù #-------------------------------------------------------------------------- def initialize super(0, 64, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) # «³«Þ«ó«ÉªòíÂà÷ @commands = ITEM_COMMAND @item_max = @commands.size @column_max = @commands.size @item_width = (width - 32) / @commands.size self.back_opacity = 160 self.index = 0 self.z = 1000 @past_index = nil # Z ñ¨øöªòàâïÒ self.z = 1000 # «Ø«ë«×«Æ«­«¹«ÈªòàâïÒ @help_text = ITEM_HELP # «ê«Õ«ì«Ã«·«å refresh end #------------------------------------------------------------------------- # ¡Ü «ê«Õ«ì«Ã«·«å #------------------------------------------------------------------------- def refresh for i in 0...@commands.size rect = Rect.new(@item_width * i, 0, @item_width, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.font.color = system_color self.contents.draw_text(rect, @commands[i], 1) end end #-------------------------------------------------------------------------- # ¡Ü ««?«½«ëªÎÏ»û¡ÌÚãæ #-------------------------------------------------------------------------- def update_cursor_rect if index != -1 self.cursor_rect.set(@item_width * index, 0, @item_width, 32) end end #-------------------------------------------------------------------------- # ¡Ü «Ø«ë«×«Æ«­«¹«ÈÌÚãæ #-------------------------------------------------------------------------- def update_help(flug = false) # «¤«ó«Ç«Ã«¯«¹ª¬êުêƪ¤ª¿íÞùê if @past_index != self.index or flug # «Ø«ë«×«Æ«­«¹«ÈÌÚãæ @help_window.set_text(@help_text[self.index]) # «¤«ó«Ç«Ã«¯«¹ªòî¢àâïÒ @past_index = self.index end end end #=============================================================================== # ¡á Window_CompositionItem #------------------------------------------------------------------------------- # ùêà÷?ØüªÇ¡¢ùêà÷ª¹ªë«¢«¤«Æ«àªòàÔ?ª¹ªë«¦«£«ó«É«¦ªÇª¹¡£ #=============================================================================== class Window_CompositionItem < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü ÍëËÒ«¤«ó«¹«¿«ó«¹?? #-------------------------------------------------------------------------- attr_accessor :row_index # ΦË۪Ϋ¤«ó«Ç«Ã«¯«¹ attr_writer :data # «Ç?«¿ #-------------------------------------------------------------------------- # ¡Ü «ª«Ö«¸«§«¯«ÈôøÑ¢ûù #-------------------------------------------------------------------------- def initialize super(0, 128, 640, 352) self.contents = Bitmap.new(width - 32, height - 32) @column_max = 2 self.back_opacity = 160 self.index = 0 self.z = 1000 @past_index = nil @row_index = nil @data = [] # «ê«Õ«ì«Ã«·«å refresh end #------------------------------------------------------------------------- # ¡Ü «¢«¤«Æ«àªÎö¢Ôð #------------------------------------------------------------------------- def item return @data[self.index] end #------------------------------------------------------------------------- # ¡Ü «ê«Õ«ì«Ã«·«å #------------------------------------------------------------------------- def refresh # ôøÑ¢ûù self.contents.clear # ú£Ùͪòö¢Ôð @data = [] for item in $data_items next if item == nil material = item.composition_material(item.id) # «­?áÈ¬ª¢ªëªÊªéªÐõÚÊ¥ if $game_party.item_posse(material[0]).to_i > 0 @data.push(item) end end #------ö¢ÔððûÖõ # ú£ÙÍ?ª¬ 0 ªÇªÊª±ªìªÐ«Ó«Ã«È«Þ«Ã«×ªòíÂà÷ª·¡¢îïú£ÙͪòÙÚ? @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i, type) end end end #------------------------------------------------------------------------- # ¡Ü ú£ÙͪÎÙÚ? # index : ú£ÙÍÛã? #------------------------------------------------------------------------- def draw_item(index, type) item = @data[index] # ËÁ?ªòö¢Ôð number = $game_party.item_posse(item) # ÙÚ? if item.composition?(item.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 y = index * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 204, 32, item.name, 0) self.contents.draw_text(x + 232, y, 16, 32, ":", 1) self.contents.draw_text(x + 248, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # ¡Ü «Ø«ë«×«Æ«­«¹«ÈÌÚãæ #-------------------------------------------------------------------------- def update_help(flug = false) # «¤«ó«Ç«Ã«¯«¹ª¬êުêƪ¤ª¿íÞùê if @past_index != self.index or flug # «Ø«ë«×«Æ«­«¹«ÈÌÚãæ @help_window.set_text(self.item == nil ? "" : self.item.description) # «¤«ó«Ç«Ã«¯«¹ªòî¢àâïÒ @past_index = self.index end end end #=============================================================================== # ¡á Window_CompositionData #------------------------------------------------------------------------------- # ùêà÷詪ǡ¢àÔ?ª·ªÆª¤ªë«¢«¤«Æ«àªÎï×Üêòøúãƪ¹ªë«¦«£«ó«É«¦ªÇª¹¡£ #=============================================================================== class Window_CompositionData< Window_Base #-------------------------------------------------------------------------- # ¡Ü «¤«ó«¯«ë?«É #-------------------------------------------------------------------------- include CSSR14_MODULE #-------------------------------------------------------------------------- # ¡Ü «ª«Ö«¸«§«¯«ÈôøÑ¢ûù #-------------------------------------------------------------------------- def initialize super(288, 160, 328, 240) self.contents = Bitmap.new(width - 32, height - 32) self.back_opacity = 160 self.z = 1000 refresh(nil) end #-------------------------------------------------------------------------- # ¡Ü «ê«Õ«ì«Ã«·«å # item : «¢«¤«Æ«à #-------------------------------------------------------------------------- def refresh(item) return if item == nil self.contents.clear x = 2 y = 2 self.contents.font.color = system_color # «¢«¤«Æ«àÙ£ cx = contents.text_size(item.name).width self.contents.draw_text(x, y, cx, 32, item.name) y += 32 # ö·Ó« self.contents.draw_text(x, y, 80, 32, "?Ì«") self.contents.font.color = normal_color self.contents.draw_text(x + 204, y, 80, 32, item.composition_price(item.id).to_s, 2) y += 32 # ù±é©áÈòÙÚ?(áÈî§Ù£ á¶ò¥?/ù±é©?) self.contents.font.color = system_color self.contents.draw_text(x, y, 80, 32, "ù±é©áÈî§") y += 32 self.contents.font.color = normal_color for material in item.composition_material(item.id) if $cssr_script["CSSR1"] == true name = material.name.split(SPLIT)[0] else name = material.name end self.contents.draw_text(x, y, x + 192, 32, name) self.contents.draw_text(x + 208, y, 32, 32, $game_party.item_posse(material).to_s, 2) self.contents.draw_text(x + 248, y, 32, 32, "/") for i in 0...item.composition_material_number(item.id).size if item.composition_material(item.id)[i] == material self.contents.draw_text(x + 264, y, 32, 32, item.composition_material_number(item.id)[i].to_s) end end y += 32 end end end #=============================================================================== # ¡á Window_Question #------------------------------------------------------------------------------- # Ó´å§è©ªÇ¡¢ú¼ÔѪòàÔ?ª¹ªë«¦«£«ó«É«¦ªÇª¹¡£ #=============================================================================== class Window_Question < Window_Selectable #-------------------------------------------------------------------------- # ¡Ü «¤«ó«¯«ë?«É #-------------------------------------------------------------------------- include CSSR14_MODULE #-------------------------------------------------------------------------- # ¡Ü «ª«Ö«¸«§«¯«ÈôøÑ¢ûù # type :«¿«¤«×(0:ßæߧ 1:?ûù) #-------------------------------------------------------------------------- def initialize super(116, 192, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.z = 2000 self.back_opacity = 160 @commands = ITEM_COMMAND2 @item_max = 2 @column_max = 1 refresh self.index = 0 end #-------------------------------------------------------------------------- # ¡Ü «ê«Õ«ì«Ã«·«å #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(4, 0, self.width - 8, 32, @commands[0]) self.contents.draw_text(4, 32, self.width - 8, 32, @commands[1]) end end #============================================================================== # ¡á Scene_ItemComposition #------------------------------------------------------------------------------ # Ó´å§è©ªÎ?×âªòú¼ª¦«¯«é«¹ªÇª¹¡£ #============================================================================== class Scene_ItemComposition #-------------------------------------------------------------------------- # ¡Ü «¤«ó«¯«ë?«É #-------------------------------------------------------------------------- include CSSR14_MODULE #-------------------------------------------------------------------------- # ¡Ü «á«¤«ó?×â #-------------------------------------------------------------------------- def main # ß¾ªÎ«Ø«ë«×«¦«£«ó«É«¦ªòíÂà÷ @help_window = Window_Help.new @help_window.back_opacity = 160 # ù»ªÎ«Ø«ë«×«¦«£«ó«É«¦ªòíÂà÷ @help2_window = Window_Help.new @help2_window.y = 64 @help2_window.back_opacity = 160 @help2_window.visible = false # òõÙý«¦«£«ó«É«¦ªÎíÂà÷ @question_window = Window_Question.new @question_window.active = false @question_window.visible = false # ùêà÷«³«Þ«ó«É«¦«£«ó«É«¦ªÎíÂà÷ @itemcommand_window = Window_CompositionCommand.new # «¢«¤«Æ«à«¦«£«ó«É«¦ªÎíÂà÷ @item_window = Window_CompositionItem.new @item_window.index = -1 @item_window.active = false # «¢«¤«Æ«àï×Ü릫£«ó«É«¦ªÎíÂà÷ @itemdata_window = Window_CompositionData.new @itemdata_window.visible = false # «´?«ë«É«¦«£«ó«É«¦ªÎíÂà÷ @gold_window = Window_Gold.new @gold_window.x = 480 @gold_window.y = 64 @gold_window.z = 4000 @gold_window.back_opacity = 160 @gold_window.visible = false # «Ø«ë«×«¦«£«ó«É«¦ªò?Ö§Üõª± @itemcommand_window.help_window = @help_window @item_window.help_window = @help_window # «¹«×«é«¤«È«Þ«Ã«×ªÎíÂà÷ @map_transition = Spriteset_Map.new # «È«é«ó«¸«·«ç«ó?ú¼ Graphics.transition # «á«¤«ó«ë?«× loop do # «²?«à?ØüªòÌÚãæ Graphics.update # ìýÕôï×ÜêòÌÚãæ Input.update # «Õ«ì?«àÌÚãæ update # ?Øüª¬ï·ªêôðªïªÃª¿ªé«ë?«×ªòñé? if $scene != self break end end # «È«é«ó«¸«·«ç«óñÞÝá Graphics.freeze # «¦«£«ó«É«¦ªòú°Û¯ @help_window.dispose @help2_window.dispose @itemcommand_window.dispose @itemdata_window.dispose @item_window.dispose @question_window.dispose @gold_window.dispose # «¹«×«é«¤«È«Þ«Ã«×ªòú°Û¯ @map_transition.dispose end #-------------------------------------------------------------------------- # ¡Ü «Õ«ì?«àÌÚãæ #-------------------------------------------------------------------------- def update # ùêà÷«³«Þ«ó«Éª¬«¢«¯«Æ«£«ÖªÎíÞùê¡¢update_smithcommand ªòû¼ªÖ if @itemcommand_window.active @itemcommand_window.update update_itemcommand return end # «¢«¤«Æ«à«¦«£«ó«É«¦ª¬«¢«¯«Æ«£«ÖªÎíÞùê¡¢update_smithitem ªòû¼ªÖ if @item_window.active @item_window.update update_item return end # òõÙý«¦«£«ó«É«¦ª¬«¢«¯«Æ«£«ÖªÎíÞùê¡¢ update_creating ªòû¼ªÖ if @question_window.active @question_window.update update_question return end end #------------------------------------------------------------------------- # ¡Ü «Õ«ì?«àÌÚãæ(ùêà÷«³«Þ«ó«Éª¬«¢«¯«Æ«£«ÖªÎíÞùê) #------------------------------------------------------------------------- def update_itemcommand # C «Ü«¿«óª¬ä㪵ªìª¿íÞùê if Input.trigger?(Input::C) # ««?«½«ëêÈöǪ˪èªÃªÆÝÂÐ÷ case @itemcommand_window.index # «¢«¤«Æ«ààÔ? when 0 # ̽ïÒ SE ªòæÑñ´ $game_system.se_play($data_system.decision_se) # «¢«¤«Æ«à«¦«£«ó«É«¦ªËï·ªêô𪨠@itemcommand_window.active = false @itemcommand_window.visible = false @item_window.active = true @item_window.visible = true @item_window.index = 0 @help2_window.visible = true @help2_window.set_text(ITEM_HELP3) @itemcommand_window.update_help(true) return # ªäªáªë when 1 # «­«ã«ó«»«ë SE ªòæÑñ´ $game_system.se_play($data_system.cancel_se) # «Þ«Ã«×?ØüªËï·ªêô𪨠$scene = Scene_Map.new return end end # B «Ü«¿«óª¬ä㪵ªìª¿íÞùê if Input.trigger?(Input::B) # «­«ã«ó«»«ë SE ªòæÑñ´ $game_system.se_play($data_system.cancel_se) # «Þ«Ã«×?ØüªËï·ªêô𪨠$scene = Scene_Map.new return end end #------------------------------------------------------------------------- # ¡Ü «Õ«ì?«àÌÚãæ(«¢«¤«Æ«à«¦«£«ó«É«¦ª¬«¢«¯«Æ«£«ÖªÎíÞùê) #------------------------------------------------------------------------- def update_item # C «Ü«¿«óª¬ä㪵ªìª¿íÞùê if Input.trigger?(Input::C) # «¢«¤«Æ«àª¬nilªÎíÞùêªÏðûÖõ item = @item_window.item return if item == nil # ï×Ü릫£«ó«É«¦ªòøúãÆ @itemdata_window.refresh(item) @itemdata_window.visible = true # ùêà÷ʦÒöªÎíÞùê¡¢òõÙý«¦«£«ó«É«¦ªËï·ªêô𪨠if item.composition?(item.id) # ̽ïÒ SE ªòæÑñ´ $game_system.se_play($data_system.decision_se) # ï·ªêô𪨠@question_window.active = true @question_window.visible = true @item_window.active = false @help2_window.set_text(ITEM_HELP2) @itemdata_window.visible = true @itemdata_window.refresh(item) return # ùêà÷ÜôʦÒöªÎíÞùê else # «Ö«¶? SE ªòæÑñ´ $game_system.se_play($data_system.buzzer_se) end end # B «Ü«¿«óª¬ä㪵ªìª¿íÞùê if Input.trigger?(Input::B) # «­«ã«ó«»«ë SE ªòæÑñ´ $game_system.se_play($data_system.cancel_se) # @data ªòôøÑ¢ûù @item_window.data = [] # «³«Þ«ó«É«¦«£«ó«É«¦ªËï·ªêô𪨠@item_window.index = -1 @item_window.row_index = nil @item_window.active = false @itemcommand_window.active = true @itemcommand_window.visible = true @itemcommand_window.update_help(true) @help2_window.visible = false # «¢«¤«Æ«à«¦«£«ó«É«¦ªÎ?黪òá¼ËÛ @item_window.contents.clear # «¢«¤«Æ«àï×Ü릫£«ó«É«¦ªÎ?黪òá¼ËÛ @itemdata_window.contents.clear @gold_window.visible = false return end end #------------------------------------------------------------------------- # ¡Ü «Õ«ì?«àÌÚãæ(òõÙý«¦«£«ó«É«¦ª¬«¢«¯«Æ«£«ÖªÎíÞùê) #------------------------------------------------------------------------- def update_question # C «Ü«¿«óª¬ä㪵ªìª¿íÞùê if Input.trigger?(Input::C) # index ªËªèªÃªÆÝÂÐ÷ case @question_window.index # ùêà÷ª¹ªë when 0 # ?Ýá SE ªòæÑñ´ $game_system.se_play($data_system.equip_se) item = @item_window.item # «¢«¤«Æ«àªòõÚÊ¥ $game_party.item_gain(item, 1) # «¢«¤«Æ«àªòÊõá´ material = item.composition_material(item.id) number = item.composition_material_number(item.id) for i in 0...material.size $game_party.item_lose(material[i], number[i]) end # ÑѪòÊõá´ $game_party.lose_gold(item.composition_price(item.id)) # «¢«¤«Æ«à«¦«£«ó«É«¦ªò«ê«Õ«ì«Ã«·«å @item_window.refresh @item_window.index = 0 # «¢«¤«Æ«àï×Ü릫£«ó«É«¦ªòÞªøúãƪ˪¹ªë @itemdata_window.visible = false # «¢«¤«Æ«à«¦«£«ó«É«¦ªËï·ªêô𪨠@item_window.active = true @item_window.update_help(true) @question_window.active = false @question_window.visible = false @gold_window.refresh return # ªäªáªë when 1 # «­«ã«ó«»«ë SE ªòæÑñ´ $game_system.se_play($data_system.cancel_se) # «¢«¤«Æ«à«¦«£«ó«É«¦ªËï·ªêô𪨠@question_window.active = false @question_window.visible = false @item_window.active = true @itemdata_window.visible = false return end end # B «Ü«¿«óª¬ä㪵ªìª¿íÞùê if Input.trigger?(Input::B) # «­«ã«ó«»«ë SE ªòæÑñ´ $game_system.se_play($data_system.cancel_se) # «¢«¤«Æ«à«¦«£«ó«É«¦ªËï·ªêô𪨠@question_window.active = false @question_window.visible = false @item_window.active = true @item_window.row_index = nil @item_window.update_help(true) @itemdata_window.visible = false return end end end