Age : 28 Inscrit le : 30/12/2009 Messages : 1067
| Sujet: [VX] BiblioArmures Mer 28 Avr 2010 - 8:16 | |
| BiblioArmuresVoici enfin le BiblioArmures !! Après le BiblioArmes bien sur ! Screens : Il faut que vous mettiez cette image à la racine de votre jeu : A nommée comme vous avez choisi dans la Configuration du Script : Script : - Spoiler:
- Code:
-
#--------------------------------------------------------BiblioArmes----------------------------------# # I. Crédits et Remerciements # #Auteur du Script : XxXxX33333 # pour le site : vx-fan.1fr1.net et pour le forum RPG Maker VX # #Aide : Zangther # #A mettre dans les crédits : #XxXxX33333 et Zangther # # # # II. Instruction # # Mettez ce script au-dessus de Main. # Pour l\'appeller, mettez ceci dans votre évènement : # Appel de Script : $scene = Scene_BiblioArmures.new # # # III. Modification du Script # # Pour rajouter une arme dans le script, faîtes comme ceci : # # Etape 1 : # A la ligne , à la place de 30, mettez le nombre d\'arme que vous avez # # Etape 2 : # A la ligne 350 environ, rajoutez : #~ when ID # if $game_switches[@cond] == true #~ @name = $data_armors[@action1 + 1].name #~ end # # Avec : # - ID = numéro du dernier when + 1 # # Etape 3 : # Ligne 980 environ, rajoutez : #~ when ID #~ #~ if $game_switches[@cond] == true #~ @att = $data_armors[@action2 + 1].atk #~ @def = $data_armors[@action2 + 1].def #~ @int = $data_armors[@action2 + 1].spi #~ @agi = $data_armors[@action2 + 1].agi #~ @hit = $data_armors[@action2 + 1].eva #~ @pro = $data_armors[@action2 + 1].prevent_critical #~ @prix = $data_armors[@action2 + 1].price #~ @sort = $data_armors[@action2 + 1].kind #~ @pv = $data_armors[@action2 + 1].auto_hp_recover #~ @des = $data_armors[@action2 + 1].description #~ icon = $data_armors[@action2 + 1].icon_index #~ else #~ Sound.play_buzzer #~ zero #~ end # # Avec : # ID = numéro du dernier when + 1 # # # # # ----------Modification Interne du Script-----------------# # # A la ligne 630 environ, vous pouvez modifier les textes qui s\'affichent dans le script ! # # A la ligne 130 environ, a cette ligne : #~ $scene = Scene_Map.new # # Mettez ceci pour retourner au menu : # $scene = Scene_Menu.new # # Mettez ceci pour retourner à l\'ecran titre : # $scene = Scene_Title.new # #Mettez ceci pour retourner sur la map : # $scene = Scene_Map.new #
##### ATTENTION ! IL Y A 2 FOIS L\'INTERRUPTEUR A MODIFIER !! 1 FOIS DANS CE SCRIPT ET UNE FOIS DANS Scene_Map !!!--------
# # #----------------FIN DES EXPLICATIONS----------------#
module Biblio2 Int = 0 # ID de l'interrupteur Nbarme = 30 # Nombre d'arme Image = "Fond" end
class Scene_BiblioArmures < Scene_Base
def start @interrupteur = Biblio2::Int #################Modifiable 1 Fois ICI et une fois dans Scene_Map ! ################ Si vous voulez de 4000 à 4030, mettez 3999 ! toujours un de moins !!!
create_menu_background # ----- Image de Fond -----# @fond = Sprite.new @fond.bitmap = Bitmap.new(Biblio2::Image) ## Nom de L\'image dans le dossier Pictures ! @fond.x = 0 @fond.y = 0 @fond.opacity = 125 # ----- Choix de l\'arme ----- # @choix =[] commands= []
for id in 1..Biblio2::Nbarme #Modifer ici le nombre d\'arme que vous voulez qu\'il s\'affiche (le 30) commands.push($data_armors[id].name) end
@choix = Window_Command.new(200, commands,1,16) @choix.x = 0 @choix.y = 0 @choix.z = 100 @choix.opacity = 0
@winn = Window1.new @winn.z =100 @winn.opacity = 0
@wind = Window2.new @wind.z = 100 @wind.opacity = 0 end def terminate dispose_menu_background #~ @fond.bitmap.dispose #~ @fond.dispose @choix.dispose @winn.dispose @wind.dispose end def update update_menu_background @choix.update if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new #ICI# end @wind.set_action(@choix.index)#variable NUMD @winn.set_action(@choix.index)#vatiable NUMN
end
class Window1 < Window_Base #WEAPON NAME def initialize super(200,0,344,75) refresh end def set_action(numn) @action1 = numn refresh end def refresh
if Input.trigger?(Input::C)
@cond = (@interrupteur.to_i + @action1.to_i) + 1 @name = "Non découverte !" #Texte Modifiable !
case @action1
when 0
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 1
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 2
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 3
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 4
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 5
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 6
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 7
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 8
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 9
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 10
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 11
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 12
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 13
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 14
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 15
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 16
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 17
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 18
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 19
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 20
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 21
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 22
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 23
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 24
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 25
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 26
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 27
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 28
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end when 29
if $game_switches[@cond] == true @name = $data_armors[@action1 + 1].name end end
self.contents.clear self.contents.draw_text(100, 0, 100, 50, @name, 0) end
end end
class Window2 < Window_Base#WEAPON DESCRIPTION
def initialize super (200, 75, 344, 340) refresh end
def set_action(numd) @action2 = numd refresh end
def refresh
if Input.trigger?(Input::C)
@cond = (@interrupteur.to_i + @action2.to_i) + 1
case @action2 when 0 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 1 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 2 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 3 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 4 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 5 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 6 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 7 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 8 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 9 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 10 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 11 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 12 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 13 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 14 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 15 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 16 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 17 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 18 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 19 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 20 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 21 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 22 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 23 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 24 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 25 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 26 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 27 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 28 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end when 29 if $game_switches[@cond] == true @att = $data_armors[@action2 + 1].atk @def = $data_armors[@action2 + 1].def @int = $data_armors[@action2 + 1].spi @agi = $data_armors[@action2 + 1].agi @hit = $data_armors[@action2 + 1].eva @pro = $data_armors[@action2 + 1].prevent_critical @prix = $data_armors[@action2 + 1].price @sort = $data_armors[@action2 + 1].kind @pv = $data_armors[@action2 + 1].auto_hp_recover @des = $data_armors[@action2 + 1].description icon = $data_armors[@action2 + 1].icon_index else Sound.play_buzzer zero end
end self.contents.clear
if @pro == true @pro = "Oui" else @pro = "Non" end
if @pv == true @pv = "Oui" else @pv = "Non" end
if @sort == 0 @sort = "Bouclier" end if @sort == 1 @sort = "Chapeau" end if @sort == 2 @sort = "Armure" end if @sort == 3 @sort = "Acessoire" end
def zero @att = nil @def = nil @int = nil @agi = nil @prix = nil @sort = nil @pro = nil @pv = nil @des = nil icon = nil end @text0 = "Caractéristiques :" @text1 ="Sorte : " + @sort.to_s + "" @text2 = "- Attaque : " + @att.to_s + "" @text3 = "- Defense : " + @def.to_s + "" @text4 = "- Intelligence : " + @int.to_s + "" @text5 = "- Agilité : " + @agi.to_s + "" @text6 = "- Réussite : " + @hit.to_s + " %" @text7 = "- Prix : " + @prix.to_s + "" @text8 = "- Protection critique : " + @pro.to_s + "" @text9 = "- Regenère des PV : " + @pv.to_s + "" @text10 = "Icône :" @text11 ="Description :" @text12 = @des.to_s #------ Icone bitmap = Cache.system("Iconset") rect = Rect.new(icon.to_i % 16 * 24, icon.to_i / 16 * 24, 24, 24) self.contents.blt(285, 5, bitmap, rect)
#--------Texte -------# self.contents.draw_text(5, 5, 175, 25, @text0, 0) self.contents.draw_text(5, 25, 175, 50, @text1, 0) self.contents.draw_text(5, 45, 175, 55, @text2, 0) self.contents.draw_text(5, 65, 175, 60, @text3, 0) self.contents.draw_text(5, 85, 175, 65, @text4, 0) self.contents.draw_text(5, 105, 175, 70, @text5, 0) self.contents.draw_text(5,125,175, 75, @text6, 0) self.contents.draw_text (5, 140, 175, 110, @text7, 0) self.contents.draw_text(5, 155, 175, 135, @text8, 0) self.contents.draw_text(5, 175, 175, 135, @text9, 0) self.contents.draw_text(225, 5, 175, 25, @text10, 0) self.contents.draw_text(5, 190, 175, 150, @text11, 0) self.contents.draw_text(5, 150, 250, 275, @text12, 0) end
end end end
class Scene_Map < Scene_Base
alias new_start start
def start new_start for nb in 0..Biblio2::Nbarme number = $game_party.has_item?($data_armors[nb], true) if number == true @interrupteur = 0 # A modifier !!!!! $game_switches[nb.to_i + @interrupteur.to_i] = true end end end end
#============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs the menu screen processing. #==============================================================================
class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background create_command_window @gold_window = Window_Gold.new(0, 360) @status_window = Window_MenuStatus.new(160, 0) end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @command_window.dispose @gold_window.dispose @status_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background @command_window.update @gold_window.update @status_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = "BiblioArmures" s6 = Vocab::save s7 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7]) @command_window.index = @menu_index if $game_party.members.size == 0 # If number of party members is 0 @command_window.draw_item(0, false) # Disable item @command_window.draw_item(1, false) # Disable skill @command_window.draw_item(2, false) # Disable equipment @command_window.draw_item(3, false) # Disable status end if $game_system.save_disabled # If save is forbidden @command_window.draw_item(4, false) # Disable save end end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # Item $scene = Scene_Item.new when 1,2,3 # Skill, equipment, status start_actor_selection when 4 $scene = Scene_BiblioArmures.new when 5 # Save $scene = Scene_File.new(true, false, false) when 6 # End Game $scene = Scene_End.new end end end
def start_actor_selection @command_window.active = false @status_window.active = true if $game_party.last_actor_index < @status_window.item_max @status_window.index = $game_party.last_actor_index else @status_window.index = 0 end end
def end_actor_selection @command_window.active = true @status_window.active = false @status_window.index = -1 end
def update_actor_selection if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 # skill $scene = Scene_Skill.new(@status_window.index) when 2 # equipment $scene = Scene_Equip.new(@status_window.index) when 3 # status $scene = Scene_Status.new(@status_window.index) end end end end
#============================================================================== # ** Window_Command #==============================================================================
class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :commands # command
def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32) if row_max == 0 row_max = (commands.size + column_max - 1) / column_max end super(0, 0, width, row_max * WLH + 32, spacing) @commands = commands @item_max = commands.size @column_max = column_max refresh self.index = 0 end
def refresh self.contents.clear create_contents for i in 0...@item_max draw_item(i) end end
def draw_item(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, @commands[index]) end end
Il fonctionne automatiquement ! (Plug & Play)Biward |
|