VX 스크립트

스크립트입니다.

 

# 장비에 레벨제한 걸기
#
# 사용법
# 레벨 제한을 걸고싶은 무기의 메모부분에
# 레벨nn
# 이라고 기입하면됨
# 반드시 두자리의 숫자로 적어줘야 합니다.

class Game_Actor < Game_Battler
 
  def equippable?(item)
    $last_equip_actor = actor.id
    if item.is_a?(RPG::Weapon)
      return self.class.weapon_set.include?(item.id)
    elsif item.is_a?(RPG::Armor)
      return false if two_swords_style and item.kind == 0
      return self.class.armor_set.include?(item.id)
    end
    return false
  end
 
end

class Window_EquipItem < Window_Item
 
 def enable?(item)
  for i in 0 ... item.note.size
    if item.note[i]==235 and  item.note[i+1]==160 and item.note[i+2]==136
      if item.note[i+3]==235 and item.note[i+4]==178 and item.note[i+5]==168
        item_level = ( ( item.note[i+6] - 48 ) * 10 ) + ( item.note[i+7] - 48 )
        if item_level > $game_actors[$last_equip_actor].level
          return false
        else
        end
      else
      end
    else
    end
  end    
  return true
 end

end

class Scene_Equip < Scene_Base
 
  def update_item_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @equip_window.active = true
      @item_window.active = false
      @item_window.index = -1
    elsif Input.trigger?(Input::C)
      item = @item_window.item
      item_equip = true
      if item != nil
      for i in 0 ... item.note.size
    if item.note[i]==235 and  item.note[i+1]==160 and item.note[i+2]==136
      if item.note[i+3]==235 and item.note[i+4]==178 and item.note[i+5]==168
        item_level = ( ( item.note[i+6] - 48 ) * 10 ) + ( item.note[i+7] - 48 )
        if item_level > $game_actors[$last_equip_actor].level
          item_equip = false
        else
        end
      else
      end
    else
    end
    end
  else
  end
 
      if item_equip == true
      Sound.play_equip
      @actor.change_equip(@equip_window.index, @item_window.item)
      @equip_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @equip_window.refresh
      for item_window in @item_windows
        item_window.refresh
      end
    else
      Sound.play_cancel
      end
    end
  end
end

 

사용시에는  장비밑에 메모 칸에

레벨nn 반드시 두자리로 써주세요.

쓰지않을경우 레벨0때부터 낄수있습니다.

Comment '21'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
137 메시지 여러항목 선택지 ... Scene처리.. 23 file 허걱 2009.02.14 5277
136 영어 잘하는 사람만 보세요..저도 모르겠음(무슨 스크립트인지) 3 Man... 2008.10.27 1372
135 퀘스트 오메가7 퀘스트 스크립트 한글화,사용법,데모게임 직접제작 32 file DH Games 2010.02.14 4578
134 오버 드라이브 8/24 버젼 20 file RPGbooster 2008.10.11 2904
133 전투 오버 드라이브 프로블럼 2 Man... 2008.10.28 2268
132 저장 오토세이브 VX 5 file 카르와푸딩의아틀리에 2009.10.05 4138
131 온라인 온라인입니다 4 file 알피지GM 2010.03.07 6358
130 기타 요리 시스템을 도입하는 스크립트입니다. 9 file 스페나로츠 2011.08.18 3145
129 움직이는커서 11 file RPGbooster 2008.10.08 5090
128 원경 원경(파노라마) 바꾸기 9 file 허걱 2010.05.28 3369
127 맵/타일 월드맵 스크립트 49 아방스 2008.09.07 6123
126 웨이포인트 9 file RPGbooster 2008.10.08 3415
125 메뉴 윈도우 색변경 스크립트 7 file 비극ㆍ 2010.03.01 2598
124 메뉴 윈도우창 크기 조절 스크립트 0.3 5 아방스 2008.01.30 3038
123 이동 및 탈것 이동 기능 파워업 (장애물 등을 피하는 이동방식) 8 file 파노 2014.04.27 1716
122 이동속도의 한계를 없앤다 11 file RPGbooster 2008.10.08 2815
121 기타 이벤트 뿌리기 + 범위지정 8 file 허걱 2009.07.13 2698
120 기타 이벤트 상세효과 9 file 사람이라면? 2010.08.15 2801
119 기타 이벤트 위치 저장 스크립트 10 Tofuman 2008.12.11 2096
118 기타 이벤트 제작용 소품 모음 스크립트 12 시트르산 2010.09.10 2209
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32