VX 스크립트

메뉴
2009.02.20 11:44

CogWheelBars 시스템.

조회 수 4362 추천 수 1 댓글 13
Atachment
첨부 '1'

CogWheelBars.jpg
이런식으로 변경됩니다.
체력이 부족하면 빨간색 중간은 노르스름한. 풀이면 초록색.이렇게 나오죠.. 자주 쓰이는 시스템.
물론 저는 이거 안써요.^^;;  출처 : House Slasher


# ** COGWHEEL Style Menu Bars
#------------------------------------------------------------------------------
# by Syvkal
# Version 1.9
# 04-26-08
#==============================================================================
#
# USAGE:
#
# This system is Plug 'N' Play
# It has been made so it will work as soon as you put it in the Script Editor
#
# However, it has also been made so you can easily make your own bars
# To draw a bar use:
# draw_custom_gauge
#
# Followed by:
# (value, max, x, y, width, height, color1, color2, use_windowskin)
#
# Value - is the thing your bar is made to draw
# Max - is the max value of what your bar is made to draw
# x, y - are the x and y values
# width, height - are the width and height values
# use_windowskin - if set to true it will take the colours from the windowskin
# it is set to false if not specified
# Color1, Color2 - these are the two colours to be used for the gradient
# Specify with Color.new(r,g,b,a) to set a colour
# If use_windowskin is set, simply put the number of the
# colour you want to use from the windowskin
#
#==============================================================================

#=================================================#
# ** C O N F I G U R A T I O N ** #
#=================================================#

module COG
# Use built in RTP colors taken from the current system skin
USE_WINDOWSKIN = true
# Parameter Max Value
P_MAX = 500
# Gauge Border Colors
COLOR1 = Color.new(0, 0, 0, 192) # Outer Border
COLOR2 = Color.new(255, 255, 192, 192) # Inner Border
# Gauge Empty filler
COLOR3 = Color.new(0, 0, 0, 12) # Half of Inner Shading
COLOR4 = Color.new(64, 0, 0, 92) # Half of Inner Shading
end

#=================================================#

class Window_Base < Window
alias draw_actor_hp_gauge_original draw_actor_hp_gauge
def draw_actor_hp_gauge(actor, x, y, width = 120)
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
if actor.maxhp != 0
gw = width * actor.hp / actor.maxhp
else
gw = 0
end
gc1 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
gc2 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
self.contents.fill_rect(x-2, y + WLH - 10, width+4, 10, COG::COLOR1)
self.contents.fill_rect(x-1, y + WLH - 9, width+2, 8, COG::COLOR2)
self.contents.gradient_fill_rect(x, y + WLH - 8, width, 6, COG::COLOR3, COG::COLOR4)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
end

alias draw_actor_mp_gauge_original draw_actor_mp_gauge
def draw_actor_mp_gauge(actor, x, y, width = 120)
if actor.maxmp != 0
rate = actor.mp.to_f / [actor.maxmp, 1].max
else
rate = 1
end
if actor.maxmp != 0
gw = width * actor.mp / [actor.maxmp, 1].max
else
gw = width
end
gc1 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
gc2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
self.contents.fill_rect(x-2, y + WLH - 10, width+4, 10, COG::COLOR1)
self.contents.fill_rect(x-1, y + WLH - 9, width+2, 8, COG::COLOR2)
self.contents.gradient_fill_rect(x, y + WLH - 8, width, 6, COG::COLOR3, COG::COLOR4)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
end

alias draw_actor_parameter_original draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
draw_actor_parameter_gauge(actor, x, y, type)
draw_actor_parameter_original(actor, x, y, type)
end

def draw_actor_parameter_gauge(actor, x, y, type)
case type
when 0
e1 = actor.atk
COG::USE_WINDOWSKIN ? gc1 = text_color(20) : gc1 = Color.new(253, 53, 56, 192)
COG::USE_WINDOWSKIN ? gc2 = text_color(2) : gc2 = Color.new(242, 74, 6, 192)
when 1
e1 = actor.def
COG::USE_WINDOWSKIN ? gc1 = text_color(21) : gc1 = Color.new(238, 254, 124, 192)
COG::USE_WINDOWSKIN ? gc2 = text_color(17) : gc2 = Color.new(228, 253, 48, 192)
when 2
e1 = actor.spi
COG::USE_WINDOWSKIN ? gc1 = text_color(31) : gc1 = Color.new(119, 203, 254, 192)
COG::USE_WINDOWSKIN ? gc2 = text_color(30) : gc2 = Color.new(8, 160, 253, 192)
when 3
e1 = actor.agi
COG::USE_WINDOWSKIN ? gc1 = text_color(4) : gc1 = Color.new(124, 254, 155, 192)
COG::USE_WINDOWSKIN ? gc2 = text_color(12) : gc2 = Color.new(33, 253, 86, 192)
end
# Calculate Bar Gradiation
e2 = COG::P_MAX
if e1.to_f >= e2.to_f
rate = 1
elsif e1.to_f != 0
rate = e1.to_f / e2.to_f
else
rate = 1
end
# Adjust Bar Color based on Gradiation & Parameter Type
for i in 0..3
r = gc2.red * rate
g = (gc2.green - 72) * rate
b = gc2.blue * rate
a = gc2.alpha
end
# Calculate Bar Width
width = 168
if e1.to_f >= e2.to_f
par = width
elsif e1.to_f != 0
par = width * e1.to_f / e2.to_f
else
par = width
end
self.contents.fill_rect(x-2, y + WLH - 10, width+4, 10, COG::COLOR1)
self.contents.fill_rect(x-1, y + WLH - 9, width+2, 8, COG::COLOR2)
self.contents.gradient_fill_rect(x, y + WLH - 8, width, 6, COG::COLOR3, COG::COLOR4)
self.contents.gradient_fill_rect(x, y + WLH - 8, par, 6, Color.new(r, g, b, a), gc1)
end


def draw_custom_gauge(value, max, x, y, width, height, color1, color2, use_windowskin = false)
if value.to_f >= max.to_f
rate = 1
elsif value.to_f != 0
rate = value.to_f / max.to_f
else
rate = 1
end
use_windowskin ? gc1 = text_color(color1) : gc1 = color1
use_windowskin ? gc2 = text_color(color2) : gc2 = color2
r = gc2.red * rate
g = (gc2.green - 72) * rate
b = gc2.blue * rate
a = gc2.alpha
if value.to_f >= max.to_f
custom = width
elsif value.to_f != 0
custom = width * value.to_f / max.to_f
else
custom = width
end
self.contents.fill_rect(x-2, y + WLH - 10, width+4, height+4, COG::COLOR1)
self.contents.fill_rect(x-1, y + WLH - 9, width+2, height+2, COG::COLOR2)
self.contents.gradient_fill_rect(x, y + WLH - 8, width, height, COG::COLOR3, COG::COLOR4)
self.contents.gradient_fill_rect(x, y + WLH - 8, custom, height, gc1, Color.new(r, g, b, a))
end
end


class Window_SkillStatus < Window_Base
alias refresh_original refresh
def refresh
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 140, 0)
draw_actor_hp(@actor, 238, 0)
draw_actor_mp(@actor, 390, 0)
end
end

Comment '13'
  • ?
    나렌시아 2009.02.20 11:46
    스크립트를 안쓰심에도 불구하고 많은 스크립트를 구하시네요

    혹시 스크립트 수집가신가 ≡ㅅ≡ .. ??
  • ?
    할렘 2009.02.20 11:54
    뭐랄까...스크립터로써..아 이사람은 이렇게 짰구나..하면서 보는재미도 있고..흥미있는 스크립트를 모으기도 하는데...
    스크립트 수집가인가...흠...생각해보겠습니다.저의 자아에대해서..ㄷㄷ;;
  • ?
    닭장군 2009.04.07 17:57
    이거 괜찮네요 ㅎㅎ.
  • ?
    초록불빛 2009.05.24 18:29

    오옷 감사합니당~!

  • ?
    줄리안 2009.06.26 20:49

    파일이 없다고 나오는데 그 파일은 어디에...?

  • ?
    mymy 2009.11.14 19:32

    와우 굿인데요?ㄳㄳ

  • ?
    이렐 2010.02.20 22:54

    잘쓰겠습니다~~

  • profile
    Ravenwild 2010.07.08 13:53

    감사합니다!

  • ?
    ijsh515 2010.07.09 22:45

    와웅 감사요 ㅎㅎ

  • ?
    따메츠나 2010.07.25 18:00

    우옷 간지!! 잘쓰겠씁니다

  • ?
    따메츠나 2010.07.25 18:09

    아포인트 ㅜㅡ

  • ?
    봉시기 2010.07.26 05:13

    잘쓸께여

  • ?
    블랙로즈 2013.06.12 21:40
    잘 썼습니다. 좋아요. 아주 좋아요.

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
277 기타 [요청자료] 유즈미짱 님께서 요청한 그림표시 입니다. 5 file 허걱 2009.07.08 2976
276 메시지 [완성]RPG Maker VX용 한글 조사 자동결정 10 file 시릴캣 2009.08.13 4598
275 장비 [스크립트]무기에 옵션을 부가하자 18 아방이 2008.01.29 5380
274 변수/스위치 [무한응용가능]스위치/변수 저장/로딩 스크립트 7 카리스 2010.03.31 2854
273 전투 [덮어씌우기]Window_ActorCommand_EX 4 맛난호빵 2011.03.12 2341
272 기타 [XP / VX 공용] rand() 함수 확장 스크립트 4 허걱 2011.09.13 2362
271 직업 [VX] Blue Mage by Fomar0153 9 WMN 2008.04.06 2785
270 전투 [vx] ATB 시스템. 10 만들어보자꾸나 2008.07.05 4925
269 기타 [VX] Anti-Lag 1.2c by Anaryu[예제첨부] 3 file WMN 2008.04.06 2371
268 스킬 [ultimate series]스킬,아이템 데미지계산식을 자기입맛에 맞게 고치는 스크립트 16 file EuclidE 2010.05.04 4373
267 이름입력 [rpg vx]한글 스크립트(저번 것보단 업그레이드 된 것입니다.^^) 17 file 레시온 2008.03.28 4736
266 전투 [RPG VX]기술에 쿨타임을 부여하는 스크립트 3 스리아씨 2013.12.05 2348
265 스킬 [RPG VX] 턴알 스킬 쿨타임 스크립트! (잘돌아감) 5 듀란테 2015.08.18 1671
264 타이틀/게임오버 [NO.0 간단 스크립트] 타이틀에 제작자 정보 올려보기 14 file NO.0 2011.01.30 3362
263 기타 [KGC]한계돌파 9 방콕족의생활 2008.06.13 3599
262 기타 [kcg] 슬립 데미지 상세화 19 BoneheadedAlien 2009.02.22 3242
261 HUD Zelda Health System 11 file 비극ㆍ 2010.04.18 2850
260 스킬 YERD - 커스텀 스킬 이펙트 13 file 훈덕 2009.11.08 4080
259 상점 YERD - 커먼이벤트 샵 12 file 훈덕 2009.11.08 3961
258 메뉴 YERD - 커먼 이벤트 메뉴 4 file 훈덕 2009.11.08 3849
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