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 6203
541 전투 RTAB 1.15와 애드온 from 歯車の城 4 file 백호 2009.02.22 1186
540 이동 및 탈것 Advanced Player Movement by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 801
539 스킬 Equipment Skills 2.0 by SephirothSpawn file 백호 2009.02.22 1007
538 기타 Letter by Letter Message Window by slipknot@rmxp.org (SDK호환) 1 file 백호 2009.02.22 760
537 상점 간단한 여관 by Tsunokiette@Creation Asylum 2 백호 2009.02.22 1530
536 온라인 멀티넷플레이 99Q Beta 3 27 백호 2009.02.22 3107
535 기타 KGC, SG 필수 스크립트 1 백호 2009.02.22 1110
534 전투 [신기술 체험] 강회된 횡스크롤 액알 13 file 백호 2009.02.22 6841
533 저장 [신기술 체험] 데이터 저장 6 file 백호 2009.02.22 1421
532 전투 Real Time Active Battle(RTAB) 1.14 from 歯車の城 3 file 백호 2009.02.22 1315
531 메뉴 1-Scene CMS 1.1 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 953
530 메뉴 제가추천하는 메뉴스크립트 11 file 백호 2009.02.22 5299
529 전투 FFX, X-2, FFXII 식으로 대미지 표시하기 by squall@rmxp.org 백호 2009.02.22 1115
528 전투 레벨업시 능력치 표시 2 백호 2009.02.22 1621
527 아이템 SG_Escape Only Items by sandgolem (SDK호환) 백호 2009.02.22 850
526 스킬 SG_Escape Only Skills by sandgolem (SDK호환) 백호 2009.02.22 753
525 저장 [KGC]_2PaneSave 스크립트 1 file 백호 2009.02.22 1655
524 저장 [KGC] 스크립트 저장된 리셋 불어오기 [스샷첨부] 1 file 백호 2009.02.22 1052
523 스킬 [KGC] 스킬습득 아이템 2 백호 2009.02.22 1290
522 이동 및 탈것 Memorize Location R2 by dubealex file 백호 2009.02.22 846
Board Pagination Prev 1 ... 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ... 52 Next
/ 52