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

Network RPG Maker

Aide Professionnelle pour N-RPG Maker, RM2003/XP et 3D Rpg Builder
 
AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
Le Deal du moment : -20%
Xiaomi Poco M6 Pro (8 Go / 256 Go) Noir
Voir le deal
159.99 €

 

 script:Combat à la FFVI amélioré.

Aller en bas 
3 participants
AuteurMessage
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:24

Pris du site:
http://rpgmakerxp-factory.net/forum/index.php?topic=9237.0

Créer un script au-dessus de Main et appelez-le "New_Battle" et mettez le code suivant:
Citation :
#==============================================================================
# ¦ New_Battle
#------------------------------------------------------------------------------
# Compiled By : MakirouAru et modifié par Cheuf Zero
#==============================================================================
# ¥£¥ XRXS_BP 3. Ÿ—˜ŽžHP‰ñ•œ ver.1.01 ¥£¥
# by fukuyama, ÷‰ë Ý“y

# Battle_End_Recovery
#
# 퓬Œã‚̉ñ•œˆ—ƒ‚ƒWƒ…[ƒ‹
#
# Request: stay
# scrîpt: fukuyama
# Test: ƒmƒRƒmŽq
#
# URL: http://www4.big.or.jp/~fukuyama/rgss/Battle_End_Recovery.txt
#

module Battle_End_Recovery

module Scene_Battle_Module

# ‰ñ•œ—¦•Ï”‚ÌID
@@recovery_rate_variable_id = nil

# ‰ñ•œ—¦‚̎擾
def battle_end_recovery_rate
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id =
$data_system.variables.index '퓬Œã‚̉ñ•œ—¦'
if @@recovery_rate_variable_id.nil?
@@recovery_rate_variable_id = false
end
end
return 0 unless @@recovery_rate_variable_id
return $game_variables[@@recovery_rate_variable_id]
end

# 퓬Œã‚̉ñ•œˆ—
def battle_end_recovery

# ‰ñ•œ—¦
recovery_rate = battle_end_recovery_rate

# ‰ñ•œ—¦•Ï”‚ª‚OˆÈŠO‚©‚ƒAƒNƒ^[‚ª¶‘¶‚µ‚Ä‚¢‚éê‡A퓬Œã‚̉ñ•œˆ—‚ðs‚¤
if recovery_rate != 0 and not actor.dead?

# ƒp[ƒeƒB‚̃AƒNƒ^[–ˆ‚Ƀ‹[ƒv
$game_party.actors.each do |actor|

# ‰ñ•œ—ÊŒvŽZ
recovery_hp = (actor.maxhp / 100.0 * recovery_rate).truncate
recovery_sp = (actor.maxsp / 100.0 * recovery_rate).truncate

# ŽÀۂɉñ•œ
actor.hp += recovery_hp
actor.sp += recovery_sp

# ƒAƒjƒ[ƒVƒ‡ƒ“Ý’è
actor.damage = - recovery_hp
actor.damage_pop = true

end

# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðXV
@status_window.refresh

end
end

end # module Scene_Battle_Module
end # module Battle_End_Recovery

#------------------------------
# 퓬ƒV[ƒ“‚ÌÄ’è‹`
#------------------------------
class Scene_Battle

# Scene_Battle—pƒ‚ƒWƒ…[ƒ‹‚ðƒCƒ“ƒNƒ‹[ƒh
include Battle_End_Recovery::Scene_Battle_Module

# Œ³‚̃tƒF[ƒY‚TŠJŽn‚É•Ê–¼‚ð‚‚¯‚é
alias battle_end_recovery_original_start_phase5 start_phase5

# ƒtƒF[ƒY‚TŠJŽn‚ðÄ’è‹`
def start_phase5

# 퓬Œã‚̉ñ•œˆ—‚ðŒÄ‚Ño‚·
battle_end_recovery

# Œ³‚̃tƒF[ƒY‚TŠJŽn‚ðŒÄ‚Ño‚·
battle_end_recovery_original_start_phase5

end
end

# Battle_End_Recovery
# ¥£¥ XRXS_BP10. LEVEL UP!ƒEƒBƒ“ƒhƒE ¥£¥
# by ÷‰ë Ý“y

$data_system_level_up_se = "" # ƒŒƒxƒ‹ƒAƒbƒvSEB""‚Å–³‚µB
$data_system_level_up_me = "Audio/ME/007-Fanfare01" # ƒŒƒxƒ‹ƒAƒbƒvME
$fontsize = 25
#==============================================================================
# ¡ Window_LevelUpWindow
#------------------------------------------------------------------------------
# @ƒoƒgƒ‹I—¹ŽžAƒŒƒxƒ‹ƒAƒbƒv‚µ‚½ê‡‚ɃXƒe[ƒ^ƒX‚ð•\Ž¦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#==============================================================================
class Window_LevelUpWindow < Window_Base
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
def initialize(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
super(0, 128, 160, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
def refresh(actor, last_lv, up_hp, up_sp, up_str, up_dex, up_agi, up_int)
self.contents.clear
self.contents.font.color = system_color
self.contents.font.name = "Arial"
self.contents.font.size = 14
self.contents.draw_text( 0, 0, 160, 24, "LEVEL UP!!")
self.contents.font.size = 18
self.contents.draw_text( 0, 28, 160, 24, $data_system.words.hp)
self.contents.draw_text( 0, 50, 160, 24, $data_system.words.sp)
self.contents.font.size = 14
self.contents.draw_text( 0, 72, 80, 24, $data_system.words.str)
self.contents.draw_text( 0, 94, 80, 24, $data_system.words.dex)
self.contents.draw_text( 0, 116, 80, 24, $data_system.words.agi)
self.contents.draw_text( 0, 138, 80, 24, $data_system.words.int)
self.contents.draw_text(92, 0, 128, 24, "¨")
self.contents.draw_text(76, 28, 128, 24, "=")
self.contents.draw_text(76, 50, 128, 24, "=")
self.contents.draw_text(76, 72, 128, 24, "=")
self.contents.draw_text(76, 94, 128, 24, "=")
self.contents.draw_text(76, 116, 128, 24, "=")
self.contents.draw_text(76, 138, 128, 24, "=")
self.contents.font.color = normal_color
self.contents.draw_text( 0, 0, 88, 24, last_lv.to_s, 2)
self.contents.draw_text( 0, 28, 72, 24, "+" + up_hp.to_s, 2)
self.contents.draw_text( 0, 50, 72, 24, "+" + up_sp.to_s, 2)
self.contents.draw_text( 0, 72, 72, 24, "+" + up_str.to_s, 2)
self.contents.draw_text( 0, 94, 72, 24, "+" + up_dex.to_s, 2)
self.contents.draw_text( 0, 116, 72, 24, "+" + up_agi.to_s, 2)
self.contents.draw_text( 0, 138, 72, 24, "+" + up_int.to_s, 2)
self.contents.font.size = 20
self.contents.draw_text( 0, 0, 128, 24, actor.level.to_s, 2)
self.contents.draw_text( 0, 26, 128, 24, actor.maxhp.to_s, 2)
self.contents.draw_text( 0, 48, 128, 24, actor.maxsp.to_s, 2)
self.contents.draw_text( 0, 70, 128, 24, actor.str.to_s, 2)
self.contents.draw_text( 0, 92, 128, 24, actor.dex.to_s, 2)
self.contents.draw_text( 0, 114, 128, 24, actor.agi.to_s, 2)
self.contents.draw_text( 0, 136, 128, 24, actor.int.to_s, 2)
end
end
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ’ljÁEŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :level_up_flags # LEVEL UP!•\Ž¦
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# œ ’ljÁEŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :exp_gain_ban # EXPŽæ“¾ˆêŽž‹ÖŽ~
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp10_initialize initialize
def initialize
@exp_gain_ban = false
xrxs_bp10_initialize
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg [EXP ‚ðŠl“¾‚Å‚«‚È‚¢] ”»’è
#--------------------------------------------------------------------------
alias xrxs_bp10_cant_get_exp? cant_get_exp?
def cant_get_exp?
if @exp_gain_ban == true
return true
else
return xrxs_bp10_cant_get_exp?
end
end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# œ ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp10_start_phase5 start_phase5
def start_phase5
# EXP Šl“¾‹ÖŽ~
for i in 0...$game_party.actors.size
$game_party.actors[i].exp_gain_ban = true
end
xrxs_bp10_start_phase5
# EXP Šl“¾‹ÖŽ~‚̉ðœ
for i in 0...$game_party.actors.size
$game_party.actors[i].exp_gain_ban = false
end
# EXP‚ð‰Šú‰»
@exp_gained = 0
for enemy in $game_troop.enemies
# Šl“¾ EXP‚ð’ljÁ # ƒGƒlƒ~[‚ª‰B‚êó‘Ô‚Å‚È‚¢ê‡
@exp_gained += enemy.exp if not enemy.hidden
end
# Ý’è
@phase5_step = 0
@exp_gain_actor = -1
# ƒŠƒUƒ‹ƒgƒEƒBƒ“ƒhƒE‚ð•\Ž¦
@result_window.y -= 64
@result_window.visible = true
# ƒŒƒxƒ‹ƒAƒbƒv”»’è‚Ö
phase5_next_levelup
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY)
#--------------------------------------------------------------------------
alias xrxs_bp10_update_phase5 update_phase5
def update_phase5
case @phase5_step
when 1
update_phase5_step1
else
xrxs_bp10_update_phase5
# ƒŒƒxƒ‹ƒAƒbƒv‚µ‚Ä‚¢‚éꇂ͋­§ƒoƒgƒ‹I—¹
battle_end(0) if @levelup_window != nil and @phase5_wait_count <= 0
end
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒY 1 : ƒŒƒxƒ‹ƒAƒbƒv)
#--------------------------------------------------------------------------
def update_phase5_step1
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒEƒBƒ“ƒhƒE‚ð•Â‚¶‚ÄŽŸ‚̃AƒNƒ^[‚Ö
@levelup_window.visible = false if @levelup_window != nil
@status_window.level_up_flags[@exp_gain_actor] = false
phase5_next_levelup
end
end


Dernière édition par le Sam 28 Jan - 11:52, édité 1 fois
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Tony333
Programmeur / Maker
Programmeur / Maker
Tony333


Nombre de messages : 1697
Localisation : Rosny sous bois
Date d'inscription : 16/07/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:28

T'as pouahg une screen ?
Revenir en haut Aller en bas
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:45

Lol, j'ai pas fini mon script à cause de ma mère...
Elle à débranché mon ordinateur d'un cou, slack... lol!
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:50

Attention,ceci est la suite... lol!

Citation :
#--------------------------------------------------------------------------
# œ ŽŸ‚̃AƒNƒ^[‚̃Œƒxƒ‹ƒAƒbƒv•\Ž¦‚Ö
#--------------------------------------------------------------------------
def phase5_next_levelup
begin
# ŽŸ‚̃AƒNƒ^[‚Ö
@exp_gain_actor += 1
# ÅŒã‚̃AƒNƒ^[‚Ìê‡
if @exp_gain_actor >= $game_party.actors.size
# ƒAƒtƒ^[ƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
@phase5_step = 0
return
end
actor = $game_party.actors[@exp_gain_actor]
if actor.cant_get_exp? == false
# Œ»Ý‚Ì”\—Í’l‚ð•ÛŽ
last_level = actor.level
last_maxhp = actor.maxhp
last_maxsp = actor.maxsp
last_str = actor.str
last_dex = actor.dex
last_agi = actor.agi
last_int = actor.int
# ŒoŒ±’lŽæ“¾‚ÌŒˆ’è“IuŠÔ(“ä
actor.exp += @exp_gained
# ”»’è
if actor.level > last_level
# ƒŒƒxƒ‹ƒAƒbƒv‚µ‚½ê‡
@status_window.level_up(@exp_gain_actor)
if $data_system_level_up_se != ""
Audio.se_stop
Audio.se_play($data_system_level_up_se)
end
if $data_system_level_up_me != ""
Audio.me_stop
Audio.me_play($data_system_level_up_me)
end
@levelup_window = Window_LevelUpWindow.new(actor, last_level,
actor.maxhp - last_maxhp, actor.maxsp - last_maxsp, actor.str - last_str,
actor.dex - last_dex, actor.agi - last_agi, actor.int - last_int)
@levelup_window.x = 160 * @exp_gain_actor
@levelup_window.visible = true
@phase5_wait_count = 40
@phase5_step = 1
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒŠƒtƒŒƒbƒVƒ…
@status_window.refresh
return
end
end
end until false
end
end
# ¥£¥ XRXS_17. ƒXƒŠƒbƒvƒ_ƒ[ƒW–hŒä^Œø‰Ê—ÊÚ׉» ver.1.51 ¥£¥
# by ÷‰ë Ý“y, fukuyama

#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# œ ƒXƒŠƒbƒvƒ_ƒ[ƒW‚ÌŒø‰Ê“K—p
#--------------------------------------------------------------------------
alias xrxs_bp7_slip_damage_effect slip_damage_effect
def slip_damage_effect
# ”’l‚̉Šú‰»
slip_damage_percent = 0
slip_damage_plus = 0
# Œ»Ý•t‰Á‚³‚ê‚Ä‚¢‚éƒXƒe[ƒg‚Ì’†‚©‚çƒXƒŠƒbƒvƒ_ƒ[ƒW—L‚è‚̃‚ƒm‚ð’T‚·
for i in @states
if $data_states[i].slip_damage
# ‚»‚̃Xƒe[ƒg‚ªŽ‚Á‚Ä‚¢‚éƒXƒŠƒbƒvƒ_ƒ[ƒW‚Ì
# Lvƒvƒ‰ƒXƒXƒe[ƒg‚Ü‚½‚ÍLvƒ}ƒCƒiƒXƒXƒe[ƒg‚ð”»’èB
for j in $data_states[i].plus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|“)/
slip_damage_percent += $1.to_i
elsif $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
slip_damage_plus += $1.to_i
end
end
end
for j in $data_states[i].minus_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|“)/
slip_damage_percent -= $1.to_i
elsif $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
slip_damage_plus -= $1.to_i
end
end
end
end
end
if slip_damage_percent == 0 and slip_damage_plus == 0
xrxs_bp7_slip_damage_effect
else
# –h‹ï‚ªƒXƒŠƒbƒv–hŒä‚ª‚ ‚éꇂ𔻒è
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
next if armor == nil
for j in armor.guard_state_set
if $data_states[j] != nil
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)(%|“)/
if slip_damage_percent > 0
slip_damage_percent = [slip_damage_percent - $1.to_i, 0].max
end
end
if $data_states[j].name =~ /^ƒXƒŠƒbƒv([0-9]+)$/
if slip_damage_percent > 0
slip_damage_plus = [slip_damage_plus - $1.to_i, 0].max
end
end
end
end
end
# ƒ_ƒ[ƒW‚ðÝ’è
self.damage = self.maxhp * slip_damage_percent / 100 + slip_damage_plus
# •ªŽU
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# HP ‚©‚çƒ_ƒ[ƒW‚ðŒ¸ŽZ
self.hp -= self.damage
# ƒƒ\ƒbƒhI—¹
return true
end
end
end
# ¥£¥ XRXS_BP 1. CP§“±“ü ver.15 ¥£¥
# by ÷‰ë Ý“y, ˜aŠó, Jack-R

#==============================================================================
# ¡ Scene_Battle_CP
#==============================================================================
class Scene_Battle_CP
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :stop # CP‰ÁŽZƒXƒgƒbƒv
#----------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‚̉Šú‰»
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# ”z—ñ @count_battlers ‚ð‰Šú‰»
@count_battlers = []
# ƒGƒlƒ~[‚ð”z—ñ @count_battlers ‚ɒljÁ
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# ƒAƒNƒ^[‚ð”z—ñ @count_battlers ‚ɒljÁ
for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi / @agi_total * 4, 0].max, 65535].min
end
end
#----------------------------------------------------------------------------
# œ CPƒJƒEƒ“ƒg‚ÌŠJŽn
#----------------------------------------------------------------------------
def start
if @cp_thread != nil then
return
end
@cancel = false
@stop = false
# ‚±‚±‚©‚çƒXƒŒƒbƒh
@cp_thread = Thread.new do
while @cancel != true
if @stop != true
self.update # XV
sleep(0.05)
end
end
end
# ‚±‚±‚܂ŃXƒŒƒbƒh
end
#----------------------------------------------------------------------------
# œ CPƒJƒEƒ“ƒgƒAƒbƒv
#----------------------------------------------------------------------------
def update
if @count_battlers != nil then
for battler in @count_battlers
# s“®o—ˆ‚È‚¯‚ê‚Ζ³Ž‹
if battler.dead? == true #or battler.movable? == false then
battler.cp = 0
next
end
# ‚±‚±‚Ì 1.3‚ð•Ï‚¦‚邱‚Æ‚Å«ƒXƒs[ƒh‚ð•ÏX‰Â”\B‚½‚¾‚µ¬”“_‚ÍŽg—p‚·‚邱‚ÆB
battler.cp = [[battler.cp + 1.3 * 4096 * battler.agi / @agi_total, 0].max, 65535].min
end
end
end
#----------------------------------------------------------------------------
# œ CPƒJƒEƒ“ƒg‚ÌŠJŽn
#----------------------------------------------------------------------------
def stop
@cancel = true
if @cp_thread != nil then
@cp_thread.join
@cp_thread = nil
end
end
end
#==============================================================================
# ¡ Game_Battler
#==============================================================================
class Game_Battler
attr_accessor :now_guarding # Œ»Ý–hŒä’†ƒtƒ‰ƒO
attr_accessor :cp # Œ»ÝCP
attr_accessor :slip_state_update_ban # ƒXƒŠƒbƒvEƒXƒe[ƒgŽ©“®ˆ—‚Ì‹ÖŽ~
#--------------------------------------------------------------------------
# œ ƒRƒ}ƒ“ƒh“ü—͉”\”»’è
#--------------------------------------------------------------------------
def inputable?
return (not @hidden and restriction <= 1 and @cp >=65535)
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg [ƒXƒŠƒbƒvƒ_ƒ[ƒW] ”»’è
#--------------------------------------------------------------------------
alias xrxs_bp1_slip_damage? slip_damage?
def slip_damage?
return false if @slip_state_update_ban
return xrxs_bp1_slip_damage?
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒgŽ©‘R‰ðœ (ƒ^[ƒ“‚²‚ƂɌĂÑo‚µ)
#--------------------------------------------------------------------------
alias xrxs_bp1_remove_states_auto remove_states_auto
def remove_states_auto
return if @slip_state_update_ban
xrxs_bp1_remove_states_auto
end
end
#==============================================================================
# ¡ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# œ ƒZƒbƒgƒAƒbƒv
#--------------------------------------------------------------------------
alias xrxs_bp1_setup setup
def setup(actor_id)
xrxs_bp1_setup(actor_id)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
#==============================================================================
# ¡ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize(troop_id, member_index)
xrxs_bp1_initialize(troop_id, member_index)
@hate = 100 # init-value is 100
@cp = 0
@now_guarding = false
@slip_state_update_ban = false
end
end
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:51

Attention, ceci est la suite:

Citation :
#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPƒ[ƒ^[‚Ì‚Ý‚ÌXV
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp1_initialize initialize
def initialize
@update_cp_only = false
xrxs_bp1_initialize
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
alias xrxs_bp1_refresh refresh
def refresh
if @update_cp_only == false
xrxs_bp1_refresh
end
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_cp_meter(actor, actor_x, 96, 120, 0)
end
end
#--------------------------------------------------------------------------
# œ CPƒ[ƒ^[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
end
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
class Scene_Battle
# ‚±‚±‚ÉŒø‰Ê‰¹‚ðÝ’è‚·‚é‚ÆAƒAƒNƒ^[ƒRƒ}ƒ“ƒh‚ªƒ|ƒbƒv‚µ‚½‚Æ‚«‚ÉŒø‰Ê‰¹‚ðĶ
$data_system_command_up_se = ""
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹I—¹
# result : Œ‹‰Ê (0:Ÿ—˜ 1:”s–k 2:“¦‘–)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPƒJƒEƒ“ƒg’âŽ~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#--------------------------------------------------------------------------
# œ ƒvƒŒƒoƒgƒ‹ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase1 start_phase1
def start_phase1
@agi_total = 0
@cp_thread = Scene_Battle_CP.new
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðÄì¬
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 128
@actor_command_window.back_opacity = 125
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.draw_item(3, $game_temp.battle_can_escape ? @actor_command_window.normal_color : @actor_command_window.disabled_color)
xrxs_bp1_start_phase1
end
#--------------------------------------------------------------------------
# œ ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase2 start_phase2
def start_phase2
xrxs_bp1_start_phase2
@party_command_window.active = false
@party_command_window.visible = false
# ŽŸ‚Ö
start_phase3
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒtƒF[ƒY)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase2 update_phase2
def update_phase2
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒp[ƒeƒBƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @party_command_window.index
when 0 # 키
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
@cp_thread.start
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒYŠJŽn
start_phase3
end
return
end
xrxs_bp1_update_phase2
end
#--------------------------------------------------------------------------
# œ ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
#--------------------------------------------------------------------------
def phase3_next_actor
# ƒ‹[ƒv
begin
# ƒAƒNƒ^[‚Ì–¾–ŃGƒtƒFƒNƒg OFF
if @active_battler != nil
@active_battler.blink = false
end
# ÅŒã‚̃AƒNƒ^[‚Ìê‡
if @actor_index == $game_party.actors.size-1
# ƒƒCƒ“ƒtƒF[ƒYŠJŽn
@cp_thread.start
start_phase4
return
end
# ƒAƒNƒ^[‚̃Cƒ“ƒfƒbƒNƒX‚ði‚ß‚é
@actor_index += 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
if @active_battler.inputable? == false
@active_battler.current_action.kind = -1
end
# ƒAƒNƒ^[‚ªƒRƒ}ƒ“ƒh“ü—Í‚ðŽó‚¯•t‚¯‚È‚¢ó‘Ô‚È‚ç‚à‚¤ˆê“x
end until @active_battler.inputable?
@cp_thread.stop
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒZƒbƒgƒAƒbƒv
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# œ ‘O‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
#--------------------------------------------------------------------------
def phase3_prior_actor
# ƒ‹[ƒv
begin
# ƒAƒNƒ^[‚Ì–¾–ŃGƒtƒFƒNƒg OFF
if @active_battler != nil
@active_battler.blink = false
end
# ʼn‚̃AƒNƒ^[‚Ìê‡
if @actor_index == 0
# ʼn‚Ö–ß‚é
start_phase3
return
end
# ƒAƒNƒ^[‚̃Cƒ“ƒfƒbƒNƒX‚ð–ß‚·
@actor_index -= 1
@active_battler = $game_party.actors[@actor_index]
@active_battler.blink = true
# ƒAƒNƒ^[‚ªƒRƒ}ƒ“ƒh“ü—Í‚ðŽó‚¯•t‚¯‚È‚¢ó‘Ô‚È‚ç‚à‚¤ˆê“x
end until @active_battler.inputable?
@cp_thread.stop
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒZƒbƒgƒAƒbƒv
@active_battler.now_guarding = false
phase3_setup_command_window
end
#--------------------------------------------------------------------------
# œ ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃ZƒbƒgƒAƒbƒv
#--------------------------------------------------------------------------
alias xrxs_bp1_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
# Œø‰Ê‰¹‚ÌĶ
Audio.se_play($data_system_command_up_se) if $data_system_command_up_se != ""
# –ß‚·
xrxs_bp1_phase3_setup_command_window
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒtƒF[ƒY : Šî–{ƒRƒ}ƒ“ƒh)
#--------------------------------------------------------------------------
alias xrxs_bsp1_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒAƒNƒ^[ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒ\ƒ‹ˆÊ’u‚Å•ªŠò
case @actor_command_window.index
when 4 # “¦‚°‚é
if $game_temp.battle_can_escape
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒAƒNƒVƒ‡ƒ“‚ðÝ’è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 4
# ŽŸ‚̃AƒNƒ^[‚̃Rƒ}ƒ“ƒh“ü—Í‚Ö
phase3_next_actor
else
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
xrxs_bsp1_update_phase3_basic_command
end
#--------------------------------------------------------------------------
# œ ƒƒCƒ“ƒtƒF[ƒYŠJŽn
#--------------------------------------------------------------------------
alias xrxs_bp1_start_phase4 start_phase4
def start_phase4
xrxs_bp1_start_phase4
# ƒGƒlƒ~[ƒAƒNƒVƒ‡ƒ“ì¬
for enemy in $game_troop.enemies
if enemy.cp < 65535
enemy.current_action.clear
enemy.current_action.kind = -1 # ƒ^[ƒ“”ò‚΂µB
next
end
enemy.make_action
end
# s“®‡˜ì¬
make_action_orders
end
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:52

Aller la fin du script et il en reste 2 script après:

Citation :
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 1 : ƒAƒNƒVƒ‡ƒ“€”õ)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step1 update_phase4_step1
def update_phase4_step1
# ‰Šú‰»
@phase4_act_continuation = 0
# Ÿ”s”»’è
if judge
@cp_thread.stop
# Ÿ—˜‚Ü‚½‚Í”s–k‚Ìê‡ : ƒƒ\ƒbƒhI—¹
return
end
# –¢s“®ƒoƒgƒ‰[”z—ñ‚Ì擪‚©‚çŽæ“¾
@active_battler = @action_battlers[0]
# ƒXƒe[ƒ^ƒXXV‚ðCP‚¾‚¯‚ÉŒÀ’èB
@status_window.update_cp_only = true
# ƒXƒe[ƒgXV‚ð‹ÖŽ~B
@active_battler.slip_state_update_ban = true if @active_battler != nil
# –ß‚·
xrxs_bp1_update_phase4_step1
# ‹ÖŽ~‚ð‰ðœ
@status_window.update_cp_only = false
@active_battler.slip_state_update_ban = false if @active_battler != nil
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 2 : ƒAƒNƒVƒ‡ƒ“ŠJŽn)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# ‹­§ƒAƒNƒVƒ‡ƒ“‚Å‚È‚¯‚ê‚Î
unless @active_battler.current_action.forcing
# CP‚ª‘«‚è‚Ä‚¢‚È‚¢ê‡
if @phase4_act_continuation == 0 and @active_battler.cp < 65535
@phase4_step = 6
return
end
# §–ñ‚ª [“G‚ð’ÊíUŒ‚‚·‚é] ‚© [–¡•û‚ð’ÊíUŒ‚‚·‚é] ‚Ìê‡
if @active_battler.restriction == 2 or @active_battler.restriction == 3
# ƒAƒNƒVƒ‡ƒ“‚ÉUŒ‚‚ðÝ’è
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 0
end
# §–ñ‚ª [s“®‚Å‚«‚È‚¢] ‚Ìê‡
if @active_battler.restriction == 4
# ƒAƒNƒVƒ‡ƒ“‹­§‘Îۂ̃oƒgƒ‰[‚ðƒNƒŠƒA
$game_temp.forcing_battler = nil
if @phase4_act_continuation == 0 and @active_battler.cp >= 65535
# ƒXƒe[ƒgŽ©‘R‰ðœ
@active_battler.remove_states_auto
# CPÁ”ï
@active_battler.cp = [(@active_battler.cp - 65535),0].max
# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒŠƒtƒŒƒbƒVƒ…
@status_window.refresh
end
# ƒXƒeƒbƒv 1 ‚ɈÚs
@phase4_step = 1
return
end
end
# ƒAƒNƒVƒ‡ƒ“‚ÌŽí•Ê‚Å•ªŠò
case @active_battler.current_action.kind
when 0
# UŒ‚¥–hŒäE“¦‚°‚éE‰½‚à‚µ‚È‚¢Žž‚Ì‹¤’ÊÁ”ïCP
@active_battler.cp -= 0 if @phase4_act_continuation == 0
when 1
# ƒXƒLƒ‹Žg—pŽž‚ÌÁ”ïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when 2
# ƒAƒCƒeƒ€Žg—pŽž‚ÌÁ”ïCP
@active_battler.cp -= 65535 if @phase4_act_continuation == 0
when -1
# CP‚ª—­‚Ü‚Á‚Ä‚¢‚È‚¢
@phase4_step = 6
return
end
# CP‰ÁŽZ‚ðˆêŽž’âŽ~‚·‚é
@cp_thread.stop = true
# ƒXƒe[ƒgŽ©‘R‰ðœ
@active_battler.remove_states_auto
xrxs_bp1_update_phase4_step2
end
#--------------------------------------------------------------------------
# œ Šî–{ƒAƒNƒVƒ‡ƒ“ Œ‹‰Êì¬
#--------------------------------------------------------------------------
alias xrxs_bp1_make_basic_action_result make_basic_action_result
def make_basic_action_result
# UŒ‚‚Ìê‡
if @active_battler.current_action.basic == 0 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # UŒ‚Žž‚ÌCPÁ”ï
end
# –hŒä‚Ìê‡
if @active_battler.current_action.basic == 1 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # –hŒäŽž‚ÌCPÁ”ï
end
# “G‚Ì“¦‚°‚é‚Ìê‡
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # “¦‘–Žž‚ÌCPÁ”ï
end
# ‰½‚à‚µ‚È‚¢‚Ìê‡
if @active_battler.current_action.basic == 3 and @phase4_act_continuation == 0
@active_battler.cp -= 32767 # ‰½‚à‚µ‚È‚¢Žž‚ÌCPÁ”ï
end
# “¦‚°‚é‚Ìê‡
if @active_battler.current_action.basic == 4 and @phase4_act_continuation == 0
@active_battler.cp -= 65535 # “¦‘–Žž‚ÌCPÁ”ï
# “¦‘–‰Â”\‚Å‚Í‚È‚¢ê‡
if $game_temp.battle_can_escape == false
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# “¦‘–ˆ—
update_phase2_escape
return
end
xrxs_bp1_make_basic_action_result
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 5 : ƒ_ƒ[ƒW•\Ž¦)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step5 update_phase4_step5
def update_phase4_step5
# ƒXƒŠƒbƒvƒ_ƒ[ƒW
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
xrxs_bp1_update_phase4_step5
end
#--------------------------------------------------------------------------
# œ ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 6 : ƒŠƒtƒŒƒbƒVƒ…)
#--------------------------------------------------------------------------
alias xrxs_bp1_update_phase4_step6 update_phase4_step6
def update_phase4_step6
# CP‰ÁŽZ‚ðÄŠJ‚·‚é
@cp_thread.stop = false
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ð‰B‚·
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end
end
# ¥£¥ XRXS_BP 7. ƒoƒgƒ‹ƒXƒe[ƒ^ƒXEƒNƒŠƒAƒfƒUƒCƒ“ ver.1.02 ¥£¥
# by ÷‰ë Ý“y, TOMY

#==============================================================================
# ¡ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# œ ŒöŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ï”
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPƒ[ƒ^[‚Ì‚Ý‚ÌXV
#--------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
xrxs_bp7_initialize
# «Full-View‚Ìꇂ͉º“ñs‚Ì # ‚ðÁ‚µ‚Ä‚­‚¾‚³‚¢B
#self.opacity = 0
#self.back_opacity = 0
end
#--------------------------------------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
if @update_cp_only
xrxs_bp7_refresh
return
end
# •`ŽÊ‚ð‹ÖŽ~‚µ‚È‚ª‚ç–ß‚·
@draw_ban = true
xrxs_bp7_refresh
# •`ŽÊ‚Ì‹ÖŽ~‚ð‰ðœ
@draw_ban = false
# •`ŽÊ‚ðŠJŽn
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# •àsƒLƒƒƒ‰ƒOƒ‰ƒtƒBƒbƒN‚Ì•`ŽÊ
draw_actor_name(actor, actor_x + 70, 25)
draw_actor_graphic(actor, actor_x - 9, 116)
# HP/SPƒ[ƒ^[‚Ì•`ŽÊ
draw_actor_hp_meter_line(actor, actor_x, 72, 96, 12)
draw_actor_sp_meter_line(actor, actor_x, 104, 96, 12)
# HP”’l‚Ì•`ŽÊ
self.contents.font.size = 24 # HP/SP”’l‚Ì•¶Žš‚Ì‘å‚«‚³
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 58, 96, 24, actor.hp.to_s, 2)
# SP”’l‚Ì•`ŽÊ
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
draw_shadow_text(actor_x-2, 90, 96, 24, actor.sp.to_s, 2)
# —pŒêuHPv‚Æ—pŒêuSPv‚Ì•`ŽÊ
self.contents.font.size = 12 # —pŒêuHP/SPv‚Ì•¶Žš‚Ì‘å‚«‚³
self.contents.font.color = system_color # —pŒêuHP/SPv‚Ì•¶Žš‚ÌF
draw_shadow_text(actor_x, 60, 96, 12, $data_system.words.hp)
draw_shadow_text(actor_x, 92, 96, 12, $data_system.words.sp)

draw_actor_state(actor, actor_x, 100)
self.contents.font.color = system_color
self.contents.font.size = 26
end
end
end
#==============================================================================
# ¡ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# œ HPƒ[ƒ^[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / actor.maxhp
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# œ SPƒ[ƒ^[ ‚Ì•`‰æ
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / actor.maxsp
hp_color_1 = Color.new( 0, 0, 255, 192)
hp_color_2 = Color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# œ –¼‘O‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != false
end
#--------------------------------------------------------------------------
# œ ƒXƒe[ƒg‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_state draw_actor_state
def draw_actor_state(actor, x, y, width = 120)
xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ HP ‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# œ SP ‚Ì•`‰æ
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# ž ŠO•”ƒ‰ƒCƒuƒ‰ƒŠ
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# œ ƒ‰ƒCƒ“•`‰æ by ÷‰ë Ý“y
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
# •`ŽÊ‹——£‚ÌŒvŽZB‘å‚«‚ß‚É’¼ŠpŽž‚Ì’·‚³B
distance = (start_x - end_x).abs + (start_y - end_y).abs
# •`ŽÊŠJŽn
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.fill_rect(x, y, width, width, start_color)
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red * i/distance
g = start_color.green * (distance-i)/distance + end_color.green * i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
end
end
end

#--------------------------------------------------------------------------
# œ ‰e•¶Žš•`‰æ by TOMY
#--------------------------------------------------------------------------
def draw_shadow_text(x, y, width, height, string, align = 0)
# Œ³‚ÌF‚ð•Û‘¶‚µ‚Ä‚¨‚­
color = self.contents.font.color.dup
# •Žš‚ʼne•`‰æ
self.contents.font.color = Color.new(0, 0, 0)
self.contents.draw_text(x + 2, y + 2, width, height, string, align)
# Œ³‚ÌF‚É–ß‚µ‚Ä•`‰æ
self.contents.font.color = color
self.contents.draw_text(x, y, width, height, string, align)
end
end


Dernière édition par le Sam 28 Jan - 11:05, édité 1 fois
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 20:55

ATTENTION C'EST PÔ LA SUITE:

Créer un 2ème script au dessus de Main et appelez-le "Animated_Sprite***" et coller se code:

Citation :
#==============================================================================
# * Animated_Sprite Scripted by: RPG
# Edited by: cybersam
#
# i just removed the stuff that i dont need for my scrîpt...
# everything else is RPG's scrîpt... (here)
#
#------------------------------------------------------------------------------
# A class for animated sprites.
#==============================================================================

class Animated_Sprite < RPG::Sprite
#--------------------------------------------------------------------------
# - Accessible instance variables.
#--------------------------------------------------------------------------
attr_accessor :frames # Number of animation frames
attr_accessor :delay # Delay time between frames (speed)
attr_accessor :frame_width # Width of each frame
attr_accessor :frame_height # Height of each frame
attr_accessor :offset_x # X coordinate of the 1st frame
attr_accessor :offset_y # Y coordinate of all frames
attr_accessor :current_frame # Current animation frame
attr_accessor :moving # Is the sprite moving?

#--------------------------------------------------------------------------
# - Initialize an animated sprite
# viewport : Sprite viewport
#--------------------------------------------------------------------------
def initialize(viewport = nil)
super(viewport)
@frame_width, @frame_height = 0, 0
change # A basic change to set initial variables
@old = Graphics.frame_count # For the delay method
@goingup = true # Increasing animation? (if @rm2k_mode is true)
@once = false # Is the animation only played once?
@animated = true # Used to stop animation when @once is true
end

#--------------------------------------------------------------------------
# Comment by RPG
# - Change the source rect (change the animation)
# frames : Number of animation frames
# delay : Frame delay, controls animation speed
# offx : X coordinate of the 1st frame
# offy : Y coordinate of all frames
# startf : Starting frame for animation
# once : Is the animation only played once?
# rm2k_mode : Animation pattern: 1-2-3-2 if true, 1-2-3-1 if false
#
# Comment by cybersam
#
# the rm2k_mode isnt pressent anymore...
# if you want that feature then use rm2k or use RPG's scrîpt...
#--------------------------------------------------------------------------
def change(frames = 0, delay = 0, offx = 0, offy = 0,
startf = 0, once = false)
@frames = frames
@delay = delay
@offset_x, @offset_y = offx, offy
@current_frame = startf
@once = once
x = @current_frame * @frame_width + @offset_x
self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
@goingup = true
@animated = true
end

#--------------------------------------------------------------------------
# - Update animation and movement
#--------------------------------------------------------------------------
def update
super
if self.bitmap != nil and delay(@delay) and @animated
x = @current_frame * @frame_width + @offset_x
self.src_rect = Rect.new(x, @offset_y, @frame_width, @frame_height)
@current_frame = (@current_frame + 1) unless @frames == 0
@animated = false if @current_frame == @frames and @once
@current_frame %= @frames
end
end

#--------------------------------------------------------------------------
# - Move the sprite
# x : X coordinate of the destination point
# y : Y coordinate of the destination point
# speed : Speed of movement (0 = delayed, 1+ = faster)
# delay : Movement delay if speed is at 0
#--------------------------------------------------------------------------
def move(x, y, speed = 1, delay = 0)
@destx = x
@desty = y
@move_speed = speed
@move_delay = delay
@move_old = Graphics.frame_count
@moving = true
end

#--------------------------------------------------------------------------
# - Move sprite to destx and desty
#--------------------------------------------------------------------------
def update_move
return unless @moving
movinc = @move_speed == 0 ? 1 : @move_speed
if Graphics.frame_count - @move_old > @move_delay or @move_speed != 0
self.x += movinc if self.x < @destx
self.x -= movinc if self.x > @destx
self.y += movinc if self.y < @desty
self.y -= movinc if self.y > @desty
@move_old = Graphics.frame_count
end
if @move_speed > 1 # Check if sprite can't reach that point
self.x = @destx if (@destx - self.x).abs % @move_speed != 0 and
(@destx - self.x).abs <= @move_speed
self.y = @desty if (@desty - self.y).abs % @move_speed != 0 and
(@desty - self.y).abs <= @move_speed
end
if self.x == @destx and self.y == @desty
@moving = false
end
end

#--------------------------------------------------------------------------
# - Pause animation, but still updates movement
# frames : Number of frames
#--------------------------------------------------------------------------
def delay(frames)
update_move
if (Graphics.frame_count - @old >= frames)
@old = Graphics.frame_count
return true
end
return false
end
end
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Tony333
Programmeur / Maker
Programmeur / Maker
Tony333


Nombre de messages : 1697
Localisation : Rosny sous bois
Date d'inscription : 16/07/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Jan - 21:27

^^
Revenir en haut Aller en bas
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 11:02

C pas encore fini:ATTENTION C PÔ LA SUITE:

Créer un nouveau script au dessus de main et appelez-le "Battle_animation***"

Citation :
#=============================================================================
# Modifié par Cheuf Zero ^^
# here we go...
# this makes the script very easy to implement
# just add a new script above the "Main" script
# and insert this whole thing in there
#
# as you can see the sprite changing code is from the japanese script
# so the credits for the sprite changin goes to them....
# i edit it a little so it can show more sprites and sprite animations
# and added some other stuff... the next things are player movement...
#
#
#
# i got the battler changing script in this script...
# the credits for this goes to the guy who made this...
#
# ▼▲▼ XRXS11. 戦闘・バトラーモーション ver.0 ▼▲▼
#
# since this isnt used anymore... it isnt need for credit anymore...
# but i'll let it here since it helped me a lot...
#
#
# as for the ideas... missy provided me with realy good ideas
# that helped me alot when i didnt find a way to some of these features...
#
# here one more Credit to place...
# its RPG's script...
# not the whole thing here...
# but some snipplet you'll know witch one when read the comments
#
#
# if you want some more explaines about this script...
# the most stuff are commented... but if you still have questions or
# sugestions then you can contact me
#
# how or where you can contact me...
# at the http://www.rmxp.net forum via pm, email: cybersam@club-anime.de
# or via AIM: cych4n or ICQ: 73130840
#
# remember this is still in testing phase...
# and i'm trying to work on some other additions... like character movements...
# but that wont be added now... couse i need to figure it out first...
#
#
#
# oh hehe.... before i forget...
# sorry for the bad english... ^-^''''
#
#
#==============================================================================
#
# here i'm going to tell you what names you need to give for your chara
# battle sprites....
#
# ok... here... since i'm using RPG's movement script...
# there are a lot of changes...
#
# when you look at the script you'll find line with "pose(n)" or "enemy_pose(n)"
# since i want my sprites have different sprites... i added one more option
# to these...
# so now if you add a number after the n (the n stands for witch sprite is used)
# fo example 8... ("pose(4, Cool") this will tell the script that the 4th animation
# have 8 frames...
# pose is used for the player... and enemy_pose for the enemy...
# there is nothing more to this...
# i used my old sprite numbers... (this time in only one sprite...)
#
# explains about the animation sprites... (the digits)
#
#
# 0 = move (during battle)
# 1 = standby
# 2 = defend
# 3 = hit (being attacked)
# 4 = attack
# 5 = skill use
# 6 = dead
# 7 = winning pose... this idea is from RPG....
#
#
# of course this is just the begining of the code...
# so more animations can be implemented...
# but for now this should be enough...
#
# alot has changed here... and now it looks like it is done...
# of course the fine edit needs to be done so it looks and works great with your
# game too...
#
#
#
# 1st character movement... done
# 2nd character movement during attack... done
# 3rd character apears at the enemy while attacking... done
#
# 4th enemies movement... done
# 5th enemy movement during attack... done
# 6th enemy apears at the enemy while attacking... done
#
# 7th each weapon has its own animation... done
# 8th each skill has its own animation... done
#
#
#
# for the ones interisted... my nex project is an Movie player
# (that actualy plays avi, mpgs and such...
# but dont think this will be done soon... ^-^''
#
# but i'll may be try something else before i begin to code that one...
#==============================================================================



class Game_Actor < Game_Battler

# you dont have to change your game actor to let the characters schows
# from the side...
# this will do it for you... ^-^

def screen_x
if self.index != nil
return self.index * 40 + 460
else
return 0
end
end

def screen_y
return self.index * 20 + 220
end

def screen_z
if self.index != nil
return self.index
else
return 0
end
end
end


# RPG's snipplet...
class Spriteset_Battle
attr_accessor :actor_sprites
attr_accessor :enemy_sprites


alias original_initialize initialize
def initialize
#@start_party_number = $game_party.actors.size
# ビューポートを作成
@viewport0 = Viewport.new(0, 0, 640, 320)
@viewport1 = Viewport.new(0, 0, 640, 320)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport1.z = 50
@viewport2.z = 50
@viewport3.z = 200
@viewport4.z = 5000

@battleback_sprite = Sprite.new(@viewport0)

@enemy_sprites = []
for enemy in $game_troop.enemies#.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end

@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))

@weather = RPG::Weather.new(@viewport1)
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
@timer_sprite = Sprite_Timer.new
update
end



alias original_update update
def update
@viewport1.z = 50 and @viewport2.z = 51 if $actor_on_top == true
@viewport1.z = 51 and @viewport2.z = 50 if $actor_on_top == false
original_update
end

end
# end

#==============================================================================
# Sprite Battler for the Costum Battle System
#==============================================================================
# here we are making some animations and stuff...
# i know its not the best way...
# but this is the first working way that i found....
# this needs propper understanding how the animation works...
# if you want to change some stuff...
# in this i'll not explain much couse its realy easy if you know what you do
# otherwise it will take you time to understand it, but i think the one who
# is trying to edit this will know what he/she do... ^-^
#
#
#
# here i'll completely replace the "Sprite_Battler" class...
# so if you've changed something in there you need to change it here as well
# (i think... i didnt tested it... so its up to you)
# i'll mark the stuff i added just with --> #
# something that need to be explained have a comment...
# but its not all commented...
# so if you dont know what it means or you just want to know why it is there and
# what it does then you need to contact me or anyone who understand this... ^-^
# how you can contact me see above... at the top of this script...


class Sprite_Battler < Animated_Sprite

attr_accessor :battler
attr_reader :index
attr_accessor :target_index
attr_accessor :frame_width


def initialize(viewport, battler = nil)
super(viewport)
@battler = battler
@pattern_b = 0 #
@counter_b = 0 #
@index = 0 #
@frame_width, @frame_height = 64, 64
# start sprite
@battler.is_a?(Game_Enemy) ? enemy_pose(1) : pose(1)

@battler_visible = false
if $target_index == nil
$target_index = 0
end
end

def index=(index) #
@index = index #
update #
end #

def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end

def enemy #
$target_index += $game_troop.enemies.size
$target_index %= $game_troop.enemies.size
return $game_troop.enemies[$target_index] #
end #

def actor #
$target_index += $game_party.actors.size
$target_index %= $game_party.actors.size
return $game_party.actors[$target_index] #
end

#==============================================================================
# here is a snipplet from RPG's script...
# i changed only to lines from this...
#
# here you can add more sprite poses... if you have more... ^-^
#==============================================================================
def pose(number, frames = 4)
case number
when 0 # run
change(frames, 5, 0, 0, 0)
when 1 # standby
change(frames, 5, 0, @frame_height)
when 2 # defend
change(frames, 5, 0, @frame_height * 2)
when 3 # Hurt, loops
change(frames, 5, 0, @frame_height * 3)
when 4 # attack no loop
change(frames, 5, 0, @frame_height * 4, 0, true)
when 5 # skill
change(frames, 5, 0, @frame_height * 5)
when 6 # death
change(frames, 5, 0, @frame_height * 6)
when 7 # no sprite
change(frames, 5, 0, @frame_height * 5)
#when 8
# change(frames, 5, 0, @frame_height * 0)
# ...etc.
else
change(frames, 5, 0, 0, 0)
end
end


Dernière édition par le Sam 28 Jan - 11:06, édité 1 fois
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 11:03

ATTENTION C LA SUITE:

Citation :
#--------------------------------------------------------------------------
# - Change the battle pose for an enemy
# number : pose' number
#--------------------------------------------------------------------------
def enemy_pose(number ,enemy_frames = 4)
case number
when 0 # run
change(enemy_frames, 5, 0, 0, 0)
when 1 # standby
change(enemy_frames, 5, 0, @frame_height)
when 2 # defend
change(enemy_frames, 5, 0, @frame_height * 2)
when 3 # Hurt, loops
change(enemy_frames, 5, 0, @frame_height * 3)
when 4 # attack
change(enemy_frames, 5, 0, @frame_height * 4, 0, true)
when 5 # skill
change(enemy_frames, 5, 0, @frame_height * 5)
when 6 # death
change(enemy_frames, 5, 0, @frame_height * 6)
when 7 # no sprite
change(enemy_frames, 5, 0, @frame_height * 7)
# ...etc.
else
change(enemy_frames, 5, 0, 0, 0)
end
end
#==============================================================================
# sniplet end...
#==============================================================================


def update
super

if @battler == nil
self.bitmap = nil
loop_animation(nil)
return
end
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue

@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @frame_width / 2
self.oy = @frame_height

if @battler.dead? or @battler.hidden
self.opacity = 0
end
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
end

if @battler.damage == nil and
@battler.state_animation_id != @state_animation_id
@state_animation_id = @battler.state_animation_id
loop_animation($data_animations[@state_animation_id])
end

if @battler.is_a?(Game_Actor) and @battler_visible
if $game_temp.battle_main_phase
self.opacity += 3 if self.opacity < 255
else
self.opacity -= 3 if self.opacity > 207
end
end

if @battler.blink
blink_on
else
blink_off
end

unless @battler_visible
if not @battler.hidden and not @battler.dead? and
(@battler.damage == nil or @battler.damage_pop)
appear
@battler_visible = true
end
if not @battler.hidden and
(@battler.damage == nil or @battler.damage_pop) and
@battler.is_a?(Game_Actor)
appear
@battler_visible = true
end
end
if @battler_visible
if @battler.hidden
$game_system.se_play($data_system.escape_se)
escape
@battler_visible = false
end
if @battler.white_flash
whiten
@battler.white_flash = false
end
if @battler.animation_id != 0
animation = $data_animations[@battler.animation_id]
animation(animation, @battler.animation_hit)
@battler.animation_id = 0
end
if @battler.damage_pop
damage(@battler.damage, @battler.critical)
@battler.damage = nil
@battler.critical = false
@battler.damage_pop = false
end
if @battler.damage == nil and @battler.dead?
if @battler.is_a?(Game_Enemy)
$game_system.se_play($data_system.enemy_collapse_se)
collapse
@battler_visible = false
else
$game_system.se_play($data_system.actor_collapse_se) unless @dead
@dead = true
pose(6)
end
else
@dead = false
end
end #
end
end


#==============================================================================
# Scene_Battle Costum Battle System
#==============================================================================

class Scene_Battle


def update_phase4
case @phase4_step
when 1
update_phase4_step1
when 2
update_phase4_step2
when 3
update_phase4_step3
when 4
update_phase4_step4
when 5
update_phase4_step5
when 6
update_phase4_step6
when 7
update_phase4_step7
end
end


def make_basic_action_result

if @active_battler.is_a?(Game_Actor)
$actor_on_top = true
elsif @active_battler.is_a?(Game_Enemy)
$actor_on_top = false
end

if @active_battler.current_action.basic == 0
#============================================================================
# WEAPONS START...
#============================================================================
#
#================================= Different Weapons with different animations
#
# this is quite simple as you can see...
# if you want to add a weapon to the animation list then look at the script below...
# and i hope you'll find out how this works...
#
#
# if not...
# here is the way...
# first thing...
# just copy and paste "elseif @active_battler_enemy.weapon_id == ID..."
# just after the last @weapon_sprite....
#
# here the ID is you need to look in you game databse the number that stands before
# your weapon name is the ID you need to input here...
#
# same thing goes for the monster party... ^-^
# monster normaly dont need more sprites for weapons....
#
# if you want to use more... then replace the "@weapon_sprite_enemy = 4"
# with these lines... (but you need to edit them)
#
# if @active_battler.weapon_id == 1 # <-- weapon ID number
# @weapon_sprite_enemy = 4 # <-- battle animation
# elsif @active_battler.weapon_id == 5 # <-- weapon ID number
# @weapon_sprite_enemy = 2 # <-- battle animation
# elsif @active_battler.weapon_id == 9 # <-- weapon ID number
# @weapon_sprite_enemy = 0 # <-- battle animation
# elsif @active_battler.weapon_id == 13 # <-- weapon ID number
# @weapon_sprite_enemy = 6 # <-- battle animation
# else
# @weapon_sprite_enemy = 4
# end
#
#================================= END

if @active_battler.is_a?(Game_Actor)
if @active_battler.weapon_id == 1 # <-- weapon ID number
@weapon_sprite = 4 # <-- battle animation
elsif @active_battler.weapon_id == 5 # <-- weapon ID number
@weapon_sprite = 2 # <-- battle animation
elsif @active_battler.weapon_id == 9 # <-- weapon ID number
@weapon_sprite = 0 # <-- battle animation
elsif @active_battler.weapon_id == 13 # <-- weapon ID number
@weapon_sprite = 4 # <-- battle animation
else
@weapon_sprite = 4
end

# monster section is here... ^-^

else# @active_battler.is_a?(Game_Enemy)
@weapon_sprite_enemy = 4
end

#
#=============================================================================
# WEAPONS END....
#=============================================================================


@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
#======== here is the setting for the movement & animation...
x = target.screen_x - 35
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(0)
@spriteset.enemy_sprites[@active_battler.index]\
.move(x, target.screen_y, 10)
#========= here if you look at the RPG's movement settings you'll see
#========= that he takes the number 40 for the speed of the animation...
#========= i thing thats too fast so i settet it down to 10 so looks smoother...
end
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
#======= the same thing for the player... ^-^
x = target.screen_x + 40
@spriteset.actor_sprites[@active_battler.index].pose(0)
@spriteset.actor_sprites[@active_battler.index]\
.move(x, target.screen_y, 20)
end

end
if @active_battler.current_action.basic == 1
if @active_battler.is_a?(Game_Actor)
@spriteset.actor_sprites[@active_battler.index].pose(2) #defence
else
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(2) #defence
end
@help_window.set_text($data_system.words.guard, 1)
return
end

if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2
@help_window.set_text("Fuir", 1)
@active_battler.escape
return
end
if @active_battler.current_action.basic == 3
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
if @target_battlers = [target]
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
if @active_battler.current_action.basic == 4
if $game_temp.battle_can_escape == false
$game_system.se_play($data_system.buzzer_se)

end
$game_system.se_play($data_system.decision_se)
update_phase2_escape
return
end
end
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 11:04

ATTENTION C LA SUITE:

Citation :
#--------------------------------------------------------------------------
# skill aktion...
#--------------------------------------------------------------------------
def make_skill_action_result
@skill = $data_skills[@active_battler.current_action.skill_id]
unless @active_battler.current_action.forcing
unless @active_battler.skill_can_use?(@skill.id)
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
@active_battler.sp -= @skill.sp_cost
@status_window.refresh
@help_window.set_text(@skill.name, 1)

#=============================================================================
# SKILL SPRITES START
#=============================================================================
# this one is the same as the one for the weapons...
# for the one who have this for the first time
# look at the script i hope it is easy to understand...
#
# the other one that have the earlier versions of this script they dont need explenation
# ... i think....
# the think that changed is the line where the animation ID is given to the sprite...
# the number after the "pose" is the animation ID... it goes for every other animation as well..
# if you have an animation for a skill that have more frames...
# then just insert the number of frames after the first number...
# so it looks like this.... "pose(5, Cool" <-- 5 is the animation...
# 8 is the max frame (that means your animation have 8 frames...) ^-^

if @active_battler.is_a?(Game_Actor)
if @skill.name == "Heal" # <-- first skill name
@spriteset.actor_sprites[@active_battler.index].pose(5) # <-- sprite number
elsif @skill.name == "Cross Cut" # <-- secound skill name
@spriteset.actor_sprites[@active_battler.index].pose(6) # <-- sprite number
elsif @skill.name == "Fire" # <-- third skill name
@spriteset.actor_sprites[@active_battler.index].pose(6) # <-- sprite number
end
else
if @skill.name == "Heal" # <-- first skill name
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(5) # <-- sprite number
elsif @skill.name == "Cross Cut" # <-- secound skill name
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(6) # <-- sprite number
elsif @skill.name == "Fire" # <-- third skill name
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(6) # <-- sprite number
end
end
#=============================================================================
# SKILL SPRITES END
#=============================================================================

@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = @skill.common_event_id
set_target_battlers(@skill.scope)
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
#--------------------------------------------------------------------------
# how here we make the item use aktions
#--------------------------------------------------------------------------
def make_item_action_result
# sorry i didnt work on this...
# couse i dont have a sprite that uses items....
# so i just added the standby sprite here...
# when i get more time for this i'll try what i can do for this one... ^-^
# its the same as the ones above...
if @active_battler.is_a?(Game_Actor)
@spriteset.actor_sprites[@active_battler.index].pose(1)
else
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
end

@item = $data_items[@active_battler.current_action.item_id]
unless $game_party.item_can_use?(@item.id)
@phase4_step = 1
return
end
if @item.consumable
$game_party.lose_item(@item.id, 1)
end
@help_window.set_text(@item.name, 1)
@animation1_id = @item.animation1_id
@animation2_id = @item.animation2_id
@common_event_id = @item.common_event_id
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
set_target_battlers(@item.scope)
for target in @target_battlers
target.item_effect(@item)
end
end

#==============================================================================
# here again.... snipplet from RPG's script
#==============================================================================


# this one here is for the winning pose...
# if you happen to use my old costum level script then you need to add the
# marked line to you "def start_phase5" in "Scene_Battle 2" and delete this one...
# the -> =*****=
# marks the end where you need to delete...
# and -> {=====}
# marks the line you need to copy and paste in the other one...
# you need to add it at the same position...

def start_phase5
@phase = 5
$game_system.me_play($game_system.battle_end_me)
$game_system.bgm_play($game_temp.map_bgm)
exp = 0
gold = 0
treasures = []
for enemy in $game_troop.enemies
unless enemy.hidden
exp += enemy.exp
gold += enemy.gold
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
treasures = treasures[0..5]
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
@spriteset.actor_sprites[i].pose(7) unless actor.dead? # {=====}
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += exp
if actor.level > last_level
@status_window.level_up(i)
end
end
end
$game_party.gain_gold(gold)
for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
@result_window = Window_BattleResult.new(exp, gold, treasures)
@phase5_wait_count = 100
end
# =*****=

#--------------------------------------------------------------------------
# updating the movement
# since RPG isnt used to comments... i'll comment it again...
#--------------------------------------------------------------------------
def update_phase4_step3
if @active_battler.current_action.kind == 0 and
@active_battler.current_action.basic == 0
# in this one... we have our weapon animations... for player and monster
if @active_battler.is_a?(Game_Actor)
@spriteset.actor_sprites[@active_battler.index].pose(@weapon_sprite)
elsif @active_battler.is_a?(Game_Enemy)
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(@weapon_sprite_enemy)
end
end
if @animation1_id == 0
@active_battler.white_flash = true
else
@active_battler.animation_id = @animation1_id
@active_battler.animation_hit = true
end
@phase4_step = 4
end

def update_phase4_step4
# this here is for the hit animation...
for target in @target_battlers
if target.is_a?(Game_Actor) and !@active_battler.is_a?(Game_Actor)
if target.guarding?
@spriteset.actor_sprites[target.index].pose(2)
else
@spriteset.actor_sprites[target.index].pose(3)
end
elsif target.is_a?(Game_Enemy) and !@active_battler.is_a?(Game_Enemy)
if target.guarding?
@spriteset.enemy_sprites[target.index].enemy_pose(2)
else
@spriteset.enemy_sprites[target.index].enemy_pose(3)
end
end
target.animation_id = @animation2_id
target.animation_hit = (target.damage != "Raté")
end
@wait_count = 8
@phase4_step = 5
end

def update_phase4_step5
if @active_battler.hp > 0 and @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end

@help_window.visible = false
@status_window.refresh
# here comes the guard animations....
if @active_battler.is_a?(Game_Actor)
@spriteset.actor_sprites[@active_battler.index].pose(1)
else
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
end
for target in @target_battlers
if target.damage != nil
target.damage_pop = true
if @active_battler.is_a?(Game_Actor)
@spriteset.actor_sprites[@active_battler.index].pose(1)
else
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
end
end
end
@phase4_step = 6
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインフェーズ ステップ 6 : リフレッシュ)
#--------------------------------------------------------------------------
def update_phase4_step6
if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
@spriteset.actor_sprites[@active_battler.index]\
.move(@active_battler.screen_x, @active_battler.screen_y, 20)
@spriteset.actor_sprites[@active_battler.index].pose(1)
elsif !@active_battler.dead?
@spriteset.enemy_sprites[@active_battler.index]\
.move(@active_battler.screen_x, @active_battler.screen_y, 20)
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
end
$game_temp.forcing_battler = nil
if @common_event_id > 0
common_event = $data_common_events[@common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)
end
# CP‰ÁŽZ‚ðÄŠJ‚·‚é
@cp_thread.stop = false
# ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ð‰B‚·
@help_window.visible = false
xrxs_bp1_update_phase4_step6
end


def update_phase4_step7

# here we are asking if the player is dead and is a player or an enemy...
# these lines are for the running back and standby animation....
if @active_battler.is_a?(Game_Actor) and !@active_battler.dead?
@spriteset.actor_sprites[@active_battler.index].pose(1)
elsif !@active_battler.dead?
@spriteset.enemy_sprites[@active_battler.index].enemy_pose(1)
end

$game_temp.forcing_battler = nil
if @common_event_id > 0
common_event = $data_common_events[@common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)
end
@phase4_step = 1
end

# this one is an extra... without this the animation whill not work correctly...

def update
if $game_system.battle_interpreter.running?
$game_system.battle_interpreter.update
if $game_temp.forcing_battler == nil
unless $game_system.battle_interpreter.running?
unless judge
setup_battle_event
end
end
if @phase != 5
@status_window.refresh
end
end
end
$game_system.update
$game_screen.update
if $game_system.timer_working and $game_system.timer == 0
$game_temp.battle_abort = true
end
@help_window.update
@party_command_window.update
@actor_command_window.update
@status_window.update
@message_window.update
@spriteset.update
if $game_temp.transition_processing
$game_temp.transition_processing = false
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
if $game_temp.message_window_showing
return
end
if @spriteset.effect?
return
end
if $game_temp.gameover
$scene = Scene_Gameover.new
return
end
if $game_temp.to_title
$scene = Scene_Title.new
return
end
if $game_temp.battle_abort
$game_system.bgm_play($game_temp.map_bgm)
battle_end(1)
return
end
if @wait_count > 0
@wait_count -= 1
return
end

# this one holds the battle while the player moves
for actor in @spriteset.actor_sprites
if actor.moving
return
end
end
# and this one is for the enemy...
for enemy in @spriteset.enemy_sprites
if enemy.moving# and $game_system.animated_enemy
return
end
end

if $game_temp.forcing_battler == nil and
$game_system.battle_interpreter.running?
return
end
case @phase
when 1
update_phase1
when 2
update_phase2
when 3
update_phase3
when 4
update_phase4
when 5
update_phase5
end
end

#==============================================================================
# end of the snipplet
# if you want the comments that where here just look at the scene_battle 4...
# i added some comments since RPG hasnt add any....
#==============================================================================
end
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 11:23

Ben maintenant un screen:

script:Combat à la FFVI amélioré. Nouvelleimage62bj

Comme vous le remarquer on n'eu peux plus fuir les combats, mets on peut toujours crer une compétence qui permet de fuir.

Déjà prenez ce battle charset:
script:Combat à la FFVI amélioré. Fantome1qh
Pour les combats le monstre dans la base de donner a un certain nom et doit avoir le même du battle charset.

EXEMPLE:Dans la base de donner le monstre s'appele Fantome bin il doit avoir le même du battle charset.

Ensuite dans la base de donner dans l'onglet Héros puis dans apparence en combat choisisser sa battle charset.

C'est pareil pour le héro mais faite attention au regard, voici un battle charset du héro:
script:Combat à la FFVI amélioré. Hro8ta

Les battle charset des héros sont de 4 en largeur et 7 en hauteur, la ligne:
1-Le héro avance ver le monstre pour l'attaquer.
2-Pose que le héros prend quand il ne fait rien.
3-Le héro se défend avec la commande défense.
4-Le héro se fait attaquer.
5-Le héro attaque.
6-Pose quand le héros gagne le combat.
7-Le héro est mort.

C'est pareil pour les monstres.

Pour ce qui ni arrive pas voila ma démo:
http://rapidshare.de/files/12000271/Projet_1.exe.html

Pour le tachnique fuir regarder sur le site du script tout en haut.

Voila un site avec des battle charset:
http://rpgmakerxp-factory.net/index.php?ind=gallery&op=section_view&idev=33
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Tony333
Programmeur / Maker
Programmeur / Maker
Tony333


Nombre de messages : 1697
Localisation : Rosny sous bois
Date d'inscription : 16/07/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 16:01

Cool le system ^^
Revenir en haut Aller en bas
Kirua
Force: 20 (Lvl 40)
Kirua


Nombre de messages : 459
Localisation : Demande à mon cul !!!
Date d'inscription : 03/12/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 16:51

J'ai d'autre script à ajouter mais faut attendre un peu.
Revenir en haut Aller en bas
http://www.idpz.net/Nicol@s/XD.avi
Tony333
Programmeur / Maker
Programmeur / Maker
Tony333


Nombre de messages : 1697
Localisation : Rosny sous bois
Date d'inscription : 16/07/2005

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptySam 28 Jan - 16:53

Bah crée des nouveaux topic ^^
Revenir en haut Aller en bas
talipo
lvl 1



Nombre de messages : 5
Age : 31
Date d'inscription : 27/10/2006

script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. EmptyVen 27 Oct - 17:22

merci Wink j'ai tout remplacé les Cool par des 8*) (sans le *) et voila ce que ca me donne :

script:Combat à la FFVI amélioré. Sanstitrequ7.th
Le prob c que les monstres sont en BAS...
Revenir en haut Aller en bas
Contenu sponsorisé





script:Combat à la FFVI amélioré. Empty
MessageSujet: Re: script:Combat à la FFVI amélioré.   script:Combat à la FFVI amélioré. Empty

Revenir en haut Aller en bas
 
script:Combat à la FFVI amélioré.
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» bonjour script: combat zelda ( qui a )
» Script:combat vue de derriere(demo en JAP)

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