Zarok RPG Maker
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.



 
AccueilDernières imagesS'enregistrerConnexion
-17%
Le deal à ne pas rater :
(Black Friday) Apple watch Apple SE GPS + Cellular 44mm (plusieurs ...
249 € 299 €
Voir le deal

Partagez | 
 

 Un très beau script de menu! RPG maker xp

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
ferrox
Molécule
Molécule
ferrox


Messages : 74
Loisirs : JEUX VIDEO, DORMIR, FRITES, RPG
Date d'inscription : 24/07/2010

Caractéristiques du membre
Evolution: Atome
Job: Making
XP:
Un très beau script de menu! RPG maker xp Left_bar_bleue20/20Un très beau script de menu! RPG maker xp Empty_bar_bleue  (20/20)

Un très beau script de menu! RPG maker xp Empty
MessageSujet: Un très beau script de menu! RPG maker xp   Un très beau script de menu! RPG maker xp EmptyMar 27 Juil 2010 - 15:23

Bonjour, je suis ferrox et je poste mon premier script.

Ce script viens tout fraichement d'un site japonais:(heureusement que google traduction existe Wink )

Voici le lien, mais je suis pas sur que sa va servir Wink
http://members.jcom.home.ne.jp/cogwheel/script/menu.html

Après un parcours de combattant j'ai réussi à traduire le script, je ne connais pas le nom de l'auteur (essayez d'écrire en jap. avec rpg maker et vous comprendrez), ca doit être un truc en japonais, vous n'êtes pas obligés mais j'apprécierais que vous me mettez dans les crédits.

Alors voici un screnn: ( ne vous inquiétez pas maintenant c'est en français)

Un très beau script de menu! RPG maker xp Menu

Et voici le script ( à mettre au dessus de main, donnez lui le nom que vous voulez. Exclamation script en deux partie

[code:1:548f]#@ƒƒjƒ…[‰ü‘¢ƒXƒNƒŠƒvƒg Ver 1.03
# ”z•zŒ³EƒTƒ|[ƒgURL traduit par ferrox
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ¡ Game_Actor
#------------------------------------------------------------------------------
# @ƒAƒNƒ^[‚ðˆµ‚¤ƒNƒ‰ƒX‚Å‚·B‚±‚̃Nƒ‰ƒX‚Í Game_Actors ƒNƒ‰ƒX ($game_actors)
# ‚Ì“à•”‚ÅŽg—p‚³‚êAGame_Party ƒNƒ‰ƒX ($game_party) ‚©️‚ç‚àŽQÆ‚³‚ê‚Ü‚·B
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹‰æ–Ê X À•W‚̎擾
#--------------------------------------------------------------------------
alias :screen_x_original :screen_x
def screen_x
# ƒp[ƒeƒB“à‚Ì•À‚я‡‚©️‚ç X À•W‚ðŒvŽZ‚µ‚Ä•Ô‚·
if $game_temp.in_battle
return screen_x_original
else
if self.index != nil
return (self.index / 2 + 1) * 128 + (self.index % 2) * 264
else
return 0
end
end
end
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹‰æ–Ê Y À•W‚̎擾
#--------------------------------------------------------------------------
alias :screen_y_original :screen_y
def screen_y
if $game_temp.in_battle
return screen_y_original
else
return 360 +(self.index / 2) * 104
end
end
end

#==============================================================================
# ¡ Window_Help
#------------------------------------------------------------------------------
# @ƒXƒLƒ‹‚âƒAƒCƒeƒ€‚Ìà–¾AƒAƒNƒ^[‚̃Xƒe[ƒ^ƒX‚È‚Ç‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_Help2 < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(20, 42, 600, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 6110
self.back_opacity = 192
end
#--------------------------------------------------------------------------
# œ ƒeƒLƒXƒgÝ’è
# text : ƒEƒBƒ“ƒhƒE‚É•\Ž¦‚·‚镶Žš—ñ
# align : ƒAƒ‰ƒCƒ“ƒƒ“ƒg (0..¶‘µ‚¦A1..’†‰›‘µ‚¦A2..‰E‘µ‚¦)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
# ƒeƒLƒXƒg‚ƃAƒ‰ƒCƒ“ƒƒ“ƒg‚̏­‚È‚­‚Æ‚àˆê•û‚ª‘O‰ñ‚ƈá‚Á‚Ä‚¢‚éê‡
if text != @text or align != @align
# ƒeƒLƒXƒg‚ðÄ•`‰æ
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# œ ƒAƒNƒ^[Ý’è
# actor : ƒXƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒAƒNƒ^[
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 0, 0)
draw_actor_state(actor, 144, 0, 100)
draw_actor_hp(@actor, 256, 0)
draw_actor_sp(@actor, 424, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# œ ƒGƒlƒ~[Ý’è
# enemy : –¼‘O‚ƃXƒe[ƒg‚ð•\Ž¦‚·‚éƒGƒlƒ~[
#--------------------------------------------------------------------------
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
end

#==============================================================================
# ¡ Window_Base
#------------------------------------------------------------------------------
# @ƒQ[ƒ€’†‚Ì‚·‚ׂẴEƒBƒ“ƒhƒE‚̃X[ƒp[ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# œ –¼‘O‚Ì•`‰æ
# actor : ƒAƒNƒ^[
# x : •`‰ææ X À•W
# y : •`‰ææ Y À•W
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#--------------------------------------------------------------------------
# œ ƒNƒ‰ƒX‚Ì•`‰æ
# actor : ƒAƒNƒ^[
# x : •`‰ææ X À•W
# y : •`‰ææ Y À•W
#--------------------------------------------------------------------------
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.class_name)
end
#--------------------------------------------------------------------------
# œ ƒOƒ‰ƒtƒBƒbƒN‚Ì•`‰æ
# actor : ƒAƒNƒ^[
# x : •`‰ææ X À•W
# y : •`‰ææ Y À•W
#--------------------------------------------------------------------------
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width / 2
ch = bitmap.height
self.contents.blt(x - cw, y - ch, bitmap, bitmap.rect, 208)
end
#--------------------------------------------------------------------------
# œ ƒAƒCƒeƒ€–¼‚Ì•`‰æ
# item : ƒAƒCƒeƒ€
# x : •`‰ææ X À•W
# y : •`‰ææ Y À•W
#--------------------------------------------------------------------------
def draw_item_name(item, x, y, width = 240)
if item == nil
return
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, width - 28, 32, item.name)
end
end

#==============================================================================
# ¡ Window_Command2
#------------------------------------------------------------------------------
# @ˆê”Ê“I‚ȃRƒ}ƒ“ƒh‘I‘ð‚ðs‚¤ƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_MenuCommand < Window_Selectable
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# width : ƒEƒBƒ“ƒhƒE‚Ì•
# commands : ƒRƒ}ƒ“ƒh•¶Žš—ñ‚Ì”z—ñ
#--------------------------------------------------------------------------
def initialize(width, commands)
# ƒRƒ}ƒ“ƒh‚̌”‚©️‚çƒEƒBƒ“ƒhƒE‚̍‚‚³‚ðŽZo
super(0, 0, width, 160)
@item_max = commands.size
@commands = commands
@column_max = 2
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((index % 2) * 128, 32 * (index / 2), 128, 32)
end
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì•`‰æ
# index : €–ڔԍ†
# color : •¶ŽšF
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4 + (index % 2) * 128, 32 * (index / 2), 128, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì–³Œø‰»
# index : €–ڔԍ†
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end

#==============================================================================
# ¡ Window_MenuStatus
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂŃp[ƒeƒBƒƒ“ƒo[‚̃Xƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :out_window # Œ»ƒEƒBƒ“ƒhƒE
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(40, 0, 560, 480)
self.z = 6100
self.opacity = 0
self.back_opacity = 0
@out_window = Window_Base.new(40, 220, 560, 240)
@out_window.z = 6100
@out_window.back_opacity = 192
@column_max = 2
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
@out_window.dispose
super
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = (i % 2) * 264
y = (i / 2) * 104 + 220
actor = $game_party.actors[i]
draw_actor_battler(actor, x + (2 - i / 2) * 88, y + 104)
draw_actor_name(actor, x + 12, y)
draw_actor_class(actor, x + 132, y)
draw_actor_level(actor, x + 12, y + 24)
draw_actor_state(actor, x + 12, y + 48, 100)
draw_actor_exp(actor, x + 30, y + 72)
draw_actor_hp(actor, x + 108, y + 24)
draw_actor_sp(actor, x + 108, y + 48)
end
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
if @index == -2
self.cursor_rect.set(0, 220, 528, 208)
elsif @index < -2
self.cursor_rect.set(((@index + 10) % 2) * 264,
((@index + 10) / 2) * 104 + 220, 264, 104)
else
self.cursor_rect.empty
end
else
self.cursor_rect.set((@index % 2) * 264, (@index / 2) * 104 + 220,
264, 104)
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
@out_window.update
super
end
end

#==============================================================================
# ¡ Scene_Menu
#------------------------------------------------------------------------------
# @ƒƒjƒ…[‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Menu
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :menu # Œ»ƒEƒBƒ“ƒhƒE
attr_accessor :command_window # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE
attr_accessor :status_window # ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# menu_index : ƒRƒ}ƒ“ƒh‚̃J[ƒ\ƒ‹‰ŠúˆÊ’u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# œ ƒƒCƒ“ˆ—
#--------------------------------------------------------------------------
def main
# ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðì¬
@spriteset = Spriteset_Map.new
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Statut"
s5 = "Sauvegarder"
s6 = "Charger"
s7 = "Quitter"
@command_window = Window_MenuCommand.new(288, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.x = 40
@command_window.y = 20
@command_window.z = 6100
@command_window.back_opacity = 192
# ƒp[ƒeƒBl”‚ª 0 l‚̏ꍇ
if $game_party.actors.size == 0
# ƒAƒCƒeƒ€AƒXƒLƒ‹A‘•”õAƒXƒe[ƒ^ƒX‚𖳌ø‰»
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
# ƒZ[ƒu‹ÖŽ~‚̏ꍇ
if $game_system.save_disabled
# ƒZ[ƒu‚𖳌ø‚É‚·‚é
@command_window.disable_item(4)
end
# ƒS[ƒ‹ƒhƒEƒBƒ“ƒhƒE‚ðì¬
@gold_window = Window_Gold.new
@gold_window.x = 440
@gold_window.y = 20
@gold_window.z = 6100
@gold_window.back_opacity = 192
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬
@status_window = Window_MenuStatus.new
@menu = nil
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
Graphics.transition
# ƒƒCƒ“ƒ‹[ƒv
loop do
# ƒQ[ƒ€‰æ–Ê‚ðXV
Graphics.update
# “ü—͏î•ñ‚ðXV
Input.update
# ƒtƒŒ[ƒ€XV
update
if @menu != nil
@menu.update
end
# ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
if $scene != self
break
end
end
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
Graphics.freeze
# ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ð‰ð•ú
@spriteset.dispose
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# ƒEƒBƒ“ƒhƒE‚ðXV
@command_window.update
@gold_window.update
@status_window.update
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_command ‚ðŒÄ‚Ô
if @command_window.active and @menu == nil
update_command
return
end
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_status ‚ðŒÄ‚Ô
if @status_window.active and @menu == nil
update_status
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
#--------------------------------------------------------------------------
def update_command
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
$scene = Scene_Map.new
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒp[ƒeƒBl”‚ª 0 l‚ŁAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚̏ꍇ
if $game_party.actors.size == 0 and @command_window.index < 4
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @command_window.index
when 0 # ƒAƒCƒeƒ€
Input.update
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒAƒCƒeƒ€‰æ–ʂɐ؂è‘Ö‚¦
@menu = Scene_Item.new
when 1 # ƒXƒLƒ‹
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # ‘•”õ
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3 # ƒXƒe[ƒ^ƒX
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4 # ƒZ[ƒu
# ƒZ[ƒu‹ÖŽ~‚̏ꍇ
if $game_system.save_disabled
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
Input.update
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒZ[ƒu‰æ–ʂɐ؂è‘Ö‚¦
@menu = Scene_Save.new
when 5 # ƒ[ƒh
Input.update
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒZ[ƒu‰æ–ʂɐ؂è‘Ö‚¦
@menu = Scene_Load.new
when 6 # ƒQ[ƒ€I—¹
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒQ[ƒ€I—¹‰æ–ʂɐ؂è‘Ö‚¦
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
#--------------------------------------------------------------------------
def update_status
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @command_window.index
when 1 # ƒXƒLƒ‹
# ‚±‚̃AƒNƒ^[‚̍s“®️§ŒÀ‚ª 2 ˆÈã‚̏ꍇ
if $game_party.actors[@status_window.index].restriction >= 2
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
Input.update
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒLƒ‹‰æ–ʂɐ؂è‘Ö‚¦
@menu = Scene_Skill.new(@status_window.index)
when 2 # ‘•”õ
Input.update
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ‘•”õ‰æ–ʂɐ؂è‘Ö‚¦
@menu = Scene_Equip.new(@status_window.index)
when 3 # ƒXƒe[ƒ^ƒX
Input.update
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒXƒe[ƒ^ƒX‰æ–ʂɐ؂è‘Ö‚¦
@menu = Scene_Status.new(@status_window.index)
end
return
end
end
end

#==============================================================================
# ¡ Window_Item
#------------------------------------------------------------------------------
# @ƒAƒCƒeƒ€‰æ–ʁAƒoƒgƒ‹‰æ–ʂŁAŠŽƒAƒCƒeƒ€‚̈ꗗ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
super(20, 106, 600, 320)
self.index = 0
self.back_opacity = 192
@column_max = 2
# í“¬’†‚̏ꍇ‚̓EƒBƒ“ƒhƒE‚ð‰æ–Ê’†‰›‚ÖˆÚ“®️‚µA”¼“§–¾‚É‚·‚é
if $game_temp.in_battle
self.x = 0
self.y = 64
self.width = 640
self.height = 256
else
self.z = 6110
end
refresh
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.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
if $game_temp.in_battle
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 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, 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)
else
x = 4 + index % 2 * 284
y = index / 2 * 32
rect = Rect.new(x, y, 280, 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, 208, 32, item.name, 0)
self.contents.draw_text(x + 236, y, 16, 32, ":", 1)
self.contents.draw_text(x + 252, y, 24, 32, number.to_s, 2)
end
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if $game_temp.in_battle
super
else
# Œ»Ý‚̍s‚ðŽæ“¾
row = @index / @column_max
# Œ»Ý‚̍s‚ªA•\Ž¦‚³‚ê‚Ä‚¢‚éæ“ª‚̍s‚æ‚è‘O‚̏ꍇ
if row < self.top_row
# Œ»Ý‚̍s‚ªæ“ª‚É‚È‚é‚悤‚ɃXƒNƒ[ƒ‹
self.top_row = row
end
# Œ»Ý‚̍s‚ªA•\Ž¦‚³‚ê‚Ä‚¢‚éÅŒã”ö‚̍s‚æ‚èŒã‚ë‚̏ꍇ
if row > self.top_row + (self.page_row_max - 1)
# Œ»Ý‚̍s‚ªÅŒã”ö‚É‚È‚é‚悤‚ɃXƒNƒ[ƒ‹
self.top_row = row - (self.page_row_max - 1)
end
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((index % 2) * 284,
@index / @column_max * 32 - self.oy, 284, 32)
end
end
end
end

#==============================================================================
# ¡ Scene_Item
#------------------------------------------------------------------------------
# @ƒAƒCƒeƒ€‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Item
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒEAƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ðì¬
@help_window = Window_Help2.new
@item_window = Window_Item.new
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ðŠÖ˜A•t‚¯
@item_window.help_window = @help_window
$scene.command_window.active = false
end
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@help_window.dispose
@item_window.dispose
$scene.menu = nil
$scene.command_window.active = true
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# ƒEƒBƒ“ƒhƒE‚ðXV
@help_window.update
@item_window.update
# ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_item ‚ðŒÄ‚Ô
if @item_window.active
update_item
return
end
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_target ‚ðŒÄ‚Ô
if $scene.status_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
#--------------------------------------------------------------------------
def update_item
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
dispose
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ÅŒ»Ý‘I‘ð‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚ðŽæ“¾
@item = @item_window.item
# Žg—pƒAƒCƒeƒ€‚Å‚Í‚È‚¢ê‡
unless @item.is_a?(RPG::Item)
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Žg—p‚Å‚«‚È‚¢ê‡
unless $game_party.item_can_use?(@item.id)
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# Œø‰Ê”͈͂ª–¡•û‚̏ꍇ
if @item.scope >= 3
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‰»
@item_window.active = false
$scene.status_window.z = 6120
$scene.status_window.out_window.z = 6120
$scene.status_window.active = true
# Œø‰Ê”ÍˆÍ (’P‘Ì/‘S‘Ì) ‚ɉž‚¶‚ăJ[ƒ\ƒ‹ˆÊ’u‚ðÝ’è
if @item.scope == 4 || @item.scope == 6
$scene.status_window.index = -2
else
$scene.status_window.index = 0
end
# Œø‰Ê”͈͂ª–¡•ûˆÈŠO‚̏ꍇ
else
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒg ID ‚ª—LŒø‚̏ꍇ
if @item.common_event_id > 0
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒgŒÄ‚яo‚µ—\–ñ
$game_temp.common_event_id = @item.common_event_id
# ƒAƒCƒeƒ€‚ÌŽg—pŽž SE ‚ð‰‰‘t
$game_system.se_play(@item.menu_se)
# Á–Õ•i‚̏ꍇ
if @item.consumable
# Žg—p‚µ‚½ƒAƒCƒeƒ€‚ð 1 Œ¸‚ç‚·
$game_party.lose_item(@item.id, 1)
# ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚̍€–Ú‚ðÄ•`‰æ
@item_window.draw_item(@item_window.index)
end
# ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
dispose
$scene = Scene_Map.new
return
end
end
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
#--------------------------------------------------------------------------
def update_target
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒAƒCƒeƒ€Ø‚ê‚È‚Ç‚ÅŽg—p‚Å‚«‚È‚­‚È‚Á‚½ê‡
unless $game_party.item_can_use?(@item.id)
# ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚Ì“à—e‚ðÄì¬
@item_window.refresh
end
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ðÁ‹Ž
@item_window.active = true
$scene.status_window.index = -1
$scene.status_window.z = 6100
$scene.status_window.out_window.z = 6100
$scene.status_window.active = false
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒAƒCƒeƒ€‚ðŽg‚¢Ø‚Á‚½ê‡
if $game_party.item_number(@item.id) == 0
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# ƒ^[ƒQƒbƒg‚ª‘S‘̂̏ꍇ
if $scene.status_window.index < 0
# ƒp[ƒeƒB‘S‘̂ɃAƒCƒeƒ€‚ÌŽg—pŒø‰Ê‚ð“K—p
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
# ƒ^[ƒQƒbƒg‚ª’P‘̂̏ꍇ
if $scene.status_window.index >= 0
# ƒ^[ƒQƒbƒg‚̃AƒNƒ^[‚ɃAƒCƒeƒ€‚ÌŽg—pŒø‰Ê‚ð“K—p
target = $game_party.actors[$scene.status_window.index]
used = target.item_effect(@item)
end
# ƒAƒCƒeƒ€‚ðŽg‚Á‚½ê‡
if used
# ƒAƒCƒeƒ€‚ÌŽg—pŽž SE ‚ð‰‰‘t
$game_system.se_play(@item.menu_se)
# Á–Õ•i‚̏ꍇ
if @item.consumable
# Žg—p‚µ‚½ƒAƒCƒeƒ€‚ð 1 Œ¸‚ç‚·
$game_party.lose_item(@item.id, 1)
# ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚̍€–Ú‚ðÄ•`‰æ
@item_window.draw_item(@item_window.index)
end
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚Ì“à—e‚ðÄì¬
$scene.status_window.refresh
# ‘S–ł̏ꍇ
if $game_party.all_dead?
# ƒQ[ƒ€ƒI[ƒo[‰æ–ʂɐ؂è‘Ö‚¦
dispose
$scene = Scene_Gameover.new
return
end
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒg ID ‚ª—LŒø‚̏ꍇ
if @item.common_event_id > 0
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒgŒÄ‚яo‚µ—\–ñ
$game_temp.common_event_id = @item.common_event_id
# ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
dispose
$scene = Scene_Map.new
return
end
end
# ƒAƒCƒeƒ€‚ðŽg‚í‚È‚©️‚Á‚½ê‡
unless used
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end

#==============================================================================
# ¡ Window_SkillStatus
#------------------------------------------------------------------------------
# @ƒXƒLƒ‹‰æ–ʂŁAƒXƒLƒ‹Žg—pŽÒ‚̃Xƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_SkillStatus < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor : ƒAƒNƒ^[
#--------------------------------------------------------------------------
def initialize(actor)
super(20, 106, 600, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 6110
self.back_opacity = 192
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_state(@actor, 148, 0, 100)
draw_actor_hp(@actor, 260, 0)
draw_actor_sp(@actor, 420, 0)
end
end

#==============================================================================
# ¡ Window_Skill
#------------------------------------------------------------------------------
# @ƒXƒLƒ‹‰æ–ʁAƒoƒgƒ‹‰æ–ʂŁAŽg—p‚Å‚«‚éƒXƒLƒ‹‚̈ꗗ‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor : ƒAƒNƒ^[
#--------------------------------------------------------------------------
def initialize(actor)
super(20, 170, 600, 256)
self.back_opacity = 192
self.index = 0
@actor = actor
@column_max = 2
# í“¬’†‚̏ꍇ‚̓EƒBƒ“ƒhƒE‚ð‰æ–Ê’†‰›‚ÖˆÚ“®️‚µA”¼“§–¾‚É‚·‚é
if $game_temp.in_battle
self.x = 0
self.y = 64
self.width = 640
self.height = 256
else
self.z = 6110
end
refresh
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì•`‰æ
# index : €–ڔԍ†
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
if $game_temp.in_battle
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 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(skill.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, skill.name, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
x = 4 + index % 2 * 284
y = index / 2 * 32
rect = Rect.new(x, y, 280, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.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, 200, 32, skill.name, 0)
self.contents.draw_text(x + 228, y, 48, 32, skill.sp_cost.to_s, 2)
end
end
#--------------------------------------------------------------------------
# œ ƒwƒ‹ƒvƒeƒLƒXƒgXV
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#--------------------------------------------------------------------------
def update_cursor_rect
if $game_temp.in_battle
super
else
# Œ»Ý‚̍s‚ðŽæ“¾
row = @index / @column_max
# Œ»Ý‚̍s‚ªA•\Ž¦‚³‚ê‚Ä‚¢‚éæ“ª‚̍s‚æ‚è‘O‚̏ꍇ
if row < self.top_row
# Œ»Ý‚̍s‚ªæ“ª‚É‚È‚é‚悤‚ɃXƒNƒ[ƒ‹
self.top_row = row
end
# Œ»Ý‚̍s‚ªA•\Ž¦‚³‚ê‚Ä‚¢‚éÅŒã”ö‚̍s‚æ‚èŒã‚ë‚̏ꍇ
if row > self.top_row + (self.page_row_max - 1)
# Œ»Ý‚̍s‚ªÅŒã”ö‚É‚È‚é‚悤‚ɃXƒNƒ[ƒ‹
self.top_row = row - (self.page_row_max - 1)
end
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set((index % 2) * 284,
@index / @column_max * 32 - self.oy, 284, 32)
end
end
end
end

#==============================================================================
# ¡ Scene_Skill
#------------------------------------------------------------------------------
# @ƒXƒLƒ‹‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Skill
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor_index : ƒAƒNƒ^[ƒCƒ“ƒfƒbƒNƒX
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
# ƒAƒNƒ^[‚ðŽæ“¾
@actor = $game_party.actors[@actor_index]
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒEAƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒEAƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ðì¬
@help_window = Window_Help2.new
@status_window = Window_SkillStatus.new(@actor)
@skill_window = Window_Skill.new(@actor)
@skill_window.z = 6110
@skill_window.back_opacity = 160
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ðŠÖ˜A•t‚¯
@skill_window.help_window = @help_window
$scene.command_window.active = false
$scene.status_window.active = false
end
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@help_window.dispose
@status_window.dispose
@skill_window.dispose
$scene.menu = nil
$scene.status_window.index = -1
$scene.command_window.active = true
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# ƒEƒBƒ“ƒhƒE‚ðXV
@help_window.update
@status_window.update
@skill_window.update
# ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_skill ‚ðŒÄ‚Ô
if @skill_window.active
update_skill
return
end
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_target ‚ðŒÄ‚Ô
if $scene.status_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
#--------------------------------------------------------------------------
def update_skill
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒƒjƒ…[‰æ–ʂɐ؂è‘Ö‚¦
dispose
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒXƒLƒ‹ƒEƒBƒ“ƒhƒE‚ÅŒ»Ý‘I‘ð‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚ðŽæ“¾
@skill = @skill_window.skill
# Žg—p‚Å‚«‚È‚¢ê‡
if @skill == nil or not @actor.skill_can_use?(@skill.id)
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# Œø‰Ê”͈͂ª–¡•û‚̏ꍇ
if @skill.scope >= 3
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‰»
@skill_window.active = false
$scene.status_window.z = 6120
$scene.status_window.out_window.z = 6120
$scene.status_window.active = true
# Œø‰Ê”ÍˆÍ (’P‘Ì/‘S‘Ì) ‚ɉž‚¶‚ăJ[ƒ\ƒ‹ˆÊ’u‚ðÝ’è
if @skill.scope == 4 || @skill.scope == 6
$scene.status_window.index = -2
elsif @skill.scope == 7
$scene.status_window.index = @actor_index - 10
else
$scene.status_window.index = 0
end
# Œø‰Ê”͈͂ª–¡•ûˆÈŠO‚̏ꍇ
else
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒg ID ‚ª—LŒø‚̏ꍇ
if @skill.common_event_id > 0
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒgŒÄ‚яo‚µ—\–ñ
$game_temp.common_event_id = @skill.common_event_id
# ƒXƒLƒ‹‚ÌŽg—pŽž SE ‚ð‰‰‘t
$game_system.se_play(@skill.menu_se)
# SP Á”ï
@actor.sp -= @skill.sp_cost
# ŠeƒEƒBƒ“ƒhƒE‚Ì“à—e‚ðÄì¬
@status_window.refresh
@skill_window.refresh
$scene.status_window.refresh
# ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
dispose
$scene = Scene_Map.new
return
end
end
return
end
# R ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::R)
# ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cursor_se)
# ŽŸ‚̃AƒNƒ^[‚Ö
@actor_index += 1
@actor_index %= $game_party.actors.size
@actor = $game_party.actors[@actor_index]
dispose
$scene.status_window.index = @actor.index
$scene.menu = Scene_Skill.new(@actor.index)
return
end
# L ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::L)
# ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cursor_se)
# ‘O‚̃AƒNƒ^[‚Ö
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
@actor = $game_party.actors[@actor_index]
dispose
$scene.status_window.index = @actor.index
$scene.menu = Scene_Skill.new(@actor.index)
return
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
#--------------------------------------------------------------------------
def update_target
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒ^[ƒQƒbƒgƒEƒBƒ“ƒhƒE‚ðÁ‹Ž
@skill_window.active = true
$scene.status_window.index = @actor.index
$scene.status_window.z = 6100
$scene.status_window.out_window.z = 6100
$scene.status_window.active = false
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# SP Ø‚ê‚È‚Ç‚ÅŽg—p‚Å‚«‚È‚­‚È‚Á‚½ê‡
unless @actor.skill_can_use?(@skill.id)
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# ƒ^[ƒQƒbƒg‚ª‘S‘̂̏ꍇ
if $scene.status_window.index == -2
# ƒp[ƒeƒB‘S‘̂ɃXƒLƒ‹‚ÌŽg—pŒø‰Ê‚ð“K—p
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
# ƒ^[ƒQƒbƒg‚ªŽg—pŽÒ‚̏ꍇ
if $scene.status_window.index < -2
# ƒ^[ƒQƒbƒg‚̃AƒNƒ^[‚ɃXƒLƒ‹‚ÌŽg—pŒø‰Ê‚ð“K—p
target = $game_party.actors[$scene.status_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
# ƒ^[ƒQƒbƒg‚ª’P‘̂̏ꍇ
if $scene.status_window.index >= 0
# ƒ^[ƒQƒbƒg‚̃AƒNƒ^[‚ɃXƒLƒ‹‚ÌŽg—pŒø‰Ê‚ð“K—p
target = $game_party.actors[$scene.status_window.index]
used = target.skill_effect(@actor, @skill)
end
# ƒXƒLƒ‹‚ðŽg‚Á‚½ê‡
if used
# ƒXƒLƒ‹‚ÌŽg—pŽž SE ‚ð‰‰‘t
$game_system.se_play(@skill.menu_se)
# SP Á”ï
@actor.sp -= @skill.sp_cost
# ŠeƒEƒBƒ“ƒhƒE‚Ì“à—e‚ðÄì¬
@status_window.refresh
@skill_window.refresh
$scene.status_window.refresh
# ‘S–ł̏ꍇ
if $game_party.all_dead?
# ƒQ[ƒ€ƒI[ƒo[‰æ–ʂɐ؂è‘Ö‚¦
$scene = Scene_Gameover.new
return
end
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒg ID ‚ª—LŒø‚̏ꍇ
if @skill.common_event_id > 0
# ƒRƒ‚ƒ“ƒCƒxƒ“ƒgŒÄ‚яo‚µ—\–ñ
$game_temp.common_event_id = @skill.common_event_id
# ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
dispose
$scene = Scene_Map.new
return
end
end
# ƒXƒLƒ‹‚ðŽg‚í‚È‚©️‚Á‚½ê‡
unless used
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end

#==============================================================================
# ¡ Window_Status
#------------------------------------------------------------------------------
# @ƒXƒe[ƒ^ƒX‰æ–Ê‚Å•\Ž¦‚·‚éAƒtƒ‹Žd—l‚̃Xƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_Status < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor : ƒAƒNƒ^[
#--------------------------------------------------------------------------
def initialize(actor)
super(20, 40, 600, 400)
self.z = 6110
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 192
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 44, 96)
draw_actor_battler(@actor, 426, 368)
draw_actor_name(@actor, 24, 0)
draw_actor_class(@actor, 24 + 144, 0)
draw_actor_level(@actor, 320, 16)
draw_actor_state(@actor, 320, 48)
draw_actor_hp(@actor, 68, 32, 172)
draw_actor_sp(@actor, 68, 64, 172)
draw_actor_parameter(@actor, 68, 112, 0)
draw_actor_parameter(@actor, 68, 144, 1)
draw_actor_parameter(@actor, 68, 176, 2)
draw_actor_parameter(@actor, 68, 224, 3)
draw_actor_parameter(@actor, 68, 256, 4)
draw_actor_parameter(@actor, 68, 288, 5)
draw_actor_parameter(@actor, 68, 320, 6)
self.contents.font.color = system_color
self.contents.draw_text(304, 96, 80, 32, "EXP")
self.contents.draw_text(304, 128, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(304 + 80, 96, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(304 + 80, 128, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(304, 176, 96, 32, "‘•”õ")
draw_item_name($data_weapons[@actor.weapon_id], 304 + 16, 208)
draw_item_name($data_armors[@actor.armor1_id], 304 + 16, 240)
draw_item_name($data_armors[@actor.armor2_id], 304 + 16, 272)
draw_item_name($data_armors[@actor.armor3_id], 304 + 16, 304)
draw_item_name($data_armors[@actor.armor4_id], 304 + 16, 336)
end
end

#==============================================================================
# ¡ Scene_Status
#------------------------------------------------------------------------------
# @ƒXƒe[ƒ^ƒX‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Status
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor_index : ƒAƒNƒ^[ƒCƒ“ƒfƒbƒNƒX
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
# ƒAƒNƒ^[‚ðŽæ“¾
@actor = $game_party.actors[@actor_index]
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬
@status_window = Window_Status.new(@actor)
$scene.command_window.active = false
$scene.status_window.active = false
end
#--------------------------------------------------------------------------
# œ ‰ð•ú
#--------------------------------------------------------------------------
def dispose
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@status_window.dispose
$scene.menu = nil
$scene.status_window.index = -1
$scene.command_window.active = true
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#--------------------------------------------------------------------------
def update
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒƒjƒ…[‰æ–ʂɐ؂è‘Ö‚¦
dispose
return
end
# R ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::RIGHT) or Input.trigger?(Input::R)
# ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cursor_se)
# ŽŸ‚̃AƒNƒ^[‚Ö
@actor_index += 1
@actor_index %= $game_party.actors.size
@actor = $game_party.actors[@actor_index]
dispose
# •Ê‚̃Xƒe[ƒ^ƒX‰æ–ʂɐ؂è‘Ö‚¦
$scene.status_window.index = @actor.index
$scene.menu = Scene_Status.new(@actor.index)
return
end
# L ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::LEFT) or Input.trigger?(Input::L)
# ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cursor_se)
# ‘O‚̃AƒNƒ^[‚Ö
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
@actor = $game_party.actors[@actor_index]
dispose
# •Ê‚̃Xƒe[ƒ^ƒX‰æ–ʂɐ؂è‘Ö‚¦
$scene.status_window.index = @actor.index
$scene.menu = Scene_Status.new(@actor.index)
return
end
end
end

#==============================================================================
# ¡ Window_EquipLeft
#------------------------------------------------------------------------------
# @‘•”õ‰æ–ʂŁAƒAƒNƒ^[‚̃pƒ‰ƒ[ƒ^•Ï‰»‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_EquipLeft < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor : ƒAƒNƒ^[
#--------------------------------------------------------------------------
def initialize(actor)
super(20, 106, 264, 192)
self.z = 6110
self.back_opacity = 192
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 28, 64)
draw_actor_name(@actor, 52, 0)
draw_actor_level(@actor, 68, 32)
draw_actor_parameter(@actor, 4, 64, 0)
draw_actor_parameter(@actor, 4, 96, 1)
draw_actor_parameter(@actor, 4, 128, 2)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 64, 40, 32, "¨", 1)
self.contents.font.color = normal_color
self.contents.draw_text(192, 64, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 96, 40, 32, "¨", 1)
self.contents.font.color = normal_color
self.contents.draw_text(192, 96, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "¨", 1)
self.contents.font.color = normal_color
self.contents.draw_text(192, 128, 36, 32, @new_mdef.to_s, 2)
end
end
end

#==============================================================================
# ¡ Window_EquipRight
#------------------------------------------------------------------------------
# @‘•”õ‰æ–ʂŁAƒAƒNƒ^[‚ªŒ»Ý‘•”õ‚µ‚Ä‚¢‚éƒAƒCƒeƒ€‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_EquipRight < Window_Selectable
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# actor : ƒAƒNƒ^[
#--------------------------------------------------------------------------
def initialize(actor)
super(284, 106, 336, 192)
self.z = 6110
self.back_opacity = 192
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 32 * 0, 202)
draw_item_name(@data[1], 92, 32 * 1, 202)
draw_item_name(@data[2], 92, 32 * 2, 202)
draw_item_name(@data[3], 92, 32 * 3, 202)
draw_item_name(@data[4], 92, 32 * 4, 202)
end
end

#==============================================================================
# ¡ 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(20, 298, 600, 128)
self.z = 6110
self.back_opacity = 192
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# œ €–Ú‚Ì•`‰æ
# index : €–ڔԍ†
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * 281
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, 208, 32, item.name, 0)
self.contents.draw_text(x + 236, y, 16, 32, ":", 1)
self.contents.draw_text(x + 252, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
#----------------------------------------------------------------------
Revenir en haut Aller en bas
ferrox
Molécule
Molécule
ferrox


Messages : 74
Loisirs : JEUX VIDEO, DORMIR, FRITES, RPG
Date d'inscription : 24/07/2010

Caractéristiques du membre
Evolution: Atome
Job: Making
XP:
Un très beau script de menu! RPG maker xp Left_bar_bleue20/20Un très beau script de menu! RPG maker xp Empty_bar_bleue  (20/20)

Un très beau script de menu! RPG maker xp Empty
MessageSujet: Re: Un très beau script de menu! RPG maker xp   Un très beau script de menu! RPG maker xp EmptyMar 27 Juil 2010 - 15:26

Maintenant voici la deuxième partie du script: à placer en dessous du premier script.

Code:
def update_cursor_rect
    if $game_temp.in_battle
      super
    else
      # Œ»Ý‚̍s‚ðŽæ“¾
      row = @index / @column_max
      # Œ»Ý‚̍s‚ªA•\Ž¦‚³‚ê‚Ä‚¢‚éæ“ª‚̍s‚æ‚è‘O‚̏ꍇ
      if row < self.top_row
        # Œ»Ý‚̍s‚ªæ“ª‚É‚È‚é‚悤‚ɃXƒNƒ[ƒ‹
        self.top_row = row
      end
      # Œ»Ý‚̍s‚ªA•\Ž¦‚³‚ê‚Ä‚¢‚éÅŒã”ö‚̍s‚æ‚èŒã‚ë‚̏ꍇ
      if row > self.top_row + (self.page_row_max - 1)
        # Œ»Ý‚̍s‚ªÅŒã”ö‚É‚È‚é‚悤‚ɃXƒNƒ[ƒ‹
        self.top_row = row - (self.page_row_max - 1)
      end
      if @index < 0
        self.cursor_rect.empty
      else
        self.cursor_rect.set((index % 2) * 284,
                                  @index / @column_max * 32 - self.oy, 284, 32)
      end
    end
  end
end

#==============================================================================
# ¡ Scene_Equip
#------------------------------------------------------------------------------
# @‘•”õ‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Equip
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #    actor_index : ƒAƒNƒ^[ƒCƒ“ƒfƒbƒNƒX
  #    equip_index : ‘•”õƒCƒ“ƒfƒbƒNƒX
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
    # ƒAƒNƒ^[‚ðŽæ“¾
    @actor = $game_party.actors[@actor_index]
    # ƒEƒBƒ“ƒhƒE‚ðì¬
    @help_window = Window_Help2.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ðŠÖ˜A•t‚¯
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # ƒJ[ƒ\ƒ‹ˆÊ’u‚ðÝ’è
    @right_window.index = @equip_index
    $scene.command_window.active = false
    $scene.status_window.active = false
    refresh
  end
  #--------------------------------------------------------------------------
  # œ ‰ð•ú
  #--------------------------------------------------------------------------
  def dispose
    # ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
    $scene.menu = nil
    $scene.status_window.index = -1
    $scene.command_window.active = true
  end
  #--------------------------------------------------------------------------
  # œ ƒŠƒtƒŒƒbƒVƒ…
  #--------------------------------------------------------------------------
  def refresh
    # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚̉Ž‹ó‘Ԑݒè
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # Œ»Ý‘•”õ’†‚̃AƒCƒeƒ€‚ðŽæ“¾
    item1 = @right_window.item
    # Œ»Ý‚̃AƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ð @item_window ‚ɐݒè
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    # ƒ‰ƒCƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ
    if @right_window.active
      # ‘•”õ•ÏXŒã‚̃pƒ‰ƒ[ƒ^‚ðÁ‹Ž
      @left_window.set_new_parameters(nil, nil, nil)
    end
    # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ
    if @item_window.active
      # Œ»Ý‘I‘𒆂̃AƒCƒeƒ€‚ðŽæ“¾
      item2 = @item_window.item
      # ‘•”õ‚ð•ÏX
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # ‘•”õ•ÏXŒã‚̃pƒ‰ƒ[ƒ^‚ðŽæ“¾
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      # ‘•”õ‚ð–ß‚·
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # ƒŒƒtƒgƒEƒBƒ“ƒhƒE‚É•`‰æ
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  def update
    # ƒEƒBƒ“ƒhƒE‚ðXV
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    # ƒ‰ƒCƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_right ‚ðŒÄ‚Ô
    if @right_window.active
      update_right
      return
    end
    # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ: update_item ‚ðŒÄ‚Ô
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒ‰ƒCƒgƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
  #--------------------------------------------------------------------------
  def update_right
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒƒjƒ…[‰æ–ʂɐ؂è‘Ö‚¦
      dispose
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::C)
      # ‘•”õŒÅ’è‚̏ꍇ
      if @actor.equip_fix?(@right_window.index)
        # ƒuƒU[ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Œˆ’è SE ‚ð‰‰‘t
      $game_system.se_play($data_system.decision_se)
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‰»
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # R ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::RIGHT) or Input.trigger?(Input::R)
      # ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cursor_se)
      # ŽŸ‚̃AƒNƒ^[‚Ö
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      # •Ê‚Ì‘•”õ‰æ–ʂɐ؂è‘Ö‚¦
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # L ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::L)
      # ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cursor_se)
      # ‘O‚̃AƒNƒ^[‚Ö
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      @actor = $game_party.actors[@actor_index]
      dispose
      # •Ê‚Ì‘•”õ‰æ–ʂɐ؂è‘Ö‚¦
      $scene.status_window.index = @actor.index
      $scene.menu = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV (ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚̏ꍇ)
  #--------------------------------------------------------------------------
  def update_item
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒ‰ƒCƒgƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‰»
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::C)
      # ‘•”õ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.equip_se)
      # ƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚ÅŒ»Ý‘I‘ð‚³‚ê‚Ä‚¢‚éƒf[ƒ^‚ðŽæ“¾
      item = @item_window.item
      # ‘•”õ‚ð•ÏX
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      # ƒ‰ƒCƒgƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‰»
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # ƒ‰ƒCƒgƒEƒBƒ“ƒhƒEAƒAƒCƒeƒ€ƒEƒBƒ“ƒhƒE‚Ì“à—e‚ðÄì¬
      @right_window.refresh
      @item_window.refresh
      $scene.status_window.refresh
      return
    end
  end
end

#==============================================================================
# ¡ Scene_Title
#------------------------------------------------------------------------------
# @ƒ^ƒCƒgƒ‹‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
  #--------------------------------------------------------------------------
  attr_accessor :menu                    # Œ»ƒEƒBƒ“ƒhƒE
  attr_accessor :command_window          # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #--------------------------------------------------------------------------
  def initialize
    @menu = nil
  end
  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ˆ—
  #--------------------------------------------------------------------------
  def main
    # í“¬ƒeƒXƒg‚̏ꍇ
    if $BTEST
      battle_test
      return
    end
    # ƒf[ƒ^ƒx[ƒX‚ðƒ[ƒh
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes      = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items        = load_data("Data/Items.rxdata")
    $data_weapons      = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies      = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    # ƒVƒXƒeƒ€ƒIƒuƒWƒFƒNƒg‚ðì¬
    $game_system = Game_System.new
    # ƒ^ƒCƒgƒ‹ƒOƒ‰ƒtƒBƒbƒN‚ðì¬
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
    s1 = "Nouvelle partie"
    s2 = "Charger"
    s3 = "Quitter“"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    # ƒRƒ“ƒeƒBƒjƒ…[—LŒø”»’è
    # ƒZ[ƒuƒtƒ@ƒCƒ‹‚ª‚Ð‚Æ‚Â‚Å‚à‘¶Ý‚·‚é‚©‚Ç‚¤‚©‚𒲂ׂé
    # —LŒø‚È‚ç @continue_enabled ‚ð trueA–³Œø‚È‚ç false ‚É‚·‚é
    @continue_enabled = false
    for i in 0..5
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    # ƒRƒ“ƒeƒBƒjƒ…[‚ª—LŒø‚ȏꍇAƒJ[ƒ\ƒ‹‚ðƒRƒ“ƒeƒBƒjƒ…[‚ɍ‡‚킹‚é
    # –³Œø‚ȏꍇAƒRƒ“ƒeƒBƒjƒ…[‚Ì•¶Žš‚ðƒOƒŒ[•\Ž¦‚É‚·‚é
    if @continue_enabled
      @command_window.index = 1
    else
      @command_window.disable_item(1)
    end
    # ƒ^ƒCƒgƒ‹ BGM ‚ð‰‰‘t
    $game_system.bgm_play($data_system.title_bgm)
    # MEABGS ‚̉‰‘t‚ð’âŽ~
    Audio.me_stop
    Audio.bgs_stop
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
    Graphics.transition
    # ƒƒCƒ“ƒ‹[ƒv
    loop do
      # ƒQ[ƒ€‰æ–Ê‚ðXV
      Graphics.update
      # “ü—͏î•ñ‚ðXV
      Input.update
      # ƒtƒŒ[ƒ€XV
      update
      # ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
      if $scene != self
        break
      end
    end
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
    Graphics.freeze
    # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ð‰ð•ú
    @command_window.dispose
    # ƒ^ƒCƒgƒ‹ƒOƒ‰ƒtƒBƒbƒN‚ð‰ð•ú
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  alias :update_original :update
  def update
    update_original
    if @menu != nil
      @menu.update
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒRƒ}ƒ“ƒh : ƒRƒ“ƒeƒBƒjƒ…[
  #--------------------------------------------------------------------------
  def command_continue
    if @menu != nil
      return
    end
    # ƒRƒ“ƒeƒBƒjƒ…[‚ª–³Œø‚̏ꍇ
    unless @continue_enabled
      # ƒuƒU[ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    Input.update
    # Œˆ’è SE ‚ð‰‰‘t
    $game_system.se_play($data_system.decision_se)
    # ƒ[ƒh‰æ–ʂɐ؂è‘Ö‚¦
    @menu = Scene_Load.new
  end
  #--------------------------------------------------------------------------
  # œ ƒRƒ}ƒ“ƒh : ƒVƒƒƒbƒgƒ_ƒEƒ“
  #--------------------------------------------------------------------------
  def command_shutdown
    # Œˆ’è SE ‚ð‰‰‘t
    $game_system.se_play($data_system.decision_se)
    # BGMABGSAME ‚ðƒtƒF[ƒhƒAƒEƒg
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # ƒVƒƒƒbƒgƒ_ƒEƒ“
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # œ í“¬ƒeƒXƒg
  #--------------------------------------------------------------------------
  def battle_test
    # ƒf[ƒ^ƒx[ƒX (í“¬ƒeƒXƒg—p) ‚ðƒ[ƒh
    $data_actors        = load_data("Data/BT_Actors.rxdata")
    $data_classes      = load_data("Data/BT_Classes.rxdata")
    $data_skills        = load_data("Data/BT_Skills.rxdata")
    $data_items        = load_data("Data/BT_Items.rxdata")
    $data_weapons      = load_data("Data/BT_Weapons.rxdata")
    $data_armors        = load_data("Data/BT_Armors.rxdata")
    $data_enemies      = load_data("Data/BT_Enemies.rxdata")
    $data_troops        = load_data("Data/BT_Troops.rxdata")
    $data_states        = load_data("Data/BT_States.rxdata")
    $data_animations    = load_data("Data/BT_Animations.rxdata")
    $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
    $data_system        = load_data("Data/BT_System.rxdata")
    # ƒvƒŒƒCŽžŠÔŒv‘ª—p‚̃tƒŒ[ƒ€ƒJƒEƒ“ƒg‚ðƒŠƒZƒbƒg
    Graphics.frame_count = 0
    # ŠeŽíƒQ[ƒ€ƒIƒuƒWƒFƒNƒg‚ðì¬
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables    = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party        = Game_Party.new
    $game_troop        = Game_Troop.new
    $game_map          = Game_Map.new
    $game_player        = Game_Player.new
    # í“¬ƒeƒXƒg—p‚̃p[ƒeƒB‚ðƒZƒbƒgƒAƒbƒv
    $game_party.setup_battle_test_members
    # ƒgƒ‹[ƒv IDA“¦‘–‰Â”\ƒtƒ‰ƒOAƒoƒgƒ‹ƒoƒbƒN‚ðÝ’è
    $game_temp.battle_troop_id = $data_system.test_troop_id
    $game_temp.battle_can_escape = true
    $game_map.battleback_name = $data_system.battleback_name
    # ƒoƒgƒ‹ŠJŽn SE ‚ð‰‰‘t
    $game_system.se_play($data_system.battle_start_se)
    # ƒoƒgƒ‹ BGM ‚ð‰‰‘t
    $game_system.bgm_play($game_system.battle_bgm)
    # ƒoƒgƒ‹‰æ–ʂɐ؂è‘Ö‚¦
    $scene = Scene_Battle.new
  end
end

#==============================================================================
# ¡ Window_SaveFile
#------------------------------------------------------------------------------
# @ƒZ[ƒu‰æ–Ê‚¨‚æ‚у[ƒh‰æ–Ê‚Å•\Ž¦‚·‚éAƒZ[ƒuƒtƒ@ƒCƒ‹‚̃EƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
  #--------------------------------------------------------------------------
  attr_reader  :filename                # ƒtƒ@ƒCƒ‹–¼
  attr_reader  :selected                # ‘I‘ðó‘Ô
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #    file_index : ƒZ[ƒuƒtƒ@ƒCƒ‹‚̃Cƒ“ƒfƒbƒNƒX (0`3)
  #    filename  : ƒtƒ@ƒCƒ‹–¼
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    super(file_index % 2 * 320, 106 + file_index / 2 * 104, 320, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 6110
    self.back_opacity = 192
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # œ ƒŠƒtƒŒƒbƒVƒ…
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # ƒtƒ@ƒCƒ‹”ԍ†‚ð•`‰æ
    self.contents.font.color = normal_color
    name = "Partie #{@file_index + 1}"
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # ƒZ[ƒuƒtƒ@ƒCƒ‹‚ª‘¶Ý‚·‚éê‡
    if @file_exist
      # ƒLƒƒƒ‰ƒNƒ^[‚ð•`‰æ
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 160 - @characters.size * 32 + i * 64 - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      end
      # ƒvƒŒƒCŽžŠÔ‚ð•`‰æ
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 280, 32, time_string, 2)
      # ƒ^ƒCƒ€ƒXƒ^ƒ“ƒv‚ð•`‰æ
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 280, 32, time_string, 2)
    end
  end
  #--------------------------------------------------------------------------
  # œ ‘I‘ðó‘Ԃ̐ݒè
  #    selected : V‚µ‚¢‘I‘ðó‘Ô (true=‘I‘ð false=”ñ‘I‘ð)
  #--------------------------------------------------------------------------
  def selected=(selected)
    @selected = selected
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # œ ƒJ[ƒ\ƒ‹‚Ì‹éŒ`XV
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @selected
      self.cursor_rect.set(0, 0, @name_width + 8, 32)
    else
      self.cursor_rect.empty
    end
  end
end

#==============================================================================
# ¡ Scene_File
#------------------------------------------------------------------------------
# @ƒZ[ƒu‰æ–Ê‚¨‚æ‚у[ƒh‰æ–ʂ̃X[ƒp[ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_File
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #    help_text : ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚É•\Ž¦‚·‚镶Žš—ñ
  #--------------------------------------------------------------------------
  def initialize(help_text)
    @help_text = help_text
    # ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ðì¬
    @help_window = Window_Help2.new
    @help_window.set_text(@help_text)
    # ƒZ[ƒuƒtƒ@ƒCƒ‹ƒEƒBƒ“ƒhƒE‚ðì¬
    @savefile_windows = []
    for i in 0..5
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    # ÅŒã‚É‘€ì‚µ‚½ƒtƒ@ƒCƒ‹‚ð‘I‘ð
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    # ƒƒjƒ…[‚©‚çŒÄ‚яo‚³‚ê‚Ä‚¢‚éê‡
    unless $game_temp.save_calling
      $scene.command_window.active = false
    end
  end
  #--------------------------------------------------------------------------
  # œ ‰ð•ú
  #--------------------------------------------------------------------------
  def dispose
    # ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
    @help_window.dispose
    for i in @savefile_windows
      i.dispose
    end
    # ƒƒjƒ…[‚©‚çŒÄ‚яo‚³‚ê‚Ä‚¢‚éê‡
    unless $game_temp.save_calling
      $scene.menu = nil
      $scene.command_window.active = true
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ˆ—
  #--------------------------------------------------------------------------
  def main
    # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðì¬
    @spriteset = Spriteset_Map.new
    # ÅŒã‚É‘€ì‚µ‚½ƒtƒ@ƒCƒ‹‚ð‘I‘ð
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
    Graphics.transition(0)
    # ƒƒCƒ“ƒ‹[ƒv
    loop do
      # ƒQ[ƒ€‰æ–Ê‚ðXV
      Graphics.update
      # “ü—͏î•ñ‚ðXV
      Input.update
      # ƒtƒŒ[ƒ€XV
      update
      @spriteset.update
      # ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
      if $scene != self
        break
      end
    end
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
    Graphics.freeze
    # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ð‰ð•ú
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  def update
    # ƒEƒBƒ“ƒhƒE‚ðXV
    @help_window.update
    for i in @savefile_windows
      i.update
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::C)
      # ƒƒ\ƒbƒh on_decision (Œp³æ‚Å’è‹`) ‚ðŒÄ‚Ô
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::B)
      # ƒƒ\ƒbƒh on_cancel (Œp³æ‚Å’è‹`) ‚ðŒÄ‚Ô
      on_cancel
      return
    end
    # •ûŒüƒ{ƒ^ƒ“‚̉º‚ª‰Ÿ‚³‚ꂽê‡
    if Input.repeat?(Input::DOWN)
      # •ûŒüƒ{ƒ^ƒ“‚̉º‚̉Ÿ‰ºó‘Ô‚ªƒŠƒs[ƒg‚Å‚È‚¢ê‡
      if Input.trigger?(Input::DOWN) or @file_index < 4
        # ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.cursor_se)
        # ƒJ[ƒ\ƒ‹‚ð‰º‚ÉˆÚ“®
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 2) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # •ûŒüƒ{ƒ^ƒ“‚̏オ‰Ÿ‚³‚ꂽê‡
    if Input.repeat?(Input::UP)
      # •ûŒüƒ{ƒ^ƒ“‚̏ã‚̉Ÿ‰ºó‘Ô‚ªƒŠƒs[ƒg‚Å‚È‚¢ê‡
      if Input.trigger?(Input::UP) or @file_index > 1
        # ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.cursor_se)
        # ƒJ[ƒ\ƒ‹‚ðã‚Ɉړ®
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index - 2) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # •ûŒüƒ{ƒ^ƒ“‚̉E‚ª‰Ÿ‚³‚ꂽê‡
    if Input.repeat?(Input::RIGHT)
      # •ûŒüƒ{ƒ^ƒ“‚̉E‚̉Ÿ‰ºó‘Ô‚ªƒŠƒs[ƒg‚Å‚È‚¢ê‡
      if Input.trigger?(Input::RIGHT) or @file_index < 5
        # ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.cursor_se)
        # ƒJ[ƒ\ƒ‹‚ð‰E‚Ɉړ®
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 1) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # •ûŒüƒ{ƒ^ƒ“‚̍¶‚ª‰Ÿ‚³‚ꂽê‡
    if Input.repeat?(Input::LEFT)
      # •ûŒüƒ{ƒ^ƒ“‚̍¶‚̉Ÿ‰ºó‘Ô‚ªƒŠƒs[ƒg‚Å‚È‚¢ê‡
      if Input.trigger?(Input::LEFT) or @file_index > 0
        # ƒJ[ƒ\ƒ‹ SE ‚ð‰‰‘t
        $game_system.se_play($data_system.cursor_se)
        # ƒJ[ƒ\ƒ‹‚ð¶‚ÉˆÚ“®
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index - 1) % 6
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒ@ƒCƒ‹–¼‚̍쐬
  #    file_index : ƒZ[ƒuƒtƒ@ƒCƒ‹‚̃Cƒ“ƒfƒbƒNƒX (0`3)
  #--------------------------------------------------------------------------
  def make_filename(file_index)
    return "Save#{file_index + 1}.rxdata"
  end
end

#==============================================================================
# ¡ Scene_Save
#------------------------------------------------------------------------------
# @ƒZ[ƒu‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #--------------------------------------------------------------------------
  def initialize
    super("Sauvegarder quelle partie?")
  end
  #--------------------------------------------------------------------------
  # œ Œˆ’莞‚̏ˆ—
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # ƒZ[ƒu SE ‚ð‰‰‘t
    $game_system.se_play($data_system.save_se)
    dispose
    # ƒZ[ƒuƒf[ƒ^‚̏‘‚«ž‚Ý
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # ƒCƒxƒ“ƒg‚©‚çŒÄ‚яo‚³‚ê‚Ä‚¢‚éê‡
    if $game_temp.save_calling
      # ƒZ[ƒuŒÄ‚яo‚µƒtƒ‰ƒO‚ðƒNƒŠƒA
      $game_temp.save_calling = false
      # ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
      $scene = Scene_Map.new
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒLƒƒƒ“ƒZƒ‹Žž‚̏ˆ—
  #--------------------------------------------------------------------------
  def on_cancel
    # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
    $game_system.se_play($data_system.cancel_se)
    dispose
    # ƒCƒxƒ“ƒg‚©‚çŒÄ‚яo‚³‚ê‚Ä‚¢‚éê‡
    if $game_temp.save_calling
      # ƒZ[ƒuŒÄ‚яo‚µƒtƒ‰ƒO‚ðƒNƒŠƒA
      $game_temp.save_calling = false
      # ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
      $scene = Scene_Map.new
      return
    end
  end
end

#==============================================================================
# ¡ Scene_Load
#------------------------------------------------------------------------------
# @ƒ[ƒh‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
  #--------------------------------------------------------------------------
  def initialize
    # ƒeƒ“ƒ|ƒ‰ƒŠƒIƒuƒWƒFƒNƒg‚ðÄì¬
    $game_temp = Game_Temp.new
    # ƒ^ƒCƒ€ƒXƒ^ƒ“ƒv‚ªÅV‚̃tƒ@ƒCƒ‹‚ð‘I‘ð
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..5
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Charger quelle partie?")
  end
  #--------------------------------------------------------------------------
  # œ Œˆ’莞‚̏ˆ—
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # ƒtƒ@ƒCƒ‹‚ª‘¶Ý‚µ‚È‚¢ê‡
    unless FileTest.exist?(filename)
      # ƒuƒU[ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    dispose
    # ƒ[ƒh SE ‚ð‰‰‘t
    $game_system.se_play($data_system.load_se)
    # ƒZ[ƒuƒf[ƒ^‚̏‘‚«ž‚Ý
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # BGMABGS ‚𕜋A
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # ƒ}ƒbƒv‚ðXV (•À—ñƒCƒxƒ“ƒgŽÀs)
    $game_map.update
    # ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # œ ƒLƒƒƒ“ƒZƒ‹Žž‚̏ˆ—
  #--------------------------------------------------------------------------
  def on_cancel
    # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
    $game_system.se_play($data_system.cancel_se)
    dispose
  end
