Anmelden

Archiv verlassen und diese Seite im Standarddesign anzeigen : Item-Klassifizierung



tidloc
13.08.2009, 20:24
Hab schon ein paar Fragen diebezüglich gelesen und find es auch sehr hilfreich:
Ein Script mit dem man Items Klassen zuweisen kann, sodass sie, wenn man bei der Auswahl ist, nur die Items einer bestimmten Klasse angezeigt bekommt und diese Klasse auch problemlos ändern kann.

In meinem Script sind das die Tasten PageUP und PageDOWN ;)


################################################################################
# Item-classification-scrript v. 1.0 #
# by Tidloc #
#==============================================================================#
# easy to adjust for your game! #
# in line 25 you find the array _tidloc_itemclass. Enter there the classes, #
# you want to use in your game (i enabled maximum 9, should be enough) and #
# then just write in the name of the item the classnumber rigth before the #
# name. Line 23 and 24 may also be of interest for you, as they determine #
# what id weapons and armors have ;) #
################################################################################



class Game_Temp
attr_accessor :_tidloc_itemclass
attr_accessor :_tidloc_item_classes
attr_accessor :_tidloc_weaponid
attr_accessor :_tidloc_armorid

alias wo_classes_initialize initialize
def initialize
wo_classes_initialize
self._tidloc_weaponid = 2
self._tidloc_armorid = 2
self._tidloc_itemclass = ["Usable","Equipment","Scematics","Ressources","Runes","important"]
self._tidloc_item_classes = []

for i in 1...$data_items.size
if $data_items[i].name[0] != nil
text = $data_items[i].name
self._tidloc_item_classes[i] = (text[0].chr).to_i-1
text[0] = ' '
text.lstrip
$data_items[i].name = text
end
end
self._tidloc_weaponid -= 1
self._tidloc_armorid -= 1
end
end

class Window_Class_Display < Window_Selectable
attr_accessor :_class
def initialize(x=160,y=64,xe=480)
super(x,y,xe, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Main" window font
self.contents.font.size = $defaultfontsize
self._class = 0
@align = 2
refresh
end
def refresh
self.contents.clear
a = (self.width - 16) / $game_temp._tidloc_itemclass.size
if a > 60
for i in 0...$game_temp._tidloc_itemclass.size
rect = Rect.new(8 + i * a, 0,a, 32)
if a > 120
self.contents.font.size = 24
elsif a > 90
self.contents.font.size = 20
else
self.contents.font.size = 16
end
if i == _class
self.contents.font.color=system_color
else
self.contents.font.color=normal_color
end
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, $game_temp._tidloc_itemclass[i])
end
else
rect = Rect.new(8, 0, self.width - 16, 32)
self.contents.font.size = 24
self.contents.font.color=system_color
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, $game_temp._tidloc_itemclass[_class])
end
end
end

class Window_Item < Window_Selectable

attr_reader :klein
attr_accessor :_active_class

def initialize(klein = 0, finger = 0, _class = 0)
self._active_class = _class
@klein=klein
@finger = finger
super(160, 128, 480, 352)
@column_max = 1
refresh
self.index = 0
self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name)
@title = 1
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && self._active_class == $game_temp._tidloc_item_classes[i]
@data.push($data_items[i])
end
end
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && self._active_class == $game_temp._tidloc_weaponid
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && self._active_class == $game_temp._tidloc_armorid
@data.push($data_armors[i])
end
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4
y = index * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x+32, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 60, y, 180, 32, item.name, 0)
self.contents.draw_text(x + 400, y, 16, 32, ":", 1)
self.contents.draw_text(x + 416, y, 24, 32, number.to_s, 2)
end
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end

class Scene_Item
def main
@classtemp = 0
@comm_window = Window_Fake_Command.new(1)
@comm_window.x = 0
@comm_window.y = 64
@steps_window = Window_Steps.new(1)
@steps_window.x = 0
@steps_window.y = 264
@playtime_window = Window_PlayTime.new(1)
@playtime_window.x = 0
@playtime_window.y = 320
@gold_window = Window_Gold.new(1)
@gold_window.x = 0
@gold_window.y = 401
@help_window = Window_Help.new
@item_window = Window_Item.new(0, 1)
@item_window.help_window = @help_window
@target_window = Window_Target.new
@target_window.visible = false
@target_window.active = false
@class_window = Window_Class_Display.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
@item_window.dispose
@target_window.dispose
@comm_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@class_window.dispose
end
def update
@help_window.update
@item_window.update
@target_window.update
@comm_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@class_window.update
if @item_window.active
update_item
return
end
if @target_window.active
update_target
return
end
end
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(0)
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@item_window.index = 0
@class_window._class = @classtemp
@item_window._active_class = @classtemp
@class_window.refresh
@item_window.refresh
return
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@item_window.index = 0
@class_window._class = @classtemp
@item_window._active_class = @classtemp
@class_window.refresh
@item_window.refresh
return
end
if Input.trigger?(Input::C)
@item = @item_window.item
unless @item.is_a?(RPG::Item)
$game_system.se_play($data_system.buzzer_se)
return
end
unless $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
if @item.scope >= 3
@item_window.active = false
@target_window.x = 0
@target_window.visible = true
@target_window.active = true
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
else
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
$scene = Scene_Map.new
return
end
end
return
end
end
def update_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
unless $game_party.item_can_use?(@item.id)
@item_window.refresh
end
@item_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
if Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
return
end
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end

Wie im Header beschrieben, einfach in Zeile 25 die Itemklassen definieren, die man nutzen will. Ich habe eine maximale Anzahl von 9 Klasse ermöglich, da ich denke, dass das genug sein sollte :D
Des weiteren sind die Zeilen 23 und 24 vielleicht wichtig, da diese definieren, welcher Klasse Waffen bzw. Rüstungszeug angehören :)

Welches Item zu welcher Kalsse ghört kann man einfach mit dem Itemnamen bestimmen, indem man vor dem Name die zugehörige Klasse schreibt. (z.B. statt "Heiltrank" "1Heiltrank") ;)

Der erste Index beginnt hierbei mit 1.

Um dieses Skript auch auf den Shop oder anderer meiner Skripte zu erweitern hab ich ein zusätzliches Skript für die Klassifizierungserweiterungen erstellt:


##################################################
#
# here the scripts for the item classification
# to enable it everywhere! Just remove the
# doublecharacter infront of the classnames
# and the # before aliases and they will work!
#
##################################################

#############################
#
# for both shopa:
#
#############################

class Window_ShopSell < Window_Selectable
attr_accessor :_active_class
def initialize(klein = 0)
@klein = klein
super(0, 192, 640, 288)
@column_max = 2
self._active_class = 0
refresh
self.index = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && self._active_class == $game_temp._tidloc_item_classes[i]
@data.push($data_items[i])
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && self._active_class == $game_temp._tidloc_weaponid
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && self._active_class == $game_temp._tidloc_armorid
@data.push($data_armors[i])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
end

#############################
#
# for original shop:
#
#############################

class WWindow_ShopBuy < Window_Selectable
attr_accessor :_active_class
def initialize(shop_goods, klein = 0)
@klein = klein
super(0, 192, 368, 288)
@shop_goods = shop_goods
self._active_class = 0
refresh
self.index = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for goods_item in @shop_goods
case goods_item[0]
when 0
item = $data_items[goods_item[1]] if self._active_class == $game_temp._tidloc_item_classes[goods_item[1]]
when 1
item = $data_weapons[goods_item[1]] if self._active_class == $game_temp._tidloc_weaponid
when 2
item = $data_armors[goods_item[1]] if self._active_class == $game_temp._tidloc_armorid
end
if item != nil
@data.push(item)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
end




class SScene_Shop
# alias wo_classes_main main
def main
@classtemp = 0
@class_window = Window_Class_Display.new(0,128,368)
@class_window.visible = false
wo_classes_main
@class_window.dispose
end

# alias wo_classes_update_command update_command
def update_command
if Input.trigger?(Input::C)
case @command_window.index
when 0
@class_window.visible = true
when 1
@class_window.visible = true
end
end
wo_classes_update_command
end

# alias wo_classes_update_buy update_buy
def update_buy
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@buy_window.index = 0
@class_window._class = @classtemp
@buy_window._active_class = @classtemp
@class_window.refresh
@buy_window.refresh
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@buy_window.index = 0
@class_window._class = @classtemp
@buy_window._active_class = @classtemp
@class_window.refresh
@buy_window.refresh
end
wo_classes_update_buy
end

# alias wo_classes_update_sell update_sell
def update_sell
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@sell_window.index = 0
@class_window._class = @classtemp
@sell_window._active_class = @classtemp
@class_window.refresh
@sell_window.refresh
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@sell_window.index = 0
@class_window._class = @classtemp
@sell_window._active_class = @classtemp
@class_window.refresh
@sell_window.refresh
end
wo_classes_update_sell
end
end

#############################
#
# for MeisMe's realistic shop:
#
#############################
class WWindow_ShopBuyBG < Window_Base
def initialize
super(0, 192, 320, 288)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
end
class WWindow_ShopBuy < Window_Selectable
attr_accessor :_active_class
def initialize(shop_goods)
super(0, 224, 320, 156)
@shop_goods = shop_goods
self._active_class = 0
refresh
self.index = 0
self.opacity = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for goods_item in @shop_goods
case goods_item[0]
when 0
item = $data_items[goods_item[1]] if self._active_class == $game_temp._tidloc_item_classes[goods_item[1]]
when 1
item = $data_weapons[goods_item[1]] if self._active_class == $game_temp._tidloc_weaponid
when 2
item = $data_armors[goods_item[1]] if self._active_class == $game_temp._tidloc_armorid
end
if item != nil
@data.push(item)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
end

class WWindow_ShopNumber < Window_Base
def initialize
super(0, 192, 320, 288)
self.contents = Bitmap.new(width - 32, height - 32)
@item = nil
@max = 1
@price = 0
@number = 1
end
end

class WWindow_ShopNumber2 < Window_Base
def initialize
super(0, 192, 320, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@item = nil
@max = 1
@number = 1
end
end

class SScene_Shop

# alias wo_classes_main main
def main
@classtemp = 0
@class_window = Window_Class_Display.new(0,128,368)
@class_window.visible = false
wo_classes_main
@class_window.dispose
end

# alias wo_classes_shop_update update
def update
@class_window.update
wo_classes_shop_update
end

# alias wo_classes_command_update update_command
def update_command
if Input.trigger?(Input::C)
case @command_window.index
when 0
@class_window.visible = true
when 1
@class_window.visible = true
end
end
wo_classes_command_update
end

# alias wo_classes_buy_update update_buy
def update_buy
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@buy_window.index = 0
@class_window._class = @classtemp
@buy_window._active_class = @classtemp
@class_window.refresh
@buy_window.refresh
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@buy_window.index = 0
@class_window._class = @classtemp
@buy_window._active_class = @classtemp
@class_window.refresh
@buy_window.refresh
end
wo_classes_buy_update
end

# alias wo_classes_sell_update update_sell
def update_sell
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@sell_window.index = 0
@class_window._class = @classtemp
@sell_window._active_class = @classtemp
@class_window.refresh
@sell_window.refresh
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@sell_window.index = 0
@class_window._class = @classtemp
@sell_window._active_class = @classtemp
@class_window.refresh
@sell_window.refresh
end
wo_classes_sell_update
end
end

#############################
#
# for my smithery-script
#
#############################

class Window_Smith_choose < Window_Selectable
attr_accessor :_active_class
def initialize(klein = 0)
@klein = klein
super(0, 128, 320, 354)
@column_max = 1
@_active_class = 0
refresh
self.index = 0
end

def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && self._active_class == $game_temp._tidloc_item_classes[i]
@data.push($data_items[i])
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && self._active_class == $game_temp._tidloc_weaponid
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && self._active_class == $game_temp._tidloc_armorid
@data.push($data_armors[i])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
end

class Scene_Plan_Smith

# alias wo_classes_smith_main main
def main
@classtemp = 0
@class_window = Window_Class_Display.new(0,64,320)
@class_window.visible = false
wo_classes_smith_main
@class_window.dispose
end

# alias wo_classes_smith_update update
def update
@class_window.update
wo_classes_smith_update
end

# alias wo_classes_command_update update_command
def update_command
if Input.trigger?(Input::C)
if @version==0
if @command_window.index == 1
unless $game_temp.smith_busy[@smith_num] == 1
@class_window.visible = true
end
end
elsif @version==1
if @command_window.index == 0
unless $game_temp.smith_busy[@smith_num] == 1 || @item_window.item_max<1
@class_window.visible = true
end
end
elsif @version==2
if @command_window.index == 0
unless $game_temp.smith_busy[@smith_num] == 1
@class_window.visible = true
end
end
end
end
wo_classes_command_update
end

# alias wo_classes_itemwahl_update update_itemwahl
def update_itemwahl
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@itemwahl_window.index = 0
@class_window._class = @classtemp
@itemwahl_window._active_class = @classtemp
@class_window.refresh
@itemwahl_window.refresh
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@itemwahl_window.index = 0
@class_window._class = @classtemp
@itemwahl_window._active_class = @classtemp
@class_window.refresh
@itemwahl_window.refresh
end
wo_classes_itemwahl_update
end

# alias wo_classes_forsmith_update update_forsmith
def update_forsmith
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::C)
if $game_temp.smith_choose_item[0] != 0 || $game_temp.smith_cost > 0
@class_window.visible = false
end
end
wo_classes_forsmith_update
end
end

#############################
#
# for my alchemy-script
#
#############################

class Window_Alch_choose < Window_Selectable
attr_accessor :_active_class
def initialize(klein = 0)
@klein = klein
super(0, 128, 320, 354)
@column_max = 1
@_active_class = 0
refresh
self.index = 0
end

def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && self._active_class == $game_temp._tidloc_item_classes[i]
@data.push($data_items[i])
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && self._active_class == $game_temp._tidloc_weaponid
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && self._active_class == $game_temp._tidloc_armorid
@data.push($data_armors[i])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
end

class Scene_Plan_Alchemy

# alias wo_classes_alch_main main
def main
@classtemp = 0
@class_window = Window_Class_Display.new(0,64,320)
@class_window.visible = false
wo_classes_alch_main
@class_window.dispose
end

# alias wo_classes_alch_update update
def update
@class_window.update
wo_classes_alch_update
end

# alias wo_classes_command_update update_command
def update_command
if Input.trigger?(Input::C)
if @version==0
if @command_window.index == 1
unless $game_temp.alch_busy[@alch_num] == 1
@class_window.visible = true
end
end
elsif @version==1
if @command_window.index == 0
unless $game_temp.alch_busy[@alch_num] == 1 || @item_window.item_max<1
@class_window.visible = true
end
end
elsif @version==2
if @command_window.index == 0
unless $game_temp.alch_busy[@alch_num] == 1
@class_window.visible = true
end
end
end
end
wo_classes_command_update
end

# alias wo_classes_itemwahl_update update_itemwahl
def update_itemwahl
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cancel_se)
@classtemp += 1
if @classtemp > $game_temp._tidloc_itemclass.size-1
@classtemp = 0
end
@itemwahl_window.index = 0
@class_window._class = @classtemp
@itemwahl_window._active_class = @classtemp
@class_window.refresh
@itemwahl_window.refresh
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
@classtemp -= 1
if @classtemp < 0
@classtemp = $game_temp._tidloc_itemclass.size-1
end
@itemwahl_window.index = 0
@class_window._class = @classtemp
@itemwahl_window._active_class = @classtemp
@class_window.refresh
@itemwahl_window.refresh
end
wo_classes_itemwahl_update
end

# alias wo_classes_foralch_update update_foralch
def update_foralch
if Input.trigger?(Input::B)
@class_window.visible = false
end
if Input.trigger?(Input::C)
if $game_temp.alch_choose_item[0] != 0 || $game_temp.alch_cost > 0
@class_window.visible = false
end
end
wo_classes_foralch_update
end
end

Eine Techdemo hierfür findet ihr in diesem Thread (http://www.multimediaxis.de/showthread.php?t=121143)

LG
Tidloc