Hello all new script
#1
Hello all new script
Chrono Cry
Apr 3 2005

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Im not exactly ace at scripting lol but here we go

Hey all i have made a edit of the shop system i cant say its exactly ace but certain people might be after a certain shop display so tell me what you think :D

Right first off replace all the contents of Scene_Shop with this
Code:
#==============================================================================
# â–�  Scene_Shop
#------------------------------------------------------------------------------
#  ショップ画��処� を行� クラス��。
#==============================================================================

class Scene_Shop
#--------------------------------------------------------------------------
# � メイン処�
#--------------------------------------------------------------------------
def main
   # ヘルプウィンドウを作æˆ?
   @help_window = Window_Help.new
   # コマンドウィンドウを作æˆ?
   @command_window = Window_ShopCommand.new
   # ゴールドウィンドウを作æˆ?
   @gold_window = Window_Gold.new
   @gold_window.x = 520
   @gold_window.y = 64
   @gold_window.width = 120
   # ダミーウィンドウを作æˆ?
   @playtime_window = Window_Base.new(0, 0, 0, 0)
   # 購入ウィンドウを作æˆ?
   @buy_window = Window_ShopBuy.new($game_temp.shop_goods)
   @buy_window.active = false
   @buy_window.visible = false
   @buy_window.help_window = @help_window
   # 売å?´ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆ?
   @sell_window = Window_ShopSell.new
   @sell_window.active = false
   @sell_window.visible = false
   @sell_window.help_window = @help_window
   # 個数入å� ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆ?
   @number_window = Window_ShopNumber.new
   @number_window.active = false
   @number_window.visible = false
   # スãƒ� ータスウィンドウを作æˆ?
   @status_window = Window_ShopStatus.new
   @status_window.visible = false
   # トランジション実行
   Graphics.transition
   # メインループ
   loop do
     # ゲーãƒ� ç”»é?¢ã‚’æ›´æ–°
     Graphics.update
     # å…¥å� ›æƒ…å� ±ã‚’æ›´æ–°
     Input.update
     # フレーãƒ� æ›´æ–°
     update
     # ç”»é?¢ã?Œåˆ‡ã‚� 替ã‚?ã?£ã?Ÿã‚‰ãƒ«ãƒ¼ãƒ—を中断
     if $scene != self
       break
     end
   end
   # トランジション準備
   Graphics.freeze
   # ウィンドウを解放
   @help_window.dispose
   @command_window.dispose
   @gold_window.dispose
   @playtime_window.dispose
   @buy_window.dispose
   @sell_window.dispose
   @number_window.dispose
   @status_window.dispose
end
#--------------------------------------------------------------------------
# � フレー� 更新
#--------------------------------------------------------------------------
def update
   # ウィンドウを更新
   @help_window.update
   @command_window.update
   @gold_window.update
   @playtime_window.update
   @buy_window.update
   @sell_window.update
   @number_window.update
   @status_window.update
   # コマンドウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ: update_command を呼ã?¶
   if @command_window.active
     update_command
     return
   end
   # 購入ウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ: update_buy を呼ã?¶
   if @buy_window.active
     update_buy
     return
   end
   # 売å?´ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ: update_sell を呼ã?¶
   if @sell_window.active
     update_sell
     return
   end
   # 個数入å� ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ: update_number を呼ã?¶
   if @number_window.active
     update_number
     return
   end
end
     #--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (コマンドウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
def update_command
   # B ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::B)
     # キャンセル SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.cancel_se)
     # マップ画é?¢ã?«åˆ‡ã‚� 替ã?ˆ
     $scene = Scene_Map.new
     return
   end
   # C ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::C)
     # コマンドウィンドウã?®ã‚«ãƒ¼ã‚½ãƒ«ä½?ç½®ã?§åˆ� å²?
     case @command_window.index
     when 0  # 購入ã?™ã‚‹
       # 決定 SE ã‚’æ¼”å¥?
       $game_system.se_play($data_system.decision_se)
       # ウィンドウã?®ç� ¶æ…‹ã‚’購入モードã?¸
       @command_window.active = false
       @playtime_window.visible = false
       @buy_window.active = true
       @buy_window.visible = true
       @buy_window.refresh
       @status_window.visible = true
     when 1  # 売å?´ã?™ã‚‹
       # 決定 SE ã‚’æ¼”å¥?
       $game_system.se_play($data_system.decision_se)
       # ウィンドウã?®ç� ¶æ…‹ã‚’売å?´ãƒ¢ãƒ¼ãƒ‰ã?¸
       @command_window.active = false
       @playtime_window.visible = false
       @sell_window.active = true
       @sell_window.visible = true
       @sell_window.refresh
     when 2  # ã‚„ã‚?ã‚‹
       # 決定 SE ã‚’æ¼”å¥?
       $game_system.se_play($data_system.decision_se)
       # マップ画é?¢ã?«åˆ‡ã‚� 替ã?ˆ
       $scene = Scene_Map.new
     end
     return
   end
end
#--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (購入ウィンドウã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
def update_buy
   # スãƒ� ータスウィンドウã?®ã‚¢ã‚¤ãƒ� ãƒ� を設定
   @status_window.item = @buy_window.item
   # B ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::B)
     # キャンセル SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.cancel_se)
     # ウィンドウã?®ç� ¶æ…‹ã‚’åˆ?期モードã?¸
     @command_window.active = true
     @playtime_window.visible = true
     @buy_window.active = false
     @buy_window.visible = false
     @status_window.visible = false
     @status_window.item = nil
     # ヘルプãƒ� キストを消去
     @help_window.set_text("")
     return
   end
   # C ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::C)
     # アイãƒ� ãƒ� ã‚’å?–å¾—
     @item = @buy_window.item
     # アイãƒ� ãƒ� ã?Œç„¡å� ¹ã?®å� ´å?ˆã€?ã?¾ã?Ÿã?¯ä¾¡æ� ¼ã?Œæ‰€æŒ?金よã‚� ä¸� ã?®å� ´å?ˆ
     if @item == nil or @item.price > $game_party.gold
       # ブザー SE ã‚’æ¼”å¥?
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # アイãƒ� ãƒ� ã?®æ‰€æŒ?æ•°ã‚’å?–å¾—
     case @item
     when RPG::Item
       number = $game_party.item_number(@item.id)
     when RPG::Weapon
       number = $game_party.weapon_number(@item.id)
     when RPG::Armor
       number = $game_party.armor_number(@item.id)
     end
     # ã?™ã?§ã?« 99 個所æŒ?ã?—ã?¦ã?„ã‚‹å� ´å?ˆ
     if number == 99
       # ブザー SE ã‚’æ¼”å¥?
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # 決定 SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.decision_se)
     # 最大購入å?¯èƒ½å€‹æ•°ã‚’計算
     max = @item.price == 0 ? 99 : $game_party.gold / @item.price
     max = [max, 99 - number].min
     # ウィンドウã?®ç� ¶æ…‹ã‚’個数入å� ›ãƒ¢ãƒ¼ãƒ‰ã?¸
     @buy_window.active = false
     @buy_window.visible = false
     @number_window.set(@item, max, @item.price)
     @number_window.active = true
     @number_window.visible = true
   end
end
#--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (売å?´ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
def update_sell
   # B ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::B)
     # キャンセル SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.cancel_se)
     # ウィンドウã?®ç� ¶æ…‹ã‚’åˆ?期モードã?¸
     @command_window.active = true
     @playtime_window.visible = true
     @sell_window.active = false
     @sell_window.visible = false
     @status_window.item = nil
     # ヘルプãƒ� キストを消去
     @help_window.set_text("")
     return
   end
   # C ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::C)
     # アイãƒ� ãƒ� ã‚’å?–å¾—
     @item = @sell_window.item
     # スãƒ� ータスウィンドウã?®ã‚¢ã‚¤ãƒ� ãƒ� を設定
     @status_window.item = @item
     # アイãƒ� ãƒ� ã?Œç„¡å� ¹ã?®å� ´å?ˆã€?ã?¾ã?Ÿã?¯ä¾¡æ� ¼ã?Œ 0 (売å?´ä¸?å?¯) ã?®å� ´å?ˆ
     if @item == nil or @item.price == 0
       # ブザー SE ã‚’æ¼”å¥?
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # 決定 SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.decision_se)
     # アイãƒ� ãƒ� ã?®æ‰€æŒ?æ•°ã‚’å?–å¾—
     case @item
     when RPG::Item
       number = $game_party.item_number(@item.id)
     when RPG::Weapon
       number = $game_party.weapon_number(@item.id)
     when RPG::Armor
       number = $game_party.armor_number(@item.id)
     end
     # 最大売å?´å€‹æ•° = アイãƒ� ãƒ� ã?®æ‰€æŒ?æ•°
     max = number
     # ウィンドウã?®ç� ¶æ…‹ã‚’個数入å� ›ãƒ¢ãƒ¼ãƒ‰ã?¸
     @sell_window.active = false
     @sell_window.visible = false
     @number_window.set(@item, max, @item.price / 2)
     @number_window.active = true
     @number_window.visible = true
     @status_window.visible = true
   end
end
#--------------------------------------------------------------------------
# â—? フレーãƒ� æ›´æ–° (個数入å� ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?Œã‚¢ã‚¯ãƒ� ィブã?®å� ´å?ˆ)
#--------------------------------------------------------------------------
def update_number
   # B ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::B)
     # キャンセル SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.cancel_se)
     # 個数入å� ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é?žã‚¢ã‚¯ãƒ� ィブ・ä¸?å?¯è¦–ã?«è¨­å®š
     @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 = false
     end
     return
   end
   # C ボタンã?Œæ� ¼ã?•ã‚Œã?Ÿå� ´å?ˆ
   if Input.trigger?(Input::C)
     # ショップ SE ã‚’æ¼”å¥?
     $game_system.se_play($data_system.shop_se)
     # 個数入å� ›ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é?žã‚¢ã‚¯ãƒ� ィブ・ä¸?å?¯è¦–ã?«è¨­å®š
     @number_window.active = false
     @number_window.visible = false
     # コマンドウィンドウã?®ã‚«ãƒ¼ã‚½ãƒ«ä½?ç½®ã?§åˆ� å²?
     case @command_window.index
     when 0  # 購入ã?™ã‚‹
       # 購入処ç?�
       $game_party.lose_gold(@number_window.number * @item.price)
       case @item
       when RPG::Item
         $game_party.gain_item(@item.id, @number_window.number)
       when RPG::Weapon
         $game_party.gain_weapon(@item.id, @number_window.number)
       when RPG::Armor
         $game_party.gain_armor(@item.id, @number_window.number)
       end
       # å?„ウィンドウをリフレッシã�
�¥
       @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))
       case @item
       when RPG::Item
         $game_party.lose_item(@item.id, @number_window.number)
       when RPG::Weapon
         $game_party.lose_weapon(@item.id, @number_window.number)
       when RPG::Armor
         $game_party.lose_armor(@item.id, @number_window.number)
       end
       # å?„ウィンドウをリフレッシã�
�¥
       @gold_window.refresh
       @sell_window.refresh
       @status_window.refresh
       # ウィンドウã?®ç� ¶æ…‹ã‚’売å?´ãƒ¢ãƒ¼ãƒ‰ã?¸
       @sell_window.active = true
       @sell_window.visible = true
       @status_window.visible = false
     end
     return
   end
end
end

Then replace Window_ShopCommand with
Code:
#==============================================================================
# â–�  Window_ShopCommand
#------------------------------------------------------------------------------
#  ショップ画é?¢ã?§ã€?用件をé?¸æ� žã?™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?§ã?™ã€‚
#==============================================================================

class Window_ShopCommand < Window_Selectable
#--------------------------------------------------------------------------
# � オブジェクト�期化
#--------------------------------------------------------------------------
def initialize
    $fontface = "Times New Roman"
   super(520, 128, 120, 130)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   @item_max = 3
   @row_max = 3
   @commands = ["Buy", "Sell", "Exit"]
   refresh
   self.index = 0
end
#--------------------------------------------------------------------------
# � リフレッシュ
#--------------------------------------------------------------------------
def refresh
   self.contents.clear
   for i in 0...@item_max
     draw_item(i)
   end
end
#--------------------------------------------------------------------------
# â—? é� …ç›®ã?®æ??ç”»
#     index : é� …目番å?·
#--------------------------------------------------------------------------
def draw_item(index)
      y = 4 + index * 30
   self.contents.draw_text(26, y , 128, 32, @commands[index])
end
   end


Then replace Window_ShopBuy with
Code:
#==============================================================================
# â–�  Window_ShopBuy
#------------------------------------------------------------------------------
#  ショップ画é?¢ã?§ã€?購入ã?§ã??ã‚‹å•� å“?ã?®ä¸€è¦§ã‚’表示ã?™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?§ã?™ã€‚
#==============================================================================

class Window_ShopBuy < Window_Selectable
#--------------------------------------------------------------------------
# � オブジェクト�期化
#     shop_goods : å•� å“?
#--------------------------------------------------------------------------
def initialize(shop_goods)
        $fontface = "Times New Roman"
     $fontsize = 20
   super(0, 64, 520, 254)
   @shop_goods = shop_goods
   refresh
   self.index = 0
   @column_max = 2
end
#--------------------------------------------------------------------------
# � アイ� � ��得
#--------------------------------------------------------------------------
def item
   return @data[self.index]
end
#--------------------------------------------------------------------------
# � リフレッシュ
#--------------------------------------------------------------------------
def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @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
   # é� …目数ã?Œ 0 ã?§ã?ªã?‘ã‚Œã?°ãƒ“ットマップを作æˆ?ã?—ã€?å…¨é� …目をæ??ç”»
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     self.contents.font.name = $fontface
     self.contents.font.size = $fontsize
     for i in 0...@item_max
       draw_item(i)
     end
   end
end
#--------------------------------------------------------------------------
# â—? é� …ç›®ã?®æ??ç”»
#     index : é� …目番å?·
#--------------------------------------------------------------------------
def draw_item(index)
   item = @data[index]
   # アイãƒ� ãƒ� ã?®æ‰€æŒ?æ•°ã‚’å?–å¾—
   case item
   when RPG::Item
     number = $game_party.item_number(item.id)
   when RPG::Weapon
     number = $game_party.weapon_number(item.id)
   when RPG::Armor
     number = $game_party.armor_number(item.id)
   end
   # 価æ� ¼ã?Œæ‰€æŒ?金以下ã€?ã?‹ã?¤æ‰€æŒ?æ•°ã?Œ 99 ã?§ã?ªã?‘ã‚Œã?°é€šå¸¸æ–‡å­—色ã?«ã€?
   # ã??ã?� ã?§ã?ªã?‘ã‚Œã?°ç„¡å� ¹æ–‡å­—色ã?«è¨­å®š
   if item.price <= $game_party.gold and number < 99
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   x = 4 + index % 2 * (255 + 2)
   y = index / 2 * 32
   rect = Rect.new(x, y, self.width - 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 + 25, y, 130, 32, item.name, 0)
   self.contents.draw_text(x + 120, y, 88, 32, item.price.to_s, 2)
end
#--------------------------------------------------------------------------
# � ヘルプ� キスト更新
#--------------------------------------------------------------------------
def update_help
   @help_window.set_text(self.item == nil ? "" : self.item.description)
end
end


Then replace Window_ShopSell with
Code:
#==============================================================================
# â–�  Window_ShopSell
#------------------------------------------------------------------------------
#  ショップ画���売�����所�アイ� � �一覧を表示�るウィンドウ��。
#==============================================================================

class Window_ShopSell < Window_Selectable
#--------------------------------------------------------------------------
# � オブジェクト�期化
#--------------------------------------------------------------------------
def initialize
   super(0, 64, 520, 194)
   @column_max = 2
   refresh
   self.index = 0
end
#--------------------------------------------------------------------------
# � アイ� � ��得
#--------------------------------------------------------------------------
def item
   return @data[self.index]
end
#--------------------------------------------------------------------------
# � リフレッシュ
#--------------------------------------------------------------------------
def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   for i in 1...$data_items.size
     if $game_party.item_number(i) > 0
       @data.push($data_items[i])
     end
   end
   for i in 1...$data_weapons.size
     if $game_party.weapon_number(i) > 0
       @data.push($data_weapons[i])
     end
   end
   for i in 1...$data_armors.size
     if $game_party.armor_number(i) > 0
       @data.push($data_armors[i])
     end
   end
   # é� …目数ã?Œ 0 ã?§ã?ªã?‘ã‚Œã?°ãƒ“ットマップを作æˆ?ã?—ã€?å…¨é� …目をæ??ç”»
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     self.contents.font.name = $fontface
     self.contents.font.size = $fontsize
     for i in 0...@item_max
       draw_item(i)
     end
   end
