Naruto - World of Sprite
Bienvenue sur WOSN, la plus grosse banque de ressource Naruto;)
N'hésitez pas à vous inscrire !
Naruto - World of Sprite
Bienvenue sur WOSN, la plus grosse banque de ressource Naruto;)
N'hésitez pas à vous inscrire !
Naruto - World of Sprite
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.


Retrouvez de nombreux sprites Naruto et le strict minimum pour crée votre propre jeu Naruto !
 
AccueilDernières imagesRechercherS'enregistrerConnexion
Le Deal du moment : -39%
Ordinateur portable ASUS Chromebook Vibe CX34 Flip
Voir le deal
399 €

 

 #Auto-Combat

Aller en bas 
3 participants
AuteurMessage
Tm

Tm


Messages : 215
Points d'Aide : 327
Réputation : 9
Date d'inscription : 12/03/2012

#Auto-Combat Empty
MessageSujet: #Auto-Combat   #Auto-Combat Icon_minitimeMer 21 Mar - 18:05

#Auto-Combat


Ce script permet d'avoir une option "Auto-Combat", il est à placé au dessus de Main :

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
Revenir en haut Aller en bas
https://worldofspritenaruto.forum-pro.fr
Lucifer Uchiwa




Messages : 42
Points d'Aide : 58
Réputation : 0
Date d'inscription : 18/03/2012

#Auto-Combat Empty
MessageSujet: modele   #Auto-Combat Icon_minitimeMer 21 Mar - 19:17

probleme ligne 13 ^^
Revenir en haut Aller en bas
Tm

Tm


Messages : 215
Points d'Aide : 327
Réputation : 9
Date d'inscription : 12/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeMer 21 Mar - 19:21

Il te dise quoi comme erreur, car chez moi ça marche parfaitement Wink
Revenir en haut Aller en bas
https://worldofspritenaruto.forum-pro.fr
Lucifer Uchiwa




Messages : 42
Points d'Aide : 58
Réputation : 0
Date d'inscription : 18/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeMer 21 Mar - 19:35

scripte auto combat ereur l13 syntax eror ocured
Revenir en haut Aller en bas
Tm

Tm


Messages : 215
Points d'Aide : 327
Réputation : 9
Date d'inscription : 12/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeMer 21 Mar - 20:02

Bien, je te passe le mien :

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
Revenir en haut Aller en bas
https://worldofspritenaruto.forum-pro.fr
Lucifer Uchiwa




Messages : 42
Points d'Aide : 58
Réputation : 0
Date d'inscription : 18/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeMer 21 Mar - 20:05

sa marche tj pas meme prbl
Revenir en haut Aller en bas
Tm

Tm


Messages : 215
Points d'Aide : 327
Réputation : 9
Date d'inscription : 12/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeMer 21 Mar - 20:14

Efface la ligne puis réessaye Wink
Revenir en haut Aller en bas
https://worldofspritenaruto.forum-pro.fr
Lucifer Uchiwa




Messages : 42
Points d'Aide : 58
Réputation : 0
Date d'inscription : 18/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeJeu 22 Mar - 0:07

Tm a écrit:
Efface la ligne puis réessaye Wink
iup si ses concerne jai eface yen a plein dautre deriere XD
Revenir en haut Aller en bas
Tm

Tm


Messages : 215
Points d'Aide : 327
Réputation : 9
Date d'inscription : 12/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeJeu 22 Mar - 13:18

Sinon tu l'as bien mit au dessus de Main ? ^^" Par contre essaye d'éviter le langage sms s'il te plait Wink
Revenir en haut Aller en bas
https://worldofspritenaruto.forum-pro.fr
Skaaz

Skaaz


Messages : 30
Points d'Aide : 26
Réputation : 0
Date d'inscription : 23/03/2012

#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitimeDim 20 Mai - 11:30

Merci du partage ! Encore une fois !
Revenir en haut Aller en bas
http://www.make-and-graph.com/
Contenu sponsorisé





#Auto-Combat Empty
MessageSujet: Re: #Auto-Combat   #Auto-Combat Icon_minitime

Revenir en haut Aller en bas
 
#Auto-Combat
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» #Script de Combat 2.5
» #Affichage d'icone en Combat
» #La map comme fond de combat
» Système de Combat dans Rpg Maker.

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Naruto - World of Sprite :: RPG Maker XP :: Ressources :: Script-
Sauter vers: