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
941 기타 [Game_Actor] 게이지바 표시 스크립트 8 file - 하늘 - 2009.08.03 4174
940 기타 대화창에 얼굴그래픽 스크립트 25 file 백호 2009.02.21 4137
939 전투 깔끔한형식의 Asan'Tear배틀시스탬 4 file 콩밥 2010.09.29 4122
938 전투 에너미들도 게이지바 달고싶다~!! 14 file 백호 2009.02.21 4100
937 기타 캐릭터 소개 화면 22 file 독도2005 2008.10.05 4099
936 메뉴 3D Menu Script 7 현문 2010.10.06 4077
935 메시지 TXT 메세지 렌더링 스크립트 16 에돌이 2011.07.14 4069
934 기타 8방향 마우스 스크립트 10 file 아방스 2009.02.28 4063
933 전투 중복일지도 모르는 ATB 전투 11 file 백호 2009.02.22 4057
932 HUD 이름띄우기스크립트 - [ID홍길동] 이 아닌 [홍길동]으로 표기하기 27 블루레스 2009.11.06 4054
931 온라인 게임화면을 전체화면으로 하기 27 file 이씨 2010.03.09 4052
930 전투 xas히어로에디션 3.4 14 ps인간 2009.01.04 4044
929 퀘스트 퀘스트 시스템 # 번역 24 빗자루씨 2010.02.09 4035
928 전투 Blizz-ABS 1.95 27 아방스 2008.03.05 4028
927 이동 및 탈것 8방향이동, Shift키 누르면 대쉬 63 WinHouse 2010.06.12 4023
926 기타 몬스터 게이지바 턴알 22 file 키라링 2009.01.22 4015
925 메시지 공지(?)를 띄우는 스크립트 23 file - 하늘 - 2009.08.06 4007
924 전투 일본사이트에서 찾은 턴제 스크립트 23 file 백호 2009.02.21 3997
923 온라인 NetPlay Evolution v3 여러분이 고대하시던 NPE v3입니다! 5 file 심영 2010.10.29 3993
922 그래픽 [AWS- Advanced Weather System] 이름그대로 강화된 날씨시스템. 11 file 제로스S2 2009.08.02 3988
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52