end

#==============================================================================
# ¡ Scene_End
#------------------------------------------------------------------------------
# @ƒQ[ƒ€I—¹‰æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#==============================================================================

class Scene_End
  #--------------------------------------------------------------------------
  # œ ƒƒCƒ“ˆ—
  #--------------------------------------------------------------------------
  def main
    # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬
    s1 = "Menu titre"
    s2 = "Quitter"
    s3 = "Annuler"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
    Graphics.transition
    # ƒƒCƒ“ƒ‹[ƒv
    loop do
      # ƒQ[ƒ€‰æ–Ê‚ðXV
      Graphics.update
      # “ü—͏î•ñ‚ðXV
      Input.update
      # ƒtƒŒ[ƒ€XV
      update
      # ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
      if $scene != self
        break
      end
    end
    # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
    Graphics.freeze
    # ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
    @command_window.dispose
    # ƒ^ƒCƒgƒ‹‰æ–ʂɐ؂è‘Ö‚¦’†‚̏ꍇ
    if $scene.is_a?(Scene_Title)
      # ‰æ–Ê‚ðƒtƒF[ƒhƒAƒEƒg
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒtƒŒ[ƒ€XV
  #--------------------------------------------------------------------------
  def update
    # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðXV
    @command_window.update
    # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::B)
      # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
      $game_system.se_play($data_system.cancel_se)
      # ƒƒjƒ…[‰æ–ʂɐ؂è‘Ö‚¦
      $scene = Scene_Menu.new(6)
      return
    end
    # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
    if Input.trigger?(Input::C)
      # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
      case @command_window.index
      when 0  # ƒ^ƒCƒgƒ‹‚Ö
        command_to_title
      when 1  # ƒVƒƒƒbƒgƒ_ƒEƒ“
        command_shutdown
      when 2  # ‚â‚ß‚é
        command_cancel
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # œ ƒRƒ}ƒ“ƒh [ƒ^ƒCƒgƒ‹‚Ö] ‘I‘ðŽž‚Ìˆ—
  #--------------------------------------------------------------------------
  def command_to_title
    # Œˆ’è SE ‚ð‰‰‘t
    $game_system.se_play($data_system.decision_se)
    # BGMABGSAME ‚ðƒtƒF[ƒhƒAƒEƒg
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # ƒ^ƒCƒgƒ‹‰æ–ʂɐ؂è‘Ö‚¦
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # œ ƒRƒ}ƒ“ƒh [ƒVƒƒƒbƒgƒ_ƒEƒ“] ‘I‘ðŽž‚Ìˆ—
  #--------------------------------------------------------------------------
  def command_shutdown
    # Œˆ’è SE ‚ð‰‰‘t
    $game_system.se_play($data_system.decision_se)
    # BGMABGSAME ‚ðƒtƒF[ƒhƒAƒEƒg
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # ƒVƒƒƒbƒgƒ_ƒEƒ“
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # œ ƒRƒ}ƒ“ƒh [‚â‚ß‚é] ‘I‘ðŽž‚Ìˆ—
  #--------------------------------------------------------------------------
  def command_cancel
    # Œˆ’è SE ‚ð‰‰‘t
    $game_system.se_play($data_system.decision_se)
    # ƒƒjƒ…[‰æ–ʂɐ؂è‘Ö‚¦
    $scene = Scene_Menu.new(6)
  end
end

Voilà c'est terminé le script est complet

Bye,
ferrox
Revenir en haut Aller en bas
Afroman
Matière
Matière
Afroman


Masculin Messages : 185
Age : 30
Loisirs : S'occuper de ma coupe afro ^^
Date d'inscription : 22/11/2009

Caractéristiques du membre
Evolution: Atome
Job: Graphisme, scénario.
XP:
Un très beau script de menu! RPG maker xp Left_bar_bleue20/20Un très beau script de menu! RPG maker xp Empty_bar_bleue  (20/20)

Un très beau script de menu! RPG maker xp Empty
MessageSujet: Re: Un très beau script de menu! RPG maker xp   Un très beau script de menu! RPG maker xp EmptyMer 28 Juil 2010 - 8:19

Merci du partage, mais moi mon menu est comme ça par défaut, j'ai juste modifié les windowskins...
Revenir en haut Aller en bas
https://www.facebook.com/
ferrox
Molécule
Molécule
ferrox


Messages : 74
Loisirs : JEUX VIDEO, DORMIR, FRITES, RPG
Date d'inscription : 24/07/2010

Caractéristiques du membre
Evolution: Atome
Job: Making
XP:
Un très beau script de menu! RPG maker xp Left_bar_bleue20/20Un très beau script de menu! RPG maker xp Empty_bar_bleue  (20/20)

Un très beau script de menu! RPG maker xp Empty
MessageSujet: Re: Un très beau script de menu! RPG maker xp   Un très beau script de menu! RPG maker xp EmptyMer 28 Juil 2010 - 11:15

Bonjour, je suis désolé du dérengement, mais je me suis trompé lorsque j'ai posté le script et je ne sais pas comment les supprimer. Le script à été transféré à cette adresse:

lien

https://zarok-rpgmaker.superforum.fr/scripts-d-interface-f79/un-tres-beau-script-de-menu-rpg-maker-xp-t12754.htm#148124

Encore désolé, si il y a un moyen de suprimmer les script, faites le moi savoir, et je demande si les modos ou les admins si ils pourraient le supprimer.

Au revoir,
ferrox
Revenir en haut Aller en bas
Contenu sponsorisé



Un très beau script de menu! RPG maker xp Empty
MessageSujet: Re: Un très beau script de menu! RPG maker xp   Un très beau script de menu! RPG maker xp Empty

Revenir en haut Aller en bas
 

Un très beau script de menu! RPG maker xp

Voir le sujet précédent Voir le sujet suivant Revenir en haut 

 Sujets similaires

-
» Un très beau script de menu! RPG maker xp
» Voici un script de menu assez beau, + translucide.
» Un beau menu
» Menu à la façon final fantasy VII, il est assez beau.
» Un très beau, permet de changer des menus habituels de rpg maker
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Zarok RPG Maker :: 

 :: SCRIPTS :: Script XP :: Scripts d'interfaces/ menus
-
Sauter vers: