XP 스크립트

중복이면 ㅈㅅ합니다;;

 

#==============================================================================
# *** AutoSave
#------------------------------------------------------------------------------
# This module handles the AutoSaving
#==============================================================================
module AutoSave
#--------------------------------------------------------------------------
# * Saves File
#--------------------------------------------------------------------------
def self.save
  begin
    #Saves the file to whatever $game_system.filename is
    file = File.open($game_system.filename, "wb")
    a = Scene_Save.new
    a.write_save_data(file)
  ensure
    file.close
  end
end
#--------------------------------------------------------------------------
# * Deletes File
#--------------------------------------------------------------------------
def self.deletesave
  begin
    if FileTest.exits?($game_system.filename)
      File.delete($game_system.filename)
    end 
  end
end
end
#==============================================================================

#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
# This class performs save screen processing.
# NOTE THAT SCENE_SAVE NO LONGER SAVES THE GAME, it changes the autosave file
#==============================================================================

class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
  super("Which file would you like to autosave to?")
end
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
  # Play save SE
  $game_system.se_play($data_system.save_se)
  $game_system.filename_c(filename)
  $scene = Scene_Menu.new
end
end

#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================
class Scene_Load < Scene_File

alias old_doloadthingie on_decision
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
def on_decision(filename)
  $game_system.filename_c(filename)
  old_doloadthingie(filename)
end
end

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Aliasing Objects
#--------------------------------------------------------------------------
alias autosaveinit initialize
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize
  autosaveinit
  @filename = "Save1.rxdata"
end
#--------------------------------------------------------------------------
# * Filename -> Returns Autosave Filename
#--------------------------------------------------------------------------
def filename
  if @filename != nil
    return @filename
  else
    return "Save1.rxdata"
  end 
end
#--------------------------------------------------------------------------
# * Filename_change -> Sets New Autosave Filename
#--------------------------------------------------------------------------
def filename_c(newname)
  return if newname == "" or newname == nil
  @filename = newname
end
end

#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party

alias gainglod_autosave gain_gold
alias gainitem_autosave gain_item
alias gainweap_autosave gain_weapon
alias gainarmor_autosave gain_armor
#--------------------------------------------------------------------------
# * Gain Gold (or lose)
# n : amount of gold
#--------------------------------------------------------------------------
def gain_gold(n)
  gainglod_autosave(n)
  AutoSave.save
end
#--------------------------------------------------------------------------
# * Gain Items (or lose)
# item_id : item ID
# n : quantity
#--------------------------------------------------------------------------
def gain_item(item_id, n)
  gainitem_autosave(item_id, n)
  AutoSave.save
end
#--------------------------------------------------------------------------
# * Gain Weapons (or lose)
# weapon_id : weapon ID
# n : quantity
#--------------------------------------------------------------------------
def gain_weapon(weapon_id, n)
  gainweap_autosave(weapon_id, n)
  AutoSave.save
end
#--------------------------------------------------------------------------
# * Gain Armor (or lose)
# armor_id : armor ID
# n : quantity
#--------------------------------------------------------------------------
def gain_armor(armor_id, n)
  gainarmor_autosave(armor_id, n)
  AutoSave.save
end
end

#==============================================================================
# ** Scene Change Map
#------------------------------------------------------------------------------
# This Scene pop-ups when teleporting.
#==============================================================================
class Scene_Map
alias autosavescript_changemap_main main
#--------------------------------------------------------------------------
# * Main
#--------------------------------------------------------------------------
def main
  autosavescript_changemap_main
  AutoSave.save
end
end

Who's 캉쿤

?

배고파요ㅠㅜ

전 댓글을 먹고 살아요ㅠㅜ

댓글 하나만요ㅠㅜ

Comment '4'
  • profile
    은색바람 2011.09.12 17:47

    음...이벤트로 이 스크립트 사용하게 해야하나요?

  • profile
    은색바람 2011.09.12 22:25

    알긴 알지요..

    저는 또.. 장소 이동하면 바로 세이브 되는 자동 세이브 스크립트 인줄 알고..ㅋㅋ

  • ?
    캉쿤 2011.09.12 21:47

    ;; 초보신가 보네요... 스크립트 빈 칸에 붙여넣기 하세요^^ 저절로 실행 됩니다^^

  • ?
    삥곰 2011.09.15 20:07

    맵 이동하면 자동저장 되는건가요?


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
461 키입력 전체키 입력 스크립트 v4 by Cybersam 5 file 백호 2009.02.22 1947
460 키입력 Glitchfinder's Input Modules (XP/VX 공용) 2 Alkaid 2011.03.19 1952
459 이동 및 탈것 Super Simple Vehicle System Enhanced 8.0 by DerVVulfman 1 Alkaid 2010.12.12 1956
458 기타 [All RGSS] 윈도우 커서 숨기기/보이기 1 file Cheapmunk 2014.03.02 1956
457 기타 [신기술 체험] 오투잼 스크립트 7 file 백호 2009.02.22 1959
456 전투 KGC_BattlerEffect(버틀러 효과) 2 file 백호 2009.02.22 1959
455 저장 세이브 & 로드 화면 개조 스크립트 file 백호 2009.02.21 1962
454 메뉴 개별 메뉴 호출 단축키 스크립트 5 file 백호 2009.02.21 1965
453 HUD 맵 이름 뛰우기 10 WMN 2008.03.17 1966
452 상태/속성 KGC_StateIcon(스테이터스 아이콘 표시) 2 file 12345678 2010.02.03 1967
451 그래픽 MAWS: Modified Advanced Weather Script 1.2 by Agckuu Coceg 2 file Alkaid 2010.09.13 1969
450 기타 Project RGSS3 by joe5491 6 습작 2013.05.06 1969
449 저장 심플 세이브 로드(1개의 세이브 사용하기) 3 백호 2009.02.22 1971
448 메뉴 링 메뉴 Edited by Hypershadow180@rmxp.net 1 file 백호 2009.02.22 1975
447 스킬 스킬 레벨 스크립트 # 번역 진행중 6 빗자루씨 2010.02.11 1981
446 맵/타일 World Map 스크립트 1 file 백호 2009.02.21 1983
445 저장 Improved Save by gerrtunk 2 file Alkaid 2010.10.13 1983
» 저장 렉없는 자동세이브(중복임??) 4 캉쿤 2011.09.12 1986
443 장비 전투중에 장비변경 from RGSS Wiki 1 백호 2009.02.22 1988
442 기타 동료들이 기차처럼 줄줄 따라온다!? 7 file 백호 2009.02.21 1990
Board Pagination Prev 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ... 52 Next
/ 52