+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Advanced Shop Status Window (/thread-2762.html)
Advanced Shop Status Window - RPG Advocate - 03-02-2008
Advanced Shop Status Window
by RPG Advocate
saved from Phylomortis.Com
Introduction
This script upgrades the window that shows whether characters can equip the item selected in the shop goods window, and their stat changes from doing so. This script shows the changes in all seven stats that can change from equipping either a weapon or armor. Also, instead of showing the character names in the normal color or disabled color, this scirpt makes it show that the character's graphic is shown in color if they can equip the item, or black and white if they can't.
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Get Up Text Color
#--------------------------------------------------------------------------
def up_color
return Color.new(74, 210, 74)
end
#--------------------------------------------------------------------------
# * Get Down Text Color
#--------------------------------------------------------------------------
def down_color
return Color.new(170, 170, 170)
end
end
#==============================================================================
# ** Window_ShopStatus
#------------------------------------------------------------------------------
# This window displays number of items in possession and the actor's equipment
# on the shop screen.
#==============================================================================
class Window_ShopStatus < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(368, 128, 272, 352)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial"
self.contents.font.size = 24
@item = nil
@sprite1 = nil
@sprite2 = nil
@sprite3 = nil
@sprite4 = nil
@walk = [false, false, false, false]
@count = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if @sprite1 != nil
@sprite1.dispose
@sprite1 = nil
end
if @sprite2 != nil
@sprite2.dispose
@sprite2 = nil
end
if @sprite3 != nil
@sprite3.dispose
@sprite3 = nil
end
if @sprite4 != nil
@sprite4.dispose
@sprite4 = nil
end
self.contents.font.name = "Arial"
self.contents.font.size = 24
if @item == nil
return
end
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
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, 32, "Possessed:")
self.contents.font.color = normal_color
self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
if @item.is_a?(RPG::Item)
@walk = [false, false, false, false]
return
end
# Equipment adding information
for i in 0...$game_party.actors.size
# Get actor
actor = $game_party.actors[i]
if @item.is_a?(RPG::Weapon)
item1 = $data_weapons[actor.weapon_id]
elsif @item.kind == 0
item1 = $data_armors[actor.armor1_id]
elsif @item.kind == 1
item1 = $data_armors[actor.armor2_id]
elsif @item.kind == 2
item1 = $data_armors[actor.armor3_id]
else
item1 = $data_armors[actor.armor4_id]
end
if not actor.equippable?(@item)
@walk[i] = false
draw_actor_graphic(actor, 380, 194 + 64 * i, i, 0)
self.contents.font.name = "Arial"
self.contents.font.size = 24
self.contents.font.color = normal_color
self.contents.draw_text(32, 54 + 64 * i, 150, 32, "Cannot Equip")
end
# If equippable, then set to normal, increase or decrease text color.
# If not, set to invalid text color and freeze charset graphic.
if actor.equippable?(@item)
@walk[i] = true
draw_actor_graphic(actor, 380, 194 + 64 * i, i, 1)
atk1 = 0
atk2 = 0
eva1 = 0
eva2 = 0
str1 = 0
str2 = 0
dex1 = 0
dex2 = 0
agi1 = 0
agi2 = 0
int1 = 0
int2 = 0
pdf1 = 0
pdf2 = 0
mdf1 = 0
mdf2 = 0
eva1 = 0
eva2 = 0
str1 = item1 != nil ? item1.str_plus : 0
str2 = @item != nil ? @item.str_plus : 0
dex1 = item1 != nil ? item1.dex_plus : 0
dex2 = @item != nil ? @item.dex_plus : 0
agi1 = item1 != nil ? item1.agi_plus : 0
agi2 = @item != nil ? @item.agi_plus : 0
int1 = item1 != nil ? item1.int_plus : 0
int2 = @item != nil ? @item.int_plus : 0
pdf1 = item1 != nil ? item1.pdef : 0
pdf2 = @item != nil ? @item.pdef : 0
mdf1 = item1 != nil ? item1.mdef : 0
mdf2 = @item != nil ? @item.mdef : 0
if @item.is_a?(RPG::Weapon)
atk1 = item1 != nil ? item1.atk : 0
atk2 = @item != nil ? @item.atk : 0
end
if @item.is_a?(RPG::Armor)
eva1 = item1 != nil ? item1.eva : 0
eva2 = @item != nil ? @item.eva : 0
end
str_change = str2 - str1
dex_change = dex2 - dex1
agi_change = agi2 - agi1
int_change = int2 - int1
pdf_change = pdf2 - pdf1
mdf_change = mdf2 - mdf1
atk_change = atk2 - atk1
eva_change = eva2 - eva1
if item1 == nil
name1 = ""
else
name1 = item1.name
end
if @item == nil
name2 = ""
else
name2 = @item.name
end
if str_change == 0 && dex_change == 0 && agi_change == 0 &&
pdf_change == 0 && mdf_change == 0 && atk_change == 0 &&
eva_change == 0 && name1 != name2
self.contents.draw_text(32, 54 + 64 * i, 150, 32, "No Change")
end
if name1 == name2
self.contents.draw_text(32, 54 + 64 * i, 200, 32, "Currently Equipped")
end
self.contents.font.name = "Arial"
self.contents.font.size = 16
self.contents.font.color = normal_color
if @item.is_a?(RPG::Weapon) && atk_change != 0
self.contents.draw_text(32, 42 + 64 * i, 32, 32, "ATK")
end
if @item.is_a?(RPG::Armor) && eva_change != 0
self.contents.draw_text(32, 42 + 64 * i, 32, 32, "EVA")
end
if pdf_change != 0
self.contents.draw_text(32, 58 + 64 * i, 32, 32, "PDF")
end
if mdf_change != 0
self.contents.draw_text(32, 74 + 64 * i, 32, 32, "MDF")
end
if str_change != 0
self.contents.draw_text(112, 42 + 64 * i, 32, 32, "STR")
end
if dex_change != 0
self.contents.draw_text(112, 58 + 64 * i, 32, 32, "DEX")
end
if agi_change != 0
self.contents.draw_text(112, 74 + 64 * i, 32, 32, "AGI")
end
if str_change != 0
self.contents.draw_text(192, 42 + 64 * i, 32, 32, "INT")
end
if @item.is_a?(RPG::Weapon) && atk_change > 0
self.contents.font.color = up_color
s = atk_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if @item.is_a?(RPG::Weapon) && atk_change < 0
self.contents.font.color = down_color
s = atk_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if @item.is_a?(RPG::Armor) && eva_change > 0
self.contents.font.color = up_color
s = eva_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if @item.is_a?(RPG::Armor) && eva_change < 0
self.contents.font.color = down_color
s = eva_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if pdf_change > 0
self.contents.font.color = up_color
s = pdf_change.abs.to_s
self.contents.draw_text(60, 58 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 58 + 64 * i, 24, 32, s, 2)
end
if pdf_change < 0
self.contents.font.color = down_color
s = pdf_change.abs.to_s
self.contents.draw_text(60, 58 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 58 + 64 * i, 24, 32, s, 2)
end
if mdf_change > 0
self.contents.font.color = up_color
s = mdf_change.abs.to_s
self.contents.draw_text(60, 74 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 74 + 64 * i, 24, 32, s, 2)
end
if mdf_change < 0
self.contents.font.color = down_color
s = mdf_change.abs.to_s
self.contents.draw_text(60, 74 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 74 + 64 * i, 24, 32, s, 2)
end
if str_change > 0
self.contents.font.color = up_color
s = str_change.abs.to_s
self.contents.draw_text(140, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(142, 42 + 64 * i, 24, 32, s, 2)
end
if str_change < 0
self.contents.font.color = down_color
s = str_change.abs.to_s
self.contents.draw_text(140, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(142, 42 + 64 * i, 24, 32, s, 2)
end
if dex_change > 0
self.contents.font.color = up_color
s = dex_change.abs.to_s
self.contents.draw_text(140, 58 + 64 * i, 4, 32, "+")
self.contents.draw_text(142, 58 + 64 * i, 24, 32, s, 2)
end
if dex_change < 0
self.contents.font.color = down_color
s = dex_change.abs.to_s
self.contents.draw_text(140, 58 + 64 * i, 4, 32, "-")
self.contents.draw_text(142, 58 + 64 * i, 24, 32, s, 2)
end
if agi_change > 0
self.contents.font.color = up_color
s = agi_change.abs.to_s
self.contents.draw_text(140, 74 + 64 * i, 4, 32, "+")
self.contents.draw_text(142, 74 + 64 * i, 24, 32, s, 2)
end
if agi_change < 0
self.contents.font.color = down_color
s = agi_change.abs.to_s
self.contents.draw_text(140, 74 + 64 * i, 4, 32, "-")
self.contents.draw_text(142, 74 + 64 * i, 24, 32, s, 2)
end
if int_change > 0
self.contents.font.color = up_color
s = int_change.abs.to_s
self.contents.draw_text(214, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(216, 42 + 64 * i, 24, 32, s, 2)
end
if int_change < 0
self.contents.font.color = down_color
s = int_change.abs.to_s
self.contents.draw_text(214, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(216, 42 + 64 * i, 24, 32, s, 2)
end
end
end
end
#--------------------------------------------------------------------------
# * Set Item
# item : new item
#--------------------------------------------------------------------------
def item=(item)
if @item != item
@item = item
refresh
end
end
#--------------------------------------------------------------------------
# * Draw Graphic
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# id : ID
# tone_id : tone ID
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y, id, tone_id)
if id == 0
@v1 = Viewport.new(380, 194, 32, 48)
@v1.z = 9998
@sprite1 = Sprite.new(@v1)
@sprite1.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite1.tone = Tone.new(0, 0, 0, 255)
else
@sprite1.tone = Tone.new(0, 0, 0, 0)
end
@sprite1.visible = true
end
if id == 1
@v2 = Viewport.new(380, 258, 32, 48)
@v2.z = 9999
@sprite2 = Sprite.new(@v2)
@sprite2.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite2.tone = Tone.new(0, 0, 0, 255)
else
@sprite2.tone = Tone.new(0, 0, 0, 0)
end
@sprite2.visible = true
end
if id == 2
@v3 = Viewport.new(380, 322, 32, 48)
@v3.z = 9999
@sprite3 = Sprite.new(@v3)
@sprite3.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite3.tone = Tone.new(0, 0, 0, 255)
else
@sprite3.tone = Tone.new(0, 0, 0, 0)
end
@sprite3.visible = true
end
if id == 3
@v4 = Viewport.new(380, 386, 32, 48)
@v4.z = 9999
@sprite4 = Sprite.new(@v4)
@sprite4.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite4.tone = Tone.new(0, 0, 0, 255)
else
@sprite4.tone = Tone.new(0, 0, 0, 0)
end
@sprite4.visible = true
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
@count += 1
for i in 0..@walk.size
if @walk[i] == false
case i
when 0
if @sprite1 != nil
@sprite1.ox = 0
end
when 1
if @sprite2 != nil
@sprite2.ox = 0
end
when 2
if @sprite3 != nil
@sprite3.ox = 0
end
when 3
if @sprite4 != nil
@sprite4.ox = 0
end
end
end
end
if @count == 0
for i in 0..@walk.size
if @walk[i] == true
case i
when 0
if @sprite1 != nil
@sprite1.ox = 0
end
when 1
if @sprite2 != nil
@sprite2.ox = 0
end
when 2
if @sprite3 != nil
@sprite3.ox = 0
end
when 3
if @sprite4 != nil
@sprite4.ox = 0
end
end
end
end
end
if @count == 5
for i in 0..@walk.size
if @walk[i] == true
case i
when 0
if @sprite1 != nil
@sprite1.ox = 32
end
when 1
if @sprite2 != nil
@sprite2.ox = 32
end
when 2
if @sprite3 != nil
@sprite3.ox = 32
end
when 3
if @sprite4 != nil
@sprite4.ox = 32
end
end
end
end
end
if @count == 10
for i in 0..@walk.size
if @walk[i] == true
case i
when 0
if @sprite1 != nil
@sprite1.ox = 64
end
when 1
if @sprite2 != nil
@sprite2.ox = 64
end
when 2
if @sprite3 != nil
@sprite3.ox = 64
end
when 3
if @sprite4 != nil
@sprite4.ox = 64
end
end
end
end
end
if @count == 15
@count = 0
end
end
end
EDIT: By DerVVulfman
REVISED Advanced Shop Status Window (w/ Bug fixes)
This version includes bug fixes regarding the non-erasing character sprites and an odd font resize issue.
Code:
# Advanced Shop Status Window
# by RPG Advocate
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Get Up Text Color
#--------------------------------------------------------------------------
def up_color
return Color.new(74, 210, 74)
end
#--------------------------------------------------------------------------
# * Get Down Text Color
#--------------------------------------------------------------------------
def down_color
return Color.new(170, 170, 170)
end
end
#==============================================================================
# ** Window_ShopStatus
#------------------------------------------------------------------------------
# This window displays number of items in possession and the actor's equipment
# on the shop screen.
#==============================================================================
class Window_ShopStatus < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(368, 128, 272, 352)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Arial"
self.contents.font.size = 24
@item = nil
@sprite1 = nil
@sprite2 = nil
@sprite3 = nil
@sprite4 = nil
@walk = [false, false, false, false]
@count = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if @sprite1 != nil
@sprite1.dispose
@sprite1 = nil
end
if @sprite2 != nil
@sprite2.dispose
@sprite2 = nil
end
if @sprite3 != nil
@sprite3.dispose
@sprite3 = nil
end
if @sprite4 != nil
@sprite4.dispose
@sprite4 = nil
end
self.contents.font.name = "Arial"
self.contents.font.size = 24
if @item == nil
return
end
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
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 200, 32, "Possessed:")
self.contents.font.color = normal_color
self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
if @item.is_a?(RPG::Item)
@walk = [false, false, false, false]
return
end
# Equipment adding information
for i in 0...$game_party.actors.size
# Get actor
actor = $game_party.actors[i]
if @item.is_a?(RPG::Weapon)
item1 = $data_weapons[actor.weapon_id]
elsif @item.kind == 0
item1 = $data_armors[actor.armor1_id]
elsif @item.kind == 1
item1 = $data_armors[actor.armor2_id]
elsif @item.kind == 2
item1 = $data_armors[actor.armor3_id]
else
item1 = $data_armors[actor.armor4_id]
end
if not actor.equippable?(@item)
@walk[i] = false
draw_actor_graphic(actor, 380, 194 + 64 * i, i, 0)
self.contents.font.name = "Arial"
self.contents.font.size = 24
self.contents.font.color = normal_color
self.contents.draw_text(32, 54 + 64 * i, 150, 32, "Cannot Equip")
end
# If equippable, then set to normal, increase or decrease text color.
# If not, set to invalid text color and freeze charset graphic.
if actor.equippable?(@item)
@walk[i] = true
draw_actor_graphic(actor, 380, 194 + 64 * i, i, 1)
atk1 = 0
atk2 = 0
eva1 = 0
eva2 = 0
str1 = 0
str2 = 0
dex1 = 0
dex2 = 0
agi1 = 0
agi2 = 0
int1 = 0
int2 = 0
pdf1 = 0
pdf2 = 0
mdf1 = 0
mdf2 = 0
eva1 = 0
eva2 = 0
str1 = item1 != nil ? item1.str_plus : 0
str2 = @item != nil ? @item.str_plus : 0
dex1 = item1 != nil ? item1.dex_plus : 0
dex2 = @item != nil ? @item.dex_plus : 0
agi1 = item1 != nil ? item1.agi_plus : 0
agi2 = @item != nil ? @item.agi_plus : 0
int1 = item1 != nil ? item1.int_plus : 0
int2 = @item != nil ? @item.int_plus : 0
pdf1 = item1 != nil ? item1.pdef : 0
pdf2 = @item != nil ? @item.pdef : 0
mdf1 = item1 != nil ? item1.mdef : 0
mdf2 = @item != nil ? @item.mdef : 0
if @item.is_a?(RPG::Weapon)
atk1 = item1 != nil ? item1.atk : 0
atk2 = @item != nil ? @item.atk : 0
end
if @item.is_a?(RPG::Armor)
eva1 = item1 != nil ? item1.eva : 0
eva2 = @item != nil ? @item.eva : 0
end
str_change = str2 - str1
dex_change = dex2 - dex1
agi_change = agi2 - agi1
int_change = int2 - int1
pdf_change = pdf2 - pdf1
mdf_change = mdf2 - mdf1
atk_change = atk2 - atk1
eva_change = eva2 - eva1
if item1 == nil
name1 = ""
else
name1 = item1.name
end
if @item == nil
name2 = ""
else
name2 = @item.name
end
self.contents.font.name = "Arial"
self.contents.font.size = 24
self.contents.font.color = normal_color
if str_change == 0 && dex_change == 0 && agi_change == 0 &&
pdf_change == 0 && mdf_change == 0 && atk_change == 0 &&
eva_change == 0 && name1 != name2
self.contents.draw_text(32, 54 + 64 * i, 150, 32, "No Change")
end
if name1 == name2
self.contents.draw_text(32, 54 + 64 * i, 200, 32, "Currently Equipped")
end
self.contents.font.name = "Arial"
self.contents.font.size = 16
self.contents.font.color = normal_color
if @item.is_a?(RPG::Weapon) && atk_change != 0
self.contents.draw_text(32, 42 + 64 * i, 32, 32, "ATK")
end
if @item.is_a?(RPG::Armor) && eva_change != 0
self.contents.draw_text(32, 42 + 64 * i, 32, 32, "EVA")
end
if pdf_change != 0
self.contents.draw_text(32, 58 + 64 * i, 32, 32, "PDF")
end
if mdf_change != 0
self.contents.draw_text(32, 74 + 64 * i, 32, 32, "MDF")
end
if str_change != 0
self.contents.draw_text(112, 42 + 64 * i, 32, 32, "STR")
end
if dex_change != 0
self.contents.draw_text(112, 58 + 64 * i, 32, 32, "DEX")
end
if agi_change != 0
self.contents.draw_text(112, 74 + 64 * i, 32, 32, "AGI")
end
if int_change != 0
self.contents.draw_text(192, 42 + 64 * i, 32, 32, "INT")
end
if @item.is_a?(RPG::Weapon) && atk_change > 0
self.contents.font.color = up_color
s = atk_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if @item.is_a?(RPG::Weapon) && atk_change < 0
self.contents.font.color = down_color
s = atk_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if @item.is_a?(RPG::Armor) && eva_change > 0
self.contents.font.color = up_color
s = eva_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if @item.is_a?(RPG::Armor) && eva_change < 0
self.contents.font.color = down_color
s = eva_change.abs.to_s
self.contents.draw_text(60, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 42 + 64 * i, 24, 32, s, 2)
end
if pdf_change > 0
self.contents.font.color = up_color
s = pdf_change.abs.to_s
self.contents.draw_text(60, 58 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 58 + 64 * i, 24, 32, s, 2)
end
if pdf_change < 0
self.contents.font.color = down_color
s = pdf_change.abs.to_s
self.contents.draw_text(60, 58 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 58 + 64 * i, 24, 32, s, 2)
end
if mdf_change > 0
self.contents.font.color = up_color
s = mdf_change.abs.to_s
self.contents.draw_text(60, 74 + 64 * i, 4, 32, "+")
self.contents.draw_text(62, 74 + 64 * i, 24, 32, s, 2)
end
if mdf_change < 0
self.contents.font.color = down_color
s = mdf_change.abs.to_s
self.contents.draw_text(60, 74 + 64 * i, 4, 32, "-")
self.contents.draw_text(62, 74 + 64 * i, 24, 32, s, 2)
end
if str_change > 0
self.contents.font.color = up_color
s = str_change.abs.to_s
self.contents.draw_text(140, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(142, 42 + 64 * i, 24, 32, s, 2)
end
if str_change < 0
self.contents.font.color = down_color
s = str_change.abs.to_s
self.contents.draw_text(140, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(142, 42 + 64 * i, 24, 32, s, 2)
end
if dex_change > 0
self.contents.font.color = up_color
s = dex_change.abs.to_s
self.contents.draw_text(140, 58 + 64 * i, 4, 32, "+")
self.contents.draw_text(142, 58 + 64 * i, 24, 32, s, 2)
end
if dex_change < 0
self.contents.font.color = down_color
s = dex_change.abs.to_s
self.contents.draw_text(140, 58 + 64 * i, 4, 32, "-")
self.contents.draw_text(142, 58 + 64 * i, 24, 32, s, 2)
end
if agi_change > 0
self.contents.font.color = up_color
s = agi_change.abs.to_s
self.contents.draw_text(140, 74 + 64 * i, 4, 32, "+")
self.contents.draw_text(142, 74 + 64 * i, 24, 32, s, 2)
end
if agi_change < 0
self.contents.font.color = down_color
s = agi_change.abs.to_s
self.contents.draw_text(140, 74 + 64 * i, 4, 32, "-")
self.contents.draw_text(142, 74 + 64 * i, 24, 32, s, 2)
end
if int_change > 0
self.contents.font.color = up_color
s = int_change.abs.to_s
self.contents.draw_text(214, 42 + 64 * i, 4, 32, "+")
self.contents.draw_text(216, 42 + 64 * i, 24, 32, s, 2)
end
if int_change < 0
self.contents.font.color = down_color
s = int_change.abs.to_s
self.contents.draw_text(214, 42 + 64 * i, 4, 32, "-")
self.contents.draw_text(216, 42 + 64 * i, 24, 32, s, 2)
end
end
end
end
#--------------------------------------------------------------------------
# * Set Item
# item : new item
#--------------------------------------------------------------------------
def item=(item)
if @item != item
@item = item
refresh
end
end
#--------------------------------------------------------------------------
# * Draw Graphic
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# id : ID
# tone_id : tone ID
#--------------------------------------------------------------------------
def draw_actor_graphic(actor, x, y, id, tone_id)
if id == 0
@v1 = Viewport.new(380, 194, 32, 48)
@v1.z = 9998
@sprite1 = Sprite.new(@v1)
@sprite1.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite1.tone = Tone.new(0, 0, 0, 255)
else
@sprite1.tone = Tone.new(0, 0, 0, 0)
end
@sprite1.visible = true
end
if id == 1
@v2 = Viewport.new(380, 258, 32, 48)
@v2.z = 9999
@sprite2 = Sprite.new(@v2)
@sprite2.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite2.tone = Tone.new(0, 0, 0, 255)
else
@sprite2.tone = Tone.new(0, 0, 0, 0)
end
@sprite2.visible = true
end
if id == 2
@v3 = Viewport.new(380, 322, 32, 48)
@v3.z = 9999
@sprite3 = Sprite.new(@v3)
@sprite3.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite3.tone = Tone.new(0, 0, 0, 255)
else
@sprite3.tone = Tone.new(0, 0, 0, 0)
end
@sprite3.visible = true
end
if id == 3
@v4 = Viewport.new(380, 386, 32, 48)
@v4.z = 9999
@sprite4 = Sprite.new(@v4)
@sprite4.bitmap = RPG::Cache.character(actor.character_name,
actor.character_hue)
if tone_id == 0
@sprite4.tone = Tone.new(0, 0, 0, 255)
else
@sprite4.tone = Tone.new(0, 0, 0, 0)
end
@sprite4.visible = true
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if @sprite1 != nil
@sprite1.visible = self.visible
end
if @sprite2 != nil
@sprite2.visible = self.visible
end
if @sprite3 != nil
@sprite3.visible = self.visible
end
if @sprite4 != nil
@sprite4.visible = self.visible
end
@count += 1
for i in 0..@walk.size
if @walk[i] == false
case i
when 0
if @sprite1 != nil
@sprite1.ox = 0
end
when 1
if @sprite2 != nil
@sprite2.ox = 0
end
when 2
if @sprite3 != nil
@sprite3.ox = 0
end
when 3
if @sprite4 != nil
@sprite4.ox = 0
end
end
end
end
if @count == 0
for i in 0..@walk.size
if @walk[i] == true
case i
when 0
if @sprite1 != nil
@sprite1.ox = 0
end
when 1
if @sprite2 != nil
@sprite2.ox = 0
end
when 2
if @sprite3 != nil
@sprite3.ox = 0
end
when 3
if @sprite4 != nil
@sprite4.ox = 0
end
end
end
end
end
if @count == 5
for i in 0..@walk.size
if @walk[i] == true
case i
when 0
if @sprite1 != nil
@sprite1.ox = 32
end
when 1
if @sprite2 != nil
@sprite2.ox = 32
end
when 2
if @sprite3 != nil
@sprite3.ox = 32
end
when 3
if @sprite4 != nil
@sprite4.ox = 32
end
end
end
end
end
if @count == 10
for i in 0..@walk.size
if @walk[i] == true
case i
when 0
if @sprite1 != nil
@sprite1.ox = 64
end
when 1
if @sprite2 != nil
@sprite2.ox = 64
end
when 2
if @sprite3 != nil
@sprite3.ox = 64
end
when 3
if @sprite4 != nil
@sprite4.ox = 64
end
end
end
end
end
if @count == 15
@count = 0
end
end
end
Demo still includes the original without the fix.
Advanced Shop Status Window - explocion200 - 12-17-2009
for the trade system how can i add and remove items so the player can buy i know is on the script but wat part i cant find itbump anyone help me please
Do not bump the thread unless 24 hours has passed since your last post. - PK8
Advanced Shop Status Window - DerVVulfman - 12-18-2009
Please. This script modifies the appearance of the built-in shop system. It is not a trade system. Defer your request to a Script Request.
RE: Advanced Shop Status Window - jccaton - 07-25-2011
FYI: When exiting out of the "sell" screen, (ie, "I thought I might sell this, but changed my mind) the character sprites continue to be displayed until you leave shop screen.
RE: Advanced Shop Status Window - DerVVulfman - 08-21-2011
BUMP! To include the characterset erase fix as well as both a parameter and font resize problem.