Script de Refiner
Brasil G4mes :: Scripts :: Scripts RGSS2
Página 1 de 1
Script de Refiner
Blz galera to postando aqui um script de refiner
onde pode criar itens essas coisas.
Ou se vcs preferirem baixem a demo aqui http://rapidshare.com/files/225000719/Refiner.exe.html
Créditos:
lb_Guilherme
onde pode criar itens essas coisas.
- Spoiler:
- ###########################################################
###################### REFINAMENTO ########################
#### V 1.0.5 ##############################################
################################### Por: lb_guilherme #####
###########################################################
module Refiner
Grupos_arms = []
Grupos_atr = []
Grupos_atr[1] = []
Grupos_atr[2] = []
# ----------------------------------------------------
Grupos_name = ["Armas","Escudos","Amuletos","Armas Mithril","Armaduras"]
# Nome dos Grupos
# ----------------------------------------------------
Grupos_tips = [2,1,1,2,1]
# Tipos de itens dos grupos (na mesma ordem)
# 1 = Armaduras
# 2 = Armas
# ----------------------------------------------------
# ID dos equips que fazem parte dos grupos:
# Max = 15 por grupo
Grupos_arms[0] = [1,2,3,4,5,6,7,8,9,10,11,12,15]
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 = [21,22,23,24,25,26,27,28]
# ----------------------------------------------------
# Quantidade dos minerios, seguindo a ordem acima.
# Grupos_atr[TIPO][ID]
# TIPO:
# 1 = Armaduras
# 2 = Armas
# ID:
# Id do equipamento que se refere
# ----------------------------------------------------
# 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] = [8500,0,0,0,0,0,0,0]
# Armas:
Grupos_atr[2][1] = [5,0,0,0,0,0,0,0]
Grupos_atr[2][2] = [0,10,0,0,0,0,0,0]
Grupos_atr[2][3] = [0,55,0,0,0,0,0,0]
Grupos_atr[2][4] = [0,0,0,0,8,0,0,0]
Grupos_atr[2][5] = [0,0,50,10,0,0,0,0]
Grupos_atr[2][6] = [1,1,1,1,1,1,1,1]
Grupos_atr[2][7] = [0,6,6,6,0,0,0,0]
Grupos_atr[2][8] = [10,10,10,0,0,0,0,0]
Grupos_atr[2][9] = [85,0,0,0,0,0,0,0]
Grupos_atr[2][10] = [0,12,12,0,0,0,0,0]
Grupos_atr[2][11] = [0,0,40,0,0,0,0,0]
Grupos_atr[2][12] = [0,0,0,66,0,0,0,0]
Grupos_atr[2][13] = [0,0,0,0,32,0,0,0]
Grupos_atr[2][14] = [0,0,0,0,0,0,0,85]
Grupos_atr[2][15] = [10,10,10,10,10,10,10,10]
Grupos_atr[2][19] = [9999,0,0,0,0,0,0,0]
Grupos_atr[2][20] = [0,0,9999,0,0,0,0,0]
Grupos_atr[2][21] = [0,0,0,0,9999,0,0,0]
Grupos_atr[2][23] = [0,0,0,0,0,0,9999,0]
# ---------------------------------------------------- #
# FIM DAS CONFIGURAÇÕES - INICIO DO SCRIP #
# ---------------------------------------------------- #
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, ["Sim","Não"])
@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
else
@groups_names[a][i] = $data_weapons[id].name
@groups_icons[a][i] = $data_weapons[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, "Você não tem os")
@confirm_window.contents.draw_text(0, 24, 130, 24, "itens nesseçarios.")
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]
else
t = $data_weapons[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, "Confirma?")
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, "Requisitos:")
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, "→")
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, "Confirma?")
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
Ou se vcs preferirem baixem a demo aqui http://rapidshare.com/files/225000719/Refiner.exe.html
Créditos:
lb_Guilherme
Convidad- Convidado
Re: Script de Refiner
E se vocês quizerem pra ficar um pouco mais dificil de conseguir os minerais
usam a mineração fassam assim como na imagem abaixo:
Editem as variavél como vocês quizerem.
Flw Galera!
Eu mesmo que fiz!
usam a mineração fassam assim como na imagem abaixo:
Editem as variavél como vocês quizerem.
Flw Galera!
Eu mesmo que fiz!
Convidad- Convidado
Tópicos semelhantes
» Anti-Lag Script
» Script De Montaria
» Problemas com Script
» Script de Som nas Mensagenas
» Script de Salto em Conjunto
» Script De Montaria
» Problemas com Script
» Script de Som nas Mensagenas
» Script de Salto em Conjunto
Brasil G4mes :: Scripts :: Scripts RGSS2
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos