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 백호

?

이상혁입니다.

http://elab.kr

Comment '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
721 기타 레벨9999만들기스크립 23 해파리 2009.04.10 3344
720 퀘스트 퀘스트창 예제 21 지나가던사람 2009.04.05 5742
719 메뉴 [자작]명성치 사용 스크립트 16 Rainsy 2009.03.22 3390
718 이동 및 탈것 반칸 이동하기 14 file 느싱 2009.03.09 3458
717 맵/타일 [유니크급] RPG XP 게임을 3D화로 보자! Neo Mode7 script / 52 file 쉴더 2009.02.28 9442
716 기타 8방향 마우스 스크립트 10 file 아방스 2009.02.28 4063
715 기타 4방향 마우스 스크립트 12 file 아방스 2009.02.28 2662
714 액터 (killer님 요청)자동회복 스크립트 3 나뚜루 2009.02.22 2572
713 기타 멤버 교체 11 file 백호 2009.02.22 2525
712 메뉴 메뉴등에서 움직이는 엑터 9 file 백호 2009.02.22 3162
711 파티 파티 확장 11 file 백호 2009.02.22 3184
710 스킬 제한시간내 커맨드를 입력해야 스킬이 발동~ 3 file 백호 2009.02.22 2614
709 기타 회복으로 데미지를 받는 좀비 스크립트 7 백호 2009.02.22 2004
708 기타 플레이어 발소리 스크립트 20 백호 2009.02.22 3107
707 아이템 CSSR14-아이템 합성 3 file 백호 2009.02.22 2833
706 장비 CSSR8-장비품 생산&강화 시스템 18 file 백호 2009.02.22 3959
705 장비 CSSR5-장비품 중량 시스템 1 file 백호 2009.02.22 1731
704 장비 CSSR1-장비품 어빌리티포인트제 file 백호 2009.02.22 1597
703 전투 CSSR6-스태미너 시스템 1 file 백호 2009.02.22 2337
702 기타 Multiple Languages v2 by SephirothSpawn (SDK호환) file 백호 2009.02.22 1404
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 52 Next
/ 52