Últimos temas
» Script de menupor maxi Jue 04 Dic 2014, 1:44 pm
» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm
» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am
» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am
» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm
» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm
» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am
» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am
» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am
» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am
» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am
» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm
» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am
» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am
» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado Ninguno
El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm
Script menu de anillo
+4
Bluro
migan012
kevin098098
TigreX
8 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
Script menu de anillo
Menu de anillo
Bueno les traigo este script para vx que es un menu estilo anillo ya que el otro se rompio el link
Screen:
Imagenes necesarias:(Graphics/Picture)
Este es el primer script:
Cualquier duda diganme
Bueno les traigo este script para vx que es un menu estilo anillo ya que el otro se rompio el link
Screen:
- Spoiler:
Imagenes necesarias:(Graphics/Picture)
- Spoiler:
Este es el primer script:
- Código:
#==============================================================================
# ** Ring Menu
#-------------------------------------------------------------------------------
# by Syvkal
# Version 1.1
# 06-23-08
#==============================================================================
#===================================================#
# ** C O N F I G U R A T I O N S Y S T E M ** #
#===================================================#
# Amount of frames for Startup Animation
STARTUP_FRAMES = 20
# Amount of frames for Movement Animation
MOVING_FRAMES = 15
# Radius of the Menu Ring
RING_R = 75
# Disabled icon to display when disabled
ICON_DISABLE= Cache::picture('Icon_Disable')
#-------------D-O---N-O-T---T-O-U-C-H---------------#
class Scene_Title < Scene_Base
alias game_objects_original create_game_objects
def create_game_objects
game_objects_original
#-------------D-O---N-O-T---T-O-U-C-H---------------#
# As this script allows you to make a custom Menu I thought to make it easier
# I would make it possible to add extra Menu Options from here
# All you need to do is specify the Text to display, the icon and the command
# The command must be in a STRING
# Simply add to the array below :
$game_ring_menu = [
# Menu Option 0 eg. Item
[Vocab::item, Cache::picture('Icon_Items'), "$scene = Scene_Item.new"],
# Menu Option 1 eg. Skill
[Vocab::skill, Cache::picture('Icon_Skills'), "start_actor_selection",
"$scene = Scene_Skill.new(@status_window.index)"],
# Menu Option 2 eg. Equip
[Vocab::equip, Cache::picture('Icon_Equip'), "start_actor_selection",
"$scene = Scene_Equip.new(@status_window.index)"],
# Menu Option 3 eg. Status
[Vocab::status, Cache::picture('Icon_Status'), "start_actor_selection",
"$scene = Scene_Status.new(@status_window.index)"],
#---------------------------------------------------#
# ** I N S E R T M O R E H E R E ** #
#---------------------------------------------------#
# Preferably Insert your custom Menu Options Here
# Otherwise the existing Menu Options will return to wrong point on the Menu
# Menu Option 4 eg. Save
["Save Game", Cache::picture('Icon_Save'), "$scene = Scene_File.new(true, false, false)"],
# Menu Option 5 eg. Load
["Load Game", Cache::picture('Icon_Load'), "$scene = Scene_File.new(false, false, false)"],
# Menu Option 6 eg. End Game
[Vocab::game_end, Cache::picture('Icon_End'), "$scene = Scene_End.new"]
] # <--- Do no Delete This
#===================================================#
# ** E N D C O N F I G U R A T I O N ** #
#===================================================#
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# Edited to add Ring Menu
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias initialize_original initialize
alias start_selection_original start_actor_selection
alias end_selection_original end_actor_selection
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(menu_index = 0, move = true)
@move = move
initialize_original(menu_index)
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@location_window = Window_location.new(0, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose if @status_window
@location_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update if @status_window
@location_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
commands = []
for i in 0...$game_ring_menu.size
commands.push($game_ring_menu[i][0])
end
icons = []
for i in 0...$game_ring_menu.size
icons.push($game_ring_menu[i][1])
end
@command_window = Window_RingMenu.new(232, 164, commands, icons, @move, @menu_index)
if $game_party.members.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_status_window
names = []
chars = []
for i in 0...$game_party.members.size
names[i] = $game_party.members[i].name
chars[i] = $game_party.members[i]
end
@status_window = Window_RingMenu.new(255, 200, names, chars, true, $game_party.last_actor_index, true)
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
eval($game_ring_menu[@command_window.index][2])
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@command_window.visible = false
create_status_window
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@command_window.visible = true
@status_window.dispose if @status_window
@status_window = nil
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
eval($game_ring_menu[@command_window.index][3])
end
end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# Edited to return to the menu properly when loading
#==============================================================================
class Scene_File
alias return_scene_original return_scene
def return_scene
if @from_title
$scene = Scene_Title.new
elsif @from_event
$scene = Scene_Map.new
else
if @saving
$scene = Scene_Menu.new($game_ring_menu.size - 3)
else
$scene = Scene_Menu.new($game_ring_menu.size - 2)
end
end
end
end
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
# Edited to return to the menu properly due to loading being added
#==============================================================================
class Scene_End
alias return_scene_original return_scene
def return_scene
$scene = Scene_Menu.new($game_ring_menu.size - 1)
end
end
#==============================================================================
# ** Window_Location
#------------------------------------------------------------------------------
# This class shows the current map name.
#==============================================================================
class Window_location < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, (WLH*2) + 32)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
$maps = load_data("Data/MapInfos.rvdata")
@map_id = $game_map.map_id
@currmap = $maps[@map_id].name
self.contents.font.color = system_color
self.contents.draw_text(0, -4, 128, 32, "Location :")
self.contents.font.color = normal_color
self.contents.draw_text(0, -4+WLH, 128, 32, @currmap, 1)
end
end
#==============================================================================
# ** Window_RingMenu
#------------------------------------------------------------------------------
# This Window creates a Ring Menu system
#==============================================================================
class Window_RingMenu < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :index
attr_reader :item_max
#--------------------------------------------------------------------------
# * Refresh Setup
#--------------------------------------------------------------------------
START = 1
WAIT = 2
MOVER = 3
MOVEL = 4
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(center_x, center_y, commands, items, move = true, index = 0, character = false)
super(0, 0, 544, 416)
self.contents = Bitmap.new(width-32, height-32)
self.opacity = 0
@move = move
@char = character
@startup = STARTUP_FRAMES
@commands = commands
@item_max = commands.size
@index = index
@items = items
@disabled = []
for i in 0...commands.size-1
@disabled[i] = false
end
@cx = center_x
@cy = center_y
start_setup
refresh
end
#--------------------------------------------------------------------------
# * Start Setup
#--------------------------------------------------------------------------
def start_setup
@mode = START
@steps = @startup
end
#--------------------------------------------------------------------------
# * Disable index
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
@disabled[index] = true
end
#--------------------------------------------------------------------------
# * Determines if is moving
#--------------------------------------------------------------------------
def animation?
return @mode != WAIT
end
#--------------------------------------------------------------------------
# * Determine if cursor is moveable
#--------------------------------------------------------------------------
def cursor_movable?
return false if (not visible or not active)
return false if (@opening or @closing)
return false if animation?
return true
end
#--------------------------------------------------------------------------
# * Move cursor right
#--------------------------------------------------------------------------
def cursor_right
@index -= 1
@index = @items.size - 1 if @index < 0
@mode = MOVER
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# * Move cursor left
#--------------------------------------------------------------------------
def cursor_left
@index += 1
@index = 0 if @index >= @items.size
@mode = MOVEL
@steps = MOVING_FRAMES
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if self.active
if cursor_movable?
last_index = @index
if Input.repeat?(Input::DOWN) or Input.repeat?(Input::RIGHT)
cursor_right
end
if Input.repeat?(Input::UP) or Input.repeat?(Input::LEFT)
cursor_left
end
if @index != last_index
Sound.play_cursor
end
end
refresh
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
case @mode
when START
refresh_start
when WAIT
refresh_wait
when MOVER
refresh_move(1)
when MOVEL
refresh_move(0)
end
rect = Rect.new(18, 196, self.contents.width-32, 32)
self.contents.draw_text(rect, @commands[@index], 1)
end
#--------------------------------------------------------------------------
# * Refresh Start Period
#--------------------------------------------------------------------------
def refresh_start
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / @startup
for i in 0...@item_max
j = i - @index
if @move
r = RING_R - 1.0 * RING_R * @steps / @startup
d = d1 * j + d2 * @steps
else
r = RING_R
d = d1 * j
end
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = WAIT
end
end
#--------------------------------------------------------------------------
# * Refresh Wait Period
#--------------------------------------------------------------------------
def refresh_wait
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @index
x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
draw_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# * Refresh Movement Period
#--------------------------------------------------------------------------
def refresh_move( mode )
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / MOVING_FRAMES
d2 *= -1 if mode != 0
for i in 0...@item_max
j = i - @index
d = d1 * j + d2 * @steps
x = @cx + ( RING_R * Math.sin( d ) ).to_i
y = @cy - ( RING_R * Math.cos( d ) ).to_i
draw_item(x, y, i)
end
@steps -= 1
if @steps < 1
@mode = WAIT
end
end
#--------------------------------------------------------------------------
# * Draw Item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# index : item number
#--------------------------------------------------------------------------
def draw_item(x, y, index)
if @char
if @index == index
draw_character(@items[index].character_name, @items[index].character_index , x, y)
if @mode == WAIT
draw_actor_hp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 270, true)
draw_actor_mp_ring(@items[index], @cx, @cy-16, 50, 6, 84, 180, false)
draw_actor_exp_ring(@items[index], @cx, @cy-16, 50, 6, 155, 12, false)
end
else
draw_character(@items[index].character_name, @items[index].character_index , x, y, false)
end
else
rect = Rect.new(0, 0, @items[index].width, @items[index].height)
if @index == index
self.contents.blt( x, y, @items[index], rect )
if @disabled[@index]
self.contents.blt( x, y, ICON_DISABLE, rect )
end
else
self.contents.blt( x, y, @items[index], rect, 128 )
end
end
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Edited to allow disabled character icons
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Character Graphic
#--------------------------------------------------------------------------
def draw_character(character_name, character_index, x, y, enabled = true)
return if character_name == nil
bitmap = Cache.character(character_name)
sign = character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, enabled ? 255 : 128)
end
end
- Código:
#==============================================================================
# ** Syvkal's Menu Bars
#------------------------------------------------------------------------------
# by Syvkal
# Version 4.1
# 05-20-08
#==============================================================================
#
# - INTRODUCTION -
#
# This system implements a series of Plug 'N' Play Menu Bars
# The Bars were inspired CogWheel, but all coding was done by me
# ( Except Wortana's 'gradient_fill_rect' Bug Fix )
#
#------------------------------------------------------------------------------
#
# - USAGE -
#
# This system will work as soon as you put it in the script Editor
# You can edit the script from the Configuration System
# 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, color1, color2, width, height, slanted, up)
#
# value : bar calculation value
# max : bar max value
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# color1 : bar gradient color 1 EITHER Color.new(r,g,b,a)
# color2 : bar gradient color 2 OR Numeric Text color
# width : Width
# height : Height
# slanted : draw slanted bar
# vertical : draw bar vertically
#
# ---------------------------------------------------
#
# To draw a ring use:
# draw_custom_ring
#
# Followed by:
# (value, max, x, y, color1, color2, radius, height, amount, start, reverse)
# value : bar calculation value
# max : bar max value
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# color1 : bar gradient color 1
# color2 : bar gradient color 2
# radius : distance from center point
# height : Height
# amount : size of ring - default 360�
# start : start position - max 360�
# reverse : draw ring in reverse
#
#------------------------------------------------------------------------------
#
# - scriptERS USAGE -
#
# I have added a few extra features to allow scripters to easily use the bars
# Seeing as the bars can be drawn Normal, Vertical or in a Ring I've added a
# feature to allow you to turn off the bars when drawing an actors HP, MP etc.
# When drawing an actors HP etc. simply add 'true' on the end. Like this:
# draw_actor_hp(actor, x, y, width, true)
#
# I've also separated the different bars so they're easier to draw
#
# draw_actor_hp_gauge(actor, x, y, width) Will draw a normal bar
# draw_actor_hp_gauge(actor, x, y, width, true) Will draw a vertical bar
# draw_actor_hp_ring(actor, x, y, radius, height, amount, start)
# Will draw a ring
#
#------------------------------------------------------------------------------
#
# - script CALLS -
#
# There are no script calls necessary to enable this script
# However, you can change any of the constants in game if you wish
# This can be done by the script Call Funtion in an event
#
# For example:
# COG::HPMPSLANT = true
#
# Will make the HP and MP bars Slant
# And setting it to false will turn them back to normal
#
#==============================================================================
module BAR
#===================================================#
# ** C O N F I G U R A T I O N S Y S T E M ** #
#===================================================#
# Parameter Max Value
P_MAX = 500
# The system uses a 'rate' feature. It is set when drawing a bar
# The 'rate' is how much the bar is filled as a decimal (max : 1)
# This is used to enable color change as the bar decreased in amount
$rate = 0 # Don't touch this
# The system uses a series of CONSTANTS that can be edited here
# They control the basic gauge colors and the manner the gauge is filled:
# 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
# Gauge Settings
EMPTY = false # EMPTY gauge (false - Side : true - Vertical)
FILLER = false # FILLER gauge (false - Side : true - Vertical)
# Border Settings - Applies only to standard bars
CORNER = false # Remove corners?
# The Parameter colors can be text colors taken from the windowskin or
# colors like above. You don't need set your own 'rate' functions
# it does it for you
# Parameter Gauge Color1
ATKCOLOR1 = 2
DEFCOLOR1 = 17
SPICOLOR1 = 30
AGICOLOR1 = 12
# Parameter Gauge Color2
ATKCOLOR2 = 20
DEFCOLOR2 = 21
SPICOLOR2 = 31
AGICOLOR2 = 4
# The system has been made to use a series of SWITCHES that can be edited here
# They control whether certain Bars are Normal or Slanted:
HPMPSLANT = false # Slanted HP and MP Bars?
EXPSLANT = false # Slanted Exp Bars?
PARSLANT = false # Slanted Parameter Bars?
DVVLBSLANT = true # Slanted Limit Break Bars?
#===================================================#
# ** C O M P L E X C O N F I G U R A T I O N ** #
#===================================================#
# The system allows you to edit the main gauge colous from here
# Functions had to be used instead of Constants so the $rate feature still works
# Edit only if you know what you're doing:
def self::hpcolor1 # HP Guage Color1
return Color.new(80 - 24 * $rate, 80 * $rate, 14 * $rate, 192)
end
def self::hpcolor2 # HP Guage Color2
return Color.new(240 - 72 * $rate, 240 * $rate, 62 * $rate, 192)
end
def self::mpcolor1 # MP Guage Color1
return Color.new(14 * $rate, 80 - 24 * $rate, 80 * $rate, 192)
end
def self::mpcolor2 # MP Guage Color2
return Color.new(62 * $rate, 240 - 72 * $rate, 240 * $rate, 192)
end
def self::expcolor1 # EXP Guage Color1
Color.new(80 * $rate, 80 - 80 * $rate ** 2, 80 - 80 * $rate, 192)
end
def self::expcolor2 # EXP Guage Color2
Color.new(240 * $rate, 240 - 240 * $rate ** 2, 240 - 240 * $rate, 192)
end
#===================================================#
# ** E N D C O N F I G U R A T I O N ** #
#===================================================#
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# Added EXP and Next Level EXP for numeric for calculations
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get EXP - numeric for calculations
#--------------------------------------------------------------------------
def now_exp
return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get Next Level EXP - numeric for calculations
#--------------------------------------------------------------------------
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Added the 'Draw' functions for each gauge
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Includes The BAR Module
#--------------------------------------------------------------------------
include BAR
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias draw_actor_parameter_original draw_actor_parameter
#--------------------------------------------------------------------------
# * Draw HP gauge
# vertical : draw bar vertically
#--------------------------------------------------------------------------
def draw_actor_hp_gauge(actor, x, y, width = 120, vertical = false)
$rate = actor.hp.to_f / actor.maxhp
gw = width * actor.hp / actor.maxhp
w = vertical ? 6 : width; h = vertical ? width : 6
HPMPSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, BAR::hpcolor1, BAR::hpcolor2, vertical) :
self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, BAR::hpcolor1, BAR::hpcolor2, vertical)
end
#--------------------------------------------------------------------------
# * Draw MP gauge
# vertical : draw bar vertically
#--------------------------------------------------------------------------
def draw_actor_mp_gauge(actor, x, y, width = 120, vertical = false)
$rate = actor.mp.to_f / [actor.maxmp, 1].max
gw = width * actor.mp / [actor.maxmp, 1].max
w = vertical ? 6 : width; h = vertical ? width : 6
HPMPSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, BAR::mpcolor1, BAR::mpcolor2, vertical) :
self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, BAR::mpcolor1, BAR::mpcolor2, vertical)
end
#--------------------------------------------------------------------------
# * Draw Exp gauge
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : Width
# vertical : draw bar vertically
#--------------------------------------------------------------------------
def draw_actor_exp_gauge(actor, x, y, width = 170, vertical = false)
$rate = actor.now_exp.to_f / [actor.next_exp, 1].max
gw = width * actor.now_exp / [actor.next_exp, 1].max
w = vertical ? 6 : width; h = vertical ? width : 6
EXPSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, BAR::expcolor1, BAR::expcolor2, vertical) :
self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, BAR::expcolor1, BAR::expcolor2, vertical)
end
#--------------------------------------------------------------------------
# * Draw Parameters
# hide_bar : draw Parameters without gauge
#--------------------------------------------------------------------------
def draw_actor_parameter(actor, x, y, type, hide_bar = false)
hide_bar ? nil : draw_actor_parameter_gauge(actor, x, y, type)
draw_actor_parameter_original(actor, x, y, type)
end
#--------------------------------------------------------------------------
# * Draw Parameters gauge
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# type : Type of parameters (0-3)
# width : Width
# vertical : draw bar vertically
#--------------------------------------------------------------------------
def draw_actor_parameter_gauge(actor, x, y, type, width = 160, vertical = false)
case type
when 0
e1 = actor.atk
gc1 = ATKCOLOR1.is_a?(Integer) ? text_color(ATKCOLOR1) : ATKCOLOR1
gc2 = ATKCOLOR2.is_a?(Integer) ? text_color(ATKCOLOR2) : ATKCOLOR2
when 1
e1 = actor.def
gc1 = DEFCOLOR1.is_a?(Integer) ? text_color(DEFCOLOR1) : DEFCOLOR1
gc2 = DEFCOLOR2.is_a?(Integer) ? text_color(DEFCOLOR2) : DEFCOLOR2
when 2
e1 = actor.spi
gc1 = SPICOLOR1.is_a?(Integer) ? text_color(SPICOLOR1) : SPICOLOR1
gc2 = SPICOLOR2.is_a?(Integer) ? text_color(SPICOLOR2) : SPICOLOR2
when 3
e1 = actor.agi
gc1 = AGICOLOR1.is_a?(Integer) ? text_color(AGICOLOR1) : AGICOLOR1
gc2 = AGICOLOR2.is_a?(Integer) ? text_color(AGICOLOR2) : AGICOLOR2
end
e2 = P_MAX
rate = [e1.to_f / e2.to_f, 1].min
gw = width * [e1.to_f / e2.to_f, 1].min
r = gc2.red * rate
g = (gc2.green - 72) * rate
b = gc2.blue * rate
a = gc2.alpha
w = vertical ? 6 : width; h = vertical ? width : 6
PARSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical) :
self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical)
end
#--------------------------------------------------------------------------
# * Draw Custom gauge
# value : bar calculation value
# max : bar max value
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# color1 : bar gradient color 1
# color2 : bar gradient color 2
# width : Width
# height : Height
# slanted : draw slanted bar
# vertical : draw bar vertically
#--------------------------------------------------------------------------
def draw_custom_gauge(value, max, x, y, color1, color2, width=120, height=6, slanted = false, vertical = false)
rate = [value.to_f / max.to_f, 1].min
gw = width * [value.to_f / max.to_f, 1].min
gc1 = color1.is_a?(Integer) ? text_color(color1) : color1
gc2 = color2.is_a?(Integer) ? text_color(color2) : color2
r = gc2.red * rate
g = (gc2.green - 72) * rate
b = gc2.blue * rate
a = gc2.alpha
w = vertical ? 6 : width; h = vertical ? width : 6
slanted ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical) :
self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, gc1, Color.new(r, g, b, a), vertical)
end
#--------------------------------------------------------------------------
# * Draw Limit Break gauge
# vertical : draw bar vertically
#--------------------------------------------------------------------------
def draw_actor_lb(actor, x, y, width = 120, vertical = false)
return unless actor.lb_gauge_visible?
st1 = lb_gauge_normal_start_color; st2 = lb_gauge_max_start_color
ed1 = lb_gauge_normal_end_color; ed2 = lb_gauge_max_end_color
rate = actor.limitbreak.to_f / [LB_MAX, 1].max
gw = width * actor.limitbreak / LB_MAX
gc1 = (gw == width ? st2 : Color.new(st1.red,st1.green-(10*rate),st1.blue-(10*rate), 192))
gc2 = (gw == width ? ed2 : Color.new(ed1.red,ed1.green-(10*rate),ed1.blue-(10*rate), 192))
w = vertical ? 6 : width; h = vertical ? width : 6
DVVLBSLANT ? self.contents.cogwheel_fill_slant(x, y + WLH - 8, gw, w, h, gc1, gc2, vertical) :
self.contents.cogwheel_fill_rect(x, y + WLH - 8, gw, w, h, gc1, gc2, vertical)
end
#--------------------------------------------------------------------------
# * Draw HP gauge ring
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# radius : distance from center point
# height : Height
# amount : size of ring - default 360�
# start : start position - max 360�
# reverse : draw ring in reverse
#--------------------------------------------------------------------------
def draw_actor_hp_ring(actor, x, y, radius, height, amount = 360, start = 0, reverse = false)
$rate = actor.hp.to_f / actor.maxhp
gw = amount * actor.hp / actor.maxhp
self.contents.cogwheel_fill_ring(x, y, gw, radius, height, BAR::hpcolor1, BAR::hpcolor2, amount, start, reverse)
end
#--------------------------------------------------------------------------
# * Draw MP gauge ring
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# radius : distance from center point
# height : Height
# amount : size of ring - default 360�
# start : start position - max 360�
# reverse : draw ring in reverse
#--------------------------------------------------------------------------
def draw_actor_mp_ring(actor, x, y, radius, height, amount = 360, start = 0, reverse = false)
$rate = actor.mp.to_f / [actor.maxmp, 1].max
gw = amount * actor.mp / [actor.maxmp, 1].max
self.contents.cogwheel_fill_ring(x, y, gw, radius, height, BAR::mpcolor1, BAR::mpcolor2, amount, start, reverse)
end
#--------------------------------------------------------------------------
# * Draw Exp gauge ring
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# radius : distance from center point
# height : Height
# amount : size of ring - default 360�
# start : start position - max 360�
# reverse : draw ring in reverse
#--------------------------------------------------------------------------
def draw_actor_exp_ring(actor, x, y, radius, height, amount = 360, start = 0, reverse = false)
$rate = actor.now_exp.to_f / [actor.next_exp, 1].max
gw = amount * actor.now_exp / [actor.next_exp, 1].max
self.contents.cogwheel_fill_ring(x, y, gw, radius, height, BAR::expcolor1, BAR::expcolor2, amount, start, reverse)
end
#--------------------------------------------------------------------------
# * Draw Custom gauge ring
# value : bar calculation value
# max : bar max value
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# color1 : bar gradient color 1
# color2 : bar gradient color 2
# radius : distance from center point
# height : Height
# amount : size of ring - default 360�
# start : start position - max 360�
# reverse : draw ring in reverse
#--------------------------------------------------------------------------
def draw_custom_ring(value, max, x, y, color1, color2, radius, height, amount = 360, start = 0, reverse = false)
rate = [value.to_f / max.to_f, 1].min
gw = amount * [value.to_f / max.to_f, 1].min
gc1 = color1.is_a?(Integer) ? text_color(color1) : color1
gc2 = color2.is_a?(Integer) ? text_color(color2) : color2
r = gc2.red * rate
g = (gc2.green - 72) * rate
b = gc2.blue * rate
a = gc2.alpha
self.contents.cogwheel_fill_ring(x, y, gw, radius, height, gc1, Color.new(r, g, b, a), amount, start, reverse)
end
#--------------------------------------------------------------------------
# * Draw HP
# hide_bar : draw Parameters without gauge
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 120, hide_bar = false)
hide_bar ? nil : draw_actor_hp_gauge(actor, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
self.contents.font.color = hp_color(actor)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, actor.hp, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, actor.hp, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxhp, 2)
end
end
#--------------------------------------------------------------------------
# * Draw MP
# hide_bar : draw Parameters without gauge
#--------------------------------------------------------------------------
def draw_actor_mp(actor, x, y, width = 120, hide_bar = false)
hide_bar ? nil : draw_actor_mp_gauge(actor, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a)
self.contents.font.color = mp_color(actor)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, actor.mp, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, actor.mp, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxmp, 2)
end
end
#--------------------------------------------------------------------------
# * Draw Exp
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : Width
# hide_bar : draw Parameters without gauge
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y, width = 170, hide_bar = false)
hide_bar ? nil : draw_actor_exp_gauge(actor, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 45, WLH, "Exp")
self.contents.font.color = normal_color
xr = x + width
if width < 170
self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2)
else
self.contents.draw_text(xr - 131, y, 60, WLH, actor.exp_s, 2)
self.contents.draw_text(xr - 71, y, 11, WLH, "/", 2)
self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_exp_s, 2)
end
end
end
#==============================================================================
# ** Window_SkillStatus
#------------------------------------------------------------------------------
# Edited so te Bars don't cut off
#==============================================================================
class Window_SkillStatus < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
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
#==============================================================================
# ** Bitmap
#------------------------------------------------------------------------------
# Added gauge Calculations
#==============================================================================
class Bitmap
#--------------------------------------------------------------------------
# * Includes The BAR Module
#--------------------------------------------------------------------------
include BAR
#--------------------------------------------------------------------------
# * Wortana's 'gradient_fill_rect' Bug Fix
#--------------------------------------------------------------------------
alias gradient_original gradient_fill_rect unless method_defined?('gradient_original')
def gradient_fill_rect(*args)
args.pop if !args.last if args.size == 4 || 7 and !args.last
gradient_original(*args)
end
#--------------------------------------------------------------------------
# * CogWheel Style Fill of Rect
#--------------------------------------------------------------------------
def cogwheel_fill_rect(x, y, gw, width, height, gc1, gc2, up = false)
rect_border(x-2, y-2, width+4, height+4, COLOR1, CORNER)
rect_border(x-1, y-1, width+2, height+2, COLOR2, CORNER)
gradient_fill_rect(x, y, width, height, COLOR3, COLOR4, EMPTY)
gradient_fill_rect(x, y, up ? width : gw, up ? gw : height, gc1, gc2, FILLER)
end
#--------------------------------------------------------------------------
# * CogWheel Style Fill of Slanted Rect
#--------------------------------------------------------------------------
def cogwheel_fill_slant(x, y, gw, width, height, gc1, gc2, up = false)
bgx = up ? 2 : 4; bdx = up ? 1 : 2
bgy = up ? 4 : 2; bdy = up ? 2 : 1
bgw = up ? 4 : 8; bdw = up ? 2 : 4
bgh = up ? 8 : 4; bdh = up ? 4 : 2
slant_border(x-bgx, y-bgy, width+bgw, height+bgh, COLOR1, up)
slant_border(x-bdx, y-bdy, width+bdw, height+bdh, COLOR2, up)
gradient_fill_slant(x, y, width, height, COLOR3, COLOR4, EMPTY, up)
gradient_fill_slant(x, y,up ? width : gw,up ? gw : height, gc1, gc2, FILLER, up)
end
#--------------------------------------------------------------------------
# * CogWheel Style Fill of Ring
#--------------------------------------------------------------------------
def cogwheel_fill_ring(x, y, gw, radius, height, gc1, gc2, amount = 360, start = 0, reverse = false)
fill_ring(x-2, y-2, radius, height+4, COLOR1, amount, start, reverse)
fill_ring(x-1, y-1, radius, height+2, COLOR2, amount, start, reverse)
if amount >= 220
gradient_fill_ring(x, y, radius, height, COLOR3, COLOR4, [amount/2, 180].min, start, reverse)
gradient_fill_ring(x, y, radius, height, COLOR4, COLOR3, [amount/2, 180].min, start+(amount/2), reverse)
else
gradient_fill_ring(x, y, radius, height, COLOR3, COLOR4, [amount, 360].min, start, reverse)
end
if gw >= 220
gw1 = amount/2; gw2 = gw / 2
gradient_fill_ring(x, y, radius, height, gc1, gc2, gw1, start, reverse)
gradient_fill_ring(x, y, radius, height, gc2, gc1, gw2, start +(amount/2), reverse)
else
gradient_fill_ring(x, y, radius, height, gc1, gc2, gw, start, reverse)
end
end
#--------------------------------------------------------------------------
# * Fill of Border
#--------------------------------------------------------------------------
def rect_border(x, y, width, height, gc1, edge = false)
fill_rect(x + (edge ? 1 : 0), y, width - (edge ? 2 : 0), 2, gc1)
fill_rect(x + (edge ? 1 : 0), y+(height-2), width - (edge ? 2 : 0), 2, gc1)
fill_rect(x, y+1, 2, height-2, gc1)
fill_rect(x +(width-2), y+1, 2, height-2, gc1)
end
#--------------------------------------------------------------------------
# * Gradient Fill of Slanted Rect
#--------------------------------------------------------------------------
def gradient_fill_slant(x, y, width, height, gc1, gc2, vertical = false, up = false)
if up
for i in 1..width
if vertical
gradient_fill_rect(x + width - i, y+i+1, 1, (height-2)-width, gc1, gc2, vertical)
else
color = get_gradient_pixel(gc1, gc2, width, i)
fill_rect(x + width - i, y+i+1, 1, (height-2)-width, color)
end
end
else
for i in 1..height
if vertical
color = get_gradient_pixel(gc1, gc2, height, i)
fill_rect(x+i+1, y + height - i, (width-2)-height, 1, color)
else
gradient_fill_rect(x+i+1, y + height - i, (width-2)-height, 1, gc1, gc2)
end
end
end
end
#--------------------------------------------------------------------------
# * Fill of Slanted Rect
#--------------------------------------------------------------------------
def fill_slant(x, y, width, height, gc1, up = false)
oh = up ? width : height
for i in 1..oh
if up
fill_rect(x + width -i, y+i, 1, height-width, gc1)
else
fill_rect(x+i, y + height -i, width-height, 1, gc1)
end
end
end
#--------------------------------------------------------------------------
# * Fill of Slanted Border
#--------------------------------------------------------------------------
def slant_border(x, y, width, height, gc1, up = false)
oh = up ? width : height
for i in 1..oh-2
if up
fill_rect(x + width-1 -i, y+((height-1)-width)+i, 1, 2, gc1)
fill_rect(x + width-1 -i, y+1+i, 1, 2, gc1)
fill_rect(x + width-1, y+1, 1, height-width, gc1)
fill_rect(x, y+width, 1, height-width, gc1)
else
fill_rect(x+((width-1)-height)+i, y + height-1 -i, 2, 1, gc1)
fill_rect(x+1+i, y + height-1 -i, 2, 1, gc1)
fill_rect(x+1, y + height -1, width-height, 1, gc1)
fill_rect(x+height, y, width-height, 1, gc1)
end
end
end
#--------------------------------------------------------------------------
# * Fill of Ring
#--------------------------------------------------------------------------
def fill_ring(ox, oy, radius, height, gc1, amount = 360, start = 0, reverse = false)
d = 2.0 * Math::PI / 360
for i in 1..[amount, 360].min
s = i + start
if reverse
x = ox + ( radius * Math.sin( d * s ) ).to_i
y = oy - ( radius * Math.cos( d * s ) ).to_i
else
x = ox - ( radius * Math.cos( d * s ) ).to_i
y = oy + ( radius * Math.sin( d * s ) ).to_i
end
fill_rect(x, y, height, height, gc1)
end
end
#--------------------------------------------------------------------------
# * Gradient Fill of Ring
#--------------------------------------------------------------------------
def gradient_fill_ring(ox, oy, radius, height, gc1, gc2, amount = 360, start = 0, reverse = false)
d = 2.0 * Math::PI / 360
for i in 1..amount
s = i + start
if reverse
x = ox + ( radius * Math.sin( d * s ) ).to_i
y = oy - ( radius * Math.cos( d * s ) ).to_i
else
x = ox - ( radius * Math.cos( d * s ) ).to_i
y = oy + ( radius * Math.sin( d * s ) ).to_i
end
color = get_gradient_pixel(gc1, gc2, amount, i)
fill_rect(x, y, height, height, color)
end
end
#--------------------------------------------------------------------------
# * Get Pixel Color for Gradient Fill
#--------------------------------------------------------------------------
def get_gradient_pixel(gc1, gc2, amount, i)
red = gc1.red * (amount - i) / amount + gc2.red * i / amount
green = gc1.green * (amount - i) / amount + gc2.green * i / amount
blue = gc1.blue * (amount - i) / amount + gc2.blue * i / amount
alpha = gc1.alpha * (amount - i) / amount + gc2.alpha * i / amount
return Color.new(red, green, blue, alpha)
end
end
Cualquier duda diganme
TigreX- 500
-
26
1214
1679
105
Extras
Sobre mí::
Re: Script menu de anillo
una duda dime tengo que pegar los dos scripts juntos?
o tengo que pegar solo un scrip
no demores en responder
o tengo que pegar solo un scrip
no demores en responder
kevin098098- 50
-
26
60
62
5
Extras
Sobre mí::
Re: Script menu de anillo
kevin098098 escribió:una duda dime tengo que pegar los dos scripts juntos?
o tengo que pegar solo un scrip
no demores en responder
Pues debes de poner los dos scripts por separado. El primer lo pones encima de Main y el segundo encima del primero (o al revés xD).
Espero que te sirva .
Salu2
migan012- 0
-
33
9
8
0
Re: Script menu de anillo
Si os da algun problema decidlo pls, k "almenos yo" cuando lo pongo, despues de luchar con un montruo o se keda clavado o la barra de vida y magia de los compañeros (ojo compañeros, con el prota va bn) se keda en rojo totalemente...
PD:¿puede ser k no sea compatible con batalla lateral?
PD:¿puede ser k no sea compatible con batalla lateral?
Bluro- 15
-
34
25
24
0
Re: Script menu de anillo
Donde van las imagenes? javascript:emoticonp('')
maiko- 15
-
28
25
20
0
Extras
Sobre mí::
Re: Script menu de anillo
TigreX escribió:
Imagenes necesarias:(Graphics/Picture)
es incompatible es obvio
TigreX- 500
-
26
1214
1679
105
Extras
Sobre mí::
Re: Script menu de anillo
Gracias, está muy bueno y funciona genial ^^
Franuka- 50
-
30
78
51
7
Extras
Sobre mí::
Re: Script menu de anillo
Hey tengo una duda me da error en la linea 1 del segundo scrip la borrro ke son puras rayas y despues me da error en la linea 651 ke puedo hacer
Darknicodemus- 15
-
34
19
17
0
Re: Script menu de anillo
Es que si te fijas en la cuarta linea del script apararece "-", cambialo x "#"
(sin las comillas) y listo.
(sin las comillas) y listo.
Crazy Hand- 0
-
33
6
6
0
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.