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



 
AccueilPortailRechercherDernières imagesS'enregistrerConnexion
-20%
Le deal à ne pas rater :
-20% sur le Lot de 2 écrans PC GIGABYTE 27″ LED M27Q
429 € 539 €
Voir le deal

 

 Menu 3

Aller en bas 
2 participants
AuteurMessage
deadcell
Trouvère Follet
Trouvère Follet
deadcell


Masculin
Nombre de messages : 625
Age : 35
Niveau Rpg Maker : Excellent Niveau
Jeux Préférés : Final Fantasy, Resident evil...
Date d'inscription : 21/03/2007

Menu 3 Empty
MessageSujet: Menu 3   Menu 3 EmptyVen 06 Juil 2007, 22:07

Ce script change le style de votre menu.

- Auteur : Squall

- Screen :

Menu 3 Menu310


- Installation :

Faites un nouveau script au-dessus de Main et nommez-le "Scene_Menu" puis ajoutez ce code :

Code:
#==============================================================================#
# ■ Scene_Menu #
#------------------------------------------------------------------------------#
#  Replaces the DMS. Made by Squall webmaster@loeher.zzn.com #
#==============================================================================#

class Scene_Menu
#----------------------------------------------------------------------------#
# ● initialize the Scene_Test #
#----------------------------------------------------------------------------#
def initialize(menu_index = 0, actor_index = 0, equip_index = 0)
@menu_index = menu_index
@actor_index = actor_index
@equip_index = equip_index
@from_skill = false
@from_item = false
@from_command = false
end
#----------------------------------------------------------------------------#
# ● setup all the windows #
#----------------------------------------------------------------------------#
def main
@actor = $game_party.actors[@actor_index]

s0 = $data_system.words.item
s1 = $data_system.words.skill
s2 = $data_system.words.equip
s3 = "Equipe"
s4 = "Sauvegarder"
s5 = "Quitter"
@command_window = Window_Command.new(160, [s0, s1, s2, s3, s4, s5])
@command_window.index = @menu_index
@command_window.x = 480

@status_window = Window_MenuStatusMenu.new(@actor)

@equip_window = Window_EquipRightMenu.new(@actor)
@equip_window.index = @equip_index

@skill_window = Window_SkillMenu.new(@actor)

@items_window = Window_ItemMenu.new

@item_window1 = Window_EquipItemMenu.new(@actor, 0)
@item_window2 = Window_EquipItemMenu.new(@actor, 1)
@item_window3 = Window_EquipItemMenu.new(@actor, 2)
@item_window4 = Window_EquipItemMenu.new(@actor, 3)
@item_window5 = Window_EquipItemMenu.new(@actor, 4)

@playtime_window = Window_PlayTime.new
@playtime_window.x = 480
@playtime_window.y = 224

@steps_window = Window_Steps.new
@steps_window.x = 480
@steps_window.y = 320

@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 416

@target_window = Window_TargetMenu.new

refresh
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@status_window.dispose
@equip_window.dispose
@skill_window.dispose
@items_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@target_window.dispose
end
#----------------------------------------------------------------------------#
# ● refresh windows when equipping items #
#----------------------------------------------------------------------------#
def refresh
@item_window1.visible = (@equip_window.index == 0)
@item_window2.visible = (@equip_window.index == 1)
@item_window3.visible = (@equip_window.index == 2)
@item_window4.visible = (@equip_window.index == 3)
@item_window5.visible = (@equip_window.index == 4)
item1 = @equip_window.item
case @equip_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 @equip_window.active
@status_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil)
end
if @item_window.active
item2 = @item_window.item
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@equip_window.index, item2 == nil ? 0 : item2.id)
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
new_eva = @actor.eva
@actor.equip(@equip_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
@status_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int, new_eva)
else
unless @equip_window.active
@item_window.visible = false
end
end
end
#----------------------------------------------------------------------------#
# ● update Scene_Test #
#----------------------------------------------------------------------------#
def update
@command_window.update
@status_window.update
@equip_window.update
@skill_window.update
@items_window.update
@item_window1.update
@item_window2.update
@item_window3.update
@item_window4.update
@item_window5.update
@playtime_window.update
@steps_window.update
@gold_window.update
@target_window.update

refresh

if @command_window.active
@equip_window.index = -1
update_command
return
end
if @items_window.active
update_items
return
end
if @skill_window.active
update_skill
return
end
if @equip_window.active
update_equip
return
end
if @from_skill == true
if @target_window.active
update_target_skill
return
end
elsif @from_item == true
if @target_window.active
update_target_item
return
end
elsif @from_command == true
if @target_window.active
update_target_party
return
end
end
if @item_window != nil and @item_window.active
update_itemequip
return
end
end
#----------------------------------------------------------------------------#
# ● update the command window #
#----------------------------------------------------------------------------#
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::RIGHT)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Menu.new(0, @actor_index)
return
end

if Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Menu.new(0, @actor_index)
return
end

if Input.trigger?(Input::R)
@skill_window.page_up
@skill_window.index = -1
return
end

if Input.trigger?(Input::L)
@skill_window.page_down
@skill_window.index = -1
return
end

if Input.trigger?(Input::C)
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@items_window.visible = true
@items_window.active = true
@items_window.index = 0
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@skill_window.active = true
@skill_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@equip_window.active = true
@equip_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@target_window.active = true
@target_window.visible = true
@target_window.index = 0
@command_window.active = false
@from_command = true
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
end
#----------------------------------------------------------------------------#
# ● update the item window #
#----------------------------------------------------------------------------#
def update_items
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@items_window.visible = false
@items_window.active = false
@items_window.index = -1
return
end
Revenir en haut Aller en bas
deadcell
Trouvère Follet
Trouvère Follet
deadcell


Masculin
Nombre de messages : 625
Age : 35
Niveau Rpg Maker : Excellent Niveau
Jeux Préférés : Final Fantasy, Resident evil...
Date d'inscription : 21/03/2007

Menu 3 Empty
MessageSujet: Re: Menu 3   Menu 3 EmptyVen 06 Juil 2007, 22:07

Suite du code :

Code:
if Input.trigger?(Input::C)
@item = @items_window.item
unless @item.is_a?(RPG::Item)
$game_system.se_play($data_system.buzzer_se)
return
end
unless $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
if @item.scope >= 3
@items_window.active = false
@target_window.visible = true
@target_window.active = true
@from_item = true
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
else
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@items_window.draw_item(@item_window.index)
end
$scene = Scene_Map.new
return
end
end
return
end
end
#----------------------------------------------------------------------------#
# ● update the skill window #
#----------------------------------------------------------------------------#
def update_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@skill_window.active = false
@skill_window.index = -1
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.visible = true
@target_window.active = true
@from_skill = 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
end
#----------------------------------------------------------------------------#
# ● update the equip window #
#----------------------------------------------------------------------------#
def update_equip
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@item_window.visible = false
@equip_window.active = false
@equip_window.index = -1
return
end

if Input.trigger?(Input::C)
if @actor.equip_fix?(@equip_window.index)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@equip_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
end
#----------------------------------------------------------------------------#
# ● update the skill target window #
#----------------------------------------------------------------------------#
def update_target_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_window.active = false
@target_window.visible = false
@from_skill = 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
#----------------------------------------------------------------------------#
# ● update the item target window #
#----------------------------------------------------------------------------#
def update_target_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@items_window.active = true
@target_window.active = false
@target_window.visible = false
@from_item = false
return
end

if Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$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.item_effect(@item)
end
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@items_window.draw_item(@items_window.index)
end
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
return
end
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#----------------------------------------------------------------------------#
# ● update the party target window #
#----------------------------------------------------------------------------#
def update_target_party
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@target_window.active = false
@target_window.visible = false
@from_command = false
return
end

if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Menu.new(3, @target_window.index)
return
end
end
#----------------------------------------------------------------------------#
# ● update the item equip window #
#----------------------------------------------------------------------------#
def update_itemequip
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@equip_window.active = true
@item_window.active = false
@item_window.visible = 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(@equip_window.index, item == nil ? 0 : item.id)
@equip_window.active = true
@item_window.active = false
@item_window.visible = false
@item_window.index = -1
@equip_window.refresh
@item_window.refresh
return
end
end
en
Revenir en haut Aller en bas
deadcell
Trouvère Follet
Trouvère Follet
deadcell


Masculin
Nombre de messages : 625
Age : 35
Niveau Rpg Maker : Excellent Niveau
Jeux Préférés : Final Fantasy, Resident evil...
Date d'inscription : 21/03/2007

Menu 3 Empty
MessageSujet: Re: Menu 3   Menu 3 EmptyVen 06 Juil 2007, 22:09

Et pour finir, créez un script au dessus de main et nommez le "Window_ItemMenu":

Code:
#==============================================================================
# Made or modified by Squall webmaster@loeher.zzn.com
#==============================================================================
# ■ Window_ItemMenu
#==============================================================================

class Window_ItemMenu < Window_Selectable
#--------------------------------------------------------------------------
# ● object define
#--------------------------------------------------------------------------
def initialize
super(280, 0, 200, 480)
@column_max = 1
refresh
self.z = 200
self.active = false
self.visible = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● items define
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = 20
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● draw items
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4
y = index * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 100, 32, item.name, 0)
self.contents.draw_text(x + 128, y, 10, 32, ":", 1)
self.contents.draw_text(x + 138, y, 22, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# ● help window set text settings
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ■ Window_SkillMenu
#==============================================================================

class Window_SkillMenu < Window_Selectable
#--------------------------------------------------------------------------
# ● initialisation
#--------------------------------------------------------------------------
def initialize(actor)
super(280, 0, 200, 288)
@actor = actor
@column_max = 1
refresh

self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● skill define
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = 20
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● draw skill list
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4
y = index * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 110, 32, skill.name, 0)
self.contents.draw_text(x + 138, y, 22, 32, skill.sp_cost.to_s, 2)
end
#--------------------------------------------------------------------------
# ● help_window text settings
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
#--------------------------------------------------------------------------
# ● set up the page_up function
#--------------------------------------------------------------------------
def page_up
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
#--------------------------------------------------------------------------
# ● set up the page_down function
#--------------------------------------------------------------------------
def page_down
if self.top_row > 0
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
#==============================================================================
# ■ Window_TargetMenu
#==============================================================================

class Window_TargetMenu < Window_Selectable
#--------------------------------------------------------------------------
# ● initialize the window
#--------------------------------------------------------------------------
def initialize
super(0, 0, 280, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 20
self.z = 200
self.visible = false
self.active = false
@item_max = $game_party.actors.size
refresh
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = 4
y = i * 116
actor = $game_party.actors[i]
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 114, y)
draw_actor_level(actor, x + 8, y + 32)
draw_actor_state(actor, x + 8, y + 64)
draw_actor_hp(actor, x + 114, y + 32)
draw_actor_sp(actor, x + 114, y + 64)
end
end
#--------------------------------------------------------------------------
# ● cursor update
#--------------------------------------------------------------------------
def update_cursor_rect
if @index <= -2
self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
elsif @index == -1
self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==============================================================================
# ■ Window_MenuStatusMenu
#==============================================================================

class Window_MenuStatusMenu < Window_Base
#--------------------------------------------------------------------------
# ● object define
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 280, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ● define colors
#--------------------------------------------------------------------------
def plus_color
return Color.new(63, 199, 154)
end
def minus_color
return Color.new(200, 79, 62)
end
#--------------------------------------------------------------------------
# ● define draw method for character's evasion
#--------------------------------------------------------------------------
def draw_actor_eva(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, "Evasion")
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
end
#--------------------------------------------------------------------------
# ● define draw method for character's hp
#--------------------------------------------------------------------------
def draw_actorhp(actor, x, y, width = 144)
if actor.maxhp <= 999
w = 12
else
w = 0
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(width + w - 50, y, 48, 32, actor.hp.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(width + w, y, 12, 32, "/", 2)
self.contents.draw_text(width, y, 48, 32, actor.maxhp.to_s, 2)
end
#--------------------------------------------------------------------------
# ● define draw method for character's sp
#--------------------------------------------------------------------------
def draw_actorsp(actor, x, y, width = 144)
if actor.maxsp <= 999
w = 12
else
w = 0
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(width + w - 50, y, 48, 32, actor.sp.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(width + w, y, 12, 32, "/", 2)
self.contents.draw_text(width, y, 48, 32, actor.maxsp.to_s, 2)
end
Revenir en haut Aller en bas
deadcell
Trouvère Follet
Trouvère Follet
deadcell


Masculin
Nombre de messages : 625
Age : 35
Niveau Rpg Maker : Excellent Niveau
Jeux Préférés : Final Fantasy, Resident evil...
Date d'inscription : 21/03/2007

Menu 3 Empty
MessageSujet: Re: Menu 3   Menu 3 EmptyVen 06 Juil 2007, 22:10

Code:
 #--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 124, 0)
draw_actor_graphic(@actor, 230, 50)
draw_actor_level(@actor, 4, 32)
draw_actor_state(@actor, 124, 32)
draw_actorhp(@actor, 4, 64, 114)
draw_actorsp(@actor, 4, 96, 114)
draw_actor_parameter(@actor, 4, 128, 0)
draw_actor_parameter(@actor, 4, 160, 1)
draw_actor_parameter(@actor, 4, 192, 2)
draw_actor_parameter(@actor, 4, 224, 3)
draw_actor_parameter(@actor, 4, 256, 4)
draw_actor_parameter(@actor, 4, 288, 5)
draw_actor_parameter(@actor, 4, 320, 6)
draw_actor_eva(@actor, 4, 352)
self.contents.font.color = system_color
self.contents.draw_text(4, 384, 70, 32, "EXP")
self.contents.draw_text(4, 416, 70, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(4 + 70, 384, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(4 + 70, 416, 84, 32, @actor.next_rest_exp_s, 2)

if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "→", 1)
if @actor.atk < @new_atk
self.contents.font.color = plus_color
elsif @actor.atk > @new_atk
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 128, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 160, 40, 32, "→", 1)
if @actor.pdef < @new_pdef
self.contents.font.color = plus_color
elsif @actor.pdef > @new_pdef
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 160, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 192, 40, 32, "→", 1)
if @actor.mdef < @new_mdef
self.contents.font.color = plus_color
elsif @actor.mdef > @new_mdef
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 192, 36, 32, @new_mdef.to_s, 2)
end
if @new_str != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 224, 40, 32, "→", 1)
if @actor.str < @new_str
self.contents.font.color = plus_color
elsif @actor.str > @new_str
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 224, 36, 32, @new_str.to_s, 2)
end
if @new_dex != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 256, 40, 32, "→", 1)
if @actor.dex < @new_dex
self.contents.font.color = plus_color
elsif @actor.dex > @new_dex
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 256, 36, 32, @new_dex.to_s, 2)
end
if @new_agi != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 288, 40, 32, "→", 1)
if @actor.agi < @new_agi
self.contents.font.color = plus_color
elsif @actor.agi > @new_agi
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 288, 36, 32, @new_agi.to_s, 2)
end
if @new_int != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 320, 40, 32, "→", 1)
if @actor.int < @new_int
self.contents.font.color = plus_color
elsif @actor.int > @new_int
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 320, 36, 32, @new_int.to_s, 2)
end
if @new_eva != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 352, 40, 32, "→", 1)
if @actor.eva < @new_eva
self.contents.font.color = plus_color
elsif @actor.eva > @new_eva
self.contents.font.color = minus_color
else
self.contents.font.color = normal_color
end
self.contents.draw_text(200, 352, 36, 32, @new_eva.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● set new parameters when equipping new items
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int, new_eva)
if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or

@new_agi != new_agi or @new_int != new_int or @new_eva != new_eva
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
@new_str = new_str
@new_dex = new_dex
@new_agi = new_agi
@new_int = new_int
@new_eva = new_eva
refresh
end
end
end
#==============================================================================
# ■ Window_EquipRightMenu
#==============================================================================

class Window_EquipRightMenu < Window_Selectable
#--------------------------------------------------------------------------
# ● initialize the window
#--------------------------------------------------------------------------
def initialize(actor)
super(280, 288, 200, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 20
@actor = actor
refresh

self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● define the items
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
draw_item_name(@data[0], 4, 32 * 0)
draw_item_name(@data[1], 4, 32 * 1)
draw_item_name(@data[2], 4, 32 * 2)
draw_item_name(@data[3], 4, 32 * 3)
draw_item_name(@data[4], 4, 32 * 4)
end
#--------------------------------------------------------------------------
# ● help_window text settings
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
Revenir en haut Aller en bas
deadcell
Trouvère Follet
Trouvère Follet
deadcell


Masculin
Nombre de messages : 625
Age : 35
Niveau Rpg Maker : Excellent Niveau
Jeux Préférés : Final Fantasy, Resident evil...
Date d'inscription : 21/03/2007

Menu 3 Empty
MessageSujet: Re: Menu 3   Menu 3 EmptyVen 06 Juil 2007, 22:11

Et pour finir, créez un script au dessus de main et nommez le "Widow_EquipItem"!

Code:
#==============================================================================
# ■ Window_EquipItem
#==============================================================================

class Window_EquipItemMenu < Window_Selectable
#--------------------------------------------------------------------------
# ● initialize the window
#--------------------------------------------------------------------------
def initialize(actor, equip_type)
super(280, 0, 200, 288)
@actor = actor
@equip_type = equip_type
@column_max = 1
refresh
self.z = 200
self.active = false
self.visible = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● item define
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, (@item_max + 1) * 32)
self.contents.font.name = $fontface
self.contents.font.size = 20
for i in 0...@item_max-1
draw_item(i)
end
self.contents.draw_text(4, (@item_max - 1) * 32, 168, 32, "Enlever")
end
#--------------------------------------------------------------------------
# ● draw the items
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4
y = index * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, 100, 32, item.name, 0)
self.contents.draw_text(x + 128, y, 10, 32, ":", 1)
self.contents.draw_text(x + 138, y, 22, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# ● help_window text settings
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
Revenir en haut Aller en bas
Don Estebahn
Maître du Savoir
Maître du Savoir
Don Estebahn


Masculin
Nombre de messages : 2145
Age : 33
Jeux Préférés : Soul Reaver, Morrowind, Way of the Samurai
Date d'inscription : 18/02/2007

Menu 3 Empty
MessageSujet: Re: Menu 3   Menu 3 EmptyDim 08 Juil 2007, 14:20

C'est un menu un peu étrangement agencé O.o personnellement je ne trouve pas ça plus esthétique que le menu par défaut, mais il n'y a le détail équipement/statut/techniques que pour Arshes, alors peut-être est-ce un menu spécifique pour un seul héros? ^^'

En tout cas, ça en fait des lignes de code... :p

Bref, merci à toi pour cet apport à notre section menu bien illustré et expliqué, comme toujours.
Revenir en haut Aller en bas
Contenu sponsorisé





Menu 3 Empty
MessageSujet: Re: Menu 3   Menu 3 Empty

Revenir en haut Aller en bas
 
Menu 3
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Mog menu yui (VX)
» Mog menu + A-rpg xas
» Menu 4

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Fusion :: BANQUE DU CODE :: Antre des Scripts :: Menu-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser