Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

Cerca nel Forum

Showing results for tags 'Scene_Shop MOD'.



More search options

  • Search By Tags

    Tag separati da virgole.
  • Search By Author

Tipo di contenuto


Forums

  • Comunità
    • Cancello di Ingresso
    • Bacheca
    • Colisseum
  • DevTeam
    • CyberTeam
  • Giochi e Progetti RPG Maker
    • Resa Grafica
    • Concept e Bozze
    • Progetti
    • Giochi RPG Maker Completi e Demo
    • Il Making Oltreoceano
  • Assistenza e Supporto RPG Maker
    • Biblioteca
    • BrainStorming
    • Chiedi Aiuto alla Comunity
    • RPG Maker Scripting
    • PlugIn e AddOn RPG Maker
    • Musica e Suoni
    • Risorse Grafiche RPG Maker
    • Mak - Resources
  • Beyond Making - Oltre RPG Maker
    • Altri Tool

Find results in...

Find results that contain...


Data di creazione

  • Start

    End


Ultimo Aggiornamento

  • Start

    End


Filter by number of...

Iscritto

  • Start

    End


Gruppo


AIM


Indirizzo Web


ICQ


Yahoo


Skype


Location


Interests

Trovato 1 risultato

  1. Nome Script: Scene_Shop MOD Versione: 1.0 Autore/i: Melosx Informazioni: Cambia la disposizione e la visualizzazione della Scene_Shop e dele Window annesse Istruzioni: Copiate o script sopra Main e sotto Maerials come al solito. Script: #============================================================================= # Scene_Shop MOD #============================================================================= # Autore: Melosx # Versione: 1.0 # Data di creazione: 4-6-2011 => v1.0 # #============================================================================= #============================================================================== # ** Scene_Shop #============================================================================== class Scene_Shop < Scene_Base def start super create_menu_background create_command_window @help_window = Window_HelpMOD.new @gold_window = Window_GoldMOD.new(384, 0) @dummy_window = Window_Base.new(0, 56, 222, 360) @buy_window = Window_ShopBuy.new(0, 56) @buy_window.active = false @buy_window.visible = false @buy_window.help_window = @help_window @sell_window = Window_ShopSell.new(0, 56, 222, 360) @sell_window.active = false @sell_window.visible = false @sell_window.help_window = @help_window @number_window = Window_ShopNumber.new(0, 56, 999) @number_window.active = false @number_window.visible = false @status_window = Window_ShopStatus.new(322, 56, 0) @status_window.visible = true @status_window.active = true end def terminate super dispose_menu_background dispose_command_window @help_window.dispose @gold_window.dispose @dummy_window.dispose @buy_window.dispose @sell_window.dispose @number_window.dispose @status_window.dispose end def update super update_menu_background @help_window.update @command_window.update @gold_window.update @dummy_window.update @buy_window.update @sell_window.update @number_window.update @status_window.update if @command_window.active update_command_selection elsif @buy_window.active update_buy_selection elsif @sell_window.active update_sell_selection elsif @number_window.active update_number_input end end def create_command_window s1 = Vocab::ShopBuy s2 = Vocab::ShopSell s3 = Vocab::ShopCancel @command_window = Window_Command.new(100, [s1, s2, s3], 1) @command_window.x = 222 @command_window.y = 56 if $game_temp.shop_purchase_only @command_window.draw_item(1, false) end end def dispose_command_window @command_window.dispose end def update_command_selection if Input.trigger?(Input:: Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) case @command_window.index when 0 Sound.play_decision @command_window.active = false @command_window.visible = false @dummy_window.visible = false @buy_window.width = 322 @buy_window.active = true @buy_window.visible = true @buy_window.refresh @status_window.visible = true when 1 if $game_temp.shop_purchase_only Sound.play_buzzer else Sound.play_decision @command_window.active = false @command_window.visible = false @dummy_window.visible = false @status_window.visible = true @status_window.active = true @status_window.refresh @sell_window.width = 322 @sell_window.active = true @sell_window.visible = true @sell_window.refresh end when 2 Sound.play_decision $scene = Scene_Map.new end end end def update_buy_selection @status_window.item = @buy_window.item if Input.trigger?(Input:: Sound.play_cancel @command_window.active = true @command_window.visible = true @dummy_window.visible = true @buy_window.active = false @buy_window.visible = false @status_window.visible = true @status_window.item = nil @help_window.set_text("") return end if Input.trigger?(Input::C) @item = @buy_window.item number = $game_party.item_number(@item) if @item == nil or @item.price > $game_party.gold or number == 99 Sound.play_buzzer else Sound.play_decision max = @item.price == 0 ? 99 : $game_party.gold / @item.price max = [max, 99 - number].min @buy_window.active = false @buy_window.visible = true @number_window.set(@item, max, @item.price) @number_window.active = true @number_window.visible = true @status_window.z = 0 end end end def update_sell_selection if Input.trigger?(Input:: Sound.play_cancel @command_window.active = true @command_window.visible = true @dummy_window.visible = true @sell_window.active = false @sell_window.visible = false @status_window.item = nil @help_window.set_text("") elsif Input.trigger?(Input::C) @item = @sell_window.item @status_window.item = @item if @item == nil or @item.price == 0 Sound.play_buzzer else Sound.play_decision max = $game_party.item_number(@item) @sell_window.active = false @sell_window.visible = true @number_window.set(@item, max, @item.price / 2) @number_window.active = true @number_window.visible = true end end end def update_number_input if Input.trigger?(Input:: cancel_number_input elsif Input.trigger?(Input::C) decide_number_input end end def cancel_number_input Sound.play_cancel @number_window.active = false @number_window.visible = false case @command_window.index when 0 @buy_window.active = true @buy_window.visible = true when 1 @sell_window.active = true @sell_window.visible = true @status_window.visible = true @status_window.active = true end end def decide_number_input Sound.play_shop @number_window.active = false @number_window.visible = false case @command_window.index when 0 $game_party.lose_gold(@number_window.number * @item.price) $game_party.gain_item(@item, @number_window.number) @gold_window.refresh @buy_window.refresh @status_window.refresh @buy_window.active = true @buy_window.visible = true when 1 $game_party.gain_gold(@number_window.number * (@item.price / 2)) $game_party.lose_item(@item, @number_window.number) @gold_window.refresh @sell_window.refresh @status_window.refresh @sell_window.active = true @sell_window.visible = true @status_window.visible = true @status_window.active = true end end end #============================================================================== # ** Window_HelpMOD #============================================================================== class Window_HelpMOD < Window_Base def initialize super(0, 0, 384, WLH + 32) end def set_text(text, align = 0) if text != @text or align != @align self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 0, self.width - 10, WLH, text, align) @text = text @align = align end end end #============================================================================== # ** Window_GoldMOD #============================================================================== class Window_GoldMOD < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) refresh end def refresh self.contents.clear draw_currency_value($game_party.gold, 4, 0, 120) draw_icon(147, 0, 0) end end #============================================================================== # ** Window_ShopBuy #============================================================================== class Window_ShopBuy < Window_Selectable def initialize(x, y) super(x, y, 222, 360) @shop_goods = $game_temp.shop_goods refresh self.index = 0 end def item return @data[self.index] end def refresh @data = [] for goods_item in @shop_goods case goods_item[0] when 0 item = $data_items[goods_item[1]] when 1 item = $data_weapons[goods_item[1]] when 2 item = $data_armors[goods_item[1]] end if item != nil @data.push(item) end end @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end def draw_item(index) item = @data[index] number = $game_party.item_number(item) enabled = (item.price <= $game_party.gold and number < 99) rect = item_rect(index) self.contents.clear_rect(rect) draw_item_name(item, rect.x, rect.y, enabled) rect.width -= 4 self.contents.draw_text(rect, item.price, 2) draw_icon(4721, rect.x + 220, rect.y) end def update_help @help_window.set_text(item == nil ? "" : item.description) end end #============================================================================== # ** Window_ShopSell #============================================================================== class Window_ShopSell < Window_Item def initialize(x, y, width, height) super(x, y, 222, 360) @column_max = 1 end def include?(item) return item != nil end def enable?(item) return (item.price > 0) end def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) item = @data[index] if item != nil number = $game_party.item_number(item) enabled = enable?(item) rect.width -= 4 draw_item_name(item, rect.x, rect.y, enabled) self.contents.draw_text(rect, sprintf("Q.tà:%2d", number), 2) end end =begin def update_cursor if @index < 0 # カーソルなし self.cursor_rect.empty elsif @index < @item_max # 通常 self.cursor_rect.set( 0, @index * 32, 190, 32) elsif @index >= 100 # 自分 self.cursor_rect.set(0, @index * 32, 190, 32) else # 全体 self.cursor_rect.set(0, 0, 190, @item_max * 32) end end =end end #============================================================================== # ** Window_ShopStatus #============================================================================== class Window_ShopStatus < Window_Base def initialize(x, y, z) super(x, y, 222, 360) @item = nil self.contents.font.size = 16 refresh end def refresh self.contents.clear if @item != nil number = $game_party.item_number(@item) self.contents.font.color = system_color self.contents.draw_text(4, 0, 200, WLH, Vocab::Possession) self.contents.font.color = normal_color self.contents.draw_text(4, 0, 180, WLH, number, 2) for actor in $game_party.members x = 3 y = WLH * (2 + actor.index * 3) + 12 draw_actor_parameter_change(actor, x, y) end end end def draw_actor_parameter_change(actor, x, y) return if @item.is_a?(RPG::Item) enabled = actor.equippable?(@item) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 35, y - 15, 180, WLH, actor.name) draw_actor_graphic(actor, x + 15, y + 10) if @item.is_a?(RPG::Weapon) item1 = weaker_weapon(actor) elsif actor.two_swords_style and @item.kind == 0 item1 = nil else item1 = actor.equips[1 + @item.kind] end if enabled if @item.is_a?(RPG::Weapon) atk1 = item1 == nil ? 0 : item1.atk atk2 = @item == nil ? 0 : @item.atk change = atk2 - atk1 self.contents.draw_text(x, y, 150, WLH, "Attacco", 2) else def1 = item1 == nil ? 0 : item1.def def2 = @item == nil ? 0 : @item.def change = def2 - def1 self.contents.draw_text(x, y, 150, WLH, "Difesa", 2) end end self.contents.font.color = text_color(0) if change.to_i < -1 self.contents.font.color = text_color(10) self.contents.draw_text(x, y, 180, WLH, sprintf("%+d", change), 2) else change.to_i > 1 self.contents.font.color = text_color(11) self.contents.draw_text(x, y, 180, WLH, sprintf("%+d", change), 2) end if enabled == false self.contents.font.color = text_color(10) self.contents.draw_text(x, y, 150, WLH, "Non Equip.", 2) end draw_item_name(item1, x, y + WLH - 6, enabled) end def weaker_weapon(actor) if actor.two_swords_style weapon1 = actor.weapons[0] weapon2 = actor.weapons[1] if weapon1 == nil or weapon2 == nil return nil elsif weapon1.atk < weapon2.atk return weapon1 else return weapon2 end else return actor.weapons[0] end end def item=(item) if @item != item @item = item refresh end end end #============================================================================== # ** Window_ShopNumber #============================================================================== class Window_ShopNumber < Window_Base def initialize(x, y, z) super(152, 118, 240, 180) @item = nil @max = 1 @price = 0 @number = 1 end def set(item, max, price) @item = item @max = max @price = price @number = 1 refresh end def number return @number end def refresh y = 40 self.contents.clear draw_item_name(@item, 0, 10) self.contents.font.color = normal_color self.contents.draw_text(150, y, 20, WLH, "x") self.contents.draw_text(160, y, 20, WLH, @number, 2) self.cursor_rect.set(0, y, 208, WLH) draw_currency_value(@price * @number, 4, y + WLH * 2, 190)#210 self.contents.draw_text(0, y + WLH * 2, 70, WLH, "Prezzo:", 0) draw_icon(147, 80, y + WLH * 2) end def update super if self.active last_number = @number if Input.repeat?(Input::RIGHT) and @number < @max @number = [@number + 10, @max].min end if Input.repeat?(Input::LEFT) and @number > 1 @number = [@number - 10, 1].max end if Input.repeat?(Input::UP) and @number < @max @number += 1 end if Input.repeat?(Input::DOWN) and @number > 1 @number -= 1 end if @number != last_number Sound.play_cursor refresh end end end end Demo: N/D
×