end
#--------------------------------------------------------------------------
# â—? é� …ç›®ã?®æ??ç”»
#     index : é� …目番å?·
#--------------------------------------------------------------------------
def draw_item(index)
   item = @data[index]
   case item
   when RPG::Item
     number = $game_party.item_number(item.id)
   when RPG::Weapon
     number = $game_party.weapon_number(item.id)
   when RPG::Armor
     number = $game_party.armor_number(item.id)
   end
   # 売å?´å?¯èƒ½ã?ªã‚‰é€šå¸¸æ–‡å­—色ã?«ã€?ã??ã?� ã?§ã?ªã?„ã?ªã‚‰ç„¡å� ¹æ–‡å­—色ã?«è¨­å®š
   if item.price > 0
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   x = 4 + index % 2 * (255 + 2)
   y = index / 2 * 32
   rect = Rect.new(x, y, self.width - 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 + 25, y, 130, 32, item.name, 0)
   self.contents.draw_text(x + 120, y, 88, 32, item.price.to_s, 2)
end
#--------------------------------------------------------------------------
# � ヘルプ� キスト更新
#--------------------------------------------------------------------------
def update_help
   @help_window.set_text(self.item == nil ? "" : self.item.description)
end
end


Lol this lags on

Then replace Window_ShopNumber with

Code:
#==============================================================================
# â–�  Window_ShopNumber
#------------------------------------------------------------------------------
#  ショップ画é?¢ã?§ã€?購入ã?¾ã?Ÿã?¯å£²å?´ã?™ã‚‹ã‚¢ã‚¤ãƒ� ãƒ� ã?®å€‹æ•°ã‚’å…¥å� ›ã?™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã?§ã?™ã€‚
#==============================================================================

class Window_ShopNumber < Window_Base
#--------------------------------------------------------------------------
# � オブジェクト�期化
#--------------------------------------------------------------------------
def initialize
   super(0, 64, 520, 254)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   @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
   self.contents.clear
   draw_item_name(@item, 4, 96)
   self.contents.font.color = normal_color
   self.contents.draw_text(272, 96, 32, 32, "×")
   self.contents.draw_text(308, 96, 24, 32, @number.to_s, 2)
   self.cursor_rect.set(304, 96, 32, 32)
   # å?ˆè¨ˆä¾¡æ� ¼ã?¨é€šè²¨å?˜ä½?ã‚’æ??ç”»
   domination = $data_system.words.gold
   cx = contents.text_size(domination).width
   total_price = @price * @number
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 160, 328-cx-2, 32, total_price.to_s, 2)
   self.contents.font.color = system_color
   self.contents.draw_text(332-cx, 160, cx, 32, domination, 2)
end
#--------------------------------------------------------------------------
# � フレー� 更新
#--------------------------------------------------------------------------
def update
   super
   if self.active
     # カーソルå?³ (+1)
     if Input.repeat?(Input::RIGHT) and @number < @max
       $game_system.se_play($data_system.cursor_se)
       @number += 1
       refresh
     end
     # カーソル左 (-1)
     if Input.repeat?(Input::LEFT) and @number > 1
       $game_system.se_play($data_system.cursor_se)
       @number -= 1
       refresh
     end
     # カーソルä¸�  (+98)
     if Input.repeat?(Input::UP) and @number < @max
       $game_system.se_play($data_system.cursor_se)
       @number = [@number + 98, @max].min
       refresh
     end
     # カーソル下 (-98)
     if Input.repeat?(Input::DOWN) and @number > 1
       $game_system.se_play($data_system.cursor_se)
       @number = [@number - 98, 1].max
       refresh
     end
   end
end
end

And then finally replace Window_ShopStatus with

Code:
#==============================================================================
# â–�  Window_ShopStatus
#------------------------------------------------------------------------------
#  ショップ画���アイ� � �所�数やアクター�装備を表示�るウィンドウ��。
#==============================================================================

class Window_ShopStatus < Window_Base
#--------------------------------------------------------------------------
# � オブジェクト�期化
#--------------------------------------------------------------------------
def initialize
   super(520, 258, 120, 60)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   @item = nil
   refresh
