RPG Creator : créez votre MMORPG ou RPG sans aucune connaissance en programmation


Disponible le 4 Juin !




- Jouez à votre jeu sur tablettes tactiles, Smartphones et navigateurs Web
- Personnalisez vos menus
- Dessinez facilement et rapidement vos cartes
- Créez des actions pour le combat A-RPG


www.rpgcreator.net


Heures au format UTC + 1 heure [ Heure d’été ]


Règles du forum


Consultez la liste des Scripts : cliquez ici



Publier un nouveau sujet Répondre au sujet  [ 1 message ] 
Auteur Message
 Sujet du message: -----Menu option plus V2.0----- By Adurna
MessagePublié: 25 Sep 2010, 13:13 
Villageois (Nv 1)
Avatar de l’utilisateur

Inscrit le: 25 Sep 2010, 12:02
Messages: 11
Sexe: Masculin
Points d'aide: 28/60

Créations :

Voir ses créations

Menu Option Plus V 2.0


Auteur : Adurna
Version : 2.0
Date : 11/03/10
Description : Un menu différent de celui d'origine avec plus d'options!
Indications pour l'utilisation : Collez ce script au dessus de Main en le nommant : Scene_Menu.
est ajouté les ressource Sel1,Sel2,Sel3,Sel4 et Sel00 dans Graphics/System
Code: Tout sélectionner

#=================================================================#
#                      By Adurna                                                        11/03/10                                                              #
#                                          menu option plus version 2.0                                                                                    #
#=================================================================#
module Cache
  def self.menu(filename)
    load_bitmap("Graphics/System/",filename)
  end
end

  $imported = {} if $imported == nil
$imported["AdurnaMenu"] = true
module Adurna
Obj = "Objet"
Comp = "Compétence"
Equip = "Equiper"
Stat = "Statut"
Sov = "Sauvegarder"
Char = "Charger"
Fin = "Quiter"
Or = "Or"
Note = "note"
Location ="Location :"

Icon_Note=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
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
      @menu_select = Sprite.new
    @menu_select.bitmap = Cache.menu("Sel00")
    @status_window=Window_MenuStatus2.new(220, 58)
    @status_window.opacity = 0
    @location_window = Window_location.new(190, 0)
  #  @location_window.opacity = 0
  @gold = Window_gold.new(0,245)
  #@gold.opacity = 0
    @win_actor =  Window_Vide.new
  #  @win_actor.opacity = 0
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @location_window.dispose
    @menu_select.dispose
    @status_window.dispose
    @win_actor.dispose
    @gold.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
  update_menu_background
  @menu_select.update
  @win_actor.update
  @gold.update
  @status_window.update
    @command_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
      @win_actor.update
    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_Note,Adurna::Note]
    @command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s7])
    @command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s8,s7]) if $imported["ASNS"]
    @command_window.index = @menu_index
    #@command_window.opacity = 0

    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
  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
      end
      Sound.play_decision
       if $imported["ASNS"]
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
          when 6
         $scene = Scene_MenuNote.new
      when 7      # End Game
        $scene = Scene_End.new
        end
      else
        case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
        when 5
          $scene = Scene_File.new(false, false, false)
      when 6      # End Game
        $scene = Scene_End.new
        end
      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
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
def update_actor_selection
    @status_window.update
  case @status_window.index
  when 0
    @win_actor.dispose
    @win_actor =  Window_Actor1.new(0)
    when 1
      @win_actor.dispose
      @win_actor =  Window_Actor1.new(1)
    when 2
      @win_actor.dispose
      @win_actor =  Window_Actor1.new(2)
    when 3
      @win_actor.dispose
      @win_actor =  Window_Actor1.new(3)
    end
  @status_window.update
  case @status_window.index
    when 0
    @menu_select.bitmap = Cache.menu("Sel1")
    when 1
    @menu_select.bitmap = Cache.menu("Sel2")
    when 2
    @menu_select.bitmap = Cache.menu("Sel3")
    when 3
      @menu_select.bitmap = Cache.menu("Sel4")
    end
    @menu_select.z = 10

  #@win_actor.opacity = 0
    if Input.trigger?(Input::B)
      @win_actor.dispose
      @win_actor =  Window_Vide.new
      @menu_select.bitmap = Cache.menu("Sel00")
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      @win_actor = Window_Vide.new
      $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+28)
    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(35, -8, 280, 32, Adurna::Location)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -8, 360, 32, @map_name, 1)
    draw_icon(Adurna::Icon_Loc,8, -4, true)
  end
end

class Window_IconCommand < Window_Selectable
  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 20)
     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
    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_Vide< Window_Base
  def initialize
    super(-544,-416,544,416)
    self.contents = Bitmap.new(width, height)
  end
  def refresh
    self.contents.clear
    end
  end

class Window_Actor1< Window_Base
  def initialize(actor_id)
    super(135,286, 375, 125)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = $game_party.members[actor_id]
    refresh
  end
  def refresh
    self.contents.clear
    if @actor != -1
    draw_actor_face(@actor, 0, 0)
    draw_actor_name(@actor, 100, 10)
    draw_actor_class(@actor, 100, 35)
      draw_actor_level(@actor, 100, 60)
      draw_actor_state(@actor, 200, 60)   
      draw_actor_hp(@actor,  200, 10)
      draw_actor_mp(@actor, 200, 35)   
      end
    end
end

  class Window_MenuStatus2< Window_Selectable
  def initialize(x, y)
    super(x, y, 220, 220)
    self.contents.font.bold = true
    self.contents.font.shadow = true
    self.contents.font.size = 16
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      if actor.index == 0
      draw_actor_graphic(actor, 25, 110)
      elsif actor.index == 1
      draw_actor_graphic(actor, 95, 30)
      elsif actor.index == 2
      draw_actor_graphic(actor, 165, 110)
      elsif actor.index == 3
      draw_actor_graphic(actor,95,  190)
      end
    end
  end
  def update_cursor
  end
end

class Window_gold < Window_Base
  def initialize(x, y)
    super(x, y, 130, (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(-15, -4, 128, 32, Adurna::Or,1)
    self.contents.font.color = normal_color
    self.contents.draw_text(-25, -10+WLH, 140, 42, $game_party.gold, 1)
    draw_icon(Adurna::Icon_Or,0, 0, true)
  end
end



class Scene_End < Scene_Base
def return_scene
    if $imported["ASNS"]
    $scene = Scene_Menu.new(7)
  else
     $scene = Scene_Menu.new(6)
     end
  end
  end


ressource:
Sel1
Image

Sel2
Image

Sel3
Image

Sel4
Image

Sel00
Image

screen:
Image

Et un grand merci à Mist' pour m'avoir aidé à déplanté mon script^^


Haut
 Profil  
 
Afficher les messages depuis:  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 1 message ] 

Heures au format UTC + 1 heure [ Heure d’été ]


Qui est en ligne ?

Utilisateurs parcourant actuellement ce forum : Aucun utilisateur inscrit et 3 invités


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Rechercher pour:
Sauter vers:  
cron
RPG Creative Forum version 5 ; Tous droits réservés
phpBB Group (Traduit par Xaphos)
Optimisé pour une résolution 1024*728