-=[ Ψ † Super Pack Sistem Vampyr Script 2 Parte † Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem
Bueno amigo hoy les tengo un Pack de barios Script :
Message Balloon.txt:
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 4 Parte Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem
Bueno amigo hoy les tengo un Pack de barios Script :
Message Balloon.txt:
- Spoiler:
#==============================================================================
# Vampyr MessageBalloon
#==============================================================================
=begin
\EV[X] = Displays the balloon abobe event X
\&| = Displays the balloon above actual event
\FN[X] = Change X to the font name
\FS[X] = Change Y to the font size
\FB = Turn font bold true
\FI = Turn font italic true
\EN[X] = Change X to the id of a enemy
\CL[X] = Change X to the id of a class
\Map = Show the name of the currend map
=end
#------------------------------------------------------------------------------
class Sprite_MessageBalloon < Sprite
FONT_NAME = Font.default_name
FONT_SIZE = 16
FONT_SHADOW = false
FONT_COLOR = Color.new(0,0,0)
def initialize
super()
self.z = 999
reset
end
def reset
self.visible = false
@contents_x = 4
@contents_y = 4
@wait_count = 0
@text = ""
@width = []
@show_fast = false
@wait_input = false
@closing = false
@terminate_message = false
self.bitmap.dispose if self.bitmap != nil
self.bitmap = nil
end
def open
@character = $game_player
for i in 0...$game_message.texts.size
@text += $game_message.texts[i].clone + "\x00"
end
convert_special_characters
for i in @text.split("\x00")
@width << @text[i].getw
end
self.bitmap = Bitmap.new(@width.max+8, $game_message.texts.size*FONT_SIZE+(FONT_SIZE+8))
self.bitmap.font.name = FONT_NAME
self.bitmap.font.size = FONT_SIZE
self.bitmap.font.shadow = FONT_SHADOW
self.bitmap.font.color = FONT_COLOR
self.ox = self.bitmap.width/2
self.oy = self.bitmap.height/2
rect = self.bitmap.rect.clone
rect.height -= 16
if $game_message.position >= 2
self.bitmap.fill_rect(self.ox-4, 0, 1, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 1, 2, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 2, 3, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 3, 4, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 4, 5, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 5, 6, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 6, 7, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, 7, 8, 1, Color.new(255,255,255,192))
rect.y += 8
@contents_y += 8
else
self.bitmap.fill_rect(self.ox-4, rect.height, 8, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+1, 7, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+2, 6, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+3, 5, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+4, 4, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+5, 3, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+6, 2, 1, Color.new(255,255,255,192))
self.bitmap.fill_rect(self.ox-4, rect.height+7, 1, 1, Color.new(255,255,255,192))
end
self.bitmap.fill_rect(rect, Color.new(255,255,255,192))
self.opacity = 255
self.visible = true
$game_message.visible = true
end
def close
reset
$game_message.main_proc.call if $game_message.main_proc != nil
$game_message.clear
end
def update
super
return if $game_message.texts.empty?
if @wait_count > 0
@wait_count -= 1
elsif @terminate_message
if self.opacity > 0
self.opacity -= 10
else
close
end
$game_message.visible = false
elsif @closing
if Input.trigger?(Input::C) or Input.trigger?(Input::B)
@terminate_message = true
end
elsif @wait_input
if Input.trigger?(Input::C) or Input.trigger?(Input::B)
@wait_input = false
end
elsif Input.trigger?(Input::C)
@show_fast = true
elsif @text != ""
update_message
elsif @text == ""
open
end
return unless self.visible
self.x = @character.screen_x
if $game_message.position >= 2
self.y = @character.screen_y + (self.bitmap.height/2) + 8
else
self.y = @character.screen_y - self.bitmap.height - 8
end
end
def convert_special_characters
@text.gsub!(/\\N\[([0-9]+)\]/i) { $game_actors[$1.to_i].name }
@text.gsub!(/\\C\[([0-9]+)\]/i) { "\x01[#{$1}]" }
@text.gsub!(/\\\./) { "\x03" }
@text.gsub!(/\\\|/) { "\x04" }
@text.gsub!(/\\!/) { "\x05" }
@text.gsub!(/\\>/) { "\x06" }
@text.gsub!(/\\) { "\x07" }
@text.gsub!(/\\\^/) { "\x08" }
@text.gsub!(/\\EV\[([0-9]+)\]/i) { @character = $game_map.events[$1.to_i]; "" }
@text.gsub!(/\\D\[(\d+)\]/i) { "\x10[#{$1}]" }
@text.gsub!(/\\I\[(\d+)\]/i) { "\x11[#{$data_items[$1.to_i].icon_index}]#{$data_items[$1.to_i].name}" }
@text.gsub!(/\\W\[(\d+)\]/i) { "\x11[#{$data_weapons[$1.to_i].icon_index}]#{$data_weapons[$1.to_i].name}" }
@text.gsub!(/\\A\[(\d+)\]/i) { "\x11[#{$data_armors[$1.to_i].icon_index}]#{$data_armors[$1.to_i].name}" }
@text.gsub!(/\\S\[(\d+)\]/i) { "\x11[#{$data_skills[$1.to_i].icon_index}]#{$data_skills[$1.to_i].name}" }
@text.gsub!(/\\FN\[(.*?)\]/i) { "\x12[#{$1}]" }
@text.gsub!(/\\FS\[(.*?)\]/i) { "\x13[#{$1}]" }
@text.gsub!(/\\FB/i) { "\x14[#{$1}]" }
@text.gsub!(/\\FI/i) { "\x15[#{$1}]" }
@text.gsub!(/\\EN\[(\d+)\]/i) { $data_enemies[$1.to_i].name }
@text.gsub!(/\\CL\[(\d+)\]/i) { $data_classes[$1.to_i].name }
@text.gsub!(/\\Map/i) { $game_map.map_name }
@text.gsub!(/\\\&/i) { @character = $game_map.interpreter.self_event; "" }
@text.gsub!(/\\\\/) { "\" }
end
def update_message
return if self.bitmap == nil
return if self.bitmap.disposed?
loop do
c = @text.slice!(/./m)
case c
when nil
@wait_count = 10
@closing = true
break
when "\x00"
@contents_x = 4
@contents_y += FONT_SIZE
@line_show_fast = false
if @text.empty?
@wait_count = 10
@closing = true
break
end
when "\x01"
@text.sub!(/\[([0-9]+)\]/, "")
self.bitmap.font.color = Color.index($1.to_i)
next
when "\x03"
@wait_count = 15
break
when "\x04"
@wait_count = 60
break
when "\x05"
@wait_input = true
break
when "\x06"
@line_show_fast = true
when "\x07"
@line_show_fast = false
when "\x08"
@closing = true
@terminate_message = true
break
# when "\x09"
# @text.sub!(/\[([0-9]+)\]/, "")
# @text.sub!(/\\|/, "")
# next
when "\x10"
@text.sub!(/\[([0-9]+)\]/, "")
@text_delay = $1.to_i
when "\x11"
@text.sub!(/\[([0-9]+)\]/, "")
draw_icon($1.to_i, @contents_x, @contents_y)
@contents_x += 26
when "\x12"
@text.sub!(/\[(.*?)\]/, "")
self.bitmap.font.name = ($1.to_s != "" ? $1.to_s : FONT_NAME)
when "\x13"
@text.sub!(/\[(.*?)\]/, "")
self.bitmap.font.size = ($1.to_i > 0 ? $1.to_i : FONT_SIZE)
when "\x14"
@text.sub!(/\[(.*?)\]/, "")
self.bitmap.font.bold = !self.bitmap.font.bold
when "\x15"
@text.sub!(/\[(.*?)\]/, "")
self.bitmap.font.italic = !self.bitmap.font.italic
else
self.bitmap.draw_text(@contents_x, @contents_y, 20, FONT_SIZE, c)
@contents_x += c.getw
if @text_delay != nil
for i in 0...@text_delay-1
Graphics.update
end
end
end
break unless @show_fast or @line_show_fast
end
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
alias vampyr_balloon_message_smap_start start
def start
vampyr_balloon_message_smap_start
@message_window = Sprite_MessageBalloon.new
end
end
- Spoiler:
#==============================================================================
# Vampyr Move Event
#==============================================================================
Vampyr_Kernel.register("Vampyr Move Event", 1.0, "03/29/2010")
#------------------------------------------------------------------------------
class Game_System
attr_accessor :moved_objects
alias vampyr_move_event_gsystem_initialize initialize
def initialize
vampyr_move_event_gsystem_initialize
@moved_objects = {}
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
attr_reader :object_movable
alias vampyr_move_event_gevent_refresh refresh
def refresh
vampyr_move_event_gevent_refresh
movable = check_comment("Movable")
if movable != nil
coords = movable.split(" ")
@put_x_position = coords[0]
@put_y_position = coords[1]
@object_movable = true
@move_speed = 4
@move_frequency = 6
else
@object_movable = false
end
if $game_system.moved_objects.has_key?(@id)
coords = $game_system .moved_objects[@id]
moveto(coords[0], coords[1])
end
end
def check_coordinates(x, y)
return if @put_x_position == nil or @put_y_position == nil
return unless x == @put_x_position.to_i and y == @put_y_position.to_i
RPG::SE.new("Open3").play
$game_player.cancel_move_object
$game_system.moved_objects[@id] = [@put_x_position.to_i, @put_y_position.to_i]
$game_self_switches[[$game_map.map_id, @id, "A"]] = true
$game_map.need_refresh = true
end
end
#------------------------------------------------------------------------------
class Game_Player < Game_Character
alias vampyr_move_event_gplayer_initialize initialize
alias vampyr_move_event_gplayer_update update
alias vampyr_move_event_gplayer_dash dash?
alias vampyr_move_event_gplayer_move_by_input move_by_input
def initialize
vampyr_move_event_gplayer_initialize
@move_se_delay = 0
end
def update
vampyr_move_event_gplayer_update
update_move_event
end
def update_move_event
@move_se_delay -= 1 if @move_se_delay > 0
if @moving_object == nil
for event in $game_map.events.values
next unless event.object_movable
next unless in_front?(event)
@moving_object = event
end
elsif Input.press?(Input::C) and @moving_object != nil
@moving_object.through = true
move_object(Input.dir4)
elsif @moving_object != nil
@direction_fix = false
@moving_object.through = false
@moving_object = nil
end
end
def move_object(dir)
return if @moving_object == nil
return unless object_passable?(dir)
if @move_se_delay <= 0
RPG::SE.new("Push").play
@move_se_delay = 30
end
moving_object(dir)
@direction_fix = true
case dir
when 2; move_down unless moving?
when 4; move_left unless moving?
when 6; move_right unless moving?
when 8; move_up unless moving?
end
@moving_object.check_coordinates(@moving_object.x, @moving_object.y)
end
def moving_object(dir)
return unless object_passable?(dir)
case dir
when 2; @moving_object.move_down unless @moving_object.moving?
when 4; @moving_object.move_left unless @moving_object.moving?
when 6; @moving_object.move_right unless @moving_object.moving?
when 8; @moving_object.move_up unless @moving_object.moving?
end
end
def object_passable?(dir)
sx = 0; sy = 0; psb = true
case dir
when 2; sy += 1
when 4; sx -= 1
when 6; sx += 1
when 8; sy -= 1
end
psb = false unless map_passable?(@moving_object.x+sx, @moving_object.y+sy)
psb = false unless map_passable?(@x+sx, @y+sy)
for event in $game_map.events_xy(@moving_object.x+sx, @moving_object.y+sy)
psb = false if event != []
end
for event in $game_map.events_xy(@x+sx, @y+sy)
next if event == @moving_object
psb = false if event != []
end
return psb
end
def cancel_move_object
@direction_fix = false
@moving_object = nil
end
def dash?
return false if @moving_object
vampyr_move_event_gplayer_dash
end
def move_by_input
return if @moving_object
vampyr_move_event_gplayer_move_by_input
end
end
- Spoiler:
#==============================================================================
# Vampyr Equipment Plus
#==============================================================================
# Add on notes of the weapons: Kind = X, where X = one of the new kinds below:
# To default armors, DON'T USE this feature.
# You only can create more 5 SLOTS.
# Defaults: 0 => Weapon, 1 => Shield, 2 => Helm, 3 => Armor, 4 => Acce
PlusEquips = { 5=>"Gloves", 6=>"Boots", 7=>"Pendant", 8=>"Cape" }
#------------------------------------------------------------------------------
module RPG
class Armor
def kind
a = self.note.read("Kind", 0).to_i
b = @kind
return (a.to_i > 0 ? (a-1) : b)
end
end
end
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
attr_accessor :armor5_id
attr_accessor :armor6_id
attr_accessor :armor7_id
attr_accessor :armor8_id
attr_accessor :armor9_id
attr_accessor :armor10_id
alias vep_gactor_setup setup
def setup(actor_id)
vep_gactor_setup(actor_id)
@armor5_id = 0
@armor6_id = 0
@armor7_id = 0
@armor8_id = 0
@armor9_id = 0
@armor10_id = 0
end
def armors
result = []
unless two_swords_style
result.push($data_armors[@armor1_id])
end
result.push($data_armors[@armor2_id])
result.push($data_armors[@armor3_id])
result.push($data_armors[@armor4_id])
result.push($data_armors[@armor5_id])
result.push($data_armors[@armor6_id])
result.push($data_armors[@armor7_id])
result.push($data_armors[@armor8_id])
result.push($data_armors[@armor9_id])
result.push($data_armors[@armor10_id])
return result
end
def change_equip(equip_type, item, test = false)
last_item = equips[equip_type]
unless test
return if $game_party.item_number(item) == 0 if item != nil
$game_party.gain_item(last_item, 1)
$game_party.lose_item(item, 1)
end
item_id = item == nil ? 0 : item.id
case equip_type
when 0
@weapon_id = item_id
unless two_hands_legal?
change_equip(1, nil, test)
end
when 1
@armor1_id = item_id
unless two_hands_legal?
change_equip(0, nil, test)
end
when 2; @armor2_id = item_id
when 3; @armor3_id = item_id
when 4; @armor4_id = item_id
when 5; @armor5_id = item_id
when 6; @armor6_id = item_id
when 7; @armor7_id = item_id
when 8; @armor8_id = item_id
when 9; @armor9_id = item_id
when 10; @armor10_id = item_id
end
end
def discard_equip(item)
if item.is_a?(RPG::Weapon)
if @weapon_id == item.id
@weapon_id = 0
elsif two_swords_style and @armor1_id == item.id
@armor1_id = 0
end
elsif item.is_a?(RPG::Armor)
if not two_swords_style and @armor1_id == item.id
@armor1_id = 0
elsif @armor2_id == item.id; @armor2_id = 0
elsif @armor3_id == item.id; @armor3_id = 0
elsif @armor4_id == item.id; @armor4_id = 0
elsif @armor5_id == item.id; @armor5_id = 0
elsif @armor6_id == item.id; @armor6_id = 0
elsif @armor7_id == item.id; @armor7_id = 0
elsif @armor8_id == item.id; @armor8_id = 0
elsif @armor9_id == item.id; @armor9_id = 0
elsif @armor10_id == item.id; @armor10_id = 0
end
end
end
end
#------------------------------------------------------------------------------
class Window_Status < Window_Base
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 128, 0)
draw_actor_face(@actor, 8, 32)
draw_basic_info(128, 32)
draw_parameters(32, 160)
draw_exp_info(288, 32)
draw_equipments(288, 128)
end
def draw_equipments(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
for i in 0..(5+PlusEquips.size)
draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1))
end
end
end
#------------------------------------------------------------------------------
class Window_Equip < Window_Selectable
def initialize(x, y, actor)
super(x, y, 336, WLH * 8 + 32)
@actor = actor
@item_max = (5+PlusEquips.size)
refresh
self.index = 0
end
def refresh
self.contents.clear
@data = []
for item in @actor.equips do @data.push(item) end
@item_max = (5+PlusEquips.size)
create_contents
self.contents.font.color = system_color
if @actor.two_swords_style
self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon1)
self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab::weapon2)
else
self.contents.draw_text(4, WLH * 0, 92, WLH, Vocab::weapon)
self.contents.draw_text(4, WLH * 1, 92, WLH, Vocab::armor1)
end
self.contents.draw_text(4, WLH * 2, 92, WLH, Vocab::armor2)
self.contents.draw_text(4, WLH * 3, 92, WLH, Vocab::armor3)
self.contents.draw_text(4, WLH * 4, 92, WLH, Vocab::armor4)
PlusEquips.each { |k, v| self.contents.draw_text(4, WLH * k, 92, WLH, v) }
for i in 0...@data.size
draw_item_name(@data[i], 92, WLH * i)
end
end
end
#------------------------------------------------------------------------------
class Window_EquipStatus < Window_Base
alias vpe_wequipstatus_refresh refresh
def initialize(x, y, actor)
super(x, y, 208, WLH * 8 + 32)
@actor = actor
refresh
end
def refresh
vpe_wequipstatus_refresh
draw_parameter(0, WLH * 5, 4)
draw_parameter(0, WLH * 6, 5)
draw_parameter(0, WLH * 7, 6)
end
def set_new_parameters(new_atk, new_def, new_spi, new_agi, new_hit, new_eva, new_cri)
if @new_atk != new_atk or @new_def != new_def or @new_spi != new_spi or
@new_agi != new_agi or @new_hit != new_hit or @new_eva != new_eva or
@new_cri != new_cri
@new_atk = new_atk
@new_def = new_def
@new_spi = new_spi
@new_agi = new_agi
@new_hit = new_hit
@new_eva = new_eva
@new_cri = new_cri
refresh
end
end
def draw_parameter(x, y, type)
case type
when 0
name = Vocab::atk
value = @actor.atk
new_value = @new_atk
when 1
name = Vocab::def
value = @actor.def
new_value = @new_def
when 2
name = Vocab::spi
value = @actor.spi
new_value = @new_spi
when 3
name = Vocab::agi
value = @actor.agi
new_value = @new_agi
when 4
name = "Hit"
value = @actor.hit
new_value = @new_hit
when 5
name = "Evasion"
value = @actor.eva
new_value = @new_eva
when 6
name = "Critical"
value = @actor.cri
new_value = @new_cri
end
self.contents.font.color = system_color
self.contents.draw_text(x + 4, y, 80, WLH, name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 90, y, 30, WLH, value, 2)
self.contents.font.color = system_color
self.contents.draw_text(x + 122, y, 20, WLH, ">", 1)
if new_value != nil
self.contents.font.color = new_parameter_color(value, new_value)
self.contents.draw_text(x + 142, y, 30, WLH, new_value, 2)
end
end
end
#------------------------------------------------------------------------------
class Scene_Equip < Scene_Base
def create_item_windows
@item_windows = []
for i in 0...(EQUIP_TYPE_MAX+PlusEquips.size)
@item_windows[i] = Window_EquipItem.new(0, 280, 544, 136, @actor, i)
@item_windows[i].help_window = @help_window
@item_windows[i].visible = (@equip_index == i)
@item_windows[i].active = false
@item_windows[i].index = -1
end
end
def update_item_windows
for i in 0...(EQUIP_TYPE_MAX+PlusEquips.size)
@item_windows[i].visible = (@equip_window.index == i)
@item_windows[i].update
end
@item_window = @item_windows[@equip_window.index]
end
def update_status_window
if @equip_window.active
@status_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil)
elsif @item_window.active
temp_actor = @actor.clone
temp_actor.change_equip(@equip_window.index, @item_window.item, true)
new_atk = temp_actor.atk
new_def = temp_actor.def
new_spi = temp_actor.spi
new_agi = temp_actor.agi
new_hit = temp_actor.hit
new_eva = temp_actor.eva
new_cri = temp_actor.cri
@status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi, new_hit, new_eva, new_cri)
end
@status_window.update
end
end
- Spoiler:
#==============================================================================
# Vampyr Radio
#==============================================================================
Duration = {}
Duration["Unleashed"] = "00:16"
Duration["Kingdom of Heaven"] = "00:16"
Duration["Martyr of the Free Word"] = "00:16"
Station = {}
Station["NAME"] = ["Kingdom of Heaven", "Martyr of the Free Word", "Unleashed"]
#------------------------------------------------------------------------------
class Radio
attr_reader :music_delay
def initialize
@music_delay = 0
@repeat = false
end
def play_station(station)
RPG::BGM.stop
selection = rand(Station[station].size)
music = Station[station][selection]
RPG::BGM.new(music, 100).play
h = Duration[music].split(":")[0].to_i*60*60
m = Duration[music].split(":")[1].to_i*60
@station = station
@music = nil
@music_delay = h+m-30
end
def play_music(music, repeat=false)
RPG::BGM.new(music, 100).play
h = Duration[music].split(":")[0].to_i*60*60
m = Duration[music].split(":")[1].to_i*60
@repeat = repeat
@music = music
@station = nil
@music_delay = h+m-30
end
def update
if @music_delay > 0
@music_delay -= 1
else
play_station(@station) if @station != nil
play_music(@music, @repeat) if @repeat
end
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
alias old_update update
def update
old_update
$radio.update
end
end
$radio = Radio.new
- Spoiler:
#==============================================================================
# Vampyr Relic Window
#==============================================================================
# To Create an relic, put on the notes of item, the comment: Relic
# To call the scene, use: $scene = Scene_Relic.new
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Relic", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Window_Item < Window_Selectable
def initialize(x, y, width, height, relic=false)
@relic = relic
super(x, y, width, height)
@column_max = 2
self.index = 0
refresh
end
def item
return @data[self.index]
end
def include?(item)
return false if item == nil
if $game_temp.in_battle
return false unless item.is_a?(RPG::Item)
end
return true
end
def enable?(item)
return $game_party.item_can_use?(item)
end
def refresh
@data = []
for item in $game_party.items
next unless include?(item)
if @relic
next unless item.note.include?("Relic")
else
next if item.note.include?("Relic")
end
@data.push(item)
if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
self.index = @data.size - 1
end
end
@data.push(nil) if include?(nil)
@item_max = @data.size
create_contents
for i in 0...@item_max
draw_item(i)
end
end
def draw_item(index)
rect = item_rect(index)
self.contents.clear_rect(rect)
item = @data[index]
if item != nil
number = $game_party.item_number(item)
enabled = enable?(item)
rect.width -= 4
draw_item_name(item, rect.x, rect.y, enabled)
self.contents.draw_text(rect, sprintf(":%2d", number), 2) unless @relic
end
end
def update_help
@help_window.set_text(item == nil ? "" : item.description)
end
end
#------------------------------------------------------------------------------
class Scene_Relic < Scene_Base
def start
super
create_cbmenu_bg
@help_window = Window_Help.new
@relic_window = Window_Item.new(0, 56, 544, 360, true)
@relic_window.help_window = @help_window
end
def terminate
super
dispose_cbmenu_bg
@help_window.dispose
@relic_window.dispose
end
def update
super
update_cbmenu_bg
@help_window.update
@relic_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Menu.new(3)
end
end
end
- Spoiler:
#==============================================================================
# Vampyr Shadow
#==============================================================================
# Shadow Source - Makes event be a font of light
# Shadow Point - Add Shadow to event
# Angle Min - Sets the min angle for show shadow (Optional)
# Angle Max - Sets the max angle for show shadow (Optional)
# Distance Max - Sets the distance (in tiles) to show shadow (Optional)
#------------------------------------------------------------------------------
if Vampyr_Kernel.enabled?("Vampyr Character Core")
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Shadow", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Temp
attr_accessor :shadow_spriteset
end
#------------------------------------------------------------------------------
class Game_Map
alias vampyr_shadow_refresh refresh
def refresh
vampyr_shadow_refresh
$scene.refresh_shadows if $scene.is_a?(Scene_Map)
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
attr_reader :shadow_source
attr_reader :show_shadow
attr_reader :anglemin
attr_reader :anglemax
attr_reader :distance_max
alias vampyr_shadow_gevent_refresh refresh
def refresh
vampyr_shadow_gevent_refresh
@shadow_source = check_command("Shadow Source")
@show_shadow = check_command("Shadow Point")
@anglemin = check_value("Angle Min")
@anglemax = check_value("Angle Max")
@distance_max = check_value("Distance Max")
end
end
#------------------------------------------------------------------------------
class Sprite_Shadow < Sprite_Base
attr_accessor :character
def initialize(viewport, character = nil, id = 0)
super(viewport)
@source = $game_temp.shadow_spriteset.shadows[id]
@anglemin = @source.anglemin
@anglemax = @source.anglemin
@self_opacity = 100
@distancemax = (@source.distance_max > 0 ? (@source.distance_max*32) : (5*32))
@character = character
update
end
def update
super
update_bitmap
self.visible = (!@character.transparent and in_range?(@character, @source, @distancemax))
update_src_rect
self.x = @character.screen_x
self.y = @character.screen_y-5
self.z = @character.screen_z-1
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
@deltax = @source.screen_x - self.x
@deltay = @source.screen_y - self.y
@distance = ((@deltax ** 2) + (@deltay ** 2))
self.color = Color.new(0,0,0)
self.opacity = @self_opacity*13000/((@distance*370/@distancemax)+6000)
self.angle = 57.3 * Math.atan2(@deltax, @deltay)
@angle_trigo = self.angle + 90
@angle_trigo = (360 + @angle_trigo) if @angle_trigo < 0
if @anglemin != 0 or @anglemax != 0
if (@angle_trigo < @anglemin or @angle_trigo > @anglemax) and @anglemin < @anglemax
self.opacity = 0
return
end
if (@angle_trigo < @anglemin and @angle_trigo > @anglemax) and @anglemin > @anglemax
self.opacity = 0
return
end
end
end
def update_bitmap
if @tile_id != @character.tile_id or
@character_name != @character.character_name or
@character_index != @character.character_index
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_index = @character.character_index
if @tile_id > 0
sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32
sy = @tile_id % 256 / 8 % 16 * 32
self.bitmap = tileset_bitmap(@tile_id)
self.src_rect.set(sx, sy, 32, 32)
self.ox = 16
self.oy = 32
else
self.bitmap = Cache.character(@character_name)
sign = @character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
@cw = bitmap.width / 3
@ch = bitmap.height / 4
else
@cw = bitmap.width / 12
@ch = bitmap.height / 8
end
self.ox = @cw / 2
self.oy = @ch
end
end
end
def update_src_rect
if @tile_id == 0
index = @character.character_index
pattern = @character.pattern < 3 ? @character.pattern : 1
sx = (index % 4 * 3 + pattern) * @cw
sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
end
def in_range?(parent, target, range)
x = (parent.screen_x - target.screen_x) * (parent.screen_x - target.screen_x)
y = (parent.screen_y - target.screen_y) * (parent.screen_y - target.screen_y)
r = x + y
return true if r <= (range * range)
return false
end
end
#------------------------------------------------------------------------------
class Spriteset_Map
attr_accessor :shadows
alias initialize_original initialize
alias create_viewports_original create_viewports
alias update_viewports_original update_viewports
alias update_tilemap_original update_tilemap
alias dispose_tilemap_original dispose_tilemap
alias create_characters_original create_characters
alias update_characters_original update_characters
alias dispose_characters_original dispose_characters
def initialize
$game_temp.shadow_spriteset = self
initialize_original
end
def create_viewports
create_viewports_original
@viewport1.z = 1
@viewport0 = Viewport.new(0, 0, Graphics.width, Graphics.height)
end
def update_viewports
update_viewports_original
@viewport0.ox = $game_map.screen.shake
@viewport0.update
end
def create_parallax
@parallax = Plane.new(@viewport0)
@parallax.z = -100
end
def create_tilemap
@tilemap = Tilemap.new(@viewport0)
@tilemap.bitmaps[0] = Cache.system("TileA1")
@tilemap.bitmaps[1] = Cache.system("TileA2")
@tilemap.bitmaps[4] = Cache.system("TileA5")
@tilemap.map_data = $game_map.data
@tilemap.passages = $game_map.passages
@tilemap1 = Tilemap.new(@viewport1)
@tilemap1.bitmaps[2] = Cache.system("TileA3")
@tilemap1.bitmaps[3] = Cache.system("TileA4")
@tilemap1.bitmaps[5] = Cache.system("TileB")
@tilemap1.bitmaps[6] = Cache.system("TileC")
@tilemap1.bitmaps[7] = Cache.system("TileD")
@tilemap1.bitmaps[8] = Cache.system("TileE")
@tilemap1.map_data = $game_map.data
@tilemap1.passages = $game_map.passages
end
def update_tilemap
update_tilemap_original
@tilemap1.ox = $game_map.display_x / 8
@tilemap1.oy = $game_map.display_y / 8
@tilemap1.update
end
def dispose_tilemap
dispose_tilemap_original
@tilemap1.dispose
end
def create_characters
create_characters_original
create_shadows
end
def update_characters
update_characters_original
for shadow in @shadow_sprites.compact
next unless $game_map.in_range?(shadow.character)
shadow.update
end
end
def dispose_characters
dispose_characters_original
@shadow_sprites.compact.each { |i| i.dispose }
end
def create_shadows
@shadows = []
@shadow_sprites = []
for event in $game_map.events.values
next unless event.shadow_source
@shadows << event
end
for i in 0...@shadows.size
@shadow_sprites.push(Sprite_Shadow.new(@viewport0, $game_player, i))
for event in $game_map.events.values
next unless event.show_shadow
@shadow_sprites.push(Sprite_Shadow.new(@viewport0, event, i))
end
if Vampyr_Kernel.enabled?("Vampyr SBABS")
for ally in $game_allies.compact
@shadow_sprites.push(Sprite_Shadow.new(@viewport0, ally, i))
end
for monster in $game_monsters.compact
@shadow_sprites.push(Sprite_Shadow.new(@viewport0, monster, i))
end
end
end
end
def refresh_shadows
@shadow_sprites.compact.each { |i| i.dispose }
create_shadows
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
def refresh_shadows
return if @spriteset == nil
@spriteset.refresh_shadows
end
end
#------------------------------------------------------------------------------
end
- Spoiler:
#==============================================================================
# Vampyr Transformations
#==============================================================================
Vampyr_Kernel.register("Vampyr Transformations", 1.1, "01/28/2009")
#------------------------------------------------------------------------------
# Putting command: Requires Bat in a skill, that skill will be usable only if you
# are transformed into a bat. the same is valid for wolf, putting command: Requires Wolf
Transform_Animation_id = 82 # Animation showed when transform
Use_Particle = false # Use Particle Engine?
#------------------------------------------------------------------------------
Wolf_Button = Keys::Y # Key used to transformation into wolf
Wolf_Switch = 0 # ID of item necessary to allows transformation into wolf
Wolf_Item = 0 # ID of item necessary to allows transformation into wolf
Wolf_Graphic = ["Animal", 6] # Character Sprite and Index of wolf
Wolf_Attack_Animation = 1 # Animation displayed when wolf attacks
#------------------------------------------------------------------------------
Bat_Button = Keys::U # Key used to transform into bat
Bat_Switch = 0 # Switched that need be activated to allows transformation into bat
Bat_Item = 0 # ID of item necessary to allows transformation into bat
Bat_Graphic = ["!$Bat", 0] # Character Sprite and Index of bat
Bat_Attack_Animation = 1 # Animation displayed when bat attacks
#------------------------------------------------------------------------------
Mist_Button = Keys::I # Key used to transformation into mist
Mist_Switch = 0 # ID of item necessary to allows transformation into mist
Mist_Item = 0 # ID of item necessary to allows transformation into mist
Mist_Graphic = ["!Other2", 4] # Character Sprite and Index of mist
#------------------------------------------------------------------------------
Mouse_Button = Keys::O # Key used to transformation into mouse
Mouse_Switch = 0 # ID of item necessary to allows transformation into mouse
Mouse_Item = 0 # ID of item necessary to allows transformation into mouse
Mouse_Graphic = ["!$Mouse", 0] # Character Sprite and Index of mouse
Mouse_Attack_Animation = 1 # Animation displayed when mouse attacks
#------------------------------------------------------------------------------
Creature_Button = Keys: # Key used to transformation into monster
Creature_Switch = 0 # ID of item necessary to allows transformation into monster
Creature_Item = 0 # ID of item necessary to allows transformation into monster
Creature_Graphic = ["Monster", 7] # Character Sprite and Index of monster
Creature_Attack_Animation = 1 # Animation displayed when monster attacks
#==============================================================================
class Game_Player < Game_Character
attr_reader :bat_form
attr_reader :wolf_form
attr_reader :mist_form
attr_reader :mouse_form
attr_reader :creature_form
alias vampyr_transformations_initialize initialize
alias vampyr_transformations_update update
alias vampyr_transformations_dash dash?
def initialize
vampyr_transformations_initialize
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end
def update
vampyr_transformations_update
update_transformations
update_mp_consumation
end
def update_transformations
return if $game_map.interpreter.running?
if Use_Particle and @mist_form
$game_map.interpreter.add_effect(1, $scene.ap("energy-ball-white", self, 1, 0, "LittleSmoke"))
end
if Input.trigger?(Bat_Button)
return if $game_party.members[0].mp <= 0
return if Bat_Switch > 0 and !$game_switches[Bat_Switch]
return if Bat_Item > 0 and !$game_party.has_item?($data_items[Bat_Item])
if @bat_form
untransform
else
transform_into_bat
end
elsif Input.trigger?(Wolf_Button)
return if $game_party.members[0].mp <= 0
return if Wolf_Switch > 0 and !$game_switches[Wolf_Switch]
return if Wolf_Item > 0 and !$game_party.has_item?($data_items[Wolf_Item])
if @wolf_form
untransform
else
transform_into_wolf
end
elsif Input.trigger?(Mist_Button)
return if $game_party.members[0].mp <= 0
return if Mist_Switch > 0 and !$game_switches[Mist_Switch]
return if Mist_Item > 0 and !$game_party.has_item?($data_items[Mist_Item])
if @mist_form
untransform
else
transform_into_mist
end
elsif Input.trigger?(Mouse_Button)
return if $game_party.members[0].mp <= 0
return if Mouse_Switch > 0 and !$game_switches[Mouse_Switch]
return if Mouse_Item > 0 and !$game_party.has_item?($data_items[Mouse_Item])
if @mouse_form
untransform
else
transform_into_mouse
end
elsif Input.trigger?(Creature_Button)
return if $game_party.members[0].mp <= 0
return if Creature_Switch > 0 and !$game_switches[Creature_Switch]
return if Creature_Item > 0 and !$game_party.has_item?($data_items[Creature_Item])
if @creature_form
untransform
else
transform_into_creature
end
end
end
def transform_into_wolf
return unless $game_map.passable?(@x, @y)
@character_name = Wolf_Graphic[0]
@character_index = Wolf_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-green", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = true
@mist_form = false
@mouse_form = false
@creature_form = false
end
def transform_into_bat
@character_name = Bat_Graphic[0]
@character_index = Bat_Graphic[1]
@move_speed = 4
@always_on_top = true
@step_anime = true
@through = true
@priority_type = 2
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-green", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
if !@bat_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-red", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = true
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end
def transform_into_mist
@character_name = Mist_Graphic[0]
@character_index = Mist_Graphic[1]
@move_speed = 3
@always_on_top = true
@step_anime = true
@through = true
@priority_type = 2
if !@mist_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-blue", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = true
@mouse_form = false
@creature_form = false
end
def transform_into_mouse
return unless $game_map.passable?(@x, @y)
@character_name = Mouse_Graphic[0]
@character_index = Mouse_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-purple", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = true
@creature_form = false
end
def transform_into_creature
return unless $game_map.passable?(@x, @y)
@character_name = Creature_Graphic[0]
@character_index = Creature_Graphic[1]
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if !@wolf_form
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-red", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = true
end
def untransform
return unless $game_map.passable?(@x, @y)
@character_name = $data_actors[$game_party.members[0].id].character_name
@character_index = $data_actors[$game_party.members[0].id].character_index
@move_speed = 4
@always_on_top = false
@step_anime = false
@through = false
@priority_type = 1
if transformed?
if Use_Particle
RPG::SE.new("Magic", 80).play
$game_map.interpreter.add_effect(1, $scene.ap("fireball-purple", self, 1, 24, "MediumFire"))
else
@animation_id = Transform_Animation_id
end
end
@bat_form = false
@wolf_form = false
@mist_form = false
@mouse_form = false
@creature_form = false
end
def update_mp_consumation
return unless transformed?
if Graphics.frame_count % 60 <= 0 and $game_party.members[0].mp > 0
$game_party.members[0].mp -= 1
elsif $game_party.members[0].mp <= 0
if $game_map.passable?(@x, @y)
untransform
elsif Vampyr_Kernel.enabled?("Vampyr Horror")
$game_party.members[0].blood -= 1 if Graphics.frame_count % 60 <= 0
else
$game_party.members[0].hp -= 1 if Graphics.frame_count % 60 <= 0
end
end
end
def transformed?
return true if @bat_form
return true if @wolf_form
return true if @mist_form
return true if @mouse_form
return true if @creature_form
return false
end
def dash?
return false unless @wolf_form or @mouse_form
vampyr_transformations_dash
end
end
#==============================================================================
if Vampyr_Kernel.enabled?("Vampyr SBABS")
#------------------------------------------------------------------------------
module RPG
class BaseItem
def requires_bat?
self.note.each_line { |line| return true if line.include?("Requires Bat") }
return false
end
def requires_wolf?
self.note.each_line { |line| return true if line.include?("Requires Wolf") }
return false
end
def requires_mist?
self.note.each_line { |line| return true if line.include?("Requires Mist") }
return false
end
def requires_mouse?
self.note.each_line { |line| return true if line.include?("Requires Mouse") }
return false
end
def requires_creature?
self.note.each_line { |line| return true if line.include?("Requires Creature") }
return false
end
def requires_something?
return true if requires_bat?
return true if requires_wolf?
return true if requires_mist?
return true if requires_mouse?
return true if requires_creature?
return false
end
end
end
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
alias vampyr_transformations_atk_animation_id atk_animation_id
alias vampyr_transformations_atk_animation_id2 atk_animation_id2
def atk_animation_id
if @piece.is_a?(Game_Player)
if @piece.bat_form
return Bat_Attack_Animation
elsif @piece.wolf_form
return Wolf_Attack_Animation
elsif @piece.mouse_form
return Mouse_Attack_Animation
elsif @piece.creature_form
return Creature_Attack_Animation
end
end
vampyr_transformations_atk_animation_id
end
def atk_animation_id2
if @piece.is_a?(Game_Player)
if @piece.bat_form
return Bat_Attack_Animation
elsif @piece.wolf_form
return Wolf_Attack_Animation
elsif @piece.mouse_form
return Mouse_Attack_Animation
elsif @piece.creature_form
return Creature_Attack_Animation
end
end
vampyr_transformations_atk_animation_id2
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
alias vampyr_transformations_gevent_attack_normal attack_normal
alias vampyr_transformations_gevent_skill_attack_normal skill_attack_normal
def attack_normal
return if in_front?(self, $game_player) and $game_player.mist_form
vampyr_transformations_gevent_attack_normal
end
def skill_attack_normal
return if in_front?(self, $game_player) and $game_player.mist_form
vampyr_transformations_gevent_skill_attack_normal
end
end
#------------------------------------------------------------------------------
class Game_Player < Game_Character
alias vampyr_transformations_normal_attack_right normal_attack_right
alias vampyr_transformations_range_attack_right range_attack_right
alias vampyr_transformations_normal_attack_left normal_attack_left
alias vampyr_transformations_range_attack_left range_attack_left
alias vampyr_transformations_skill_attack_normal skill_attack_normal
alias vampyr_transformations_skill_attack_range skill_attack_range
alias vampyr_transformations_skill_attack_all skill_attack_all
alias vampyr_transformations_skill_explode_range skill_explode_range
alias vampyr_transformations_skill_recover skill_recover
alias vampyr_transformations_attack_with_item attack_with_item
def normal_attack_right
return if @mist_form
vampyr_transformations_normal_attack_right
end
def range_attack_right
return if transformed?
vampyr_transformations_range_attack_right
end
def normal_attack_left
return if @mist_form
vampyr_transformations_normal_attack_left
end
def range_attack_left
return if transformed?
vampyr_transformations_range_attack_left
end
def skill_attack_normal
return unless requires_transformation?
vampyr_transformations_skill_attack_normal
end
def skill_attack_range
return unless requires_transformation?
vampyr_transformations_skill_attack_range
end
def skill_attack_all
return unless requires_transformation?
vampyr_transformations_skill_attack_all
end
def skill_explode_range
return unless requires_transformation?
vampyr_transformations_skill_explode_range
end
def skill_recover
return unless requires_transformation?
vampyr_transformations_skill_recover
end
def attack_with_item
return if transformed?
vampyr_transformations_attack_with_item
end
def requires_transformation?
return true if @assigned_skill.requires_bat? and @bat_form
return true if @assigned_skill.requires_wolf? and @wolf_form
return true if @assigned_skill.requires_mist? and @mist_form
return true if @assigned_skill.requires_mouse? and @mouse_form
return true if @assigned_skill.requires_creature? and @creature_form
return true unless @assigned_skill.requires_something?
return false
end
end
#------------------------------------------------------------------------------
class Game_Range < Game_Character
alias vampyr_transformations_grange_hurt_hero_skill hurt_hero_skill
alias vampyr_transformations_grange_hurt_hero_skill_explode hurt_hero_skill_explode
def hurt_hero_skill(hero)
return if hero.is_a?(Game_Player) and $game_player.mist_form
vampyr_transformations_grange_hurt_hero_skill(hero)
end
def hurt_hero_skill_explode
return if $game_player.mist_form
vampyr_transformations_grange_hurt_hero_skill_explode
end
end
#------------------------------------------------------------------------------
class Sprite_Weapon < Sprite_Base
alias vampyr_transformations_update update
def update
if @character.is_a?(Game_Player) and @character.transformed?
self.visible = false
return
end
vampyr_transformations_update
end
end
#------------------------------------------------------------------------------
class Sprite_Shield < Sprite_Base
alias vampyr_transformations_update update
def update
if @character.is_a?(Game_Player) and @character.transformed?
self.visible = false
return
end
vampyr_transformations_update
end
end
#------------------------------------------------------------------------------
end
- Spoiler:
#==============================================================================
# Vampyr Warning Window
#==============================================================================
# Call: Warning("text)
# tag \n (to jump line) is available
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Warning", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Interpreter
def Warning(message, delay=300)
$scene = Scene_VampyrWarning.new(message, delay)
end
end
#------------------------------------------------------------------------------
class Window_VampyrWarning < Window_Base
def initialize(message)
@message = message.split("\n")
super(0, 0, Graphics.width, (WLH*@message.size)+32)
self.y = ((Graphics.height-self.height)/2)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
for i in 0...@message.size
self.contents.font.color = Color.new(0, 0, 0)
self.contents.font.shadow = false
self.contents.draw_text(0, WLH*i, contents.width, WLH, @message[i], 1)
self.contents.draw_text(2, WLH*i, contents.width, WLH, @message[i], 1)
self.contents.draw_text(0, 2+WLH*i, contents.width, WLH, @message[i], 1)
self.contents.draw_text(2, 2+WLH*i, contents.width, WLH, @message[i], 1)
self.contents.font.color = normal_color
self.contents.draw_text(1, 1+WLH*i, contents.width, WLH, @message[i], 1)
end
end
end
#------------------------------------------------------------------------------
class Scene_VampyrWarning < Scene_Base
def initialize(message, delay=300)
$game_temp.next_scene = "warning"
@message = message
@delay = delay
end
def start
super
create_menu_background
@warning_window = Window_VampyrWarning.new(@message)
end
def update
super
update_menu_background
if @delay > 0
@delay -= 1
elsif @delay <= 0
$scene = Scene_Map.new
end
end
def terminate
super
dispose_menu_background
@warning_window.dispose
end
end
- Spoiler:
#==============================================================================
# Vampyr Windows Lights
#==============================================================================
Vampyr_Kernel.register("Vampyr Windows Lights", 1.0, "03/23/2010")
#------------------------------------------------------------------------------
Window_Lights = {}
# Tile ID X Y W H COLOR TYPE
Window_Lights[272] = [9, 23, 14, 64, Color.new(255,255,225,96)]
Window_Lights[273] = [7, 24, 18, 64, Color.new(255,255,225,96)]
Window_Lights[275] = [9, 23, 16, 64, Color.new(255,255,225,96)]
Window_Lights[288] = [7, 19, 18, 64, Color.new(255,255,225,96), "arch"]
Window_Lights[289] = [11, 19, 10, 64, Color.new(255,255,225,96)]
Window_Lights[291] = [7, 19, 18, 64, Color.new(200,255,230,96), "arch"]
Window_Lights[292] = [7, 19, 18, 64, Color.new(255,255,225,96), "arch"]
Window_Lights[293] = [7, 23, 18, 64, Color.new(255,255,225,96)]
Window_Lights[294] = [7, 23, 18, 64, Color.new(255,255,225,96)]
Window_Lights[295] = [7, 23, 18, 64, Color.new(255,255,225,96)]
#------------------------------------------------------------------------------
class Game_Map
def window(x, y)
return @map.data[x, y, 2]
end
end
#------------------------------------------------------------------------------
class Game_Player < Game_Character
alias vampyr_windowslights_gplayer_update update
def update
vampyr_windowslights_gplayer_update
if Input.trigger?(Input::F5) and $TEST
print $game_map.window(@x, @y)
end
end
end
#------------------------------------------------------------------------------
class Sprite_Window < Sprite
def initialize(viewport, x, y, id)
super(viewport)
@w = Window_Lights[id]
@x = x
@y = y
self.bitmap = Bitmap.new(@w[2], @w[3])
c = Color.new(@w[4].red, @w[4].green, @w[4].blue, 0)
if @w[5] == "arch"
self.bitmap.fill_rect(0, 5, 1, 1, @w[4])
self.bitmap.fill_rect(1, 3, 1, 3, @w[4])
self.bitmap.fill_rect(2, 2, 1, 4, @w[4])
self.bitmap.fill_rect(3, 1, 1, 5, @w[4])
self.bitmap.fill_rect(4, 1, 1, 5, @w[4])
for i in 5...(@w[2]-5)
self.bitmap.fill_rect(i, 0, 1, 6, @w[4])
end
self.bitmap.fill_rect(@w[2]-5, 1, 1, 5, @w[4])
self.bitmap.fill_rect(@w[2]-4, 1, 1, 5, @w[4])
self.bitmap.fill_rect(@w[2]-3, 2, 1, 4, @w[4])
self.bitmap.fill_rect(@w[2]-2, 3, 1, 3, @w[4])
self.bitmap.fill_rect(@w[2]-1, 5, 1, 1, @w[4])
rect = Rect.new(0, 5, @w[2], @w[3]+5)
self.bitmap.gradient_fill_rect(rect, @w[4], c, true)
else
self.bitmap.gradient_fill_rect(self.bitmap.rect, @w[4], c, true)
end
update
end
def update
super
self.x = (((@x%$game_map.width)*256) - $game_map.display_x) / 8 + @w[0]
self.y = (((@y%$game_map.height)*256) - $game_map.display_y) / 8 + @w[1]
end
end
#------------------------------------------------------------------------------
class Spriteset_Map
alias vampyr_windowslights_spmap_initialize initialize
alias vampyr_windowslights_spmap_update update
alias vampyr_windowslights_spmap_dispose dispose
def initialize
create_windows_lights
vampyr_windowslights_spmap_initialize
end
def update
vampyr_windowslights_spmap_update
update_windows_lights
end
def dispose
vampyr_windowslights_spmap_dispose
dispose_windows_lights
end
def create_windows_lights
@windows_sprites = []
@viewport4 = Viewport.new(0, 0, 544, 416)
@viewport4.z = 101
for x in 0...$game_map.width
for y in 0...$game_map.height
next unless Window_Lights.has_key?($game_map.window(x, y))
@windows_sprites << Sprite_Window.new(@viewport4, x, y, $game_map.window(x, y))
end
end
end
def update_windows_lights
@windows_sprites.compact.each { |i| i.update }
@viewport4.ox = $game_map.screen.shake
@viewport4.color.set(0, 0, 0, 255 - $game_map.screen.brightness)
end
def dispose_windows_lights
@windows_sprites.compact.each { |i| i.dispose }
@viewport4.dispose
end
end
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 4 Parte Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem