~Base De Datos de Script de EMD~

Estado
Cerrado para nuevas respuestas
Mensajes
30
Reacciones
0
Puntos
0
man aki lo tienes el que querias es un buen script.
que se probeche xD.

-Nombre Del Script: GTBS - GubiD's Tactical Battle System
-Version Del Script: v1.4
-Rpg Maker: XP y VX
-Creditos: GubiD

-Introducion: es un sistema (creo q es de batalla) al estilo fire emblem
-Demo: para XP aki y para VX aki
-imagen:
xp
3e99a643cdfd8c37748b0e04a5ad093c2g.jpg
8375ff1d3ca37f3b901356f8cec66e182g.jpg
361a6b14ca880bfa3f8e445fa4c0beaf2g.jpg

85b64942a6290f88e17011834ac53dc52g.jpg
ddfd5312bf1b2ebc698e288f5d021b922g.jpg
ea306030e6edb5855e1a9ff18ef122d22g.jpg

vx
bc8fae0bc214a75ec96dd7faf3d12c0d4g.jpg


oie hinaro lo q pasa es q cuando kiero probar el game del demo me sale " no se puede encontrar RGSS102E.dll.", alguien sabe como solucionarlo?
 

Miwel~

EMD Legend
Mensajes
2.453
Reacciones
70
Puntos
842
Atacar sin armas

-Nombre Del Script: Atacar sin armas.
-Version Del Script: -
-Rpg Maker: XP

-Introducion: Permite atacar sin ningun arma equipada
-Caracteristicas: Creo que fui claro arriba ^^
-Demo: No hay xD
-ScreenShot: Tampoco...
-Instrucciones y Script:
Primero modificamos Game_Actor...:

Buscamos la linea(266-296):

Código:
 def base_atk
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.atk : 0
  end

Y lo cambiamos por:

Código:
 def base_atk
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.atk : base_str
  end

Luego buscamos(326-329):

Código:
def animation2_id
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.animation2_id : 0
  end

Y lo cambimos por:

Código:
def animation2_id
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.animation2_id : 4
  end

Y listo podemos atacar sin armas...
-Compatiblidad: No probado
-Creditos:
a chibi_conan y a ~Miguel
~Salu2!
 
Última edición:
Mensajes
103
Reacciones
0
Puntos
0
wenas
Brian__May
oie hinaro lo q pasa es q cuando kiero probar el game del demo me sale " no se puede encontrar RGSS102E.dll.", alguien sabe como solucionarlo?
R: el archibo RGSS102E.dll esta en tu rpg maker.
Como encontrarlo? es simple solo deves crear un proyecto nuevo y guardas (no es nesesario crear una area grande con arboles y que se yo solo crear el proyecto y guardar nada mas) y despues bas hacia la carpeta que esta ese proyecto y buscas el RGSS102E.dll que tiene dentro y lo copias y lo pegas al proyecto que le falta ese archibo, osea al proyecto de batalla tactil estilo fire emblem. Ahora si te sigue saliendo el error es por que tu prg maker tenga otra vercion y puedas que tengas algo como esto RGSS101E.dll en dever de tener este RGSS102E.dll solo deves colocar cambiar nombre y le pegas el que nesesitas en este caso RGSS102E.dll.

Bueno espero ser claro man no puedo evitar hacer las medias explicaciones para todo jaja xD

aprobechare tambien para poner un script aki les ba:

-Nombre Del Script: Modificar muebles a lo Sims
-Version Del Script: 03
-Rpg Maker: XP
-Creditos: Near Fantastica
Nota: Si no se tiene SDK borrar las lineas:
SDK.log("Dynamic Maps", "Near Fantastica", 3, "02.10.05")
if SDK.state("Dynamic Maps") == true
y el último end, el de abajo del todo.

-Introducion: este scritp hace que puedas comprar muebles y las puedes acomodar en la casa de tu personaje.
-Demo: no hay
-imagen: no hay
-Script:
Código:
#==============================================================================
# ** Dynamic Maps
#==============================================================================
# Near Fantastica
# Version 3
# 02.10.05
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log("Dynamic Maps", "Near Fantastica", 3, "02.10.05")

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state("Dynamic Maps") == true

module Map
#----------------------------------------------------------------------------
@items = []
@dynamic = false
@map_data = {}
@map_id = 0
@data = []
#============================================================================
class Item
#--------------------------------------------------------------------------
attr_accessor :name
attr_accessor :x
attr_accessor :y
attr_accessor :width
attr_accessor :height
attr_accessor :z
attr_accessor :id
#--------------------------------------------------------------------------
def initialize(name, id, x, y, width, height, layer = 2)
@name = name
@id = id
@x = x
@y = y
@width = width
@height = height
@z = layer - 1
end
end
#============================================================================
class Map_Data
#--------------------------------------------------------------------------
attr_accessor :map
#--------------------------------------------------------------------------
def initialize
@map = 0
end
end
#---------------------------------------------------------------------------- 
def Map.set_map(map, map_id)
@map_data[map_id] = map
end
#---------------------------------------------------------------------------- 
def Map.data(map_id)
return @map_data[map_id]
end
#----------------------------------------------------------------------------
def Map.setup_map(map_id)
@dynamic = true
@map_id = map_id
@data = []
map = load_data(sprintf("Data/Map%03d.rxdata", map_id))
list = map.events[1].pages[0].list
for item in list
break if item.parameters[0] == nil
eval(item.parameters[0]) 
end
data = []
for item in @items
data.push(item) if $game_party.item_number(item.id) != 0
end
@items = data
return
end
#----------------------------------------------------------------------------
def Map.clear
@items = []
@dynamic = false
@map_id = 0
return
end
#----------------------------------------------------------------------------
def Map.mapdata
return @data
end
#----------------------------------------------------------------------------
def Map.dynamic
return @dynamic
end
#----------------------------------------------------------------------------
def Map.items
return @items
end
#----------------------------------------------------------------------------
def Map.remove_item(item)
@items.delete(item)
end
#----------------------------------------------------------------------------
def Map.map_id
return @map_id
end
#----------------------------------------------------------------------------
def Map.draw(sz, tz, xo, yo, sx, sy, width, height)
map = load_data(sprintf("Data/Map%03d.rxdata", @map_id))
a,b = 0,0
x,y = sx,sy
width.times do |w|
height.times do |h|
$game_map.map.data[xo+w, yo+h, tz] = map.data[x+w, y+h, sz]
end
end
end
end


class Game_Map
#----------------------------------------------------------------------------
attr_accessor :map
#----------------------------------------------------------------------------
alias nf_dm_game_map_setup setup
#----------------------------------------------------------------------------
def setup(map_id)
save_map(@map_id)
if Map.data(map_id) == nil
nf_dm_game_map_setup(map_id)
else
nf_dm_game_map_setup(map_id)
load_map(map_id)
end
end
#----------------------------------------------------------------------------
def load_map(map_id)
map_data = Map.data(map_id)
@map = map_data.map
end
#----------------------------------------------------------------------------
def save_map(map_id)
return if map_id == 0
map_data = Map::Map_Data.new
map_data.map = @map
Map.set_map(map_data, map_id)
end
end

class Scene_Map
#----------------------------------------------------------------------------
alias nf_dm_scene_map_update update
#----------------------------------------------------------------------------
def update
if Input.trigger?(Input::L) and Map.dynamic
$scene = Scene_Placment.new
end
nf_dm_scene_map_update
end
end

class Scene_Placment
#--------------------------------------------------------------------------
def main
@z = 1
@item = nil
@place = false
@move = false
@remove = false
@draw = false
@cursor = Sprite.new
@cursor.x = 0
@cursor.y = 0
@cursor.z = 5000
@cursor.opacity = 160
@spriteset = Spriteset_Map.new
s1 = "Place"
s2 = "Move"
s3 = "Remove"
s4 = "Exit"
@command_window = Window_Command.new(192, [s1, s2, s3, s4])
@command_window.back_opacity = 160
@command_window.height = 480
@command_window.disable_item(0) if Map.items == []
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@command_window.dispose
end
#--------------------------------------------------------------------------
def update
@command_window.update
@spriteset.update
if @draw == true
cursor
elsif @place == true
placement
elsif @move == true
movement
elsif @remove == true
removement
elsif Input.trigger?(Input::C)
case @command_window.index
when 0
return if Map.items == []
$game_system.se_play($data_system.decision_se)
@place = true
@command_window.visible = false
data = []
for item in Map.items
data.push(item.name)
end
@placement_window = Window_Command.new(192, data)
@placement_window.back_opacity = 160
@placement_window.height = 480
when 1
return if Map.mapdata == []
$game_system.se_play($data_system.decision_se)
@move = true
@command_window.visible = false
data = []
for item in Map.mapdata
data.push(item.name)
end
@moveement_window = Window_Command.new(192, data)
@moveement_window.back_opacity = 160
@moveement_window.height = 480
when 2
$game_system.se_play($data_system.decision_se)
@remove = true
@command_window.visible = false
data = []
for item in Map.mapdata
data.push(item.name)
end
@removeement_window = Window_Command.new(192, data)
@removeement_window.back_opacity = 160
@removeement_window.height = 480
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new
end
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new
end
end
#--------------------------------------------------------------------------
def cursor
if @place == true
@cursor.y += 32 if Input.trigger?(Input::DOWN)
@cursor.x -= 32 if Input.trigger?(Input::LEFT)
@cursor.x += 32 if Input.trigger?(Input::RIGHT)
@cursor.y -= 32 if Input.trigger?(Input::UP)
if Input.trigger?(Input::L)
@z = 1
color = Color.new(0, 255, 0) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
end
if Input.trigger?(Input::R)
@z = 2
color = Color.new(0, 0, 255) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
end
@cursor.update
if Input.trigger?(Input::B)
@draw = false
@cursor.bitmap.dispose
@placement_window.visible = true
end
if Input.trigger?(Input::C)
x = @cursor.x/32
y = @cursor.y /32
Map.draw(@item.z, @z, x, y, @item.x, @item.y, @item.width, @item.height)
$game_system.se_play($data_system.decision_se)
$game_party.lose_item(@item.id, 1)
Map.remove_item(@item) if $game_party.item_number(@item.id) == 0
item = Map::Item.new(@item.name, @item.id, x, y, @item.width, @item.height, @z+1)
Map.mapdata.push(item)
@cursor.bitmap.dispose
$scene = Scene_Map.new
end
elsif @move == true
@cursor.y += 32 if Input.trigger?(Input::DOWN)
@cursor.x -= 32 if Input.trigger?(Input::LEFT)
@cursor.x += 32 if Input.trigger?(Input::RIGHT)
@cursor.y -= 32 if Input.trigger?(Input::UP)
if Input.trigger?(Input::L)
@z = 1
color = Color.new(0, 255, 0) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
end
if Input.trigger?(Input::R)
@z = 2
color = Color.new(0, 0, 255) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
end
@cursor.update
if Input.trigger?(Input::C)
data = nil
for item in Map.items
if item.name == @item.name
data = item
break
end 
end
x = @cursor.x/32
y = @cursor.y /32
Map.draw(data.z, @z, x, y, data.x, data.y, data.width, data.height)
$game_system.se_play($data_system.decision_se)
$game_party.lose_item(data.id, 1)
Map.remove_item(data) if $game_party.item_number(data.id) == 0
Map.mapdata.delete(@item)
item = Map::Item.new(data.name, data.id, x, y, data.width, data.height, @z)
Map.mapdata.push(item)
@cursor.bitmap.dispose
$scene = Scene_Map.new
end
if Input.trigger?(Input::B)
@draw = false
@cursor.bitmap.dispose
@placement_window.visible = true
end
elsif @remove == true
if Input.trigger?(Input::C)
@cursor.bitmap.dispose
$scene = Scene_Map.new
end
if Input.trigger?(Input::B)
@cursor.bitmap.dispose
$scene = Scene_Map.new
end
end
end
#--------------------------------------------------------------------------
def placement
@placement_window.update
if Input.trigger?(Input::B)
@place = false
@placement_window.dispose
@command_window.visible = true
elsif Input.trigger?(Input::C)
@draw = true
@placement_window.visible = false
@item = Map.items[@placement_window.index]
@cursor.bitmap = Bitmap.new(@item.width * 32, @item.height * 32)
color = Color.new(0, 255, 0) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
@z = 1
end
end
#--------------------------------------------------------------------------
def movement
@moveement_window.update
if Input.trigger?(Input::B)
@move = false
@moveement_window.dispose
@command_window.visible = true
elsif Input.trigger?(Input::C)
@draw = true
@moveement_window.visible = false
@item = Map.mapdata[@moveement_window.index]
@z = @item.z
@cursor.bitmap = Bitmap.new(@item.width * 32, @item.height * 32)
if @z == 1
color = Color.new(0, 255, 0) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
elsif @z == 2
color = Color.new(0, 0, 255) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
end
@cursor.x = @item.x*32
@cursor.y = @item.y*32
$game_party.gain_item(@item.id, 1)
x,y = @item.x,@item.y
@item.width.times do |w|
@item.height.times do |h|
$game_map.map.data[x+w, y+h, @z] = 0
end
end
end
end
#--------------------------------------------------------------------------
def removement
@removeement_window.update
if Input.trigger?(Input::B)
@remove = false
@removeement_window.dispose
@command_window.visible = true
elsif Input.trigger?(Input::C)
@draw = true
@removeement_window.visible = false
@item = Map.mapdata[@removeement_window.index]
@z = @item.z
@cursor.bitmap = Bitmap.new(@item.width * 32, @item.height * 32)
color = Color.new(255, 0, 0) 
@cursor.bitmap.fill_rect(0, 0, @item.width * 32, @item.height * 32, color) 
@cursor.x = @item.x*32
@cursor.y = @item.y*32
$game_party.gain_item(@item.id, 1)
x,y = @item.x,@item.y
@item.width.times do |w|
@item.height.times do |h|
$game_map.map.data[x+w, y+h, @z] = 0
end
end
end
end
end

#------------------------------------------------------------------------------
# * End SDK Enable Test
#------------------------------------------------------------------------------
end

-Instrucciones:
1. Se debe crear un mapa donde vayan todos los objetos que se quiere que aparezcan en la casa, debería quedar algo como esto (puedes poner los objetos que quieras);

casa1tu5.png


2. Luego en ese mismo mapa se debe crear un evento en 'Proceso paralelo', con lo siguiente.

Nombre del evento: Setup (obligatorio)
Evento: Proceso paralelo.


Le añades un 'Llamar script' y pones:
i = Map::Item.new("N",A,B,C,E,F)
Map.items.push(i)



Donde:

N: Es el nombre del adorno o mueble de la casa, por ejemplo "Cama"
A: El ID del objeto que tienes que poseer para poder obtener el mueble
B: Ubicación X en el mapa donde va la decoración
C: Ubicación Y en el mapa donde va la decoración
E: Números de filas que tiene el mueble
F: Número de columnas que tiene el mueble.

Para hacer por ejemplo el primer objeto, según la imagen deberia quedar algo como esto:
i = Map::Item.new("Pots",31,1,0,1,1)
Map.items.push(i)

Entonces si tienen el objeto con la ID 31, pueden decorar la casa con esa sarten. (se puede ver en la imagen A, en el segundo cuadro, si notan esta decoración solo usa cuadro 1x1 (es mejor saber matrices para poder hacer esto), y se encuentra en la ubicación del mapa (0,1).

Y por ejemplo si quieren hacer una mesa (la mesa que sale en la imagen A, la más grande) usa un tamaño de 3x3, deberian poner:

i = Map::Item.new("Mesa",31,0,6,3,3)
Map.items.push(i)

Recordad hacer un 'Llamar script' en el evento para cada decoración o mueble.
3. Ahora se debe hacer un mapa de una casa vacia. Aquí un ejemplo:

http://img178.imageshack.us/img178/7951/casa2zx8.png

Y en el evento de teletransporte a esa casa se debe poner lo siguiente:
Map.setup_map(X)
El evento de teletransportar.

X: corresponde ID del mapa donde estan puestos los objetos, no al que te teletransportas.

5. Ir al mapa y apretar la tecla "Q", y sale el menu (colorcar, mover, retirar).

Pd: este script tambien fue sacado de Mundo Deluxe saludos.
 
Última edición:
Mensajes
103
Reacciones
0
Puntos
0
espero que no te moleste si te doy algo de trabajo poniendo mas script xD es que no puedo parar xD.

-Nombre Del Script: Lo demas heroes te seguiran
-Rpg Maker: XP

-Introducion: Este script sirve para que los demas heroes te sigan.
-Demo: aki
-ScreenShot:
000es8.jpg

-Script: dentro de la demo.
-Instrucciones: Copias el scrip que tiene un "*" y lo pegas arriba de Main.
-Compatiblidad: realmente es compatible con las mallorias de los otros script.
-Creditos: 4NG3L 0F N1GH7M4R3S (baya que nombre mas raro no? xD).
 
Última edición:
Mensajes
551
Reacciones
2
Puntos
0
Ubicación
China
Amigo necesito ayuda en algunas cosas si no fuera mucha molestia XD de rpg maker vx porfavor

Necesito script para caminar en diagonal, cuando este en cesped que camine lento y sabes una pagina o un programa para crear sprites y face sets

Espero q me ayudes :icon_mrorange: salu2
 
Mensajes
551
Reacciones
2
Puntos
0
Ubicación
China
Necesito ayuda en algunas cosas porfavor

Necesito script para caminar en diagonal
Un script, al pasar por cesped camine lento
Si alguien sabe alguna pagina o programa para crear mis propios sprites y face sets

Sorry por el spam me ekivoque
Espero q me ayuden :icon_mrorange: salu2
 
Última edición:
Mensajes
103
Reacciones
0
Puntos
0
Angar no agas multi post... para algo existe el boton editar xD, se que eres nuevo pero deves igual pasarte por las normas del foro okis.

Bueno no soy ningun sujeto amargado xD asi que tratare de buscar los script que pides y si los encuentro editare y te los pondre.

Edit: aki tienes el script y lap ag para crear faces.
Pag para faces: aki
Pag para avatar: aki

-Nombre Del Script: Caminar en diagonal
-Rpg Maker: VX
-creditos: Sephiroth
-Introducion: Este script sirve para caminar en diagonal en el Rpg Maker VX.
-Demo: no hay.
-ScreenShot: no hay.
-Script:
En la clase Game_Character agreguen esto:
Código:
#--------------------------------------------------------------------------
#Para moverse abajo a la izquierda
#--------------------------------------------------------------------------
def move_down_left(turn_ok = true)
if passable?(@x-1, @y+1) # 通行可能
turn_down
@y = $game_map.round_y(@y+1)
@real_y = (@y-1)*256
@x = $game_map.round_x(@x-1)
@real_x = (@x+1)*256
increase_steps
@move_failed = false
else # 通行不可能
turn_down if turn_ok
check_event_trigger_touch(@x, @y+1) # 接触イベントの起動判定
@move_failed = true
end
end
#--------------------------------------------------------------------------
#Para moverse arriba a la izquierda
#--------------------------------------------------------------------------
def move_up_left(turn_ok = true)
if passable?(@x-1, @y-1) # 通行可能
turn_up
@y = $game_map.round_y(@y-1)
@real_y = (@y+1)*256
@x = $game_map.round_x(@x-1)
@real_x = (@x+1)*256
increase_steps
@move_failed = false
else # 通行不可能
turn_up if turn_ok
check_event_trigger_touch(@x, @y+1) # 接触イベントの起動判定
@move_failed = true
end
end
#--------------------------------------------------------------------------
#Para moverse abajo a la derecha
#--------------------------------------------------------------------------
def move_down_right(turn_ok = true)
if passable?(@x+1, @y+1) # 通行可能
turn_down
@y = $game_map.round_y(@y+1)
@real_y = (@y-1)*256
@x = $game_map.round_x(@x+1)
@real_x = (@x-1)*256
increase_steps
@move_failed = false
else # 通行不可能
turn_down if turn_ok
check_event_trigger_touch(@x, @y+1) # 接触イベントの起動判定
@move_failed = true
end
end
#--------------------------------------------------------------------------
#Para moverse arriba a la derecha
#--------------------------------------------------------------------------
def move_up_right(turn_ok = true)
if passable?(@x+1, @y-1) # 通行可能
turn_up
@y = $game_map.round_y(@y-1)
@real_y = (@y+1)*256
@x = $game_map.round_x(@x+1)
@real_x = (@x-1)*256
increase_steps
@move_failed = false
else # 通行不可能
turn_up if turn_ok
check_event_trigger_touch(@x, @y+1) # 接触イベントの起動判定
@move_failed = true
end
end
Luego en la clase Game_Player reemplazen el método move_by_input por este:
Código:
def move_by_input
return unless movable?
return if $game_map.interpreter.running?
case Input.dir8
when 1 
move_down_left 
when 2 
move_down
when 3 
move_down_right
when 4 
move_left
when 6 
move_right
when 7 
move_up_left 
when 8 
move_up
when 9 
move_up_right
end
end
 
Última edición:
Mensajes
778
Reacciones
2
Puntos
0
Ubicación
Valencia, Venezuela.
Aca traigo un script de dificultad para el rpg maker vx:

-Nombre Del Script: diffitulties
-Version Del Script: ??
-Rpg Maker: vx
-Creditos: A mi

-Introducion: Este script permite escoger la dificultad del juego como quieras....
-Demo: no
-imagen: no

Código:
#================================================= =============================
# Difficulties
#------------------------------------------------------------------------------
# © Dargor, 2008
# 240608
# Version 1.1
#
# Tradução para português Rafidelis
#
#------------------------------------------------------------------------------
# HISTORICO DAS VERSÕES
# - 1.0 (240608), Versão inicial
# - 1.1 (240608),Adicionada EXP e Gold modificações
#------------------------------------------------------------------------------
# INSTRUÇÕES
# - Cole Acima do Main
# - Edit as constates no modulo de Dificuldade
#================================================= =============================

#================================================= =============================
# Modulo de Configyração da Dificuldade
#================================================= =============================

module Difficulty
# Default difficulty
Default = 1 # medium
# Difficulty names
Names = [
'Facil',
'Medio',
'Dificil',
'Extremo'
]
# Descrições das dificuldades
Descriptions = [
'Facil até demais',
'Uma boa para praticar',
'Eles ja sabem matar',
Você já esta Morto
]
# Modificar estados do inimigo
# HP MP ATK DEF SPI AGI Hit de Evasão EXP Gold
Modifiers = [
[0.5, 0.5, 0.5, 0.5 ,0.5 ,0.5, 0.5 ,0.5, 0.5, 0.5],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1, 1],
[3, 3, 3, 3, 3, 3, 3, 3, 0.5, 0.5]
]
# Disponivel na tela de Titulo
In_Title = true
end

#================================================= =============================
# Game_System
#------------------------------------------------------------------------------
# Esta classe manipula dados relacionados com o sistema.Também gerencia veículos e BGM, etc
# A instância desta classe é referenciado por $ game_system.
#================================================= =============================

class Game_System
#--------------------------------------------------------------------------
# Variaveis de Instacia Publica
#--------------------------------------------------------------------------
attr_accessor difficulty_id
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias dargor_vx_difficulty_system_initialize initialize
#--------------------------------------------------------------------------
# Object Initialization
#--------------------------------------------------------------------------
def initialize
dargor_vx_difficulty_system_initialize
@difficulty_id = DifficultyDefault
end
#--------------------------------------------------------------------------
# Get Difficulty
#--------------------------------------------------------------------------
def difficulty
return DifficultyModifiers[@difficulty_id]
end
end

#================================================= =============================
# Game_Enemy
#------------------------------------------------------------------------------
# Esta classe manipula os characters dos inimigos.Ele é utilizado dentro da classe Game_Troop
# ($game_troop).
#================================================= =============================

class RPGEnemy
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias dargor_vx_difficulty_enemy_maxhp maxhp
alias dargor_vx_difficulty_enemy_maxmp maxmp
alias dargor_vx_difficulty_enemy_atk atk
alias dargor_vx_difficulty_enemy_def def
alias dargor_vx_difficulty_enemy_spi spi
alias dargor_vx_difficulty_enemy_agi agi
alias dargor_vx_difficulty_enemy_hit hit
alias dargor_vx_difficulty_enemy_eva eva
alias dargor_vx_difficulty_enemy_exp exp
alias dargor_vx_difficulty_enemy_gold gold
#--------------------------------------------------------------------------
# Recebe o Maximo de HP
#--------------------------------------------------------------------------
def maxhp
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_maxhp difficulty[0]
return result.round
end
#--------------------------------------------------------------------------
# Recebe o Maximo de MP
#--------------------------------------------------------------------------
def maxmp
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_maxmp difficulty[1]
return result.round
end
#--------------------------------------------------------------------------
# Recebe Ataque
#--------------------------------------------------------------------------
def atk
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_atk difficulty[2]
return result.round
end
#--------------------------------------------------------------------------
# Recebe Defesa
#--------------------------------------------------------------------------
def def
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_def difficulty[3]
return result.round
end
#--------------------------------------------------------------------------
# Get Spirit
#--------------------------------------------------------------------------
def spi
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_spi difficulty[4]
return result.round
end
#--------------------------------------------------------------------------
# Recebe Agilidade
#--------------------------------------------------------------------------
def agi
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_agi difficulty[5]
return result.round
end
#--------------------------------------------------------------------------
# Recebe a taxa de HIT
#--------------------------------------------------------------------------
def hit
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_hit difficulty[6]
result = [result, 100].min
return result.round
end
#--------------------------------------------------------------------------
# Recebe a taxa de Evasão
#--------------------------------------------------------------------------
def eva
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_eva difficulty[7]
result = [result, 100].min
return result.round
end
#--------------------------------------------------------------------------
# Recebe EXP
#--------------------------------------------------------------------------
def exp
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_exp difficulty[6]
return result.round
end
#--------------------------------------------------------------------------
# Recebe Gold
#--------------------------------------------------------------------------
def gold
difficulty = $game_system.difficulty
result = dargor_vx_difficulty_enemy_gold difficulty[7]
return result.round
end
end

#================================================= =============================
# Scene_Title
#------------------------------------------------------------------------------
# Esta classe realiza a tranformação da tela de título.
#================================================= =============================

class Scene_Title Scene_Base
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias dargor_vx_difficulty_title_start start
alias dargor_vx_difficulty_title_terminate terminate
alias dargor_vx_difficulty_title_update update
#--------------------------------------------------------------------------
# Inicio do processo
#--------------------------------------------------------------------------
def start
dargor_vx_difficulty_title_start
create_difficulty_window
end
#--------------------------------------------------------------------------
# Termino do processo
#--------------------------------------------------------------------------
def terminate
dargor_vx_difficulty_title_terminate
@difficulty_window.dispose
@help_window.dispose
end
#--------------------------------------------------------------------------
# Termination Processing
#--------------------------------------------------------------------------
def create_difficulty_window
names = []
for name in DifficultyNames
names name
end
@difficulty_window = Window_Command.new(172, names)
@difficulty_window.x = @command_window.x
@difficulty_window.y = @command_window.y
@difficulty_window.height = @command_window.height
@difficulty_window.visible = false
@difficulty_window.active = false
@help_window = Window_Help.new
@help_window.openness = 0
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def update
@difficulty_window.update
@help_window.update
if @difficulty_window.active
update_difficulty_window
return
end
if @command_window.methods.include('selection')
condition = '@command_window.selection == Vocabnew_game'
else
condition = '@command_window.index == 0'
end
if Input.trigger(InputC) && eval(condition)
if !@difficulty_window.active && DifficultyIn_Title
Sound.play_decision
@difficulty_window.visible = true
@difficulty_window.active = true
@help_window.open
@command_window.visible = false
@command_window.active = false
return
end
end
dargor_vx_difficulty_title_update
end
#--------------------------------------------------------------------------
# Frame Update (Difficulty)
#--------------------------------------------------------------------------
def update_difficulty_window
if self.methods.include('create_map_background')
@spriteset.update
$game_map.interpreter.update
$game_map.update
end
if Input.trigger(InputB)
Sound.play_cancel
@difficulty_window.visible = false
@difficulty_window.active = false
@help_window.close
@command_window.visible = true
@command_window.active = true
end
if Input.trigger(InputC)
close_difficulty_window
command_new_game
end
id = $game_system.difficulty_id = @difficulty_window.index
@help_window.set_text(DifficultyDescriptions[id])
end
#--------------------------------------------------------------------------
# Close Command Window
#--------------------------------------------------------------------------
def close_difficulty_window
@difficulty_window.close
@help_window.close
begin
@difficulty_window.update
@help_window.update
Graphics.update
end until @difficulty_window.openness == 0
end
end
 
Mensajes
778
Reacciones
2
Puntos
0
Ubicación
Valencia, Venezuela.
2º Mulitipostear

Se considerará multipostear escribir 2 o más mensajes de corrido en el mismo post. En el caso de que en algún tema se hayan redactado 2 mensajes de corrido, (dependiendo del tiempo entre ambos mensajes), o si tienes algo que aportar, pero por alguna razón no puedes editar el último mensaje, este mismo no se considerará como multipost.

Como pueden ver voy a aportar por eso no se considera multi-post:

Un gran script para el vx!

-Nombre Del Script: Barra de cargado para el vx
-Version Del Script: ??
-Rpg Maker: vx

-Introducion: Este script hace que salga una barra de cargado cuando lo desees
-Demo: no hace falta
-ScreenShot: Es simplemente una barra de cargado no hace falta....
-Script:

Código:
#======================================================================
# GuiRPG Loading Bar 1.8
#-------------------------------------------------------------------------------
# Por GuiRPG [[email protected]]
#===============================================================================
# Para deixar seu jogo com cara de profissional, coloque Barras de Carregamento
#===============================================================================
# As Imagens de fundo deverão estar na pasta System. Para llamar a la Barra, use:
# $IMG_Barra = 'Nome_da_Imagem_de_Fundo'
# $scene = GuiRPG_Barra.new
#===============================================================================



#===============================================================================
# Módulo Cores
#-------------------------------------------------------------------------------
# Aqui tem Configurações de Cores da Barra
#===============================================================================
module Cores

# Cores da Barra, ela é composta por 3 cores
Cor1 = Color.new(0,0,0)
Cor2 = Color.new(0,100,100)
Cor3 = Color.new(0,0,0)

# Cor do Fundo da Barra:
Fundo_Cor = Color.new(255,255,255,255) # -> Branco

# Cor da Borda
Borda_Cor = Color.new(0,0,50,255) # -> Azul Escuro

end


class GuiRPG_Barra < Scene_Base

def main
@fundo = Sprite.new
@fundo.bitmap = Cache.system($IMG_Barra)
@barra = Barra.new
Graphics.transition
loop do
Graphics.update
Input.update
update_barra
if $scene != self
break
end
end
Graphics.freeze
@barra.dispose
@fundo.bitmap.dispose
@fundo.dispose
end

def update_barra
@barra.refresh
if $loading >= 360
$scene = Scene_Map.new
end
end

end

class Barra < Window_Base

def initialize
super(0,0,640,480)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
$loading = 0
refresh
end

def refresh
self.contents.clear
$loading += rand(2)
self.contents.fill_rect(64,354,364,22,Cores::Borda_Cor)
self.contents.fill_rect(66,356,360,18,Cores::Fundo_Cor)
self.contents.gradient_fill_rect(66,356,$loading,18,Cores::Cor1,Cores::Cor2,Cores::Cor3)
end

end

$IMG_Barra = ''

-Instrucciones: Pega sobre main

Luego crea un evento en el mapa y pones el modo de inicio como desees. Usamos la opcion llamar script y colocamos esto:

$scene = GuiRPG_Barra.new

-Incompatiblidad: El script dice que se puede poner una imagen cuando carga pero cuando la pongo me da error....

-Creditos:a mi
 
Mensajes
103
Reacciones
0
Puntos
0
aki un script para VX.

-Nombre Del Script: Minijuego Snake
-Version Del Script: 1.0
-Rpg Maker: VX
-Creditos: Zeriab

-Introducion: Es el minijuego de la serpiente (Snake) para el maker. El objetivo es conseguir el mayor numero posible de puntos. Esto se debera usar mas que nada para cargar entre pantallas, precisamente como minijuego. La serpiente no crecera de tamaño.
-ScreenShot:
screenbq7.png


-Script:
Código:
#==============================================================================
# ** Snake Look-alike on Loading Script
#------------------------------------------------------------------------------
# Zeriab
# v 1.0
# 28-09-2006
#==============================================================================

class Scene_SLOLS
 # The variable the number of dots collected will be stored
 Cheese_Variable = 25
 # The size of the margin in pixels
 Margin = 10
 # The thickness of the border in pixels
 Border_Thickness = 3
 
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(scene=Scene_Map.new)
   @next_scene = scene
 end
 
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Creates Bar Window (Loading bar)
   @bar_window = Window_SLOLS_Bar.new
   # Creates Info Window
   @info_window = Window_SLOLS_Info.new(Margin, Border_Thickness, Cheese_Variable)
   # Creates Game Window
   @game_window = Window_SLOLS_Game.new(Margin, Border_Thickness, Cheese_Variable)
   # Execute transition
   Graphics.transition
   # Scene Objects
   @scene_objects = [@bar_window, @info_window, @game_window]
   # Main loop
   loop do
     # Sleeps a short while to let the other thread work.
     sleep(0.01)
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     ## Frame update
     update
     # Abort loop if screen is changed
     break if $scene != self
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose Scene Objects
   @scene_objects.each { |x| x.dispose }
 end
 
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
     # Updates Scene Objects
     @scene_objects.each { |x| x.update }
     # If B or C Button Is Pressed
     if Input.trigger?(Input::B) || Input.trigger?(Input::C)
       # If the loading thread is finished (not alive)
       if !$loader.is_a?(Thread) || !$loader.alive?
         # Play Decision SE
         $game_system.se_play($data_system.decision_se)
         # Switch to map screen
         $scene = @next_scene
         return
       else
         # Play Buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
     end
 end
end

#==============================================================================
# ** Window_SLOLS_Info
#==============================================================================


class Window_SLOLS_Info
 # Instructions
 Instructs = [
               'Navigate using the','arrow keys.',
               'Collect green dots.',
               'This is done by','going into them.',
               'A sound will play','when the loading','is finished',
               '','Enter to continue'
            ]
 
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(margin, border_thickness, cheese_variable)
   # The name of the arrow images
   @arrow_file_names = ["Down_Arrow.png", "Left_Arrow.png",
                        "Right_Arrow.png", "Up_Arrow.png"]
   # The arrow images
   @arrow_images = []
   for i in 0..3
     # Makes sure that the program keeps running if one or more of the files
     # given don't exists. (read: wrong filename or missing file)
     begin
       # Reads the bitmap
       bitmap = Bitmap.new('Graphics\\Pictures\\'+@arrow_file_names[i])
     rescue Exception => ex
       # Creates a blank 32x32 bitmap if the reading fails
       bitmap = Bitmap.new(32,32)
       # Prints the exception if in Debug mode.
       if $DEBUG
         p ex
       end
     end
     # Pushes the resulting bitmap into the array
     @arrow_images.push(bitmap)
   end
   
   # The margin and border thickness
   @margin = margin
   @border_thickness = border_thickness
   @cheese_variable = cheese_variable
   
   # Height with border excluding margin
   @height = 416-@margin
   
   # The instructions Sprite
   @instru = Sprite.new(Viewport.new(480 + @border_thickness,
                       48 + @border_thickness,
                       159 - @margin - @border_thickness*2,
                       282 - @margin*4 + 4))
   @instru.bitmap = Bitmap.new(159 - @margin - @border_thickness*2,
                              282 - @margin*4 + 4)
   @instru.bitmap.font.color = Color.new(225, 225, 225, 255)
   @instru.bitmap.font.size = 20
   
   
   # The main Sprite
   @contents = Sprite.new(Viewport.new(480, 0, 160, @height))
   @contents.bitmap = Bitmap.new(160, @height)
   @contents.bitmap.font.color = Color.new(225, 225, 225, 255)
   @contents.bitmap.font.size = 22
   refresh
 end
 
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   # Simplifying the variables used
   border = @border_thickness
   spacing = @margin + border
   
   # Removes any old contents, garbage and so on.
   @contents.bitmap.clear
   # Draws the white block used for the border of the score
   @contents.bitmap.fill_rect(0,@margin,159-@margin,22+border*2,
                               Color.new(225, 225, 225, 255))
   # Draws the white block used for the border of the instructions
   @contents.bitmap.fill_rect(0,48,159-@margin,282+border*2-@margin*4+4,
                               Color.new(225, 225, 225, 255))
   # Draws a black block on the white block creating the border.
   @contents.bitmap.fill_rect(border, 48+border,159-spacing-border,
                              282-@margin*4+4, Color.new(0, 0, 0, 0))
   
   # Draws the left arrow
   @contents.bitmap.blt(0,373-@margin,@arrow_images[1],Rect.new(0,0,43,43))
   # Draws the down arrow
   @contents.bitmap.blt(43+@margin,373-@margin,@arrow_images[0],
                        Rect.new(0,0,43,43))
   # Draws the right arrow
   @contents.bitmap.blt(43*2+@margin*2,373-@margin,@arrow_images[2],
                        Rect.new(0,0,43,43))
   # Draws the up arrow
   @contents.bitmap.blt(43+@margin,330-@margin*2,@arrow_images[3],
                        Rect.new(0,0,43,43))
   
   # Draws the text 'Instructions:'
   @contents.bitmap.draw_text(border, 48, 150-border*2, 22, 'Instructions',1)
   
   # Draws the intructions
   for i in 0...Instructs.size
     # Gets the string
     str = Instructs[i]
     # Draws the string
     @instru.bitmap.draw_text(2, 22*(i+1), 150-border*2, 20, str,1)
   end
 end

 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   # Simplifying the variables used
   border = @border_thickness
   spacing = @margin + border
   # Updates the sprite
   @contents.update
   # Removes old contents
   @contents.bitmap.fill_rect(border, spacing, 159-spacing-border, 22,
                              Color.new(0, 0, 0, 0))
   # Draws the amount of dots collected
   @contents.bitmap.draw_text(border, spacing, 153-spacing, 22,
                              $game_variables[@cheese_variable].to_s, 2)
   # Draws the text 'Dots:'
   @contents.bitmap.draw_text(border+2, spacing, 157-spacing, 22, 'Dots:')
 end
 
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 def dispose
   @contents.bitmap.dispose
   @contents.dispose
 end
end

#==============================================================================
# ** Window_SLOLS_Game
#==============================================================================

class Window_SLOLS_Game
 #Player Settings
 Size = 5
 Default_Speed = 3
 Trail_Length = 19
 
 #Cheese Settings
 Cheese_Size = 3
 Cheese_Colors = [Color.new(10,200,20,255)]
 Max_Cheese_Amount = 200
 
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(margin, border_thickness, cheese_variable)
   # The margin and border thickness
   @margin = margin
   @border_thickness = border_thickness
   @cheese_variable = cheese_variable
   
   # Width of the playing field
   @width = 480-(@margin*2) - (@border_thickness*2)
   # Height of the playing field
   @height = 416-(@margin*2) - (@border_thickness*2)
   
   # Player info
   @player_x = 200
   @player_y = 208
   @player_trail = []
   @player_dir = 6   #2 - up, 4 - left, 6 - right, 8 - down
   @speed = Default_Speed
   
   # The cheese array
   @cheese = []
   @cheese.push(make_cheese)
   # The amount of cheese caught during this season.
   @cheese_amount = 0
   
   # Create the Sprite for viewing the border
   @border = Sprite.new(Viewport.new(@margin, @margin, 480-@margin, 416-@margin))
   @border.bitmap = Bitmap.new(480-(@margin*2),416-(@margin*2))
   
   # Creates the main Sprite
   @contents = Sprite.new(Viewport.new(@margin + @border_thickness,
                               @margin + @border_thickness, @width, @height))
   @contents.bitmap = Bitmap.new(@width,@height)
   # Refreshes
   refresh
   # Updates
   update
 end
 
 #--------------------------------------------------------------------------
 # * Make Cheese
 # ---------------------
 # Generates a pointer to a place where a cheese will be at least 3 pixels
 # away from the player
 #--------------------------------------------------------------------------
 def make_cheese
   result = []
   # Total size. (Sum of player size and cheese size)
   size = Size + Cheese_Size
   
   loop do
     # Generating the x and y coordinates
     x = rand(@width - (size + 5)*2)
     y = rand(@height - (size + 5)*2)
     
     # Adjusts the x and y coordinates so the cheese will not be
     # placed in the player
     if x > @width / 2 - (size + 5)
       x += 2*(Size + 5)
     end
     if y > @height / 2 - (size + 5)
       y += 2*(Size + 5)
     end
     
     # Makes sure that no cheese exists in that exact same place
     # Does not consider the size of the cheese.
     if [email protected]?([x,y])
       result = [x,y]
       break
     end
   end
   
   return result
 end
 
 #--------------------------------------------------------------------------
 # * Check Player
 # --------------------
 # Checks if the player have caught a cheese. (Is touching one)
 # Returns the indices of the cheese in an array
 #--------------------------------------------------------------------------
 def check_player
   result = []
   # Checks every cheese
   for i in [email protected]
     # Distance in the x-plane
     d = (@cheese[i][0] - @player_x).abs
     # Distance in the y-plane
     d_y = (@cheese[i][1] - @player_y).abs
     # Makes 'd' contain the largest distance
     if d < d_y
       d = d_y
     end
     
     # If the largest distance is less than the size of the player and the
     # cheese the player must be touching the cheese.
     if d < (Size + Cheese_Size - 1)
       result.push(i)
     end
   end
   return result
 end
 
 #--------------------------------------------------------------------------
 # * Draw Cheese
 #     i     : The index on the cheese
 #     color : The color wanted for the cheese
 # --------------------
 # Draws the designated cheese with the given color
 #--------------------------------------------------------------------------
 def draw_cheese(i, color)
   cheese = @cheese[i]
   size = Cheese_Size
   # Draws the cheese
   @contents.bitmap.fill_rect(cheese[0]-(size-1),cheese[1]-(size-1),
                           (size*2)-1, (size*2)-1, color)
 end
 
 #--------------------------------------------------------------------------
 # * Delete Cheese
 #     i : The index on the cheese
 # --------------------
 # Deletes the cheese by first drawing it black and then removing the cheese
 # from @cheese.
 #--------------------------------------------------------------------------
 def delete_cheese(i)
   draw_cheese(i, Color.new(0,0,0,0))
   @cheese.delete_at(i)
 end
 
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   @border.bitmap.clear
   # Draws a white block
   @border.bitmap.fill_rect(0,0,480-@margin, 416-@margin,Color.new(225, 225, 225, 255))
   # Draws a smaller black block to give the border
   @border.bitmap.fill_rect(@border_thickness, @border_thickness,
                 @width, @height, Color.new(0, 0, 0, 0))
 end

 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   @contents.update

   # Checks if the player gets any cheese
   array = check_player
   if array.size > 0
     # Removes all the cheese
     for i in array
       # Cheese counters
       $game_variables[@cheese_variable] += 1
       @cheese_amount += 1
       # Deletes the old cheese
       delete_cheese(i)
       # Creates a new one
       @cheese.push(make_cheese)
       
       # Might create another one
       if @cheese.size < Max_Cheese_Amount
         # Creates an extra cheese if enough cheese have been caught
         if @cheese_amount > @cheese.size * @cheese.size + 1
           # Creates a new one
           @cheese.push(make_cheese)
         end
       end
     end
   end
   
   # Draws the cheese
   for i in [email protected]
     draw_cheese(i, Color.new(10,200,20,255))
   end
   
   # Makes sure the trail isn't too short
   while @player_trail.size < Trail_Length
     # Adds the player positions into the trail
     @player_trail.push([@player_x,@player_y])
   end
   
   coords = @player_trail.shift
   # Draws the trail
   @contents.bitmap.fill_rect(coords[0]-(Size-1),coords[1]-(Size-1),
                         (Size*2)-1, (Size*2)-1, Color.new(0,0,0,255))
   #Calculates the steps per shade
   step = 200 / (Trail_Length)
   for i in 0...Trail_Length-1
     # Calculations
     coords = @player_trail[i]
     s = step*(Trail_Length-i)
     # Draws the trail
     @contents.bitmap.fill_rect(coords[0]-(Size-1),coords[1]-(Size-1),
                         (Size*2)-1, (Size*2)-1, Color.new(200-s,200-s,100-(s/2),255))
   end
                         
   # Draws the player
   @contents.bitmap.fill_rect(@player_x-(Size-1),@player_y-(Size-1),
                           (Size*2)-1, (Size*2)-1, Color.new(200,200,100,255))
   
   # If UP Is Pressed
   if Input.trigger?(Input::UP)
     @player_dir = 8 unless @player_dir == 2
   end
   # If DOWN Is Pressed
   if Input.trigger?(Input::DOWN)
     @player_dir = 2 unless @player_dir == 8
   end
   # If LEFT Is Pressed
   if Input.trigger?(Input::LEFT)
     @player_dir = 4 unless @player_dir == 6
   end
   # If RIGHT Is Pressed
   if Input.trigger?(Input::RIGHT)
     @player_dir = 6 unless @player_dir == 4
   end
   
   # Moves the player accordingly to the directions
   case @player_dir
   when 8  # Down
     @player_y -= @speed
   when 2  # Up
     @player_y += @speed
   when 4  # Left
     @player_x -= @speed
   when 6  # Right
     @player_x += @speed
   end
   # Warping the player
   @player_x = (@player_x) % @width
   @player_y = (@player_y) % @height
 end
 
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 def dispose
   @contents.bitmap.dispose
   @contents.dispose
 end
end

#==============================================================================
# ** Window_SLOLS_Bar
#==============================================================================

class Window_SLOLS_Bar
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   @contents = Sprite.new(Viewport.new(0, 416, 640, 64))
   @contents.bitmap = Bitmap.new(640, 64)
   @left_block = Sprite.new(Viewport.new(540-48, 424, 48, 48))
   @left_block.bitmap = Bitmap.new(64, 64)
   @right_block = Sprite.new(Viewport.new(100, 424, 48, 48))
   @right_block.bitmap = Bitmap.new(640, 64)
   @blocks = [@left_block, @right_block]
   @bar = Sprite.new(Viewport.new(270, 446, 100, 4))
   @bar.bitmap = Bitmap.new(200, 4)
   @bar_f = Sprite.new(Viewport.new(270, 446, 100, 4))
   @bar_f.bitmap = Bitmap.new(100, 4)
   @bar_fx = 0
   
   # The sprites used
   @sprites = [@contents,@bar,@bar_f]
   
   refresh
 end
 
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   @contents.bitmap.clear
   bar_color = Color.new(225,225,225,255)
   fin_color = Color.new(255,255,0,0)
   @bar.bitmap.fill_rect(0,0,25,4,bar_color)
   @bar.bitmap.fill_rect(50,0,25,4,bar_color)
   @bar.bitmap.fill_rect(100,0,25,4,bar_color)
   @bar.bitmap.fill_rect(150,0,25,4,bar_color)
   @bar_f.bitmap.fill_rect(0,0,100,4,fin_color)
   @blocks.each {|x| x.bitmap.fill_rect(0,0,64,64,fin_color)}
 end

 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   @bar.ox -= 1
   @bar.ox = @bar.ox % 100
   @bar.update
   if @bar_fx == 0 && (!$loader.is_a?(Thread) || !$loader.alive?)
     @bar_fx = 1
     @count = 3
     $game_system.se_play($data_system.load_se)
   end
   if @bar_fx > 0 && @bar_fx < 255
     @bar_fx += @count
     @bar_f.bitmap.fill_rect(0,0,100,4,Color.new(255,255,0,@bar_fx))
     @blocks.each {|x| x.bitmap.fill_rect(0,0,48,48,Color.new(255,255,0,@bar_fx))}
     case @bar_fx
     when 10..20
       @count = 50
     when 180..230
       @count = 5
     end
   end
 end
 
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 def dispose
   @sprites.each { |x| x.bitmap.dispose}
   @sprites.each { |x| x.dispose}
 end
end

-Instrucciones:
Para jugar a la Serpiente, llama script de este modo:
$scene = Scene_SLOLS.new

o
$scene = Scene_SLOLS.new(Scene_Map.new)

Usa en llamar script:
$scene = Scene_SLOLS.new(Scene_Map.new)
cambiando Scene_Map.new por la sintaxis que llama a la siguiente escena para ir a ella.
 
Última edición:
Mensajes
103
Reacciones
0
Puntos
0
2º Mulitipostear

Se considerará multipostear escribir 2 o más mensajes de corrido en el mismo post. En el caso de que en algún tema se hayan redactado 2 mensajes de corrido, (dependiendo del tiempo entre ambos mensajes), o si tienes algo que aportar, pero por alguna razón no puedes editar el último mensaje, este mismo no se considerará como multipost.
gracias a =rthefire@= ahora se que puedo hacer multipost solo cuando estoy aportando algo y aki esta mi aporte:

-Nombre Del Script: ARTBS - Sistema de Juego al estilo Diablo y MU
-Version Del Script: ??? no se.
-Rpg Maker: XP

-Introducion: Una serie de scripts que forman un ótima base para juegos estilo MMORPG'S.
-Caracteristicas: Sistema de Batalla ABS, con movimento teclado y mouse, sistema de creado de personages super avanzado, tambien es posible pausar el juego.
-Demo: aki esta la demo (el script esta aki dentro ovio xD)
Info:
Tamaño: 79,583 KB
Tipo de Archivo: ZIP
Sitio Hosting: 4Shared

-ScreenShot:
imagembq7.png
imagemzd0.png
imagemuv1.png

-Script: dentro de la demo.
-Instrucciones: Descarga el DEMO, y a empezar personalizar el juego. Para editar las imágenes utilizadas en el motor y abra la carpeta Imágenes Retratos y cambiar las imágenes que están allí, a su gusto.
-Compatiblidad: no se si es compatible con otros script asi que tendran que revisar.
-Creditos: Samo
 
Última edición:
Mensajes
103
Reacciones
0
Puntos
0
aki otro aporte de un buen script que econtre en una pag bien rara xD.

-Nombre Del Script: Shooting System
-Rpg Maker: XP
-Creditos: Nechi

-Introducion: Una demo bien interesante con varios scripts para hacer un fan game resident evil, pero esta con algunos bugs estaños si algun scripter puede arreglar selo agradeseria!
-Caracteristicas: aver es para que puedas crear juegos de pistolas o sea estilo resident evil
-Demo: Media Fire y Megaupload
-Teclas:
Z = mira + C = Atira
S = segura faca + C = Ataca

-ScreenShot:
ss1jr2.jpg
ss2bk9.jpg

-Script: Dentro de la demo estan los script nesesarios.
-Instrucciones: no creo que las nesesiten esta todo en la demo si les sale un error es por el bugg que les dije que tenia en una aprte y no se como se arregla xD.
 
Última edición:
Mensajes
35
Reacciones
0
Puntos
0
Chicos, encontre un script q es para rpgmaker vx q sirve para poner habilidades a el equipamiento como el ff ix!
el problema es q esta en japones... el script es del famoso KGC y quiero saber si alguno lo tiene pero en ingles aunq sea...
gracias!
 
Mensajes
103
Reacciones
0
Puntos
0
mm mañana lo buscare si lo encuentro edito y te lo pongo :D (espero encontrarlo xD)

___________________________________________________________________________________
Edit: aki esta el script (que creo q es el que buscabas xD) esta en portugues espero que sirva =.

-Nombre Del Script: KGC_SkillCPSystem VX
-Rpg Maker: VX
-Creditos: Traducido por WesdrasLink echo por KGC xD.

-Descripcion:
Es un sistema de PC que son puntos que se pueden equipar a sus habilidades y también crea una barra de herramientas de PC y también otra opción en el menú principal! (espero que se aya entendido xD).
-Demo: no hay T_T.
-Script:
Código:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    KGC_SkillCPSystem VX 
#_/    Last update : 2008/02/17
#_/----------------------------------------------------------------------------
#  Tradução por WesdrasLink
#==============================================================================
#  Customize 
#==============================================================================

module KGC
module SkillCPSystem
  # Aqui defina a quantidade de Habilidades que podem ser equipadas
  MAX_SKILLS = 9
  # CP
  VOCAB_CP   = "CP"
  # Nome da barra de CP
  VOCAB_CP_A = "CP"
  # Amostrar Barra de CP no Status ?
  SHOW_STATUS_CP = true

  # Quanto vale CP para uma Habilidade ?
  
  DEFAULT_CP_COST = 1
  # CP Máximo
  CP_MAX = 15
  # CP Mínimo
  CP_MIN = 0
  # Defina aqui com quantos CP o heroi vai comçar e quanto vai aumentar quando
  #passar de nível
  CP_CALC_EXP = "level * 3.6"

  # ? ??????????
  #  true ???????????????????????
  DISABLE_IN_BATTLETEST  = true
  # ? ?????????????
  SHOW_UNUSABLE_SKILL    = true
  # ? ?? CP 0 ?????????????????
  USABLE_COST_ZERO_SKILL = true
  # ? ???????????????????
  #  «???????» ????????
  PASSIVE_NEED_TO_SET    = true

  # ? CP ???????
  #  ??  : \C[n] ?????
  #  Color : ?????? ( Color.new(255, 128, 128) ?? )
  GAUGE_START_COLOR = 13
  # ? CP ???????
  GAUGE_END_COLOR   = 5

  # ? ???????????????????????
  #  ???????????????????????
  #  ?????????????«????????????» ?????????
  USE_MENU_SET_SKILL_COMMAND = true
  # ? ?????????????????????
  VOCAB_MENU_SET_SKILL       = "Skill"
  # ? ???????????
  BLANK_TEXT   = "-  Vazio  -"
  # ? ??????????
  RELEASE_TEXT = "( Nada )"
end
end

#???????????????????????????????????????

$imported = {} if $imported == nil
$imported["SkillCPSystem"] = true

module KGC::SkillCPSystem
  # ????
  module Regexp
    # ???
    module Skill
      # ?? CP
      CP_COST = /<CP[ ]*(\d+)>/i
    end
  end
end

#???????????????????????????????????????

#==============================================================================
# ? KGC::Commands
#==============================================================================

module KGC::Commands
  module_function
  #--------------------------------------------------------------------------
  # ? ?? CP ???
  #     actor_id : ???? ID
  #     own_cp   : ?? CP
  #--------------------------------------------------------------------------
  def set_own_cp(actor_id, own_cp)
    $game_actors[actor_id].own_cp = own_cp
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #     actor_id : ???? ID
  #     value    : ?????
  #--------------------------------------------------------------------------
  def set_battle_skill_max(actor_id, value = -1)
    $game_actors[actor_id].battle_skill_max = value
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #     actor_id : ???? ID
  #     index    : ????
  #     skill_id : ??????? ID (nil ???)
  #--------------------------------------------------------------------------
  def set_battle_skill(actor_id, index, skill_id = nil)
    actor = $game_actors[actor_id]
    if skill_id.is_a?(Integer)
      # ??
      skill = $data_skills[skill_id]
      return unless actor.battle_skill_settable?(index, skill)  # ?????

      actor.set_battle_skill(index, skill)
      actor.restore_battle_skill
    else
      # ??
      actor.remove_battle_skill(index)
    end
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #     actor_id : ???? ID
  #     skill_id : ??????? ID
  #--------------------------------------------------------------------------
  def add_battle_skill(actor_id, skill_id)
    actor = $game_actors[actor_id]
    skill = $data_skills[skill_id]
    skills = actor.battle_skill_ids
    return if skills.include?(skill_id)  # ????
    return if actor.cp < skill.cp_cost   # CP ??

    actor.battle_skill_max.times { |i|
      # ????????
      if skills[i] == nil && 
        actor.set_battle_skill(i, skill)
        break
      end
    }
    actor.restore_battle_skill
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #     actor_id : ???? ID
  #--------------------------------------------------------------------------
  def clear_battle_skill(actor_id)
    $game_actors[actor_id].clear_battle_skill
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #     actor_index : ??????????
  #--------------------------------------------------------------------------
  def call_set_battle_skill(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :set_battle_skill
    $game_temp.next_scene_actor_index = actor_index
  end
end

class Game_Interpreter
  include KGC::Commands
end

#???????????????????????????????????????

#==============================================================================
# ¦ Vocab
#==============================================================================

module Vocab
  # CP
  def self.cp
    return KGC::SkillCPSystem::VOCAB_CP
  end

  # CP (?)
  def self.cp_a
    return KGC::SkillCPSystem::VOCAB_CP_A
  end

  # ?????
  def self.set_battle_skill
    return KGC::SkillCPSystem::VOCAB_MENU_SET_SKILL
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ RPG::Skill
#==============================================================================

class RPG::Skill < RPG::UsableItem
  #--------------------------------------------------------------------------
  # ? ???CP??????????
  #--------------------------------------------------------------------------
  def create_skill_cp_system_cache
    @__cp_cost = KGC::SkillCPSystem::DEFAULT_CP_COST

    self.note.split(/[\r\n]+/).each { |line|
      case line
      when KGC::SkillCPSystem::Regexp::Skill::CP_COST
        # ?? CP
        @__cp_cost = $1.to_i
      end
    }
  end
  #--------------------------------------------------------------------------
  # ? ?? CP
  #--------------------------------------------------------------------------
  def cp_cost
    create_skill_cp_system_cache if @__cp_cost == nil
    return @__cp_cost
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Battler
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ? ?????????????
  #     skill : ???
  #--------------------------------------------------------------------------
  def battle_skill_set?(skill)
    return true
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  attr_writer   :own_cp                   # ?? CP
  #--------------------------------------------------------------------------
  # ? ??????
  #     actor_id : ???? ID
  #--------------------------------------------------------------------------
  alias setup_KGC_SkillCPSystem setup
  def setup(actor_id)
    setup_KGC_SkillCPSystem(actor_id)

    @battle_skills = []
    @own_cp = 0
    @battle_skill_max = -1
  end
  #--------------------------------------------------------------------------
  # ? MaxCP ??
  #--------------------------------------------------------------------------
  def maxcp
    n = Integer(eval(KGC::SkillCPSystem::CP_CALC_EXP))
    return [[n + own_cp, cp_limit].min, KGC::SkillCPSystem::CP_MIN].max
  end
  #--------------------------------------------------------------------------
  # ? CP ??
  #--------------------------------------------------------------------------
  def cp
    n = 0
    battle_skills.compact.each { |skill| n += skill.cp_cost }
    return [maxcp - n, 0].max
  end
  #--------------------------------------------------------------------------
  # ? CP ????
  #--------------------------------------------------------------------------
  def cp_limit
    return KGC::SkillCPSystem::CP_MAX
  end
  #--------------------------------------------------------------------------
  # ? ?? CP ??
  #--------------------------------------------------------------------------
  def own_cp
    @own_cp = 0 if @own_cp == nil
    return @own_cp
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  alias skills_KGC_SkillCPSystem skills
  def skills
    result = skills_KGC_SkillCPSystem

    # ??????????
    if skill_cp_restrict?
      result.each_with_index { |skill, i|
        # ?? CP > 0 ???????
        if !KGC::SkillCPSystem::USABLE_COST_ZERO_SKILL || skill.cp_cost > 0
          result[i] = nil
        end
        # ??????????
        if $imported["PassiveSkill"] && KGC::SkillCPSystem::PASSIVE_NEED_TO_SET
          result[i] = nil if skill.passive
        end
      }
      result.compact!
      # ????????
      result |= battle_skills
      result.sort! { |a, b| a.id <=> b.id }
    end

    return result
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def skill_cp_restrict?
    if $game_temp.in_battle
      # ???????????????????????
      return true unless $BTEST && KGC::SkillCPSystem::DISABLE_IN_BATTLETEST
    end

    return false
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def all_skills
    # ???????????
    last_in_battle = $game_temp.in_battle
    $game_temp.in_battle = false

    result = skills_KGC_SkillCPSystem
    if $imported["EquipLearnSkill"]
      result |= (equipment_skills | full_ap_skills)
      result.sort! { |a, b| a.id <=> b.id }
    end

    # ?????????
    $game_temp.in_battle = last_in_battle

    return result
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def battle_skill_max
    @battle_skill_max = -1 if @battle_skill_max == nil
    if @battle_skill_max < 0
      return KGC::SkillCPSystem::MAX_SKILLS
    else
      return @battle_skill_max
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def battle_skill_max=(value)
    @battle_skill_max = value
    if @battle_skills == nil
      @battle_skills = []
    else
      @battle_skills = @battle_skills[0...value]
    end
    restore_passive_rev if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ? ?????? ID ??
  #--------------------------------------------------------------------------
  def battle_skill_ids
    @battle_skills = [] if @battle_skills == nil
    return @battle_skills
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  def battle_skills
    result = []
    battle_skill_ids.each { |i|
      next if i == nil           # ?????????
      result << $data_skills[i]
    }
    return result
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #     index : ??
  #     skill : ???
  #--------------------------------------------------------------------------
  def set_battle_skill(index, skill)
    return unless skill.is_a?(RPG::Skill)  # ?????
    return if cp < skill.cp_cost           # CP ??

    @battle_skills[index] = skill.id
    restore_passive_rev if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #     index : ??
  #--------------------------------------------------------------------------
  def remove_battle_skill(index)
    @battle_skills[index] = nil
    restore_passive_rev if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def clear_battle_skill
    @battle_skills = []
    restore_passive_rev if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #     index : ??
  #     skill : ???
  #--------------------------------------------------------------------------
  def battle_skill_settable?(index, skill)
    return false if battle_skill_max <= index  # ???
    return true  if skill == nil               # nil ?????? OK

    return false if battle_skill_ids.include?(skill.id)  # ?????

    curr_skill = battle_skills[index]
    offset = (curr_skill != nil ? curr_skill.cp_cost : 0)
    return false if self.cp < (skill.cp_cost - offset)  # CP ??

    return true
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def restore_battle_skill
    result = battle_skill_ids.clone
    usable_skills = all_skills

    result.each_with_index { |n, i|
      next if n == nil
      # ?????????
      if (usable_skills.find { |s| s.id == n }) == nil
        result[i] = nil
      end
    }
    @battle_skills = result
  end
  #--------------------------------------------------------------------------
  # ? ????? (?????????)
  #     equip_type : ???? (0..4)
  #     item       : ?? or ?? (nil ??????)
  #     test       : ?????? (???????????????????)
  #--------------------------------------------------------------------------
  alias change_equip_KGC_SkillCPSystem change_equip
  def change_equip(equip_type, item, test = false)
    change_equip_KGC_SkillCPSystem(equip_type, item, test)

    unless test
      restore_battle_skill
      restore_passive_rev if $imported["PassiveSkill"]
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     item : ?????? or ??
  #    ??/???????????????????????
  #--------------------------------------------------------------------------
  alias discard_equip_KGC_SkillCPSystem discard_equip
  def discard_equip(item)
    discard_equip_KGC_SkillCPSystem(item)

    restore_battle_skill
    restore_passive_rev if $imported["PassiveSkill"]
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #     exp  : ??????
  #     show : ???????????
  #--------------------------------------------------------------------------
  alias change_exp_KGC_SkillCPSystem change_exp
  def change_exp(exp, show)
    # ????????????????????????????
    last_in_battle = $game_temp.in_battle
    $game_temp.in_battle = false

    change_exp_KGC_SkillCPSystem(exp, show)

    $game_temp.in_battle = last_in_battle
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #     skill_id : ??? ID
  #--------------------------------------------------------------------------
  alias forget_skill_KGC_SkillCPSystem forget_skill
  def forget_skill(skill_id)
    # ?????????????????
    battle_skill_ids.each_with_index { |s, i|
      remove_battle_skill(i) if s == skill_id
    }

    forget_skill_KGC_SkillCPSystem(skill_id)
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #     skill : ???
  #--------------------------------------------------------------------------
  def battle_skill_set?(skill)
    return false unless skill.is_a?(RPG::Skill)  # ?????

    return battle_skill_ids.include?(skill.id)
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ? CP ???????
  #     actor : ????
  #--------------------------------------------------------------------------
  def cp_color(actor)
    return knockout_color if actor.maxcp > 0 && actor.cp == 0
    return normal_color
  end
  #--------------------------------------------------------------------------
  # ? CP ????? 1 ???
  #--------------------------------------------------------------------------
  def cp_gauge_color1
    color = KGC::SkillCPSystem::GAUGE_START_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ? CP ????? 2 ???
  #--------------------------------------------------------------------------
  def cp_gauge_color2
    color = KGC::SkillCPSystem::GAUGE_END_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ? CP ???
  #     actor : ????
  #     x     : ??? X ??
  #     y     : ??? Y ??
  #     width : ?
  #--------------------------------------------------------------------------
  def draw_actor_cp(actor, x, y, width = 120)
    draw_actor_cp_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::cp_a)
    self.contents.font.color = cp_color(actor)
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.cp, 2)
    else
      self.contents.draw_text(xr - 90, y, 40, WLH, actor.cp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxcp, 2)
    end
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ? CP ??????
  #     actor : ????
  #     x     : ??? X ??
  #     y     : ??? Y ??
  #     width : ?
  #--------------------------------------------------------------------------
  def draw_actor_cp_gauge(actor, x, y, width = 120)
    gw = width * actor.cp / [actor.maxcp, 1].max
    gc1 = cp_gauge_color1
    gc2 = cp_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Window_Command
#==============================================================================

class Window_Command < Window_Selectable
  unless method_defined?(:add_command)
  #--------------------------------------------------------------------------
  # ? ???????
  #    ?????????
  #--------------------------------------------------------------------------
  def add_command(command)
    @commands << command
    @item_max = @commands.size
    item_index = @item_max - 1
    refresh_command
    draw_item(item_index)
    return item_index
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def refresh_command
    buf = self.contents.clone
    self.height = [self.height, row_max * WLH + 32].max
    create_contents
    self.contents.blt(0, 0, buf, buf.rect)
    buf.dispose
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def insert_command(index, command)
    @commands.insert(index, command)
    @item_max = @commands.size
    refresh_command
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def remove_command(command)
    @commands.delete(command)
    @item_max = @commands.size
    refresh
  end
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Window_Status
#==============================================================================

if KGC::SkillCPSystem::SHOW_STATUS_CP
class Window_Status < Window_Base
  #--------------------------------------------------------------------------
  # ? ???????
  #     x : ??? X ??
  #     y : ??? Y ??
  #--------------------------------------------------------------------------
  alias draw_basic_info_KGC_SkillCPSystem draw_basic_info
  def draw_basic_info(x, y)
    draw_basic_info_KGC_SkillCPSystem(x, y)

    draw_actor_cp(@actor, x, y + WLH * 4)
  end
end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_BattleSkillStatus
#------------------------------------------------------------------------------
#   ?????????????????????????????????
#==============================================================================

class Window_BattleSkillStatus < Window_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #     x     : ?????? X ??
  #     y     : ?????? Y ??
  #     actor : ????
  #--------------------------------------------------------------------------
  def initialize(x, y, actor)
    super(x, y, Graphics.width, WLH + 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 140, 0)
    draw_actor_cp(@actor, 240, 0)
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_BattleSkillSlot
#------------------------------------------------------------------------------
#   ??????????????????????????????????
#==============================================================================

class Window_BattleSkillSlot < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ?????????
  #     x      : ?????? X ??
  #     y      : ?????? Y ??
  #     width  : ???????
  #     height : ????????
  #     actor  : ????
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height, actor)
    super(x, y, width, height)
    @actor = actor
    self.index = 0
    self.active = false
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def skill
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    skill_ids = @actor.battle_skill_ids
    @actor.battle_skill_max.times { |i|
      if skill_ids[i] != nil
        @data << $data_skills[skill_ids[i]]
      else
        @data << nil
      end
    }
    @item_max = @data.size
    create_contents
    @item_max.times { |i| draw_item(i) }
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     index : ????
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    skill = @data[index]
    if skill != nil
      rect.width -= 4
      draw_item_name(skill, rect.x, rect.y)
      self.contents.draw_text(rect, skill.cp_cost, 2)
    else
      self.contents.draw_text(rect, KGC::SkillCPSystem::BLANK_TEXT, 1)
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active

    if Input.repeat?(Input::RIGHT)
      cursor_pagedown
    elsif Input.repeat?(Input::LEFT)
      cursor_pageup
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(skill == nil ? "" : skill.description)
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_BattleSkillList
#------------------------------------------------------------------------------
#   ???????????????????????????????????
#==============================================================================

class Window_BattleSkillList < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  attr_accessor :slot_index               # ??????
  #--------------------------------------------------------------------------
  # ? ?????????
  #     x      : ?????? X ??
  #     y      : ?????? Y ??
  #     width  : ???????
  #     height : ????????
  #     actor  : ????
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height, actor)
    super(x, y, width, height)
    @actor = actor
    @slot_index = 0
    self.index = 0
    self.active = false
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def skill
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    @data = [nil]
    # ?????????????
    @actor.all_skills.each { |skill|
      @data.push(skill) if selectable?(skill)
    }

    @item_max = @data.size
    create_contents
    @item_max.times { |i| draw_item(i) }
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #     skill : ???
  #--------------------------------------------------------------------------
  def selectable?(skill)
    return false if skill == nil

    # ?? CP 0 ???????????
    if KGC::SkillCPSystem::USABLE_COST_ZERO_SKILL && skill.cp_cost == 0
      return false
    end
    # ??????????OK
    return true if skill.battle_ok?
    # ??????????????
    if KGC::SkillCPSystem::SHOW_UNUSABLE_SKILL && skill.occasion == 3
      return true
    end

    return false
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     index : ????
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    skill = @data[index]
    if skill != nil
      rect.width -= 4
      enabled = @actor.battle_skill_settable?(@slot_index, skill)
      draw_item_name(skill, rect.x, rect.y, enabled)
      self.contents.draw_text(rect, skill.cp_cost, 2)
    else
      self.contents.draw_text(rect, KGC::SkillCPSystem::RELEASE_TEXT, 1)
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active

    if Input.repeat?(Input::RIGHT)
      cursor_pagedown
    elsif Input.repeat?(Input::LEFT)
      cursor_pageup
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(skill == nil ? "" : skill.description)
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  alias update_scene_change_KGC_SkillCPSystem update_scene_change
  def update_scene_change
    return if $game_player.moving?    # ??????????

    if $game_temp.next_scene == :set_battle_skill
      call_set_battle_skill
      return
    end

    update_scene_change_KGC_SkillCPSystem
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def call_set_battle_skill
    $game_temp.next_scene = nil
    $scene = Scene_SetBattleSkill.new(
      $game_temp.next_scene_actor_index,
      0,
      Scene_SetBattleSkill::HOST_MAP)
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Scene_Menu
#==============================================================================

class Scene_Menu < Scene_Base
  if KGC::SkillCPSystem::USE_MENU_SET_SKILL_COMMAND
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  alias create_command_window_KGC_SkillCPSystem create_command_window
  def create_command_window
    create_command_window_KGC_SkillCPSystem

    return if $imported["CustomMenuCommand"]

    @__command_set_battle_skill_index =
      @command_window.add_command(Vocab.set_battle_skill)
    if @command_window.oy > 0
      @command_window.oy -= Window_Base::WLH
    end
    @command_window.index = @menu_index
  end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  alias update_command_selection_KGC_SkillCPSystem update_command_selection
  def update_command_selection
    call_set_battle_skill_flag = false
    if Input.trigger?(Input::C)
      case @command_window.index
      when @__command_set_battle_skill_index  # ?????
        call_set_battle_skill_flag = true
      end
    end

    # ??????????
    if call_set_battle_skill_flag
      if $game_party.members.size == 0
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      start_actor_selection
      return
    end

    update_command_selection_KGC_SkillCPSystem
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  alias update_actor_selection_KGC_SkillCPSystem update_actor_selection
  def update_actor_selection
    if Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when @__command_set_battle_skill_index  # ?????
        $scene = Scene_SetBattleSkill.new(
          @status_window.index,
          @__command_set_battle_skill_index,
          Scene_SetBattleSkill::HOST_MENU)
        return
      end
    end

    update_actor_selection_KGC_SkillCPSystem
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Scene_SetBattleSkill
#------------------------------------------------------------------------------
#   ?????????????????????
#==============================================================================

class Scene_SetBattleSkill < Scene_Base
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  HOST_MENU   = 0  # ????? : ????
  HOST_MAP    = 1  # ????? : ???
  #--------------------------------------------------------------------------
  # ? ?????????
  #     actor_index : ??????????
  #     menu_index  : ?????????????
  #     host_scene  : ????? (0..????  1..???)
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, menu_index = 0, host_scene = HOST_MENU)
    @actor_index = actor_index
    @menu_index = menu_index
    @host_scene = host_scene
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background

    @actor = $game_party.members[@actor_index]
    create_windows
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def create_windows
    @help_window = Window_Help.new
    if $imported["HelpExtension"]
      @help_window.row_max = KGC::HelpExtension::ROW_MAX
    end

    dy = @help_window.height
    @status_window = Window_BattleSkillStatus.new(0, dy, @actor)

    dy += @status_window.height
    @slot_window = Window_BattleSkillSlot.new(
      0,
      dy,
      Graphics.width / 2,
      Graphics.height - dy,
      @actor)
    @slot_window.help_window = @help_window
    @slot_window.active = true

    @list_window = Window_BattleSkillList.new(
      Graphics.width - @slot_window.width,
      dy,
      Graphics.width - @slot_window.width,
      Graphics.height - dy,
      @actor)
    @list_window.help_window = @help_window
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    @status_window.dispose
    @slot_window.dispose
    @list_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def return_scene
    case @host_scene
    when HOST_MENU
      $scene = Scene_Menu.new(@menu_index)
    when HOST_MAP
      $scene = Scene_Map.new
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    update_window
    if @slot_window.active
      update_slot
    elsif @list_window.active
      update_list
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def update_window
    @help_window.update
    @status_window.update
    @slot_window.update
    @list_window.update
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  def refresh_window
    @status_window.refresh
    @slot_window.refresh
    @list_window.refresh
  end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_SetBattleSkill.new(@actor_index, @menu_index, @host_scene)
  end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_SetBattleSkill.new(@actor_index, @menu_index, @host_scene)
  end
  #--------------------------------------------------------------------------
  # ? ?????? (??????????????????)
  #--------------------------------------------------------------------------
  def update_slot
    # ???????????
    if @last_slot_index != @slot_window.index
      @list_window.slot_index = @slot_window.index
      @list_window.refresh
      @last_slot_index = @slot_window.index
    end

    if Input.trigger?(Input::A)
      Sound.play_decision
      # ????????????
      @actor.remove_battle_skill(@slot_window.index)
      refresh_window
    elsif Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      # ?????????????
      @slot_window.active = false
      @list_window.active = true
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????? (?????????????????)
  #--------------------------------------------------------------------------
  def update_list
    if Input.trigger?(Input::B)
      Sound.play_cancel
      # ??????????????
      @slot_window.active = true
      @list_window.active = false
    elsif Input.trigger?(Input::C)
      skill = @list_window.skill
      # ?????????
      unless @actor.battle_skill_settable?(@slot_window.index, skill)
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      set_skill(@slot_window.index, skill)
      # ??????????????
      @slot_window.active = true
      @list_window.active = false
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     index : ??????
  #     skill : ???????
  #--------------------------------------------------------------------------
  def set_skill(index, skill)
    @actor.remove_battle_skill(index)
    if skill != nil
      @actor.set_battle_skill(index, skill)
    end
    refresh_window
  end
end
-Instrucciones: personalizar la secuencia de comandos solo mire el script instruciones en las líneas 13 a 30
-Screen:
cpwindowpq8.png

Pd: no encontre el script que me pediste abajo :(
 
Última edición:
Mensajes
35
Reacciones
0
Puntos
0
Buenisimo gracias!!!
ix es 9 xD...
Tmb hay un script de orfebre, q tmb estaba en el ff9, q basicamente es hacer nuevos objetos con algunos q tengas en el inventario...
Si encuentras por favor tmb lo necesito:hurted:
Saludos!
 
Mensajes
35
Reacciones
0
Puntos
0
Gracias x el script! voy a ver si me sirve....
Aca pongo un script de orfere q encontre... creo q esta en japones o algo... si lo pueden traducir o alguien sabe como usarlo agradeceria q me digan...

-Nombre Del Script: Orfebreria

-Version Del Script: ???

-Rpg Maker:
Vx (rggs2)

-Introduccion: Supuestamente seria como el sistema de orfebreria del ff9...

-Script:

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ アイテム合成 - KGC_ComposeItem ◆ VX ◆
#_/ ◇ Last update : 2008/11/02 ◇
#_/----------------------------------------------------------------------------
#_/ 複数のアイテムを合成し、新たなアイテムを作り出す機能を作成します。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ カスタマイズ項目 - Customize ★
#==============================================================================

module KGC
module ComposeItem
# ◆ 合成画面呼び出しフラグを表すスイッチ番号
# このスイッチを ON にすると、通常のショップの代わりに合成屋が開きます。
COMPOSE_CALL_SWITCH = 2

# ◆ 合成レシピ
# [費用, "タイプ:ID,個数", ...]
# 【 費用 】合成費用
# 【タイプ】合成素材の種類 (I..アイテム W..武器 A..防具)
# 【 ID 】合成素材のID (↑と対応)
# 【 個数 】合成素材の必要数
# "タイプ:ID,個数" はいくつでも指定できます。
# 個数を省略して "タイプ:ID" と書いた場合、個数は 1 扱いとなります。
# 個数を 0 にした場合、1 個以上持っていれば何度でも合成できます。
# レシピ配列は、添字がアイテム・武器・防具IDに対応しています。
RECIPE_ITEM = [] # アイテム
RECIPE_WEAPON = [] # 武器
RECIPE_ARMOR = [] # 防具
# ここから下に合成レシピを定義。
# <設定例>
# アイテムID:8 の合成レシピ
# アイテムID 2, 4, 7 を 1 個ずつ消費。無料。
RECIPE_ITEM[8] = [0, "I:2", "I:4", "I:7"]
# 武器ID:16 の合成レシピ
# 武器ID:10 を 1 個、アイテムID:16 を 2 個消費。800 G。
RECIPE_WEAPON[16] = [800, "W:10", "I:16,2"]
# 防具ID:29 の合成レシピ
# 防具ID:25 を 1 個、アイテムID:8 を 3 個消費。2000 G。
RECIPE_ARMOR[29] = [2000, "A:25", "I:8,3"]

# ◆ 合成コマンド名
# "購入する" コマンドの位置に表示されます。
# ※ 他のコマンド名は [Vocab] で変更可能。
VOCAB_COMPOSE_ITEM = "合成する"
# ◆ 合成アイテム情報切り替えボタン
# 「素材リスト <--> 能力値変化(装備品のみ)」を切り替えるボタン。
# 使用しない場合は nil を指定。
SWITCH_INFO_BUTTON = Input::X

# ◆ 必要素材リストをコンパクトにする
# 素材数が多い場合は true にしてください。
COMPACT_MATERIAL_LIST = true
# ◆ コマンドウィンドウを表示しない
# true : XP 版と同様のスタイル
# false : VX 仕様
HIDE_COMMAND_WINDOW = false
# ◆ 所持金ウィンドウを表示しない
# true : 消える
# false : 表示
# HIDE_COMMAND_WINDOW が false のときは、常に false 扱いとなります。
HIDE_GOLD_WINDOW = false
# ◆ 合成費用が 0 の場合、費用を表示しない
# true : 表示しない
# false : 0 と表示
HIDE_ZERO_COST = true

# ◆ 合成済みのレシピは常に表示する
# true : 一度でも合成したことがあれば常にリストに表示
# false : 合成したことがあっても↓の条件に従う
SHOW_COMPOSED_RECIPE = true
# ◆ 合成費用不足のレシピを隠す
# true : 費用不足ならリストに表示しない
# false : 費用不足でも表示
HIDE_SHORTAGE_COST = false
# ◆ 合成素材不足のレシピを隠す
# true : 素材不足ならリストに表示しない
# false : 素材不足でも表示
HIDE_SHORTAGE_MATERIAL = true
# ◆ 「判明・解禁・存在」機能を使用する
# true : 判明・解禁・存在するまで表示しない
# false : 素材さえあれば合成可能
# true の場合、仕様上強制的に
# HIDE_SHORTAGE_COST = false
# HIDE_SHORTAGE_MATERIAL = false
# という扱いになります。
NEED_RECIPE_EXIST = true

# ◆ 合成したことがないレシピのアイテム名を隠す
MASK_UNKNOWN_RECIPE_NAME = true
# ◆ 合成したことがないレシピに表示する名前
# 1文字だけ指定すると、アイテム名と同じ文字数に拡張されます。
UNKNOWN_NAME_MASK = "?"
# ◆ 合成したことがないレシピのヘルプを隠す
HIDE_UNKNOWN_RECIPE_HELP = true
# ◆ 合成したことがないレシピに表示するヘルプ
UNKNOWN_RECIPE_HELP = "合成したことがありません。"
# ◆ 判明・解禁していないレシピの素材を隠す
# NEED_RECIPE_EXIST = false の場合、常に false 扱いとなります。
HIDE_UNKNOWN_RECIPE_MATERIAL = true
# ◆ 素材を隠す場合の表示文字列
UNKNOWN_RECIPE_MATERIAL = "????????"
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

$imported = {} if $imported == nil
$imported["ComposeItem"] = true

module KGC::ComposeItem
unless NEED_RECIPE_EXIST
HIDE_UNKNOWN_RECIPE_MATERIAL = false
end

module Regexp
# レシピ
RECIPE = /([IWA])\s*:\s*(\d+)(\s*,\s*\d+)?/i
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ KGC::Commands
#==============================================================================

module KGC
module Commands
module_function
#--------------------------------------------------------------------------
# ○ レシピ判明フラグを設定
# type : レシピのタイプ (0..アイテム 1..武器 2..防具)
# id : アイテムの ID
# enabled : true..判明 false..未判明
#--------------------------------------------------------------------------
def set_recipe_cleared(type, id, enabled = true)
item = nil
case type
when 0, :item # アイテム
item = $data_items[id]
when 1, :weapon # 武器
item = $data_weapons[id]
when 2, :armor # 防具
item = $data_armors[id]
end

$game_party.set_recipe_cleared(item, enabled) if item != nil
end
#--------------------------------------------------------------------------
# ○ レシピ解禁フラグを設定
# type : レシピのタイプ (0..アイテム 1..武器 2..防具)
# id : アイテムの ID
# enabled : true..解禁 false..未解禁
#--------------------------------------------------------------------------
def set_recipe_opened(type, id, enabled = true)
item = nil
case type
when 0, :item # アイテム
item = $data_items[id]
when 1, :weapon # 武器
item = $data_weapons[id]
when 2, :armor # 防具
item = $data_armors[id]
end

$game_party.set_recipe_opened(item, enabled) if item != nil
end
#--------------------------------------------------------------------------
# ○ レシピ存在フラグを設定
# type : レシピのタイプ (0..アイテム 1..武器 2..防具)
# id : アイテムの ID
# enabled : true or false
#--------------------------------------------------------------------------
def set_recipe_exist(type, id, enabled = true)
item = nil
case type
when 0, :item # アイテム
item = $data_items[id]
when 1, :weapon # 武器
item = $data_weapons[id]
when 2, :armor # 防具
item = $data_armors[id]
end

$game_party.set_recipe_exist(item, enabled) if item != nil
end
end
end

class Game_Interpreter
include KGC::Commands
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Vocab
#==============================================================================

module Vocab
# 合成画面
ComposeItem = KGC::ComposeItem::VOCAB_COMPOSE_ITEM
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
#--------------------------------------------------------------------------
# ○ クラス変数
#--------------------------------------------------------------------------
@@__masked_name =
KGC::ComposeItem::UNKNOWN_NAME_MASK # マスク名
@@__expand_masked_name = false # マスク名拡張表示フラグ

if @@__masked_name != nil
@@__expand_masked_name = (@@__masked_name.scan(/./).size == 1)
end
#--------------------------------------------------------------------------
# ○ アイテム合成のキャッシュ生成
#--------------------------------------------------------------------------
def create_compose_item_cache
@__compose_cost = 0
@__compose_materials = []

# レシピ取得
recipe = nil
case self
when RPG::Item # アイテム
recipe = KGC::ComposeItem::RECIPE_ITEM[self.id]
when RPG::Weapon # 武器
recipe = KGC::ComposeItem::RECIPE_WEAPON[self.id]
when RPG::Armor # 防具
recipe = KGC::ComposeItem::RECIPE_ARMOR[self.id]
end
return if recipe == nil
recipe = recipe.dup

@__compose_cost = recipe.shift
# 素材リストを作成
recipe.each { |r|
if r =~ KGC::ComposeItem::Regexp::RECIPE
material = Game_ComposeMaterial.new
material.kind = $1.upcase # 素材の種類を取得
material.id = $2.to_i # 素材の ID を取得
if $3 != nil
material.number = [$3[/\d+/].to_i, 0].max # 必要数を取得
end
@__compose_materials << material
end
}
end
#--------------------------------------------------------------------------
# ○ マスク名
#--------------------------------------------------------------------------
def masked_name
if @@__expand_masked_name
# マスク名を拡張して表示
return @@__masked_name * self.name.scan(/./).size
else
return @@__masked_name
end
end
#--------------------------------------------------------------------------
# ○ 合成用費用
#--------------------------------------------------------------------------
def compose_cost
create_compose_item_cache if @__compose_cost == nil
return @__compose_cost
end
#--------------------------------------------------------------------------
# ○ 合成用素材リスト
#--------------------------------------------------------------------------
def compose_materials
create_compose_item_cache if @__compose_materials == nil
return @__compose_materials
end
#--------------------------------------------------------------------------
# ○ 合成アイテムか
#--------------------------------------------------------------------------
def is_compose?
return !compose_materials.empty?
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Party
#==============================================================================

class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# ○ 合成済みフラグをクリア
#--------------------------------------------------------------------------
def clear_composed_flag
@item_composed = {}
@weapon_composed = {}
@armor_composed = {}
end
#--------------------------------------------------------------------------
# ○ レシピ判明フラグをクリア
#--------------------------------------------------------------------------
def clear_recipe_cleared_flag
@item_recipe_cleared = {}
@weapon_recipe_cleared = {}
@armor_recipe_cleared = {}
end
#--------------------------------------------------------------------------
# ○ レシピ解禁フラグをクリア
#--------------------------------------------------------------------------
def clear_recipe_opened_flag
@item_recipe_opened = {}
@weapon_recipe_opened = {}
@armor_recipe_opened = {}
end
#--------------------------------------------------------------------------
# ○ レシピ存在フラグをクリア
#--------------------------------------------------------------------------
def clear_recipe_exist_flag
@item_recipe_exist = {}
@weapon_recipe_exist = {}
@armor_recipe_exist = {}
end
#--------------------------------------------------------------------------
# ○ アイテムの合成済みフラグを設定
# item : アイテム
# flag : true..合成済み false..未合成
#--------------------------------------------------------------------------
def set_item_composed(item, flag = true)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 合成済みフラグを格納するハッシュを作成
clear_composed_flag if @item_composed == nil

# 合成済みフラグをセット
case item
when RPG::Item # アイテム
@item_composed[item.id] = flag
when RPG::Weapon # 武器
@weapon_composed[item.id] = flag
when RPG::Armor # 防具
@armor_composed[item.id] = flag
end
end
#--------------------------------------------------------------------------
# ○ アイテムの合成済み判定
# item : アイテム
#--------------------------------------------------------------------------
def item_composed?(item)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 合成済みフラグを格納するハッシュを作成
clear_composed_flag if @item_composed == nil

# 合成済み判定
case item
when RPG::Item # アイテム
return @item_composed[item.id]
when RPG::Weapon # 武器
return @weapon_composed[item.id]
when RPG::Armor # 防具
return @armor_composed[item.id]
end
return false
end
#--------------------------------------------------------------------------
# ○ アイテムの合成済みフラグを設定
# item : アイテム
# flag : true..合成済み false..未合成
#--------------------------------------------------------------------------
def set_item_composed(item, flag = true)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 合成済みフラグを格納するハッシュを作成
clear_composed_flag if @item_composed == nil

# 合成済みフラグをセット
case item
when RPG::Item # アイテム
@item_composed[item.id] = flag
when RPG::Weapon # 武器
@weapon_composed[item.id] = flag
when RPG::Armor # 防具
@armor_composed[item.id] = flag
end
end
#--------------------------------------------------------------------------
# ○ レシピ判明判定
# item : アイテム
#--------------------------------------------------------------------------
def recipe_cleared?(item)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 判明フラグを格納するハッシュを作成
clear_recipe_cleared_flag if @item_recipe_cleared == nil

# 判定
case item
when RPG::Item # アイテム
return @item_recipe_cleared[item.id]
when RPG::Weapon # 武器
return @weapon_recipe_cleared[item.id]
when RPG::Armor # 防具
return @armor_recipe_cleared[item.id]
end
return false
end
#--------------------------------------------------------------------------
# ○ アイテムの判明フラグを設定
# item : アイテム
# flag : true..判明 false..未判明
#--------------------------------------------------------------------------
def set_recipe_cleared(item, flag = true)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 判明フラグを格納するハッシュを作成
clear_recipe_cleared_flag if @item_recipe_cleared == nil

# 判明フラグをセット
case item
when RPG::Item # アイテム
@item_recipe_cleared[item.id] = flag
when RPG::Weapon # 武器
@weapon_recipe_cleared[item.id] = flag
when RPG::Armor # 防具
@armor_recipe_cleared[item.id] = flag
end
end
#--------------------------------------------------------------------------
# ○ レシピ解禁判定
# item : アイテム
#--------------------------------------------------------------------------
def recipe_opened?(item)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 解禁フラグを格納するハッシュを作成
clear_recipe_opened_flag if @item_recipe_opened == nil

# 判定
case item
when RPG::Item # アイテム
return @item_recipe_opened[item.id]
when RPG::Weapon # 武器
return @weapon_recipe_opened[item.id]
when RPG::Armor # 防具
return @armor_recipe_opened[item.id]
end
return false
end
#--------------------------------------------------------------------------
# ○ アイテムの解禁フラグを設定
# item : アイテム
# flag : true..解禁 false..未解禁
#--------------------------------------------------------------------------
def set_recipe_opened(item, flag = true)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 解禁フラグを格納するハッシュを作成
clear_recipe_opened_flag if @item_recipe_opened == nil

# 解禁フラグをセット
case item
when RPG::Item # アイテム
@item_recipe_opened[item.id] = flag
when RPG::Weapon # 武器
@weapon_recipe_opened[item.id] = flag
when RPG::Armor # 防具
@armor_recipe_opened[item.id] = flag
end
end
#--------------------------------------------------------------------------
# ○ レシピ存在判定
# item : アイテム
#--------------------------------------------------------------------------
def recipe_exist?(item)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 存在フラグを格納するハッシュを作成
clear_recipe_exist_flag if @item_recipe_exist == nil

# 判定
case item
when RPG::Item # アイテム
return @item_recipe_exist[item.id]
when RPG::Weapon # 武器
return @weapon_recipe_exist[item.id]
when RPG::Armor # 防具
return @armor_recipe_exist[item.id]
end
return false
end
#--------------------------------------------------------------------------
# ○ アイテムの存在フラグを設定
# item : アイテム
# flag : true..存在 false..存在しない
#--------------------------------------------------------------------------
def set_recipe_exist(item, flag = true)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

# 存在フラグを格納するハッシュを作成
clear_recipe_exist_flag if @item_recipe_exist == nil

# 存在フラグをセット
case item
when RPG::Item # アイテム
@item_recipe_exist[item.id] = flag
when RPG::Weapon # 武器
@weapon_recipe_exist[item.id] = flag
when RPG::Armor # 防具
@armor_recipe_exist[item.id] = flag
end
end
#--------------------------------------------------------------------------
# ○ アイテム名マスク判定
# item : アイテム
#--------------------------------------------------------------------------
def item_name_mask?(item)
return false unless KGC::ComposeItem::MASK_UNKNOWN_RECIPE_NAME
return false if item_composed?(item) # 合成済み
return false if recipe_cleared?(item) # 判明済み

return true
end
#--------------------------------------------------------------------------
# ○ 素材非表示判定
# item : アイテム
#--------------------------------------------------------------------------
def item_compose_material_mask?(item)
return false unless KGC::ComposeItem::HIDE_UNKNOWN_RECIPE_MATERIAL
return false if item_composed?(item) # 合成済み
return false if recipe_cleared?(item) # 判明済み
return false if recipe_opened?(item) # 解禁済み

return true
end
#--------------------------------------------------------------------------
# ○ アイテムの合成可能判定
# item : アイテム
#--------------------------------------------------------------------------
def item_can_compose?(item)
return false unless item_compose_cost_satisfy?(item)
return false unless item_compose_material_satisfy?(item)

return true
end
#--------------------------------------------------------------------------
# ○ 合成アイテムの資金充足判定
# item : アイテム
#--------------------------------------------------------------------------
def item_compose_cost_satisfy?(item)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

return (gold >= item.compose_cost)
end
#--------------------------------------------------------------------------
# ○ 合成アイテムの素材充足判定
# item : アイテム
#--------------------------------------------------------------------------
def item_compose_material_satisfy?(item)
return false unless item.is_a?(RPG::BaseItem) # アイテム以外
return false unless item.is_compose? # 合成アイテム以外

item.compose_materials.each { |material|
num = item_number(material.item)
return false if num < material.number || num == 0 # 素材不足
}
return true
end
#--------------------------------------------------------------------------
# ○ アイテムの合成可能数を取得
# item : アイテム
#--------------------------------------------------------------------------
def number_of_composable(item)
return 0 unless item.is_a?(RPG::BaseItem) # アイテム以外
return 0 unless item.is_compose? # 合成アイテム以外

number = ($imported["LimitBreak"] ? item.number_limit : 99)
if item.compose_cost > 0
number = [number, gold / item.compose_cost].min
end
# 素材数判定
item.compose_materials.each { |material|
next if material.number == 0 # 必要数 0 は無視
n = item_number(material.item) / material.number
number = [number, n].min
}
return number
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Game_ComposeMaterial
#------------------------------------------------------------------------------
# 合成素材の情報を格納するクラスです。
#==============================================================================

class Game_ComposeMaterial
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :kind # アイテムの種類 (/[IWA]/)
attr_accessor :id # アイテムの ID
attr_accessor :number # 必要数
#--------------------------------------------------------------------------
# ○ オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
@kind = "I"
@id = 0
@number = 1
end
#--------------------------------------------------------------------------
# ○ アイテム取得
#--------------------------------------------------------------------------
def item
case @kind
when "I" # アイテム
return $data_items[@id]
when "W" # 武器
return $data_weapons[@id]
when "A" # 防具
return $data_armors[@id]
else
return nil
end
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_Base
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# ○ マスク済みアイテム名の描画
# item : アイテム (スキル、武器、防具でも可)
# x : 描画先 X 座標
# y : 描画先 Y 座標
# enabled : 有効フラグ。false のとき半透明で描画
#--------------------------------------------------------------------------
def draw_masked_item_name(item, x, y, enabled = true)
return if item == nil

draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.masked_name)
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Window_ComposeNumber
#------------------------------------------------------------------------------
# 合成画面で、合成するアイテムの個数を入力するウィンドウです。
#==============================================================================

class Window_ComposeNumber < Window_ShopNumber
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :sell_flag # 売却フラグ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
#--------------------------------------------------------------------------
alias initialize_KGC_ComposeItem initialize unless $@
def initialize(x, y)
@sell_flag = false

initialize_KGC_ComposeItem(x, y)
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
y = 96
self.contents.clear
if @sell_flag || !$game_party.item_name_mask?(@item)
draw_item_name(@item, 0, y)
else
draw_masked_item_name(@item, 0, y)
end
self.contents.font.color = normal_color
self.contents.draw_text(212, y, 20, WLH, "×")
self.contents.draw_text(248, y, 20, WLH, @number, 2)
self.cursor_rect.set(244, y, 28, WLH)
if !KGC::ComposeItem::HIDE_ZERO_COST || @price > 0
draw_currency_value(@price * @number, 4, y + WLH * 2, 264)
end
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Window_ComposeItem
#------------------------------------------------------------------------------
# 合成画面で、合成できる商品の一覧を表示するウィンドウです。
#==============================================================================

class Window_ComposeItem < Window_ShopBuy
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
@data = []
for goods_item in @shop_goods
case goods_item[0]
when 0
item = $data_items[goods_item[1]]
when 1
item = $data_weapons[goods_item[1]]
when 2
item = $data_armors[goods_item[1]]
end
# 合成アイテムのみ追加
@data.push(item) if include?(item)
end
@item_max = @data.size
create_contents
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# ○ アイテムをリストに含めるかどうか
# item : アイテム
#--------------------------------------------------------------------------
def include?(item)
return false if item == nil # アイテムが nil なら含めない
return false unless item.is_compose? # 合成アイテム以外は含めない

# 合成済みなら表示
if KGC::ComposeItem::SHOW_COMPOSED_RECIPE
return true if $game_party.item_composed?(item)
end
# 判明 or 解禁 or 存在済みなら表示
exist_flag = $game_party.recipe_cleared?(item) ||
$game_party.recipe_opened?(item) || $game_party.recipe_exist?(item)
if KGC::ComposeItem::NEED_RECIPE_EXIST && exist_flag
return true
end
# 費用不足なら隠す
if KGC::ComposeItem::HIDE_SHORTAGE_COST
return false unless $game_party.item_compose_cost_satisfy?(item)
end
# 素材不足なら隠す
if KGC::ComposeItem::HIDE_SHORTAGE_MATERIAL
return false unless $game_party.item_compose_material_satisfy?(item)
end

if KGC::ComposeItem::NEED_RECIPE_EXIST
# 判明 or 解禁 or 存在していない
return false unless exist_flag
end

return true
end
#--------------------------------------------------------------------------
# ○ アイテムを許可状態で表示するかどうか
# item : アイテム
#--------------------------------------------------------------------------
def enable?(item)
return $game_party.item_can_compose?(item)
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
number = $game_party.item_number(item)
limit = ($imported["LimitBreak"] ? item.number_limit : 99)
rect = item_rect(index)
self.contents.clear_rect(rect)
if $game_party.item_name_mask?(item)
draw_masked_item_name(item, rect.x, rect.y, enable?(item))
else
draw_item_name(item, rect.x, rect.y, enable?(item))
end
# 費用を描画
if !KGC::ComposeItem::HIDE_ZERO_COST || item.compose_cost > 0
rect.width -= 4
self.contents.draw_text(rect, item.compose_cost, 2)
end
end

if KGC::ComposeItem::HIDE_UNKNOWN_RECIPE_HELP
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
item = (index >= 0 ? @data[index] : nil)
if item == nil || !$game_party.item_name_mask?(item)
# アイテムが nil or マスクなしなら [Window_ShopBuy] に任せる
super
else
@help_window.set_text(KGC::ComposeItem::UNKNOWN_RECIPE_HELP)
end
end
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Window_ComposeStatus
#------------------------------------------------------------------------------
#  合成画面で、素材の所持数や必要数を表示するウィンドウです。
#==============================================================================

class Window_ComposeStatus < Window_ShopStatus
#--------------------------------------------------------------------------
# ○ 表示モード
#--------------------------------------------------------------------------
MODE_MATERIAL = 0 # 素材リスト
MODE_STATUS = 1 # パーティのステータス
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
#--------------------------------------------------------------------------
def initialize(x, y)
@mode = MODE_MATERIAL
super(x, y)
end
#--------------------------------------------------------------------------
# ○ モード変更
#--------------------------------------------------------------------------
def change_mode
case @mode
when MODE_MATERIAL
@mode = MODE_STATUS
when MODE_STATUS
@mode = MODE_MATERIAL
end
self.oy = 0
refresh
end
#--------------------------------------------------------------------------
# ● ウィンドウ内容の作成
#--------------------------------------------------------------------------
def create_contents
if @mode == MODE_STATUS
super
return
end

self.contents.dispose
ch = height - 32
if @item != nil
mag = (KGC::ComposeItem::COMPACT_MATERIAL_LIST ? 1 : 2)
ch = [ch, WLH * (mag + @item.compose_materials.size * mag)].max
end
self.contents = Bitmap.new(width - 32, ch)
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
create_contents
self.contents.font.size = Font.default_size
case @mode
when MODE_MATERIAL
draw_material_list
when MODE_STATUS
super
end
end
#--------------------------------------------------------------------------
# ○ 素材リストを描画
#--------------------------------------------------------------------------
def draw_material_list
return if @item == nil

number = $game_party.item_number(@item)
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, WLH, Vocab::possession)
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 200, WLH, number, 2)

# 不明な素材を隠す
if $game_party.item_compose_material_mask?(@item)
self.contents.draw_text(4, WLH * 2, 200, WLH,
KGC::ComposeItem::UNKNOWN_RECIPE_MATERIAL, 1)
return
end

self.contents.font.size = 16 if KGC::ComposeItem::COMPACT_MATERIAL_LIST
mag = (KGC::ComposeItem::COMPACT_MATERIAL_LIST ? 1 : 2)
@item.compose_materials.each_with_index { |material, i|
y = WLH * (mag + i * mag)
draw_material_info(0, y, material)
}
end
#--------------------------------------------------------------------------
# ○ 素材情報を描画
#--------------------------------------------------------------------------
def draw_material_info(x, y, material)
m_item = material.item
return if m_item == nil
number = $game_party.item_number(m_item)
enabled = (number > 0 && number >= material.number)
draw_item_name(m_item, x, y, enabled)
if KGC::ComposeItem::COMPACT_MATERIAL_LIST
m_number = (material.number == 0 ? "-" : sprintf("%d", material.number))
self.contents.draw_text(x, y, width - 32, WLH,
sprintf("%s/%d", m_number, number), 2)
else
m_number = (material.number == 0 ? "-" : sprintf("%2d", material.number))
self.contents.draw_text(x, y + WLH, width - 32, WLH,
sprintf("%2s/%2d", m_number, number), 2)
end
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● ショップ画面への切り替え
#--------------------------------------------------------------------------
alias call_shop_KGC_ComposeItem call_shop
def call_shop
# 合成画面を呼び出した場合
if $game_switches[KGC::ComposeItem::COMPOSE_CALL_SWITCH]
# 合成画面に移行
$game_temp.next_scene = nil
$game_switches[KGC::ComposeItem::COMPOSE_CALL_SWITCH] = false
$scene = Scene_ComposeItem.new
else
call_shop_KGC_ComposeItem
end
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Scene_ComposeItem
#------------------------------------------------------------------------------
#  合成画面の処理を行うクラスです。(Scene_Shop を流用)
#==============================================================================

class Scene_ComposeItem < Scene_Shop
#--------------------------------------------------------------------------
# ● 開始処理
#--------------------------------------------------------------------------
def start
super
# コマンドウィンドウ非表示
if KGC::ComposeItem::HIDE_COMMAND_WINDOW
@command_window.visible = false
@gold_window.y = Graphics.height - @gold_window.height
@gold_window.z = @status_window.z + 100
@gold_window.visible = !KGC::ComposeItem::HIDE_GOLD_WINDOW

@dummy_window.y = @command_window.y
@dummy_window.height += @command_window.height
end

# [Scene_Shop] 再利用のため、合成リストに @buy_window を使用
@buy_window.dispose
@buy_window = Window_ComposeItem.new(0, @dummy_window.y)
@buy_window.height = @dummy_window.height
@buy_window.active = false
@buy_window.visible = false
@buy_window.help_window = @help_window

# その他のウィンドウを再構成
@number_window.dispose
@number_window = Window_ComposeNumber.new(0, @buy_window.y)
@number_window.height = @buy_window.height
@number_window.create_contents
@number_window.active = false
@number_window.visible = false

@status_window.dispose
@status_window = Window_ComposeStatus.new(@buy_window.width, @buy_window.y)
@status_window.height = @buy_window.height
@status_window.create_contents
@status_window.visible = false

# コマンドウィンドウ非表示の場合、合成ウィンドウに切り替え
if KGC::ComposeItem::HIDE_COMMAND_WINDOW
@command_window.active = false
@dummy_window.visible = false
@buy_window.active = true
@buy_window.visible = true
@buy_window.update_help
@status_window.visible = true
@status_window.item = @buy_window.item
end
end
#--------------------------------------------------------------------------
# ● コマンドウィンドウの作成
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::ComposeItem
s2 = Vocab::ShopSell
s3 = Vocab::ShopCancel
@command_window = Window_Command.new(384, [s1, s2, s3], 3)
@command_window.y = 56
if $game_temp.shop_purchase_only
@command_window.draw_item(1, false)
end
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if KGC::ComposeItem::SWITCH_INFO_BUTTON != nil &&
Input.trigger?(KGC::ComposeItem::SWITCH_INFO_BUTTON)
Sound.play_cursor
@status_window.change_mode
end
end
#--------------------------------------------------------------------------
# ● 購入アイテム選択の更新
#--------------------------------------------------------------------------
def update_buy_selection
@number_window.sell_flag = false

# コマンドウィンドウ非表示で B ボタンが押された場合
if KGC::ComposeItem::HIDE_COMMAND_WINDOW && Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
return
end

@status_window.item = @buy_window.item
if Input.trigger?(Input::C)
@item = @buy_window.item
# アイテムが無効なら選択不可
if @item == nil
Sound.play_buzzer
return
end

# 合成不可能 or 限界数まで所持している場合は選択不可
number = $game_party.item_number(@item)
limit = ($imported["LimitBreak"] ? @item.number_limit : 99)
if !$game_party.item_can_compose?(@item) || number == limit
Sound.play_buzzer
return
end

# 個数入力に切り替え
Sound.play_decision
max = $game_party.number_of_composable(@item)
max = [max, limit - number].min
@buy_window.active = false
@buy_window.visible = false
@number_window.set(@item, max, @item.compose_cost)
@number_window.active = true
@number_window.visible = true
return
end

super
end
#--------------------------------------------------------------------------
# ● 売却アイテム選択の更新
#--------------------------------------------------------------------------
def update_sell_selection
@number_window.sell_flag = true
super
end
#--------------------------------------------------------------------------
# ● 個数入力の決定
#--------------------------------------------------------------------------
def decide_number_input
if @command_window.index != 0 # 「合成する」以外
super
return
end

Sound.play_shop
@number_window.active = false
@number_window.visible = false
# 合成処理
operation_compose
@gold_window.refresh
@buy_window.refresh
@status_window.refresh
@buy_window.active = true
@buy_window.visible = true
end
#--------------------------------------------------------------------------
# ○ 合成の処理
#--------------------------------------------------------------------------
def operation_compose
$game_party.lose_gold(@number_window.number * @item.compose_cost)
$game_party.gain_item(@item, @number_window.number)
# 素材を減らす
@item.compose_materials.each { |material|
$game_party.lose_item(material.item,
material.number * @number_window.number)
}
# 合成済みにする
$game_party.set_item_composed(@item)
end
end

No puse screenshots xq no encontre...
 
Mensajes
57
Reacciones
0
Puntos
0
a alguien podria publicarme un scrips para que un evento salga soloamente 1 ves en todo el juego para el rpg
maker XP porfa y si es posible tanbien para el VX
 
Estado
Cerrado para nuevas respuestas
Arriba Pie