¡Bienvenido a Universo Maker!
¿Es esta la primera vez que visitas el foro? Si es así te recomendamos que te registres para tener completo acceso a todas las áreas y secciones del foro, así también podrás participar activamente en la comunidad. Si ya tienes una cuenta, conectate cuanto antes.
Iniciar Sesión Registrarme

No estás conectado. Conéctate o registrate

Ver el tema anterior Ver el tema siguiente Ir abajo Mensaje [Página 1 de 1.]

#1 [Script XP] Tipos de Magia el Miér Jul 03, 2013 8:04 pm

Vict0

avatar
Hola a todos, aqui les traigo otro script que a muchos les recordara a los juegos de Final Fantasy:
Tipos de Magia
Autor:KCG
Función:
Clasifica las magias, técnicas, hechizos, etc...
Instrucciones para la utilización del Script:
- Vete a base de datos y ve a Sistema
- Crea 4 nuevos atributos y llámalos "Técnica", "Magia Negra", "Magia Blanca",
- "Hechizo"
- Ahora vete a la sección de Habilidades y le agregas los atributos creados a
las habilidades y magias. Ej: a la magia Cura le ponemos el atributo
"Magia Blanca" y así con todos.
Script:
Código:
#==============================================================================
# Script: Clasificacion de Habilidades y Magias.
# ==> Hecho por: KCG
# ==> Traducido por: Lancelot
#==============================================================================
module KGC
# Agregar los atributos o elementos que deseas.
SG_ELEMENTS = ["Tecnica", "Magia Negra", "Magia Curativa", "Hechizo", 0]
#------------------------------------------------------------------------------
# Poner el nombre que va a corresponder a cada seccion.
SG_NAME = ["Tecnicas", "M.Negras", "M.Curativa", "Hechizos", "Mostrar todos"]
#------------------------------------------------------------------------------
# Poner la ayuda que va a corresponder a cada seccion.
SG_HELP = ["Muestra todas las Tecnicas que posees",
"Muestra todas las Magias de ataque que posees",
"Muestra todas las Magias Curativas que posees",
"Muestra todos los Hechizos y Embrujos que posees",
"Muestra todas las Tecnicas, Magias y Hechizos que posees"]
#------------------------------------------------------------------------------
# Esto corresponde cuando estas en batalla.
# Agregar los atributos o elementos que deseas.
SG_ELEMENTS_BATTLE = ["Tecnica", "Magia Negra", "Magia Curativa", "Hechizo", 0]
#------------------------------------------------------------------------------
# Poner el nombre que va a corresponder a cada seccion.
SG_NAME_BATTLE = ["Tecnicas", "M.Negras", "M.Curativa", "Hechizos", "Mostrar todos"]
#------------------------------------------------------------------------------
# Poner la ayuda que va a corresponder a cada seccion.
SG_HELP_BATTLE = ["Muestra todas las Tecnicas que posees",
"Muestra todas las Magias de ataque que posees",
"Muestra todas las Magias Curativas que posees",
"Muestra todos los Hechizos y Embrujos que posees",
"Muestra todas las Tecnicas, Magias y Hechizos que posees"]
end
#==============================================================================
$game_special_elements = {}
$imported = {}
$data_states = load_data("Data/States.rxdata")
$data_system = load_data("Data/System.rxdata")
$imported["SkillGrouping"] = true
#==============================================================================
module KGC
SKILL_GROUP = []; SG_BATTLE = []
for i in 0...SG_ELEMENTS.size
if SG_ELEMENTS[i] == 0
SKILL_GROUP[i] = 0
next
end
key = "skill_group_#{i}}"
$game_special_elements[key] = $data_system.elements.index(SG_ELEMENTS[i])
SKILL_GROUP[i] = $game_special_elements[key]
end
for i in 0...SG_ELEMENTS_BATTLE.size
if SG_ELEMENTS_BATTLE[i] == 0
SG_BATTLE[i] = 0
next
end
key = "skill_group_battle_#{i}}"
$game_special_elements[key] = $data_system.elements.index(SG_ELEMENTS_BATTLE[i])
SG_BATTLE[i] = $game_special_elements[key]
end
end

#==============================================================================
# Window_Skill
#==============================================================================

class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
alias initialize_KGC_SkillGrouping initialize
def initialize(actor)
@group = $game_temp.in_battle ? KGC::SG_BATTLE : KGC::SKILL_GROUP
initialize_KGC_SkillGrouping(actor)
unless $game_temp.in_battle
self.y += 64
self.height -= 64
end
self.index = -1
self.active = false
end
#--------------------------------------------------------------------------
def refresh(skillkind = 0)
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @group[skillkind] != 0
for i in 0...@actor.skills.size
if $data_skills[@actor.skills[i]].element_set.include?(@group[skillkind])
@data.push($data_skills[@actor.skills[i]])
end
end
else
for i in 0...@actor.skills.size
@data.push($data_skills[@actor.skills[i]])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
end

#==============================================================================
# ¦ Window_SkillStatus
#------------------------------------------------------------------------------
class Window_SkillStatus < Window_Base
#--------------------------------------------------------------------------
# - Inicio de Objetos...
# actor : Personaje
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 128, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# - Actualizacion
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_state(@actor, 140, 0)
draw_actor_hp(@actor, 284, 0)
draw_actor_sp(@actor, 460, 0)
end
end

#==============================================================================
# Window_SkillGroup
#==============================================================================

class Window_SkillGroup < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 64, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@commands = []
for name in ($game_temp.in_battle ? KGC::SG_NAME_BATTLE : KGC::SG_NAME)
@commands.push(name)
end
@item_max = @commands.size
@column_max = @commands.size
@item_width = (width - 32) / @commands.size
self.index = 0
if $game_temp.in_battle
@help_text = KGC::SG_HELP_BATTLE
self.y = 0 unless $imported["HelpExtension"]
else
@help_text = KGC::SG_HELP
end
self.z = 2000
refresh
end
#--------------------------------------------------------------------------
def refresh
for i in 0...@commands.size
rect = Rect.new(@item_width * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.draw_text(rect, @commands[i], 1)
end
end
#--------------------------------------------------------------------------
def update_cursor_rect
if index != -1
self.cursor_rect.set(@item_width * index, 0, @item_width, 32)
end
end
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(@help_text[self.index])
end
end

#==============================================================================
# Scene_Skill
#==============================================================================

class Scene_Skill
#--------------------------------------------------------------------------
alias main_KGC_SkillGrouping main
def main
@group_window = Window_SkillGroup.new
if $imported["MenuAlter"] && KGC::MA_MENU_TRANSPARENT
@group_window.back_opacity = 160
end
@group_window.y = 64
main_KGC_SkillGrouping
@group_window.dispose
end
#--------------------------------------------------------------------------
def update
unless @window_initialize
@status_window.y = 128
@target_window.z = 2100
@group_window.help_window = @help_window
if $imported["MenuAlter"] && KGC::MA_MENU_TRANSPARENT
@help_window.back_opacity = 160
end
@window_initialize = true
end
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
@group_window.update
if @skill_window.active
update_skill
return
end
if @target_window.active
update_target
return
end
if @group_window.active
update_group
return
end
end
#--------------------------------------------------------------------------
alias update_skill_KGC_SkillGrouping update_skill
def update_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@group_window.active = true
@group_window.visible = true
@skill_window.active = false
@skill_window.index = -1
return
end
update_skill_KGC_SkillGrouping
end
#--------------------------------------------------------------------------
def update_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
if Input.trigger?(Input::C)
unless @actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
if @target_window.index <= -2
target = $game_party.actors[@target_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.skill_effect(@actor, @skill)
end
if used
$game_system.se_play(@skill.menu_se)
if $imported["SPCostAlter"]
use_sp
else
@actor.sp -= @skill.sp_cost
end
@status_window.refresh
@skill_window.refresh(@group_window.index)
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$scene = Scene_Map.new
return
end
else
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
def update_group
if @now_skillkind != @group_window.index
@skill_window.refresh(@group_window.index)
@now_skillkind = @group_window.index
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(1)
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@skill_window.active = true
@skill_window.index = 0
@group_window.active = false
@group_window.visible = false if $imported["HelpExtension"]
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
$scene = Scene_Skill.new(@actor_index)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
$scene = Scene_Skill.new(@actor_index)
return
end
end
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
def update_phase3_skill_select
@skill_window.visible = true
if @skill_group_select
@help_window.visible = false unless $imported["HelpExtension"]
@skill_window.active = false
@skill_group_window.visible = true
@skill_group_window.active = true
else
@help_window.visible = true unless $imported["HelpExtension"]
@skill_window.active = true
@skill_group_window.visible = false
@skill_group_window.active = false
end
@skill_window.update
@skill_group_window.update
if @now_skillkind != @skill_group_window.index
@skill_window.refresh(@skill_group_window.index)
@now_skillkind = @skill_group_window.index
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
if @skill_group_select
end_skill_select
else
@skill_group_select = true
@skill_window.index = -1
end
return
end
if Input.trigger?(Input::C)
if @skill_group_select
$game_system.se_play($data_system.decision_se)
@skill_group_select = false
@skill_window.index = 0
else
@skill = @skill_window.skill
if @skill == nil || !@active_battler.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @help_window2 != nil
@help_window2.visible = false
else
@help_window.visible = false
end
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.skill_id = @skill.id
@skill_window.visible = false
if @skill.scope == 1
start_enemy_select
elsif @skill.scope == 3 or @skill.scope == 5
start_actor_select
else
end_skill_select
phase3_next_actor
end
end
return
end
end
#--------------------------------------------------------------------------
alias start_skill_select_KGC_SkillGrouping start_skill_select
def start_skill_select
start_skill_select_KGC_SkillGrouping
@skill_group_window = Window_SkillGroup.new
@skill_group_window.back_opacity = 160
@skill_group_window.y = @help_window2 != nil ? 64 : 0
@skill_group_select = true
@now_skillkind = nil
if @help_window2 != nil
@skill_group_window.help_window = @help_window2
elsif $imported["HelpExtension"]
@skill_group_window.help_window = @help_window
end
end
#--------------------------------------------------------------------------
alias end_skill_select_KGC_SkillGrouping end_skill_select
def end_skill_select
end_skill_select_KGC_SkillGrouping
@skill_group_window.dispose
@skill_group_window = nil
end
end
Espero que les sea útil ¡Nos vemos!

#2 Re: [Script XP] Tipos de Magia el Jue Jul 04, 2013 12:15 pm

Kite Rembrandt

avatar
Muy bueno el aporte, creo que voy a probarlo

#3 Re: [Script XP] Tipos de Magia el Sáb Jul 06, 2013 2:43 am

Cuervoso

avatar
Buen aporte, es un pequeño detalle que le hace la vida más fácil al jugador xD.

+1 Makeda.

Saludos.






Cuervoso! No te pases ¬_¬

Contenido patrocinado


Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.