04-23-2013, 01:56 PM
Hi,
Here is the full code for draw_item
I thought this just drew the combo selection box - although I'm not very familiar with a lot of the code here so it may do much more than that...
Thanks for your help.
Here is the full code for draw_item
Code:
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
for i in 0...$combo_skill.size
if $combo_skill[i] != nil
if $combo_skill[i] == skill.id
n = i
end
end
end
v = 0
for h in 0...$combo_hero[n].size
if $game_actors[$combo_hero[n][h]] != nil
if $game_actors[$combo_hero[n][h]].combo_can_use?(skill.id)
v += 1
end
end
end
#VALENTINO
formation = SKILL_COMBO[skill.id]
@colore = false
if formation != nil
if $battle_formation == formation
self.contents.font.color = normal_color
else
@colore = true
self.contents.font.color = disabled_color
end
end
#VALENTINO
if v == $combo_hero[n].size
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
self.contents.font.color = disabled_color if @colore
x = 4
y = index * 32
rect = Rect.new(x, y, self.width - 32, 64)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
if not $game_temp.in_battle
self.contents.draw_text(x + 232, y, 48, 32, $combo_point[n][0].to_s, 2)
self.contents.draw_text(x + 288, y, 48, 32, $combo_point[n][1].to_s, 2) rescue nil
self.contents.draw_text(x + 344, y, 48, 32, $combo_point[n][2].to_s, 2) rescue nil
self.contents.draw_text(x + 400, y, 48, 32, $combo_point[n][3].to_s, 2) rescue nil
else
po = []
for i in 0...$game_party.actors.size
if $combo_hero[n].include?($game_party.actors[i].id)
po.push $game_party.actors[i].id
end
end
ex = po.size
for r in 0...$combo_hero[n].size
if $combo_hero[n][r] != nil
if not po.include?($combo_hero[n][r])
po.push $combo_hero[n][r]
end
end
end
for ach in 0...po.size
if ach == ex
self.contents.font.color = self.contents.font.color == normal_color ? knockout_color : Color.new(255, 64, 0, 128)
end
for h in 0...$combo_hero[n].size
if $combo_point[n][h] != nil
if $combo_hero[n][h] == po[ach]
punti = $combo_point[n][h]
end
end
end
self.contents.draw_text(x + 232 + (ach * 56), y, 48, 32, punti.to_s, 2)
end
end
end
I thought this just drew the combo selection box - although I'm not very familiar with a lot of the code here so it may do much more than that...
Thanks for your help.