|
#91
|
||||
|
||||
|
Pongo un Script que no recuerdo quien, pero lo habían pedido hace tiempo, no lo había encontrado, pero por fin lo logre:
-Nombre Del Script: Rango de Visión -Version Del Script: 1.0 -Rpg Maker: XP -Todo esta en el Script: [SPOILER] Código:
=begin
################################################################
# Script de Rango de Visión v1.0 15/09/2007 D.C by DeathRPG #
################################################################
1. Condiciones de uso:
----------------------
Básicamente diré lo que te permito hacer con este script y lo que no:
a) Puedes usarlo y modificarlo en tu juego, sin necesidad de añadirme a los
créditos.
b) Puedes distribuirlo (ponerlo en un pack para descargar, por foros, etc.),
siempre y cuando sea totalmente gratis. En caso de querer traducirlo, sólo
puedes tocar las lÃ*neas comentadas o que ignora el intérprete RGSS, además
debes poner clarÃ*simo y antes de cualquier lÃ*nea del programa en sÃ*, que yo,
DeathRPG, soy el autor original de este script. Si se trata de versiones
modificadas, debes avisarme; yo considero que una versión modificada es
si el hipotético script derivado de este y este (valga la redundancia)
comparten a lo menos 2 métodos que se comportan exactamente de la misma
manera al ser interpretados, no olvides ponerme en los créditos.
c) No me hago responsable de cualquier tipo de daño que pueda causar el uso
incorrecto de este script =D
2. Manual:
----------
Este script consiste en añadir de una manera más o menos limpia y sin lag
(lo más que pude) una suerte de implementación de activación de eventos por
rango de visión. Para a los que no les quede claro algo asÃ* como en Pokémon
cuando te acercas a un entrenador y se inicia la pelea, pero aquÃ* de manera más
flexible ya que hay varios tipos de visión (por ahora sólo 2, pero vienen más).
Ahora voy a explicar como poner este sexy sistema en funcionamiento xD
Primero que nada (o que todo) debes crear un evento en el mapa con el nombre de
"sight_range_cfg" (sin comillas). Una vez hecho esto, pon un comentario y ahÃ*
puedes especificar qué evento quieres que se active usando la visión, qué tipo
de visión, y cuanto es la distancia máxima a la cual el evento podrá detectarte
y activarse, de la siguiente manera:
Dentro del comentario escribe "<a>,<b>,<c>" (s/comillas) donde <a> debes susti-
tuirlo por el evento que quieres que disponga de visión, <b> por el tipo de
visión que quieras que tenga (lo explicaré más tarde) y <c> por la distancia
máxima a la cual el evento podrá detectarte. Puedes definir más de un evento por
comando de comentario, simplemente separándo las definiciones por un espacio o
salto de lÃ*nea.
Ahora explicaré los tipos de visión que existen:
a)Visión triangular:
Número por el cual reemplazar en <b>: 1
Descripción: Pues, funciona como un triángulo que tiene como vértice el evento
especificado. Si el protagonista está dentro del triángulo, entonces el evento
se activará.
Diagrama: He aquÃ* un diagrama que muestra como funciona este tipo de visión,
usando distancia 3 y mirándo hacia la derecha. Leyenda: E = evento;
X = área de activación.
X
XX
XXX
EXXX
XXX
XX
X
b)Visión Directa:
Número por el cual reemplazar en <b>: 2
Descripción: Idéntico a Pokémon, si el evento está mirando a la izquierda y
tiene distancia 4, entonces si además el héroe tiene la misma posición horizon-
tal y está a menos de o 4 tiles a la izquierda se activará el evento.
Diagrama: Éste muestra el funcionamiento en distancia 3 mirando hacia la
derecha. Leyenda: E = evento; X área de activación.
EXXX
3.FAQ:
------
a)Tu script me causa un error...
R: Primero que nada, revisa si tienes otro script que modifique las clases
Game_Map, Game_Character, Game_Event y Game_Player, de ser asÃ*; pues mala
suerte, no te puedo ayudar porque no sé cuales scripts usas ni tampoco puedo ir
viendo caso por caso; pero por eso mismo he permitido que puedas hacerles las
modificaciones que quieras para tu juego, para que puedas adaptarlo a tus nece-
sidades partÃ*culares.
b)¡Pero aún sin ningún script que haga lo que dices me falla!
R: Fijate que el comentario en el evento "sight_range_cfg" tenga solamente, las
definiciones de los eventos que se activan con rango de visión y tampoco pueden
haber espacios entre comas y números; me explico, imaginemos que queremos que el
evento de id 3 tenga visión triangular de distancia 1, lo que tendrÃ*as que in-
troducir en el comentario es (s/comillas) "3,1,1", sin embargo no puede ser
"3, 1, 1" ni "3 ,1, 1", porque dará error. Recuerda solamente espacios entre
definiciones, pero no dentro de ellas. También dará fallo si has puesto una de-
finición que hace referencia a un evento que no existe, mucho ojo con eso que no
lo pienso arreglar porque es negligencia del que lo usa. Si no es nada de lo
anterior por favor repórtamelo describiéndome lo más posible tu situación, se
agradecerÃ*a si me mandaras un juego con la copia del mapa en el cual da error,
para saber exactamente qué falla (por ahora está esto en fase semiexperimental).
c)Le he puesto condicionantes a la página del evento que contiene las definicio-
nes, hago que se cumplan las condiciones, pero no funciona para nada el sistema
de visión.
R:Esto sucede porque has hecho cumplir las condicionantes sin haber cambiado
de mapa. Este script lee las definiciones al cargar el mapa, sin embargo, existe
una manera de (re)cargar las definiciones sin cambiar de mapa. Después de haber
cumplido las condiciones usa el comando esperar y pon que espere 1 frame, luego
usa un comando "Llamar script..." y pone en él (s/comillas):
"$game_map.deathrpg_sight_range_start"
Y ya deberÃ*a funcionar todo =D
=end
class Game_Map
#Se definen los aliases
alias deathrpg_sight_range_setup setup
#Se redefine el método setup, se usa un alias para reutilizar el código que
#anteriormente le correspondÃ*a al método
def setup(map_id)
deathrpg_sight_range_setup(map_id)
deathrpg_sight_range_start
end
#Este método lee y carga los comentarios del evento "sight_range_cfg"
def deathrpg_sight_range_start
#Se itera config de 1 a la cantidad de eventos que hay en el mapa
for config in 1..$game_map.events.length
next if not $game_map.events[config]
#Se rompe el ciclo si el nombre del evento actual según el contador
#es "sight_range_cfg"
break if $game_map.events[config].event.name == "sight_range_cfg"
#Se finaliza el método si es el ciclo final
return if config == $game_map.events.length
end
sight_range_cfg = []
return if not $game_map.events[config]
return if not $game_map.events[config].list
#Se itera command en la lista de comandos del evento que indica "config"
for command in $game_map.events[config].list
#Si el comando es distinto a "Comentario..." se rompe el ciclo
break unless command.code == 108 or command.code == 408
comment = command.parameters[0]
#Se extrae y lee el contenido de los comentarios a través de este ciclo
#que dura hasta que el string comment esté vacÃ*o
while comment.length != 0
#Se extrae de comment la primera "definición de evento" que haya
tmp_comment = comment[/^\s*\d*,\d*,\d*\s*/]
#Se borra esa definición de la variable comment
comment.reverse!
comment = comment[0, comment.length - tmp_comment.length]
comment.reverse!
#Se quitan los espacios que precedan a la definición en sÃ*
tmp_comment[/^\s*/] = ""
#Y los que le siguen tambien:
tmp_comment[/s*$/] = ""
tmp_cfg = []
#Se guarda en tmp_cfg cada uno de los valores de la definición
for i in 0..2
tmp_cfg[i] = tmp_comment[/^\d*/].to_i
tmp_comment[/^\d*,*/] = ""
end
#Se pone al final del array sigth_range_cfg lo contenido en tmp_cfg
sight_range_cfg.push tmp_cfg
end
end
#Finalmente, la información contenida sight_range_cfg se guarda en
#variables de cada evento referido en las definiciones
for i in sight_range_cfg
$game_map.events[i[0]].deathrpg_sight_style = i[1]
$game_map.events[i[0]].deathrpg_sight_range = i[2]
end
end
end
class Game_Event
#Se definen las variables que pueden ser leÃ*das o de posible acceso externo
#a esta clase.
attr_reader :event
attr_accessor :deathrpg_sight_style #Tipo de visión
attr_accessor :deathrpg_sight_range #Distancia o alcance de la visión
#Se definen los alias
alias deathrpg_sight_range_initialize initialize
alias deathrpg_sight_range_start start
#AquÃ* se inicializan las variables requeridas para este script y se corre
#el initialize viejo mediante el alias.
def initialize(map_id, event)
@sight_activated_event = false
@deathrpg_sight_style = 0
@deathrpg_sight_range = 0
deathrpg_sight_range_initialize(map_id, event)
end
#Se ejecuta el viejo método start mediante el alias si hay lista de comandos
def start
deathrpg_sight_range_start if @list
end
#Éste método consiste en que de acuerdo a las variables de la instancia,
#@deathrpg_sight_range y @deathrpg_sight_style, se calcula cuales son las
#posiciones de inicio del evento.
def sight_range_check
#Dejar el método si hay un evento que no sea paralelo funcionando
return if $game_system.map_interpreter.running?
#Si el rango es igual a 0 o no hay un tipo de visión definida, dejar el
#método.
return if @deathrpg_sight_style == 0 or @deathrpg_sight_range == 0
#Se calcula la distancia que hay de este evento al protagonista y si es
#mayor que el rango, abandonar el método.
x_dist = (@x - $game_player.x).abs
y_dist = (@y - $game_player.y).abs
return if x_dist > @deathrpg_sight_range or y_dist > @deathrpg_sight_range
#Este método comienza a "ramificarse" dependiendo de la visión que tenga el
#objeto definida.
case @deathrpg_sight_style
when 1 #Visión triangular
case @direction
when 2 #Si está mirando hacia abajo
factor = 1 #Factor por el cual se multiplicará el eje definido en axis
axis = 0 # 0 = Y, 1 = X
when 4 # Si está mirando hacia la izquierda
factor = -1
axis = 1
when 6 #Si está mirando hacia la derecha
factor = 1
axis = 1
when 8 #Si está mirando hacia arriba
factor = -1
axis = 0
end
#Se comienza a comprobar si el héroe está en el área de visión de este
#evento. Esta iteración tiene que ver con la distancia.
for i in 1..@deathrpg_sight_range
sight_wideness = (i*2)+1
#En función de axis se disponen las coordenadas a comprobar.
case axis
when 0
check_x = @x + i
check_y = @y + factor*i
when 1
check_x = @x + factor*i
check_y = @y + i
end
#Esta otra iteración, en cambio, va comprobando a lo ancho desde este
#evento si está el héroe en el campo de visión del evento.
for j in 1..sight_wideness
#Si las coordenadas comprobadas actualmente son igual a las del
#jugador en el mapa...
if check_x == $game_player.x and check_y == $game_player.y
#Esto evita que este evento mire hacia el héroe cuando se empiece
#a procesar el evento.
@sight_activated_event = true
#Se ejecutan las acciones contenidas en la página actual de este
#evento.
return start
end
#Se cambia la coordenada a comprobar en funcion de axis.
case axis
when 0
check_x -= 1
when 1
check_y -= 1
end
end
end
when 2 #Visión directa (a lo Pokémon cuando te ven los trainers)
case @direction
when 2 #Si mira abajo
if ($game_player.y - @y) <= @deathrpg_sight_range and
($game_player.y - @y) > 0 and @x == $game_player.x
start #Comienza el evento
end
when 4 #Si mira a la izquierda
if (@x - $game_player.x) <= @deathrpg_sight_range and
(@x - $game_player.x) > 0 and @y == $game_player.y
start
end
when 6 #Si mira a la derecha
if ($game_player.x - @x) <= @deathrpg_sight_range and
($game_player.x - @x) > 0 and @y == $game_player.y
start
end
when 8 #Si mira arriba
if (@y - $game_player.y) <= @deathrpg_sight_range and
(@y - $game_player.y) > 0 and @x == $game_player.x
start
end
end
end
end
end
class Game_Character
#Se definen los alias
alias deathrpg_sight_range_increase_steps increase_steps
alias deathrpg_sight_range_moveto moveto
alias deathrpg_sight_range_lock lock
alias deathrpg_sight_range_unlock unlock
#Al final del increase_steps original se comprueban los rangos de visión
def increase_steps
deathrpg_sight_range_increase_steps
sight_range_check
end
#Lo mismo aquÃ*, pero con moveto
def moveto(x, y)
deathrpg_sight_range_moveto(x, y)
sight_range_check
end
#Se modifica de manera similar a los anteriores para evitar que los eventos
#miren hacia ti cuando empiezan a procesarse.
def lock
deathrpg_sight_range_lock
@direction = @prelock_direction if @sight_activated_event
end
#La modificación hecha a este método tiene que ver con lo anterior
def unlock
deathrpg_sight_range_unlock
@sight_activated_event = false
end
#Método vacÃ*o creado por razones de compatibilidad
def sight_range_check
end
end
class Game_Player
#Método hace comprobar a los eventos si el prota está dentro del área de
#visión
def sight_range_check
#Salir si se está procesando un evento que no es paralelo
return if $game_system.map_interpreter.running?
#Se hace comprobar a cada uno de los eventos
for i in 1..$game_map.events.length
$game_map.events[i].sight_range_check if $game_map.events[i]
end
end
end
-Creditos: DeathRPG |
|
#92
|
||||
|
||||
|
-Nombre Del Script: Leon Blade's Menu
-Rpg Maker: XP -ScreenShot: ![]() -Script: [SPOILER] Código:
#========================================
#¡ Game_Map
#--------------------------------------------------------------------------------
# Setting functions for the Map
#========================================
class Game_Map
def name
$map_infos[@map_id]
end
end
#========================================
#¡ Window_Title
#--------------------------------------------------------------------------------
# Setting functions for the Title
#========================================
class Scene_Title
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
#==============================================================================
# ¡ Window_Mapname
#------------------------------------------------------------------------------
# Â@Draws the Map name
#==============================================================================
class Window_Mapname < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 56)
self.contents = Bitmap.new(width - 52, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# Draws info on screen
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon("map")
self.contents.blt(5, 0, bitmap, Rect.new(0, 0, 24, 24))
new_name = $game_map.name.tr("/*","")
self.contents.draw_text(40, -5, 320, 32, new_name.to_s)
end
end
#==============================================================================
# ¡ Window_Crystal
#------------------------------------------------------------------------------
# This Window displays what you need to do next like a task or job or objective!
#==============================================================================
class Window_Crystal < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 121)
self.contents = Bitmap.new(width - 52, height - 34)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# Draws info on screen Crystal and the pics
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -9, 320, 32, "Crystals:") # Text Discription like
self.contents.font.color = normal_color
if $game_switches[26] == true
draw_icon_graphic("fire crystal", 15, 45)
self.contents.draw_text(4, 35, 320, 32, "Fire")
else
draw_icon_graphic("049-Skill06", 15, 45)
end
if $game_switches[27] == true
draw_icon_graphic("ice crystal", 43, 45)
self.contents.draw_text(35, 35, 320, 32, "Ice")
else
draw_icon_graphic("049-Skill06", 43, 45)
end
if $game_switches[28] == true
draw_icon_graphic("bolt crystal", 75, 45)
self.contents.draw_text(63, 35, 320, 32, "Bolt")
else
draw_icon_graphic("049-Skill06", 75, 45)
end
if $game_switches[29] == true
draw_icon_graphic("water crystal", 110, 45)
self.contents.draw_text(94, 35, 320, 32, "Water")
else
draw_icon_graphic("049-Skill06", 110, 45)
end
if $game_switches[30] == true
draw_icon_graphic("air crystal", 145, 45)
self.contents.draw_text(136, 35, 320, 32, "Air")
else
draw_icon_graphic("049-Skill06", 145, 45)
end
if $game_switches[31] == true
draw_icon_graphic("earth crystal", 177, 45)
self.contents.draw_text(162, 35, 320, 32, "Earth")
else
draw_icon_graphic("049-Skill06", 177, 45)
end
if $game_switches[32] == true
draw_icon_graphic("holy crystal", 212, 45)
self.contents.draw_text(200, 35, 320, 32, "Light")
else
draw_icon_graphic("049-Skill06", 212, 45)
end
if $game_switches[33] == true
draw_icon_graphic("black crystal", 247, 45)
self.contents.draw_text(236, 35, 320, 32, "Dark")
else
draw_icon_graphic("049-Skill06", 247, 45)
end
end
end
#==============================================================================
# ¡ Window_Window_GameTitle
#------------------------------------------------------------------------------
#==============================================================================
class Window_GameTitle < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 65)
self.contents = Bitmap.new(width - 52, height - 34)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# Draws info on screen Crystal and the pics
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -9, 320, 32, "Blade")
self.contents.draw_text(45, 10, 320, 32, "Brothers")
end
end
#==============================================================================
# ¡ Window_Window_Extra
#------------------------------------------------------------------------------
#==============================================================================
class Window_Extras < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 65)
self.contents = Bitmap.new(width - 52, height - 34)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# Draws info on screen
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
draw_icon_graphic("coin", 15, 45)
self.contents.draw_text(15, 45, 320, 32, "Gil")
end
end
#==============================================================================
# ¡ Window_Window_GameCompletion
#------------------------------------------------------------------------------
# This Game Completion script was made by LeonBlade. Dont use without giving some sort of
# small credit twords me.
#
# This script works with your game making progress. When you get a certain part in your game you
# use a variable of you choice to controll the percentage. 1-100 is the number you get.
# Change $game_variables[10] to your variable 10 = current variable. And as an extra bonus I
# included an extra percentage feature for your sidequests missions. This is using variable 9 so
# adjust as what you need, this is also set to 1-100 scale. For both you can adjust the readings from
# 10 % to begining or Chapter 4, or whatever
#
# -Leon Blade-
#
#==============================================================================
class Window_GameCompletion < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 104)
self.contents = Bitmap.new(width - 52, height - 34)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# Draws percentage
#--------------------------------------------------------------------------
def refresh
self.contents.clear
end
end
#==============================================================================
class Window_GameCompletion2 < Window_Base
#--------------------------------------------------------------------------
# Set up
#--------------------------------------------------------------------------
def initialize
super(0, 0, 180, 104)
self.contents = Bitmap.new(width - 52, height - 34)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
end
#--------------------------------------------------------------------------
# Draws percentage
#--------------------------------------------------------------------------
def refresh
self.contents.clear
game_percent = ("0%")
if $game_variables[10] == 1
game_percent = ("1%")
end
if $game_variables[10] == 2
game_percent = ("2%")
end
if $game_variables[10] == 3
game_percent = ("3%")
end
if $game_variables[10] == 4
game_percent = ("4%")
end
if $game_variables[10] == 5
game_percent = ("5%")
end
if $game_variables[10] == 6
game_percent = ("6%")
end
if $game_variables[10] == 7
game_percent = ("7%")
end
if $game_variables[10] == 8
game_percent = ("8%")
end
if $game_variables[10] == 9
game_percent = ("9%")
end
if $game_variables[10] == 10
game_percent = ("10%")
end
if $game_variables[10] == 11
game_percent = ("11%")
end
if $game_variables[10] == 12
game_percent = ("12%")
end
if $game_variables[10] == 13
game_percent = ("13%")
end
if $game_variables[10] == 15
game_percent = ("14%")
end
if $game_variables[10] == 15
game_percent = ("15%")
end
if $game_variables[10] == 16
game_percent = ("16%")
end
if $game_variables[10] == 17
game_percent = ("17%")
end
if $game_variables[10] == 18
game_percent = ("18%")
end
if $game_variables[10] == 19
game_percent = ("19%")
end
if $game_variables[10] == 20
game_percent = ("20%")
end
if $game_variables[10] == 21
game_percent = ("21%")
end
if $game_variables[10] == 22
game_percent = ("22%")
end
if $game_variables[10] == 23
game_percent = ("23%")
end
if $game_variables[10] == 24
game_percent = ("24%")
end
if $game_variables[10] == 25
game_percent = ("25%")
end
if $game_variables[10] == 26
game_percent = ("26%")
end
if $game_variables[10] == 27
game_percent = ("27%")
end
if $game_variables[10] == 28
game_percent = ("28%")
end
if $game_variables[10] == 29
game_percent = ("29%")
end
if $game_variables[10] == 30
game_percent = ("30%")
end
if $game_variables[10] == 31
game_percent = ("31%")
end
if $game_variables[10] == 32
game_percent = ("32%")
end
if $game_variables[10] == 33
game_percent = ("33%")
end
if $game_variables[10] == 34
game_percent = ("34%")
end
if $game_variables[10] == 35
game_percent = ("35%")
end
if $game_variables[10] == 36
game_percent = ("36%")
end
if $game_variables[10] == 37
game_percent = ("37%")
end
if $game_variables[10] == 38
game_percent = ("38%")
end
if $game_variables[10] == 39
game_percent = ("39%")
end
if $game_variables[10] == 40
game_percent = ("40%")
end
if $game_variables[10] == 41
game_percent = ("41%")
end
if $game_variables[10] == 42
game_percent = ("42%")
end
if $game_variables[10] == 43
game_percent = ("43%")
end
if $game_variables[10] == 44
game_percent = ("44%")
end
if $game_variables[10] == 45
game_percent = ("45%")
end
if $game_variables[10] == 46
game_percent = ("46%")
end
if $game_variables[10] == 47
game_percent = ("47%")
end
if $game_variables[10] == 48
game_percent = ("48%")
end
if $game_variables[10] == 49
game_percent = ("49%")
end
if $game_variables[10] == 50
game_percent = ("50%")
end
if $game_variables[10] == 51
game_percent = ("51%")
end
if $game_variables[10] == 52
game_percent = ("52%")
end
if $game_variables[10] == 53
game_percent = ("53%")
end
if $game_variables[10] == 54
game_percent = ("54%")
end
if $game_variables[10] == 55
game_percent = ("55%")
end
if $game_variables[10] == 56
game_percent = ("56%")
end
if $game_variables[10] == 57
game_percent = ("57%")
end
if $game_variables[10] == 58
game_percent = ("58%")
end
if $game_variables[10] == 59
game_percent = ("59%")
end
if $game_variables[10] == 60
game_percent = ("60%")
end
if $game_variables[10] == 61
game_percent = ("61%")
end
if $game_variables[10] == 62
game_percent = ("62%")
end
if $game_variables[10] == 63
game_percent = ("63%")
end
if $game_variables[10] == 64
game_percent = ("64%")
end
if $game_variables[10] == 65
game_percent = ("65%")
end
if $game_variables[10] == 66
game_percent = ("66%")
end
if $game_variables[10] == 67
game_percent = ("67%")
end
if $game_variables[10] == 68
game_percent = ("68%")
end
if $game_variables[10] == 69
game_percent = ("69%")
end
if $game_variables[10] == 70
game_percent = ("70%")
end
if $game_variables[10] == 71
game_percent = ("71%")
end
if $game_variables[10] == 72
game_percent = ("72%")
end
if $game_variables[10] == 73
game_percent = ("73%")
end
if $game_variables[10] == 75
game_percent = ("74%")
end
if $game_variables[10] == 75
game_percent = ("75%")
end
if $game_variables[10] == 76
game_percent = ("76%")
end
if $game_variables[10] == 77
game_percent = ("17%")
end
if $game_variables[10] == 78
game_percent = ("78%")
end
if $game_variables[10] == 79
game_percent = ("79%")
end
if $game_variables[10] == 80
game_percent = ("80%")
end
if $game_variables[10] == 81
game_percent = ("81%")
end
if $game_variables[10] == 82
game_percent = ("22%")
end
if $game_variables[10] == 83
game_percent = ("83%")
end
if $game_variables[10] == 84
game_percent = ("84%")
end
if $game_variables[10] == 85
game_percent = ("85%")
end
if $game_variables[10] == 86
game_percent = ("86%")
end
if $game_variables[10] == 87
game_percent = ("87%")
end
if $game_variables[10] == 88
game_percent = ("88%")
end
if $game_variables[10] == 89
game_percent = ("89%")
end
if $game_variables[10] == 90
game_percent = ("90%")
end
if $game_variables[10] == 91
game_percent = ("91%")
end
if $game_variables[10] == 92
game_percent = ("92%")
end
if $game_variables[10] == 93
game_percent = ("93%")
end
if $game_variables[10] == 94
game_percent = ("94%")
end
if $game_variables[10] == 95
game_percent = ("95%")
end
if $game_variables[10] == 96
game_percent = ("96%")
end
if $game_variables[10] == 97
game_percent = ("97%")
end
if $game_variables[10] == 98
game_percent = ("98%")
end
if $game_variables[10] == 99
game_percent = ("99%")
end
if $game_variables[10] == 100
game_percent = ("100%")
end
extras_percent = ("0%")
if $game_variables[9] == 1
extras_percent = ("1%")
end
if $game_variables[9] == 2
extras_percent = ("2%")
end
if $game_variables[9] == 3
extras_percent = ("3%")
end
if $game_variables[9] == 4
extras_percent = ("4%")
end
if $game_variables[9] == 5
extras_percent = ("5%")
end
if $game_variables[9] == 6
extras_percent = ("6%")
end
if $game_variables[9] == 7
extras_percent = ("7%")
end
if $game_variables[9] == 8
extras_percent = ("8%")
end
if $game_variables[9] == 9
extras_percent = ("9%")
end
if $game_variables[9] == 10
extras_percent = ("10%")
end
if $game_variables[9] == 11
extras_percent = ("11%")
end
if $game_variables[9] == 12
extras_percent = ("12%")
end
if $game_variables[9] == 13
extras_percent = ("13%")
end
if $game_variables[9] == 15
extras_percent = ("14%")
end
if $game_variables[9] == 15
extras_percent = ("15%")
end
if $game_variables[9] == 16
extras_percent = ("16%")
end
if $game_variables[9] == 17
extras_percent = ("17%")
end
if $game_variables[9] == 18
extras_percent = ("18%")
end
if $game_variables[9] == 19
extras_percent = ("19%")
end
if $game_variables[9] == 20
extras_percent = ("20%")
end
if $game_variables[9] == 21
extras_percent = ("21%")
end
if $game_variables[9] == 22
extras_percent = ("22%")
end
if $game_variables[9] == 23
extras_percent = ("23%")
end
if $game_variables[9] == 24
extras_percent = ("24%")
end
if $game_variables[9] == 25
extras_percent = ("25%")
end
if $game_variables[9] == 26
extras_percent = ("26%")
end
if $game_variables[9] == 27
extras_percent = ("27%")
end
if $game_variables[9] == 28
extras_percent = ("28%")
end
if $game_variables[9] == 29
extras_percent = ("29%")
end
if $game_variables[9] == 30
extras_percent = ("30%")
end
if $game_variables[9] == 31
extras_percent = ("31%")
end
if $game_variables[9] == 32
extras_percent = ("32%")
end
if $game_variables[9] == 33
extras_percent = ("33%")
end
if $game_variables[9] == 34
extras_percent = ("34%")
end
if $game_variables[9] == 35
extras_percent = ("35%")
end
if $game_variables[9] == 36
extras_percent = ("36%")
end
if $game_variables[9] == 37
extras_percent = ("37%")
end
if $game_variables[9] == 38
extras_percent = ("38%")
end
if $game_variables[9] == 39
extras_percent = ("39%")
end
if $game_variables[9] == 40
extras_percent = ("40%")
end
if $game_variables[9] == 41
extras_percent = ("41%")
end
if $game_variables[9] == 42
extras_percent = ("42%")
end
if $game_variables[9] == 43
extras_percent = ("43%")
end
if $game_variables[9] == 44
extras_percent = ("44%")
end
if $game_variables[9] == 45
extras_percent = ("45%")
end
if $game_variables[9] == 46
extras_percent = ("46%")
end
if $game_variables[9] == 47
extras_percent = ("47%")
end
if $game_variables[9] == 48
extras_percent = ("48%")
end
if $game_variables[9] == 49
extras_percent = ("49%")
end
if $game_variables[9] == 50
extras_percent = ("50%")
end
if $game_variables[9] == 51
extras_percent = ("51%")
end
if $game_variables[9] == 52
extras_percent = ("52%")
end
if $game_variables[9] == 53
extras_percent = ("53%")
end
if $game_variables[9] == 54
extras_percent = ("54%")
end
if $game_variables[9] == 55
extras_percent = ("55%")
end
if $game_variables[9] == 56
extras_percent = ("56%")
end
if $game_variables[9] == 57
extras_percent = ("57%")
end
if $game_variables[9] == 58
extras_percent = ("58%")
end
if $game_variables[9] == 59
extras_percent = ("59%")
end
if $game_variables[9] == 60
extras_percent = ("60%")
end
if $game_variables[9] == 61
extras_percent = ("61%")
end
if $game_variables[9] == 62
extras_percent = ("62%")
end
if $game_variables[9] == 63
extras_percent = ("63%")
end
if $game_variables[9] == 64
extras_percent = ("64%")
end
if $game_variables[9] == 65
extras_percent = ("65%")
end
if $game_variables[9] == 66
extras_percent = ("66%")
end
if $game_variables[9] == 67
extras_percent = ("67%")
end
if $game_variables[9] == 68
extras_percent = ("68%")
end
if $game_variables[9] == 69
extras_percent = ("69%")
end
if $game_variables[9] == 70
extras_percent = ("70%")
end
if $game_variables[9] == 71
extras_percent = ("71%")
end
if $game_variables[9] == 72
extras_percent = ("72%")
end
if $game_variables[9] == 73
extras_percent = ("73%")
end
if $game_variables[9] == 75
extras_percent = ("74%")
end
if $game_variables[9] == 75
extras_percent = ("75%")
end
if $game_variables[9] == 76
extras_percent = ("76%")
end
if $game_variables[9] == 77
extras_percent = ("17%")
end
if $game_variables[9] == 78
extras_percent = ("78%")
end
if $game_variables[9] == 79
extras_percent = ("79%")
end
if $game_variables[9] == 80
extras_percent = ("80%")
end
if $game_variables[9] == 81
extras_percent = ("81%")
end
if $game_variables[9] == 82
extras_percent = ("22%")
end
if $game_variables[9] == 83
extras_percent = ("83%")
end
if $game_variables[9] == 84
extras_percent = ("84%")
end
if $game_variables[9] == 85
extras_percent = ("85%")
end
if $game_variables[9] == 86
extras_percent = ("86%")
end
if $game_variables[9] == 87
extras_percent = ("87%")
end
if $game_variables[9] == 88
extras_percent = ("88%")
end
if $game_variables[9] == 89
extras_percent = ("89%")
end
if $game_variables[9] == 90
extras_percent = ("90%")
end
if $game_variables[9] == 91
extras_percent = ("91%")
end
if $game_variables[9] == 92
extras_percent = ("92%")
end
if $game_variables[9] == 93
extras_percent = ("93%")
end
if $game_variables[9] == 94
extras_percent = ("94%")
end
if $game_variables[9] == 95
extras_percent = ("95%")
end
if $game_variables[9] == 96
extras_percent = ("96%")
end
if $game_variables[9] == 97
extras_percent = ("97%")
end
if $game_variables[9] == 98
extras_percent = ("98%")
end
if $game_variables[9] == 99
extras_percent = ("99%")
end
if $game_variables[9] == 90
extras_percent = ("100%")
end
self.contents.font.color = system_color
self.contents.draw_text(15, -9, 320, 32, "Game Completion") # Text
if $game_switches[9] == true
self.contents.draw_text(15, 28, 320, 32, "Extras Completion") # Other Text
end
self.contents.font.color = normal_color
draw_gradient_bar(5, 20, $game_variables[10], 100, "025-SoftBlue01", width = 120, height = 8, hue = 0, back = "Back", back2 = "Back2")
if $game_switches[9] == true
draw_gradient_bar(5, 57, $game_variables[9], 100, "027-SoftReds01", width = 120, height = 8, hue = 0, back = "Back", back2 = "Back2")
self.contents.draw_text(60, 45, 320, 32, extras_percent) # Text Of The Game Percentage
end
self.contents.draw_text(60, 8, 320, 32, game_percent) # Text Of The Game Percentage
end
end
#==============================================================================
# ¡ Scene_Menu
#------------------------------------------------------------------------------
# Â@Æ’ÂÆ’jƒ…Â[‰æ–‚̈—‚ðÂs‚¤ƒNƒ‰ƒX‚Å‚·ÂB
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# ÂÅ“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰»
# menu_index : Æ’RÆ’}ƒ“ƒh‚̃JÂ[Æ’\ƒ‹Â‰Šúˆ’u
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ÂÅ“ Æ’ÂÆ’Cƒ“ˆ—Â
#--------------------------------------------------------------------------
def main
s1 = " Items" # 0
s2 = " Skills" # 1
if $game_switches[8] == true
s3 = " Materia" # 2
else
s3 = " "
end
s4 = " Equip" # 3
s5 = " Stats" # 4
if $game_switches[12] == true
s6 = " E-Mail" # 6
else
s6 = " "
end
s7 = " Quit Game" # 7
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.x = 480
@command_window.y = 0
@command_window.index = @menu_index
# Æ’pÂ[Æ’eÆ’BÂlÂâ€â€šÂª 0 Âl‚ÌÂê‡
if $game_party.actors.size == 0
# Checking To See If Anyone Is In Party and if not
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
#----------------------------------------------------
@icon_window = Window_MenuIcons.new
@icon_window.x = 480
@icon_window.y = 0
@icon_window.opacity = 0
#----------------------------------------------------
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 0
#----------------------------------------------------
@map_window = Window_Mapname.new
@map_window.x = 320
@map_window.y = 424
#----------------------------------------------------
@crystal_window = Window_Crystal.new
@crystal_window.x = 0
@crystal_window.y = 359
#----------------------------------------------------
@sheild_window = Window_GameTitle.new
@sheild_window.x = 320
@sheild_window.y = 359
#----------------------------------------------------
@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 359
#----------------------------------------------------
@percent_window = Window_GameCompletion.new
@percent_window.x = 480
@percent_window.y = 255
#----------------------------------------------------
@percent2_window = Window_GameCompletion2.new
@percent2_window.x = 480
@percent2_window.y = 255
@percent2_window.opacity = 0
#----------------------------------------------------
Graphics.transition
# Æ’ÂÆ’Cƒ“ƒ‹Â[Æ’v
loop do
# Æ’QÂ[ƒ€‰æ–‚ðÂXÂV
Graphics.update
# “ü—ÃÂî•ñ‚ðÂXÂV
Input.update
# Æ’tÆ’Å’Â[ƒ€ÂXÂV
update
# ‰æ–‚ªÂØ‚è‘Ö‚Ã*‚½‚烋Â[Æ’v‚ð’†’f
if $scene != self
break
end
end
# Æ’gƒ‰ƒ“ƒWÆ’Vƒ‡ƒ“€â€Ãµ
Graphics.freeze
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@command_window.dispose
@status_window.dispose
@map_window.dispose
@crystal_window.dispose
@sheild_window.dispose
@gold_window.dispose
@icon_window.dispose
@percent_window.dispose
@percent2_window.dispose
end
#--------------------------------------------------------------------------
# ÂÅ“ Æ’tÆ’Å’Â[ƒ€ÂXÂV
#--------------------------------------------------------------------------
def update
# Æ’EÆ’Bƒ“ƒhÆ’E‚ðÂXÂV
@command_window.update
@status_window.update
@map_window.update
@crystal_window.update
@sheild_window.update
@gold_window.update
@icon_window.update
@percent_window.update
@percent2_window.update
# Æ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚ªƒAÆ’NÆ’eÆ’BÆ’u‚ÌÂê‡: update_command ‚ðŒÄ‚Ô
if @command_window.active
update_command
return
end
# Æ’XÆ’eÂ[Æ’^Æ’XÆ’EÆ’Bƒ“ƒhÆ’E‚ªƒAÆ’NÆ’eÆ’BÆ’u‚ÌÂê‡: update_status ‚ðŒÄ‚Ô
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# ÂÅ“ Æ’tÆ’Å’Â[ƒ€ÂXÂV (Æ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚ªƒAÆ’NÆ’eÆ’BÆ’u‚ÌÂê‡)
#--------------------------------------------------------------------------
def update_command
# B Æ’{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽÂê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# Æ’}Æ’bÆ’v‰æ–‚ÉÂØ‚è‘Ö‚¦
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
# Æ’uÆ’UÂ[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
#---------------------------------------------------------
case @command_window.index
when 0 # Item
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1 # Skills
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # Materia
if $game_switches[8] == true
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
else
end
when 3 # Equip
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4 #Status
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 5 # Mail
if $game_switches[12] == true
$game_system.se_play($data_system.decision_se)
$scene = Scene_Mail.new
else
end
when 6 # Quit
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
return
end
end
#--------------------------------------------------------------------------
# ÂÅ“ Æ’tÆ’Å’Â[ƒ€ÂXÂV (Æ’XÆ’eÂ[Æ’^Æ’XÆ’EÆ’Bƒ“ƒhÆ’E‚ªƒAÆ’NÆ’eÆ’BÆ’u‚ÌÂê‡)
#--------------------------------------------------------------------------
def update_status
# B Æ’{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽÂê‡
if Input.trigger?(Input::B)
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# C Æ’{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽÂê‡
if Input.trigger?(Input::C)
# Æ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚̃JÂ[Æ’\ƒ‹ˆ’u‚Å•ªŠò
case @command_window.index
when 1 # Skill
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2 # Materia
$game_system.se_play($data_system.decision_se)
$scene = Scene_MagicEquip.new(@status_window.index)
when 3 # Equip
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 4 # Status
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
end
-Instrucciones: Pegar encima de Main y listo. -Creditos: Creditos Obligatorios a Leon Blade. |
|
#93
|
||||
|
||||
|
EDIT:Supongo que este pedido era muy dificil bueno si alguien tiene sprites de batalla de un paladin o un caballero negro por favor posteenlos o mandenmelos por MP.
Bueno en esta ocacion quisiera saber si alguien tiene algunos SPRITES o CHARAS de un TOMBERI (Si no lo saben un tomberi es un monstruo tipico de los final fantasy una imagen por si acaso [SPOILER] [/SPOILER]
Última edición por rex22 fecha: 27-ago-2010 a las 22:28. Razón: No hacer spam XD |
|
#94
|
||||
|
||||
|
Hola makeros y makeras.
Necesito unos scripts para VX urgente por que boy a sacar mi beta de The World Of Fairies Bueno empiezo. 1- Un script de pet systen en español. (Sistema de mascota) 2- Un script de intercambiar objetos entre dos juegos diferentes, los dos tienen k tener el script claroo. Y como solo puedo 2 en un mismo mensaje aki acabo. Todabia estoy esperando a k me respondan mi duda Esta aki: [SPOILER]Gracias T.L por el script de enemigo con efecto de respiracion, pero me pone esto cuando empieza la batalla: ![]() Si alguien me puede ayudar a arreglarlo me aria un gran favor, ya que estoy apunto de sacar mi beta[/SPOILER] Ruego que me respondan rrapido por que lo e pedido muchas beces y pasan de mi... |
|
#95
|
||||
|
||||
|
Tengo una peticion de BatleBacks(No se si lo escribi bien);
-Un acantilado -Un acantilado Oscuro -Un acantiladao con vista de un paisaje -Un jardin -Un campo de flores -Una cascada -Un jardin "Japones" (De preferencia con cerezos rosados) -Un cementerio -Una casa embrujada Nota: Si tienen la misma calidad que los que trae XP por Default, mucho mejor |
|
#96
|
|||
|
|||
|
Hola a todos^^.
Necesito un script de barras de vida,magia y experiencia en batalla para los personajes por favor. Gracias al quien me responda^^. |
|
#97
|
||||
|
||||
|
Cita:
Cita:
Cita:
Código:
# HP/SP/EXPゲージ表示スクリプト Ver 1.00
# 配布元・サポートURL
# http://members.jcom.home.ne.jp/cogwheel/
#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
# アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
# の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
#==============================================================================
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# ゲーム中のすべてのウィンドウのスーパークラスです。
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● HP ゲージの描画
#--------------------------------------------------------------------------
# オリジナルのHP描画を draw_actor_hp_hpsp と名前変更
alias :draw_actor_hp_hpsp :draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
# 変数rateに 現在のHP/MHPを代入
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
# plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
# plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
# align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
# align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
# align3:ゲージタイプ 0:左詰め 1:右詰め
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# グラデーション設定 grade1:空ゲージ grade2:実ゲージ
# (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
grade1 = 1
grade2 = 0
# 色設定。color1:外枠,color2:中枠
# color3:空ゲージダークカラー,color4:空ゲージライトカラー
# color5:実ゲージダークカラー,color6:実ゲージライトカラー
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(64, 0, 0, 192)
color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
# 変数spに描画するゲージの幅を代入
if actor.maxhp != 0
hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
else
hp = 0
end
# ゲージの描画
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, hp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# オリジナルのHP描画処理を呼び出し
draw_actor_hp_hpsp(actor, x, y, width)
end
#--------------------------------------------------------------------------
# ● SP ゲージの描画
#--------------------------------------------------------------------------
# オリジナルのSP描画を draw_actor_sp_hpsp と名前変更
alias :draw_actor_sp_hpsp :draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
# 変数rateに 現在のSP/MSPを代入
if actor.maxsp != 0
rate = actor.sp.to_f / actor.maxsp
else
rate = 1
end
# plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
# plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
# align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
# align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
# align3:ゲージタイプ 0:左詰め 1:右詰め
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# グラデーション設定 grade1:空ゲージ grade2:実ゲージ
# (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
grade1 = 1
grade2 = 0
# 色設定。color1:外枠,color2:中枠
# color3:空ゲージダークカラー,color4:空ゲージライトカラー
# color5:実ゲージダークカラー,color6:実ゲージライトカラー
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(0, 64, 0, 192)
color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
# 変数spに描画するゲージの幅を代入
if actor.maxsp != 0
sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
else
sp = (width + plus_width) * rate_width / 100
end
# ゲージの描画
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, sp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# オリジナルのSP描画処理を呼び出し
draw_actor_sp_hpsp(actor, x, y, width)
end
#--------------------------------------------------------------------------
# ● EXP ゲージの描画
#--------------------------------------------------------------------------
# オリジナルのEXP描画を draw_actor_sp_hpsp と名前変更
alias :draw_actor_exp_hpsp :draw_actor_exp
def draw_actor_exp(actor, x, y, width = 204)
# 変数rateに 現在のexp/nextexpを代入
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
# plus_x:X座標の位置補正 rate_x:X座標の位置補正(%) plus_y:Y座標の位置補正
# plus_width:幅の補正 rate_width:幅の補正(%) height:縦幅
# align1:描画タイプ1 0:左詰め 1:中央揃え 2:右詰め
# align2:描画タイプ2 0:上詰め 1:中央揃え 2:下詰め
# align3:ゲージタイプ 0:左詰め 1:右詰め
plus_x = 0
rate_x = 0
plus_y = 25
plus_width = 0
rate_width = 100
height = 10
align1 = 1
align2 = 2
align3 = 0
# グラデーション設定 grade1:空ゲージ grade2:実ゲージ
# (0:横にグラデーション 1:縦にグラデーション 2:斜めにグラデーション(激重))
grade1 = 1
grade2 = 0
# 色設定。color1:外枠,color2:中枠
# color3:空ゲージダークカラー,color4:空ゲージライトカラー
# color5:実ゲージダークカラー,color6:実ゲージライトカラー
color1 = Color.new(0, 0, 0, 192)
color2 = Color.new(255, 255, 192, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(64, 0, 0, 192)
color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
# 変数expに描画するゲージの幅を代入
if actor.next_exp != 0
exp = (width + plus_width) * actor.now_exp * rate_width /
100 / actor.next_exp
else
exp = (width + plus_width) * rate_width / 100
end
# ゲージの描画
gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
width, plus_width + width * rate_width / 100,
height, exp, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
# オリジナルのEXP描画処理を呼び出し
draw_actor_exp_hpsp(actor, x, y)
end
#--------------------------------------------------------------------------
# ● ゲージの描画
#--------------------------------------------------------------------------
def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
color1, color2, color3, color4, color5, color6, grade1, grade2)
case align1
when 1
x += (rect_width - width) / 2
when 2
x += rect_width - width
end
case align2
when 1
y -= height / 2
when 2
y -= height
end
# 枠描画
self.contents.fill_rect(x, y, width, height, color1)
self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
if align3 == 0
if grade1 == 2
grade1 = 3
end
if grade2 == 2
grade2 = 3
end
end
if (align3 == 1 and grade1 == 0) or grade1 > 0
color = color3
color3 = color4
color4 = color
end
if (align3 == 1 and grade2 == 0) or grade2 > 0
color = color5
color5 = color6
color6 = color
end
# 空ゲージの描画
self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
color3, color4, grade1)
if align3 == 1
x += width - gauge
end
# 実ゲージの描画
self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
color5, color6, grade2)
end
end
#------------------------------------------------------------------------------
# Bitmapクラスに新たな機能を追加します。
#==============================================================================
class Bitmap
#--------------------------------------------------------------------------
# ● 矩形をグラデーション表示
# color1 : スタートカラー
# color2 : エンドカラー
# align : 0:横にグラデーション
# 1:縦にグラデーション
# 2:斜めにグラデーション(激重につき注意)
#--------------------------------------------------------------------------
def gradation_rect(x, y, width, height, color1, color2, align = 0)
if align == 0
for i in x...x + width
red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
green = color1.green +
(color2.green - color1.green) * (i - x) / (width - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - x) / (width - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - x) / (width - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(i, y, 1, height, color)
end
elsif align == 1
for i in y...y + height
red = color1.red +
(color2.red - color1.red) * (i - y) / (height - 1)
green = color1.green +
(color2.green - color1.green) * (i - y) / (height - 1)
blue = color1.blue +
(color2.blue - color1.blue) * (i - y) / (height - 1)
alpha = color1.alpha +
(color2.alpha - color1.alpha) * (i - y) / (height - 1)
color = Color.new(red, green, blue, alpha)
fill_rect(x, i, width, 1, color)
end
elsif align == 2
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
elsif align == 3
for i in x...x + width
for j in y...y + height
red = color1.red + (color2.red - color1.red) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
green = color1.green + (color2.green - color1.green) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
blue = color1.blue + (color2.blue - color1.blue) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
alpha = color1.alpha + (color2.alpha - color1.alpha) *
((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
color = Color.new(red, green, blue, alpha)
set_pixel(i, j, color)
end
end
end
end
end
|
|
#98
|
||||
|
||||
|
Necesito un script para mapa rebace los 500 X 500 cuadros para mi proyecto
Gracias de antemano Y para no hacer SPAM Nombre del script:Facciones Version del script:2.0.1. RPG del script:Rpg Maker VX Descripcion:Me recuerda al fable eres bueno o malo, o al estilo gta 2 que si matadas miembros de una banda eras mas miembro de la otra. Decarga:http://dc177.4shared.com/download/AL...80909-f5a3fdf4 Bueno ![]() Malo
|
|
#99
|
||||
|
||||
|
Gracias por el Chara del tomberi
ahora mi siguiente pedido es: Quiero SPRITES de un PALADIN y de un CABALLERO NEGRO (DARK KNIGHT) que NO SEAN LOS DE RAGNAROK ONLINE. |
|
#100
|
|||
|
|||
|
Cita:
|
![]() |
|
|
Temas Similares para: ◄ Base de datos de Scripts & Recursos/Tutoriales a La carta [Pedidos V6] ►
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| ►►►club ®all ¤ ¤ ¤ Star®◄◄◄ ►►► Anime◄◄◄ | narutashi | Clubs | 121 | 28-ago-2010 21:31 |
| - Base de datos de Scripts & Recursos a La carta [Pedidos V5] - | Miwel~ | RPG Maker | 293 | 11-ago-2010 23:01 |
| Tema Oficial De◄◄The World Ends With You►► | elmastercarlos | Nintendo DS | 31 | 04-ago-2010 16:03 |
| ►►►►®Company De§ing§ U§erbar§©®◄◄◄◄ | Lєσиcs | Talleres | 14 | 28-oct-2009 15:18 |
| ►►► Trucos Rapidshare FUNCIONAN! ◄◄◄ | borjolujo | Descargas directas | 12 | 22-mar-2008 01:44 |