RPG MAKER XP
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

RPG MAKER XP

Vous êtes débutant du logiciel rpg maker xp et vous souhaitez en apprendre plus c'est ici qu'il faut chercher.Vous cherchez ressource, script, tutorial ou autre c'est ici aussi.Bonne visite à vous !
 
AccueilPortailRechercherDernières imagesS'enregistrerConnexion
Le Deal du moment : -28%
Précommande : Smartphone Google Pixel 8a 5G ...
Voir le deal
389 €

 

 Pour créer des potions (part. 2)

Aller en bas 
2 participants
AuteurMessage
Chasseur41
Admin
Admin
Chasseur41


Masculin
Nombre de messages : 49
Age : 31
Localisation : Vendôme (41) et Tours (37)
Loisirs : Création de jeu, musique, livre et sortit
Date d'inscription : 04/07/2007

Feuille de personnage
Prénom du Personnage: Brutus
Nom du Personnage: Macligan
Âge du Personnage: 28 ans

Pour créer des potions (part. 2) Empty
MessageSujet: Pour créer des potions (part. 2)   Pour créer des potions (part. 2) Icon_minitimeMer 4 Juil - 17:08

A la suite de l'ancien script, en ne laissant aucun n'éspace entre les deux sinnon sa ne marche pas.

Code:
#--------------------------------------------------------------------------
  # ● Création de la fenêtre
  #    recipe : Liste des recettes
  #--------------------------------------------------------------------------
  def initialize(recipe)
    super(0, 0, 200, 480)
    @commands = recipe
    @item_max = recipe.size
    self.contents = Bitmap.new(width - 32, self.height - 32)
    self.contents.font.name = 'Monotype Corsiva'
    self.contents.font.size = 20
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● Affichage
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in [email]0...@item_max[/email]
      draw_recipe(i)
    end
  end
  #--------------------------------------------------------------------------
  # ● Fonction d'affichage
  #    index : Position de la recette
  #--------------------------------------------------------------------------
  def draw_recipe(index)
    recipe = @commands[index]
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, $data_items[recipe].name)
  end
end

class Scene_Recipe
  #--------------------------------------------------------------------------
  # ● Principal
  #--------------------------------------------------------------------------
  def main
  @spriteset = Spriteset_Map.new
  @recipe = []
  for i in 1..$data_items.size
    if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] == 20)
      @recipe.push(i)
    end
  end
  @select_window = Window_AlSelect.new(@recipe)
  @recipe_window = Window_AlRecipe.new
  @select_window.active = true
  @select_window.index = 0
  if @recipe.size == 0
    @select_window.index = -1
  end
  @select_window.opacity = 190
  @recipe_window.opacity = 190
      Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @spriteset.dispose
    @select_window.dispose
    @recipe_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● Mise à jour
  #--------------------------------------------------------------------------
  def update
    @select_window.update
    @recipe_window.update(@recipe, @select_window.index)
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Alchimie.new
    end
  end
end
class Scene_Alchimie
  #--------------------------------------------------------------------------
  # ● Principal
  #--------------------------------------------------------------------------
  def main
    @spriteset = Spriteset_Map.new
    @items = []
    @recipe = []
    for i in 1...$data_items.size
      if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] != 20)
        @items.push(i)
      end
    end
    for i in 1..$data_items.size
      if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] == 20)
        @recipe.push(i)
      end
    end
    @itemA_window = Window_AlItem.new(@items, 40)
    @itemB_window = Window_AlItem.new(@items, 230)
    @itemC_window = Window_AlItem.new(@items, 420)
    @res_window = Window_AlRes.new
    @command_window = Window_Command.new(200, ["Créer un objet", "Consulter les recettes", "Annuler"])
    @itemA_window.opacity = 190
    @itemB_window.opacity = 190
    @itemC_window.opacity = 190
    @res_window.opacity = 190
    @command_window.opacity = 190
    @itemA_window.visible = false
    @itemB_window.visible = false
    @itemC_window.visible = false
    @res_window.visible = false
    @itemA_window.active = false
    @itemC_window.active = false
    @itemB_window.active = false
    @command_window.active = true
    @command_window.index = 0
    @command_window.x = 220
    @command_window.y = 180
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      if (@items.size == 0) or (@recipe.size == 0)
        @command_window.disable_item(0)
      end
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @spriteset.dispose
    @itemA_window.dispose
    @itemB_window.dispose
    @itemC_window.dispose
    @res_window.dispose
    @command_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● Mise à jour
  #--------------------------------------------------------------------------
  def update
    @command_window.update
    @itemA_window.update
    @itemB_window.update
    @itemC_window.update
    if @command_window.active
      update_command
      return
    end
    if @itemA_window.active
      update_itemA
      return
    end
    if @itemB_window.active
      update_itemB
      return
    end
    if @itemC_window.active
      update_itemC
      return
    end
    if @res_window.visible
      if Input.trigger?(Input::C)
        $game_system.se_play($data_system.cancel_se)
        $scene = Scene_Map.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● Mise à jour : Menu de commande
  #--------------------------------------------------------------------------
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      case @command_window.index
      when 0
        if (@items.size == 0) or (@recipe.size == 0)
          $game_system.se_play($data_system.buzzer_se)
        else
          @command_window.visible = false
          @itemA_window.visible = true
          @itemB_window.visible = true
          @itemC_window.visible = true
          @command_window.active = false
          @itemA_window.active = true
          @itemA_window.index = 0
          @itemB_window.index = -1
          @itemC_window.index = -1
        end
      when 1
          $scene = Scene_Recipe.new
      when 2
          $game_system.se_play($data_system.cancel_se)
          $scene = Scene_Map.new
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Mise à jour : ItemA
  #--------------------------------------------------------------------------
  def update_itemA
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @itemA_window.visible = false
      @itemB_window.visible = false
      @itemC_window.visible = false
      @itemA_window.active = false
      @itemC_window.active = false
      @itemB_window.active = false
      @command_window.visible = true
      @command_window.active = true
      @command_window.index = 0
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @itemA_window.lose(@itemA_window.index)
      @newb = []
      for i in 1...$data_items.size
        if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] != 20)
          @newb.push(i)
        end
      end
      @itemB_window.update_qty(@newb)
      @itemC_window.update_qty(@newb)
      @itemA_window.active = false
      @itemB_window.active = true
      @itemB_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● Mise à jour : ItemB
  #--------------------------------------------------------------------------
  def update_itemB
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @itemA_window.gain(@itemA_window.index)
      @newb = []
      for i in 1...$data_items.size
        if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] != 20)
          @newb.push(i)
        end
      end
      @itemB_window.update_qty(@newb)
      @itemC_window.update_qty(@newb)
      @itemB_window.active = false
      @itemA_window.active = true
      @itemA_window.index = 0
      @itemB_window.index = -1
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @itemB_window.lose(@itemB_window.index)
      @newc = []
      for i in 1...$data_items.size
        if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] != 20)
          @newc.push(i)
        end
      end
      @itemC_window.update_qty(@newc)
      @itemB_window.active = false
      @itemC_window.active = true
      @itemC_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● Mise à jour : ItemC
  #--------------------------------------------------------------------------
  def update_itemC
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @itemB_window.gain(@itemB_window.index)
      @newc = []
      for i in 1...$data_items.size
        if ($game_party.item_number(i) > 0) and ($data_items[i].element_set[0] != 20)
          @newc.push(i)
        end
      end
      @itemC_window.update_qty(@newc)
      @itemC_window.active = false
      @itemB_window.active = true
      @itemB_window.index = 0
      @itemC_window.index = -1
    end
    if Input.trigger?(Input::C)
      @itemC_window.lose(@itemC_window.index)
      @itemC_window.active = false
      @res_window.visible = true
      @itemA_window.visible = false
      @itemB_window.visible = false
      @itemC_window.visible = false
      inga = @items[@itemA_window.index]
      ingb = @newb[@itemB_window.index]
      ingc = @newc[@itemC_window.index]
      @res_window.make(inga, ingb, ingc)
    end
  end
end


Pour pouvoir l'utilisez, créer un nouvel évenement puis insérez-y ce script:
Code:
$scene = Scene_Alchimie.new

Et voilâ à vous de joué.


Dernière édition par le Mer 29 Aoû - 19:33, édité 3 fois
Revenir en haut Aller en bas
https://legend-rpg-2d.1fr1.net
Ryuuzaki




Masculin
Nombre de messages : 2
Age : 32
Localisation : jura
Loisirs : RPG maker xp
Date d'inscription : 22/08/2007

Pour créer des potions (part. 2) Empty
MessageSujet: Re: Pour créer des potions (part. 2)   Pour créer des potions (part. 2) Icon_minitimeMer 22 Aoû - 18:21

Crying or Very sad ça marche pas ... il y a des "email" partour qui font bugger le script ...

Pourais tu le remettre dans un code comme ceci pour que le texte ne soit pas modifié :

Code:
mettre le script ici

Il me le faut absolument, j'en ai besoin pour mon projet ... Sad
Revenir en haut Aller en bas
Chasseur41
Admin
Admin
Chasseur41


Masculin
Nombre de messages : 49
Age : 31
Localisation : Vendôme (41) et Tours (37)
Loisirs : Création de jeu, musique, livre et sortit
Date d'inscription : 04/07/2007

Feuille de personnage
Prénom du Personnage: Brutus
Nom du Personnage: Macligan
Âge du Personnage: 28 ans

Pour créer des potions (part. 2) Empty
MessageSujet: Re: Pour créer des potions (part. 2)   Pour créer des potions (part. 2) Icon_minitimeMer 29 Aoû - 19:34

C'est bon je vient de changer, dis moi si sa ne vas toujours pas .
Revenir en haut Aller en bas
https://legend-rpg-2d.1fr1.net
Contenu sponsorisé





Pour créer des potions (part. 2) Empty
MessageSujet: Re: Pour créer des potions (part. 2)   Pour créer des potions (part. 2) Icon_minitime

Revenir en haut Aller en bas
 
Pour créer des potions (part. 2)
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» logiciel pour faire des paysages

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG MAKER XP :: Script :: Autres-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser