herogaurdin
Member
can anybody rearrange this god forsaken script? i hate it when i find a good script and i cant use it cos its all mumbled up! please someone unscramble this for me!
It reaches the point where the window which arranges the #
idea contest in place of the command window which appears in during #
idea contest command window # # fighting is indicated. Being to
have searched from the idea contest folder of ツクール, when you
prepare the picture # by your, with ツクール please import the #
idea contest picture in the idea contest. At the time of # #
2005.8.15 bug correction # battle thrust, correcting the fact that the
instant idea contest is indicated on the left. Way # # 2006.2.17
# enlargement reduction function can be set in detail. If true #
<- in one for debugging true validity, with false x coordinate
revision X_PLUS of invalid module Momo_IconCommand # idea contest file
name setting ATTACK_ICON_NAME = "001-Weapon01" # attack
SKILL_ICON_NAME = "044-Skill01" # skill GUARD_ICON_NAME =
"009-Shield01" # defense ITEM_ICON_NAME = "032-Item01" # item # window
= -40 Y-coordinate revision Y_PLUS of # window = -180 operational # 0:
at time of # idea contest selection Flash 1: If color
FLASH_COLOR at the time of the enlargement SELECT_TYPE = 1 # flash =
Color.new (255, 255, 255, 128) the time when you spend on the # flash
(the frame) the interval which the FLASH_DURATION = 10 # flashes is
done (the frame) FLASH_INTERVAL = 20 ZOOM_MAX = 1.5 # maximum
magnification ratio (1.0 or more) ZOOM_MIN = 0.5 # smallest
magnification ratio (1.0 or less) ZOOM_INTERVAL1 = 4 # identical
dimensions -> frame several ZOOM_INTERVAL2 = 4 # maximum magnification
ratios which are bet on maximum magnification ratio -> frame several
ZOOM_INTERVAL3 = 4 # identical dimensions which are bet on this time
-> frame several ZOOM_INTERVAL4 = 4 # smallest magnification ratios
which are bet on the smallest magnification ratio -> frame several
ZOOM_TYPE = false # enlargements which are bet on this time ->
reduction true and reduction -> If enlargement whether or not
the false # command character string is indicated, whether or not the
COM_NAME_DROW = true # character string is let flow, the COM_NAME_MOVE
= true # the character string ATTACK_NAME = "attack" # attack
SKILL_NAME = "skill" # skill GUARD_NAME = "defense" # defense
ITEM_NAME = "item" # item # character string color COM_NAME_COLOR =
Color.new which is indicated (255, 255, 255, 255) coordinate revision
COM_NAME_X_PLUS in the # command character string = 0 COM_NAME_Y_PLUS
= 0 end class Window_CommandIcon < Window_Selectable
attr_accessor :last_index
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(x, y, commands)
super(x, y, 32, 32)
# ウィンドウスã‚ンã«ç©ºæ–‡å—列を指定ã—ã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’æç”»ã—ãªã„よã†ã«ã™ã‚‹
self.windowskin = RPG::Cache.windowskin("")
@item_max = commands.size
@commands = commands
@column_max = commands.size
@index = 0
@last_index = nil
@name_sprite = nil
@sprite = []
refresh
end
def dispose
super
for sprite in @sprite
sprite.dispose unless sprite.nil?
end
@name_sprite.dispose unless @name_sprite.nil?
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
@name_sprite.dispose unless @name_sprite.nil?
for sprite in @sprite
sprite.dispose unless sprite.nil?
end
@name_sprite = nil
draw_com_name if Momo_IconCommand::COM_NAME_DROW
@sprite = []
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# â— é …ç›®ã®æç”»
#--------------------------------------------------------------------------
def draw_item(index)
@sprite[index] = Sprite_Icon.new(nil, @commands[index])
@sprite[index].z = self.z + 1
end
def draw_com_name
@name_sprite = Sprite_Comm_Name.new(nil, get_com_name)
end
# æ›´æ–°
def update
super
icon_update
com_name_update if Momo_IconCommand::COM_NAME_DROW
if move_index?
@last_index = self.index
end
end
# アイコンã®æ›´æ–°
def icon_update
for i in 0...@sprite.size
@sprite.active = (self.index == i)
@sprite.x = self.x + i * 24
@sprite.y = self.y + 0
@sprite.z = (self.index == i) ? self.z + 2 : self.z + 1
@sprite.visible = self.visible
@sprite.update
end
end
# コマンドãƒãƒ¼ãƒ ã®æ›´æ–°
def com_name_update
if move_index?
@name_sprite.name = get_com_name
end
@name_sprite.x = self.x - 12 + Momo_IconCommand::COM_NAME_X_PLUS
@name_sprite.y = self.y - 40 + Momo_IconCommand::COM_NAME_Y_PLUS
@name_sprite.z = self.z + 1
@name_sprite.active = self.active
@name_sprite.visible = self.visible
@name_sprite.update
end
def get_com_name
make_name_set if @name_set.nil?
name = @name_set[self.index]
name = "" if name.nil?
return name
end
def make_name_set
@name_set = []
@name_set[0] = Momo_IconCommand::ATTACK_NAME
@name_set[1] = Momo_IconCommand::SKILL_NAME
@name_set[2] = Momo_IconCommand::GUARD_NAME
@name_set[3] = Momo_IconCommand::ITEM_NAME
end
def move_index?
return self.index != @last_index
end
def need_reset
@name_sprite.need_reset = true if Momo_IconCommand::COM_NAME_DROW
end
end
# アイコン用スプライト
class Sprite_Icon < Sprite
attr_accessor :active
attr_accessor :icon_name
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(viewport, icon_name)
super(viewport)
@icon_name = icon_name
@last_icon = @icon_name
@count = 0
@zoom_in = Momo_IconCommand::ZOOM_TYPE
self.bitmap = RPG::Cache.icon(@icon_name)
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
@active = false
end
#--------------------------------------------------------------------------
# ◠解放
#--------------------------------------------------------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
if @icon_name != @last_icon
@last_icon = @icon_name
self.bitmap = RPG::Cache.icon(@icon_name)
end
if @active
case Momo_IconCommand::SELECT_TYPE
when 0
icon_flash
when 1
icon_zoom
end
else
icon_reset
end
end
def icon_flash
if @count % Momo_IconCommand::FLASH_INTERVAL == 0 or @count == 1
self.flash(Momo_IconCommand::FLASH_COLOR, Momo_IconCommand::FLASH_DURATION)
end
@count += 1
end
# 拡大縮å°
def icon_zoom
if @zoom_in
interval1 = Momo_IconCommand::ZOOM_INTERVAL1
interval2 = Momo_IconCommand::ZOOM_INTERVAL2
zoom_max = Momo_IconCommand::ZOOM_MAX
zoom_in(zoom_max, interval1, interval2)
else
interval1 = Momo_IconCommand::ZOOM_INTERVAL3
interval2 = Momo_IconCommand::ZOOM_INTERVAL4
zoom_min = Momo_IconCommand::ZOOM_MIN
zoom_out(zoom_min, interval1, interval2)
end
@count += 1
if @count >= Interval1 + interval2 @count = 0 @zoom_in ^= true end
end # enlargement processing def zoom_in (zoom_max and interval1,
interval2) if interval1 >= @count zoom = 1.0 + (zoom_max - 1.0) & (1.0
* @count/interval1) else zoom = zoom_max - (zoom_max - 1.0) & (1.0 *
(@count - interval1)/interval2) end self.zoom_x = zoom self.zoom_y =
zoom end # reduction processing def zoom_out (zoom_min,
Interval1, interval2) If interval1 >= @count zoom = 1.0 -
(1.0 - zoom_min) & (1.0 * @count/interval1) else zoom = zoom_min +
(1.0 - zoom_min) & (1.0 * (@count - interval1)/interval2) end
self.zoom_x = zoom self.zoom_y = zoom end def icon_zoom000 case @count
when 1. 10 zoom = 1.0 + @count/10.0 when 11. 20 zoom = 2.0 - (@count -
10)/sprite class for 10.0 end self.zoom_x = zoom self.zoom_y = zoom
end def icon_reset @count = 0 self.zoom_x = 1.0 self.zoom_y = 1.0 end
end # command name Sprite_Comm_Name < Sprite
attr_accessor :active
attr_accessor :name
attr_accessor :need_reset
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(viewport, name)
super(viewport)
@name = name
@last_name = nil
@count = 0
@x_plus = 0
@opa_plus = 0
@need_reset = false
@active = false
self.bitmap = Bitmap.new(160, 32)
end
#--------------------------------------------------------------------------
# ◠解放
#--------------------------------------------------------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
if @active
if need_reset?
@need_reset = false
@last_name = @name
text_reset
end
move_text if Momo_IconCommand::COM_NAME_MOVE
end
end
def move_text
@count += 1
@x_plus = [@count * 8, 80].min
self.x = self.x - 80 + @x_plus
self.opacity = @count * 25
end
def text_reset
@count = 0
@x_plus = 0
self.bitmap.clear
self.bitmap.font.color = Momo_IconCommand::COM_NAME_COLOR
self.bitmap.draw_text(0, 0, 160, 32, @name)
end
def need_reset?
return (@name != @last_name or @need_reset)
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# ◠プレãƒãƒˆãƒ«ãƒ•ã‚§ãƒ¼ã‚ºé–‹å§‹
#--------------------------------------------------------------------------
alias scene_battle_icon_command_start_phase1 start_phase1
def start_phase1
com1 = Momo_IconCommand::ATTACK_ICON_NAME
com2 = Momo_IconCommand::SKILL_ICON_NAME
com3 = Momo_IconCommand::GUARD_ICON_NAME
com4 = Momo_IconCommand::ITEM_ICON_NAME
@actor_command_window = Window_CommandIcon.new(0, 0, [com1, com2, com3, com4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.update
scene_battle_icon_command_start_phase1
end
#--------------------------------------------------------------------------
# ◠アクターコマンドウィンドウã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
#--------------------------------------------------------------------------
alias scene_battle_icon_command_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
scene_battle_icon_command_phase3_setup_command_window
# アクターコマンドウィンドウã®ä½ç½®ã‚’è¨å®š
@actor_command_window.x = command_window_actor_x(@actor_index)
@actor_command_window.y = command_window_actor_y(@actor_index)
@actor_command_window.need_reset
end
def command_window_actor_x(index)
$game_party.actors[index].screen_x + Momo_IconCommand::X_PLUS
end
def command_window_actor_y(index)
$game_party.actors[index].screen_y + Momo_IconCommand::Y_PLUS
end
end
end
It reaches the point where the window which arranges the #
idea contest in place of the command window which appears in during #
idea contest command window # # fighting is indicated. Being to
have searched from the idea contest folder of ツクール, when you
prepare the picture # by your, with ツクール please import the #
idea contest picture in the idea contest. At the time of # #
2005.8.15 bug correction # battle thrust, correcting the fact that the
instant idea contest is indicated on the left. Way # # 2006.2.17
# enlargement reduction function can be set in detail. If true #
<- in one for debugging true validity, with false x coordinate
revision X_PLUS of invalid module Momo_IconCommand # idea contest file
name setting ATTACK_ICON_NAME = "001-Weapon01" # attack
SKILL_ICON_NAME = "044-Skill01" # skill GUARD_ICON_NAME =
"009-Shield01" # defense ITEM_ICON_NAME = "032-Item01" # item # window
= -40 Y-coordinate revision Y_PLUS of # window = -180 operational # 0:
at time of # idea contest selection Flash 1: If color
FLASH_COLOR at the time of the enlargement SELECT_TYPE = 1 # flash =
Color.new (255, 255, 255, 128) the time when you spend on the # flash
(the frame) the interval which the FLASH_DURATION = 10 # flashes is
done (the frame) FLASH_INTERVAL = 20 ZOOM_MAX = 1.5 # maximum
magnification ratio (1.0 or more) ZOOM_MIN = 0.5 # smallest
magnification ratio (1.0 or less) ZOOM_INTERVAL1 = 4 # identical
dimensions -> frame several ZOOM_INTERVAL2 = 4 # maximum magnification
ratios which are bet on maximum magnification ratio -> frame several
ZOOM_INTERVAL3 = 4 # identical dimensions which are bet on this time
-> frame several ZOOM_INTERVAL4 = 4 # smallest magnification ratios
which are bet on the smallest magnification ratio -> frame several
ZOOM_TYPE = false # enlargements which are bet on this time ->
reduction true and reduction -> If enlargement whether or not
the false # command character string is indicated, whether or not the
COM_NAME_DROW = true # character string is let flow, the COM_NAME_MOVE
= true # the character string ATTACK_NAME = "attack" # attack
SKILL_NAME = "skill" # skill GUARD_NAME = "defense" # defense
ITEM_NAME = "item" # item # character string color COM_NAME_COLOR =
Color.new which is indicated (255, 255, 255, 255) coordinate revision
COM_NAME_X_PLUS in the # command character string = 0 COM_NAME_Y_PLUS
= 0 end class Window_CommandIcon < Window_Selectable
attr_accessor :last_index
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(x, y, commands)
super(x, y, 32, 32)
# ウィンドウスã‚ンã«ç©ºæ–‡å—列を指定ã—ã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’æç”»ã—ãªã„よã†ã«ã™ã‚‹
self.windowskin = RPG::Cache.windowskin("")
@item_max = commands.size
@commands = commands
@column_max = commands.size
@index = 0
@last_index = nil
@name_sprite = nil
@sprite = []
refresh
end
def dispose
super
for sprite in @sprite
sprite.dispose unless sprite.nil?
end
@name_sprite.dispose unless @name_sprite.nil?
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
@name_sprite.dispose unless @name_sprite.nil?
for sprite in @sprite
sprite.dispose unless sprite.nil?
end
@name_sprite = nil
draw_com_name if Momo_IconCommand::COM_NAME_DROW
@sprite = []
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# â— é …ç›®ã®æç”»
#--------------------------------------------------------------------------
def draw_item(index)
@sprite[index] = Sprite_Icon.new(nil, @commands[index])
@sprite[index].z = self.z + 1
end
def draw_com_name
@name_sprite = Sprite_Comm_Name.new(nil, get_com_name)
end
# æ›´æ–°
def update
super
icon_update
com_name_update if Momo_IconCommand::COM_NAME_DROW
if move_index?
@last_index = self.index
end
end
# アイコンã®æ›´æ–°
def icon_update
for i in 0...@sprite.size
@sprite.active = (self.index == i)
@sprite.x = self.x + i * 24
@sprite.y = self.y + 0
@sprite.z = (self.index == i) ? self.z + 2 : self.z + 1
@sprite.visible = self.visible
@sprite.update
end
end
# コマンドãƒãƒ¼ãƒ ã®æ›´æ–°
def com_name_update
if move_index?
@name_sprite.name = get_com_name
end
@name_sprite.x = self.x - 12 + Momo_IconCommand::COM_NAME_X_PLUS
@name_sprite.y = self.y - 40 + Momo_IconCommand::COM_NAME_Y_PLUS
@name_sprite.z = self.z + 1
@name_sprite.active = self.active
@name_sprite.visible = self.visible
@name_sprite.update
end
def get_com_name
make_name_set if @name_set.nil?
name = @name_set[self.index]
name = "" if name.nil?
return name
end
def make_name_set
@name_set = []
@name_set[0] = Momo_IconCommand::ATTACK_NAME
@name_set[1] = Momo_IconCommand::SKILL_NAME
@name_set[2] = Momo_IconCommand::GUARD_NAME
@name_set[3] = Momo_IconCommand::ITEM_NAME
end
def move_index?
return self.index != @last_index
end
def need_reset
@name_sprite.need_reset = true if Momo_IconCommand::COM_NAME_DROW
end
end
# アイコン用スプライト
class Sprite_Icon < Sprite
attr_accessor :active
attr_accessor :icon_name
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(viewport, icon_name)
super(viewport)
@icon_name = icon_name
@last_icon = @icon_name
@count = 0
@zoom_in = Momo_IconCommand::ZOOM_TYPE
self.bitmap = RPG::Cache.icon(@icon_name)
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
@active = false
end
#--------------------------------------------------------------------------
# ◠解放
#--------------------------------------------------------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
if @icon_name != @last_icon
@last_icon = @icon_name
self.bitmap = RPG::Cache.icon(@icon_name)
end
if @active
case Momo_IconCommand::SELECT_TYPE
when 0
icon_flash
when 1
icon_zoom
end
else
icon_reset
end
end
def icon_flash
if @count % Momo_IconCommand::FLASH_INTERVAL == 0 or @count == 1
self.flash(Momo_IconCommand::FLASH_COLOR, Momo_IconCommand::FLASH_DURATION)
end
@count += 1
end
# 拡大縮å°
def icon_zoom
if @zoom_in
interval1 = Momo_IconCommand::ZOOM_INTERVAL1
interval2 = Momo_IconCommand::ZOOM_INTERVAL2
zoom_max = Momo_IconCommand::ZOOM_MAX
zoom_in(zoom_max, interval1, interval2)
else
interval1 = Momo_IconCommand::ZOOM_INTERVAL3
interval2 = Momo_IconCommand::ZOOM_INTERVAL4
zoom_min = Momo_IconCommand::ZOOM_MIN
zoom_out(zoom_min, interval1, interval2)
end
@count += 1
if @count >= Interval1 + interval2 @count = 0 @zoom_in ^= true end
end # enlargement processing def zoom_in (zoom_max and interval1,
interval2) if interval1 >= @count zoom = 1.0 + (zoom_max - 1.0) & (1.0
* @count/interval1) else zoom = zoom_max - (zoom_max - 1.0) & (1.0 *
(@count - interval1)/interval2) end self.zoom_x = zoom self.zoom_y =
zoom end # reduction processing def zoom_out (zoom_min,
Interval1, interval2) If interval1 >= @count zoom = 1.0 -
(1.0 - zoom_min) & (1.0 * @count/interval1) else zoom = zoom_min +
(1.0 - zoom_min) & (1.0 * (@count - interval1)/interval2) end
self.zoom_x = zoom self.zoom_y = zoom end def icon_zoom000 case @count
when 1. 10 zoom = 1.0 + @count/10.0 when 11. 20 zoom = 2.0 - (@count -
10)/sprite class for 10.0 end self.zoom_x = zoom self.zoom_y = zoom
end def icon_reset @count = 0 self.zoom_x = 1.0 self.zoom_y = 1.0 end
end # command name Sprite_Comm_Name < Sprite
attr_accessor :active
attr_accessor :name
attr_accessor :need_reset
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize(viewport, name)
super(viewport)
@name = name
@last_name = nil
@count = 0
@x_plus = 0
@opa_plus = 0
@need_reset = false
@active = false
self.bitmap = Bitmap.new(160, 32)
end
#--------------------------------------------------------------------------
# ◠解放
#--------------------------------------------------------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
if @active
if need_reset?
@need_reset = false
@last_name = @name
text_reset
end
move_text if Momo_IconCommand::COM_NAME_MOVE
end
end
def move_text
@count += 1
@x_plus = [@count * 8, 80].min
self.x = self.x - 80 + @x_plus
self.opacity = @count * 25
end
def text_reset
@count = 0
@x_plus = 0
self.bitmap.clear
self.bitmap.font.color = Momo_IconCommand::COM_NAME_COLOR
self.bitmap.draw_text(0, 0, 160, 32, @name)
end
def need_reset?
return (@name != @last_name or @need_reset)
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# ◠プレãƒãƒˆãƒ«ãƒ•ã‚§ãƒ¼ã‚ºé–‹å§‹
#--------------------------------------------------------------------------
alias scene_battle_icon_command_start_phase1 start_phase1
def start_phase1
com1 = Momo_IconCommand::ATTACK_ICON_NAME
com2 = Momo_IconCommand::SKILL_ICON_NAME
com3 = Momo_IconCommand::GUARD_ICON_NAME
com4 = Momo_IconCommand::ITEM_ICON_NAME
@actor_command_window = Window_CommandIcon.new(0, 0, [com1, com2, com3, com4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.update
scene_battle_icon_command_start_phase1
end
#--------------------------------------------------------------------------
# ◠アクターコマンドウィンドウã®ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—
#--------------------------------------------------------------------------
alias scene_battle_icon_command_phase3_setup_command_window phase3_setup_command_window
def phase3_setup_command_window
scene_battle_icon_command_phase3_setup_command_window
# アクターコマンドウィンドウã®ä½ç½®ã‚’è¨å®š
@actor_command_window.x = command_window_actor_x(@actor_index)
@actor_command_window.y = command_window_actor_y(@actor_index)
@actor_command_window.need_reset
end
def command_window_actor_x(index)
$game_party.actors[index].screen_x + Momo_IconCommand::X_PLUS
end
def command_window_actor_y(index)
$game_party.actors[index].screen_y + Momo_IconCommand::Y_PLUS
end
end
end