La Forge des Rêves
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.



 
AccueilAccueil  PortailPortail  Dernières imagesDernières images  RechercherRechercher  S'enregistrerS'enregistrer  ConnexionConnexion  
Le Deal du moment : -45%
WHIRLPOOL OWFC3C26X – Lave-vaisselle pose libre ...
Voir le deal
339 €

 

 Script PHS (Changer de persos)

Aller en bas 
2 participants
AuteurMessage
kill00man
> Grand artiste
> Grand artiste
kill00man


Masculin
Nombre de messages : 285
Age : 43
Localisation : Derrière-toi, prêt a t'assassiner !
Avez vous RPGMXP ? : On dit RMXP et oui, biensûr que je l'ai :p
Quels sont vos projets ? : The Strom Of Chrono
Date d'inscription : 03/05/2007

Fiche Créateur
Points de Créativité:
Script PHS (Changer de persos) Left_bar_bleue0/50Script PHS (Changer de persos) Empty_bar_bleue  (0/50)
Commentaires: Touche a tout, absolument tout!!(et en plus bien XD)

Script PHS (Changer de persos) Empty
MessageSujet: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitimeDim 6 Mai - 11:51

Salut!
Alors voila, un PHS c'est un menu qui permet de changer de persos si on en a plus de 4!
Donc ce script est tres tres long!!!! Mais il marche a merveille XD
Fait un nouveau script au dessus de main et nommez le comme vous voulez!(je vous conseil PHS XD)
Place au script:#SCRIPT PHS
#TRADUIT ET MODIFIE PAR KILL00MAN

#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# Modifié par kill00man
#==============================================================================

class Window_BasePHS < Window
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super()
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
self.x = x
self.y = y
self.width = width
self.height = height
self.z = 100
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
# ウィンドウ内容のビットマップが設定されていれば解放
if self.contents != nil
self.contents.dispose
end
super
end
#--------------------------------------------------------------------------
# ● 文字色取得
# n : 文字色番号 (0~7)
#--------------------------------------------------------------------------
def text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
normal_color
end
end
#--------------------------------------------------------------------------
# ● 通常文字色の取得
#--------------------------------------------------------------------------
def normal_color
return Color.new(255, 255, 255, 255)
end
#--------------------------------------------------------------------------
# ● 無効文字色の取得
#--------------------------------------------------------------------------
def disabled_color
return Color.new(255, 255, 255, 128)
end
#--------------------------------------------------------------------------
# ● システム文字色の取得
#--------------------------------------------------------------------------
def system_color
return Color.new(192, 224, 255, 255)
end
#--------------------------------------------------------------------------
# ● ピンチ文字色の取得
#--------------------------------------------------------------------------
def crisis_color
return Color.new(255, 255, 64, 255)
end
#--------------------------------------------------------------------------
# ● 戦闘不能文字色の取得
#--------------------------------------------------------------------------
def knockout_color
return Color.new(255, 64, 0)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# ウィンドウスキンが変更された場合、再設定
if $game_system.windowskin_name != @windowskin_name
@windowskin_name = $game_system.windowskin_name
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
end
end
#--------------------------------------------------------------------------
# ● グラフィックの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y)
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● 名前の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#--------------------------------------------------------------------------
# ● クラスの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_class(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
#--------------------------------------------------------------------------
# ● レベルの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_level(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#--------------------------------------------------------------------------
# ● 描画用のステート文字列作成
# actor : アクター
# width : 描画先の幅
# need_normal : [正常] が必要かどうか (true / false)
#--------------------------------------------------------------------------
def make_battler_state_text(battler, width, need_normal)
# 括弧の幅を取得
brackets_width = self.contents.text_size("[]").width
# ステート名の文字列を作成
text = ""
for i in battler.states
if $data_states[i].rating >= 1
if text == ""
text = $data_states[i].name
else
new_text = text + "/" + $data_states[i].name
text_width = self.contents.text_size(new_text).width
if text_width > width - brackets_width
break
end
text = new_text
end
end
end
# ステート名の文字列が空の場合は "[正常]" にする
if text == ""
if need_normal
text = "[Normal]"
end
else
# 括弧をつける
text = "[" + text + "]"
end
# 完成した文字列を返す
return text
end
#--------------------------------------------------------------------------
# ● ステートの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# width : 描画先の幅
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#--------------------------------------------------------------------------
# ● EXP の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 24, 32, "E")
self.contents.font.color = normal_color
self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
end
#--------------------------------------------------------------------------
# ● HP の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# width : 描画先の幅
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 144)
# 文字列 "HP" を描画
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# MaxHP を描画するスペースがあるか計算
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# HP を描画
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
# MaxHP を描画
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
#--------------------------------------------------------------------------
# ● SP の描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# width : 描画先の幅
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 144)
# 文字列 "SP" を描画
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# MaxSP を描画するスペースがあるか計算
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# SP を描画
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
# MaxSP を描画
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
#--------------------------------------------------------------------------
# ● パラメータの描画
# actor : アクター
# x : 描画先 X 座標
# y : 描画先 Y 座標
# type : パラメータの種類 (0~6)
#--------------------------------------------------------------------------
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = $data_system.words.mdef
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
end
#--------------------------------------------------------------------------
# ● アイテム名の描画
# item : アイテム
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_item_name(item, x, y)
if item == nil
return
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, 212, 32, item.name)
end
end

Suite ci-dessus


Dernière édition par le Dim 6 Mai - 12:02, édité 1 fois
Revenir en haut Aller en bas
kill00man
> Grand artiste
> Grand artiste
kill00man


Masculin
Nombre de messages : 285
Age : 43
Localisation : Derrière-toi, prêt a t'assassiner !
Avez vous RPGMXP ? : On dit RMXP et oui, biensûr que je l'ai :p
Quels sont vos projets ? : The Strom Of Chrono
Date d'inscription : 03/05/2007

Fiche Créateur
Points de Créativité:
Script PHS (Changer de persos) Left_bar_bleue0/50Script PHS (Changer de persos) Empty_bar_bleue  (0/50)
Commentaires: Touche a tout, absolument tout!!(et en plus bien XD)

Script PHS (Changer de persos) Empty
MessageSujet: Re: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitimeDim 6 Mai - 11:52

SUITE
[quote]
# --------------------------------
def up_color
return Color.new(74, 210, 74)
end
# --------------------------------
def down_color
return Color.new(170, 170, 170)
end

#==============================================================================
# &amp;#9632; Window_Selectable
#------------------------------------------------------------------------------
#Modifié par kill00man
#==============================================================================

class Window_SelectablePHS &lt; Window_BasePHS
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#20844;&amp;#38283;&amp;#12452;&amp;#12531;&amp;#12473;&amp;#12479;&amp;#12531;&amp;#12473;&amp;#22793;&amp;#25968;
#--------------------------------------------------------------------------
attr_reader :index # &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;
attr_reader :help_window # &amp;#12504;&amp;#12523;&amp;#12503;&amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#12458;&amp;#12502;&amp;#12472;&amp;#12455;&amp;#12463;&amp;#12488;&amp;#21021;&amp;#26399;&amp;#21270;
# x : &amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#12398; X &amp;#24231;&amp;#27161;
# y : &amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#12398; Y &amp;#24231;&amp;#27161;
# width : &amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#12398;&amp;#24133;
# height : &amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#12398;&amp;#39640;&amp;#12373;
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;&amp;#12398;&amp;#35373;&amp;#23450;
# index : &amp;#26032;&amp;#12375;&amp;#12356;&amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;
#--------------------------------------------------------------------------
def index=(index)
@index = index
# &amp;#12504;&amp;#12523;&amp;#12503;&amp;#12486;&amp;#12461;&amp;#12473;&amp;#12488;&amp;#12434;&amp;#26356;&amp;#26032; (update_help &amp;#12399;&amp;#32153;&amp;#25215;&amp;#20808;&amp;#12391;&amp;#23450;&amp;#32681;&amp;#12373;&amp;#12428;&amp;#12427;)
if self.active and @help_window != nil
update_help
end
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12398;&amp;#30697;&amp;#24418;&amp;#12434;&amp;#26356;&amp;#26032;
update_cursor_rect
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#34892;&amp;#25968;&amp;#12398;&amp;#21462;&amp;#24471;
#--------------------------------------------------------------------------
def row_max
# &amp;#38917;&amp;#30446;&amp;#25968;&amp;#12392;&amp;#21015;&amp;#25968;&amp;#12363;&amp;#12425;&amp;#34892;&amp;#25968;&amp;#12434;&amp;#31639;&amp;#20986;
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#20808;&amp;#38957;&amp;#12398;&amp;#34892;&amp;#12398;&amp;#21462;&amp;#24471;
#--------------------------------------------------------------------------
def top_row
# &amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#20869;&amp;#23481;&amp;#12398;&amp;#36578;&amp;#36865;&amp;#20803; Y &amp;#24231;&amp;#27161;&amp;#12434;&amp;#12289;1 &amp;#34892;&amp;#12398;&amp;#39640;&amp;#12373; 32 &amp;#12391;&amp;#21106;&amp;#12427;
return self.oy / 32
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#20808;&amp;#38957;&amp;#12398;&amp;#34892;&amp;#12398;&amp;#35373;&amp;#23450;
# row : &amp;#20808;&amp;#38957;&amp;#12395;&amp;#34920;&amp;#31034;&amp;#12377;&amp;#12427;&amp;#34892;
#--------------------------------------------------------------------------
def top_row=(row)
# row &amp;#12364; 0 &amp;#26410;&amp;#28288;&amp;#12398;&amp;#22580;&amp;#21512;&amp;#12399; 0 &amp;#12395;&amp;#20462;&amp;#27491;
if row &lt; 0
row = 0
end
# row &amp;#12364; row_max - 1 &amp;#36229;&amp;#12398;&amp;#22580;&amp;#21512;&amp;#12399; row_max - 1 &amp;#12395;&amp;#20462;&amp;#27491;
if row &gt; row_max - 1
row = row_max - 1
end
# row &amp;#12395; 1 &amp;#34892;&amp;#12398;&amp;#39640;&amp;#12373; 32 &amp;#12434;&amp;#25499;&amp;#12369;&amp;#12289;&amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#20869;&amp;#23481;&amp;#12398;&amp;#36578;&amp;#36865;&amp;#20803; Y &amp;#24231;&amp;#27161;&amp;#12392;&amp;#12377;&amp;#12427;
self.oy = row * 32
end
#--------------------------------------------------------------------------
# &amp;#9679; 1 &amp;#12506;&amp;#12540;&amp;#12472;&amp;#12395;&amp;#34920;&amp;#31034;&amp;#12391;&amp;#12365;&amp;#12427;&amp;#34892;&amp;#25968;&amp;#12398;&amp;#21462;&amp;#24471;
#--------------------------------------------------------------------------
def page_row_max
# &amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#12398;&amp;#39640;&amp;#12373;&amp;#12363;&amp;#12425;&amp;#12289;&amp;#12501;&amp;#12524;&amp;#12540;&amp;#12512;&amp;#12398;&amp;#39640;&amp;#12373; 32 &amp;#12434;&amp;#24341;&amp;#12365;&amp;#12289;1 &amp;#34892;&amp;#12398;&amp;#39640;&amp;#12373; 32 &amp;#12391;&amp;#21106;&amp;#12427;
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# &amp;#9679; 1 &amp;#12506;&amp;#12540;&amp;#12472;&amp;#12395;&amp;#34920;&amp;#31034;&amp;#12391;&amp;#12365;&amp;#12427;&amp;#38917;&amp;#30446;&amp;#25968;&amp;#12398;&amp;#21462;&amp;#24471;
#--------------------------------------------------------------------------
def page_item_max
# &amp;#34892;&amp;#25968; page_row_max &amp;#12395; &amp;#21015;&amp;#25968; @column_max &amp;#12434;&amp;#25499;&amp;#12369;&amp;#12427;
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#12504;&amp;#12523;&amp;#12503;&amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;&amp;#12398;&amp;#35373;&amp;#23450;
# help_window : &amp;#26032;&amp;#12375;&amp;#12356;&amp;#12504;&amp;#12523;&amp;#12503;&amp;#12454;&amp;#12451;&amp;#12531;&amp;#12489;&amp;#12454;
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# &amp;#12504;&amp;#12523;&amp;#12503;&amp;#12486;&amp;#12461;&amp;#12473;&amp;#12488;&amp;#12434;&amp;#26356;&amp;#26032; (update_help &amp;#12399;&amp;#32153;&amp;#25215;&amp;#20808;&amp;#12391;&amp;#23450;&amp;#32681;&amp;#12373;&amp;#12428;&amp;#12427;)
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12398;&amp;#30697;&amp;#24418;&amp;#26356;&amp;#26032;
#--------------------------------------------------------------------------
def update_cursor_rect
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;&amp;#12364; 0 &amp;#26410;&amp;#28288;&amp;#12398;&amp;#22580;&amp;#21512;
if @index &lt; 0
self.cursor_rect.empty
return
end
# &amp;#29694;&amp;#22312;&amp;#12398;&amp;#34892;&amp;#12434;&amp;#21462;&amp;#24471;
row = @index / @column_max
# &amp;#29694;&amp;#22312;&amp;#12398;&amp;#34892;&amp;#12364;&amp;#12289;&amp;#34920;&amp;#31034;&amp;#12373;&amp;#12428;&amp;#12390;&amp;#12356;&amp;#12427;&amp;#20808;&amp;#38957;&amp;#12398;&amp;#34892;&amp;#12424;&amp;#12426;&amp;#21069;&amp;#12398;&amp;#22580;&amp;#21512;
if row &lt; self.top_row
# &amp;#29694;&amp;#22312;&amp;#12398;&amp;#34892;&amp;#12364;&amp;#20808;&amp;#38957;&amp;#12395;&amp;#12394;&amp;#12427;&amp;#12424;&amp;#12358;&amp;#12395;&amp;#12473;&amp;#12463;&amp;#12525;&amp;#12540;&amp;#12523;
self.top_row = row
end
# &amp;#29694;&amp;#22312;&amp;#12398;&amp;#34892;&amp;#12364;&amp;#12289;&amp;#34920;&amp;#31034;&amp;#12373;&amp;#12428;&amp;#12390;&amp;#12356;&amp;#12427;&amp;#26368;&amp;#24460;&amp;#23614;&amp;#12398;&amp;#34892;&amp;#12424;&amp;#12426;&amp;#24460;&amp;#12429;&amp;#12398;&amp;#22580;&amp;#21512;
if row &gt; self.top_row + (self.page_row_max - 1)
# &amp;#29694;&amp;#22312;&amp;#12398;&amp;#34892;&amp;#12364;&amp;#26368;&amp;#24460;&amp;#23614;&amp;#12395;&amp;#12394;&amp;#12427;&amp;#12424;&amp;#12358;&amp;#12395;&amp;#12473;&amp;#12463;&amp;#12525;&amp;#12540;&amp;#12523;
self.top_row = row - (self.page_row_max - 1)
end
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12398;&amp;#24133;&amp;#12434;&amp;#35336;&amp;#31639;
cursor_width = self.width / @column_max - 32
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12398;&amp;#24231;&amp;#27161;&amp;#12434;&amp;#35336;&amp;#31639;
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 32 - self.oy
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12398;&amp;#30697;&amp;#24418;&amp;#12434;&amp;#26356;&amp;#26032;
self.cursor_rect.set(x, y, cursor_width, 32)
end
#--------------------------------------------------------------------------
# &amp;#9679; &amp;#12501;&amp;#12524;&amp;#12540;&amp;#12512;&amp;#26356;&amp;#26032;
#--------------------------------------------------------------------------
def update
super
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12398;&amp;#31227;&amp;#21205;&amp;#12364;&amp;#21487;&amp;#33021;&amp;#12394;&amp;#29366;&amp;#24907;&amp;#12398;&amp;#22580;&amp;#21512;
if self.active and @item_max &gt; 0 and @index &gt;= 0
# &amp;#26041;&amp;#21521;&amp;#12508;&amp;#12479;&amp;#12531;&amp;#12398;&amp;#19979;&amp;#12364;&amp;#25276;&amp;#12373;&amp;#12428;&amp;#12383;&amp;#22580;&amp;#21512;
if Input.repeat?(Input::DOWN)
# &amp;#21015;&amp;#25968;&amp;#12364; 1 &amp;#12363;&amp;#12388; &amp;#26041;&amp;#21521;&amp;#12508;&amp;#12479;&amp;#12531;&amp;#12398;&amp;#19979;&amp;#12398;&amp;#25276;&amp;#19979;&amp;#29366;&amp;#24907;&amp;#12364;&amp;#12522;&amp;#12500;&amp;#12540;&amp;#12488;&amp;#12391;&amp;#12394;&amp;#12356;&amp;#22580;&amp;#21512;&amp;#12363;&amp;#12289;
# &amp;#12414;&amp;#12383;&amp;#12399;&amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;&amp;#12364;(&amp;#38917;&amp;#30446;&amp;#25968; - &amp;#21015;&amp;#25968;)&amp;#12424;&amp;#12426;&amp;#21069;&amp;#12398;&amp;#22580;&amp;#21512;
if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
@index &lt; @item_max - @column_max
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12434;&amp;#19979;&amp;#12395;&amp;#31227;&amp;#21205;
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# &amp;#26041;&amp;#21521;&amp;#12508;&amp;#12479;&amp;#12531;&amp;#12398;&amp;#19978;&amp;#12364;&amp;#25276;&amp;#12373;&amp;#12428;&amp;#12383;&amp;#22580;&amp;#21512;
if Input.repeat?(Input::UP)
# &amp;#21015;&amp;#25968;&amp;#12364; 1 &amp;#12363;&amp;#12388; &amp;#26041;&amp;#21521;&amp;#12508;&amp;#12479;&amp;#12531;&amp;#12398;&amp;#19978;&amp;#12398;&amp;#25276;&amp;#19979;&amp;#29366;&amp;#24907;&amp;#12364;&amp;#12522;&amp;#12500;&amp;#12540;&amp;#12488;&amp;#12391;&amp;#12394;&amp;#12356;&amp;#22580;&amp;#21512;&amp;#12363;&amp;#12289;
# &amp;#12414;&amp;#12383;&amp;#12399;&amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;&amp;#12364;&amp;#21015;&amp;#25968;&amp;#12424;&amp;#12426;&amp;#24460;&amp;#12429;&amp;#12398;&amp;#22580;&amp;#21512;
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index &gt;= @column_max
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12434;&amp;#19978;&amp;#12395;&amp;#31227;&amp;#21205;
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# &amp;#26041;&amp;#21521;&amp;#12508;&amp;#12479;&amp;#12531;&amp;#12398;&amp;#21491;&amp;#12364;&amp;#25276;&amp;#12373;&amp;#12428;&amp;#12383;&amp;#22580;&amp;#21512;
if Input.repeat?(Input::RIGHT)
# &amp;#21015;&amp;#25968;&amp;#12364; 2 &amp;#20197;&amp;#19978;&amp;#12391;&amp;#12289;&amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;&amp;#12364;(&amp;#38917;&amp;#30446;&amp;#25968; - 1)&amp;#12424;&amp;#12426;&amp;#21069;&amp;#12398;&amp;#22580;&amp;#21512;
if @column_max &gt;= 2 and @index &lt; @item_max - 1
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12434;&amp;#21491;&amp;#12395;&amp;#31227;&amp;#21205;
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# &amp;#26041;&amp;#21521;&amp;#12508;&amp;#12479;&amp;#12531;&amp;#12398;&amp;#24038;&amp;#12364;&amp;#25276;&amp;#12373;&amp;#12428;&amp;#12383;&amp;#22580;&amp;#21512;
if Input.repeat?(Input::LEFT)
# &amp;#21015;&amp;#25968;&amp;#12364; 2 &amp;#20197;&amp;#19978;&amp;#12391;&amp;#12289;&amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#20301;&amp;#32622;&amp;#12364; 0 &amp;#12424;&amp;#12426;&amp;#24460;&amp;#12429;&amp;#12398;&amp;#22580;&amp;#21512;
if @column_max &gt;= 2 and @index &gt; 0
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12434;&amp;#24038;&amp;#12395;&amp;#31227;&amp;#21205;
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R &amp;#12508;&amp;#12479;&amp;#12531;&amp;#12364;&amp;#25276;&amp;#12373;&amp;#12428;&amp;#12383;&amp;#22580;&amp;#21512;
if Input.repeat?(Input::R)
# &amp;#34920;&amp;#31034;&amp;#12373;&amp;#12428;&amp;#12390;&amp;#12356;&amp;#12427;&amp;#26368;&amp;#24460;&amp;#23614;&amp;#12398;&amp;#34892;&amp;#12364;&amp;#12289;&amp;#12487;&amp;#12540;&amp;#12479;&amp;#19978;&amp;#12398;&amp;#26368;&amp;#24460;&amp;#12398;&amp;#34892;&amp;#12424;&amp;#12426;&amp;#12418;&amp;#21069;&amp;#12398;&amp;#22580;&amp;#21512;
if self.top_row + (self.page_row_max - 1) &lt; (self.row_max - 1)
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12434; 1 &amp;#12506;&amp;#12540;&amp;#12472;&amp;#24460;&amp;#12429;&amp;#12395;&amp;#31227;&amp;#21205;
$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
# L &amp;#12508;&amp;#12479;&amp;#12531;&amp;#12364;&amp;#25276;&amp;#12373;&amp;#12428;&amp;#12383;&amp;#22580;&amp;#21512;
if Input.repeat?(Input::L)
# &amp;#34920;&amp;#31034;&amp;#12373;&amp;#12428;&amp;#12390;&amp;#12356;&amp;#12427;&amp;#20808;&amp;#38957;&amp;#12398;&amp;#34892;&amp;#12364; 0 &amp;#12424;&amp;#12426;&amp;#24460;&amp;#12429;&amp;#12398;&amp;#22580;&amp;#21512;
if self.top_row &gt; 0
# &amp;#12459;&amp;#12540;&amp;#12477;&amp;#12523;&amp;#12434; 1 &amp;#12506;&amp;#12540;&amp;#12472;&amp;#21069;&amp;#12395;&amp;#31227;&amp;#21205;
$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
# &amp;#12504;&amp;#12523;&amp;#12503;&amp;#12486;&amp;#12461;&amp;#12473;&amp;#12488;&amp;#12434;&amp;#26356;&amp;#26032; (update_help &amp;#12399;&amp;#32153;&amp;#25215;&amp;#20808;&amp;#12391;&amp;#23450;&amp;#32681;&amp;#12373;&amp;#12428;&amp;#12427;)
if self.active and @help_window != nil
update_help
end
[code]
SUITE CI-DESSUS
Revenir en haut Aller en bas
kill00man
> Grand artiste
> Grand artiste
kill00man


Masculin
Nombre de messages : 285
Age : 43
Localisation : Derrière-toi, prêt a t'assassiner !
Avez vous RPGMXP ? : On dit RMXP et oui, biensûr que je l'ai :p
Quels sont vos projets ? : The Strom Of Chrono
Date d'inscription : 03/05/2007

Fiche Créateur
Points de Créativité:
Script PHS (Changer de persos) Left_bar_bleue0/50Script PHS (Changer de persos) Empty_bar_bleue  (0/50)
Commentaires: Touche a tout, absolument tout!!(et en plus bien XD)

Script PHS (Changer de persos) Empty
MessageSujet: Re: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitimeDim 6 Mai - 11:53

SUITE
# カーソルの矩形を更新
update_cursor_rect
end
end

#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
# Modifié par kill00man
#==============================================================================

class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  ゲーム中のすべてのウィンドウのスーパークラスです。
#==============================================================================

class Window_BasePHS < Window
#--------------------------------------------------------------------------
# ● HP ゲージの描画
#--------------------------------------------------------------------------
# オリジナルのHP描画を draw_actor_hp_hpsp と名前変更
alias :draw_actor_hp_hpsp :draw_actor_hp
def draw_actor_hp(actor, x, y, width = 288)
# 変数rateに 現在のHP/MHPを代入
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
# plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
# plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
# align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
# align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
# align3:ゲージタイプ 0:左詰め 1:右詰め
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# グラデーション設定 grade1:空ゲージ grade2:実ゲージ
# (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
grade1 = 1
grade2 = 0
# 色設定。color1:外枠,color2:中枠
# color3:空ゲージダークカラー,color4:空ゲージライトカラー
# color5:実ゲージダークカラー,color6:実ゲージライトカラー
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(64, 0, 0, 192)
color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
# 変数spに描画するゲージの幅を代入
if actor.maxhp != 0
hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
else
hp = 0
end
# ゲージの描画
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, hp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# オリジナルのHP描画処理を呼び出し
draw_actor_hp_hpsp(actor, x, y, width)
end
#--------------------------------------------------------------------------
# ● SP ゲージの描画
#--------------------------------------------------------------------------
# オリジナルのSP描画を draw_actor_sp_hpsp と名前変更
alias :draw_actor_sp_hpsp :draw_actor_sp
def draw_actor_sp(actor, x, y, width = 288)
# 変数rateに 現在のSP/MSPを代入
if actor.maxsp != 0
rate = actor.sp.to_f / actor.maxsp
else
rate = 1
end

SUITE CI-DESSUS
Revenir en haut Aller en bas
kill00man
> Grand artiste
> Grand artiste
kill00man


Masculin
Nombre de messages : 285
Age : 43
Localisation : Derrière-toi, prêt a t'assassiner !
Avez vous RPGMXP ? : On dit RMXP et oui, biensûr que je l'ai :p
Quels sont vos projets ? : The Strom Of Chrono
Date d'inscription : 03/05/2007

Fiche Créateur
Points de Créativité:
Script PHS (Changer de persos) Left_bar_bleue0/50Script PHS (Changer de persos) Empty_bar_bleue  (0/50)
Commentaires: Touche a tout, absolument tout!!(et en plus bien XD)

Script PHS (Changer de persos) Empty
MessageSujet: Re: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitimeDim 6 Mai - 11:54

SUITE
# plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
# plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
# align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
# align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
# align3:ゲージタイプ 0:左詰め 1:右詰め
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# グラデーション設定 grade1:空ゲージ grade2:実ゲージ
# (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
grade1 = 1
grade2 = 0
# 色設定。color1:外枠,color2:中枠
# color3:空ゲージダークカラー,color4:空ゲージライトカラー
# color5:実ゲージダークカラー,color6:実ゲージライトカラー
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(0, 64, 0, 192)
color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
# 変数spに描画するゲージの幅を代入
if actor.maxsp != 0
sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
else
sp = (width + plus_width) * rate_width / 100
end
# ゲージの描画
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, sp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# オリジナルのSP描画処理を呼び出し
draw_actor_sp_hpsp(actor, x, y, width)
end
#--------------------------------------------------------------------------
# ● ゲージの描画
#--------------------------------------------------------------------------
def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
case align1
when 1
x += (rect_width - width) / 2
when 2
x += rect_width - width
end
case align2
when 1
y -= height / 2
when 2
y -= height
end
# 枠描画
self.contents.fill_rect(x, y, width, height, color1)
self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
if align3 == 0
if grade1 == 2
grade1 = 3
end
if grade2 == 2
grade2 = 3
end
end
if (align3 == 1 and grade1 == 0) or grade1 > 0
color = color3
color3 = color4
color4 = color
end
if (align3 == 1 and grade2 == 0) or grade2 > 0
color = color5
color5 = color6
color6 = color
end
# 空ゲージの描画
self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
color3, color4, grade1)
if align3 == 1
x += width - gauge
end
# 実ゲージの描画
self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
color5, color6, grade2)
end
end

#------------------------------------------------------------------------------
#  Bitmapクラスに新たな機能を追加します。
#==============================================================================

class Bitmap
#--------------------------------------------------------------------------
# ● 矩形をグラデーション表示
# color1 : スタートカラー
# color2 : エンドカラー
# align : 0:横にグラデーション
# 1:縦にグラデーション
# 2:斜めにグラデーション(激重につき注意)
#--------------------------------------------------------------------------
def gradation_rect(x, y, width, height, color1, color2, align = 0)
if align == 0
for i in x...x + width
red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
green = color1.green +
(color2.green - color1.green) * (i - x) / (width - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - x) / (width - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color1.red +
(color2.red - color1.red) * (i - y) / (height - 1)
green = color1.green +
(color2.green - color1.green) * (i - y) / (height - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - y) / (height - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end
end

SUITE CI-DESSUS
Revenir en haut Aller en bas
kill00man
> Grand artiste
> Grand artiste
kill00man


Masculin
Nombre de messages : 285
Age : 43
Localisation : Derrière-toi, prêt a t'assassiner !
Avez vous RPGMXP ? : On dit RMXP et oui, biensûr que je l'ai :p
Quels sont vos projets ? : The Strom Of Chrono
Date d'inscription : 03/05/2007

Fiche Créateur
Points de Créativité:
Script PHS (Changer de persos) Left_bar_bleue0/50Script PHS (Changer de persos) Empty_bar_bleue  (0/50)
Commentaires: Touche a tout, absolument tout!!(et en plus bien XD)

Script PHS (Changer de persos) Empty
MessageSujet: Re: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitimeDim 6 Mai - 11:54

SUITE ET FIN
#DEBUT SCRIPT PHS EN LUI MEME
#Ici c'est très important
#Remplacer @party_max = 4 par le nombre de héros voulu maximum (mettre @party_max = 6 pour avoir 6 héros...)
#Remplacer @party_min = 1 par le nombre de héro minimum comme haut dessus
#@must_actors=[1] défini l'id des heros obligatoire (metre [1,2,3] pour obliger les héros 1 2 et 3)
class Game_Party
attr_accessor :party_max
attr_accessor :party_min
attr_accessor :must_actors
alias party_select_initialize initialize
def initialize
party_select_initialize
@party_max = 4
@party_min = 1
@must_actors = [1]
end
def must_actor_include?(actor)
return @must_actors.include?(actor.id)
end
end

class Window_Party_Select < Window_SelectablePHS
def initialize
super(0, 96, 640, 384)
@party_in_ok_menber = party_in_menber
@item_max = party_in_menber.size
@column_max = 4
self.contents = Bitmap.new(width - 32, row_max * 88)
self.contents.font.name = "Times New Roman"
self.contents.font.size = 18
self.index = 0
refresh
end
def menber
return @party_in_ok_menber[self.index]
end
#--------------------------------------------------------------------------
# Ici c'est très important!!
#Endessus, on vois des trucs bizarres
#menber.push($game_actors[1])
# menber.push($game_actors[2]) if $game_switches[1]
#Explications menber.push($game_actors[X]) if $game_switches[Y]
#Remplacer le X par l'Id du héro voulu dans l'équipe
#Remplacer le Y par l'Id de l'événement a partir duquel il est possible d'insérer le héro X dans l'équipe
#Ensuite apprend a l'utiliser en détail par toi-même
#--------------------------------------------------------------------------
def party_in_menber
menber = []
menber.push($game_actors[1])
menber.push($game_actors[2]) if $game_switches[1]
menber.push($game_actors[3]) if $game_switches[2]
menber.push($game_actors[4]) if $game_switches[3]
menber.push($game_actors[5]) if $game_switches[4]
menber.push($game_actors[6]) if $game_switches[5]
menber.push($game_actors[7]) if $game_switches[6]
menber.push($game_actors[8]) if $game_switches[7]
return menber
end
def refresh
self.contents.clear
for i in 0...@party_in_ok_menber.size
draw_menber(i)
end
end
def draw_menber(index)
actor = @party_in_ok_menber[index]
x = 4 + index % @column_max * (640 / @column_max)
y = index / @column_max * 88
if $game_party.must_actor_include?(actor)
color = text_color(3)
opacity = 255
elsif $game_party.actors.include?(actor)
color = normal_color
opacity = 255
else
color = disabled_color
opacity = 128
end
self.contents.font.color = color
self.contents.draw_text(x, y, 120, 32, actor.name)
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x+32 - cw / 2, y+64+16 - ch, bitmap, src_rect, opacity)
end
def row_max
return (@item_max + @column_max - 1) / @column_max
end
def top_row
return self.oy / 88
end
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
if row < 0
row = 0
end
end
self.oy = row * 88
end
def page_row_max
return (self.height - 32) / 88
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = 512 / @column_max
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 88 - self.oy
self.cursor_rect.set(x, y, cursor_width, 32)
end
end

class Window_Party_Select_Menber < Window_BasePHS
def initialize
super(0, 0, 640, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Times New Roman"
self.contents.font.size = 18
refresh
end
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
draw_menber(i)
end
end
def draw_menber(index)
actor = $game_party.actors[index]
x = 4 + index * (640 / $game_party.party_max)
y = 0
draw_actor_graphic(actor, x+32, y+48+8)
end
end

class Window_Party_Select_Menber_Status < Window_BasePHS
def initialize
super(0, 288, 640, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Times New Roman"
self.contents.font.size = 18
self.visible = false
end
def refresh(actor)
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_class(actor, 4 + 144, 0)
draw_actor_level(actor, 4, 32)
draw_actor_state(actor, 4 + 72, 32)
draw_actor_hp(actor, 4, 64, 172)
draw_actor_sp(actor, 4, 96, 172)
draw_actor_parameter(actor, 218, 32, 0)
draw_actor_parameter(actor, 218, 64, 1)
draw_actor_parameter(actor, 218, 96, 2)
draw_actor_parameter(actor, 430, 32, 3)
draw_actor_parameter(actor, 430, 64, 4)
draw_actor_parameter(actor, 430, 96, 5)
draw_actor_parameter(actor, 430, 128, 6)

end
end

class Scene_Party_in
def main
@main_window = Window_Party_Select.new
@menber_window = Window_Party_Select_Menber.new
@status_window = Window_Party_Select_Menber_Status.new
@status_window.opacity = 192
@status_window.z += 10
@show_index = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@main_window.dispose
@menber_window.dispose
@status_window.dispose
end
def update
@main_window.update
if @status_window.visible and @show_index != @main_window.index
status_window_position
@status_window.refresh(@main_window.menber)
@show_index = @main_window.index
end
if Input.trigger?(Input::B)
if $game_party.actors.size < $game_party.party_min
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if keyboard($Key_NUMPAD1)
if $game_party.must_actor_include?(@main_window.menber)
$game_system.se_play($data_system.buzzer_se)
return
end
if $game_party.actors.include?(@main_window.menber)
$game_party.remove_actor(@main_window.menber.id)
else
if $game_party.actors.size == $game_party.party_max
$game_system.se_play($data_system.buzzer_se)
return
end
$game_party.add_actor(@main_window.menber.id)
end
$game_system.se_play($data_system.decision_se)
@main_window.refresh
@menber_window.refresh
return
end
if @status_window.visible
@status_window.visible = true
else
status_window_position
@status_window.refresh(@main_window.menber)
@status_window.visible = true
@show_index = @main_window.index
end
return
end
end
def status_window_position
if @main_window.cursor_rect.y < 176
@status_window.y = 288
else
@status_window.y = 96
end
end


Maintenant, les explications!
Regardez vers la ligne 790; cherchez en dessous:
party_select_initialize
@party_max = 4
@party_min = 1
@must_actors = [1]
changez le 4 par le nombre max de persos en jeu
changez le 1 par le nombre min de persos en jeu
changez le [1] par l'ID des persos obligatoires

Ensuite, vers la ligne 833:
menber.push($game_actors[1])
menber.push($game_actors[2]) if $game_switches[1]
menber.push($game_actors[3]) if $game_switches[2]
menber.push($game_actors[4]) if $game_switches[3]
menber.push($game_actors[5]) if $game_switches[4]
menber.push($game_actors[6]) if $game_switches[5]
menber.push($game_actors[7]) if $game_switches[6]
menber.push($game_actors[8]) if $game_switches[7]
regardez et essayez de comprendre! explications:
menber.push($game_actors[2]) if $game_switches[1]
L'héro a l'id 2 est changeable dans le menu Si Interrupteur [1] est activé
Et ainsi de suite pour les autres! Vous l'aurez compris, changez le [1] pour la ligne ci-dessus par le numéro de l'interrupteur a partir du quel, dans le menu PHS on pourra choisir le perso dont l'Id est dit avant.

Je coirs que c'était clair, mais si jamais vous n'y arrivez pas, dites le moi!
Si vous voulez, je vous ferez un tuto/script pour mettre l'options PHS dans le menu ;)
Voila!
Pour l'appeler: $scene = Scene_Party_in.new
++

EDIT: Me suis gourer, en postant le scrit j'ai mis tout le long suite ci-dessus mais c'est suite ci-dessous^^


Dernière édition par le Dim 6 Mai - 13:12, édité 1 fois
Revenir en haut Aller en bas
Luck
> Administrateur
> Administrateur
Luck


Masculin
Nombre de messages : 507
Age : 31
Localisation : 35
Avez vous RPGMXP ? : Oui
Quels sont vos projets ? : Nightmares of Apocalypsia - Mario Kart XP
Date d'inscription : 17/11/2006

Fiche Créateur
Points de Créativité:
Script PHS (Changer de persos) Left_bar_bleue50/50Script PHS (Changer de persos) Empty_bar_bleue  (50/50)
Commentaires: Administrateur du forum.

Script PHS (Changer de persos) Empty
MessageSujet: Re: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitimeDim 6 Mai - 12:44

Pas grave ... pour le partage du script et le temps que tu as mis pour poster, je te donne deux PA.
Revenir en haut Aller en bas
Contenu sponsorisé





Script PHS (Changer de persos) Empty
MessageSujet: Re: Script PHS (Changer de persos)   Script PHS (Changer de persos) Icon_minitime

Revenir en haut Aller en bas
 
Script PHS (Changer de persos)
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Script Anti lag
» Script Tactical RPG
» [Ruby] Changer la police

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
La Forge des Rêves :: > Salle technique :: Outils courants-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser