Create Items
Descrizione
Lo script permette di unire gli oggetti alle armi(o armature) allo scopo di crearne di nuovi, con nuove caratteristiche e un ID diverso, è però possibile
risalire facilmente agli oggetti creati trattandoli alla stregua di quelli originali. Ad esempio se ho bisogno della Spada Del Re per entrare in una torre
e l'ho modificata nella Spada Del Re Dei Pifferi, il gioco la potrà riconoscere(a vostra discrezione). Per ogni info leggete i commenti iniziali dello script. (Scrivere le istruzioni di uno script è spesso più faticoso che scrivere lo script stesso, quindi mi raccomando leggeteli per bene).
Autore
kingartur2(3)
Allegati
N/A
Istruzioni per l'uso
Nello script.
Script
#=============================================================================== # Autore : kingartur2(3) # Versione : 1.2 # Nome : Create Items #=============================================================================== # ISTRUZIONI : # Il funzionamento dello script è semplice, si unisce un oggetto ad un arma o # armatura allo scopo di potenziarli. Può essere unito massimo un oggetto, e # l'oggetto creato non potrà essere più potenziato. # ATTENZIONE : L'arma(o armatura) una volta creata non sarà più la stessa, # nel senso, sarà creata una nuova arma(o armatura) con un nuovo ID. # E' però possibile considerare l'arma(o armatura) creata alla stregua # dell'originale. # Prima di qualsiasi operazione con gli oggetti è infatti possibile scrivere # nel call script: # $game_party.include_modificate # In questo modo la prossima operazione di conteggio che verrà effettuata # sugli oggetti terrà conto anche di quelli modificati, ad esempio se verrà # chiesto il numero di "Spade", verra considerate tutte le armi ricavate usando # la "Spada" come materiale. #------------------------------------------------------------------------------- # COME IMPOSTARE LO SCRIPT : #------------------------------------------------------------------------------- # ARMI(O ARMATURE) : # Le armi e armature che possono essere modificate sono inserite negli oggetti # (per comodità), però nelle loro note possono essere impostate armi(o armature) # che indipendentemente dai settaggi non possono essere modificate. Per far ciò # è sufficiente inserire nelle note: # ------------------------------------------------------------------------------ # <no_modificable> # In questo modo quell'arma(o armatura) non potrà essere modificata in alcun # modo. # ------------------------------------------------------------------------------ # Per scegliere un prezzo sufficiente a modificare un arma è sufficiente inserire: # <modificate_price : n> # Il prezzo totale per modificare l'arma sarà data dal suo prezzo per modificarla # sommato al prezzo di modificazione dell'oggetto scelto # ------------------------------------------------------------------------------ # <icon : ID_MODIFICA, ID_ICONA> # Quando l'arma viene modificata e l'oggetto vuol cambiargli icona, il cambio di # icona viene effettuato in base al tipo di modifica, in questo modo una pietra # del ghiaccio può generare un arco di ghiaccio e un alabarda di ghiaccio senza # problemi. # ESEMPIO : <icon : ghiaccio, 23> # Quando viene misceltato con un oggetto recante la modifica ghiaccio, questo # oggetto cambia la sua icona in 23, in caso contrario non succede nulla. #------------------------------------------------------------------------------- # OGGETTI : # Nelle impostazioni degli oggetti sono contenute anche le armi(o armature) che # quell'oggetto può modificare, questi possono essere modificati con i seguenti # tag nelle note: # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <all_weapons> # Aggiunge tutte le armi del database agli oggetti modificabili # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <all_armors> # Aggiunge tutte le armature del database agli oggetti modificabili # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <weapon[ID]> # Aggiunge agli oggetti modificabili una specifica arma # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <armor[ID]> # Aggiunge agli oggetti modificabili una specifica armatura # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <no_weapon[ID]> # Rimuove dagli oggetti modificabili una specifica arma # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <no_armor[ID]> # Rimuove dagli oggetti modificabili una specifica armatura # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # <modificate_price : n> # Il prezzo per modificare un arma(o armatura) con questo oggetto # NB : può anche essere negativo, non scenderà mai al di sotto di 0. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #------------------------------------------------------------------------------- # EFFETTI DEGLI OGGETTI : # Gli effetti degli oggetti vanno tutti racchiusi tra i due tag: # <effects> # ..... # <effects> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # All'interno dei due tag vanno poi configurati gli effetti che quegli oggetti # avranno sulle armi(o armature). # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # attack : n # Aumenta o diminuisce l'attacco dell'oggeti di n punti. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # defense : n # Aumenta o diminuisce la difesa dell'oggeti di n punti. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # m_attack : n # Aumenta o diminuisce l'attacco magico dell'oggeti di n punti. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # m_defense : n # Aumenta o diminuisce la difesa magica dell'oggeti di n punti. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # element : id -----NEW # Aumenta o rimuove un elemento dall'arma, per rimuoverlo basta aggiungere # l'id negativo. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # state : id, percentuale(un qualsiasi numero tra 1 e 100) ----NEW # Aumenta o rimuove uno stato dall'arma, per rimuoverlo basta aggiungere # l'id negativo. NB : se lo stato va rimosso la percentuale è inutile. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # skill : id -----NEW # Aumenta o rimuove un'abilità dall'arma, per rimuoverlo basta aggiungere # l'id negativo. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # icon : ID_MODIFICA # Da un id di modifica all'oggetto, se non è presente nulla non modificherà nulla, # serve a dare coerenza alla modifica dell'icona. Se ad esempio quest'oggetto è # una pietra del ghiaccio è possibile inserire: # icon : ghiaccio # in questo modo le armi capiranno quale icona applicare. # price : n # Aumenta o diminuisce il valore dell'oggetto di n. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # name : stringa # Definisce il suffisso che verrà messo all'oggeto creato, se ad esempio si # inserisce come suffisso *della distruzione* e l'oggetto modificato prima si # chiamava *Spada*, l'oggetto che ne uscirà fuori si chiamerà : # *Spada della distruzione* #=============================================================================== # RICHIAMARE IL MENU' PER L'UNIONE DEGLI OGGETTI: # Nulla di complesso, è sufficiente mettere in un call script: # SceneManager.call(Scene_CreateEquip) # Prego a tutti di far attenzione a non mettere go_to al posto di call, visto # che nel caso si usasse go_to, all'uscita del menù si chiuderebbe il gioco. #=============================================================================== # INDICAZIONI # Qui vanno configurati i messaggi che guidano il giocatore nella creazione # dell'arma #=============================================================================== module Create_Items #----------------------------------------------------------------------------- # PREPARAZIONE = "stringa" # Seleziona il messaggio di default e di benvenuto della schermata. #----------------------------------------------------------------------------- PREPARAZIONE = "Scegli un oggetto da modificare." #----------------------------------------------------------------------------- # PREPARAZIONE_2 = "stringa" # Seleziona il messaggio per far scegliere un ingrediente. #----------------------------------------------------------------------------- PREPARAZIONE_2 = "Scegli un oggetto per potenziare quello scelto." #----------------------------------------------------------------------------- # TUTTO_FATTO = "stringa" # Quando finalmente il nostro player riuscirà a sintetizzare qualcosa gli uscirà # questo messaggio accompagnato dal nome dell'oggetto. #----------------------------------------------------------------------------- TUTTO_FATTO = "Hai realizzato" #----------------------------------------------------------------------------- # NO_GOLD = "stringa" # Seleziona il messaggio che sarà visualizzato quando si cerca di sintetizzare # qualcosa ma non si hanno abbastanza soldi #----------------------------------------------------------------------------- NO_GOLD = "Non hai abbastanza soldi!! Pezzente >_<!!" end class Game_Party < Game_Unit attr_reader :added_weapons attr_reader :added_armors attr_reader :melted_weapons attr_reader :melted_armors attr_reader :include_modificate alias fgbgndsgshjij initialize def initialize fgbgndsgshjij @added_weapons = {} @added_armors = {} @melted_weapons = {} @melted_armors = {} @include_modificated = false end def include_modificate @include_modificated = true end def load_database for i in @added_weapons $data_weapons[i[0] + 1000] = i[1] end for i in @added_armors $data_armors[i[0] + 1000] = i[1] end end def add_new_item(item) if item.is_a?(RPG::Weapon) $data_weapons[@added_weapons.size + 1000] = item @added_weapons[@added_weapons.size] = item elsif item.is_a?(RPG::Armor) $data_armors[@added_armors.size + 1000] = item @added_armors[@added_armors.size] = item end end def item_to_modificate(item) data = [] for i in items if i.modificable.include?(item) data.push(i) end end return data end alias fhigfdsuhui item_number def item_number(item) n = fhigfdsuhui(item) @include_modificated = false return n unless @include_modificated return n unless item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor) return n unless item.can_modificable? if item.is_a?(RPG::Weapon) array = @melted_weapons else array = @melted_armors end for i in array if i[0][0] == item.id if item.is_a?(RPG::Weapon) n += item_number($data_weapons[i[1]]) else n += item_number($data_armors[i[1]]) end end end return n end def can_modificable?(item) for i in $data_items next if not i.is_a?(RPG::Item) if i.modificable.include?(item) return true end end return false end def can_modificable_now?(item) for i in items next if not i.is_a?(RPG::Item) if i.modificable.include?(item) return true end end return false end end class Game_System alias jfknsdkjfnsd on_after_load def on_after_load jfknsdkjfnsd $data_weapons = load_data("Data/Weapons.rvdata2") $data_armors = load_data("Data/Armors.rvdata2") $data_items = load_data("Data/Items.rvdata2") $game_party.load_database end end module DataManager class << self alias dfnsfsijfsd create_game_objects def self.create_game_objects $data_weapons = load_data("Data/Weapons.rvdata2") $data_armors = load_data("Data/Armors.rvdata2") $data_items = load_data("Data/Items.rvdata2") dfnsfsijfsd end end end class RPG::Item < RPG::UsableItem def modificable if @modificable return @modificable end @modificable = [] testo_note = @note.clone linee = testo_note.scan(/(.+)$/) for linea in linee linea = linea[0] if linea[/<all_weapons>/] @modificable.concat($data_weapons) next end if linea[/<all_armors>/] @modificable.concat($data_armors) next end if linea[/<weapon\[(\d+)\]>/] @modificable.push($data_weapons[$1.to_i]) next end if linea[/<armor\[(\d+)\]>/] @modificable.push($data_armors[$1.to_i]) next end if linea[/<no_weapon\[(\d+)\]>/] @modificable.delete($data_weapons[$1.to_i]) next end if linea[/<no_armor\[(\d+)\]>/] @modificable.delete($data_armors[$1.to_i]) next end @modificable.delete(nil) for item in @modificable @modificable.delete(item) if not item.can_modificable? end end return @modificable end def effetti return @effetti if @effetti @effetti = {} @effetti[:attack] = 0 @effetti[:defense] = 0 @effetti[:m_attack] = 0 @effetti[:m_defense] = 0 @effetti[:agility] = 0 @effetti[:luck] = 0 @effetti[:elements] = [] @effetti[:states] = [] @effetti[:skills] = [] @effetti[:icon] = "" @effetti[:price] = 0 @effetti[:name] = "" testo_note = @note.clone linee = testo_note.scan(/(.+)$/) reading = false for linea in linee linea = linea[0] if linea[/<effects>/] and reading reading = false break end if linea[/<effects>/] reading = true next end if reading if linea[/attack : (-|)(\d+)/] @effetti[:attack] = $2.to_i if $1 == "-" @effetti[:attack] = -@effetti[:attack] end end if linea[/defense : (-|)(\d+)/] @effetti[:defense] = $2.to_i if $1 == "-" @effetti[:defense] = -@effetti[:defense] end end if linea[/m_attack : (-|)(\d+)/] @effetti[:m_attack] = $2.to_i if $1 == "-" @effetti[:m_attack] = -@effetti[:m_attack] end end if linea[/m_defense : (-|)(\d+)/] @effetti[:m_defense] = $2.to_i if $1 == "-" @effetti[:m_defense] = -@effetti[:m_defense] end end if linea[/agility : (-|)(\d+)/] @effetti[:agility] = $2.to_i if $1 == "-" @effetti[:agility] = -@effetti[:agility] end end if linea[/luck : (-|)(\d+)/] @effetti[:luck] = $2.to_i if $1 == "-" @effetti[:luck] = -@effetti[:luck] end end if linea[/element : (-|)(\d+)/] @effetti[:elements].push($2.to_i) if $1 == "-" @effetti[:elements][-1] = -@effetti[:elements][-1] end end if linea[/state : (-|)(\d+)(,|)(\s|)(\d+|)/] @effetti[:states].push([$2.to_i, $5.to_i / 100.0]) if $1 == "-" @effetti[:states][-1][0] = -@effetti[:states][-1][0] end end if linea[/skill : (-|)(\d+)/] @effetti[:skills].push($2.to_i) if $1 == "-" @effetti[:skills][-1] = -@effetti[:skills][-1] end end if linea[/icon : (\w+)/] @effetti[:icon] = $1 end if linea[/price : (-|)(\d+)/] @effetti[:price] = $2.to_i if $1 == "-" @effetti[:price] = -@effetti[:price] end end if linea[/name : (.+)/] @effetti[:name] = " " + $1 @effetti[:name].gsub!("\r") {""} end end end return @effetti end end class RPG::EquipItem < RPG::BaseItem def can_modificable? return @can_modificable if @can_modificable @can_modificable = true if self.id >= 1000 or @note[/<no_modificable>/] @can_modificable = false end return @can_modificable end def icon_changing return @icon_changing if @icon_changing @icon_changing = {} testo_note = @note.clone linee = testo_note.scan(/(.+)$/) for linea in linee linea = linea[0] if linea[/\<icon : (\w+), (\d+)\>/] @icon_changing[$1] = $2.to_i end end return @icon_changing end end class RPG::BaseItem def modificate_price return @modificate_price if @modificate_price @modificate_price = 0 if @note[/<modificate_price : (-|)(\d+)>/] @modificate_price = $2.to_i if $1 == "-" @modificate_price = -@modificate_price end end return @modificate_price end end class Window_CreateEquip_Price < Window_Base def initialize(x, y, w, h) super(x, y, w, h) @recorded = [] refresh end def refresh(equip = nil, item = nil) contents.clear price1 = 0 price2 = 0 price1 += equip.modificate_price if equip price2 += item.modificate_price if item total_price = [(price1 + price2), 0].max price1 = "???" if not equip price2 = "???" if not item if total_price > $game_party.gold change_color(power_down_color) else change_color(power_up_color) end if price2.to_i < 0 text = "#{price1} - #{price2.abs} = #{total_price}" else text = "#{price1} + #{price2} = #{total_price}" end draw_text(0, 0, contents.width, line_height, text, 1) end def open refresh super end end class Window_CreateEquip_EquipList < Window_ItemList attr_accessor :item_window def initialize(x, y, w, h) super(x, y, w, h) end def include?(item) return true end def enable?(item) can = false for i in $game_party.items next if not i.is_a?(RPG::Item) if i.modificable.include?(item) if (i.modificate_price + item.modificate_price) <= $game_party.gold can = true break end end end return false unless can return true if $game_party.can_modificable_now?(item) return false end def col_max return 1 end def update_help super update_item_window if @item_window end def update_item_window @item_window.refresh(@data[index]) end def make_item_list @data = [] for i in $game_party.equip_items @data.push(i) if $game_party.can_modificable?(i) end return @data end end class Window_CreateEquip_ItemList < Window_ItemList attr_accessor :description_window def initialize(x, y, w, h) super(x, y, w, h) end def include?(item) return true end def enable?(item) return true if not @store_item return false if (@store_item.modificate_price + item.modificate_price) > $game_party.gold return true end def col_max return 1 end def refresh(item = nil) @store_item = item make_item_list(item) create_contents draw_all_items end def update_help super update_description_window if @description_window end def update_description_window @description_window.refresh(@data[index]) end def make_item_list(item = nil) if item.nil? @data = [] return end @data = $game_party.item_to_modificate(item) end end class Window_CreateEquip_EffectList < Window_Base def refresh(item = nil) create_contents x = 3 middle_x = contents.width / 2 + 3 w = contents.width / 2 - 6 if item.nil? item = RPG::Item.new end w = w * 0.87 change_color(system_color) draw_text(x, 0, w, line_height, Vocab::param(2) + ":") draw_text(middle_x, 0, w, line_height, Vocab::param(3) + ":") draw_text(x, line_height, w, line_height, Vocab::param(4) + ":") draw_text(middle_x, line_height, w, line_height, Vocab::param(5) + ":") draw_text(x, line_height * 2, w, line_height, Vocab::param(6) + ":") draw_text(middle_x, line_height * 2, w, line_height, Vocab::param(7) + ":") w = w / 0.87 contents.fill_rect(0, 0, contents.width, 2, normal_color) contents.fill_rect(contents.width - 2, 0, 2, contents.height, normal_color) contents.fill_rect(0, contents.height - 2, contents.width, 2, normal_color) contents.fill_rect(0, 0, 2, contents.height, normal_color) contents.fill_rect(middle_x - 2, 0, 2, contents.width, normal_color) contents.fill_rect(0, line_height, contents.width, 2, normal_color) contents.fill_rect(0, line_height * 2, contents.width, 2, normal_color) contents.fill_rect(0, line_height * 3, contents.width, 2, normal_color) for i in item.effetti next if [:name, :price, :elements, :states, :skills, :icon].include?(i[0]) change_color(param_change_color(i[1])) if i[1] > 0 i[1] = "+#{i[1]}" else i[1] = "#{i[1]}" end case i[0] when :attack draw_text(x, 0, w, line_height, i[1], 2) when :defense draw_text(middle_x, 0, w, line_height, i[1], 2) when :m_attack draw_text(x, line_height, w, line_height, i[1], 2) when :m_defense draw_text(middle_x, line_height, w, line_height, i[1], 2) when :agility draw_text(x, line_height * 2, w, line_height, i[1], 2) when :luck draw_text(middle_x, line_height * 2, w, line_height, i[1], 2) end end end end class Scene_CreateEquip < Scene_Base def start super create_background create_helps_window create_gold_window create_effect_list create_item_list create_equip_list refresh_gold_window @timer_note = 0 end def create_background @background_sprite = Sprite.new @background_sprite.bitmap = SceneManager.background_bitmap @background_sprite.color.set(16, 16, 16, 128) end def create_helps_window @help_window_1 = Window_Help.new @help_window_2 = Window_Help.new(1.5) @help_window_2.y = Graphics.height - @help_window_2.height end def create_gold_window x = Graphics.width / 5 * 2.3 h = @help_window_1.fitting_height(1) y = 0 w = Graphics.width / 5 * 2.7 @gold_window = Window_CreateEquip_Price.new(x, y, w, h) end def create_effect_list x = Graphics.width / 5 * 2.3 h = (Graphics.height - @help_window_1.height - @help_window_2.height) / 2 - @gold_window.height y = @help_window_1.height + (Graphics.height - @help_window_1.height - @help_window_2.height) / 2 w = Graphics.width / 5 * 2.7 @effect_window = Window_CreateEquip_EffectList.new(x, y, w, h) @effect_window.refresh @gold_window.y = @effect_window.y + @effect_window.height end def create_item_list x = Graphics.width / 5 * 2.3 y = @help_window_1.height w = Graphics.width / 5 * 2.7 h = (Graphics.height - @help_window_1.height - @help_window_2.height) / 2 @item_window = Window_CreateEquip_ItemList.new(x, y, w, h) @item_window.help_window = @help_window_1 @item_window.description_window = @effect_window end def create_equip_list x = 0 y = @help_window_1.height w = Graphics.width / 5 * 2.3 h = Graphics.height - @help_window_1.height - @help_window_2.height @equip_list = Window_CreateEquip_EquipList.new(x, y, w, h) @equip_list.help_window = @help_window_1 @equip_list.item_window = @item_window @equip_list.refresh @equip_list.activate @equip_list.index = 0 end def update super update_helps refresh_gold_window if Input.trigger?(:B) Sound.play_cancel if @item_window.active @item_window.deactivate @item_window.index = -1 @equip_list.activate @effect_window.refresh elsif @equip_list.active SceneManager.return end end if Input.trigger?(:C) if @equip_list.active and @equip_list.enable?(@equip_list.item) Sound.play_cursor @equip_list.deactivate @item_window.activate @item_window.index = 0 elsif @item_window.active if price_to_modificate <= $game_party.gold create_item @item_window.refresh @equip_list.refresh @equip_list.index = 0 @item_window.deactivate @item_window.index = -1 @equip_list.activate @effect_window.refresh else Sound.play_buzzer @timer_note = 150 @help_window_2.set_text("#{Create_Items::NO_GOLD}") end else Sound.play_buzzer end end end def refresh_gold_window @gold_window.refresh(@equip_list.item, @item_window.item) end def price_to_modificate return @equip_list.item.modificate_price + @item_window.item.modificate_price end def create_item item2 = @equip_list.item if item2.nil? or @item_window.item.nil? Sound.play_buzzer return end a = [@equip_list.item.id, @item_window.item.id] if item2.is_a?(RPG::Weapon) and $game_party.melted_weapons.has_key?(a) created = true elsif item2.is_a?(RPG::Armor) and $game_party.melted_armors.has_key?(a) created = true else created = false end if item2.is_a?(RPG::Weapon) and not created item = item2.clone#RPG::Weapon.new item.id = $game_party.added_weapons.size + 1000 $game_party.melted_weapons[a] = item.id item.wtype_id = item2.wtype_id item.animation_id = item2.animation_id elsif item2.is_a?(RPG::Armor) and not created item = item2.clone#RPG::Armor.new item.id = $game_party.added_armors.size + 1000 $game_party.melted_armors[a] = item.id item.atype_id = item2.atype_id end if not created item.name = item2.name.clone item.price = item2.price item.etype_id = item2.etype_id item.params = item2.params.clone item.icon_index = item2.icon_index item.description = item2.description.clone item.features = item2.features.clone item.note = item2.note.clone for i in @item_window.item.effetti case i[0] when :attack item.params[2] += i[1] when :defense item.params[3] += i[1] when :m_attack item.params[4] += i[1] when :m_defense item.params[5] += i[1] when :agility item.params[6] += i[1] when :luck item.params[7] += i[1] when :elements for parameter in i[1] if parameter < 0 for attribute in item.features if attribute.code == 31 and attribute.data_id == -parameter item.features.delete(attribute) end end else possible = true for attribute in item.features if attribute.code == 31 and attribute.data_id == parameter possible = false break end end if possible item.features.push(RPG::BaseItem::Feature.new(31, parameter)) end end end when :states for parameter in i[1] if parameter[0] < 0 for attribute in item.features if attribute.code == 32 and attribute.data_id == -parameter[0] item.features.delete(attribute) end end else possible = true for attribute in item.features if attribute.code == 32 and attribute.data_id == parameter[0] and attribute.value == parameter[1] possible = false break end end if possible item.features.push(RPG::BaseItem::Feature.new(32, parameter[0], parameter[1])) end end end when :skills for parameter in i[1] if parameter < 0 for attribute in item.features if attribute.code == 43 and attribute.data_id == -parameter item.features.delete(attribute) end end else possible = true for attribute in item.features if attribute.code == 43 and attribute.data_id == parameter possible = false break end end if possible item.features.push(RPG::BaseItem::Feature.new(43, parameter)) end end end when :icon next if i[1] == "" if item.icon_changing.has_key?(i[1]) item.icon_index = item.icon_changing[i[1]] end when :name item.name += i[1] when :price item.price += i[1] end end end if created if item2.is_a?(RPG::Weapon) item = $data_weapons[$game_party.melted_weapons[a]] else item = $data_armors[$game_party.melted_armors[a]] end end $game_party.add_new_item(item) $game_party.gain_item(item, 1) $game_party.lose_item(@equip_list.item, 1) $game_party.lose_item(@item_window.item, 1) $game_party.lose_gold(price_to_modificate) @timer_note = 150 @help_window_2.set_text("#{Create_Items::TUTTO_FATTO} #{item.name}.") Sound.play_use_item end def update_helps if @timer_note > 0 @timer_note -= 1 return end if @item_window.active @help_window_2.set_text(Create_Items::PREPARAZIONE_2) end if @equip_list.active @help_window_2.set_text(Create_Items::PREPARAZIONE) end end def terminate super dispose_background end def dispose_background @background_sprite.dispose end end
Modificato da Kingartur2, 16 August 2014 - 08:09 AM.