Also, ich habe mal rum gesucht und nur das hier gefunden:
################################################################################
############################# BREADLORD'S ITEM MIX #############################
#### This script allows the player to mix items to create new ones based ####
#### on recipies that you make, to have a recipie in your game you have to ####
#### put it below, were it says recipies, in the following format : ####
#### ####
#### ingredients = [??, ??, ect] This is were you put the ingredients ####
#### for this recipie, you can have up yo 16 ####
#### ####
#### results = [ ??, ??, ect] This is were you put the results from this ####
#### recipie, you can have up to 6 ####
#### ####
#### recipie = Recipie.new(results, ingredients) A vital part, put it in ####
#### exactly like this ####
#### ####
#### @recipies.push(recipie) Another vital part, put it in exactly like ####
#### this ####
#### ####
#### You call the mix scene with $scene = Scene_Mix.new ####
#### ####
################################################################################
#### There is one other way you can customize this script, you can make ####
#### @pre_unlocked either true or false, @pre_unlocked controls if all the ####
#### recipies start off unlocked, if you change it to true then all the ####
#### recipies will be unlocked at the start of the game, if you set it to ####
#### false then the player will either have to dicover the recipies for ####
#### theirself or discover the recipie through an event, using the command ####
#### $learnt.push(num), with num being the recipie number you want to ####
#### unlock (Starting at 0). Note that even if a recipie is not unlocked ####
#### the player can still make it, they will just not know what the result ####
#### will be ####
################################################################################
################################################################################
#################################### Editable ##################################
class Scene_Mix < Scene_Base
def recipies
@pre_unlocked = false
@recipies = [] # Do not touch
# These recipies are used in the demo, you can delete them #
ingredients = [1, 2]
results = [19]
recipie = Recipie.new(results, ingredients)
@recipies.push(recipie)
ingredients = [3, 4]
results = [20]
recipie = Recipie.new(results, ingredients)
@recipies.push(recipie)
ingredients = [5, 1, 7]
results = [18]
recipie = Recipie.new(results, ingredients)
@recipies.push(recipie)
ingredients = [19, 20]
results = [17]
recipie = Recipie.new(results, ingredients)
@recipies.push(recipie)
end
## Do not edit past this line ##################################################
def start
super
if $learnt == nil
@learnt = []
end
@gump = false
create_menu_background
recipies
@viewport = Viewport.new(0, 0, 544, 416)
@viewport2 = Viewport.new(272, 192, 272, 300)
@viewport3 = Viewport.new(272, 88, 272, 104)
@viewport4 = Viewport.new(272, 35, 272, 53)
@item_window = Window_Item2.new(0, 35, 272, 381)
@item_window.viewport = @viewport
@item_window.active = true
@selected = []
a = 'Nothing'
@result_window = Window_Command.new(272, [a], 2)
@result_window.viewport = @viewport3
@result_window.active = false
@command_window = Window_Command.new(272, @selected, 2)
@command_window.viewport = @viewport2
@command_window.active = false
@make_window = Window_Command.new(272, [''], 1)
@make_window.viewport = @viewport4
@make_window.active = false
end
def update
if @item_window.active == true
item_update
elsif @make_window.active == true
make_update
end
@item_window.update
@make_window.update
update_menu_background
end
def make_update
if Input.trigger?(Input::LEFT)
Sound.play_cursor
@item_window.active = true
@make_window.active = false
elsif Input.trigger?(Input::C)
Sound.play_use_skill
recipie_act(@recipie_able)
end
end
def item_update
if @can_make == true
if @gump == false
@gump = true
@make_window.dispose
@make_window = Window_Command.new(272, ['Mix'], 1)
@make_window.viewport = @viewport4
@make_window.active = false
end
else
if @gump == true
@gump = false
@make_window.dispose
@make_window = Window_Command.new(272, [''], 1)
@make_window.viewport = @viewport4
@make_window.active = false
end
end
if Input.trigger?(Input::B)
a = @selected.size - 1
if @selected[a] == nil
Sound.play_cancel
$scene = Scene_Map.new
else
Sound.play_cancel
$game_party.gain_item($data_items[@selected[@selected.size - 1]], 1)
@selected[@selected.size - 1] = 'a'
@selected = @selected - ['a']
a = []
for i in 0..@selected.size - 1
a.push($data_items[@selected[i]].name)
end
index = @item_window.index
@item_window = Window_Item2.new(0, 35, 272, 381, index)
@item_window.viewport = @viewport
@item_window.active = true
@command_window.dispose
@command_window = Window_Command.new(272, a, 2)
@command_window.viewport = @viewport2
@command_window.active = false
check
a = []
if @can_make == true
for i in 0..@recipies[@recipie_able].results.size - 1
if $learnt.include?(@recipie_able)
if !(@recipies[@recipie_able].results[i] == nil)
a.push($data_items[@recipies[@recipie_able].results[i]].name)
end
elsif @pre_unlocked == true
if !(@recipies[@recipie_able].results[i] == nil)
a.push($data_items[@recipies[@recipie_able].results[i]].name)
end
else
a = ['??????']
end
end
@result_window.dispose
@result_window = Window_Command.new(272, a, 2)
@result_window.viewport = @viewport3
@result_window.active = false
else
a = 'Nothing'
@result_window.dispose
@result_window = Window_Command.new(272, [a])
@result_window.viewport = @viewport3
@result_window.active = false
end
end
elsif Input.trigger?(Input::C)
if @selected.size - 1 < 14 or @selected.size - 1 == 14 and !($game_party.items.size == 0)
Sound.play_decision
a = @item_window.item
@last_selected = a.id
$game_party.lose_item($data_items[a.id], 1)
@selected.push(a.id)
check
a = []
for i in 0..@selected.size - 1
if !(@selected[i] == nil)
a.push($data_items[@selected[i]].name)
end
end
if @item_window.index == 0
index = @item_window.index
else
index = @item_window.index - 1
end
@item_window = Window_Item2.new(0, 35, 272, 381, index)
@item_window.viewport = @viewport
@item_window.active = true
@command_window.dispose
@command_window = Window_Command.new(272, a, 2)
@command_window.viewport = @viewport2
@command_window.active = false
check
a = []
if @can_make == true
for i in 0..@recipies[@recipie_able].results.size - 1
if $learnt.include?(@recipie_able)
if !(@recipies[@recipie_able].results[i] == nil)
a.push($data_items[@recipies[@recipie_able].results[i]].name)
end
elsif @pre_unlocked == true
if !(@recipies[@recipie_able].results[i] == nil)
a.push($data_items[@recipies[@recipie_able].results[i]].name)
end
else
a = ['??????']
end
end
@result_window.dispose
@result_window = Window_Command.new(272, a, 2)
@result_window.viewport = @viewport3
@result_window.active = false
else
a = 'Nothing'
@result_window.dispose
@result_window = Window_Command.new(272, [a])
@result_window.viewport = @viewport3
@result_window.active = false
end
else
Sound.play_buzzer
end
elsif @can_make == true and Input.trigger?(Input::RIGHT)
Sound.play_cursor
@item_window.active = false
@make_window.active = true
end
end
def check
@can_make = false
@recipie_able = 0
for i in 0..@recipies.size - 1
a = @recipies[i].ingredients
b = @selected
if a.size == b.size
for j in 0..1000
if a.include?(j) and b.include?(j)
a = a - [j]
b = b - [j]
end
if a == [] and b == []
@can_make = true
@recipie_able = i
end
end
end
end
end
def recipie_act(recipie_num)
$learnt.push(recipie_num)
@selected.clear
for i in 0..@recipies[recipie_num].results.size
if !(@recipies[recipie_num].results[i] == nil)
a = @recipies[recipie_num].results[i]
$game_party.gain_item($data_items[a], 1)
end
end
@item_window = Window_Item2.new(0, 35, 272, 381, 0)
@item_window.viewport = @viewport
@item_window.active = true
@command_window.dispose
@command_window = Window_Command.new(272, [], 2)
@command_window.viewport = @viewport2
@command_window.active = false
a = 'Nothing'
@result_window.dispose
@result_window = Window_Command.new(272, [a])
@result_window.viewport = @viewport3
@result_window.active = false
@make_window.dispose
@make_window = Window_Command.new(272, [''], 1)
@make_window.viewport = @viewport4
@make_window.active = false
end
end
class Recipie
attr_reader :results, :ingredients
def initialize(results, ingredients)
@results = results
@ingredients = ingredients
end
def ingredients
return @ingredients
end
end
#==============================================================================
# ** Window_Item
#------------------------------------------------------------------------------
# This window displays a list of inventory items for the item screen, etc.
#==============================================================================
class Window_Item2 < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# x : window x-coordinate
# y : window y-coordinate
# width : window width
# height : window height
#--------------------------------------------------------------------------
def initialize(x, y, width, height, index = 0)
super(x, y, width, height)
@column_max = 1
self.index = index
refresh
end
#--------------------------------------------------------------------------
# * Get Item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Whether or not to include in item list
# item : item
#--------------------------------------------------------------------------
def include?(item)
return false if item == nil
if $game_temp.in_battle
return false unless item.is_a?(RPG::Item)
end
return true
end
#--------------------------------------------------------------------------
# * Whether or not to display in enabled state
# item : item
#--------------------------------------------------------------------------
def enable?(item)
return true
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
@data = []
for item in $game_party.items
next unless include?(item)
@data.push(item)
if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
self.index = @data.size - 1
end
end
@data.push(nil) if include?(nil)
@item_max = @data.size
create_contents
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
rect = item_rect(index)
self.contents.clear_rect(rect)
item = @data[index]
if item != nil
number = $game_party.item_number(item)
enabled = enable?(item)
rect.width -= 4
draw_item_name(item, rect.x, rect.y, enabled)
self.contents.draw_text(rect, sprintf(":%2d", number), 2)
end
end
#--------------------------------------------------------------------------
# * Update Help Text
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(item == nil ? "" : item.description)
end
end
module Vocab
def self.new_game
$learnt = []
return $data_system.terms.new_game
end
end
class Scene_File
alias save write_save_data
alias load read_save_data
def write_save_data(file)
save(file)
Marshal.dump($learnt, file)
end
def read_save_data(file)
load(file)
$learnt = Marshal.load(file)
end
end
In 'ingredients' schreibst du die ID der benötigten Items rein.
In 'result' schreibst du das Ergebnis der Items rein.
Aufrufen tust du mit '$scene = Scene_Mix.new'.