~Site
Accueil
Forum
Admin

~Base de scripts
Scripts de base
Scripts Menu
Scripts Combat
Scripts Systθme
Scripts Modifiιs

Scripts de Base
Game_Temp
Game_System
Game_Switches
Game_Variables
Game_SelfSwitches
Game_Screen
Game_Picture
Game_Battler 1
Game_Battler 2
Game_Battler 3
Game_BattleAction
Game_Actor
Game_Enemy
Game_Actors
Game_Party
Game_Troop
Game_Map
Game_CommonEvent
Game_Character 1
Game_Character 2
Game_Character 3
Game_Event
Game_Player
Sprite_Character
Sprite_Battler
Sprite_Picture
Sprite_Timer
Spriteset_Map
Spriteset_Battle
Window_Base
Window_Selectable
Window_Command
Window_Help
Window_Gold
Window_PlayTime
Window_Steps
Window_MenuStatus
Window_Item
Window_Skill
Window_SkillStatus
Window_Target
Window_EquipLeft
Window_EquipRight
Window_EquipItem
Window_Status
Window_SaveFile
Window_ShopCommand
Window_ShopBuy
Window_ShopSell
Window_ShopNumber
Window_ShopStatus
Window_NameEdit
Window_NameInput
Window_InputNumber
Window_Message
Window_PartyCommand
Window_BattleStatus
Window_BattleResult
Window_DebugLeft
Window_DebugRight
Window_Dataset
Arrow_Base
Arrow_Enemy
Arrow_Actor
Interpreter 1
Interpreter 2
Interpreter 3
Interpreter 4
Interpreter 5
Interpreter 6
Interpreter 7
Scene_Title
Scene_Map
Scene_Menu
Scene_Item
Scene_Skill
Scene_Equip
Scene_Status
Scene_File
Scene_Save
Scene_Load
Scene_End
Scene_Battle 1
Scene_Battle 2
Scene_Battle 3
Scene_Battle 4
Scene_Shop
Scene_Name
Scene_Gameover
Scene_Debug
Main


Window_EquipItem ::: postι le 2006-02-16 @ 09:53:00
Auteur: Yukihiro matsumoto

#============================================
# ‘ Window_EquipItem
#----------------------------------------------
# @‘•”υ‰ζ–ʂŁA‘•”υ•ύX‚ΜŒσ•β‚Ζ‚Θ‚ιƒAƒCƒeƒ€‚Μˆκ——‚π•Ž¦‚·‚ιƒEƒBƒ“ƒhƒE‚Ε‚·B
#============================================

class Window_EquipItem < Window_Selectable
#------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šϊ‰»
# actor : ƒAƒNƒ^[
# equip_type : ‘•”υ•”ˆΚ (0`3)
#------------------------------------------
def initialize(actor, equip_type)
super(0, 256, 640, 224)
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
end
#------------------------------------------
# œ ƒAƒCƒeƒ€‚ΜŽζ“Ύ
#------------------------------------------
def item
return @data[self.index]
end
#------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# ‘•”υ‰Β”‚Θ•Šν‚π’Η‰Α
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
# ‘•”υ‰Β”‚Θ–h‹ο‚π’Η‰Α
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
# ‹σ”’‚π’Η‰Α
@data.push(nil)
# ƒrƒbƒgƒ}ƒbƒv‚πμ¬‚΅A‘S€–Ϊ‚π•`‰ζ
@item_max = @data.size
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-1
draw_item(i)
end
end
#------------------------------------------
# œ €–Ϊ‚Μ•`‰ζ
# index : €–ڔԍ†
#------------------------------------------
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
#------------------------------------------
# œ ƒwƒ‹ƒvƒeƒLƒXƒgXV
#------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
Design By RaZ © Watery Build 2005