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 6202
254 기타 [All RGSS] FileTest (Unicode) file Cheapmunk 2014.12.29 614
253 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 710
252 기타 Boat Script 백호 2009.02.21 729
251 기타 Localization by ForeverZer0, KK20 습작 2013.04.26 738
250 기타 Materia System file 백호 2009.02.21 749
249 기타 Real-Time Day Night 3 백호 2009.02.22 751
248 기타 killer님 요청하신 스크립트 두번째입니다. 나뚜루 2009.02.21 759
247 기타 Letter by Letter Message Window by slipknot@rmxp.org (SDK호환) 1 file 백호 2009.02.22 760
246 기타 Advanced Gold display by Dubealex 1 백호 2009.02.22 761
245 기타 Sphere Grid System file 백호 2009.02.21 765
244 기타 AMS-Advanced Message Script Edited by Dubleax 3 file 백호 2009.02.21 766
243 기타 Activation_system file 백호 2009.02.22 775
242 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
241 기타 Damage Reductions by SephirothSpawn (SDK호환) 1 백호 2009.02.22 779
240 기타 killer님 요청하신 스크립트입니다. 1 나뚜루 2009.02.21 784
239 기타 Selected phyolomortis.com scripts 1 file 백호 2009.02.22 789
238 기타 Hero Databass 4 file 백호 2009.02.22 797
237 기타 SG_Multiple Currencies v3 by sandgolem (SDK호환) 백호 2009.02.22 803
236 기타 SG_Call Script Fix by sandgolem (SDK호환) 백호 2009.02.22 804
235 기타 Weather Script 1.02 by ccoa 1 file 백호 2009.02.22 810
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13