VX 스크립트

스크립트입니다.

 

# 장비에 레벨제한 걸기
#
# 사용법
# 레벨 제한을 걸고싶은 무기의 메모부분에
# 레벨nn
# 이라고 기입하면됨
# 반드시 두자리의 숫자로 적어줘야 합니다.

class Game_Actor < Game_Battler
 
  def equippable?(item)
    $last_equip_actor = actor.id
    if item.is_a?(RPG::Weapon)
      return self.class.weapon_set.include?(item.id)
    elsif item.is_a?(RPG::Armor)
      return false if two_swords_style and item.kind == 0
      return self.class.armor_set.include?(item.id)
    end
    return false
  end
 
end

class Window_EquipItem < Window_Item
 
 def enable?(item)
  for i in 0 ... item.note.size
    if item.note[i]==235 and  item.note[i+1]==160 and item.note[i+2]==136
      if item.note[i+3]==235 and item.note[i+4]==178 and item.note[i+5]==168
        item_level = ( ( item.note[i+6] - 48 ) * 10 ) + ( item.note[i+7] - 48 )
        if item_level > $game_actors[$last_equip_actor].level
          return false
        else
        end
      else
      end
    else
    end
  end    
  return true
 end

end

class Scene_Equip < Scene_Base
 
  def update_item_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @equip_window.active = true
      @item_window.active = false
      @item_window.index = -1
    elsif Input.trigger?(Input::C)
      item = @item_window.item
      item_equip = true
      if item != nil
      for i in 0 ... item.note.size
    if item.note[i]==235 and  item.note[i+1]==160 and item.note[i+2]==136
      if item.note[i+3]==235 and item.note[i+4]==178 and item.note[i+5]==168
        item_level = ( ( item.note[i+6] - 48 ) * 10 ) + ( item.note[i+7] - 48 )
        if item_level > $game_actors[$last_equip_actor].level
          item_equip = false
        else
        end
      else
      end
    else
    end
    end
  else
  end
 
      if item_equip == true
      Sound.play_equip
      @actor.change_equip(@equip_window.index, @item_window.item)
      @equip_window.active = true
      @item_window.active = false
      @item_window.index = -1
      @equip_window.refresh
      for item_window in @item_windows
        item_window.refresh
      end
    else
      Sound.play_cancel
      end
    end
  end
end

 

사용시에는  장비밑에 메모 칸에

레벨nn 반드시 두자리로 써주세요.

쓰지않을경우 레벨0때부터 낄수있습니다.

Comment '21'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
277 타이틀/게임오버 륀느님 요청] 전투 전멸후 Game over없이 특정위치로 이동 10 Last H 2009.02.24 2834
276 스킬 미완성 구버전. 2칸 위에 있는 글을 이용해주세요. 7 Last H 2009.02.23 1925
275 기타 [kcg] 슬립 데미지 상세화 19 BoneheadedAlien 2009.02.22 3242
274 기타 아키루냥님 요청 스크립트(자작) 4 file Last H 2009.02.22 2754
273 영상 동영상 재생 스크립트.-Game_Film II-(테스트) 7 할렘 2009.02.22 3741
272 기타 태양 스크립트. 15 file 할렘 2009.02.20 4463
271 메뉴 CogWheelBars 시스템. 13 file 할렘 2009.02.20 4362
270 메뉴 모그메뉴 스킨입니다. 1 file 아부리 2009.02.16 6866
269 기타 Kylock 밤낮 스크립트 부분 한글화 + 달력 모드 (모드는 자작) 31 file RMdude 2009.02.15 4100
268 HUD 변수 표시 HUD 8 Tofuman 2009.02.15 2469
267 메시지 여러항목 선택지 ... Scene처리.. 23 file 허걱 2009.02.14 5277
266 기타 게임시간&밤낮 54 file 허걱 2009.02.14 6111
265 이동 및 탈것 Wachunga님의 XP용 MapLink VX용으로 개조 6 file 허걱 2009.02.13 3040
264 기타 심플 마우스 시스템 1.5 애드온 11 file RMdude 2009.02.11 4325
263 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
262 기타 데이터베이스 자체 제한 해체 스크립트 [Database Limit Breaker] 13 file 할렘 2009.02.07 3562
261 메뉴 GuiRPG menu시스템 13 file 할렘 2009.02.07 4849
260 전투 방패가없어? 그럼 방어못하게하는 스크립트. 16 file 할렘 2009.02.07 3425
259 전투 Requiem SBABS (Requiem Squad Based Battle System) 14 vk 2009.02.07 7542
258 기타 라이트 이펙트 스크립트 12 file 아방스 2009.02.07 3262
Board Pagination Prev 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ... 32 Next
/ 32