Vai al contenuto


Toggle Chat RM - Chat Apri la Chat in un popup

E' severamente vietato richiedere supporto su RPG Maker in chat!
@  NoxChibi : (18 May 2012 - 01:54 PM) http://rpgmkr.net/fo...4025#entry24025
@  Abadon : (18 May 2012 - 10:08 AM) saaalveee
@  Melosx : (17 May 2012 - 09:51 PM) Cambiato Avatar,,, premete CTRL + F5 se vedete ancora Roxas ^.^
@  NoosiTD : (17 May 2012 - 08:42 PM) evvai
@  kekkorider : (17 May 2012 - 08:40 PM) @NoosiTD eccoti accontentato
@  Melosx : (17 May 2012 - 08:30 PM) E7: Astral Ocean è bellisimo... e come lo subbavano i Nostrano non lo subba nessuno... devo vedere gli anime magic se sono buoni o no
@  NoosiTD : (17 May 2012 - 08:26 PM) e voglio i risultati del contest
@  NoosiTD : (17 May 2012 - 08:24 PM) Il problema è che non ne ho mai capito un accidenti
@  NoosiTD : (17 May 2012 - 08:24 PM) lo guardavo anch'io E7
@  Melosx : (17 May 2012 - 08:23 PM) non puoi capire...
@  Melosx : (17 May 2012 - 08:23 PM) un capolavoro distrutto
@  NoosiTD : (17 May 2012 - 08:21 PM) ma calmino
@  Melosx : (17 May 2012 - 08:21 PM) minchia quanto sono incazato
@  Melosx : (17 May 2012 - 08:20 PM) devo provare l'ultimo che riamane
@  Melosx : (17 May 2012 - 08:20 PM) gli altri subber subbano a cachio di cane morto
@  Melosx : (17 May 2012 - 08:20 PM) gli omoshiroi ci stanno secoli per subbare quegli episodi... oltretutto sbagliano pure il nome di una ragazza
@  Melosx : (17 May 2012 - 08:19 PM) subbato come si deve??
@  Melosx : (17 May 2012 - 08:19 PM) dove lo scarico ora E7:AO
@  Melosx : (17 May 2012 - 08:19 PM) ma chissene di soul eater
@  NoosiTD : (17 May 2012 - 08:17 PM) io facevo così quando mi accorgevo che Soul Eater era finito

Auto Battle when Idle


  • Per cortesia connettiti per rispondere
Nessuna risposta a questa discussione

#1 OFFLINE   Ally

Ally

    Fondatori

  • Amministratori
  • 5558 Messaggi:
  • Localitàrpgmkr
  • Ruolo:
    Scripter
  • Progetto VX:
    Essence
  • Tool:
    RM2k/2k3

Inviato 04 February 2012 - 12:08 AM

Nome Script: Auto Battle when Idle
Versione: 1.2
Autore/i: mitchi.exe

Informazioni:
Il titolo dice tutto ù_ù
Se non si ha tempo di stare dietro a una battaglia, la si può impostare ocme automatica =)

Screenshot:
Spoiler

Istruzioni:
Inserite lo script sotto Material.
Istruzioni all'interno dello script.

Script:
#===========================================================================01=
#  MITCHI Auto Battle when Idle [VXA]
#------------------------------------------------------------------------------
#  Script version: 1.2
#  By: //mitchi.exe                                        
#  Converted on: Dec. 8, 2011
#  (This is my first completed VX and VXA script!)
#------------------------------------------------------------------------------
#  Description:
#  This script will make all actors in the party to auto attack when the player
#  is not doing anything (idling) during a party or actor command selection
#  after the specified amount of frames or by pressing a certain button. This
#  is very useful when you suddenly have to do something else IRL and you don't
#  want to waste game play time! This is also beneficial when you're sleepy
#  or lazy... or somethin'...
#------------------------------------------------------------------------------
#  Features:
#  ~The party attacks automatically if player is idle or by a key press
#  ~Can set a specific amount of frames before the auto battle starts
#  ~Can be disabled by a switch
#------------------------------------------------------------------------------
#  Instructions:
#  Change the value of MAB_IDLE_FRAMES below to the amount you want:
#  MAB_IDLE_FRAMES = n
#  Party will automatically attack after 'n' frames. (usu. 60 frames = 1 sec.)
MAB_IDLE_FRAMES = 300

#  Change the value of DISABLE_IDLE_SWITCH below to a switch you want:
#  DISABLE_IDLE_SWITCH = n
#  If the switch 'n' is turned ON, the script's features WILL NOT WORK.
DISABLE_IDLE_SWITCH = 85

#  You can also enter auto mode by pressing a button.
#  IDLE_AUTO_KEY = button
#  where 'button' can be (:A,:X,:Y,:Z,:L,:R)
IDLE_AUTO_KEY = :L

#------------------------------------------------------------------------------
#  Compatibility:
#  -Only supports UP, DOWN, OKAY(C), and CANCEL(B) keys for idling
#  -This will not work on battle systems that alters turns like the ATB and TBS
#===========================================================================42=
#  Special Thanks:
#  -IMP1 for the frame count and seconds info
#  -Yanfly for helping me fix an error for the conversion
#  -SortaCool for originally requesting the script
#  -Peva for the manual key press suggestion
#
#   Changelog:
#   v1.2 - Script converted to VXA
#   v1.1 - auto.battle -> make.action to prevent screwing up
#          each actor's default auto-battle setting (VX)
#==============================================================================
##### START OF CODE #####
puts "MITCHI Auto Battle when Idle loaded"

class Scene_Battle < Scene_Base

  alias idle_auto_start start
  alias idle_auto_update update
  alias idle_auto_turn_end turn_end

  def start
    idle_auto_start
    @idle_counter = 0
  end

  def idle_auto_key_trigger?
    if (Input.trigger?(:DOWN) or Input.trigger?(:UP))
      return true
    elsif (Input.trigger?(:C) or Input.trigger?(:B))
      return true
    end
    return false
  end

  def idle_manual_key_press?
    if (Input.trigger?(IDLE_AUTO_KEY))
      return true
    end
    return false
  end

  def update
    idle_auto_update
    if !$game_switches[DISABLE_IDLE_SWITCH]
      if @party_command_window.active or @actor_command_window.active
        @idle_counter = 0 if idle_auto_key_trigger?
        @idle_counter += 1
        @idle_counter = MAB_IDLE_FRAMES if idle_manual_key_press?
        if @idle_counter == (MAB_IDLE_FRAMES)
          puts "Auto Battle Idle mode enabled!"
          for i in 0..$game_party.members.size-1
            actor_set_auto = $game_party.members[i].id
            $game_actors[actor_set_auto].make_auto_battle_actions
          end
          Sound.play_ok
          @party_command_window.deactivate if @party_command_window.active
          @actor_command_window.deactivate if @actor_command_window.active
          turn_start
        end
      end
    end
  end  

  def turn_end
    @idle_counter = 0
    idle_auto_turn_end
  end

end

##### END OF CODE #####
#==============================================================================
#  _   _   _   _____   ____   _   _   _
# |  / | | | |_   _| |  __| | |_| | | |
# |  '  | | |   | |   | |__  |  _  | | |
# |_|_|_| |_|   |_|   |____| |_| |_| |_|
#  "Yay for my first completed VXA script!"
#============================================================================== 

Incompatibilità:
N/D
Immagine inserita
Spoiler




1 utente(i) stanno leggendo questa discussione

0 utenti, 1 ospiti, 0 utenti anonimi