-=[ Ψ † Super Pack Sistem Vampyr Script † Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem
Bueno amigo hoy les tengo un Pack de barios Script :
Bestiary.txt :
Castlevania ABS.txt:
Character Core.txt:
Cisto Horologium.txt:
Custom Vehicles.txt:
Fog.txt:
Global Self Switches.txt:
Item Event.txt:
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 1 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 :
Bestiary.txt :
- Spoiler:
#==============================================================================
# Vampyr Bewstiary
#==============================================================================
Vampyr_Kernel.register("Vampyr Bestiary", 1.1, "11/30/2009")
#------------------------------------------------------------------------------
# Show all enemies? (true = yes / false = no)
Show_All = false
# Show Character Sprotes of enemies?
Show_Chars = true
# ID's of Enemies that will not appear in bestiary:
Dont_Appear = []
# Attributes Icons:
Attribute_Icons = [1, 131, 4, 132, 16, 12, 115, 130, 104, 105, 106, 107, 108, 109, 110, 111]
#------------------------------------------------------------------------------
class Window_VampyrBestiaryMenu < Window_Selectable
def initialize
super(0, 0, 128, 416)
@index = 0
refresh
end
def refresh
@data = []
self.contents.clear
for i in $data_enemies
next if Dont_Appear.include?(i.id)
@data << i
end
@data.compact!
@item_max = @data.size
create_contents
for i in 0...@item_max
draw_item(i)
end
end
def enemy
return @data[@index]
end
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 4
self.contents.clear_rect(rect)
i = @data[index]
return if i.nil?
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
if $game_system.enemy_defeated[i.id] >= 1 or Show_All
self.contents.draw_text(rect, "#{i.name}")
else
self.contents.draw_text(rect, "?????")
end
end
end
#------------------------------------------------------------------------------
class Window_VampyrBestiaryInfo < Window_Base
def initialize
super(128, 0, 416, 416)
@enemy = nil
end
def update(enemy)
return if @enemy == enemy
@enemy = enemy
refresh
end
def refresh
self.contents.clear
if Show_All == false
return if $game_system.enemy_defeated[@enemy.id] < 1
end
bitmap = Cache.battler(@enemy.battler_name, @enemy.battler_hue)
self.contents.blt(0, WLH, bitmap, bitmap.rect)
if Vampyr_Kernel.enabled?("Vampyr ABS", 8.0) and Show_Chars
enemy = Game_Enemy.new(0, @enemy.id)
draw_character(enemy.character_name, enemy.character_index, 180, 190)
end
self.contents.font.color = crisis_color
self.contents.draw_text(0, 0, contents.width, WLH, @enemy.name, 1)
self.contents.font.color = system_color
self.contents.draw_text(224, WLH, 128, WLH, "#{Vocab.hp}:")
self.contents.draw_text(224, WLH*2, 128, WLH, "#{Vocab.mp}:")
self.contents.draw_text(224, WLH*3, 128, WLH, "#{Vocab.atk}:")
self.contents.draw_text(224, WLH*4, 128, WLH, "#{Vocab.def}:")
self.contents.draw_text(224, WLH*5, 128, WLH, "#{Vocab.spi}:")
self.contents.draw_text(224, WLH*6, 128, WLH, "#{Vocab.agi}:")
self.contents.draw_text(224, WLH*8, 128, WLH, "EXP:")
self.contents.draw_text(224, WLH*10, 128, WLH, "Drop:")
self.contents.draw_text(224, WLH*11, 128, WLH, Vocab::gold)
self.contents.draw_text(224, WLH*15, 128, WLH, "Killed:")
self.contents.font.color = normal_color
self.contents.draw_text(288, WLH, 96, WLH, @enemy.maxhp, 2)
self.contents.draw_text(288, WLH*2, 96, WLH, @enemy.maxmp, 2)
self.contents.draw_text(288, WLH*3, 96, WLH, @enemy.atk, 2)
self.contents.draw_text(288, WLH*4, 96, WLH, @enemy.def, 2)
self.contents.draw_text(288, WLH*5, 96, WLH, @enemy.spi, 2)
self.contents.draw_text(288, WLH*6, 96, WLH, @enemy.agi, 2)
self.contents.draw_text(288, WLH*8, 96, WLH, @enemy.exp, 2)
self.contents.draw_text(288, WLH*11, 96, WLH, @enemy.gold, 2)
self.contents.draw_text(288, WLH*15, 96, WLH, "#{$game_system.enemy_defeated[@enemy.id]}", 2)
draw_dropped_item(224, WLH*12)
draw_weakness(0, WLH*8)
draw_resistences(0, WLH*12)
end
def draw_dropped_item(x, y)
items = []
for i in [@enemy.drop_item1, @enemy.drop_item2]
case i.kind
when 1
items.push($data_items[i.item_id])
when 2
items.push($data_weapons[i.weapon_id])
when 3
items.push($data_armors[i.armor_id])
end
end
for i in 0...items.size
next if i.nil?
draw_item_name(items[i], x, y+(i*24))
end
end
def draw_weakness(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 96, WLH, "Weakness:")
enemy = Game_Enemy.new(0, @enemy.id)
weakness = []
for i in 0...$data_system.elements.size-1
next unless enemy.element_rate(i+1) > 100
weakness << i
end
for i in 0...weakness.size
x2 = 32*(i%7)
y2 = WLH*(i/7)
a = Attribute_Icons
draw_icon(a[weakness[i]], x+x2, y+WLH+y2)
end
end
def draw_resistences(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 128, WLH, "Resistences:")
enemy = Game_Enemy.new(0, @enemy.id)
resistences = []
for i in 0...$data_system.elements.size-1
next unless enemy.element_rate(i+1) < 100
resistences << i
end
for i in 0...resistences.size
x2 = 32*(i%7)
y2 = WLH*(i/7)
a = Attribute_Icons
draw_icon(a[resistences[i]], x+x2, y+WLH+y2)
end
end
end
#------------------------------------------------------------------------------
class Game_System
attr_accessor:enemy_defeated
alias vampyr_sbabs_gsystem_initialize initialize
def initialize
vampyr_sbabs_gsystem_initialize
@enemy_defeated = {}
for i in 0...$data_enemies.size
@enemy_defeated[i] = 0
end
end
end
#------------------------------------------------------------------------------
class Game_Troop < Game_Unit
def kill_count
for enemy in dead_members
$game_system.enemy_defeated[enemy.enemy_id] += 1
end
end
end
#------------------------------------------------------------------------------
if Vampyr_Kernel.enabled?("Vampyr SBABS")
class Game_Event < Game_Character
alias vampyr_bestiary_gevent_dying dying
def dying
$game_system.enemy_defeated[@enemy_id] += 1
vampyr_bestiary_gevent_dying
end
end
end
#------------------------------------------------------------------------------
if Vampyr_Kernel.enabled?("Vampyr SBABS")
class Game_Monster < Game_Character
alias vampyr_bestiary_gmonster_get_rewards get_rewards
def get_rewards
$game_system.enemy_defeated[@enemy_id] += 1
vampyr_bestiary_gmonster_get_rewards
end
end
end
#------------------------------------------------------------------------------
class Scene_Battle < Scene_Base
alias vampyr_bestiary_display_exp_and_gold display_exp_and_gold
def display_exp_and_gold
vampyr_bestiary_display_exp_and_gold
$game_troop.kill_count
end
end
#------------------------------------------------------------------------------
class Scene_VampyrBestiary < Scene_Base
def initialize(from_menu=false)
@from_menu = from_menu
end
def start
super
@spriteset = Spriteset_Battle.new
@menu_window = Window_VampyrBestiaryMenu.new
@info_window = Window_VampyrBestiaryInfo.new
end
def update
super
@spriteset.update
@menu_window.update
@info_window.update(@menu_window.enemy)
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = (@from_menu ? Scene_Menu.new : Scene_Map.new)
end
end
def terminate
super
@spriteset.dispose
@menu_window.dispose
@info_window.dispose
end
end
Castlevania ABS.txt:
- Spoiler:
#==============================================================================
# CastlevaniA ABS
#==============================================================================
if Vampyr_Kernel.enabled?("Vampyr SBABS", 12.0)
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Castlevania ABS", 1.0, "12/27/2009")
#------------------------------------------------------------------------------
class Game_Enemy < Game_Battler
def drop_heart?
enemy.note.each_line { |line| return true if line.include?('Drop Heart') }
return false
end
end
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
attr_accessor :hearts
alias castlevania_abs_gactor_initialize initialize
def initialize(actor_id)
castlevania_abs_gactor_initialize(actor_id)
@hearts = 0
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
alias castlevania_abs_gevent_dying dying
def dying
if self.actor.drop_heart?
$game_hearts << Game_Heart.new(self.x, self.y)
end
castlevania_abs_gevent_dying
end
end
#------------------------------------------------------------------------------
class Game_Heart < Game_Character
attr_accessor :draw
attr_accessor :destroy
def initialize(x, y)
super()
moveto(x, y)
jump(0,0)
@delay = 600
@draw = false
@destroy = false
update
end
def update
return if @destroy
@delay -= 1 if @delay > 0
@destroy = (@delay <= 0)
@opacity -= 5 if @delay <= 50
if $game_player.x == self.x and $game_player.y == self.y
RPG::SE.new("Cancel").play
$game_party.members[0].hearts += 1
@destroy = true
end
end
end
#------------------------------------------------------------------------------
class Sprite_Heart < Sprite_Base
attr_accessor :character
def initialize(viewport, character)
super(viewport)
@character = character
@heart = Cache.system("Heart")
@x = 0
@delay = 0
self.bitmap = Bitmap.new(16, 16)
self.ox = 10
self.oy = 16
refresh
update
end
def refresh
@x = (@x+1)%10
self.bitmap.clear
self.bitmap.blt(0, 0, @heart, Rect.new(@x*16, 0, 16, 16))
end
def update
super
self.x = @character.screen_x
self.y = @character.screen_y
self.opacity = @character.opacity
self.bush_depth = @character.bush_depth
@delay = (@delay+1)%10
refresh if @delay <= 0
end
end
#------------------------------------------------------------------------------
class Spriteset_Map
alias castlevania_abs_spmap_initialize initialize
alias castlevania_abs_spmap_create_characters create_characters
alias castlevania_abs_spmap_update update
alias castlevania_abs_spmap_dispose dispose
def initialize
@heart_sprites = []
castlevania_abs_spmap_initialize
end
def update
castlevania_abs_spmap_update
update_heart_sprites
end
def dispose
castlevania_abs_spmap_dispose
@heart_sprites.compact.each { |i| i.dispose }
end
def create_characters
castlevania_abs_spmap_create_characters
for i in $game_hearts
@heart_sprites << Sprite_Heart.new(@viewport1, i)
end
end
def update_heart_sprites
for i in $game_hearts
unless i.draw
@heart_sprites << Sprite_Heart.new(@viewport1, i)
i.draw = true
end
if i.destroy
for x in @heart_sprites.compact
next if x.character != i
x.dispose
@heart_sprites.delete(x)
end
$game_hearts.delete(i)
end
end
@heart_sprites.compact.each { |i| i.update }
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
alias castlevania_abs_smap_update update
def update
castlevania_abs_smap_update
$game_hearts.compact.each { |i| i.update }
end
end
$game_hearts = []
#------------------------------------------------------------------------------
end
Character Core.txt:
- Spoiler:
#==============================================================================
# Vampyr Character Core
#==============================================================================
Vampyr_Kernel.register("Vampyr Character Core", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Map
def in_range?(object)
return true if object.is_a?(Game_Event) and object.check_command("Force Update")
return false if object.real_x < (@display_x-(256*3))
return false if object.real_x > (@display_x+((Graphics.width/32*256)+(256*3)))
return false if object.real_y < (@display_y-(256*3))
return false if object.real_y > (@display_y+((Graphics.height/32*256)+(256*3)))
return true
end
end
#------------------------------------------------------------------------------
class Game_Character
attr_accessor :character_name
attr_accessor :character_index
attr_accessor :move_type
attr_accessor :move_route
attr_accessor :direction_fix
attr_accessor :walk_anime
attr_accessor :step_anime
attr_accessor :through
attr_accessor :pattern
attr_accessor :direction
attr_accessor :bush_depth
attr_accessor :blend_type
attr_accessor :opacity
attr_accessor :move_speed
attr_accessor :priority_type
def in_range?(parent, target, range)
x = (parent.x - target.x) * (parent.x - target.x)
y = (parent.y - target.y) * (parent.y - target.y)
r = x + y
return true if r <= (range * range)
return false
end
def in_direction?(parent, target)
return true if parent.direction == 2 and target.y >= parent.y and target.x == parent.x
return true if parent.direction == 4 and target.x <= parent.x and target.y == parent.y
return true if parent.direction == 6 and target.x >= parent.x and target.y == parent.y
return true if parent.direction == 8 and target.y <= parent.y and target.x == parent.x
return false
end
def in_front?(parent, target)
return true if parent.direction == 2 and parent.x == target.x and (parent.y+1) == target.y
return true if parent.direction == 4 and (parent.x-1) == target.x and parent.y == target.y
return true if parent.direction == 6 and (parent.x+1) == target.x and parent.y == target.y
return true if parent.direction == 8 and parent.x == target.x and (parent.y-1) == target.y
return true if parent.x == target.x and parent.y == target.y
return false
end
def in_behind?(parent, target)
return true if target.direction == 2 and parent.x == target.x and parent.y < target.y
return true if target.direction == 4 and parent.x > target.x and parent.y == target.y
return true if target.direction == 6 and parent.x < target.x and parent.y == target.y
return true if target.direction == 8 and parent.x == target.x and parent.y > target.y
return false
end
def in_beside?(parent, target)
return true if target.direction == 2 and parent.direction == 4 and target.x == (parent.x-1) and target.y == parent.y
return true if target.direction == 2 and parent.direction == 6 and target.x == (parent.x+1) and target.y == parent.y
return true if target.direction == 4 and parent.direction == 2 and target.x == parent.x and target.y == (parent.y+1)
return true if target.direction == 4 and parent.direction == 8 and target.x == parent.x and target.y == (parent.y-1)
return true if target.direction == 6 and parent.direction == 2 and target.x == parent.x and target.y == (parent.y+1)
return true if target.direction == 6 and parent.direction == 8 and target.x == parent.x and target.y == (parent.y-1)
return true if target.direction == 8 and parent.direction == 4 and target.x == (parent.x-1) and target.y == parent.y
return true if target.direction == 8 and parent.direction == 6 and target.x == (parent.x+1) and target.y == parent.y
return false
end
def face_to_face?(parent, target)
return true if parent.direction == 2 and target.direction == 8
return true if parent.direction == 4 and target.direction == 6
return true if parent.direction == 6 and target.direction == 4
return true if parent.direction == 8 and target.direction == 2
return false
end
def is_passable?(object, dir)
x = dir == 4 ? -1 : dir == 6 ? 1 : 0
y = dir == 2 ? 1 : dir == 8 ? -1 : 0
return true if $game_map.passable?(object.x+x, object.y+y)
return false
end
def xd
x = (@direction == 4 ? -1 : @direction == 6 ? 1 : 0)
return @x+x
end
def yd
y = (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
return @y+y
end
def event_xy(object, dir)
x = dir == 4 ? -1 : dir == 6 ? 1 : 0
y = dir == 2 ? 1 : dir == 8 ? -1 : 0
for i in $game_map.events.values
return true if i.x == object.x+x and i.y == object.y+y and !i.through
end
return false
end
def jump_to(x, y)
xx = (x < @x ? -(@x-x) : x > @x ? x-@x : 0)
yy = (y < @y ? -(@y-y) : y > @y ? y-@y : 0)
jump(xx, yy)
end
def move_toward(target)
sx = distance_x_from(target)
sy = distance_y_from(target)
if sx != 0 or sy != 0
if sx.abs > sy.abs
sx > 0 ? move_left : move_right
if @move_failed and sy != 0
sy > 0 ? move_up : move_down
end
else
sy > 0 ? move_up : move_down
if @move_failed and sx != 0
sx > 0 ? move_left : move_right
end
end
end
end
def move_type_toward(target)
case rand(6)
when 0..3; move_toward(target)
when 4; move_random
when 5; move_forward
end
end
def move_away_from(target)
sx = distance_x_from(target)
sy = distance_y_from(target)
if sx != 0 or sy != 0
if sx.abs > sy.abs
sx > 0 ? move_right : move_left
if @move_failed and sy != 0
sy > 0 ? move_down : move_up
end
else
sy > 0 ? move_down : move_up
if @move_failed and sx != 0
sx > 0 ? move_right : move_left
end
end
end
end
def turn_toward(target)
sx = distance_x_from(target)
sy = distance_y_from(target)
if sx.abs > sy.abs
sx > 0 ? turn_left : turn_right
elsif sx.abs < sy.abs
sy > 0 ? turn_up : turn_down
end
end
def follow(x, y)
sx = distance_x(x)
sy = distance_y(y)
if sx != 0 or sy != 0
if sx.abs > sy.abs
sx > 0 ? move_left : move_right
if @move_failed and sy != 0
sy > 0 ? move_up : move_down
end
else
sy > 0 ? move_up : move_down
if @move_failed and sx != 0
sx > 0 ? move_left : move_right
end
end
end
end
def look_to(target)
look_at(target.x, target.y)
end
def look_at(x, y)
sx = distance_x(x)
sy = distance_y(y)
if sx.abs > sy.abs
sx > 0 ? turn_left : turn_right
elsif sx.abs < sy.abs
sy > 0 ? turn_up : turn_down
end
end
def distance_x_from(target)
sx = @x - target.x
if $game_map.loop_horizontal?
if sx.abs > $game_map.width / 2
sx -= $game_map.width
end
end
return sx
end
def distance_y_from(target)
sy = @y - target.y
if $game_map.loop_vertical?
if sy.abs > $game_map.height / 2
sy -= $game_map.height
end
end
return sy
end
def distance_x(x)
sx = @x - x
if $game_map.loop_horizontal?
if sx.abs > $game_map.width / 2
sx -= $game_map.width
end
end
return sx
end
def distance_y(y)
sy = @y - y
if $game_map.loop_vertical?
if sy.abs > $game_map.height / 2
sy -= $game_map.height
end
end
return sy
end
def animation_id=(i)
@animation_id = (i < 0 ? 1 : i)
end
def check_event_trigger_touch(x, y)
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
attr_reader :id
def check_value(comment)
return 0 if @list.nil? or @list.size <= 0
for item in @list
if item.code == 108 or item.code == 408
if item.parameters[0] =~ /#{comment} (\d+)/
return $1.to_i
end
end
end
return 0
end
def check_comment(comment)
return nil if @list.nil? or @list.size <= 0
for item in @list
next unless item.code == 108 or item.code == 408
if item.parameters[0] =~ /#{comment} (.*)/
return $1.to_s
end
end
return nil
end
def check_command(comment)
return false if @list.nil? or @list.size <= 0
for item in @list
if item.code == 108 or item.code == 408
if item.parameters[0].include?(comment)
return true
end
end
end
return false
end
end
#------------------------------------------------------------------------------
class Game_Interpreter
attr_reader :id
alias vampyr_exmov_ginterpreter_setup setup
def setup(list, event_id = 0)
vampyr_exmov_ginterpreter_setup(list, event_id)
@id = @original_event_id
end
def self_event
return $game_map.events[@id]
end
end
Cisto Horologium.txt:
- Spoiler:
#==============================================================================
# Vampyr Cisto Horologium
#==============================================================================
StopKey = Keys::T
ItemNeeded = 14
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Cisto Horologium", "0.1", "11/16/2010")
#------------------------------------------------------------------------------
class Game_System
attr_accessor :stopwatch
alias vch_smap_initialize initialize
alias vch_smap_update update
def initialize
@stopwatch = 0
vch_smap_initialize
end
def update
update_watch
vch_smap_update
end
def update_watch
if can_stop?
@old_tone = $game_map.screen.tone.clone
$game_party.members[0].mp -= ($game_party.members[0].maxmp/3)
RPG::SE.new("Clock").play
@stopwatch = 300
@watched_stopped = true
end
if @stopwatch >= 300 and @watched_stopped
RPG::BGM.stop
$game_map.screen.start_tone_change(Tone.new(-75,-75,-25,175), 30)
elsif @stopwatch <= 0 and @watched_stopped
$game_map.autoplay
$game_map.screen.start_tone_change(@old_tone, 30)
@watched_stopped = false
end
@stopwatch -= 1 if @stopwatch > 0
end
def reset_watch
@stopwatch = 0
RPG::SE.stop
$game_map.screen.start_tone_change(@old_tone, 30)
@watched_stopped = false
end
def can_stop?
return true if Input.trigger?(StopKey) and
(ItemNeeded <= 0 or ItemNeeded >= 0 and $game_party.has_item?($data_items[ItemNeeded])) and
$game_party.members[0].mp >= ($game_party.members[0].maxmp/3) and
@stopwatch <= 0
return false
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
alias vch_game_event_start start
alias vch_game_event_update update
def start
return if ($game_system.stopwatch > 0 and !@event.name.include?("Event"))
vch_game_event_start
end
def update
return if ($game_system.stopwatch > 0 and !@event.name.include?("Event"))
vch_game_event_update
end
end
#------------------------------------------------------------------------------
class Game_Player
alias vch_gplayer_perform_transfer perform_transfer
alias vch_gplayer_update_actions update_actions
def perform_transfer
$game_system.reset_watch if @transferring
vch_gplayer_perform_transfer
end
def update_actions
return if $game_system.stopwatch > 0
vch_gplayer_update_actions
end
end
#------------------------------------------------------------------------------
class Game_Projectile < Game_Character
alias vch_grange_update update
def update
return if $game_system.stopwatch > 0
vch_grange_update
end
end
Custom Vehicles.txt:
- Spoiler:
#==============================================================================
# Vampyr Customized Vehicles
#==============================================================================
BOAT_GRAPHIC = ["!$Boat", 0] # Sprite Name and Index of Boat
SHIP_GRAPHIC = ["", 0] # Sprite Name and Index of Ship
AIRSHIP_GRAPHIC = ["", 0] # Sprite Name and Index of Airplane
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Custom Vehicles", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Vehicle < Game_Character
alias vampyr_change_vehicle_get_on get_on
alias vampyr_change_vehicle_get_off get_off
def get_on
vampyr_change_vehicle_get_on
@char_bak = @character_name
@index_bak = @character_index
case @type
when 0
return if BOAT_GRAPHIC[0] == ""
@character_name = BOAT_GRAPHIC[0]
@character_index = BOAT_GRAPHIC[1]
when 1
return if SHIP_GRAPHIC[0] == ""
@character_name = SHIP_GRAPHIC[0]
@character_index = SHIP_GRAPHIC[1]
when 2
return if AIRSHIP_GRAPHIC[0] == ""
@character_name = AIRSHIP_GRAPHIC[0]
@character_index = AIRSHIP_GRAPHIC[1]
end
end
def get_off
vampyr_change_vehicle_get_off
@character_name = @char_bak
@character_index = @index_bak
end
end
Fog.txt:
- Spoiler:
#==============================================================================
# Vampyr Fog
#==============================================================================
# To create a fog, put in Parallax folder, a image with "_Fog" in its name (without quote)
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Fog", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Spriteset_Map
alias vampyr_fog_initialize initialize
alias vampyr_fog_update update
alias vampyr_fog_dispose dispose
alias vampyr_fog_update_parallax update_parallax
def initialize
create_fog
vampyr_fog_initialize
end
def update
vampyr_fog_update
update_fog
end
def dispose
vampyr_fog_dispose
dispose_fog
end
def create_fog
@fog = Plane.new(@viewport1)
@fog.z = 200
end
def update_parallax
return if $game_map.parallax_name =~ /(.*)fog(.*)/i
vampyr_fog_update_parallax
end
def update_fog
return unless $game_map.parallax_name =~ /(.*)fog(.*)/i
if @fog_name != $game_map.parallax_name
@fog_name = $game_map.parallax_name
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = Cache.parallax(@fog_name)
end
Graphics.frame_reset
end
@fog.ox = $game_map.calc_parallax_x(@fog.bitmap)
@fog.oy = $game_map.calc_parallax_y(@fog.bitmap)
end
def dispose_fog
@fog.dispose
end
end
Global Self Switches.txt:
- Spoiler:
#==============================================================================
# Vampyr Global Self Switches
#==============================================================================
# Call: selfswitch(event_id, switch, boolean) to turn on the switch
# switches is: "A", "B", "C" or "D"
# boolean is: true of false
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Global Self Switches", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Interpreter
def selfswitch(event_id, switch, status)
key = [$game_map.map_id, event_id, switch]
$game_self_switches[key] = status
$game_map.need_refresh = true
end
end
Item Event.txt:
- Spoiler:
#==============================================================================
# Vampyr Event Item
#==============================================================================
Vampyr_Kernel.register("Vampyr Item Event", 1.0, "03/24/2010")
Gold_Icon = 147
#------------------------------------------------------------------------------
class Game_Map
alias vie_gmap_refresh refresh
def refresh
setup_item_events
vie_gmap_refresh
refresh_item_events
end
def setup_item_events
@item_events = {}
for i in events.values.compact
@item_events[i.id] = i.page if i.is_item?
end
end
def refresh_item_events
item_event = false
for i in events.values.compact
if @item_events.has_key?(i.id) and @map_effects[i.id] != i.page
item_event = true
end
end
if item_event and $scene.is_a?(Scene_Map)
$scene.refresh_item_events
end
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
attr_reader :item
attr_reader :above
attr_accessor :destroy
alias vampyr_eventitem_gevent_refresh refresh
alias vampyr_eventitem_gevent_update update
def refresh
vampyr_eventitem_gevent_refresh
@reward = check_comment("Item").to_s
if @reward != "" and @item == nil
item = @reward.split(" ")
case item[0].to_i
when 0; @item = $data_items[item[1].to_i]
when 1; @item = $data_weapons[item[1].to_i]
when 2; @item = $data_armors[item[1].to_i]
when 3; @item = $data_skills[item[1].to_i]
when 4; @item = item[1].to_i
end
@above = (item[2].to_s != "")
$game_item_event << self
end
end
def update
vampyr_eventitem_gevent_update
update_take unless @destroy
end
def update_take
return unless is_item?
return unless $game_player.over?(self) or
$game_player.in_front?(self) and Input.trigger?(Input::C)
Sound.play_decision
if @item.is_a?(RPG::Skill)
$game_party.members[0].learn_skill(@item.id)
elsif @item.is_a?(Numeric)
$game_party.gain_gold(@item)
else
$game_party.gain_item(@item, 1)
end
$game_self_switches[[$game_map.map_id, @id, "A"]] = true
$game_map.need_refresh = true
@destroy = true
end
def is_item?
return (@reward.to_s != "")
end
end
#------------------------------------------------------------------------------
class Sprite_Object < Sprite
attr_reader :character
def initialize(viewport, character)
super(viewport)
@character = character
self.bitmap = Cache.system("Iconset")
self.ox = 12
self.oy = 24
index = @character.item.is_a?(Numeric) ? Gold_Icon : @character.item.icon_index
self.src_rect.set(index%16*24, index/16*24, 24, 24)
update
end
def update
super
self.x = @character.screen_x
self.y = @character.screen_y - (@character.above ? 8 : 0)
self.z = @character.screen_z
self.bush_depth = @character.bush_depth
end
end
#------------------------------------------------------------------------------
class Spriteset_Map
alias vampyr_itemevent_create_characters create_characters
alias vampyr_itemevent_update_characters update_characters
alias vampyr_itemevent_dispose_characters dispose_characters
def create_characters
@objects_sprites = []
vampyr_itemevent_create_characters
for event in $game_map.events.values.compact
next unless event.is_item?
@objects_sprites.push(Sprite_Object.new(@viewport1, event))
end
end
def update_characters
vampyr_itemevent_update_characters
for item in @objects_sprites.compact
if item.character.destroy and !item.disposed?
item.dispose
$game_item_event.delete(item.character)
@objects_sprites.delete(item)
elsif !item.disposed?
item.update if $game_map.in_range?(item.character)
end
end
end
def dispose_characters
vampyr_itemevent_dispose_characters
@objects_sprites.compact.each { |i| i.dispose }
end
def refresh_item_events
@objects_sprites.compact.each { |i| i.dispose }
@objects_sprites.clear
for event in $game_map.events.values.compact
next unless event.is_item?
@objects_sprites.push(Sprite_Object.new(@viewport1, event))
end
end
end
#------------------------------------------------------------------------------
class Scene_Title < Scene_Base
alias vampyr_itemevent_stitle_create_game_objects create_game_objects
def create_game_objects
vampyr_itemevent_stitle_create_game_objects
$game_item_event = []
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
def refresh_item_events
@spriteset.refresh_item_events if @spriteset != nil
end
end
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 1 Parte Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem