#=======================================================================
# ● [VX] ◦ On-Screen Shop ◦ □
#-------------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 14/05/2008
# ◦ Version: 1.0
#=======================================================================
class Scene_Shop < Scene_Base
USE_SPRITESET = true
# Do you want to use real map as background? (tile will animate)
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
alias wora_sceshop_str_oshop start
def start
wora_sceshop_str_oshop
@spriteset = Spriteset_Map.new if USE_SPRITESET
@gold_window.x = Graphics.width - @gold_window.width - 24
@gold_window.y = Graphics.height - @gold_window.height - 24
@buy_window.x = @sell_window.x = 0
@number_window.x = 0
@dummy_window.y = @help_window.height
@buy_window.y = @sell_window.y = @help_window.height
@number_window.y = @status_window.y = @help_window.height
@buy_window.height = @sell_window.height = 200
@number_window.height = @status_window.height = 200
@dummy_window.y = Graphics.height
@status_window.create_contents
@help_window.visible = false
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias wora_sceshop_ter_oshop terminate
def terminate
wora_sceshop_ter_oshop
@spriteset.dispose if USE_SPRITESET
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias wora_sceshop_upd_oshop update
def update
wora_sceshop_upd_oshop
if @command_window.active
@help_window.visible = false
elsif @buy_window.active
@help_window.visible = @buy_window.visible
elsif @sell_window.active
@help_window.visible = @sell_window.visible
end
@spriteset.update if USE_SPRITESET
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::ShopBuy
s2 = Vocab::ShopSell
s3 = Vocab::ShopCancel
@command_window = Window_Command.new(120, [s1, s2, s3])
@command_window.y = Graphics.height - @command_window.height - 24
@command_window.x = 24
if $game_temp.shop_purchase_only
@command_window.draw_item(1, false)
end
end
end
class Window_ShopNumber < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
y = 64
self.contents.clear
draw_item_name(@item, 0, y)
self.contents.font.color = normal_color
self.contents.draw_text(212, y, 20, WLH, "×")
self.contents.draw_text(248, y, 20, WLH, @number, 2)
self.cursor_rect.set(244, y, 28, WLH)
draw_currency_value(@price * @number, 4, y + WLH * 2, 264)
end
end
class Window_ShopStatus < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if @item != nil
number = $game_party.item_number(@item)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, WLH, Vocab::Possession)
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 200, WLH, number, 2)
for actor in $game_party.members
x = 4
y = WLH * (2 + actor.index)
draw_actor_parameter_change(actor, x, y)
end
end
end
#--------------------------------------------------------------------------
# * Draw Actor's Current Equipment and Parameters
#--------------------------------------------------------------------------
def draw_actor_parameter_change(actor, x, y)
return if @item.is_a?(RPG::Item)
enabled = actor.equippable?(@item)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x, y, 200, WLH, actor.name)
if @item.is_a?(RPG::Weapon)
item1 = weaker_weapon(actor)
elsif actor.two_swords_style and @item.kind == 0
item1 = nil
else
item1 = actor.equips[1 + @item.kind]
end
if enabled
if @item.is_a?(RPG::Weapon)
atk1 = item1 == nil ? 0 : item1.atk
atk2 = @item == nil ? 0 : @item.atk
change = atk2 - atk1
else
def1 = item1 == nil ? 0 : item1.def
def2 = @item == nil ? 0 : @item.def
change = def2 - def1
end
if change > 0 # If increase status
elsif change < 0 # If decrease status
self.contents.font.color.alpha = 128
else # if not change status
self.contents.font.color.alpha = 128
end
self.contents.draw_text(x, y, 200, WLH, sprintf("%+d", change), 2)
end
end
end
상점
2009.02.02 18:07
상점을 색다르게 바꿔주는 스크립트
조회 수 6403 추천 수 0 댓글 34
| 첨부 '1' |
|---|
Comment '34'
-
?
색다르게 라는말에 너무 큰 기대를 하고 들어오신분들께 사과드립니다. ㄷㄷ;;
.gif)
-
?
히히히히히히히히힣 큰기대를 했어요
그래두 좋네요 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ -
?
레시피 요리스크립트랑 같이 하면 충돌하려나...
-
?
전 모험을 즐기는 타입이 아니라서.... 한번 모험을 해보시는것도.. ㄷㄷ;; 죄송합니다.
-
?
답답해지는 느낌없이 좋네요 ^^
-
?
심플하고 좋네요!
-
?
좋네요~!
-
?
잘쓸게요
-
?
큰... 기대를 했긴 했는데 쓸만 하네요^^
-
?
잘받아갑니다
-
?
-
?
안되~!
-
?
하핳 한글로 수정해야하는듯 싶군요
-
?
공부가 제일 쉬웠어요...응?!
-
?
ㄳ
-
?
감사합니다. ㅎㅎ
-
?
감사합니다!!
-
?
오~ 심플하당
-
?
멋지다.. 잘쓰겠습니다~
-
?
한글수정,,,.?
-
?
ㄳ
-
심플하고 좋네요 잘쓰겠습니다 ㅇㅂㅇ
-
잘 쓰겠습니다.
-
?
잘쓰겠습니다~
-
?
잘쓸께여
-
?
여...영어......라능;;
-
?
고맙습니다 ^^ 한글입니다 전투머신님.
-
ㄳㄳ
-
?
멋지다 ㅋㅋ
-
?
왠지 스킬샵 스크립트랑 같이 사용하면 오류나올것 같아서 포기
-
?
잘쓰겠습니다~
-
?
감사드립니다
-
?
감사합니다!!!!
-
?
감사합니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|---|
| 공지 | 스크립트 자료 게시물 작성시 주의사항 3 | 습작 | 2012.12.24 | 9266 | |
| 637 | 기타 | 게임 해상도를 조절 하는 스크립트 19 | 아방스 | 2008.01.21 | 4862 |
| 636 | 전투 | 방어를 했을경우 hp / mp 회복 되도록 하는 스크립트 15 | 아방스 | 2008.01.22 | 3841 |
| 635 | 전투 |
전투배경을 자신이 원하는 형태로
45 |
아방스 | 2008.01.23 | 7218 |
| 634 | 전투 |
전투 배경을 이미지로 설정하는 스크립트
20 |
아방스 | 2008.01.23 | 4993 |
| 633 | 이동 및 탈것 |
동료가 따라다니게 하는 스크립트
59 |
아방스 | 2008.01.23 | 6595 |
| 632 | 메시지 | 문장 넘길대 소리나게 하는스크립트 19 | 아방스 | 2008.01.24 | 4294 |
| 631 | 전투 | 맨손 공격시 2번공격하는 스크립트 5 | 아방스 | 2008.01.24 | 2465 |
| 630 | 타이틀/게임오버 | RPG VX - 타이틀 스크린 스크립트 23 | 아방스 | 2008.01.24 | 5828 |
| 629 | 메뉴 | 메뉴변경 스크립트 34 | 아방스 | 2008.01.24 | 8047 |
| 628 | 이동 및 탈것 |
달릴때 그래픽을 바꿔주는 스크립트
12 |
아방스 | 2008.01.24 | 4194 |
| 627 | 전투 |
전투시 메시지 표시 시간 조절
7 |
아방스 | 2008.01.24 | 2906 |
| 626 | 전투 | Target 몬스터 플래시 스크립트 16 | 아방스 | 2008.01.24 | 4597 |
| 625 | 메뉴 | rpg 만들기 vx 정보창에 조금더 자세한 정보가 나오게 하는 스크립트 28 | 아방스 | 2008.01.25 | 5171 |
| 624 | 전투 | VX에서 전투배경을 XP스타일로 나오게 하는 스크립트 7 | 아방스 | 2008.01.25 | 4929 |
| 623 | HUD | rpg 만들기 vx - 맵이름 띠우는 스크립트 ^^ 74 | 아방스 | 2008.01.27 | 12139 |
| 622 | 그래픽 | RPG XP의 Transitions효과를 VX에도 적용을 해보자 4 | 아방스 | 2008.01.27 | 4033 |
| 621 | 장비 | [스크립트]무기에 옵션을 부가하자 18 | 아방이 | 2008.01.29 | 5456 |
| 620 | 변수/스위치 | 특정 키눌러서 스위치 온 시키는 스크립트 7 | 아방이 | 2008.01.30 | 2745 |
| 619 | 맵/타일 |
◆ 타일 세트 확장 스크립트 [업데이트 수정]
24 |
아방이 | 2008.01.30 | 4479 |
| 618 | 메뉴 | 윈도우창 크기 조절 스크립트 0.3 5 | 아방스 | 2008.01.30 | 3110 |