XP 스크립트

http://www.gamebaker.com/rmxp/scripts/settings-control.htm
  sandgolem씨의 스크립트 설정을 조작하거나 저장하는 역할을 하는 스크립트로, 다른 스크립트들 위에 있어야 합니다.  몇몇 스크립트 사용시 필수.


#=============================================================================
# ** SG Settings Control
#=============================================================================
# sandgolem
# Version ZERO.b
# 3.04.06
#=============================================================================
#
# Thanks Saucetenuto, SephirothSpawn & Trickster!
# This script wouldn't exist without their help
#
#=============================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
#
# To use this script, copy it and insert it in a new section above "Main",
# under the default scripts and the SDK if you're using it. This script
# MUST be above all the SG Scripts and any that rewrite loading/saving.
#
# This script controls and saves all settings for the SG Scripts
#
# If you're adding new scripts to an old game and need to convert people's
# saved games, check the above site soon for SG Settings Converter
#
# Have problems? You can leave me a message at:
# http://www.gamebaker.com/users/sandgolem
#
#=============================================================================
#
# Commands added, can be used in event script:
#  sg_on('name')                    - turns that name to true
#  sg_off('name')                    - turns that name to nil (off)
#  sg_set('name','word')            - turns name to the following setting
#    or sg_set('name',#)             
#  sg_ar('name','','',#,...)        - creates a new array, replacing another
#                                      that has the same name
#  sg_ast('name','word','newword')  - turns the spot where word is in the
#                                      array to the newword
#  sg_ast('name',#,'newword') or    - turns what's placed at spot # in the
#    sg_ast('name',#,#)                array to the third option. Note: The
#                                      arrays start at 0, not 1
#
# Be careful while setting arrays in the event script window, if it splits the
# line during a string your string will have a n attached (and won't work).
#
# I'll see about releasing a fix for that before this script is ver 1
#
#=============================================================================

$game_sg = { 'enabled' => true }

def sg_on(name)
  $game_sg[name.downcase] = true
end
 
def sg_off(name)
  $game_sg[name.downcase] = false
end
 
def sg_set(name,set)
  $game_sg[name.downcase] = set
end

def sg_ar(array_name_string, *args)
  for i in 0...args.size
    if args[i].is_a?(String)
      args[i] = args[i].chomp
    end
  end
  $game_sg[array_name_string.downcase] = args
end

def sg_ast(array_name_string, changing, new)
  sg_temp = $game_sg[array_name_string]
  sg_temp2 = 0
  if changing.is_a?(String)
    loop do
      if sg_temp2 > sg_temp.size
        p 'Setting to change with sg_ast does not exist! Contact game creator'
        p 'Array named:', array_name_string, sg_temp
        p 'Attempted to change:', changing
        return
      end
      if sg_temp[sg_temp2] == changing
        sg_temp[sg_temp2] = new.chomp
        $game_sg[array_name_string] = sg_temp
        return
      end
      sg_temp2 += 1
    end
  else
    sg_temp[changing] = new.chomp
    $game_sg[array_name_string] = sg_temp
  end
end

begin
  SDK.log("SG Script Control", "Sandgolem", 1, "24.03.06")
  @temp == true
  class Scene_Save < Scene_File
   
    alias sandgolem_control_save_write write_data   
    def write_data(file)
      sandgolem_control_save_write(file)
      Marshal.dump($game_sg, file)
    end   
  end   
   
  class Scene_Load < Scene_File     
     
    alias sandgolem_control_load_read read_data   
    def read_data(file)
      sandgolem_control_load_read(file)
      $game_sg = Marshal.load(file)
    end     
  end
 
  rescue
  if @temp != true # if no sdk
    class Scene_Save < Scene_File
     
      alias sandgolem_control_save_write write_save_data     
      def write_save_data(file)
        sandgolem_control_save_write(file)
        Marshal.dump($game_sg, file)
      end     
    end   
   
    class Scene_Load < Scene_File     
     
      alias sandgolem_control_load_read read_save_data
      def read_save_data(file)
        sandgolem_control_load_read(file)
        $game_sg = Marshal.load(file)
      end     
    end
  end
  @temp = nil
end

# Don't change this unless you know what you're doing

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
981 HUD [게이지바]3.0버젼「현재시간, 플레이시간, 걸음수, 윈도우 이동 추가」(HelloCoa2Ver3.0) 63 file 코아 코스튬 2010.10.30 4921
980 메시지 메세지플러스3.1v스크립트(얼굴표시,메세지색상,속도등정하는스크립트) 8 백호 2009.02.21 4880
979 윈도우_게이지 (HP, SP, 경험치<소수점포함>… 12 WMN 2008.04.06 4859
978 메뉴 1인 캐릭터 메뉴 스크립트 27 file - 하늘 - 2009.08.06 4790
977 이동 및 탈것 아하! 그렇구나의 3D 신기술 체험 30 아하!잘봤어요. 2010.02.28 4772
976 전투 사이드뷰 배틀 (2003 형식으 전투)| 12 file 아방스 2007.11.09 4744
975 메시지 메세지 표시 업그레이드 11 file 백호 2009.02.21 4728
974 전투 사이드뷰 방식 스크립트. 8 file 백호 2009.02.21 4638
973 HUD 새로운방법의 맵이름 표시 31 file 백호 2009.02.21 4617
972 그래픽 부드럽게 화면이 움직이는 스크립트 입니다. 16 GangSin 2012.09.12 4590
971 전투 ABP 액알 (Action Battle Player) 14 file 백호 2009.02.22 4557
970 HUD HP과 SP 바 19 Man... 2008.11.04 4534
969 이름입력 한글 이름 입력 15 ok하승헌 2010.02.18 4487
968 게이지바 만들기 [헬악이님 제공] 12 file 아방스 2007.11.09 4416
967 메뉴 메뉴에 그림넣기 4 file 백호 2009.02.22 4412
966 퀘스트 퀘스트 다이어리 15 백호 2009.02.21 4408
965 전투 XAS 여러가지버전. 9 §포뇨§ 2010.02.23 4395
964 타이틀/게임오버 타이틀 화면 커스터마이즈 (타이틀 메뉴 바꾸는 스크립트) 9 file №1 2012.08.04 4391
963 온라인 온라인 스크립트입니다^^(예제파일) 7 캉쿤 2011.09.24 4390
962 미니맵 미니맵 만들기~! 14 file 블리치캐릭셋원함 2010.11.24 4350
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