Oniromancie: Scripts - Tableau d'Actions


Comment ça marche?

Aëdemphia
Par Sylvanor

Fighting Robots Quest
Par Boulon

Forstale
Par Ødd Clock

Geex
Par roys

Inexistence
Par Falco

La Légende d'Ibabou
Par Zaitan

Lije
Par Gaetz

LoveMaster
Par Cuddlefox

Sarcia
Par Kaëlar

Super Mario RPG - Lost Souls
Par Omegabowser

News: Concours des Alex d'Or 2017-18: (...) / News: MegaMaker : créez votre propre (...) / News: Test de Tinker Quarry / Sorties: Leave the Room / Jeux: Leave the Room /

Chat  (50 connectés)

Bienvenue
visiteur !






publicité RPG Maker!

Statistiques

Liste des
membres


Contact

71 connectés actuellement

9178703 visiteurs
depuis l'ouverture

1317 visiteurs
aujourd'hui

Groupe Facebook

Barre de séparation

Partenaires




TOP
GAMEMAKING


Les 5 plus
visités

Lunae, le baz'arts d'Emz0

Le studio du chat vert

Pixelandgame

Tashiroworld

HeyMakeGames

Au hasard

RPG Maker Revolution

La maison des Makers

RMXP Forum

Les deux derniers

Lunae, le baz'arts d'Emz0

Le studio du chat vert

Nos autres partenaires

Devenir
partenaire


Barre de séparation

Un site du réseau
War Paradise

Annuaires référenceurs





Tableau d'Actions
Script pour RPG Maker XP
Ecrit par Dark Lord

Bonjour, je vous présente aujourd'hui mon premier script!!! Sonic

Ok ok plus sérieusement, vous vous demander a quoi sa sert? Bin c'est fais pour ceux qui font des jobs comme bûcheron, pécheur , ou des habiletés comme courir, sauter, grimper dans leur jeu. Sa affiche leur "compétence et ont peut les modifiés grâce a des points d'actions. Il peut et doit y avoir en tous 12 actions. Les actions peuvent etre modifiées, augmentées, descendues n'importe quand et n'importe ou.

Sont utilisation: pour modifier le nom des actions et créer vos propres actions aller a la ligne : 110, la vous avez d'écris a la fin de la ligne "Action", remplacer par le nom d'action que vous voulez, ainsi de suite jusqu'a la ligne 121. Après réécrivaient Aux lignes 146 a 157, vos Actions (les meme que de 110 a 121) puis encore les mêmes de 330 a 331. Maintenant retourner a la ligne 122 et écrivez a la place de utilisation, la description de votre première action puis a 123 la description de votre 2 ainsi de suite jusqu'a 133.

Les niveaux et point d'Actions de vos Actions sont géraient en variable du jeu, la variable 26 est la première action et 37 la dernière, la variable 38 défini le nombre de point d'action. Donc si vous complétez une mission dans le jeu, vous pouvez faire dire a un gas qui a donner une mission :

Message: Ho merci beaucoup
variable 38 : + 3
Message: Vous avez gagner 3 point d'action

Ou sinon :

Message: Ho merci beaucoup
Variable 26: +1
Message: Niveau bucheron Augmenter!!!
etc etc...

Quelque images:
image
image
image


Le script:
(Vous dever le coler au dessu de main)Cette nouvelle option du jeu peut etre accessible depuis le menu d'un jeu.


Portion de code:



class Window_Gold < Window_Base
  def initialize
    super(0, 0, 160, 52)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -8, 120-cx-2, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(124-cx, -8, cx, 32, $data_system.words.gold, 2)
  end
end
class Window_PlayTime < Window_Base
  def initialize
    super(0, 0, 160, 86)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -8, 130, 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, 28, 120, 32, text, 2)
  end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
class Window_Steps < Window_Base
  def initialize
    super(0, 0, 160, 86)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -8, 130, 32, "Nombre de pas")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 28, 120, 32, $game_party.steps.to_s, 2)
  end
end
class Window_Action < Window_Base
  def initialize
    super(0, 0, 240, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(70, -2, 300, 32, "Action")
  end
end
class Window_Point_Action < Window_Base
  def initialize
    super(0, 0, 220, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(4, -2, 300, 32, "Point d'action :   " + $game_variables[38].to_s)
  end
end
class Window_Action_Niveau < Window_Base
  def initialize
    super(0, 0, 105, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(4, -2, 300, 32, "Niveau")
  end
end
class Window_Information_Action< Window_Base
  def initialize
    super(0, 0, 640, 417)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(4, -2, 300, 32, "Action")
    self.contents.draw_text(4, 30, 300, 32, "Action")
    self.contents.draw_text(4, 62, 300, 32, "Action")
    self.contents.draw_text(4, 94, 300, 32, "Action")
    self.contents.draw_text(4, 126, 300, 32, "Action")
    self.contents.draw_text(4, 158, 300, 32, "Action")
    self.contents.draw_text(4, 190, 300, 32, "Action")
    self.contents.draw_text(4, 222, 300, 32, "Action")
    self.contents.draw_text(4, 254, 300, 32, "Action")
    self.contents.draw_text(4, 286, 300, 32, "Action")
    self.contents.draw_text(4, 318, 300, 32, "Action")
    self.contents.draw_text(4, 350, 300, 32, "Action")
    self.contents.draw_text(260, -2, 300, 32, "Utilisation")
    self.contents.draw_text(260, 30, 300, 32, "Utilisation")
    self.contents.draw_text(260, 62, 300, 32, "Utilisation")
    self.contents.draw_text(260, 94, 300, 32, "Utilisation")
    self.contents.draw_text(260, 126, 300, 32, "Utilisation")
    self.contents.draw_text(260, 158, 300, 32, "Utilisation")
    self.contents.draw_text(260, 190, 300, 32, "Utilisation")
    self.contents.draw_text(260, 222, 300, 32, "Utilisation")
    self.contents.draw_text(260, 254, 300, 32, "Utilisation")
    self.contents.draw_text(260, 286, 300, 32, "Utilisation")
    self.contents.draw_text(260, 318, 300, 32, "Utilisation")
    self.contents.draw_text(260, 350, 300, 32, "Utilisation")
  end
end
class Window_Player_Action < Window_Base
  def initialize
    super(0, 0, 345, 420)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(4, -2, 300, 32, "Action")
    self.contents.draw_text(4, 30, 300, 32, "Action")
    self.contents.draw_text(4, 62, 300, 32, "Action")
    self.contents.draw_text(4, 94, 300, 32, "Action")
    self.contents.draw_text(4, 126, 300, 32, "Action")
    self.contents.draw_text(4, 158, 300, 32, "Action")
    self.contents.draw_text(4, 190, 300, 32, "Action")
    self.contents.draw_text(4, 222, 300, 32, "Action")
    self.contents.draw_text(4, 254, 300, 32, "Action")
    self.contents.draw_text(4, 286, 300, 32, "Action")
    self.contents.draw_text(4, 318, 300, 32, "Action")
    self.contents.draw_text(4, 350, 300, 32, "Action")
    self.contents.draw_text(275, -2, 300, 32, $game_variables[26].to_s)
    self.contents.draw_text(275, 30, 300, 32, $game_variables[27].to_s)
    self.contents.draw_text(275, 62, 300, 32, $game_variables[28].to_s)
    self.contents.draw_text(275, 94, 300, 32, $game_variables[29].to_s)
    self.contents.draw_text(275, 126, 300, 32, $game_variables[30].to_s)
    self.contents.draw_text(275, 158, 300, 32, $game_variables[31].to_s)
    self.contents.draw_text(275, 190, 300, 32, $game_variables[32].to_s)
    self.contents.draw_text(275, 222, 300, 32, $game_variables[33].to_s)
    self.contents.draw_text(275, 254, 300, 32, $game_variables[34].to_s)
    self.contents.draw_text(275, 286, 300, 32, $game_variables[35].to_s)
    self.contents.draw_text(275, 318, 300, 32, $game_variables[36].to_s)
    self.contents.draw_text(275, 350, 300, 32, $game_variables[37].to_s)
  end
end
class Window_Actionst < Window_Base
  def initialize
    super(0, 0, 100, 448)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(4, -2, 300, 32, "Niveau")
    self.contents.draw_text(4, 30, 300, 32, $game_variables[26].to_s)
    self.contents.draw_text(4, 62, 300, 32, $game_variables[27].to_s)
    self.contents.draw_text(4, 94, 300, 32, $game_variables[28].to_s)
    self.contents.draw_text(4, 126, 300, 32, $game_variables[29].to_s)
    self.contents.draw_text(4, 158, 300, 32, $game_variables[30].to_s)
    self.contents.draw_text(4, 190, 300, 32, $game_variables[31].to_s)
    self.contents.draw_text(4, 222, 300, 32, $game_variables[32].to_s)
    self.contents.draw_text(4, 254, 300, 32, $game_variables[33].to_s)
    self.contents.draw_text(4, 286, 300, 32, $game_variables[34].to_s)
    self.contents.draw_text(4, 318, 300, 32, $game_variables[35].to_s)
    self.contents.draw_text(4, 350, 300, 32, $game_variables[36].to_s)
    self.contents.draw_text(4, 382, 300, 32, $game_variables[37].to_s)
  end
end
class Scene_Index_Action
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = "Augmenter" 
    s2 = "Plus D'info"
    s3 = "Retour"
    @command_window = Window_Command.new(220, [s1, s2, s3])
    @command_window.index = @menu_index
    @command_window.x = 145 - @command_window.width / 2
    @command_window.y = 200
    @action_window = Window_Action.new
    @action_window.x = 295
    @action_window.y = 0
    @Player_action_window = Window_Player_Action.new
    @Player_action_window.x = 295
    @Player_action_window.y = 60
    @point_action_window = Window_Point_Action.new
    @point_action_window.x = 39
    @point_action_window.y = 0
    @action_niveau_window = Window_Action_Niveau.new
    @action_niveau_window.x = 535
    @action_niveau_window.y = 0
    @point_action = $game_variables[38]
    @continue_enabled = false
    for i in 0..3
    if @point_action > 0
      @continue_enabled = true
      end
    end
    if @continue_enabled
    else
      @command_window.disable_item(0)
    end
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @action_window.dispose
    @Player_action_window.dispose
    @command_window.dispose
    @point_action_window.dispose
    @action_niveau_window.dispose
  end
  def update
    @action_window.update
    @Player_action_window.update
    @point_action_window.update
    @action_niveau_window.update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(1)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0  
        command_continue
      when 1  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Information_Action.new
      when 2  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Menu.new(1)
      end
    end
    def command_continue
    unless @continue_enabled
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Augmenter.new
  end
end
end
class Scene_Information_Action
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = "                                           Retoure" 
    @command_window = Window_Command.new(640, [s1])
    @command_window.index = @menu_index
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 417
    @information_action_window = Window_Information_Action.new
    @information_action_window.x = 0
    @information_action_window.y = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @information_action_window.dispose
    @command_window.dispose
  end
  def update
    @information_action_window.update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Index_Action.new(1)
      return
    end
    if Input.trigger?(Input::C)
    case @command_window.index
      when 0 
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Index_Action.new(1)
      end
    end
  end
end
class Scene_Augmenter
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = "Retoure"
    s2 = "Action"
    s3 = "Action"
    s4 = "Action"
    s5 = "Action"
    s6 = "Action"
    s7 = "Action"
    s8 = "Action"
    s9 = "Action"
    s10 = "Action"
    s11 = "Action"
    s12 = "Action"
    s13 = "Action"
    @command_window = Window_Command.new(320, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13])
    @command_window.index = @menu_index
    @command_window.x = 260 - @command_window.width / 2
    @command_window.y = 15
    @actionst_window = Window_Actionst.new
    @actionst_window.x = 420
    @actionst_window.y = 15
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @actionst_window.dispose
    @command_window.dispose
  end
  def update
    @actionst_window.update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Index_Action.new(0)
      return
    end
    if Input.trigger?(Input::C)
    case @command_window.index
      when 0 
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Index_Action.new(0)
      when 1
        $game_system.se_play($data_system.decision_se)
        $game_variables[26] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(1)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
      when 2
        $game_system.se_play($data_system.decision_se)
        $game_variables[27] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(2)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
      when 3
        $game_system.se_play($data_system.decision_se)
        $game_variables[28] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(3)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 4
        $game_system.se_play($data_system.decision_se)
        $game_variables[29] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(4)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 5
        $game_system.se_play($data_system.decision_se)
        $game_variables[30] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(5)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 6
        $game_system.se_play($data_system.decision_se)
        $game_variables[31] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(6)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 7
        $game_system.se_play($data_system.decision_se)
        $game_variables[32] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(7)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 8
        $game_system.se_play($data_system.decision_se)
        $game_variables[32] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(8)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 9
        $game_system.se_play($data_system.decision_se)
        $game_variables[33] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(9)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 10
        $game_system.se_play($data_system.decision_se)
        $game_variables[34] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(10)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 11
        $game_system.se_play($data_system.decision_se)
        $game_variables[35] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(11)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 12
        $game_system.se_play($data_system.decision_se)
        $game_variables[36] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(12)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
        when 13
        $game_system.se_play($data_system.decision_se)
        $game_variables[37] += 1
        $game_variables[38] -= 1
        $scene = Scene_Augmenter.new(13)
        if $game_variables[38] == 0
          $scene = Scene_Index_Action.new(0)
        end
      end
    end
  end
end
class Scene_Menu
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    s1 = $data_system.words.item
    s2 = "Actions"
    s3 = $data_system.words.skill
    s4 = $data_system.words.equip
    s5 = "État"
    s6 = "Sauvegarder"
    s7 = "Quitter"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    if $game_system.save_disabled
      @command_window.disable_item(4)
    end
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 256
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 342
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 428
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  def update
    @command_window.update
    @playtime_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Index_Action.new
        when 2  
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 5  
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 6 
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 2
        if $game_party.actors[@status_window.index].restriction >= 2
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Skill.new(@status_window.index)
      when 3  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Equip.new(@status_window.index)
      when 4  
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
class Scene_Skill
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  def main
    @actor = $game_party.actors[@actor_index]
    @help_window = Window_Help.new
    @status_window = Window_SkillStatus.new(@actor)
    @skill_window = Window_Skill.new(@actor)
    @skill_window.help_window = @help_window
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @status_window.dispose
    @skill_window.dispose
    @target_window.dispose
  end
  def update
    @help_window.update
    @status_window.update
    @skill_window.update
    @target_window.update
    if @skill_window.active
      update_skill
      return
    end
    if @target_window.active
      update_target
      return
    end
  end
  def update_skill
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(2)
      return
    end
    if Input.trigger?(Input::C)
      @skill = @skill_window.skill
      if @skill == nil or not @actor.skill_can_use?(@skill.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      if @skill.scope >= 3
        @skill_window.active = false
        @target_window.x = (@skill_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        if @skill.scope == 4 || @skill.scope == 6
          @target_window.index = -1
        elsif @skill.scope == 7
          @target_window.index = @actor_index - 10
        else
          @target_window.index = 0
        end
      else
        if @skill.common_event_id > 0
          $game_temp.common_event_id = @skill.common_event_id
          $game_system.se_play(@skill.menu_se)
          @actor.sp -= @skill.sp_cost
          @status_window.refresh
          @skill_window.refresh
          @target_window.refresh
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Skill.new(@actor_index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Skill.new(@actor_index)
      return
    end
  end
  def update_target
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @skill_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    if Input.trigger?(Input::C)
      unless @actor.skill_can_use?(@skill.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if @target_window.index == -1
        used = false
        for i in $game_party.actors
          used |= i.skill_effect(@actor, @skill)
        end
      end
      if @target_window.index <= -2
        target = $game_party.actors[@target_window.index + 10]
        used = target.skill_effect(@actor, @skill)
      end
      if @target_window.index >= 0
        target = $game_party.actors[@target_window.index]
        used = target.skill_effect(@actor, @skill)
      end
      if used
        $game_system.se_play(@skill.menu_se)
        @actor.sp -= @skill.sp_cost
        @status_window.refresh
        @skill_window.refresh
        @target_window.refresh
        if $game_party.all_dead?
          $scene = Scene_Gameover.new
          return
        end
        if @skill.common_event_id > 0
          $game_temp.common_event_id = @skill.common_event_id
          $scene = Scene_Map.new
          return
        end
      end
      unless used
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end
class Scene_Equip
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
  end
  def main
    @actor = $game_party.actors[@actor_index]
    @help_window = Window_Help.new
    @left_window = Window_EquipLeft.new(@actor)
    @right_window = Window_EquipRight.new(@actor)
    @item_window1 = Window_EquipItem.new(@actor, 0)
    @item_window2 = Window_EquipItem.new(@actor, 1)
    @item_window3 = Window_EquipItem.new(@actor, 2)
    @item_window4 = Window_EquipItem.new(@actor, 3)
    @item_window5 = Window_EquipItem.new(@actor, 4)
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    @right_window.index = @equip_index
    refresh
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
  end
  def refresh
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    item1 = @right_window.item
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    if @right_window.active
      @left_window.set_new_parameters(nil, nil, nil)
    end
    if @item_window.active
      item2 = @item_window.item
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
    end
  end
  def update
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    if @right_window.active
      update_right
      return
    end
    if @item_window.active
      update_item
      return
    end
  end
  def update_right
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(3)
      return
    end
    if Input.trigger?(Input::C)
      if @actor.equip_fix?(@right_window.index)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.equip_se)
      item = @item_window.item
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end
class Scene_File
  def initialize(help_text)
    @help_text = help_text
  end
  def main
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    @savefile_windows = []
    for i in 0..3
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    for i in @savefile_windows
      i.dispose
    end
  end
  def update
    @help_window.update
    for i in @savefile_windows
      i.update
    end
    if Input.trigger?(Input::C)
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    if Input.trigger?(Input::B)
      on_cancel
      return
    end
    if Input.repeat?(Input::DOWN)
      if Input.trigger?(Input::DOWN) or @file_index < 3
        $game_system.se_play($data_system.cursor_se)
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 1) % 4
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    if Input.repeat?(Input::UP)
      if Input.trigger?(Input::UP) or @file_index > 0
        $game_system.se_play($data_system.cursor_se)
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 3) % 4
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
  def make_filename(file_index)
    return "Sauvegarde#{file_index + 1}.rxdata"
  end
end
class Scene_Save < Scene_File
  def initialize
    super("Sauvegarder dans quel fichier?")
  end
  def on_decision(filename)
    $game_system.se_play($data_system.save_se)
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    $scene = Scene_Menu.new(5)
  end
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    $scene = Scene_Menu.new(5)
  end
  def write_save_data(file)
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      characters.push([actor.character_name, actor.character_hue])
    end
    Marshal.dump(characters, file)
    Marshal.dump(Graphics.frame_count, file)
    $game_system.save_count += 1
    $game_system.magic_number = $data_system.magic_number
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
  end
end
class Scene_Status
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  def main
    @actor = $game_party.actors[@actor_index]
    @status_window = Window_Status.new(@actor)
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @status_window.dispose
  end
  def update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(4)
      return
    end
    if Input.trigger?(Input::R)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      return
    end
    if Input.trigger?(Input::L)
      $game_system.se_play($data_system.cursor_se)
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      $scene = Scene_Status.new(@actor_index)
      return
    end
  end
end
class Scene_End
  def main
    s1 = "Écran-Titre"
    s2 = "Quitter"
    s3 = "Annuler"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(6)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0 
        command_to_title
      when 1  
        command_shutdown
      when 2  
        command_cancel
      end
      return
    end
  end
  def command_to_title
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = Scene_Title.new
  end
  def command_shutdown
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    $scene = nil
  end
  def command_cancel
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Menu.new(6)
  end
end


Merci aux personnes de se site qui mon aider pour mes quelques probleme l'hors de la creation de mon script. Edenté


blackis - posté le 04/11/2008 à 10:31:23. (8 messages postés)

Pas mal, faisable en evènement très facilement par contre.
Ah, et on dit "retour", pas "retoure" (j'ai eu peur quand j'ai vu sa :-°)

To be or not to be. That is the question


baK - posté le 11/11/2008 à 09:51:51. (34 messages postés)

Ouah quel truc alors, j'ai eu exactement la même
idée sauf que moi je suis pas doué en script
Ce pourrait-il que ....... :hurle :hurle
COMMUNION D'ESPRIT ??????? :chante


dramar - posté le 30/01/2010 à 10:53:59. (36 messages postés)

Par contre, comment faire pour que 2point d'actions augmente un metier de 1? Merci d'avance

Un maker qui revient du passé


Heavy Rain - posté le 01/03/2010 à 09:49:41. (1053 messages postés)

RetoureXD

Rajoute "plonger" X) par contre pour la definition tu devra mettre comme "cuisiner" : faire des plats :lol

Je suis désespérant :D


nouillera - posté le 03/12/2010 à 16:17:08. (92 messages postés)

Il y a une erreur qui se règle vers la fin du texte du script, dans la partie avec les When. Quand on augmente, à partir de la huitième action, l'augmentation décale d'un rang vers le haut si quelqu'un voit ce que je veux dire.

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe

Plan du site:

Activité: Accueil | News | Forum | Flash-news | Chat | Commentaires | Galerie | Screen de la semaine | Sorties | Articles perso | Livre d'or | Recherche
Jeux: Index jeux séparés | Top Classiques | Top Originaux | Les autres | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Jeux complets | Proposer
Rubriques: Le Wiki | Collection Oniro | Tutoriaux | Scripts | Guides | Gaming-Live | Tests | Making-of | Interviews | Articles perso | OST | L'Annuaire | Divers | Palmarès
Hébergés: Aëdemphia | Fighting Robots Quest | Forstale | Geex | Inexistence | La Légende d'Ibabou | Lije | LoveMaster | Sarcia | Super Mario RPG - Lost Souls
Ressources: Jeux | Programmes | Packs de ressources | Midis | Eléments séparés | Sprites
RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis