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

Forum des Xtr3m

voici le forum officiel de la Team Xtr3m
 
AccueilAuto-combat Untitl10Dernières imagesRechercherS'enregistrerConnexion
Le deal à ne pas rater :
Funko POP! Jumbo One Piece Kaido Dragon Form : où l’acheter ?
Voir le deal

 

 Auto-combat

Aller en bas 
AuteurMessage
Xtr3m eros
General 5 etoile
General 5 etoile



Masculin
Nombre de messages : 945
Age : 32
Localisation : chez moi
Date d'inscription : 23/06/2007

Auto-combat Empty
MessageSujet: Auto-combat   Auto-combat Icon_minitimeMar 28 Aoû - 11:43

Auto-combat
Auteur : Thousand Dragoon Link et Sir_KnightDragoon
Fonction : Permet de rajouter dans les combats l'option auto-combat qui fait combattre vos personnages automatiquement comme dans Rpg maker 2000/2003.
Image(s): screen
Ressource(s) : aucune
Remarque : Testé et fonctionnel.
Installation : Allez dans l'éditeur de script (F11) et créez un script au dessus de "Main" , nommez le " Auto_Battle " et collez ce script.
Utilisation : aucun

Code :
Code:
 
[color=#0000ff]#==============================================================================
# ¦ Auto_Battle
#------------------------------------------------------------------------------
# Edited from default scripts by Thousand Dragoon Link and Sir_KnightDragoon
# Comments by Thousand Dragoon Link
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ? Renewal of a frame (party command phase)
#--------------------------------------------------------------------------
def update_phase2
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # Fight
# Determine if a SE is performed.
$game_system.se_play($data_system.decision_se)
start_phase3
when 1 # Escape.
# escape is not possible
if $game_temp.battle_can_escape == false
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
update_phase2_escape
when 2 # Auto-Battle
$game_system.se_play($data_system.decision_se)
update_phase2_auto
end
return
end
end
#--------------------------------------------------------------------------
# Renewal of a frame (party command phase : auto)
#--------------------------------------------------------------------------
def update_phase2_auto
loop do
if @actor_index == $game_party.actors.size-1
start_phase4
return
end
@actor_index += 1
$game_party.actors[@actor_index].current_action.kind = 0
$game_party.actors[@actor_index].current_action.basic = 0
$game_party.actors[@actor_index].current_action.decide_random_target_for_actor
end
end
end

class Window_PartyCommand < Window_Selectable
#--------------------------------------------------------------------------
# object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
#Change the commands to what you want them to say
@commands = ["Combat", "Fuite", "Auto-Combat"]
@item_max = 3
@column_max = 3
draw_item(0, normal_color)
draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
draw_item(2, normal_color)
self.active = false
self.visible = false
self.index = 0
end
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index], 1)
end
#--------------------------------------------------------------------------
# Renewal of the rectangle cursor
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.set(80 + index * 160, 0, 128, 32)
end
end[/color]
Revenir en haut Aller en bas
 
Auto-combat
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» La map comme fond de combat
» sisteme de combat

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum des Xtr3m :: Autres :: Scripts :: Les scripts de chez nous-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser