XP 스크립트

#==============================================================================
# ■ Game_Name
#------------------------------------------------------------------------------
#  Name
#==============================================================================

class Window_NameInput < Window_Base
  CHARACTER_TABLE =
  [
    "A","B","C","D","E",
    "F","G","H","I","J",
    "K","L","M","N","O",
    "P","Q","R","S","T",
    "U","V","W","X","Y",
    "Z"," "," "," "," ",
    "a","b","c","d","e",
    "f","g","h","i","j",
    "k","l","m","n","o",
    "p","q","r","s","t",
    "u","v","w","x","y",
    "z"," "," "," "," "
  ]
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 640, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @index = 0
    refresh
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● 문자의 취득
  #--------------------------------------------------------------------------
  def character
    return CHARACTER_TABLE[@index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0..179
      x = 4 + i / 5 / 9 * 152 + i % 5 * 28
      y = i / 5 % 9 * 32
      self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1)
    end
    self.contents.draw_text(544, 9 * 32, 64, 32, "ID등록완료", 1)
  end
  #--------------------------------------------------------------------------
  # ● 커서의 구형 갱신
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # 커서 위치가 [결정] 의 경우
    if @index >= 180
      self.cursor_rect.set(544, 9 * 32, 64, 32)
    # 커서 위치가 [결정] 이외의 경우
    else
      x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
      y = @index / 5 % 9 * 32
      self.cursor_rect.set(x, y, 28, 32)
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    # 커서 위치가 [결정] 의 경우
    if @index >= 180
      # 커서하
      if Input.trigger?(Input::DOWN)
        $game_system.se_play($data_system.cursor_se)
        @index -= 180
      end
      # 커서상
      if Input.repeat?(Input::UP)
        $game_system.se_play($data_system.cursor_se)
        @index -= 180 - 40
      end
    # 커서 위치가 [결정] 이외의 경우
    else
      # 방향 버튼의 오른쪽이 밀렸을 경우
      if Input.repeat?(Input::RIGHT)
        # 압하 상태가 리피트가 아닌 경우인가,
        # 커서 위치가 우단이 아닌 경우
        if Input.trigger?(Input::RIGHT) or
          @index / 45 < 3 or @index % 5 < 4
          # 커서를 오른쪽으로 이동
          $game_system.se_play($data_system.cursor_se)
          if @index % 5 < 4
            @index += 1
          else
            @index += 45 - 4
          end
          if @index >= 180
            @index -= 180
          end
        end
      end
      # 방향 버튼의 왼쪽이 밀렸을 경우
      if Input.repeat?(Input::LEFT)
        # 압하 상태가 리피트가 아닌 경우인가,
        # 커서 위치가 좌단이 아닌 경우
        if Input.trigger?(Input::LEFT) or
          @index / 45 > 0 or @index % 5 > 0
          # 커서를 왼쪽으로 이동
          $game_system.se_play($data_system.cursor_se)
          if @index % 5 > 0
            @index -= 1
          else
            @index -= 45 - 4
          end
          if @index < 0
            @index += 180
          end
        end
      end
      # 방향 버튼아래가 밀렸을 경우
      if Input.repeat?(Input::DOWN)
        # 커서를 아래에 이동
        $game_system.se_play($data_system.cursor_se)
        if @index % 45 < 40
          @index += 5
        else
          @index += 180 - 40
        end
      end
      # 방향 버튼 위가 밀렸을 경우
      if Input.repeat?(Input::UP)
        # 압하 상태가 리피트가 아닌 경우인가,
        # 커서 위치가 상단이 아닌 경우
        if Input.trigger?(Input::UP) or @index % 45 >= 5
          # 커서를 위에 이동
          $game_system.se_play($data_system.cursor_se)
          if @index % 45 >= 5
            @index -= 5
          else
            @index += 180
          end
        end
      end
      # L 버튼이나 R 버튼이 밀렸을 경우
      if Input.repeat?(Input::L) or Input.repeat?(Input::R)
        # 히라가나 / 카타카나 이동
        $game_system.se_play($data_system.cursor_se)
        if @index / 45 < 2
          @index += 90
        else
          @index -= 90
        end
      end
    end
    update_cursor_rect
  end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '2'
  • ?
    Krrrr7 2010.11.23 21:47

    에.. 히라가나 카타카나..?? 일본어..??

  • profile
    Tattoo 2011.01.26 04:42

    왜 오류나징  ㅜㅜ


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
761 상점 Mog- 상점업그레이드 ps인간 2009.01.23 2682
760 스킬 스킬 포인트를 올리자! 3 what더붥 2012.01.26 2680
759 이동 및 탈것 백호님이올린 발소리 스크립트를 소리만 바꾸어 밨음 4 lhh9606 2009.05.19 2676
758 미니맵 미니맵 스크랩트 + 예재 15 file WMN 2008.03.17 2674
757 기타 몬스터 도감 18 file 백호 2009.02.22 2667
756 기타 4방향 마우스 스크립트 12 file 아방스 2009.02.28 2662
755 저장 세이브파일 망가뜨리기 by RPG Advocate 3 백호 2009.02.22 2657
754 변수/스위치 셀프 스위치 조작 10 file 허걱 2009.01.30 2655
753 테두리 글자 & 그림자 글자 12 아방스 2008.09.19 2643
752 타이틀/게임오버 게..임..오버.. ps인간 2009.01.23 2636
751 전투 자동전투 from RPG 쯔꾸르 XP RGSS Wiki 1 file 백호 2009.02.22 2621
750 메뉴 각 메뉴를 호화롭게 하는 스크립트 3 file 백호 2009.02.21 2616
749 스킬 제한시간내 커맨드를 입력해야 스킬이 발동~ 3 file 백호 2009.02.22 2614
748 온라인 [멀티넷스크립 PvP 이벤트버전] / [넷플레이0.7.2]버전 3 file 백호 2009.02.22 2604
747 전투 데미지 폰트변경 7 카르닉스 2010.02.26 2600
746 메뉴 혹시있나해서-_-.. 대화창에 테두리치기 스크립트 7 백호 2009.02.22 2591
745 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
744 액터 (killer님 요청)자동회복 스크립트 3 나뚜루 2009.02.22 2572
743 메시지 윈도우즈 확장 file 백호 2009.02.21 2564
742 기타 [RGSS XP] 게임 해상도 조절 스크립트 (*2) 11 file Cheapmunk 2014.10.03 2561
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... 52 Next
/ 52