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 7316
174 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1397
173 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1187
172 기타 Sized Events 0.1 by Toby@rmxp.org file 백호 2009.02.22 856
171 기타 Sphere Grid System file 백호 2009.02.21 786
170 기타 Steal Script (SDK Required) file 백호 2009.02.21 1191
169 기타 Tax Script 1.2 by The Darklord@rmxp.org 2 file 백호 2009.02.22 1149
168 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 792
167 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 997
166 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 950
165 기타 Text to RGSS by DerVVulfman Alkaid 2011.04.18 1334
164 기타 The General Monster Generator 1.1 by DerVVulfman 1 file Alkaid 2011.03.02 1510
163 기타 Trailing Characters ver.1 by SephirothSpawn 6 file 백호 2009.02.22 1564
162 기타 Upload & Download files with RGSS 2.1 by berka (XP/VX 공용) 5 Alkaid 2010.11.20 2150
161 기타 Weather Script 1.02 by ccoa 1 file 백호 2009.02.22 826
160 기타 XP 각종 스크립트입니다. 36 file 쿠도신이치 2009.04.26 4295
159 기타 [All RGSS] File-Ex file Cheapmunk 2014.12.29 1011
158 기타 [All RGSS] FileTest (Unicode) file Cheapmunk 2014.12.29 659
157 기타 [All RGSS] 게임 다중 실행 방지 스크립트 1 file Cheapmunk 2014.05.24 1425
156 기타 [All RGSS] 윈도우 메세지박스 스크립트 (Completed ver) 5 file Cheapmunk 2014.06.22 2245
155 기타 [All RGSS] 윈도우 커서 숨기기/보이기 1 file Cheapmunk 2014.03.02 2019
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13