UltimaForum

Wsparcie [VX] - Poszukuje scener shootera scrypt

arczaniol1 - Pią 01 Paź, 2010 16:14
Temat postu: Poszukuje scener shootera scrypt
Tak jak w temacie poszukuje scryptu do robienia obrazu gry
szukalem na forum ale nie znalazlem

Dam pomogl ;]

Tjef - Nie 10 Paź, 2010 20:17

Gościu, możesz mi odrazu dać "pomógł"

Chodzi ci o klawisz "Print Screen"?

Jeżeli tak, to przy uruchomionej grze naciśnij ALT + Print Screen (na klawiaturze) po czym
obrazek wklej do painta, lub jakiegoś innego programu odtwarzającego grafikę.

RATI - Nie 10 Paź, 2010 23:41

Jest taki skrypt:

Spoiler:

Kod:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/   ◆             Window Screen Capture - KGC_ScreenCapture         ◆ XP/VX ◆
#_/   ◇                    Last Update: 2008/01/02                            ◇
#_/   ◆                 Translation by Mr. Anonymous                          ◆
#_/   ◆ KGC Site:                                                             ◆
#_/   ◆ http://f44.aaa.livedoor.jp/~ytomy/                                    ◆
#_/   ◆ Translator's Blog:                                                    ◆
#_/   ◆ http://mraprojects.wordpress.com                                      ◆
#_/----------------------------------------------------------------------------
#_/  Installation: Requires and is inserted below KGC_InterfaceForWin32API.
#_/============================================================================
#_/  This script allows you to make screen shots. Images are saved the the root
#_/   project folder. This script works for both RMVX and RMXP.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#=============================================================================#
#                               ★ Customization ★                             #
#=============================================================================#

module KGC
 module ScreenCapture
  # ◆ Screen Capture Key
  #  Assigns the key used for manual screen capturing.
  #  The button is disabled if set to nil. Ex: CAPTURE_BUTTON = Input::nil
  CAPTURE_BUTTON = Input::F8
  # ◆ CTRL Key Option Toggle
  #  This toggle allows you to require the CTRL key to be held while pressing
  #   the Screen Capture Key (Default: F8)
  #  true = CTRL must be held.
  #  false = CTRL is not required.
  USE_CTRL  = false
  # ◆ ALT Key Option Toggle (See above)
  USE_ALT   = false
  # ◆ SHIFT Key Option Toggle (See above)
  USE_SHIFT = false

  # ◆ Screenshot Filename Format
  #  This allows you to change the format of the image file that is saved when
  #   a screenshot is made.
  #   {num} = an incremental number added when saving the file.
  NAME_FORMAT = "Screenshot{num}.jpg"

  # ◆ Screen Capture Sound Effect
  #  This allows you to change the sound effect(SE) played when a screenshot is
  #   made. If set to nil, no sound is played. Ex: SUCCESS_SE = nil
  if $DEBUG
    # XP-Only
    SUCCESS_SE = RPG::AudioFile.new("056-Right02")
  else
    # VX-Only
    SUCCESS_SE = RPG::SE.new("Up", 100, 150)
  end
 end
end

#==============================================================================
# ■ TCap
#==============================================================================

module TCap
  CP_UTF8 = 65001  # UTF-8 Unicode
  #--------------------------------------------------------------------------
  # ● The TCap.dll version is aquired.
  #     (Example: 1.23 → 123)
  #--------------------------------------------------------------------------
  def self.version
    begin
      api = Win32API.new('TCap.dll', 'DllGetVersion', %w(v), 'l')
      ret = api.call
    rescue
      ret = -1
    end
    return ret
  end
  #--------------------------------------------------------------------------
  # ● Capture Game Screen
  #     filename : output destination (bmp)
  #--------------------------------------------------------------------------
  def self.capture(filename)
    begin
      hwnd = Win32API.GetHwnd
      if hwnd == 0
        hwnd = Win32API.GetActiveWindow
      end
      if hwnd == 0
        ret = -1
      else
        tcap = Win32API.new('TCap.dll', 'CaptureA', %w(l p l l), 'l')
        ret = tcap.call(hwnd, filename, 1, CP_UTF8)
        Graphics.frame_reset
      end
    rescue
      ret = -1
    end
    return ret
  end
end

#==============================================================================
# ■ Input
#==============================================================================

if KGC::ScreenCapture::CAPTURE_BUTTON != nil
 module Input
  @@_capture_num = 1
  CAPTURE_FILE_NAME = KGC::ScreenCapture::NAME_FORMAT.gsub(/{num}/) { "%03d" }
  #--------------------------------------------------------------------------
  # ● Frame Update
  #--------------------------------------------------------------------------
  unless defined?(update_KGC_ScreenCapture)
  class << Input
    alias update_KGC_ScreenCapture update
  end
  def self.update
    update_KGC_ScreenCapture

    judge_capture
  end
  end
  #--------------------------------------------------------------------------
  # &#9679; Capture Execution Judgement
  #--------------------------------------------------------------------------
  def self.judge_capture
    if trigger?(KGC::ScreenCapture::CAPTURE_BUTTON) &&
        (!KGC::ScreenCapture::USE_CTRL || press?(CTRL)) &&
        (!KGC::ScreenCapture::USE_ALT || press?(ALT)) &&
        (!KGC::ScreenCapture::USE_SHIFT || press?(SHIFT))
      result = TCap.capture(sprintf(CAPTURE_FILE_NAME, @@_capture_num))
      if result == 0
        capture_se = KGC::ScreenCapture::SUCCESS_SE
        if capture_se != nil
        $DEBUG ? $game_system.se_play(capture_se) : capture_se.play
        end
        @@_capture_num += 1
      end
      end
    end
  end
end



Wciskasz F8 podczas gry i zapisuje ci plik ze screenem w folderze z grą. Dawno tego nie używałem i dopiero wykopałem to z zasobów na kompie, ale z tego co pamiętam to po wyłączeniu gry i ponownym włączeniu screeny zapisuje z nazwą o numerach początkowych, czyli jeżeli za poprzednim razem zapisaliśmy trzy screeny i po ponownym uruchomieniu gry znowu użyjemy screen capture to automatycznie nadpisze pierwszy screen itd.


Powered by phpBB modified by Przemo © 2003 phpBB Group