Sign in to follow this  
Followers 0
evil_goku

Auto_Battle

6 posts in this topic

con este script podras hacer una auto batalla ejemplo que peleen solos lo jugadores
y aparecera asi.


user posted image


[spoiler]
CODE

#==============================================================================
# ¦ 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
[/spoiler]

EDIT: (xXDarkDragonXx)

Favor de usar los tags adecuadamente (cerralas) y poner scripts en spoiler. smile.gif Edited by xXDarkDragonXx
0

Share this post


Link to post
Share on other sites
no entiendo bien q hace?
0

Share this post


Link to post
Share on other sites
Da la opción de Auto-Combate. Todos los personajes atacan normal hasta que acaba.
0

Share this post


Link to post
Share on other sites
Me gusta. También para vagos que no quieren dar comandos. campeon.gif
0

Share this post


Link to post
Share on other sites
mm parece bien para una animacion me lo llevo xD.png
0

Share this post


Link to post
Share on other sites
a mi me sale el auto-battle y no me da errores ni nda, pero cuando le pico para que se haga el autobattle nomas no pasa nada, es como si estuvieran dibujadas las letras nada mas!
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0