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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
| #Script créé pour malfrax pour RPG Maker XP
#Le 26 mai 2009 à 17h51
#Merci de prévenir malfrax pour la distribution de ce script
class Window_Base
def red
return Color.new(255, 0, 0, 255)
end
def noir
return Color.new(0,0,0,255)
end
end
class Window_Info < Window_Base
def initialize(text)
super(220, 20, 200, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh(text)
end
def refresh(text)
self.contents.clear
self.contents.draw_text(0,0,200,32,text.to_s)
end
end
class Window_Info_Supr < Window_Base
def initialize(text)
super(220, 20, 200, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh(text)
end
def refresh(text)
self.contents.clear
self.contents.font.color = red
self.contents.draw_text(0,0,200,32,text.to_s)
end
end
class Scene_Menu_Suite
def main
@spriteset = Spriteset_Map.new
@index = 0
@equip1 = Window_Info.new("Equiper")#Modifier ici le nom d'equipement
@skill1 = Window_Info.new("Competence")#Modifier ici le nom de competance
@item1 = Window_Info.new("Objet")#Modifier ici le nom d'objet
@save1 = Window_Info.new("Sauvegarde")#Modifier ici le nom de sauvegarde
@quit1 = Window_Info.new("Quitter")#Modifier ici le nom quitter
@record1 = Window_Info.new("Information")#Modifier ici le nom du livre avec les informations d'argents,du nombre de pas,et du temp jouer
@etat1 = Window_Info.new("Status")#Modifier ici le nom de status
@savedisable1 = Window_Info_Supr.new("Sauvegarde")#Modifier ici le nom de sauvegarde quand il est déasactiver
@equip1.visible = false
@skill1.visible = false
@item1.visible = false
@save1.visible = false
@quit1.visible = false
@record1.visible = false
@etat1.visible = false
@indice = Sprite.new
@indice.bitmap = RPG::Cache.icon("048-Skill05")
@indice.x = 288
@indice.y = 200
@equip = Sprite.new
@equip.bitmap = RPG::Cache.icon("009-Shield01")
@equip.y = 160
@skill = Sprite.new
@skill.bitmap = RPG::Cache.icon("044-Skill01")
@skill.y = 160
@item = Sprite.new
@item.bitmap = RPG::Cache.icon("Sac 1")
@item.y = 160
@save = Sprite.new
@save.bitmap = RPG::Cache.icon("Livre 1")
@save.y = 160
@etat = Sprite.new
@etat.bitmap = RPG::Cache.icon("046-Skill03")
@etat.y = 160
@quit = Sprite.new
@quit.bitmap = RPG::Cache.icon("047-Skill04")
@quit.y = 160
@record = Sprite.new
@record.bitmap = RPG::Cache.icon("036-Item05")
@record.y = 160
#Début graphic
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
#Fin graphic
@equip.dispose
@skill.dispose
@item.dispose
@save.dispose
@etat.dispose
@quit.dispose
@record.dispose
@equip1.dispose
@skill1.dispose
@item1.dispose
@save1.dispose
@etat1.dispose
@quit1.dispose
@record1.dispose
@savedisable1.dispose
@spriteset.dispose
@indice.dispose
end
def update
@indice.update
@spriteset.update
@equip.update
@skill.update
@item.update
@save.update
@etat.update
@quit.update
@record.update
@equip1.update
@skill1.update
@item1.update
@save1.update
@etat1.update
@quit1.update
@record1.update
@savedisable1.update
@quit.x = ((@index+3)*32)+288
@save.x = ((@index+2)*32)+288
@equip.x = ((@index+1)*32)+288
@skill.x = (@index*32)+288
@item.x = ((@index-1)*32)+288
@etat.x = ((@index-2)*32)+288
@record.x = ((@index-3)*32)+288
if Input.repeat?(Input::RIGHT)
if @index != -3
@index -= 1
else
@index = 3
end
end
if Input.repeat?(Input::LEFT)
if @index != 3
@index += 1
else
@index = -3
end
end
case @index
when -3
falsif
@record.opacity = 50
@etat.opacity = 90
@item.opacity = 120
@skill.opacity = 180
@equip.opacity = 200
@save.opacity = 255
@quit.opacity = 255
@quit1.visible = true
when -2
falsif
@record.opacity = 90
@etat.opacity = 120
@item.opacity = 180
@skill.opacity = 200
@equip.opacity = 255
@save.opacity = 255
@quit.opacity = 255
if $game_system.save_disabled
@savedisable1.visible = true
else
@save1.visible = true
end
when -1
falsif
@record.opacity = 120
@etat.opacity = 180
@item.opacity = 180
@skill.opacity = 255
@equip.opacity = 255
@save.opacity = 255
@quit.opacity = 200
@equip1.visible = true
when 0
falsif
@record.opacity = 180
@etat.opacity = 200
@item.opacity = 255
@skill.opacity = 255
@equip.opacity = 255
@save.opacity = 200
@quit.opacity = 180
@skill1.visible = true
when 1
falsif
@record.opacity = 200
@etat.opacity = 255
@item.opacity = 255
@skill.opacity = 255
@equip.opacity = 200
@save.opacity = 180
@quit.opacity = 120
@item1.visible = true
when 2
falsif
@record.opacity = 255
@etat.opacity = 255
@item.opacity = 255
@skill.opacity = 200
@equip.opacity = 180
@save.opacity = 120
@quit.opacity = 90
@etat1.visible = true
when 3
falsif
@record.opacity = 255
@etat.opacity = 255
@item.opacity = 200
@skill.opacity = 180
@equip.opacity = 120
@save.opacity = 90
@quit.opacity = 50
@record1.visible = true
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new
end
if Input.trigger?(Input::C)
case @index
when -3
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
when -2
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when -1
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new($heros)
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new($heros)
when 1
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new($heros)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Record.new
end
end
end
def falsif
@equip.opacity = 255
@skill.opacity = 255
@item.opacity = 255
@save.opacity = 255
@quit.opacity = 255
@record.opacity = 255
@etat.opacity = 255
@equip1.visible = false
@skill1.visible = false
@item1.visible = false
@save1.visible = false
@quit1.visible = false
@record1.visible = false
@etat1.visible = false
@savedisable1.visible = false
end
end
class Scene_Menu
def main
@spriteset = Spriteset_Map.new
@noms = []
for i in 0...$game_party.actors.size
@noms.push($game_party.actors[i].name)
end
@command = Window_Command.new(192, @noms)
@command.x = 320 - @command.width
@command.y = 100
@command.opacity = 0
@command.back_opacity = 0
#@command.text_color = 4
#Début graphic
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
#Fin graphic
@command.dispose
@spriteset.dispose
end
def update
@spriteset.update
@command.update
if Input.trigger?(Input::C)
$heros = @command.index
$scene = Scene_Menu_Suite.new
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
end
end
end
class Scene_Record
def main
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.picture("livre")
@gold = Window_Gold.new
@gold.x = 43
@gold.y = 20
@gold.opacity = 0
@gold.back_opacity = 0
@time = Window_PlayTime.new
@time.x = 43
@time.y = 20+160
@time.opacity = 0
@time.back_opacity = 0
@step = Window_Steps.new
@step.x = 43
@step.y = 20+160+160
@step.opacity = 0
@step.back_opacity = 0
#Début graphic
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
#Fin graphic
@sprite.dispose
@gold.dispose
@time.dispose
@step.dispose
end
def update
@sprite.update
@gold.update
@time.update
@step.update
if Input.trigger?(Input::C) or Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu_Suite.new
end
end
end
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
# ゴールドを表示するウィンドウです。
#==============================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = noir
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = red
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
end
#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
# メニュー画面でプレイ時間を表示するウィンドウです。
#==============================================================================
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = red
self.contents.draw_text(4, 0, 130, 32, "Temps de jeu :")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = noir
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ■ Window_Steps
#------------------------------------------------------------------------------
# メニュー画面で歩数を表示するウィンドウです。
#==============================================================================
class Window_Steps < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = red
self.contents.draw_text(4, 0, 130, 32, "Nombre de pas")
self.contents.font.color = noir
self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
end
end |