Quedada del ChatBox
Conectarse
Estadísticas
Tenemos 2162 miembros registrados.El último usuario registrado es chichox.
Nuestros miembros han publicado un total de 37850 mensajes en 4923 argumentos.
Últimos temas
» No tienes photoshop? - PIXLRpor Leaser Hoy a las 6:11 pm
» Relato de Seytan
por mrhawi Hoy a las 5:46 pm
» Pequeño tilemap de Pokemon
por Wecoc Hoy a las 5:39 pm
» Vehiculos por agua
por orochii Hoy a las 5:30 pm
» Denme su opinión sobre este sprite
por mrhawi Hoy a las 5:13 pm
» Saludos gente
por orochii Hoy a las 4:43 pm
» CONCURSO DE TROFEOS (Nº2)
por EdénTheGame Hoy a las 4:40 pm
» script Titulo animado -Modificacion-
por Felipe_9595 Hoy a las 4:27 pm
» Galeria de Dibujos
por Wecoc Hoy a las 3:32 pm
» D.R.E.A.M.S [RPGXP] [DEMO 2.0!]
por ZeroTwilight Hoy a las 3:05 pm
Temas importantes
----------------------------------------
Páginas con recursos RPG Maker
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
Topic de screens----------------------------------------
[RPGVX] dos armas- arma y escudo
[RPGVX] dos armas- arma y escudo
Buenas, les vengo con un script para mi bastante util. Es solo un detalle, pero que suma bastante. Su funcion? A los que pueden usar dos armas (que si asi es no puede usar escudo) le da la posibilidad de usar escudo y un arma o sino obviamente dos armas. Tambien permite cambiar el arma/escudo de mano (siempre es: arma principal en la izquierda y escudo en la derecha). Esto ultimo es un detalle dentro de este script que de por si es un detalle, pero bueno xD.
El script es:
Para el que no entendio y resumirselo, esto hace que al tener la opcion "dos armas" haga las dos manos totalmente utiles, y no solo apta para armas. (eso si, no se pueden poner dos escudos al mismo tiempo).
En fin, ahora si, saludos n.n.
El script es:
- Spoiler:
- #==============================================================================
# ** ExEquip_BothHanded (AEROGP)
#------------------------------------------------------------------------------
# This script grants the ability to use a shield, as well as equip it in the
# weapon slot instead of the shield slot, when "two swords style" is enabled.
#==============================================================================
class Game_Actor < Game_Battler
alias _exebthd_initialize initialize unless $@
#--------------------------------------------------------------------------
# * Object Initialization
# actor_id : actor ID
#--------------------------------------------------------------------------
def initialize(actor_id)
_exebthd_initialize(actor_id)
@weapon_class = RPG::Weapon
@armor1_class = two_swords_style ? RPG::Weapon : RPG::Armor
end
#--------------------------------------------------------------------------
# * Get Weapon Object Array (Redefined)
#--------------------------------------------------------------------------
def weapons
result = []
if @weapon_class == RPG::Weapon
result.push($data_weapons[@weapon_id])
end
if @armor1_class == RPG::Weapon
result.push($data_weapons[@armor1_id])
end
return result
end
#--------------------------------------------------------------------------
# * Get Armor Object Array (Redefined)
#--------------------------------------------------------------------------
def armors
result = []
if @weapon_class == RPG::Armor
result.push($data_armors[@weapon_id])
end
if @armor1_class == RPG::Armor
result.push($data_armors[@armor1_id])
end
result.push($data_armors[@armor2_id])
result.push($data_armors[@armor3_id])
result.push($data_armors[@armor4_id])
return result
end
#--------------------------------------------------------------------------
# * Get Left-Hand Object
#--------------------------------------------------------------------------
def left_hand
result = [nil]
if @weapon_class == RPG::Weapon
result = [$data_weapons[@weapon_id]]
end
if @weapon_class == RPG::Armor
result = [$data_armors[@weapon_id]]
end
return result
end
#--------------------------------------------------------------------------
# * Get Right-Hand Object
#--------------------------------------------------------------------------
def right_hand
result = [nil]
if @armor1_class == RPG::Weapon
result = [$data_weapons[@armor1_id]]
end
if @armor1_class == RPG::Armor
result = [$data_armors[@armor1_id]]
end
return result
end
#--------------------------------------------------------------------------
# * Get Body Armor Object Array
#--------------------------------------------------------------------------
def body_armors
result = []
result.push($data_armors[@armor2_id])
result.push($data_armors[@armor3_id])
result.push($data_armors[@armor4_id])
return result
end
#--------------------------------------------------------------------------
# * Get Equipped Item Object Array (Redefined)
#--------------------------------------------------------------------------
def equips
return left_hand + right_hand + body_armors
end
#--------------------------------------------------------------------------
# * Change Equipment (Definition added)
# equip_type : Equip region (0..4)
# item : Weapon or armor (nil is used to unequip)
# test : Test flag (for battle test or temporary equipment)
#--------------------------------------------------------------------------
def change_equip(equip_type, item, test = false)
last_item = equips[equip_type]
unless test
return if $game_party.item_number(item) == 0 if item != nil
$game_party.gain_item(last_item, 1)
$game_party.lose_item(item, 1)
end
item_id = item == nil ? 0 : item.id
case equip_type
when 0 # Weapon / Weapon 1
@weapon_id = item_id
if two_swords_style and item != nil # If two swords style
@weapon_class = item.class
unless shield_legal? # If shield is not allowed
change_equip(1, nil, test) # Unequip from other hand
end
end
unless two_hands_legal? # If two hands is not allowed
change_equip(1, nil, test) # Unequip from other hand
end
when 1 # Shield / Weapon 2
@armor1_id = item_id
if two_swords_style and item != nil # If two swords style
@armor1_class = item.class
unless shield_legal? # If shield is not allowed
change_equip(0, nil, test) # Unequip from other hand
end
end
unless two_hands_legal? # If two hands is not allowed
change_equip(0, nil, test) # Unequip from other hand
end
when 2 # Head
@armor2_id = item_id
when 3 # Body
@armor3_id = item_id
when 4 # Accessory
@armor4_id = item_id
end
end
#--------------------------------------------------------------------------
# * Discard Equipment (Redefined)
# item : Weapon or armor to be discarded.
# Used when the "Include Equipment" option is enabled.
#--------------------------------------------------------------------------
def discard_equip(item)
if item.is_a?(RPG::Weapon)
if @weapon_class == item.class and @weapon_id == item.id
@weapon_id = 0
elsif @armor1_class == item.class and @armor1_id == item.id
@armor1_id = 0
end
elsif item.is_a?(RPG::Armor)
if @weapon_class == item.class and @weapon_id == item.id
@weapon_id = 0
elsif @armor1_class == item.class and @armor1_id == item.id
@armor1_id = 0
elsif @armor2_id == item.id
@armor2_id = 0
elsif @armor3_id == item.id
@armor3_id = 0
elsif @armor4_id == item.id
@armor4_id = 0
end
end
end
#--------------------------------------------------------------------------
# * Determine if Shield is Usable
#--------------------------------------------------------------------------
def shield_legal?
if @weapon_id != 0 and @weapon_class == RPG::Armor
return false if @armor1_class == RPG::Armor
end
if @armor1_id != 0 and @armor1_class == RPG::Armor
return false if @weapon_class == RPG::Armor
end
return true
end
#--------------------------------------------------------------------------
# * Determine if Equippable (Redefined)
# item : item
#--------------------------------------------------------------------------
def equippable?(item)
if item.is_a?(RPG::Weapon)
return self.class.weapon_set.include?(item.id)
elsif item.is_a?(RPG::Armor)
return self.class.armor_set.include?(item.id)
end
return false
end
end
class Window_EquipItem < Window_Item
#--------------------------------------------------------------------------
# * Whether to include item in list (Redefined)
# item : item
#--------------------------------------------------------------------------
def include?(item)
return true if item == nil
if @equip_type == 0
if @actor.two_swords_style
return false if item.is_a?(RPG::Armor) and item.kind > 0
else
return false unless item.is_a?(RPG::Weapon)
end
else
return false unless item.is_a?(RPG::Armor)
return false unless item.kind == @equip_type - 1
end
return @actor.equippable?(item)
end
end
Para el que no entendio y resumirselo, esto hace que al tener la opcion "dos armas" haga las dos manos totalmente utiles, y no solo apta para armas. (eso si, no se pueden poner dos escudos al mismo tiempo).
En fin, ahora si, saludos n.n.

Shirono- Principiante

-

445
Re: [RPGVX] dos armas- arma y escudo
Interesante script, no lo conocia o.O
Estas haciendo muy buenos aportes ultimamente, sigue asi tio ^^
Estas haciendo muy buenos aportes ultimamente, sigue asi tio ^^
Permiso de este foro:
No puedes responder a temas en este foro.















por Shirono el Mar Oct 05, 2010 8:40 pm
