#==============================================================================
# ** Window Help Item
#------------------------------------------------------------------------------
# Feito por Marlos Gama e Editador Por KaiqueHunter
#==============================================================================
class Window_Help2 < Window_Base
def initialize(x,y,a,b)
super(x,y,a,b)
self.contents = Bitmap.new(self.width-32, self.height-32)
self.windowskin = RPG::Cache.windowskin("Help")
self.back_opacity = 230
#@dragable = true
#@closable = true
self.z = 9999999
actor = 0
refresh
end
def refresh
self.contents.clear
if $help_trade == true
@item = $trade_w.item
end
if $help_trade_2 == true
@item = $trade_w_2.item
end
if $help_loja == true
@item = $loja_w.item
elsif $help_loja != true and $help_trade != true and $help_trade_2 != true
@item = $item_w.item
end
@actor = $game_party.actors[0]
if @item == nil
else
#bitmap = RPG::Cache.icon(@item.icon_name)
#self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = Color.new(0,128,255)
rect = Rect.new(4, -10, self.contents.width - 8, 32)
self.contents.draw_text(rect, @item.name, 1)
#self.contents.draw_text(34, -10, 204, 32, @item.name, 0)
self.contents.font.color = Color.new(0,0,0)
#self.contents.draw_text(34, 7, 400, 32, @item.description.to_s, 0)
if @item.is_a?(RPG::Armor)
self.contents.draw_text(4, 22, 400, 32, "Atk: " + "0", 0)
self.contents.draw_text(4, 37, 400, 32, "Def: " + $data_armors[@item.id].pdef.to_s, 0)
self.contents.draw_text(4, 52, 400, 32, "Int: " + $data_armors[@item.id].int_plus.to_s, 0)
self.contents.draw_text(4, 67, 400, 32, "Agi: " + $data_armors[@item.id].agi_plus.to_s, 0)
end
if @item.is_a?(RPG::Item)
if @item.id != Item_Ouro::Item_Id.to_i
self.contents.draw_text(4, 22, 400, 32, "Atk: " + "0", 0)
self.contents.draw_text(4, 37, 400, 32, "Def: " + "0", 0)
self.contents.draw_text(4, 52, 400, 32, "Int: " + "0", 0)
self.contents.draw_text(4, 67, 400, 32, "Agi: " + "0", 0)
else
self.contents.draw_text(4, 22, 400, 32, "Dinheiro do Jogo", 0)
end
end
#if @item.is_a?(RPG::Item)
#if $loja == true
if $help_loja == true
rect = Rect.new(4, 117, self.contents.width - 8, 32)
self.contents.draw_text(rect, "$ "+@item.price.to_s, 1)
#self.contents.draw_text(34, 102, 400, 32, "$ "+@item.price.to_s, 0)
else
if @item.id != Item_Ouro::Item_Id.to_i
rect = Rect.new(4, 117, self.contents.width - 8, 32)
self.contents.draw_text(rect, "$ "+(@item.price/2).to_s, 1)
#self.contents.draw_text(34, 102, 400, 32, "$ "+(@item.price/2).to_s, 0)
else
if !@item.is_a?(RPG::Item)
rect = Rect.new(4, 117, self.contents.width - 8, 32)
self.contents.draw_text(rect, "$ "+(@item.price/2).to_s, 1)
end
end
end
#end
#end
if @item.is_a?(RPG::Weapon)
self.contents.draw_text(4, 22, 400, 32, "Atk: " + $data_weapons[@item.id].atk.to_s, 0)
self.contents.draw_text(4, 37, 400, 32, "Def: " + $data_weapons[@item.id].pdef.to_s, 0)
self.contents.draw_text(4, 52, 400, 32, "Int: " + $data_weapons[@item.id].int_plus.to_s, 0)
self.contents.draw_text(4, 67, 400, 32, "Agi: " + $data_weapons[@item.id].agi_plus.to_s, 0)
weapon_set = $data_classes[@actor.class_id].weapon_set
if weapon_set.include?(@item.id)
@resposta = "Pode"
self.contents.font.color = Color.new(65,255,65)
else
@resposta = "Não pode"
self.contents.font.color = Color.new(255,43,43)
end
rect = Rect.new(1, 87, self.contents.width + 3, 50)
self.contents.draw_text(rect, "#{@resposta} ser equipado!", 1)
#rect2 = Rect.new(4, 107, self.contents.width - 8, 32)
#self.contents.draw_text(rect, "#{$data_classes[$game_party.actors[0].class_id].name}", 1)
if $loja == true
if $help_loja == true
#self.contents.draw_text(34, 67, 400, 32, "Preço: "+@item.price.to_s, 0)
else
#self.contents.draw_text(34, 67, 400, 32, "Preço: "+(@item.price/2).to_s, 0)
end
end
elsif @item.is_a?(RPG::Armor)
armor_set = $data_classes[@actor.class_id].armor_set
if armor_set.include?(@item.id)
for i in 0...50
if $genero == 1
@sex = "Homen"
if ArmaGenero::Mulher[i] == @item.id
@resposta = "Não pode"
self.contents.font.color = Color.new(255,43,43)
break
else
@resposta = "Pode"
self.contents.font.color = Color.new(65,255,65)
break
end
end
if $genero == 2
@sex = "Mulher"
if ArmaGenero::Homen[i] == @item.id
@resposta = "Não pode"
self.contents.font.color = Color.new(255,43,43)
break
else
@resposta = "Pode"
self.contents.font.color = Color.new(65,255,65)
break
end
end
end
#self.contents.font.color = Color.new(65,255,65)
else
@resposta = "Não pode"
self.contents.font.color = Color.new(255,43,43)
end
rect = Rect.new(1, 87, self.contents.width + 3, 50)#32
self.contents.draw_text(rect, "#{@resposta} ser equipado!", 1)
#rect2 = Rect.new(4, 107, self.contents.width - 8, 32)
#self.contents.draw_text(rect2, "#{$data_classes[$game_party.actors[0].class_id].name}", 1)
if $loja == true
if $help_loja == true
#self.contents.draw_text(34, 67, 400, 32, "Preço: "+@item.price.to_s, 0)
else
#self.contents.draw_text(34, 67, 400, 32, "Preço: "+(@item.price/2).to_s, 0)
end
end
end
end
end
end