XP 스크립트

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

TAG •

Who's 벨☆

?

 

연탄재 함부로 발로 차지 마라. 너는 한번이라도 누구에게 뜨거운 사람이었느냐

 

죄는 취소될수없다 용서될뿐이다.

Comment '7'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
1021 액터 (killer님 요청)자동회복 스크립트 3 나뚜루 2009.02.22 2572
1020 기타 (T-RPG) 데미지 표시 시의 폰트를 설정 백호 2009.02.22 1348
1019 메뉴 1-Scene CMS 1.03 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 871
1018 메뉴 1-Scene CMS 1.1 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 953
1017 메뉴 1-Scene CMS 1.16 by LegACy (SDK호환) 3 file 백호 2009.02.22 1564
1016 메시지 1문자식 표시랑 따랑소리 나는 스크립트 8 백호 2009.02.22 2305
1015 메뉴 1인 캐릭터 메뉴 스크립트 27 file - 하늘 - 2009.08.06 4790
1014 메뉴 1인용 메뉴 스크립트 6 WMN 2008.03.17 2450
1013 메뉴 3D Menu Script 7 현문 2010.10.06 4077
1012 기타 3d 렌더링스크립트 어렵게 찾음 9 라구나 2011.03.05 3610
1011 이동 및 탈것 3D 캐릭 스크립트 7 백호 2009.02.22 3443
1010 기타 3D스크립트 48 file ok하승헌 2010.02.18 3808
1009 기타 4방향 마우스 스크립트 12 file 아방스 2009.02.28 2662
1008 기타 8방향 마우스 스크립트 10 file 아방스 2009.02.28 4063
1007 이동 및 탈것 8방향 스크립트 12 file 백호 2009.02.21 2412
1006 이동 및 탈것 8방향 이동 & 대쉬 스크립트 5 백호 2009.02.21 1703
1005 이동 및 탈것 8방향움직임과 8방향 캐릭터칩 호환 2 file 백호 2009.02.21 2274
1004 이동 및 탈것 8방향이동 9 캉쿤 2011.09.19 2529
1003 이동 및 탈것 8방향이동, Shift키 누르면 대쉬 63 WinHouse 2010.06.12 4025
1002 전투 A-battle 수정 file 백호 2009.02.21 1155
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