AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



Le Deal du moment : -20%
Ecran PC GIGABYTE 28″ LED M28U 4K ( IPS, 1 ms, ...
Voir le deal
399 €

Partagez
 

 Problème script menu + quète

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Keismey
Poulet carnivore Lv.2
Poulet carnivore Lv.2
Keismey


Masculin Age : 30
Inscrit le : 29/03/2013
Messages : 15

Problème script menu + quète Empty
MessageSujet: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 15:16

Bonjour,

J'ai voulut pour mon projet utiliser ce script de menu :

https://rpg-maker-vx.bbactif.com/t9208-vx-menu-tales-of

Ainsi que ce script de quêtes :

https://rpg-maker-vx.bbactif.com/t9814-vx-script-de-quete

Or ça ne marche pas ><
Lorsque dans le menu je vais sur quêtes (peu importe qu'il y ai le script de quête ou non), ça me met :

Script 'Menu' line 299: NameError occured.
uninitialized constant Scene_Menu::Scene_Quete

Je n'y connais rien en script, mais j'espère que quelqu'un pourra me venir en aide, tout en m'expliquant ce qu'il a fait afin que j'en apprenne un peu plus Smile
Revenir en haut Aller en bas
RitoJS
Modérateur
Modérateur
RitoJS


Masculin Age : 29
Inscrit le : 22/12/2011
Messages : 1600

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 17:10

L'appel de script est tout simplement mauvais.
Tiens, je l'ai fait pour toi:
Code:
###################################
#Créer par Mog.
#modifier par emixam2 et TheLSSJ
##############
# Game_Actor #
##############
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
###############
# Window_Base #
###############
class Window_Base < Window
def draw_actor_level_menu(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x-199, y+50, 32, WLH, Vocab::level_a)
self.contents.font.color = normal_color
self.contents.draw_text(x-160, y+50, 24, WLH, actor.level, 2)
end
def draw_actor_class_menu(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 85, WLH, actor.class.name)
end
def exp_gauge_color1
return text_color(31)
end
def exp_gauge_color2
return text_color(30)
end
def draw_actor_exp_meter(actor, x, y, width = 100)
if actor.next_exp != 0
exp = actor.now_exp
else
exp = 1
end
gw = width * exp / [actor.next_exp, 1].max
gc1 = exp_gauge_color1
gc2 = exp_gauge_color2
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, "Exp")
self.contents.font.color = normal_color
xr = x + width
self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2)
end
end
#####################
# Window_MenuStatus #
#####################
class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ?????????
  #    x : ?????? X ??
  #    y : ?????? Y ??
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 544, 275)
    refresh
    self.active = false
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, actor.index * 130, 0, 96)
      x = actor.index * 130
      y = 105
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x, y + 20)
      draw_actor_level(actor, x, y + 40)
      draw_actor_state(actor, x, y + 60)
      draw_actor_hp(actor, x, y + 80)
      draw_actor_mp(actor, x, y + 100)
      draw_actor_exp_meter(actor, x , y+35 + WLH * 1)
      end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0              # ??????
      self.cursor_rect.empty
    elsif @index < @item_max    # ??
      if Input.repeat?(Input::RIGHT)
        cursor_down(Input.trigger?(Input::RIGHT))
      end
      if Input.repeat?(Input::LEFT)
        cursor_up(Input.trigger?(Input::LEFT))
      end
      self.cursor_rect.set(@index * 130 - 2, 0, 125, 230)
    elsif @index >= 100        # ??
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                        # ??
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end
###############
# Window_map_name #
###############
class Window_Mapname < Window_Base
def initialize(x, y)
super(x, y+32, 190, WLH + 50)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -8, 120, 32, "Lieux")
self.contents.font.color = normal_color
self.contents.draw_text(4, 15, 120, 32, $game_map.mpname.to_s, 2)
end
end
###############
# Window_Time #
###############
class Window_Time < Window_Base
def initialize(x, y)
super(x, y+7, 190, WLH + 50)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -8, 120, 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 = normal_color
self.contents.draw_text(4, 15, 120, 32, text, 2)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
##############
# Scene_Menu #
##############
class Scene_Menu
def main
start
perform_transition
Input.update
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.update
pre_terminate
Graphics.freeze
terminate
end
def initialize(menu_index = 0)
@menu_index = menu_index
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def dispose_menu_background
@menuback_sprite.dispose
end
def update_menu_background
end
def perform_transition
Graphics.transition(10)
end
def start
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(0, 75)
@playtime_window = Window_Time .new(160, 336)
@mapname_window = Window_Mapname.new(350, 311)
@status_window.openness = 0
@playtime_window.openness = 0
@mapname_window.openness = 0
@gold_window.openness = 0
@status_window.open
@playtime_window.open
@mapname_window.open
@gold_window.open
end
def pre_terminate
@status_window.close
@playtime_window.close
@mapname_window.close
@gold_window.close
@command_window.close
begin
@status_window.update
@playtime_window.update
@mapname_window.update
@gold_window.update
@command_window.update
Graphics.update
end until @status_window.openness == 0
end
def terminate
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@playtime_window.dispose
@mapname_window.dispose
end
def update
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@mapname_window.update
@playtime_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s3 = Vocab::skill
s2 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s7 = "Quêtes"
s6 = Vocab::game_end
@command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6,s7],4 ,2)
@command_window.index = @menu_index
@command_window.openness = 0
@command_window.open
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(2, false)
@command_window.draw_item(1, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
end
end
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
$scene = Scene_Item.new
when 2,1,3
start_actor_selection
when 4
$scene = Scene_File.new(true, false, false)
when 6
$scene = Omegas_Quest.new
when 5   
$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 = 0
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 2
$scene = Scene_Skill.new(@status_window.index)
when 1
$scene = Scene_Equip.new(@status_window.index)
when 3
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true
Suffisait juste de remplacer ça:
Code:
$scene = Scene_Quete.new
Par ça:
Code:
$scene = Omegas_Quest.new
Revenir en haut Aller en bas
http://lunarito.wordpress.com/
Keismey
Poulet carnivore Lv.2
Poulet carnivore Lv.2
Keismey


Masculin Age : 30
Inscrit le : 29/03/2013
Messages : 15

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 19:09

Parfait, ça marche *.* merci beaucoup Very Happy !

Edit : Hum ... Je comprend rien T-T
Il me semble que je dois faire un appel de script pour ajouter ou enlever une quête, mais j'écris quoi ? ><
A la rigueur je m'en fou de l'histoire de variables, il me suffit d'avoir un nom, une image pour savoir si elle est en cours ou accomplis et une description de la quête avec les récompenses, mais je sais pas comment faire T-T
Help Sad
Revenir en haut Aller en bas
RitoJS
Modérateur
Modérateur
RitoJS


Masculin Age : 29
Inscrit le : 22/12/2011
Messages : 1600

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 19:43

Lis les instructions du script. Tout est clairement marqué:
Script de quête a écrit:
# =============================================================================
# Fonctions :
# > Création de quête facilement
# > Un système de progrès suivit de la quêtes par les variables
# > Activation des quêtes par interrupteur
# =============================================================================
#
# INSTRUCTIONS:
#
# Ce script peut paraître embrouillant afin de de créer et configurer ses quêtes,
# mais en lisant la suite vous découvrirez qu'il est très simple d'utilisation.
#
#
# =============================================================================
#
# Phase 1 - Créer votre quête :
#
# Go to the module below.
# Copy and paste the next code template:
#
# QUESTS[ID] = ["NAME",A,B,C,D]
#
# Replace:
#
# ID = The quest ID number.
# "NAME" = The quest name, between quotes " ".
# A = Quest started game switch number.
# B = Quest progress game variable number. (Explained later)
# C = Incomplete quest icon number.
# D = Complete quest icon number.
#
Revenir en haut Aller en bas
http://lunarito.wordpress.com/
Keismey
Poulet carnivore Lv.2
Poulet carnivore Lv.2
Keismey


Masculin Age : 30
Inscrit le : 29/03/2013
Messages : 15

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 20:01

D'accord, je vois comment ajouer une quête au script, comment l'ajouter au menu quête et mettre la variable à 5 pour la valider.
Seulement les étapes n’apparaissent pas, sauf une fois la quête validée et ce peu importe le nombre dans la variable que j'entre.
Désolé mais là je ne vois pas du tout comment faire :/
Revenir en haut Aller en bas
RitoJS
Modérateur
Modérateur
RitoJS


Masculin Age : 29
Inscrit le : 22/12/2011
Messages : 1600

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 20:10

Tu définis la variable de ta quête.
Si ta variable est égale à 1, le script t'affichera la première étape.
Si elle est égale à 2, la deuxième étape...ainsi de suite.
Tu as fait comme ça ?
Revenir en haut Aller en bas
http://lunarito.wordpress.com/
Keismey
Poulet carnivore Lv.2
Poulet carnivore Lv.2
Keismey


Masculin Age : 30
Inscrit le : 29/03/2013
Messages : 15

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 20:30

Oui, dans le script j'ai mis le deuxième chiffre, qui définit la variable, à 100, comme ceci :

Code:
QUESTS[0] = ["  Dormir",81,100,99,101]
  PROGRESS[0] = [
  "Se rendre aux dortoirs pour une bonne nuit de sommeil",
  "Quête accomplie.
Récompense : 0 Or; 0 xp",

Dans l'événement qui active la quête j'ai fais "Modifier une variable" et j'ai mis la variable n°100 à 1.

Ma quête s'affiche en rouge signifiant qu'elle est en cours mais rien dans la description, mais lorsque je valide la quête en modifiant la variable n°100 à 5, la quête est bien verte avec l'étape et la récompense.
Revenir en haut Aller en bas
RitoJS
Modérateur
Modérateur
RitoJS


Masculin Age : 29
Inscrit le : 22/12/2011
Messages : 1600

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 20:41

montre moi ta liste de script parce que chez moi tout marche.
Revenir en haut Aller en bas
http://lunarito.wordpress.com/
Keismey
Poulet carnivore Lv.2
Poulet carnivore Lv.2
Keismey


Masculin Age : 30
Inscrit le : 29/03/2013
Messages : 15

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 20:48

Ma liste de scripts ? C'est a dire ? ^^"

Je n'ai ajouté que 3 scripts :

Un menu pour les combats :

Code:
#==============================================================================
# Menu Oval de Batalha
# Criado por ziifee
#==============================================================================
#==============================
#                         
#                www.rpgmakervx-fr.com                                         
#     
#==============================

module Zii
  # Número identificador do ícone (Vertical x 16 + Horizontal - 1)
  FIGHT = 132                              # Lutar
  ESCAPE = 143                              # Fugir
  ATTACK = 1                                # Atacar
  GUARD = 52                                # Defender
  SKILL = 128                              # Habilidades
  ITEM = 144                                # Itens
 
  # Direção da rotação (Esquerda ou Direita)
  TURN = "Direita"
 
  # Usar faces no menu? ("Faces" para usar e "" para nada)
  STATUS_FACE = "Faces"
 
  # Mostrar nome dos heróis no menu? ("Nomes" para usar e "" para nada)
  STATUS_LINE = "Nomes"
 
  # Tamanho das linhas (Padrão: 20)
  LINE_SIZE = 14
 
  #--------------------------------------------------------------------------
  # Configuração de direção da rotação
  #--------------------------------------------------------------------------
  def self.turn_normal?
    return false if TURN == "Esquerda"
    return true  if TURN == "Direita"
    return true
  end
  #--------------------------------------------------------------------------
  # Configuração de exibição
  #--------------------------------------------------------------------------
  def self.battle_face?
    return true if STATUS_FACE == "Faces"
    return false
  end
  #--------------------------------------------------------------------------
  # Configuração de exibição
  #--------------------------------------------------------------------------
  def self.line_name?
    return true if STATUS_LINE == "Nomes"
    return false
  end
end

#==============================================================================
# Window_Base
#==============================================================================

class Window_Base

  def draw_face(face_name, face_index, x, y, size = 96, opacity = 255)
    bitmap = Cache.face(face_name)
    rect = Rect.new(0, 0, 0, 0)
    rect.x = face_index % 4 * 96 + (96 - size) / 2
    rect.y = face_index / 4 * 96 + (96 - size) / 2
    rect.width = size
    rect.height = size
    self.contents.blt(x, y, bitmap, rect, opacity)
    bitmap.dispose
  end

  def draw_actor_face(actor, x, y, size = 96, opacity = 255)
    draw_face(actor.face_name, actor.face_index, x, y, size, opacity)
  end
end

#==============================================================================
# Window_SpinCommand
#------------------------------------------------------------------------------
# Esta classe comanda a rotação do menu
#==============================================================================

class Window_SpinCommand < Window_Base
  attr_reader  :index
  attr_reader  :help_window

  def initialize(cx, cy, commands, setting = {})
    @radius    = setting.has_key?("R") ? setting["R"] : 40 
    @speed    = setting.has_key?("S") ? setting["S"] : 36 
    @spin_back = setting.has_key?("G") ? setting["G"] : ""
    @spin_line = setting.has_key?("L") ? setting["L"] : nil
    x, y = cx - @radius - 28, cy - @radius - 28
    width = height = @radius * 2 + 56
    super(x, y, width, height)
    self.opacity = 0
    @index = 0
    @commands = commands
    @spin_right = true
    @spin_count = 0
    update_cursor
  end

  def draw_spin_graphic(i, cx, cy)
    case command_kind(i)
    when "icon"
      draw_icon(command_pull(i), cx - 12, cy - 12, command_enabled?(i))

    end
  end

  def refresh
    set_spin
  end

  def draw_item(index, enabled = true)
    @commands[index][3] = enabled
    set_spin
  end
 
  def command_name(index = @index)
    return "" if index < 0
    name = @commands[index][0]
    return name != nil ? name : ""
  end
 
  def command_kind(index)
    result = @commands[index][1]
    return result != nil ? result : ""
  end
 
  def command_pull(index)
    result = @commands[index][2]
    return result != nil ? result : ""
  end
 
  def command_enabled?(index)
    result = @commands[index][3]
    return result != nil ? result : true
  end
 
  def set_index(name)
    n = -1
    for i in 0...@commands.size
      n = i if @commands[i][0] == name
    end
    @index = n if n >= 0
    update_cursor
    call_update_help
    set_spin
  end
 
  def index=(index)
    @index = index
    update_cursor
    call_update_help
    set_spin
  end
 
  def center_x
    return contents.width / 2
  end

  def center_y
    return contents.height / 2
  end

  def item_max
    return @commands.size
  end

  def set_background
    return if @spin_back == ""
    bitmap = Cache.system(@spin_back)
    rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    self.contents.blt(12, 12, bitmap, rect)
  end

  def set_text
    return if @spin_line == nil
    y = center_y - WLH / 2 + @spin_line
    self.contents.draw_text(center_x - 48, y, 96, WLH, command_name, 1)
  end

  def angle_size
    return (Math::PI * 2 / item_max)
  end

  def set_spin_count
    @spin_count = angle_size * 360 / @speed
    set_spin(true)
  end

  def set_spin(spin = false)
    self.contents.clear
    set_background
    angle = spin ? @speed * @spin_count / 360 : 0
    angle = @spin_right ? angle : -angle
    for i in 0...item_max
      n = (i - @index) * angle_size + angle
      cx = @radius * Math.sin(n) + center_x
      cy = - @radius * Math.cos(n) + center_y
      draw_spin_graphic(i, cx, cy)
    end
    set_text
  end

  def update
    super
    update_cursor
    if @spin_count > 0
      @spin_count -= 1
      set_spin(@spin_count >= 1)
      return
    end
    update_command
  end

  def command_movable?
    return false if @spin_count > 0
    return false if (not visible or not active)
    return false if (index < 0 or index > item_max or item_max == 0)
    return false if (@opening or @closing)
    return true
  end

  def command_right
    @index = (@index + 1) % item_max
    @spin_right = true
    set_spin_count
  end

  def command_left
    @index = (@index - 1 + item_max) % item_max
    @spin_right = false
    set_spin_count
  end

  def update_command
    if command_movable?
      if Input.press?(Input::RIGHT)
        Sound.play_cursor
        Zii.turn_normal? ? command_right : command_left
      end
      if Input.press?(Input::LEFT)
        Sound.play_cursor
        Zii.turn_normal? ? command_left : command_right
      end
    end
    call_update_help
  end

  def update_cursor
    if @index < 0
      self.cursor_rect.empty
    else
      rect = Rect.new(0, 0, 24, 24)
      rect.x = center_x - rect.width / 2
      rect.y = center_y - rect.height / 2 - @radius
      self.cursor_rect = rect
    end
  end

  def help_window=(help_window)
    @help_window = help_window
    call_update_help
  end

  def call_update_help
    if self.active and @help_window != nil
      update_help
    end
  end

  def update_help
  end
end

#==============================================================================
# Window_LineHelp
#==============================================================================

class Window_LineHelp < Window_Base

  def initialize
    super(-16, 0, 576, WLH + 32)
    self.opacity = 0
  end

  def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      back_color = Color.new(0, 0, 0, 80)
      self.contents.fill_rect(0, y = 12, contents.width, WLH - y, back_color)
      self.contents.font.color = normal_color
      self.contents.draw_text(20, 0, self.width - 72, WLH, text, align)
      @text = text
      @align = align
    end
  end
end

#==============================================================================
# Window_PartyCommand
#==============================================================================

class Window_PartyCommand < Window_SpinCommand
  def initialize
    s1 = [Vocab::fight,  "icon", Zii::FIGHT,  true]
    s2 = [Vocab::escape, "icon", Zii::ESCAPE, $game_troop.can_escape]
    setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
    super(72, 356, [s1, s2], setting)
    self.active = false
    set_spin
  end
end

#==============================================================================
# Window_ActorCommand
#==============================================================================

class Window_ActorCommand < Window_SpinCommand

  def initialize
    s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
    s2 = [Vocab::skill,  "icon", Zii::SKILL,  true]
    s3 = [Vocab::guard,  "icon", Zii::GUARD,  true]
    s4 = [Vocab::item,  "icon", Zii::ITEM,  true]
    setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
    super(72, 356, [s1, s2, s3, s4], setting)
    self.active = false
    set_spin
  end

  def setup(actor)
    @commands[0][2] = Zii::ATTACK
    @commands[1][0] = Vocab::skill
    if actor.weapons[0] != nil
      n = actor.weapons[0].icon_index
      @commands[0][2] = n if n > 0
    end
    @commands[1][0] = actor.class.skill_name if actor.class.skill_name_valid
    self.index = 0
    set_spin
  end
end

#==============================================================================
# Window_BattleStatus
#==============================================================================

class Window_BattleStatus < Window_Selectable

  def initialize
    super(128, 288, 416, 128)
    @column_max = 4
    refresh
    self.active = false
    self.opacity = 0
  end

  def draw_neomemo7_back
    @neomemo7_clear = false
    for index in 0...@item_max
      x = index * 96
      self.contents.clear_rect(x + 72, WLH * 3, 24, 24)
      next unless Zii.battle_face?
      actor = $game_party.members[index]
      next if actor.hp <= 0
      bitmap = Cache.face(actor.face_name)
      rect = Rect.new(0, 0, 22, 22)
      rect.x = actor.face_index % 4 * 96 + 72
      rect.y = actor.face_index / 4 * 96 + 72
      self.contents.blt(x + 72, WLH * 3, bitmap, rect, 192)
    end
  end

  def draw_item(index)
    x = index * 96
    rect = Rect.new(x, 0, 96, 96)
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    actor = $game_party.members[index]
    draw_actor_face(actor, x + 2, 2, 92, 192) if actor.hp > 0 and Zii.battle_face?
    draw_actor_state(actor, x + 72, WLH * 3)
    if Zii.line_name?
      self.contents.font.color = hp_color(actor)
      size = Zii::LINE_SIZE
      self.contents.font.size = size
      self.contents.draw_text(x, WLH * 1 + 20 - size, 80, WLH, actor.name)
      self.contents.font.size = 20
    end
    draw_actor_hp(actor, x, WLH * 2, 80)
    draw_actor_mp(actor, x, WLH * 3, 70)
  end
  def update_cursor
    if @index < 0                 
      self.cursor_rect.empty
    else                         
      rect = Rect.new(index * 96, 0, 96, 96)
      self.cursor_rect = rect
    end
  end
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base

  alias :neomemo13_create_info_viewport :create_info_viewport
  def create_info_viewport
    neomemo13_create_info_viewport
    @info_viewport.rect.set(0, 0, 544, 416)
    @status_window.x = 128
    @actor_command_window.x = 4
  end

  alias :neomemo13_update_info_viewport :update_info_viewport
  def update_info_viewport
    ox = @info_viewport.ox
    neomemo13_update_info_viewport
    @info_viewport.ox = ox
  end

  alias :neomemo13_start_party_command_selection :start_party_command_selection
  def start_party_command_selection
    if $game_temp.in_battle
      @party_command_window.visible = true
      @actor_command_window.visible = false
    end
    neomemo13_start_party_command_selection
  end

  alias :neomemo13_update_party_command_selection :update_party_command_selection
  def update_party_command_selection
    return unless @party_command_window.command_movable?
    neomemo13_update_party_command_selection
  end

  alias :neomemo13_start_actor_command_selection :start_actor_command_selection
  def start_actor_command_selection
    neomemo13_start_actor_command_selection
    @party_command_window.visible = false
    @actor_command_window.visible = true
  end

  alias :neomemo13_update_actor_command_selection :update_actor_command_selection
  def update_actor_command_selection
    return unless @actor_command_window.command_movable?
    neomemo13_update_actor_command_selection
  end

  alias :neomemo13_start_target_enemy_selection :start_target_enemy_selection
  def start_target_enemy_selection
    x = @info_viewport.rect.x
    ox = @info_viewport.ox
    neomemo13_start_target_enemy_selection
    @info_viewport.rect.x = x
    @info_viewport.ox = ox
    @target_enemy_window.x = 544 - @target_enemy_window.width
    @target_enemy_window.y = 288
    @info_viewport.rect.width -= @target_enemy_window.width
  end

  alias :neomemo13_end_target_enemy_selection :end_target_enemy_selection
  def end_target_enemy_selection
    x = @info_viewport.rect.x
    ox = @info_viewport.ox
    @info_viewport.rect.width += @target_enemy_window.width
    neomemo13_end_target_enemy_selection
    @info_viewport.rect.x = x
    @info_viewport.ox = ox
  end

  alias :neomemo13_start_target_actor_selection :start_target_actor_selection
  def start_target_actor_selection
    x = @info_viewport.rect.x
    ox = @info_viewport.ox
    neomemo13_start_target_actor_selection
    @target_actor_window.y = 288
    @info_viewport.rect.x = x
    @info_viewport.ox = ox
    @info_viewport.rect.width -= @target_actor_window.width
  end

  alias :neomemo13_end_target_actor_selection :end_target_actor_selection
  def end_target_actor_selection
    x = @info_viewport.rect.x
    ox = @info_viewport.ox
    @info_viewport.rect.width += @target_actor_window.width
    neomemo13_end_target_actor_selection
    @info_viewport.rect.x = x
    @info_viewport.ox = ox
  end

  alias :neomemo13_start_skill_selection :start_skill_selection
  def start_skill_selection
    neomemo13_start_skill_selection
    @skill_window.dispose if @skill_window != nil
    @help_window.dispose if @help_window != nil
    @help_window = Window_LineHelp.new
    @skill_window = Window_Skill.new(8, 64, 528, 216, @active_battler)
    @skill_window.help_window = @help_window
  end

  alias :neomemo13_start_item_selection :start_item_selection
  def start_item_selection
    neomemo13_start_item_selection
    @item_window.dispose if @item_window != nil
    @help_window.dispose if @help_window != nil
    @help_window = Window_LineHelp.new
    @item_window = Window_Item.new(8, 64, 528, 216)
    @item_window.help_window = @help_window
  end
end

Mon menu :

Code:
###################################
#Créer par Mog.
#modifier par emixam2 et TheLSSJ
##############
# Game_Actor #
##############
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
###############
# Window_Base #
###############
class Window_Base < Window
def draw_actor_level_menu(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x-199, y+50, 32, WLH, Vocab::level_a)
self.contents.font.color = normal_color
self.contents.draw_text(x-160, y+50, 24, WLH, actor.level, 2)
end
def draw_actor_class_menu(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 85, WLH, actor.class.name)
end
def exp_gauge_color1
return text_color(31)
end
def exp_gauge_color2
return text_color(30)
end
def draw_actor_exp_meter(actor, x, y, width = 100)
if actor.next_exp != 0
exp = actor.now_exp
else
exp = 1
end
gw = width * exp / [actor.next_exp, 1].max
gc1 = exp_gauge_color1
gc2 = exp_gauge_color2
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, "Exp")
self.contents.font.color = normal_color
xr = x + width
self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2)
end
end
#####################
# Window_MenuStatus #
#####################
class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ?????????
  #    x : ?????? X ??
  #    y : ?????? Y ??
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 544, 275)
    refresh
    self.active = false
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, actor.index * 130, 0, 96)
      x = actor.index * 130
      y = 105
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x, y + 20)
      draw_actor_level(actor, x, y + 40)
      draw_actor_state(actor, x, y + 60)
      draw_actor_hp(actor, x, y + 80)
      draw_actor_mp(actor, x, y + 100)
      draw_actor_exp_meter(actor, x , y+35 + WLH * 1)
      end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0              # ??????
      self.cursor_rect.empty
    elsif @index < @item_max    # ??
      if Input.repeat?(Input::RIGHT)
        cursor_down(Input.trigger?(Input::RIGHT))
      end
      if Input.repeat?(Input::LEFT)
        cursor_up(Input.trigger?(Input::LEFT))
      end
      self.cursor_rect.set(@index * 130 - 2, 0, 125, 230)
    elsif @index >= 100        # ??
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                        # ??
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end
###############
# Window_map_name #
###############
class Window_Mapname < Window_Base
def initialize(x, y)
super(x, y+32, 190, WLH + 50)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -8, 120, 32, "Lieux")
self.contents.font.color = normal_color
self.contents.draw_text(4, 15, 120, 32, $game_map.mpname.to_s, 2)
end
end
###############
# Window_Time #
###############
class Window_Time < Window_Base
def initialize(x, y)
super(x, y+7, 190, WLH + 50)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -8, 120, 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 = normal_color
self.contents.draw_text(4, 15, 120, 32, text, 2)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
##############
# Scene_Menu #
##############
class Scene_Menu
def main
start
perform_transition
Input.update
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.update
pre_terminate
Graphics.freeze
terminate
end
def initialize(menu_index = 0)
@menu_index = menu_index
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def dispose_menu_background
@menuback_sprite.dispose
end
def update_menu_background
end
def perform_transition
Graphics.transition(10)
end
def start
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(0, 75)
@playtime_window = Window_Time .new(160, 336)
@mapname_window = Window_Mapname.new(350, 311)
@status_window.openness = 0
@playtime_window.openness = 0
@mapname_window.openness = 0
@gold_window.openness = 0
@status_window.open
@playtime_window.open
@mapname_window.open
@gold_window.open
end
def pre_terminate
@status_window.close
@playtime_window.close
@mapname_window.close
@gold_window.close
@command_window.close
begin
@status_window.update
@playtime_window.update
@mapname_window.update
@gold_window.update
@command_window.update
Graphics.update
end until @status_window.openness == 0
end
def terminate
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@playtime_window.dispose
@mapname_window.dispose
end
def update
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@mapname_window.update
@playtime_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s3 = Vocab::skill
s2 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s7 = "Quêtes"
s6 = Vocab::game_end
@command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6,s7],4 ,2)
@command_window.index = @menu_index
@command_window.openness = 0
@command_window.open
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(2, false)
@command_window.draw_item(1, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
end
end
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
$scene = Scene_Item.new
when 2,1,3
start_actor_selection
when 4
$scene = Scene_File.new(true, false, false)
when 6
$scene = Omegas_Quest.new
when 5   
$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 = 0
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 2
$scene = Scene_Skill.new(@status_window.index)
when 1
$scene = Scene_Equip.new(@status_window.index)
when 3
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true

Et le script de quête :

Code:
#  Description:
#    Ce script vous permet mettre en oeuvre un système de quête dans votre jeu.
#    Il est facile à configurer, lisez les instructions ci-dessous.
# =============================================================================
#  Fonctions :
#    > Création de quête facilement
#    > Un système de progrès suivit de la quêtes par les variables
#    > Activation des quêtes par interrupteur
# =============================================================================
#
#  INSTRUCTIONS:
#
#  Ce script peut paraître embrouillant afin de de créer et configurer ses quêtes,
#  mais en lisant la suite vous découvrirez qu'il est très simple d'utilisation.
#
#
# =============================================================================
#
#  Phase 1 - Créer votre quête :
#
#    Go to the module below.
#    Copy and paste the next code template:
#
#    QUESTS[ID] = ["NAME",A,B,C,D]
#
#    Replace:
#
#    ID = The quest ID number.
#    "NAME" = The quest name, between quotes " ".
#    A = Quest started game switch number.
#    B = Quest progress game variable number.  (Explained later)
#    C = Incomplete quest icon number.
#    D = Complete quest icon number.
#
# =============================================================================
#
#  Step 2 - Create Your Quest Progress.
#
#  Progress is the text line that appears when the player completed
#  a part of the quest.
#  When all progress text lines have been unlocked (player completed
#  all quest parts), the quest will become completed.
#
#  So, if the quest has 5 progress text lines, after the player
#  has completed each of the 5 achievements, the quest will become
#  completed.
#
#  The quest progress is controlled by a game variable, designated
#  when you made the quest.
#
#  If the game variable value is 4, and the quest progress lines
#  are 5, then the quest scene will only show 4 progress lines
#  and the quest would be incomplete.
#
#  If the variable is 5, or higher, however...
#  The quest would be completed.
#
#  It's better to look at the demo.
#
#  Copy and paste the next code template:
#
#  PROGRESS[ID] = ["Text"]
#
#  Replace:
#
#  ID = ID of the quest.
#  "Text" is a progress line.
#  You can make multiple progress lines, between quotes " ",
#  and each divided by a comma.
#
#  Important Tip!
#  The final progress line should be "Quest Completed"
#  or something like that, you will know when the time comes =).
#  Oh, don't want to wait? Ok.
#  The quest is completed when the last progress line is
#  unlocked, so that's it.
#
# =============================================================================



module OMEGAS7_QUEST
 

  QUESTS = []  # <-- Don't Edit.
  PROGRESS = []  # <-- Don't Edit.
 
 
 
  # Text before each of the progress lines.
  PROGRESS_PREFIX = ">"

 
 

# QUESTS[ID] = ["Name",Switch,Variable,Incomplete Icon,Complete Icon.]
# PROGRESS[ID] = ["Text.","Text"...]


# ~~~~~~~~~~
  QUESTS[0] = ["  Dormir",81,100,99,101]
  PROGRESS[0] = [
  "Se rendre aux dortoirs pour une bonne nuit de sommeil",
  "Quête accomplie.
Récompense : 0 Or; 0 xp",
  ]
# ~~~~~~~~~~
 
 QUESTS[1] = ["Coca Cola",152,85,99,101]
  PROGRESS[1] = [
  "Trouver du coca cola.",
  "Pui acheter de l'orangina.",
  "Quête accomplie.
Récompense : 250 Or; 150 xp chacun",
  ] 
 
end

class Omegas_Quest < Scene_Base
 
  include OMEGAS7_QUEST
 
  def initialize
    @commands = []
    @progress = []
  end
 
  def start
    create_menu_background
    create_commands
  end
 
  def create_commands
    for i in 0...QUESTS.size
      if $game_switches[QUESTS[i][1].to_i] == true
        @commands[i] = []
        @commands[i][0] = QUESTS[i][0].to_s  # Quest Name.
        @commands[i][1] = true if $game_variables[QUESTS[i][2].to_i] >= PROGRESS[i].size
        @commands[i][1] = false if $game_variables[QUESTS[i][2].to_i] < PROGRESS[i].size
        @commands[i][2] = QUESTS[i][3]
        @commands[i][3] = QUESTS[i][4]
        @commands[i][4] = QUESTS[i][2].to_i
        @progress[i] = PROGRESS[i]
      end
    end
    @command_window = Omegas_Quest_Window_Command.new(180,@commands.compact)
    @command_window.height = 416 - 60
    @info_window = Omegas_Quest_Info_Window.new(@command_window.index,@commands.compact,@progress.compact)
    @help_window = Omegas_Quest_Help_Window.new
  end
       
  def update
    @command_window.update
    @info_window.update(@command_window.index)
    if Input.trigger?(Input::B)
      @command_window.dispose
      @info_window.dispose
      @help_window.dispose
      $scene = Scene_Map.new
    end
  end
   
end



class Omegas_Quest_Window_Command < Window_Selectable

  attr_reader  :commands

  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
    if @commands.size == 0
      @commands = ["Aucun."]
      @item_max = @commands.size
      refresh_old
    else
      refresh
    end
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end
 
  def refresh_old
    self.contents.clear
    for i in 0...@item_max
      draw_item_old(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
    if @commands[index][1] == true
      self.contents.font.color = text_color(3)
      @icon = @commands[index][3]
    else
      self.contents.font.color = text_color(18)
      @icon = @commands[index][2]
    end
    self.contents.draw_text(rect, "  " + @commands[index][0].to_s)
    draw_icon(@icon.to_i,0,WLH * index)
  end
 
  def draw_item_old(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, "Aucun.")
  end
 
end

class Omegas_Quest_Info_Window < Window_Base
  include OMEGAS7_QUEST
  def initialize(index,quests,progress)
    @index = index
    @progress = progress
    @quests = quests
    super(180,0,544 - 180,416 - 60)
    self.contents.font.size = 16
    refresh
  end
  def refresh
    self.contents.clear
    @line = 0
    if @progress[@index] != nil
      for i in 0...@progress[@index].size
        if $game_variables[@quests[@index][4].to_i] >= i + 1
          self.contents.draw_text(0,@line * WLH,544 - 180,WLH,PROGRESS_PREFIX.to_s + @progress[@index][i].to_s)
          @line += 1
        end
      end
    elsif @progress[@index] == nil
      self.contents.draw_text(0,0,544 - 180,30,"-----")
    end
  end
  def update(index)
    @new_index = index
    if @index != @new_index
      @index = @new_index
      refresh
    end
  end
end


class Omegas_Quest_Help_Window < Window_Base
  include OMEGAS7_QUEST
  def initialize
    super(0,416 - 60,544,60)
    @started = 0
    @completed = 0
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.size = 18
    for i in 0...QUESTS.size
      if $game_switches[QUESTS[i][1].to_i] == true
        @started += 1
        if $game_variables[QUESTS[i][2].to_i] >= PROGRESS[i].size
          @completed += 1
        end
      end
    end
    self.contents.draw_text(0,0,544,30,"Quêtes: " + @completed.to_s + " / " + @started.to_s)
  end
end
Revenir en haut Aller en bas
RitoJS
Modérateur
Modérateur
RitoJS


Masculin Age : 29
Inscrit le : 22/12/2011
Messages : 1600

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 21:15

Alors t'as forcément du foirer un truc.
Revenir en haut Aller en bas
http://lunarito.wordpress.com/
Keismey
Poulet carnivore Lv.2
Poulet carnivore Lv.2
Keismey


Masculin Age : 30
Inscrit le : 29/03/2013
Messages : 15

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 21:18

Surement :/ Je vais essayer des trucs et je tiens au courant Smile

Edit : Ho merde je suis vraiment désolé ... L'erreur venait de mon event, j'avais modifié la variable dans la mauvaise page ><

Vraiment désolé et encore merci beaucoup Smile
Revenir en haut Aller en bas
RitoJS
Modérateur
Modérateur
RitoJS


Masculin Age : 29
Inscrit le : 22/12/2011
Messages : 1600

Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitimeMer 3 Avr 2013 - 21:48

Tant que le problème est résolu c'est bon.
Je déplace.
Revenir en haut Aller en bas
http://lunarito.wordpress.com/
Contenu sponsorisé




Problème script menu + quète Empty
MessageSujet: Re: Problème script menu + quète   Problème script menu + quète Icon_minitime

Revenir en haut Aller en bas
 

Problème script menu + quète

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

 Sujets similaires

-
» Probleme avec le script d'invocation de Blockade (en fait, le script marche, c'est un probleme sur le menu)
» Script de syteme de quête dans le menu
» Problème avec le script de quête
» Problème d'utilisation de script pour quête
» [Résolu]Problème script de menu

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Problèmes et Solutions :: Résolu-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit