Accueil du SiteAccueil du Site  AccueilAccueil  Dernières imagesDernières images  RechercherRechercher  ConnexionConnexion  S'enregistrerS'enregistrer  



-16%
Le deal à ne pas rater :
Friteuse sans huile NINJA Foodi Dual Zone 7,6 L 2400W à 135€
135.01 € 159.99 €
Voir le deal

Partagez
 

 [RMXP] Modification du script Ring Menu

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Hyblitz
Chevalier (niveau 1)
Chevalier (niveau 1)
Hyblitz

Masculin
Messages postés : 74
Date d'inscription : 10/07/2014
Jauge LPC :
[RMXP] Modification du script Ring Menu 89152714006 / 1006 / 100[RMXP] Modification du script Ring Menu 8915271400


[RMXP] Modification du script Ring Menu Empty
MessageSujet: [RMXP] Modification du script Ring Menu   [RMXP] Modification du script Ring Menu EmptyVen 25 Juil 2014 - 9:45

Salut tout le monde, bref j'ai besoin de Ring Menu pour un seul joueur, c'est a dire quand je ouvre le menu équipement ou compétence je ne veut pas le petit menu qui demande quelles joueur, donc une fois que je sélectionne équipement par exemple, ont vas direct au menu équipement , voila j'ai essayer de me débrouiller tout seul mais ... c'est la vie chaque'un sa faiblesse, merci d'avance peace <3

voici le script :
Code:
#------------------------------------------------------------------------------
#  Ring_Menu
#------------------------------------------------------------------------------
#  By:  XRXS, Dubealex, and Hypershadow180
#------------------------------------------------------------------------------
class Scene_Menu
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
   $location_text=[]
   $gold_text=[]
   $window_size=[]
   $ring_menu_text=[]
   $chara_select=[]
   @window_opacity=[]
   @chara_select=[]
   @window_position=[]
   $location_text[0]="BM army" # Font Type
   $location_text[1]=30# Font Size
   $location_text[2]=0 # Location Title Color
   $location_text[4]=0 # Map Name Color
   $location_text[3]="" # Text
   $gold_text[0]="BM army" # Font Type
   $gold_text[1]=18 # Font Size
   $gold_text[2]=3 # Gold Title Color
   $gold_text[3]=3 # Gold Color
   $gold_text[4]="Rukh" # Text
   @window_opacity[0]=255 # Border Opacity
   @window_opacity[1]=130 # Background Opacity
   $window_location_skin="empty windowskin" # Location Windowskin
   $window_gold_skin="empty windowskin" # Gold Windowskin
   @window_position[0]=0 # X Axis Position
   @window_position[1]=0 # Location Y Axis Position
   @window_position[2]=384 # Gold Y Axis Position
   $window_size[0]=160 # Length
   $window_size[1]=96 # Height
   $ring_menu_text[0]="BM army" # Font Type
   $ring_menu_text[7]=0 # Font Color
   $ring_menu_text[8]=18 # Font Size
   $ring_menu_text[1]="Items"
   $ring_menu_text[2]="Skills"
   $ring_menu_text[3]="Equip"
   $ring_menu_text[4]="Stats"
   $ring_menu_text[5]="Save"
   $ring_menu_text[6]="Exit"
   @chara_select[0]=420 # X Axis Position
   @chara_select[1]=100 # Y Axis Position
   $chara_select[0]="BM army" # Font Type
   $chara_select[1]=0 # Font Color
   $chara_select[5]=16 # Font Size
   $chara_select[2]=255 # Border Opacity
   $chara_select[3]=130 # Background Opacity
   $chara_select[4]="empty windowskin" # Windowskin
 end
#------------------------------------------------------------------------------
#  Main
#------------------------------------------------------------------------------
 def main
   @window_location = Window_Location.new
   @window_location.x = @window_position[0]
   @window_location.y = @window_position[1]
   @window_location.opacity = @window_opacity[0]
   @window_location.back_opacity = @window_opacity[1]
   @window_gold = Window_MenuGold.new
   @window_gold.x = @window_position[0]
   @window_gold.y = @window_position[2]
   @window_gold.opacity = @window_opacity[0]
   @window_gold.back_opacity = @window_opacity[1]
   @spriteset = Spriteset_Map.new
   px = $game_player.screen_x - 15
   py = $game_player.screen_y - 24
   @command_window = Window_RingMenu.new(px,py)
   @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
   @command_window.z = 100
   if $game_system.save_disabled
     @command_window.disable_item(4)
   end
   @status_window = Window_RingMenuStatus.new
   @status_window.x = @chara_select[0]
   @status_window.y = @chara_select[1]
   @status_window.z = 200
   @status_window.opacity=$chara_select[2]
   @status_window.back_opacity=$chara_select[3]
   @status_window.visible = false
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @spriteset.dispose
   @window_location.dispose
   @window_gold.dispose
   @command_window.dispose
   @status_window.dispose
 end
#------------------------------------------------------------------------------
#  Update
#------------------------------------------------------------------------------
 def update
   @window_location.update
   @window_gold.update
   @command_window.update
   @status_window.update
   if @command_window.active
     update_command
     return
   end
   if @status_window.active
     update_status
     return
   end
 end
#------------------------------------------------------------------------------
#  Update Comman
#------------------------------------------------------------------------------
 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)
     @command_window.active = false
     @status_window.active = true
     @status_window.visible = true
     @status_window.index = 0
   when 2
     $game_system.se_play($data_system.decision_se)
     @command_window.active = false
     @status_window.active = true
     @status_window.visible = 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.visible = true
     @status_window.index = 0
   when 4
     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 5
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_End.new
   end
   return
 end
 return if @command_window.animation?
   if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
     $game_system.se_play($data_system.cursor_se)
     @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
     return
   end
   if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
     $game_system.se_play($data_system.cursor_se)
     @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
     return
   end
 end
#------------------------------------------------------------------------------
#  Update Status
#------------------------------------------------------------------------------
 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.visible = false
     @status_window.index = -1
     return
   end
   if Input.trigger?(Input::C)
   case @command_window.index
   when 1
     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 2
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Equip.new(@status_window.index)
   when 3
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Status.new(@status_window.index)
     end
     return
   end
 end
end
#------------------------------------------------------------------------------
#  Window_RingMenu
#------------------------------------------------------------------------------
class Window_RingMenu < Window_Base
 STARTUP_FRAMES = 20
 MOVING_FRAMES = 8  
 RING_R = 80        
 ICON_ITEM   = RPG::Cache.icon("items")
 ICON_SKILL  = RPG::Cache.icon("skills")
 ICON_EQUIP  = RPG::Cache.icon("equip")
 ICON_STATUS = RPG::Cache.icon("stat")
 ICON_SAVE   = RPG::Cache.icon("save")
 ICON_EXIT   = RPG::Cache.icon("exit")
 ICON_DISABLE= RPG::Cache.icon("")
 SE_STARTUP = "open menu"
 MODE_START = 1
 MODE_WAIT  = 2
 MODE_MOVER = 3
 MODE_MOVEL = 4
 attr_accessor :index
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize( center_x, center_y )
   super(0, 0, 640, 480)
   self.contents = Bitmap.new(width-32, height-32)
   self.contents.font.name = $ring_menu_text[0]
   self.contents.font.color = text_color($ring_menu_text[7])
   self.contents.font.size = $ring_menu_text[8]
   self.opacity = 0
   self.back_opacity = 0
   s1 = $ring_menu_text[1]
   s2 = $ring_menu_text[2]
   s3 = $ring_menu_text[3]
   s4 = $ring_menu_text[4]
   s5 = $ring_menu_text[5]
   s6 = $ring_menu_text[6]
   @commands = [ s1, s2, s3, s4, s5, s6 ]
   @item_max = 6
   @index = 0
   @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]
   @disabled = [ false, false, false, false, false, false ]
   @cx = center_x - 16
   @cy = center_y - 16
   setup_move_start
   refresh
 end
#------------------------------------------------------------------------------
#  Update
#------------------------------------------------------------------------------
 def update
   super
   refresh
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
   self.contents.clear
   case @mode
   when MODE_START
     refresh_start
   when MODE_WAIT
     refresh_wait
   when MODE_MOVER
     refresh_move(1)
   when MODE_MOVEL
     refresh_move(0)
   end
   rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
   self.contents.draw_text(rect, @commands[@index],1)
 end
#------------------------------------------------------------------------------
#  Refresh Start
#------------------------------------------------------------------------------
 def refresh_start
   d1 = 2.0 * Math::PI / @item_max
   d2 = 1.0 * Math::PI / STARTUP_FRAMES
   r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
   for i in 0...@item_max
     j = i - @index
     d = d1 * j + d2 * @steps
     x = @cx + ( r * Math.sin( d ) ).to_i
     y = @cy - ( r * Math.cos( d ) ).to_i
     draw_item(x, y, i)
   end
   @steps -= 1
   if @steps < 1
     @mode = MODE_WAIT
   end
 end
#------------------------------------------------------------------------------
#  Refresh Wait
#------------------------------------------------------------------------------
 def refresh_wait
   d = 2.0 * Math::PI / @item_max
   for i in 0...@item_max
     j = i - @index
     x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
     y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
     draw_item(x, y, i)
   end
 end
#------------------------------------------------------------------------------
#  Refresh Move
#------------------------------------------------------------------------------
 def refresh_move( mode )
   d1 = 2.0 * Math::PI / @item_max
   d2 = d1 / MOVING_FRAMES
   d2 *= -1 if mode != 0
   for i in 0...@item_max
     j = i - @index
     d = d1 * j + d2 * @steps
     x = @cx + ( RING_R * Math.sin( d ) ).to_i
     y = @cy - ( RING_R * Math.cos( d ) ).to_i
     draw_item(x, y, i)
   end
   @steps -= 1
   if @steps < 1
     @mode = MODE_WAIT
   end
 end
#------------------------------------------------------------------------------
#  Draw Item
#------------------------------------------------------------------------------
 def draw_item(x, y, i)
   rect = Rect.new(0, 0, @items[i].width, @items[i].height)
   if @index == i
     self.contents.blt( x, y, @items[i], rect )
     if @disabled[@index]
       self.contents.blt( x, y, ICON_DISABLE, rect )
     end
   else
     self.contents.blt( x, y, @items[i], rect, 128 )
     if @disabled[@index]
       self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
     end
   end
 end
#------------------------------------------------------------------------------
#  Disable Item
#------------------------------------------------------------------------------
 def disable_item(index)
   @disabled[index] = true
 end
#------------------------------------------------------------------------------
#  Setup Move Start
#------------------------------------------------------------------------------
 def setup_move_start
   @mode = MODE_START
   @steps = STARTUP_FRAMES
   if  SE_STARTUP != nil and SE_STARTUP != ""
     Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
   end
 end
#------------------------------------------------------------------------------
#  Setup Move Move
#------------------------------------------------------------------------------
 def setup_move_move(mode)
   if mode == MODE_MOVER
     @index -= 1
     @index = @items.size - 1 if @index < 0
   elsif mode == MODE_MOVEL
     @index += 1
     @index = 0 if @index >= @items.size
   else
     return
   end
   @mode = mode
   @steps = MOVING_FRAMES
 end
#------------------------------------------------------------------------------
#  Animation
#------------------------------------------------------------------------------
 def animation?
   return @mode != MODE_WAIT
 end
end
#------------------------------------------------------------------------------
#  Window_RingMenuStatus
#------------------------------------------------------------------------------
class Window_RingMenuStatus < Window_Selectable
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize
   super(204, 64, 232, 352)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.size = $chara_select[5]
   refresh
   self.active = false
   self.index = -1
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.windowskin = RPG::Cache.windowskin($chara_select[4])
   self.contents.font.name = $chara_select[0]
   self.contents.font.color = text_color($chara_select[1])
   @item_max = $game_party.actors.size
   for i in 0...$game_party.actors.size
     x = 80
     y = 80 * i
     actor = $game_party.actors[i]
     draw_actor_graphic(actor, x - 60, y + 65)
     draw_actor_name(actor, x, y + 2)
     draw_actor_hp(actor, x - 40, y + 26)
     draw_actor_sp(actor, x - 40, y + 50)
   end
 end
#------------------------------------------------------------------------------
#  Update Cursor Rect
#------------------------------------------------------------------------------
 def update_cursor_rect
   if @index < 0
     self.cursor_rect.empty
   else
     self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
   end
 end
end
#------------------------------------------------------------------------------
#  Game_Map
#------------------------------------------------------------------------------
class Game_Map
#------------------------------------------------------------------------------
#  Name
#------------------------------------------------------------------------------
 def name
   $map_infos[@map_id]
 end
end
#------------------------------------------------------------------------------
#  Scene_Title
#------------------------------------------------------------------------------
class Scene_Title
 $map_infos = load_data("Data/MapInfos.rxdata")
 for key in $map_infos.keys
   $map_infos[key] = $map_infos[key].name
 end
end
#------------------------------------------------------------------------------
#  Window_Location
#------------------------------------------------------------------------------
class Window_Location < Window_Base
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize
   super(0, 0, $window_size[0], $window_size[1])
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $location_text[0]
   self.contents.font.size = $location_text[1]
   refresh
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.windowskin = RPG::Cache.windowskin($window_location_skin)
   self.contents.font.color = text_color($location_text[2])
   self.contents.draw_text(4, 0, 120, 32, $location_text[3])
   self.contents.font.color = text_color($location_text[4])
   self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
 end
end
#------------------------------------------------------------------------------
#  Window_MenuGold
#------------------------------------------------------------------------------
class Window_MenuGold < Window_Base
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize
   super(0, 0, $window_size[0], $window_size[1])
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $gold_text[0]
   self.contents.font.size = $gold_text[1]
   refresh
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.windowskin = RPG::Cache.windowskin($window_gold_skin)
   self.contents.font.color = text_color($gold_text[2])
   self.contents.draw_text(4, 0, 120, 32, $gold_text[4])
   self.contents.font.color = text_color($gold_text[3])
   self.contents.draw_text(4, 32, 120, 32, $game_party.gold.to_s, 2)
 end
end
Revenir en haut Aller en bas
Hyblitz
Chevalier (niveau 1)
Chevalier (niveau 1)
Hyblitz

Masculin
Messages postés : 74
Date d'inscription : 10/07/2014
Jauge LPC :
[RMXP] Modification du script Ring Menu 89152714006 / 1006 / 100[RMXP] Modification du script Ring Menu 8915271400


[RMXP] Modification du script Ring Menu Empty
MessageSujet: Re: [RMXP] Modification du script Ring Menu   [RMXP] Modification du script Ring Menu EmptyDim 27 Juil 2014 - 11:15

Up ?
Revenir en haut Aller en bas
Ti-Max
Membre V.I.P.
Membre V.I.P.
Ti-Max

Masculin
Messages postés : 2260
Date d'inscription : 11/07/2012
Jauge LPC :
[RMXP] Modification du script Ring Menu 891527140080 / 10080 / 100[RMXP] Modification du script Ring Menu 8915271400

[RMXP] Modification du script Ring Menu Membre10
[RMXP] Modification du script Ring Menu Membre15
[RMXP] Modification du script Ring Menu Padago10
[RMXP] Modification du script Ring Menu Altrui10
[RMXP] Modification du script Ring Menu Event-10
[RMXP] Modification du script Ring Menu Partag10
[RMXP] Modification du script Ring Menu Promot10
[RMXP] Modification du script Ring Menu Riche_10
[RMXP] Modification du script Ring Menu Collec10
[RMXP] Modification du script Ring Menu Collec11
[RMXP] Modification du script Ring Menu Collec12
[RMXP] Modification du script Ring Menu Mister10
[RMXP] Modification du script Ring Menu Projet15
[RMXP] Modification du script Ring Menu Projet10


[RMXP] Modification du script Ring Menu Empty
MessageSujet: Re: [RMXP] Modification du script Ring Menu   [RMXP] Modification du script Ring Menu EmptyLun 28 Juil 2014 - 14:22

Voilà, s'il y a de quoi qui ne va pas fait le savoir.

Code:
#------------------------------------------------------------------------------
#  Ring_Menu
#------------------------------------------------------------------------------
#  By:  XRXS, Dubealex, and Hypershadow180
#------------------------------------------------------------------------------
class Scene_Menu
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize(menu_index = 0)
  @menu_index = menu_index
  $location_text=[]
  $gold_text=[]
  $window_size=[]
  $ring_menu_text=[]
  $chara_select=[]
  @window_opacity=[]
  @chara_select=[]
  @window_position=[]
  $location_text[0]="BM army" # Font Type
  $location_text[1]=30# Font Size
  $location_text[2]=0 # Location Title Color
  $location_text[4]=0 # Map Name Color
  $location_text[3]="" # Text
  $gold_text[0]="BM army" # Font Type
  $gold_text[1]=18 # Font Size
  $gold_text[2]=3 # Gold Title Color
  $gold_text[3]=3 # Gold Color
  $gold_text[4]="Rukh" # Text
  @window_opacity[0]=255 # Border Opacity
  @window_opacity[1]=130 # Background Opacity
  $window_location_skin="empty windowskin" # Location Windowskin
  $window_gold_skin="empty windowskin" # Gold Windowskin
  @window_position[0]=0 # X Axis Position
  @window_position[1]=0 # Location Y Axis Position
  @window_position[2]=384 # Gold Y Axis Position
  $window_size[0]=160 # Length
  $window_size[1]=96 # Height
  $ring_menu_text[0]="BM army" # Font Type
  $ring_menu_text[7]=0 # Font Color
  $ring_menu_text[8]=18 # Font Size
  $ring_menu_text[1]="Items"
  $ring_menu_text[2]="Skills"
  $ring_menu_text[3]="Equip"
  $ring_menu_text[4]="Stats"
  $ring_menu_text[5]="Save"
  $ring_menu_text[6]="Exit"
  @chara_select[0]=420 # X Axis Position
  @chara_select[1]=100 # Y Axis Position
  $chara_select[0]="BM army" # Font Type
  $chara_select[1]=0 # Font Color
  $chara_select[5]=16 # Font Size
  $chara_select[2]=255 # Border Opacity
  $chara_select[3]=130 # Background Opacity
  $chara_select[4]="empty windowskin" # Windowskin
 end
#------------------------------------------------------------------------------
#  Main
#------------------------------------------------------------------------------
 def main
  @window_location = Window_Location.new
  @window_location.x = @window_position[0]
  @window_location.y = @window_position[1]
  @window_location.opacity = @window_opacity[0]
  @window_location.back_opacity = @window_opacity[1]
  @window_gold = Window_MenuGold.new
  @window_gold.x = @window_position[0]
  @window_gold.y = @window_position[2]
  @window_gold.opacity = @window_opacity[0]
  @window_gold.back_opacity = @window_opacity[1]
  @spriteset = Spriteset_Map.new
  px = $game_player.screen_x - 15
  py = $game_player.screen_y - 24
  @command_window = Window_RingMenu.new(px,py)
  @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
  @command_window.z = 100
  if $game_system.save_disabled
    @command_window.disable_item(4)
  end
  @status_window = Window_RingMenuStatus.new
  @status_window.x = @chara_select[0]
  @status_window.y = @chara_select[1]
  @status_window.z = 200
  @status_window.opacity=$chara_select[2]
  @status_window.back_opacity=$chara_select[3]
  @status_window.visible = false
  Graphics.transition
  loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
    end
  end
  Graphics.freeze
  @spriteset.dispose
  @window_location.dispose
  @window_gold.dispose
  @command_window.dispose
  @status_window.dispose
 end
#------------------------------------------------------------------------------
#  Update
#------------------------------------------------------------------------------
 def update
  @window_location.update
  @window_gold.update
  @command_window.update
  @status_window.update
  if @command_window.active
    update_command
    return
  end
  if @status_window.active
    update_status
    return
  end
 end
#------------------------------------------------------------------------------
#  Update Comman
#------------------------------------------------------------------------------
 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_Skill.new
  when 2
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Equip.new
  when 3
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Status.new
  when 4
    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 5
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_End.new
  end
  return
 end
 return if @command_window.animation?
  if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
    $game_system.se_play($data_system.cursor_se)
    @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)
    return
  end
  if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
    $game_system.se_play($data_system.cursor_se)
    @command_window.setup_move_move(Window_RingMenu::MODE_MOVER)
    return
  end
 end
#------------------------------------------------------------------------------
#  Update Status
#------------------------------------------------------------------------------
 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.visible = false
    @status_window.index = -1
    return
  end
  end
end
#------------------------------------------------------------------------------
#  Window_RingMenu
#------------------------------------------------------------------------------
class Window_RingMenu < Window_Base
 STARTUP_FRAMES = 20
 MOVING_FRAMES = 8 
 RING_R = 80       
 ICON_ITEM  = RPG::Cache.icon("items")
 ICON_SKILL  = RPG::Cache.icon("skills")
 ICON_EQUIP  = RPG::Cache.icon("equip")
 ICON_STATUS = RPG::Cache.icon("stat")
 ICON_SAVE  = RPG::Cache.icon("save")
 ICON_EXIT  = RPG::Cache.icon("exit")
 ICON_DISABLE= RPG::Cache.icon("")
 SE_STARTUP = "open menu"
 MODE_START = 1
 MODE_WAIT  = 2
 MODE_MOVER = 3
 MODE_MOVEL = 4
 attr_accessor :index
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize( center_x, center_y )
  super(0, 0, 640, 480)
  self.contents = Bitmap.new(width-32, height-32)
  self.contents.font.name = $ring_menu_text[0]
  self.contents.font.color = text_color($ring_menu_text[7])
  self.contents.font.size = $ring_menu_text[8]
  self.opacity = 0
  self.back_opacity = 0
  s1 = $ring_menu_text[1]
  s2 = $ring_menu_text[2]
  s3 = $ring_menu_text[3]
  s4 = $ring_menu_text[4]
  s5 = $ring_menu_text[5]
  s6 = $ring_menu_text[6]
  @commands = [ s1, s2, s3, s4, s5, s6 ]
  @item_max = 6
  @index = 0
  @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]
  @disabled = [ false, false, false, false, false, false ]
  @cx = center_x - 16
  @cy = center_y - 16
  setup_move_start
  refresh
 end
#------------------------------------------------------------------------------
#  Update
#------------------------------------------------------------------------------
 def update
  super
  refresh
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
  self.contents.clear
  case @mode
  when MODE_START
    refresh_start
  when MODE_WAIT
    refresh_wait
  when MODE_MOVER
    refresh_move(1)
  when MODE_MOVEL
    refresh_move(0)
  end
  rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)
  self.contents.draw_text(rect, @commands[@index],1)
 end
#------------------------------------------------------------------------------
#  Refresh Start
#------------------------------------------------------------------------------
 def refresh_start
  d1 = 2.0 * Math::PI / @item_max
  d2 = 1.0 * Math::PI / STARTUP_FRAMES
  r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
  for i in 0...@item_max
    j = i - @index
    d = d1 * j + d2 * @steps
    x = @cx + ( r * Math.sin( d ) ).to_i
    y = @cy - ( r * Math.cos( d ) ).to_i
    draw_item(x, y, i)
  end
  @steps -= 1
  if @steps < 1
    @mode = MODE_WAIT
  end
 end
#------------------------------------------------------------------------------
#  Refresh Wait
#------------------------------------------------------------------------------
 def refresh_wait
  d = 2.0 * Math::PI / @item_max
  for i in 0...@item_max
    j = i - @index
    x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
    y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
    draw_item(x, y, i)
  end
 end
#------------------------------------------------------------------------------
#  Refresh Move
#------------------------------------------------------------------------------
 def refresh_move( mode )
  d1 = 2.0 * Math::PI / @item_max
  d2 = d1 / MOVING_FRAMES
  d2 *= -1 if mode != 0
  for i in 0...@item_max
    j = i - @index
    d = d1 * j + d2 * @steps
    x = @cx + ( RING_R * Math.sin( d ) ).to_i
    y = @cy - ( RING_R * Math.cos( d ) ).to_i
    draw_item(x, y, i)
  end
  @steps -= 1
  if @steps < 1
    @mode = MODE_WAIT
  end
 end
#------------------------------------------------------------------------------
#  Draw Item
#------------------------------------------------------------------------------
 def draw_item(x, y, i)
  rect = Rect.new(0, 0, @items[i].width, @items[i].height)
  if @index == i
    self.contents.blt( x, y, @items[i], rect )
    if @disabled[@index]
      self.contents.blt( x, y, ICON_DISABLE, rect )
    end
  else
    self.contents.blt( x, y, @items[i], rect, 128 )
    if @disabled[@index]
      self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
    end
  end
 end
#------------------------------------------------------------------------------
#  Disable Item
#------------------------------------------------------------------------------
 def disable_item(index)
  @disabled[index] = true
 end
#------------------------------------------------------------------------------
#  Setup Move Start
#------------------------------------------------------------------------------
 def setup_move_start
  @mode = MODE_START
  @steps = STARTUP_FRAMES
  if  SE_STARTUP != nil and SE_STARTUP != ""
    Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
  end
 end
#------------------------------------------------------------------------------
#  Setup Move Move
#------------------------------------------------------------------------------
 def setup_move_move(mode)
  if mode == MODE_MOVER
    @index -= 1
    @index = @items.size - 1 if @index < 0
  elsif mode == MODE_MOVEL
    @index += 1
    @index = 0 if @index >= @items.size
  else
    return
  end
  @mode = mode
  @steps = MOVING_FRAMES
 end
#------------------------------------------------------------------------------
#  Animation
#------------------------------------------------------------------------------
 def animation?
  return @mode != MODE_WAIT
 end
end
#------------------------------------------------------------------------------
#  Window_RingMenuStatus
#------------------------------------------------------------------------------
class Window_RingMenuStatus < Window_Selectable
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize
  super(204, 64, 232, 352)
  self.contents = Bitmap.new(width - 32, height - 32)
  self.contents.font.size = $chara_select[5]
  refresh
  self.active = false
  self.index = -1
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
  self.contents.clear
  self.windowskin = RPG::Cache.windowskin($chara_select[4])
  self.contents.font.name = $chara_select[0]
  self.contents.font.color = text_color($chara_select[1])
  @item_max = $game_party.actors.size
  for i in 0...$game_party.actors.size
    x = 80
    y = 80 * i
    actor = $game_party.actors[i]
    draw_actor_graphic(actor, x - 60, y + 65)
    draw_actor_name(actor, x, y + 2)
    draw_actor_hp(actor, x - 40, y + 26)
    draw_actor_sp(actor, x - 40, y + 50)
  end
 end
#------------------------------------------------------------------------------
#  Update Cursor Rect
#------------------------------------------------------------------------------
 def update_cursor_rect
  if @index < 0
    self.cursor_rect.empty
  else
    self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
  end
 end
end
#------------------------------------------------------------------------------
#  Game_Map
#------------------------------------------------------------------------------
class Game_Map
#------------------------------------------------------------------------------
#  Name
#------------------------------------------------------------------------------
 def name
  $map_infos[@map_id]
 end
end
#------------------------------------------------------------------------------
#  Scene_Title
#------------------------------------------------------------------------------
class Scene_Title
 $map_infos = load_data("Data/MapInfos.rxdata")
 for key in $map_infos.keys
  $map_infos[key] = $map_infos[key].name
 end
end
#------------------------------------------------------------------------------
#  Window_Location
#------------------------------------------------------------------------------
class Window_Location < Window_Base
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize
  super(0, 0, $window_size[0], $window_size[1])
  self.contents = Bitmap.new(width - 32, height - 32)
  self.contents.font.name = $location_text[0]
  self.contents.font.size = $location_text[1]
  refresh
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
  self.contents.clear
  self.windowskin = RPG::Cache.windowskin($window_location_skin)
  self.contents.font.color = text_color($location_text[2])
  self.contents.draw_text(4, 0, 120, 32, $location_text[3])
  self.contents.font.color = text_color($location_text[4])
  self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
 end
end
#------------------------------------------------------------------------------
#  Window_MenuGold
#------------------------------------------------------------------------------
class Window_MenuGold < Window_Base
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
 def initialize
  super(0, 0, $window_size[0], $window_size[1])
  self.contents = Bitmap.new(width - 32, height - 32)
  self.contents.font.name = $gold_text[0]
  self.contents.font.size = $gold_text[1]
  refresh
 end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
 def refresh
  self.contents.clear
  self.windowskin = RPG::Cache.windowskin($window_gold_skin)
  self.contents.font.color = text_color($gold_text[2])
  self.contents.draw_text(4, 0, 120, 32, $gold_text[4])
  self.contents.font.color = text_color($gold_text[3])
  self.contents.draw_text(4, 32, 120, 32, $game_party.gold.to_s, 2)
 end
end
Revenir en haut Aller en bas
Hyblitz
Chevalier (niveau 1)
Chevalier (niveau 1)
Hyblitz

Masculin
Messages postés : 74
Date d'inscription : 10/07/2014
Jauge LPC :
[RMXP] Modification du script Ring Menu 89152714006 / 1006 / 100[RMXP] Modification du script Ring Menu 8915271400


[RMXP] Modification du script Ring Menu Empty
MessageSujet: Re: [RMXP] Modification du script Ring Menu   [RMXP] Modification du script Ring Menu EmptyLun 28 Juil 2014 - 18:12

Sa marche merci beaucoup TI-MAX, il faudrait que quelqu'un te donne des points, merci encore chef. peace
Revenir en haut Aller en bas
City Hunter
Administrateur
Administrateur
City Hunter

Masculin
Messages postés : 6524
Date d'inscription : 25/05/2011
Jauge LPC :
[RMXP] Modification du script Ring Menu 891527140040 / 10040 / 100[RMXP] Modification du script Ring Menu 8915271400

[RMXP] Modification du script Ring Menu Staffe10
[RMXP] Modification du script Ring Menu Mappeu10
[RMXP] Modification du script Ring Menu Membre15
[RMXP] Modification du script Ring Menu Testeu10
[RMXP] Modification du script Ring Menu Promot10
[RMXP] Modification du script Ring Menu Projet10
[RMXP] Modification du script Ring Menu Projet16
[RMXP] Modification du script Ring Menu Riche_10
[RMXP] Modification du script Ring Menu Travai10
[RMXP] Modification du script Ring Menu Collec10
[RMXP] Modification du script Ring Menu Collec11
[RMXP] Modification du script Ring Menu Collec12
[RMXP] Modification du script Ring Menu Collec13
[RMXP] Modification du script Ring Menu Pandac10
[RMXP] Modification du script Ring Menu 10000011


[RMXP] Modification du script Ring Menu Empty
MessageSujet: Re: [RMXP] Modification du script Ring Menu   [RMXP] Modification du script Ring Menu EmptyLun 28 Juil 2014 - 18:33

Tkt! Je suis la Very Happy
Des points! Et je classe^^
Revenir en haut Aller en bas
Contenu sponsorisé




[RMXP] Modification du script Ring Menu Empty
MessageSujet: Re: [RMXP] Modification du script Ring Menu   [RMXP] Modification du script Ring Menu Empty

Revenir en haut Aller en bas
 
[RMXP] Modification du script Ring Menu
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» [XP]Modification du menu
» Ring Menu Personnalisé
» [VXace] Ring menu
» [Résolu]Modification du menu de base
» [RMXP]Script affichant le level up.

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Le Palais Créatif :: ~ APPRENTISSAGE ~ :: Entraide :: Problèmes résolus-
Sauter vers: