XP 스크립트

 헤메이다가 NRMC 에서 구했습니다

 여기 자료실에있는 것은 0.3 버전이던데 에러가 나더군요

 0.4 버전을 NRMC 강좌실에서 찾아서 적용시켜보니

 에러가 안뜹니다 제작자분께 정말 감사드립니다~~





#==============================================================================
# □ 커스터마이즈(customize) 포인트
#==============================================================================
class Window_Base
SYSTEM_WORD_EVA = "회피" # 「회피 수정」의 용어
end
#
# - Window_EquipLeft 클래스의
#  메소드 refresh, set_new_parameters를 재정의 하고 있습니다 -
#
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base
#----------------------- ---------------------------------------------------
# ● 파라미터의 묘화
#--------------------------------------------------------------------------
alias xrxs_mp1_draw_actor_parameter draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
case type
when 7
parameter_name = SYSTEM_WORD_EVA
parameter_value = actor.eva
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
return
end
xrxs_mp1_draw_actor_parameter(actor, x, y, type)
end
end
#==============================================================================
# ■ Window_EquipLeft
#==============================================================================
class Window_EquipLeft < Window_Base
#--------------------------------------------------------------------------
# ○공개 인스턴스 변수
#--------------------------------------------------------------------------
attr_accessor :eauipitem_index # 장비 아이템 윈도우의 커서 인덱스
#-------------------------------------------------------------- ------------
# ● 오브젝트 초기화
# actor : 엑터
#--------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor)
xrxs_mp1_initialize(actor)
self.height = 416
self.contents = Bitmap.new(width - 32, height - 32)
@eauipitem_index = -1
refresh
refresh2
end
#--------------------------------------------------------------------------
# ● 원기회복
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 32)
draw_actor_parameter(@actor, 4, 64, 0)
draw_actor_parameter(@actor, 4, 96, 1)
draw_actor_parameter(@actor, 4, 128, 2)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 64, 40, 32, "→", 1)
self.contents.font.color = @actor.atk < @new_atk ? system_color :
@actor.atk > @new_atk ? disabled_color :
normal_color
self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 96, 40, 32, "→", 1)
self.contents.font.color = @actor.pdef < @new_pdef ? system_color :
@actor.pdef > @new_pdef ? disabled_color : normal_color
self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "→", 1)
self.contents.font.color = @actor.mdef < @new_mdef ? system_color :
@actor.mdef > @new_mdef ? disabled_color :
normal_color
self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ○원기회복 2
#---- ----------------------------------------------------------------------
def refresh2
draw_actor_parameter(@actor, 4, 192, 3)
draw_actor_parameter(@actor, 4, 224, 4)
draw_actor_parameter(@actor, 4, 256, 5)
draw_actor_parameter(@actor, 4, 288, 6)
draw_actor_parameter(@actor, 4, 320, 7)
if @new_str != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 192, 40, 32, "→", 1)
self.contents.font.color = @actor.str < @new_str ? system_color :
@actor.str > @new_str ? disabled_color :
normal_color
self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
end
if @new_dex != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 224, 40, 32, "→", 1)
self.contents.font.color = @actor.dex < @new_dex ? system_color :
@actor.dex > @new_dex ? disabled_color :
normal_color
self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
end
if @new_agi != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 256, 40, 32, "→", 1)
self.contents.font.color = @actor.agi < @new_agi ? system_color :
@actor.agi > @new_agi ? disabled_color :
normal_color
self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
end
if @new_int != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 288, 40, 32, "→", 1)
self.contents.font.color = @actor.int < @new_int ? system_color :
@actor.int > @new_int ? disabled_color :
normal_color
self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
end
if @new_eva != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 320, 40, 32, "→", 1)
self.contents.font.color = @actor.eva < @new_eva ? system_color :
@actor.eva > @new_eva ? disabled_color :
normal_color
self.contents.draw_text(200, 320, 36, 32, @new_eva.to_s, 2)
end
#
# 값을 보존
#
@eauipitem_index_last = @eauipitem_index
end
#---------- ----------------------------------------------------------------
# ● 장비 변경 후의 파라미터 설정
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef)
if @eauipitem_index_last != @eauipitem_index
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
refresh
end
end
#--------------------------------------------------------------------------
# ○장비 변경 후의 파라미터 설정 2
#--------------------------------------------------------------------------
def set_new_parameters2(new_str, new_dex, new_agi, new_int, new_eva)
if @eauipitem_index_last != @eauipitem_index
@new_str = new_str
@new_agi = new_agi
@new_int = new_int
@new_dex = new_dex
@new_eva = new_eva
# 원기회복
refresh2
end
end
end

#============================ ==================================================
# ■ Window_EquipItem
#==============================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
#-- ------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor, equip_type)
xrxs_mp1_initialize(actor, equip_type)
self.x = 272
self.width = 368
self.contents = Bitmap.new(width - 32, height - 32)
@column_max = 1
refresh
end
end
#==============================================================================
# ■ Scene_Equip
#==============================================================================
class Scene_Equip
#------------------------------------------------------------- -------------
# ● 원기회복
#--------------------------------------------------------------------------
alias xrxs_mp1_refresh refresh
def refresh
# 현재 장비중의 아이템을 취득
item1 = @right_window.item
# 현재의 아이템 윈도우를 @item_window 에 설정
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
# 라이트 윈도우가 액티브의 경우
if @right_window.active
@left_window. eauipitem_index = -2
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
@left_window.eauipitem_index = @item_window.index
end
#
# 귀환시킨다
#
xrxs_mp1_refresh
#
#
#
# 라이트 윈도우가 액티브의 경우
if @right_window.active
# 장비 변경 후의 파라미터를 소거
@left_window.set_new_parameters2(nil, nil, nil, nil, nil)
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
# 현재 선택중의 아이템을 취득
item2 = @item_window.item
# 장비를 변경
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
# 장비 변경 후의 파라미터를 취득
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
new_eva = @actor.eva
# 장비를 돌린다
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# 레프트 윈도우에 묘화
@left_window.set_new_parameters2(new_str, new_dex, new_agi, new_int, new_eva)
end
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '3'
  • ?
    가리로루 2009.12.16 16:34

    감사합니다!!

    정말로고마움..

    이런걸원함 다른것도찾아야할탠데..

  • ?
    백개의검 2011.02.09 23:03

    감사합니다

  • ?
    생파 2012.02.23 17:58

    에러는 안뜨는데 스크립트 자체에 문제가있음.

    장비아이템 이미지 배치가 그대로여서, 이미지가 잘려서보임


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
821 온라인 온라인스크립트 99Q(NM=No Map)버전 5 백호 2009.02.22 3121
820 메뉴 온라인메뉴처럼!! 메이플 메뉴처럼!! 변신~스크립트 33 WMN 2008.03.17 6815
819 온라인 온라인 스크립트입니다^^(예제파일) 7 캉쿤 2011.09.24 4390
818 온라인 온라인 스크립트 Unis Net RMXP 공식 배포! 25 file 뮤바보 2011.12.25 9398
817 온라인 온라인 스크립트 KnM 배포합니다. 43 file 뮤바보 2011.09.23 5350
816 전투 오버드라이브 8 file 키라링 2009.01.23 2193
815 저장 오류 수정한 자동세이브 2 백호 2009.02.22 1403
814 이름입력 영어 이름 입력기 2 백호 2009.02.22 1335
813 상점 여관 시스템 5 file 백호 2009.02.22 2209
812 기타 엔딩후 캐릭터 이어서 새로운 게임시작 스크립트 1 file 백호 2009.02.21 1263
811 기타 엔딩에 스탭롤을 도입하는 스크립트 1 file 백호 2009.02.21 1335
810 전투 엑터, 에너미 개별적인 효과음 스크립트 1 백호 2009.02.21 1292
809 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 709
» 장비 에러 안나는 장비창 전능력 표시 스크립트... 3 백호 2009.02.21 2352
807 전투 에너미들도 게이지바 달고싶다~!! 14 file 백호 2009.02.21 4099
806 전투 에너미 HP·SP투시 11 file 백호 2009.02.21 3086
805 전투 에너미 HP&SP 표시 스크립트 2 file 백호 2009.02.21 2542
804 전투 에너미 HP&SP 스크립트 4 파이널판타지 2011.08.16 2901
803 기타 업데이트 (죽었을경우부활 )스크립트한글화 2 by향온 2011.09.27 2438
802 기타 어디에 쓰이는지 불확실한 스크립트 1 백호 2009.02.22 1063
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