1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
| #==============================================================================
# ** Scene_9 -- Par Catskart
#------------------------------------------------------------------------------
# Ce script permet de repousser la limite de choix de rpg maker jusqu'à 9
# Choix, à utiliser uniquement lorsque vous voulez mettre plus de 4 choix
#==============================================================================
# Le numéro correspond à la Variable qui va stocker votre choix.
Enregistrementduchoix = 1
class Scene_9
def main
@character = RPG::Sprite.new
@sprite = Spriteset_Map.new
s1 = $Choix1
s2 = $Choix2
s3 = $Choix3
s4 = $Choix4
s5 = $Choix5
s6 = $Choix6
s7 = $Choix7
s8 = $Choix8
s9 = $Choix9
if ($Nombredechoix >= 9)
@command_window = Window_Command.new(192, [s1, s2, s3, s4, s5, s6, s7, s8, s9])
elsif ($Nombredechoix ==
@command_window = Window_Command.new(192, [s1, s2, s3, s4, s5, s6, s7, s8])
elsif ($Nombredechoix == 7)
@command_window = Window_Command.new(192, [s1, s2, s3, s4, s5, s6, s7])
elsif ($Nombredechoix == 6)
@command_window = Window_Command.new(192, [s1, s2, s3, s4, s5, s6])
elsif ($Nombredechoix == 5)
@command_window = Window_Command.new(192, [s1, s2, s3, s4, s5])
elsif ($Nombredechoix <= 4)
@command_window = Window_Command.new(192, [s1, s2, s3, s4])
end
@command_window.x = 80
# Pour que se soit Calibrer avec l'emplacement du message.
case $game_system.message_position
when 0 # up
@command_window.y = 16
when 1 # middle
@command_window.y = 160
when 2 # down
@command_window.y = 304
end
@command_window.width = 480
@command_window.height = 160
# Si le message est transparent.
if $game_system.message_frame == 0
@command_window.opacity = 160
else
@command_window.opacity = 0
end
@command_window.z = 9998
if ($Affichageargent == true)
@gold_window = Window_Gold.new
@gold_window.x = 400
case $game_system.message_position
when 0 # up
@gold_window.y = 384
when 1 # middle
@gold_window.y = 32
when 2 # down
@gold_window.y = 32
end
# Si le message est transparent.
if $game_system.message_frame == 0
@gold_window.opacity = 160
else
@gold_window.opacity = 0
end
end
Graphics.transition(3)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@sprite.dispose
@character.dispose
if ($Affichageargent == true)
@gold_window.dispose
end
end
#C * Frame Update
def update
#A Update command window
@character.update
@sprite.update
if ($Affichageargent == true)
@gold_window.update
end
@command_window.update
#T If B button was pressed
if Input.trigger?(Input::B)
if ($Annulation == true)
#S Play cancel SE
$game_system.se_play($data_system.cancel_se)
#K Switch to menu screen
$game_variables[Enregistrementduchoix] = 0
$scene = Scene_Map.new
else
end
return
end
#A If C button was pressed
if Input.trigger?(Input::C)
#RT Branch by command window cursor position
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 1
$scene = Scene_Map.new
when 1
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 2
$scene = Scene_Map.new
when 2
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 3
$scene = Scene_Map.new
when 3
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 4
$scene = Scene_Map.new
when 4
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 5
$scene = Scene_Map.new
when 5
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 6
$scene = Scene_Map.new
when 6
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 7
$scene = Scene_Map.new
when 7
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 8
$scene = Scene_Map.new
when 8
$game_system.se_play($data_system.decision_se)
$game_variables[Enregistrementduchoix] = 9
$scene = Scene_Map.new
end
return
end
end
end |