Makers Edition
Olá visitante,que tal registre-se em nosso fórum, para poder postar tópicos, para ajudar outros membros e também ser ajudado!
com isso você pode ganhar experiencia e ser um exelente maker!Se você não entendeu nada do que eu disse se registre e peça a um administrador para te explicar.

Sistema de Forja 1.09

Ir em baixo

Sistema de Forja 1.09

Mensagem por *Kenon* em Ter Jul 27, 2010 12:48 am

Ola Galera aqui e o kenon estou disponibilisando outro scritp para galera ai

Sistema de Forja 1.09


Este script torna possível a criação de equipamentos e ítens apartir de itens especiais.
Para utilizar é só criar um novo script na area de Scripts Adicionais e cole o código abaixo.

Scritp
Spoiler:
###########################################################
###################### REFINAMENTO ########################
#### V 1.0.9 ##############################################
################################### Por: LB ###############
###########################################################
##################### www.ReinoRpg.com ####################
###########################################################

module Refiner

Grupos_arms = []
Grupos_atr = []
Grupos_atr[1] = []
Grupos_atr[2] = []
Grupos_atr[3] = []
TEXT = []

# Configurações de Português:

TEXT[0] = "Sim"
TEXT[1] = "Não"
TEXT[2] = "Você não tem os"
TEXT[3] = "itens nessessários."
TEXT[4] = "Confirma?"
TEXT[5] = "Requisitos:"
TEXT[6] = "→"

# Configurações Gerais:

# ----------------------------------------------------
Grupos_name = ["Itens","Escudos","Amuletos","Armas Mithril","Armaduras"]
# Nome dos Grupos
# ----------------------------------------------------
Grupos_tips = [3,1,1,2,1]
# Tipos de itens dos grupos (na mesma ordem)
# 1 = Armaduras
# 2 = Armas
# 3 = Ítens
# ----------------------------------------------------
# ID dos equips que fazem parte dos grupos:
# Max = 15 por grupo
Grupos_arms[0] = [1,2,3,4,5,6,7,8]
Grupos_arms[1] = [1,2,3,4,5,6]
Grupos_arms[2] = [23,24,25,26,27]
Grupos_arms[3] = [19,20,21,23]
Grupos_arms[4] = [14,15,17,19,22]
# ----------------------------------------------------
# ID dos itens que serão os minerios
# Max = 14
Minerios_id = [1,2,3,4,5,6,7,8]
# ----------------------------------------------------
# Quantidade dos minerios, seguindo a ordem acima.
# Grupos_atr[TIPO][ID]
# TIPO:
# 1 = Armaduras
# 2 = Armas
# 3 = Ítens
# ID:
# Id do equipamento a que se refere
#
# Max de cada ítem: 999
# ----------------------------------------------------
# Armaduras:
Grupos_atr[1][1] = [5,5,5,0,0,0,0,0]
Grupos_atr[1][2] = [10,15,0,0,0,0,0,0]
Grupos_atr[1][3] = [5,0,0,0,10,0,0,0]
Grupos_atr[1][4] = [5,5,5,5,5,5,5,5]
Grupos_atr[1][5] = [8,45,0,0,0,0,0,0]
Grupos_atr[1][6] = [85,0,0,0,0,0,0,0]
Grupos_atr[1][14] = [20,0,0,0,0,0,0,0]
Grupos_atr[1][15] = [0,0,5,5,5,5,0,0]
Grupos_atr[1][17] = [0,25,0,0,0,0,0,0]
Grupos_atr[1][19] = [0,0,0,0,0,0,0,60]
Grupos_atr[1][22] = [0,0,0,0,0,82,0,0]
Grupos_atr[1][23] = [500,0,0,0,0,0,0,0]
Grupos_atr[1][24] = [0,0,500,0,0,0,0,0]
Grupos_atr[1][25] = [0,0,0,0,500,0,0,0]
Grupos_atr[1][26] = [0,0,0,0,0,0,500,0]
Grupos_atr[1][27] = [850,0,0,0,0,0,0,0]
# Armas:
Grupos_atr[2][19] = [999,0,0,0,0,0,0,0]
Grupos_atr[2][20] = [0,0,999,0,0,0,0,0]
Grupos_atr[2][21] = [0,0,0,0,999,0,0,0]
Grupos_atr[2][23] = [0,0,0,0,0,0,999,0]
# Ítens
Grupos_atr[3][1] = [5,0,0,0,0,0,0,0]
Grupos_atr[3][2] = [0,10,0,0,0,0,0,0]
Grupos_atr[3][3] = [0,55,0,0,0,0,0,0]
Grupos_atr[3][4] = [0,0,0,0,8,0,0,0]
Grupos_atr[3][5] = [0,0,50,10,0,0,0,0]
Grupos_atr[3][6] = [1,1,1,1,1,1,1,1]
Grupos_atr[3][7] = [0,6,6,6,0,0,0,0]
Grupos_atr[3][8] = [10,10,10,0,0,0,0,0]
# ---------------------------------------------------- #
# FIM DAS CONFIGURAÇÕES - INICIO DO SCRIPT #
# ---------------------------------------------------- #

end
class Window_Minerios < Window_Base
def initialize(icons, x = 420, y = 5)
super(x, y, 120, WLH * Refiner::Minerios_id.size + WLH + 32 + 10)
@icons = icons
self.contents.font.name = "UmePlus Gothic"
refresh
end
def refresh
self.contents.clear
y = 10
x = 5
for i in 0...Refiner::Minerios_id.size
y = y + WLH
icon = @icons[i]
draw_icon(icon, x, y)
end
end
end
class Scene_Refinar < Scene_Base
def start
super
create_menu_background
start_vars
@min_window = Window_Minerios.new(@icons)
@min_window.visible = false
@grupo_window = Window_Command.new(160, Refiner::Grupos_name)
@grupo_window.x = 5
@grupo_window.y = 5
@equips_window = Window_Command.new(160, [""])
@equips_window.visible = false
@equips_window.active = false
@confirm_window = Window_Confirm.new
@confirm_window.x = 5
@confirm_window.y = 331
@confirm_op_window = Window_Command.new(75, [RefinerTEXT[0],Refiner::TEXT[1]])
@confirm_op_window.x = 90
@confirm_op_window.y = 331
@confirm_op_window.opacity = 0
@confirm_window.visible = false
@confirm_op_window.visible = false
@confirm_op_window.active = false
@confirm_op_window.index = 1
end
def start_vars
@groups_names = []
@groups_icons = []
for a in 0...Refiner::Grupos_name.size
@groups_names[a] = []
@groups_icons[a] = []
for i in 0...Refiner::Grupos_arms[a].size
id = Refiner::Grupos_arms[a][i]
if Refiner::Grupos_tips[a] == 1
@groups_names[a][i] = $data_armors[id].name
@groups_icons[a][i] = $data_armors[id].icon_index
elsif Refiner::Grupos_tips[a] == 2
@groups_names[a][i] = $data_weapons[id].name
@groups_icons[a][i] = $data_weapons[id].icon_index
else
@groups_names[a][i] = $data_items[id].name
@groups_icons[a][i] = $data_items[id].icon_index
end
end
end
@icons = []
for i in 0...Refiner::Minerios_id.size
id = Refiner::Minerios_id[i]
@icons[i] = $data_items[id].icon_index
end
end
def terminate
super
dispose_menu_background
@equips_window.dispose
@grupo_window.dispose
@min_window.dispose
@confirm_op_window.dispose
@confirm_window.dispose
end
def update
super
update_menu_background
@equips_window.update
@min_window.update
@grupo_window.update
@confirm_op_window.update
@confirm_window.update
if @grupo_window.active == true
grupo_update
elsif @equips_window.active == true
equips_update
elsif @confirm_window.visible == true
confirm_update
end
end
def confirm_update
if @confirm_op_window.active == false
@confirm_window.contents.clear
@confirm_window.contents.draw_text(0, 0, 130, 24, Refiner::TEXT[2])
@confirm_window.contents.draw_text(0, 24, 130, 24, Refiner::TEXT[3])
end
if Input.trigger?(Input::B)
Sound.play_cancel
un_active
end
if Input.trigger?(Input::C)
case @confirm_op_window.index
when 0
Sound.play_decision
refinar
un_active
@icon_window.dispose
update_refiner
desactive_options
@confirm_op_window.index = 1
when 1
Sound.play_cancel
un_active
end
end
end
def refinar
v1 = Refiner::Grupos_tips[@grupo_window.index]
v2 = Refiner::Grupos_arms[@grupo_window.index][@equips_window.index]
for i in 0...Refiner::Minerios_id.size
v = Refiner::Grupos_atr[v1][v2][i]
if v == nil
v = 0
end
$game_party.lose_item($data_items[RefinerMinerios_id[i]], v)
end
if v1 == 1
t = $data_armors[v2]
elsif v1 == 2
t = $data_weapons[v2]
else
t = $data_items[v2]
end
$game_party.gain_item(t,1)
end
def un_active
@confirm_window.visible = false
@confirm_op_window.visible = false
@confirm_op_window.active = false
@equips_window.active = true
@confirm_window.contents.clear
@confirm_window.contents.draw_text(0, 0, 80, 24, Refiner::TEXT[4])
end
def equips_update
if Input.trigger?(Input::B)
Sound.play_cancel
@equips_window.visible = false
@equips_window.active = false
@grupo_window.active = true
@min_window.visible = false
@icon_window.dispose
end
if Input.trigger?(Input::C)
Sound.play_decision
trocar
end
if Input.repeat?(Input::DOWN)
update_refiner
end
if Input.repeat?(Input::UP)
update_refiner
end
end
def grupo_update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
Sound.play_decision
@equips_window.dispose
@equips_window = Window_Command2.new(245, @groups_names[@grupo_window.index])
@equips_window.x = 170
@equips_window.y = 5
@min_window.visible = true
@grupo_window.active = false
desactive_options
update_refiner
end
end
def troc_list
for i in 0...@troc.size
if @troc[i] != false
@troc[i] = true
end
end
end
def update_refiner
v1 = Refiner::Grupos_tips[@grupo_window.index]
v2 = Refiner::Grupos_arms[@grupo_window.index][@equips_window.index]
@min_window.refresh
y = 10
x = 35
@min_window.contents.font.color = @min_window.normal_color
@min_window.contents.draw_text(0, 0, 100, 24, Refiner::TEXT[5])
for i in 0...Refiner::Minerios_id.size
y = y + 24
@min_window.contents.font.color = @min_window.normal_color
@min_window.contents.draw_text(x, y, 80, 24, Refiner::TEXT[6])
text = Refiner::Grupos_atr[v1][v2][i]
if text == nil
text = 0
end
if $game_party.item_number($data_items[RefinerMinerios_id[i]]) < text
@min_window.contents.font.color = @min_window.knockout_color
end
@min_window.contents.draw_text(x + 20, y, 80, 24, text.to_s)
end
end
def desactive_options
@troc = []
v1 = Refiner::Grupos_tips[@grupo_window.index]
v2 = Refiner::Grupos_arms[@grupo_window.index].size
for a in 0...v2
for i in 0...Refiner::Minerios_id.size
v3 = Refiner::Grupos_arms[@grupo_window.index][a]
v = Refiner::Grupos_atr[v1][v3][i]
if v == nil
v = 0
end
if $game_party.item_number($data_items[RefinerMinerios_id[i]]) < v
@equips_window.draw_item(a, false)
@troc[a] = false
end
end
end
@icon_window = Window_Icon.new
@icon_window.opacity = 0
troc_list
x = 0
y = -24
for i in 0...@groups_names[@grupo_window.index].size
y = y + 24
icon = @groups_icons[@grupo_window.index][i]
@icon_window.draw_icon(icon, x, y, @troc[i])
end
end
def trocar
if @troc[@equips_window.index] == false
Sound.play_cancel
@confirm_window.visible = true
@equips_window.active = false
else
@confirm_window.visible = true
@confirm_op_window.visible = true
@confirm_op_window.active = true
@equips_window.active = false
end
end
end
class Window_Confirm < Window_Base
def initialize
super (0, 0, 160, WLH * 2 + 32)
self.contents.draw_text(0, 0, 80, 24, Refiner::TEXT[4])
end
end
class Window_Icon < Window_Base
def initialize
super (170, 5, 100, WLH * 14 + 32)
end
end
class Window_Command2 < Window_Selectable
attr_reader:commands
def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
refresh
self.index = 0
end
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 30
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index])
end
end

Creditos: Night'Walker, *Kenon*

Gostou ??
Agradeça nao custa Zeny

lol!
avatar
*Kenon*
Diretor Local
Diretor Local

Mensagens : 26
Pontos : 79
Reputação : 9
Data de inscrição : 15/07/2010
Idade : 23
Localização : Rio das ostras

Ver perfil do usuário http://makersedition.forumeiro.com

Voltar ao Topo Ir em baixo

Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum