RPG Maker VX/VXAce - La Communauté - v3
Le forum de la communauté francophone de making. News, entraide, ressources, venez nombreux!
Spécialisés dans RPG Maker VX et RPG Maker VXAce

AccueilPage d'accueilFAQRechercherS'enregistrerConnexion



Partager | 
 

 le script

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Dudu'
Hamstérophile
Hamstérophile


Nombre de messages: 2060
Age: 21
Capacités: bon
Distinction: Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription: 22/06/2009

MessageSujet: le script   Sam 19 Déc 2009 - 18:11

Et voila le début du script balb' mais il y a pas tout loin de la!!!
la suite viendra quand je l'aurait codé!!!
tu as juste à copier coller comme d'ab' et pour le fonctionnement bah rien de particulier à par mes "inter" pour activer et déactiver des partie du menu je t'expliquerait plus tard ou au pire tu pourras voir par toi même dans la démo je te laisse mes évent de test!!!!
----------->La Démo!!!<----------------




Code:


#=================================================================#
#                      By Adurna                                                        12/12/09        maj:16/12/09        #
#                                          menu option plus version 1.0                                                        #
#=================================================================#

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
module Adurna
 
 
Obj = "Objet"
Comp = "Compétence"
Equip = "Equiper"
Stat = "Statut"
Sov = "Sauvegarder"
Char = "Charger"
Fin = "Quiter"

Balb = "F.A.C."

Or = "Or"
Location ="Location :"

Affiche_Icon=1
Icon_Or=147
Icon_Loc=153
Icon_Obj=144
Icon_Comp=128
Icon_Equip=32
Icon_Stat=118
Icon_Sov=176
Icon_Char=177
Icon_Fin=117


Fac_Balb_Active=1
Icon_Balb=133

end

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
    @location_window = Window_location.new(0, 240)
    @status_window=0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @location_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
  update_menu_background
    @command_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 = [Adurna::Icon_Obj, Adurna::Obj]
    s2 = [Adurna::Icon_Comp, Adurna::Comp]
    s3 = [Adurna::Icon_Equip, Adurna::Equip]
    s4 = [Adurna::Icon_Stat, Adurna::Stat]
    s5 = [Adurna::Icon_Sov, Adurna::Sov]
    s6 = [Adurna::Icon_Char, Adurna::Char]
    s7=  [Adurna::Icon_Fin, Adurna::Fin]
    s8= [Adurna::Icon_Balb,Adurna::Balb]
  @command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s8,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)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
    end
    if $game_system.save_disabled            # If save is forbidden
      @command_window.draw_item(4,false)    # Disable save
    end
    if Dir.glob('Save*.rvdata').size <=0
      @command_window.draw_item(5,false)
    end
   
   
    if Adurna::Fac_Balb_Active != 1         
      @command_window.draw_item(6, false)
      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
      elsif Dir.glob('Save*.rvdata').size <=0 and @command_window.index == 5
        Sound.play_buzzer
        return
        elsif Adurna::Fac_Balb_Active != 1 and @command_window.index == 6       
      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
        @status_window=Window_MenuStatus.new(160, 0)
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
      when 7      # End Game
        $scene = Scene_End.new
      when 6
        $scene = Scene_Balb_Bis.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Actor Selection
  #--------------------------------------------------------------------------
  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
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
      @status_window.update
    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








class Window_location < Window_Base
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @map_name = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, Adurna::Location)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -4+WLH, 128, 32, @map_name, 1)
    draw_icon(Adurna::Icon_Loc,0, WLH, true)
    self.contents.font.color = system_color
    self.contents.draw_text(125, -4, 128, 32, Adurna::Or,1)
    self.contents.font.color = normal_color
    self.contents.draw_text(125, -10+WLH, 140, 42, $game_party.gold, 1)
    draw_icon(Adurna::Icon_Or,235, WLH, true)
  end
end




class Window_IconCommand < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 8, spacing = 20)
    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
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end





Dernière édition par adurna le Lun 29 Mar 2010 - 22:58, édité 2 fois
Revenir en haut Aller en bas
Dudu'
Hamstérophile
Hamstérophile


Nombre de messages: 2060
Age: 21
Capacités: bon
Distinction: Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription: 22/06/2009

MessageSujet: Re: le script   Sam 19 Déc 2009 - 18:11

et
Code:



module Balb
Op_1 = "bibliothèque"
Op_2="acoche"
Op_3="notes"
Op_4="retour"
Icon_1=147
Icon_2=153
Icon_3=144
Icon_4=142

Inter_op1=1
Inter_op2=1
Inter_op3=1

end


class Scene_Balb< Scene_Base
def initialize(indicator_inicial = 0)
@indicator_inicial = indicator_inicial
end

def start
super
create_menu_background
create_Balb_Options
end

def terminate
super
dispose_menu_background
@Balb_Options.dispose
end

def update
super
update_menu_background
@Balb_Options.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Menu.new
elsif Input.trigger?(Input::C)
  if Balb::Inter_op1 != 1 and @Balb_Options.index == 0       
      Sound.play_buzzer
        return
          elsif Balb::Inter_op2 != 1 and @Balb_Options.index == 1       
      Sound.play_buzzer
        return
          elsif Balb::Inter_op3 != 1 and @Balb_Options.index == 2       
      Sound.play_buzzer
        return
end
Sound.play_decision

case @Balb_Options.index
when 0
$scene = Scene_Balb_B.new
when 1
$scene = Scene_Balb_A.new
  when 2
$scene = Scene_Balb_N.new
when 3
$scene = Scene_Menu.new(6)
end
end
end

def create_Balb_Options
s1 =  [Balb::Icon_1, Balb::Op_1]
    s2 = [Balb::Icon_2, Balb::Op_2]
    s3 =[Balb::Icon_3, Balb::Op_3]
    s4 = [Balb::Icon_4, Balb::Op_4]
    @Balb_Options = Window_Balb_Icon_Command .new(172, [s1, s2, s3, s4])
    @Balb_Options.index = @indicator_inicial
    @Balb_Options.x = Graphics.width/2 - @Balb_Options.width/2
    @Balb_Options.y = Graphics.height/2 - @Balb_Options.height/2
   
   
    if Balb::Inter_op1 != 1         
      @Balb_Options.draw_item(0, false)
    end
    if Balb::Inter_op2 != 1         
      @Balb_Options.draw_item(1, false)
    end
    if Balb::Inter_op3 != 1         
      @Balb_Options.draw_item(2, false)
      end
end
end


class Window_Balb_Icon_Command < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 4, spacing = 20)
    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
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end





Dernière édition par adurna le Lun 29 Mar 2010 - 22:58, édité 1 fois
Revenir en haut Aller en bas
Dudu'
Hamstérophile
Hamstérophile


Nombre de messages: 2060
Age: 21
Capacités: bon
Distinction: Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription: 22/06/2009

MessageSujet: Re: le script   Dim 20 Déc 2009 - 12:58

puis
Code:



module Balb_op_a
Op_1 = "option1"
Op_2 = "option2"
Op_3 = "option3"
Op_4 = "option4"
Op_5 = "option5"
Op_6 = "option6"
Op_7 = "option7"
Op_8 = "option8"
Op_9 = "option9"
Op_10 ="retour"
Icon_1=147
Icon_2=153
Icon_3=144
Icon_4=144
Icon_5=144
Icon_6=144
Icon_7=144
Icon_8=144
Icon_9=144
Icon_10=142

Inter_op1=1
Inter_op2=1
Inter_op3=1
Inter_op4=1
Inter_op5=1
Inter_op6=1
Inter_op7=1
Inter_op8=1
Inter_op9=1

end


class Scene_Balb_A < Scene_Base
def initialize(index_inicial = 0)
@index_inicial = index_inicial
end

def start
super
create_menu_background
create_Balb_Options_A
@A_window = Window_A.new(0, 0)
end

def terminate
super
dispose_menu_background
@Balb_Options_A.dispose
@A_window.dispose
end

def update
super
update_menu_background
@Balb_Options_A.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Balb.new(1)
elsif Input.trigger?(Input::C)
  if Balb_op_a::Inter_op1 != 1 and @Balb_Options_A.index == 0       
      Sound.play_buzzer
        return
          elsif Balb_op_a::Inter_op2 != 1 and @Balb_Options_A.index == 1       
      Sound.play_buzzer
        return
          elsif Balb_op_a::Inter_op3 != 1 and @Balb_Options_A.index == 2       
      Sound.play_buzzer
        return
        elsif Balb_op_a::Inter_op4 != 1 and @Balb_Options_A.index == 3       
      Sound.play_buzzer
        return
        elsif Balb_op_a::Inter_op5 != 1 and @Balb_Options_A.index == 4       
      Sound.play_buzzer
        return
        elsif Balb_op_a::Inter_op6 != 1 and @Balb_Options_A.index == 5       
      Sound.play_buzzer
        return
        elsif Balb_op_a::Inter_op7 != 1 and @Balb_Options_A.index == 6       
      Sound.play_buzzer
        return
        elsif Balb_op_a::Inter_op8 != 1 and @Balb_Options_A.index == 7       
      Sound.play_buzzer
        return
        elsif Balb_op_a::Inter_op9 != 1 and @Balb_Options_A.index == 8       
      Sound.play_buzzer
        return
end
Sound.play_decision

case @Balb_Options_A.index
when 0
$scene = Scene_Menu.new
when 1
$scene = Scene_Menu.new
  when 2
$scene = Scene_Menu.new
 when 3
$scene = Scene_Menu.new
 when 4
$scene = Scene_Menu.new
 when 5
$scene = Scene_Menu.new
 when 6
$scene = Scene_Menu.new
 when 7
$scene = Scene_Menu.new
 when 8
$scene = Scene_Menu.new
when 9
$scene = Scene_Balb.new(1)
end
end
end

def create_Balb_Options_A
    s1 = [Balb_op_a::Icon_1, Balb_op_a::Op_1]
    s2 = [Balb_op_a::Icon_2, Balb_op_a::Op_2]
    s3 = [Balb_op_a::Icon_3, Balb_op_a::Op_3]
    s4 = [Balb_op_a::Icon_4, Balb_op_a::Op_4]
    s5 = [Balb_op_a::Icon_5, Balb_op_a::Op_5]
    s6 = [Balb_op_a::Icon_6, Balb_op_a::Op_6]
    s7 = [Balb_op_a::Icon_7, Balb_op_a::Op_7]
    s8 = [Balb_op_a::Icon_8, Balb_op_a::Op_8]
    s9 = [Balb_op_a::Icon_9, Balb_op_a::Op_9]
    s10 = [Balb_op_a::Icon_10, Balb_op_a::Op_10]
    @Balb_Options_A = Window_Balb_A_Icon_Command .new(172, [s1, s2, s3, s4,s5,s6,s7,s8,s9,s10])
    @Balb_Options_A.index = @index_inicial
    @Balb_Options_A.x = 10#Graphics.width/2 - @Balb_Options_A.width/2
    @Balb_Options_A.y =10 #Graphics.height/2 - @Balb_Options_A.height/2
   
   
    if Balb_op_a::Inter_op1 != 1         
      @Balb_Options_A.draw_item(0, false)
    end
    if Balb_op_a::Inter_op2 != 1         
      @Balb_Options_A.draw_item(1, false)
    end
    if Balb_op_a::Inter_op3 != 1         
      @Balb_Options_A.draw_item(2, false)
    end
      if Balb_op_a::Inter_op4 != 1         
      @Balb_Options_A.draw_item(3, false)
    end
      if Balb_op_a::Inter_op5 != 1         
      @Balb_Options_A.draw_item(4, false)
    end
      if Balb_op_a::Inter_op6 != 1       
      @Balb_Options_A.draw_item(5, false)
    end
      if Balb_op_a::Inter_op7 != 1         
      @Balb_Options_A.draw_item(6, false)
    end
      if Balb_op_a::Inter_op8 != 1         
      @Balb_Options_A.draw_item(7, false)
    end
      if Balb_op_a::Inter_op9 != 1         
      @Balb_Options_A.draw_item(8, false)
    end
    end
end

####################################################################
class Window_Balb_A_Icon_Command < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 10, spacing = 20)
    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
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end




####################################################################
class Window_A < Window_Base
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, Balb::Op_2)
    draw_icon(Balb::Icon_2,0, WLH, true)
  end
end




Dernière édition par adurna le Lun 29 Mar 2010 - 22:58, édité 1 fois
Revenir en haut Aller en bas
Dudu'
Hamstérophile
Hamstérophile


Nombre de messages: 2060
Age: 21
Capacités: bon
Distinction: Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription: 22/06/2009

MessageSujet: Re: le script   Dim 20 Déc 2009 - 12:59

puis encore:
Code:



module Balb_op_B
Op_1 = "option1"
Op_2 = "option2"
Op_3 = "option3"
Op_4 = "option4"
Op_5 = "option5"
Op_6 = "option6"
Op_7 = "option7"
Op_8 = "option8"
Op_9 = "option9"
Op_10 ="retour"
Icon_1=147
Icon_2=153
Icon_3=144
Icon_4=144
Icon_5=144
Icon_6=144
Icon_7=144
Icon_8=144
Icon_9=144
Icon_10=142

Inter_op1=1
Inter_op2=1
Inter_op3=1
Inter_op4=1
Inter_op5=1
Inter_op6=1
Inter_op7=1
Inter_op8=1
Inter_op9=1

end


class Scene_Balb_B < Scene_Base
def initialize(indexB_inicial = 0)
@indexB_inicial = indexB_inicial
end

def start
super
create_menu_background
create_Balb_Options_B
@B_window = Window_B.new(0, 0)
end

def terminate
super
dispose_menu_background
@Balb_Options_B.dispose
@B_window.dispose
end

def update
super
update_menu_background
@Balb_Options_B.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Balb.new(0)
elsif Input.trigger?(Input::C)
  if Balb_op_B::Inter_op1 != 1 and @Balb_Options_B.index == 0       
      Sound.play_buzzer
        return
          elsif Balb_op_B::Inter_op2 != 1 and @Balb_Options_B.index == 1       
      Sound.play_buzzer
        return
          elsif Balb_op_B::Inter_op3 != 1 and @Balb_Options_B.index == 2       
      Sound.play_buzzer
        return
        elsif Balb_op_B::Inter_op4 != 1 and @Balb_Options_B.index == 3       
      Sound.play_buzzer
        return
        elsif Balb_op_B::Inter_op5 != 1 and @Balb_Options_B.index == 4       
      Sound.play_buzzer
        return
        elsif Balb_op_B::Inter_op6 != 1 and @Balb_Options_B.index == 5       
      Sound.play_buzzer
        return
        elsif Balb_op_B::Inter_op7 != 1 and @Balb_Options_B.index == 6       
      Sound.play_buzzer
        return
        elsif Balb_op_B::Inter_op8 != 1 and @Balb_Options_B.index == 7       
      Sound.play_buzzer
        return
        elsif Balb_op_B::Inter_op9 != 1 and @Balb_Options_B.index == 8       
      Sound.play_buzzer
        return
end
Sound.play_decision

case @Balb_Options_B.index
when 0
$scene = Scene_Menu.new
when 1
$scene = Scene_Menu.new
  when 2
$scene = Scene_Menu.new
 when 3
$scene = Scene_Menu.new
 when 4
$scene = Scene_Menu.new
 when 5
$scene = Scene_Menu.new
 when 6
$scene = Scene_Menu.new
 when 7
$scene = Scene_Menu.new
 when 8
$scene = Scene_Menu.new
when 9
$scene = Scene_Balb.new(0)
end
end
end

def create_Balb_Options_B
    s1 = [Balb_op_B::Icon_1, Balb_op_B::Op_1]
    s2 = [Balb_op_B::Icon_2, Balb_op_B::Op_2]
    s3 = [Balb_op_B::Icon_3, Balb_op_B::Op_3]
    s4 = [Balb_op_B::Icon_4, Balb_op_B::Op_4]
    s5 = [Balb_op_B::Icon_5, Balb_op_B::Op_5]
    s6 = [Balb_op_B::Icon_6, Balb_op_B::Op_6]
    s7 = [Balb_op_B::Icon_7, Balb_op_B::Op_7]
    s8 = [Balb_op_B::Icon_8, Balb_op_B::Op_8]
    s9 = [Balb_op_B::Icon_9, Balb_op_B::Op_9]
    s10 = [Balb_op_B::Icon_10, Balb_op_B::Op_10]
    @Balb_Options_B = Window_Balb_B_Icon_Command .new(172, [s1, s2, s3, s4,s5,s6,s7,s8,s9,s10])
    @Balb_Options_B.index = @indexB_inicial
    @Balb_Options_B.x = Graphics.width/2 - @Balb_Options_B.width/2
    @Balb_Options_B.y =Graphics.height/2 - @Balb_Options_B.height/2
   
   
    if Balb_op_B::Inter_op1 != 1         
      @Balb_Options_B.draw_item(0, false)
    end
    if Balb_op_B::Inter_op2 != 1         
      @Balb_Options_B.draw_item(1, false)
    end
    if Balb_op_B::Inter_op3 != 1         
      @Balb_Options_B.draw_item(2, false)
    end
      if Balb_op_B::Inter_op4 != 1         
      @Balb_Options_B.draw_item(3, false)
    end
      if Balb_op_B::Inter_op5 != 1         
      @Balb_Options_B.draw_item(4, false)
    end
      if Balb_op_B::Inter_op6 != 1       
      @Balb_Options_B.draw_item(5, false)
    end
      if Balb_op_B::Inter_op7 != 1         
      @Balb_Options_B.draw_item(6, false)
    end
      if Balb_op_B::Inter_op8 != 1         
      @Balb_Options_B.draw_item(7, false)
    end
      if Balb_op_B::Inter_op9 != 1         
      @Balb_Options_B.draw_item(8, false)
    end
    end
end


class Window_Balb_B_Icon_Command < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 10, spacing = 20)
    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
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end





####################################################################
class Window_B < Window_Base
  def initialize(x, y)
    super(x, y, 300, (WLH*2) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -4, 128, 32, Balb::Op_1)
    draw_icon(Balb::Icon_1,0, WLH, true)
  end
end




Dernière édition par adurna le Lun 29 Mar 2010 - 22:57, édité 1 fois
Revenir en haut Aller en bas
Dudu'
Hamstérophile
Hamstérophile


Nombre de messages: 2060
Age: 21
Capacités: bon
Distinction: Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription: 22/06/2009

MessageSujet: Re: le script   Dim 20 Déc 2009 - 12:59

sinon y a encore ça:
Code:



module Balb_op_N
Op_1 = "option1"
Op_2 = "option2"
Op_3 = "option3"
Op_4 = "option4"
Op_5 = "option5"
Op_6 = "option6"
Op_7 = "option7"
Op_8 = "option8"
Op_9 = "option9"
Op_10 ="retour"
Icon_1=147
Icon_2=153
Icon_3=144
Icon_4=144
Icon_5=144
Icon_6=144
Icon_7=144
Icon_8=144
Icon_9=144
Icon_10=142

Inter_op1=1
Inter_op2=1
Inter_op3=1
Inter_op4=1
Inter_op5=1
Inter_op6=1
Inter_op7=1
Inter_op8=1
Inter_op9=1

end


class Scene_Balb_N < Scene_Base
def initialize(indexN_inicial = 0)
@indexN_inicial = indexN_inicial
end

def start
super
create_menu_background
create_Balb_Options_N
@N_window = Window_N.new(0, 0)
end

def terminate
super
dispose_menu_background
@Balb_Options_N.dispose
@N_window.dispose
end

def update
super
update_menu_background
@Balb_Options_N.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Balb.new(2)
elsif Input.trigger?(Input::C)
  if Balb_op_N::Inter_op1 != 1 and @Balb_Options_N.index == 0       
      Sound.play_buzzer
        return
          elsif Balb_op_N::Inter_op2 != 1 and @Balb_Options_N.index == 1       
      Sound.play_buzzer
        return
          elsif Balb_op_N::Inter_op3 != 1 and @Balb_Options_N.index == 2       
      Sound.play_buzzer
        return
        elsif Balb_op_N::Inter_op4 != 1 and @Balb_Options_N.index == 3       
      Sound.play_buzzer
        return
        elsif Balb_op_N::Inter_op5 != 1 and @Balb_Options_N.index == 4       
      Sound.play_buzzer
        return
        elsif Balb_op_N::Inter_op6 != 1 and @Balb_Options_N.index == 5       
      Sound.play_buzzer
        return
        elsif Balb_op_N::Inter_op7 != 1 and @Balb_Options_N.index == 6       
      Sound.play_buzzer
        return
        elsif Balb_op_N::Inter_op8 != 1 and @Balb_Options_N.index == 7       
      Sound.play_buzzer
        return
        elsif Balb_op_N::Inter_op9 != 1 and @Balb_Options_N.index == 8       
      Sound.play_buzzer
        return
end
Sound.play_decision

case @Balb_Options_N.index
when 0
$scene = Scene_Menu.new
when 1
$scene = Scene_Menu.new
  when 2
$scene = Scene_Menu.new
 when 3
$scene = Scene_Menu.new
 when 4
$scene = Scene_Menu.new
 when 5
$scene = Scene_Menu.new
 when 6
$scene = Scene_Menu.new
 when 7
$scene = Scene_Menu.new
 when 8
$scene = Scene_Menu.new
when 9
$scene = Scene_Balb.new(2)
end
end
end

def create_Balb_Options_N
    s1 = [Balb_op_N::Icon_1, Balb_op_N::Op_1]
    s2 = [Balb_op_N::Icon_2, Balb_op_N::Op_2]
    s3 = [Balb_op_N::Icon_3, Balb_op_N::Op_3]
    s4 = [Balb_op_N::Icon_4, Balb_op_N::Op_4]
    s5 = [Balb_op_N::Icon_5, Balb_op_N::Op_5]
    s6 = [Balb_op_N::Icon_6, Balb_op_N::Op_6]
    s7 = [Balb_op_N::Icon_7, Balb_op_N::Op_7]
    s8 = [Balb_op_N::Icon_8, Balb_op_N::Op_8]
    s9 = [Balb_op_N::Icon_9, Balb_op_N::Op_9]
    s10 = [Balb_op_N::Icon_10, Balb_op_N::Op_10]
    @Balb_Options_N = Window_Balb_N_Icon_Command .new(172, [s1, s2, s3, s4,s5,s6,s7,s8,s9,s10])
    @Balb_Options_N.index = @indexN_inicial
    @Balb_Options_N.x = 100#Graphics.width/2 - @Balb_Options_N.width/2
    @Balb_Options_N.y =100 #Graphics.height/2 - @Balb_Options_N.height/2
   
   
    if Balb_op_N::Inter_op1 != 1         
      @Balb_Options_N.draw_item(0, false)
    end
    if Balb_op_N::Inter_op2 != 1         
      @Balb_Options_N.draw_item(1, false)
    end
    if Balb_op_N::Inter_op3 != 1         
      @Balb_Options_N.draw_item(2, false)
    end
      if Balb_op_N::Inter_op4 != 1         
      @Balb_Options_N.draw_item(3, false)
    end
      if Balb_op_N::Inter_op5 != 1         
      @Balb_Options_N.draw_item(4, false)
    end
      if Balb_op_N::Inter_op6 != 1       
      @Balb_Options_N.draw_item(5, false)
    end
      if Balb_op_N::Inter_op7 != 1         
      @Balb_Options_N.draw_item(6, false)
    end
      if Balb_op_N::Inter_op8 != 1         
      @Balb_Options_N.draw_item(7, false)
    end
      if Balb_op_N::Inter_op9 != 1         
      @Balb_Options_N.draw_item(8, false)
    end
    end
end


class Window_Balb_N_Icon_Command < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 10, spacing = 20)
    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
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index,enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  def draw_item_name(index, x, y,enabled = true)
    draw_icon(index, x, y, enabled)
  end
end






####################################################################
class Window_N < Window_Base
  def initialize(x, y)
    super(x, y, 540, (WLH) + 32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(100, -4, 128, 32, Balb::Op_3)
    draw_icon(Balb::Icon_3,0, -4, true)
  end
end




Dernière édition par adurna le Lun 29 Mar 2010 - 22:57, édité 1 fois
Revenir en haut Aller en bas
Dudu'
Hamstérophile
Hamstérophile


Nombre de messages: 2060
Age: 21
Capacités: bon
Distinction: Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription: 22/06/2009

MessageSujet: Re: le script   Lun 29 Mar 2010 - 22:57

les script et la démo édité pour 2-3 changement...
il faut aussi y ajouté le system de note et il me reste encore un peut de travail^^
Revenir en haut Aller en bas
 

le script

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» Pbm accès site du script
» [Demande] Améliorer le script matéria.
» [ Résolu ] Lignes de script pour CMS
» Warsmith Script
» [Script Side View Battle] Problème animation & d'effet sonore

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX/VXAce - La Communauté - v3 :: Thématique de recherches-
Web Designers : Widowan, SD-Arius, Coco-Drift & Mist'

|
Forum gratuit | © phpBB | Forum gratuit d'entraide | Contact | Signaler un abus | Créer un forum