RPGXP 스크립트
2013.10.01 06:24

장비 레벨 제한

조회 수 903 추천 수 1 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

class Game_Actor
#================================================
#
#   ■ 레벨제한 무기&방어구 스크립트
#------------------------------------------------
#
#   Author: 준돌
#
#   Desc: 무기와 방어구에 간편한 방법으로
#            레벨제한을 구현합니다.
#
#   How to use: 아이템의 설명란에 [LV 제한레벨]을
#                     쓴다. (ex:강철의 검이다[lv13])
#
#   ※레벨적용을 안하면 자동으로 렙제는 0이 됩니다.
#
#================================================


  def equippable?(item)
   
    if item.is_a? (RPG::Weapon)
      if $data_classes[@class_id]. weapon_set.include? (item.id)
        if level  >= item_level(item)
          return true
        end
      end
    end
     
    if item.is_a? (RPG::Armor)
      if $data_classes[@class_id]. armor_set.include? (item.id)
        if level  >= item_level(item)
          return true
        end
      end
    end
    return false
   
  end

  def item_level(item)
    if item != nil
      text = item.description.dup
      text.gsub!(/[[Ll][Vv]([0-9]+)]/) do
        return $1.to_i
      end
    end
    return 0
  end
 
end
 
class Window_EquipItem < Window_Selectable

  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # 장비 가능한 무기를 추가
    if @equip_type == 0
      weapon_set = $data_classes[@actor.class_id]. weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include? (i)
          if @actor.equippable?($data_weapons[i])
            @data.push($data_weapons[i])
          end
        end
      end
    end
    # 장비 가능한 방어용 기구를 추가
    if @equip_type != 0
      armor_set = $data_classes[@actor.class_id]. armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include? (i)
          if $data_armors[i]. kind == @equip_type-1
            if @actor.equippable?($data_armors[i])
              @data.push($data_armors[i])
            end
          end
        end
      end
    end
    # 공백을 추가
    @data.push(nil)
    # 비트 맵을 작성해, 전항목을 묘화
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
  end
 
 
end

?
  • ?
    exam 2013.11.10 00:41
    잘 보고가여~
  • ?
    jeraru 2015.01.03 00:26
    이거 복붙하면
    윈도우 테이블?? 어쩌고 하면서 에러 뜨면서 게임 실행이 안대요

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
248 RPGMV 플러그인 Wav 파일 암호화 도구 - RMMV 1 file 러닝은빛 2016.11.30 1229 1
247 RPGMV 플러그인 텍스트 입력창(Keyboard Input Dialog) 1 file 러닝은빛 2016.08.09 1422 1
246 RPGMV 플러그인 Refresh Manager file 러닝은빛 2016.05.24 1382 1
245 RPGVX Ace 스크립트 Mog Hunter 스페셜 철창노틸 2015.03.26 762 1
244 RPGVX Ace 스크립트 추천 스크립트 모음 2 철창노틸 2015.03.26 5851 1
243 RPGXP 스크립트 컬러 비트맵 타이틀 스크립트 3  운 2015.01.20 852 1
242 RPGXP 스크립트 로고 스크립트 1  운 2014.12.10 1177 1
241 RPGXP 스크립트 액알 스크립트 4 커비♥ 2014.11.23 1440 1
240 RPGXP 스크립트 AraLab_MultiStartingPoint (다중 출발점 스크립트, 캐릭터 선택 스크립트) ver.0.2beta 3  운 2014.01.21 1973 1
239 RPGXP 스크립트 요청하신 게이지바 스크립트 입니다. 8 소년영남 2013.10.04 1919 1
» RPGXP 스크립트 장비 레벨 제한 2 2013.10.01 903 1
237 RPGXP 스크립트 안티 렉 스크립트 2 2013.09.26 3327 1
236 RPGXP 스크립트 정지 모션 스크립트 2 2013.09.26 713 1
235 RPGXP 스크립트 모든 글자에 외곽선을 넣어주는 스크립트 3 2013.09.26 808 1
234 RPGMV 플러그인 오렌지 - 타임 시스템 플러그인(Time system). (게임 시간시스템 관련) 4 plam 2015.11.07 946 1
233 RPGMV 플러그인 MKMV_SaveManager (심플 세이브 & 세이브 슬롯 확장) 2 file 최빛빛 2015.10.27 912 1
232 RPGMV 플러그인 현실 시간 변수 대입 플러그인 2 file 최빛빛 2015.10.26 603 1
231 RPGMV 플러그인 Ellye's Simple ATB (RPG Maker MV) 2 file 파란별빛 2015.10.24 1245 1
230 RPGMV 플러그인 이벤트 이름 표시하기 8 file 러닝은빛 2016.04.05 2093 1
229 RPGXP 스크립트 대화창에 얼굴 띄우기& 대화창 명령어 모음. 1 file 창조도시 2008.12.31 2820 1
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)