end
#--------------------------------------------------------------------------
# � リフレッシュ
#--------------------------------------------------------------------------
def refresh
   self.contents.clear
   if @item == nil
     return
   end
   case @item
   when RPG::Item
     number = $game_party.item_number(@item.id)
   when RPG::Weapon
     number = $game_party.weapon_number(@item.id)
   when RPG::Armor
     number = $game_party.armor_number(@item.id)
   end
   self.contents.font.color = system_color
   self.contents.draw_text(0, 0, 100, 32, "Owned")
   self.contents.font.color = normal_color
   self.contents.draw_text(56, 0, 32, 32, number.to_s, 2)
   if @item.is_a?(RPG::Item)
     return
   end
   # 装備å“?追å� � 情å� ±
   for i in 0...$game_party.actors.size
     # アクターをå?–å¾—
     actor = $game_party.actors[i]
     # 装備å?¯èƒ½ã?ªã‚‰é€šå¸¸æ–‡å­—色ã?«ã€?ä¸?å?¯èƒ½ã?ªã‚‰ç„¡å� ¹æ–‡å­—色ã?«è¨­å®š
     if actor.equippable?(@item)
       self.contents.font.color = normal_color
     else
       self.contents.font.color = disabled_color
     end
     # アクターã?®å??å‰?ã‚’æ??ç”»
     self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
     # ç?¾åœ¨ã?®è£…å‚™å“?ã‚’å?–å¾—
     if @item.is_a?(RPG::Weapon)
       item1 = $data_weapons[actor.weapon_id]
     elsif @item.kind == 0
       item1 = $data_armors[actor.armor1_id]
     elsif @item.kind == 1
       item1 = $data_armors[actor.armor2_id]
     elsif @item.kind == 2
       item1 = $data_armors[actor.armor3_id]
     else
       item1 = $data_armors[actor.armor4_id]
     end
     # 装備å?¯èƒ½ã?ªå� ´å?ˆ
     if actor.equippable?(@item)
       # 武器ã?®å� ´å?ˆ
       if @item.is_a?(RPG::Weapon)
         atk1 = item1 != nil ? item1.atk : 0
         atk2 = @item != nil ? @item.atk : 0
         change = atk2 - atk1
       end
       # 防具ã?®å� ´å?ˆ
       if @item.is_a?(RPG::Armor)
         pdef1 = item1 != nil ? item1.pdef : 0
         mdef1 = item1 != nil ? item1.mdef : 0
         pdef2 = @item != nil ? @item.pdef : 0
         mdef2 = @item != nil ? @item.mdef : 0
         change = pdef2 - pdef1 + mdef2 - mdef1
       end
       # パラメータã?®å¤‰åŒ–値をæ??ç”»
       self.contents.draw_text(124, 64 + 64 * i, 112, 32,
         sprintf("%+d", change), 2)
     end
     # アイãƒ� ãƒ� ã‚’æ??ç”»
     if item1 != nil
       x = 4
       y = 64 + 64 * i + 32
       bitmap = RPG::Cache.icon(item1.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, 212, 32, item1.name)
     end
   end
end
#--------------------------------------------------------------------------
# � アイ� � �設定
#     item : æ–°ã?—ã?„アイãƒ� ãƒ�
#--------------------------------------------------------------------------
def item=(item)
   if @item != item
     @item = item
     refresh
   end
end
end


And that should do it :D hope you like it farewell
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Modified Audio Encryption Script avatarmonkeykirby 0 2,671 07-28-2008, 01:00 PM
Last Post: avatarmonkeykirby
  Rotimikid's Enemy level Script ShockWave 0 2,825 08-24-2007, 01:00 PM
Last Post: ShockWave
  Script switch management GubiD 0 2,515 08-19-2007, 01:00 PM
Last Post: GubiD
  Nice game over script Moghunter 0 2,594 07-18-2007, 01:00 PM
Last Post: Moghunter
  Animated Options Script Samo the thief 0 2,580 06-18-2007, 01:00 PM
Last Post: Samo the thief
  Teleportation Script Digi 0 2,541 05-01-2007, 01:00 PM
Last Post: Digi
  Luck Script Darklord3652 0 2,549 04-10-2007, 01:00 PM
Last Post: Darklord3652
  GameOver Menu Script sasuke89 0 2,486 06-08-2006, 01:00 PM
Last Post: sasuke89
  Weapon Levelling Script GoldenShadow 0 2,481 07-05-2005, 01:00 PM
Last Post: GoldenShadow
  Ammo Script Dubealex 0 2,492 05-27-2005, 01:00 PM
Last Post: Dubealex



Users browsing this thread: 1 Guest(s)