Ú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: Clases de objetos
3 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
Script: Clases de objetos
Este es un script que me encontré en una pagina en ingles (http://rmrk.net/index.php?board=99.0), y tuve que sudar sangre para conseguirlo, ya que al copiar y pegar el texto del script, me desaparecieron todas las separaciones (osea que estaba todo junto, como si no le hubieran dado al "enter") y tuve que darle al intro cientos de veces fijandome en la pagina para saber cómo era. el caso esque tengo ya por fin el script, funciona perfectamente por lo menos a mi, así que si hay algun problema me lo decis. He traducido un parrafo para los que no saben ingles que sepan mas o menos como funciona, tambien voy a subir otro script que es para clasificar las habilidades, en breves momentos estara tambien subido (en otro tema, claro)
He aquí el script:
espero que les sirva, cualquier duda ya saben donde estoy
He aquí el script:
- Código:
#===============================================================================
#
# Cozziekuns Simple Sort Inventory
# Last Date Updated: 6/01/2010
#
# Like in Tales of Phantasia, this inventory allows you to sort your items in # the categories: All, Items, Weapons and Armours.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 06/01/10 - Created Script.
# o 06/01/10 - Updated with Modern Algebra's recommendations.
# o 06/01/10 - Once again updated with Modern Algebra's recommendations.
# o 08/27/10 - Updated with Scrolling support. Thanks kawagiri for the idea, and
# Modern Algebra for some help.
#===============================================================================
# What's to come?
# -----------------------------------------------------------------------------
# o Nothing! Suggest something.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
# Change the modules to your liking. The "hard" parts have instructions of their
# own.
#===============================================================================
$imported = {} if $imported == nil
$imported["CozSimplSortInvent"] = true
module COZZIEKUNS
module SSI
CATEGORY_TEXT = "Cat.:"
#===============================================================================
# Extra Item Categories (Inspired by Modern Algebra)
# ------------------------------------------------------------------------------
# How should I go about explaining something like this? Well, basically, each
# item in the hash represents a certain category. For example, the first hash we
# see here is:
#
# 0 => [144, "All", false]
#
# The syntax of this is:
#
# Category ID => [Nº del icono, Nombre de la categoría, Principal]
#
# Para que un objeto forme parte de una categoría en concreto, hay que escribir
# el siguiente texto en los "comentarios" del objeto, en la base de datos:
#
# \item_category[4]
#
# Las categorías 0, 1, 2 y 3 son especiales, no pueden ser desactivadas ni quitar
# los objetos de esa categoría.
#===============================================================================
MOD_ALG_ITEM_CATEGORIES = {
0 => [144, "Todo", false],
1 => [64, "Items", false],
2 => [26, "Armas", false],
3 => [40, "Protectores", false],
4 => [80, "Objetos clave", false],
5 => [90, "---", false],
6 => [92, "---", false],
7 => [32, "---", false],
}
MOD_ALG_ITEM_CATEGORY_WIDTH = 220 # How wide you want your text window.
KYRIAKI_ALL_CATEOGRY_PRIME = false # If you want prime key items to show up in the all window.
end
end
#==============================================================================
# ** RPG::BaseItem
#------------------------------------------------------------------------------
# The superclass of all states.
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# * Cozziekuns Category Index
#--------------------------------------------------------------------------
def coz_modalg_category_index
@coz_modalg_category_index = 0
if self.note[/\\item_category\[(\d+)]/i] != nil
@coz_modalg_category_index = $1.to_i
end
return @coz_modalg_category_index
end
end
#==============================================================================
# ** Window_Item
#------------------------------------------------------------------------------
# This window displays a list of inventory items for the item screen, etc.
#==============================================================================
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
alias coz_modalg_ssi_refresh refresh
def refresh(sort_index = 0)
@sort_index = sort_index
coz_modalg_ssi_refresh
end
#--------------------------------------------------------------------------
# * Whether or not to include in item list
# item : item
#--------------------------------------------------------------------------
alias coz_modalg_ssi_include? include?
def include?(item)
val = coz_modalg_ssi_include?(item)
return false if !val
return case @sort_index
when 0
unless COZZIEKUNS::SSI::KYRIAKI_ALL_CATEOGRY_PRIME
if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
return false
else
return true
end
else
return true
end
when 1
if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
return false
else
return item.is_a?(RPG::Item)
end
when 2
if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
return false
else
return item.is_a?(RPG::Weapon)
end
when 3
if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
return false
else
return item.is_a?(RPG::Armor)
end
when 4..999
return item.coz_modalg_category_index == @sort_index
end
end
end
#==============================================================================
# ** Window_ItemCategory
#------------------------------------------------------------------------------
# This window displays what type of item is being displayed. #==============================================================================
class Window_ItemCategory < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y, width)
super(x, y, width, WLH + 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(sort_index = 0)
@sort_index = sort_index
@item_categories = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES
@item_categories_width = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORY_WIDTH
@category_string = COZZIEKUNS::SSI::CATEGORY_TEXT
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, @item_categories_width - 40, WLH, @category_string, 0)
self.contents.font.color = normal_color
for i in [Tienes que estar registrado y conectado para ver este vínculo]
if @sort_index == i
self.contents.draw_text(4, 0, @item_categories_width - 40, WLH, @item_categories[i][1], 2)
end
end
end
end #==============================================================================
# ** Window_ItemSort
#------------------------------------------------------------------------------
# This window displays what type of item is being displayed. #==============================================================================
class Window_ItemSort < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y, width)
super(x, y, width, WLH + 32)
@ox = 0
self.contents = Bitmap.new(self.width - 32 + ((COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES.size - 6) * 54), self.height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(sort_index = 0)
@sort_index = sort_index
@item_categories = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES
@item_categories_width = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORY_WIDTH
self.contents.clear
for i in [Tienes que estar registrado y conectado para ver este vínculo]
@icon_x = 0 + (i * ((544 - @item_categories_width) / @item_categories.size))
if @item_categories.size < 6
draw_item(i)
else
draw_items(i)
end
if @sort_index == i
if @item_categories.size < 6
draw_icon(@item_categories[i][0], @icon_x, 0, true)
else
draw_icon(@item_categories[i][0], i * 54, 0, true)
end
end
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
icons_x = (544 - @item_categories_width) / @item_categories.size
draw_icon(@item_categories[index][0], index * icons_x, 0, false)
end
#--------------------------------------------------------------------------
# * Draw Items
# index : item number
#--------------------------------------------------------------------------
def draw_items(index)
draw_icon(@item_categories[index][0], index * 54, 0, false)
end
end
#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
# This class performs the item screen processing.
#==============================================================================
class Scene_Item < Scene_Base
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@viewport = Viewport.new(0, 0, 544, 416)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@item_window = Window_Item.new(0, 112, 544, 304)
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.active = false
@category_width = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORY_WIDTH
@category_window = Window_ItemCategory.new(544 - @category_width, 56, @category_width)
@sort_window = Window_ItemSort.new(0, 56, 544 - @category_width)
@target_window = Window_MenuStatus.new(0, 0)
@sort_index = 0
@item_categories = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES
hide_target_window
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias coz_ssi_terminate terminate
def terminate
super
coz_ssi_terminate
@sort_window.dispose
@category_window.dispose
end
#--------------------------------------------------------------------------
# * Update Frame
#--------------------------------------------------------------------------
alias coz_ssi_update update
def update
super
coz_ssi_update
@sort_window.update
@category_window.update
end
#--------------------------------------------------------------------------
# * Update Item Selection
#--------------------------------------------------------------------------
def update_item_selection
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::C)
@item = @item_window.item
if @item != nil
$game_party.last_item_id = @item.id
end
if $game_party.item_can_use?(@item)
Sound.play_decision
determine_item
else
Sound.play_buzzer
end
elsif Input.trigger?(Input::Y)
@sort_index += 1
@sort_index %= @item_categories.size
if @sort_index != 0
if @item_categories.size > 6 and @sort_index > 5
@sort_window.ox += 54
end
else
@sort_window.ox = 0
end
@category_window.refresh(@sort_index)
@sort_window.refresh(@sort_index)
@item_window.refresh(@sort_index)
@item_window.index = 0
Sound.play_cursor
elsif Input.trigger?(Input::A)
@sort_index -= 1
@sort_index %= @item_categories.size
if @sort_index + 1 == @item_categories.size
@sort_window.ox += 54 * (@item_categories.size - 6)
else
if @item_categories.size > 6 and @sort_index > 4
@sort_window.ox -= 54
end
end
@category_window.refresh(@sort_index)
@sort_window.refresh(@sort_index)
@item_window.refresh(@sort_index)
@item_window.index = 0
Sound.play_cursor
end
end
end
espero que les sirva, cualquier duda ya saben donde estoy
raik- 300
-
38
431
485
20
Extras
Sobre mí::
Re: Script: Clases de objetos
Mola el script, tiene buena pinta, jeje + ^_^
TheNightmare- 500
-
25
654
1657
96
Extras
Sobre mí:: -ToC tOc -¿Quién es? -¿Quién es Quienes? - - -
Re: Script: Clases de objetos
Por cierto, se me olvido decirlo, en el codigo de lo de las categorias que hay que poner en "comentarios" (\item_category[4]) el número indica el nº de la categoría a la que debe formar parte (estan automaticamente en la 0 y en la 1, 2 o la 3 dependiendo si es arma, objeto o protector).
y otro detalle, pueden añadirse todas las categorias que uno quiera.
y otro detalle, pueden añadirse todas las categorias que uno quiera.
raik- 300
-
38
431
485
20
Extras
Sobre mí::
Buen Aporte :D
muchas gracias por el script .
PD: Un +1
ATTE:katsius
PD: Un +1
ATTE:katsius
katsius- 50
-
29
119
120
6
Extras
Sobre mí:: Me gusta muchisimo el Final Fantasy y Kingdom Hearts
Temas similares
» Script que permite mostrar valores de variables en el mapa como puntajes, objetos, monstruos derrotados, etc.
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» Alquimia (crear armas, pociones armaduras etc. apartir de otros objetos)
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» Alquimia (crear armas, pociones armaduras etc. apartir de otros objetos)
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.