Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o tema • Voltar para a ficha do tema
-=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
Aldeia RPG :: RPG Maker :: Rpg Maker VX :: Scripts
Página 1 de 1
-=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
-=[ Ψ † Super Pack Sistem Vampyr Script 2 Parte † Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem
Bueno amigo hoy les tengo un Pack de barios Script :
Light Effects.txt:
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 2 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 :
Light Effects.txt:
- Spoiler:
#==============================================================================
# Light Effects (Modified by Vlad)
#==============================================================================
class Game_Map
alias light_effects_refresh refresh
def refresh
light_effects_refresh
$scene.refresh_light_effects if $scene.is_a?(Scene_Map)
end
end
#------------------------------------------------------------------------------
class Light_Effect
attr_accessor (:light, :event, :type)
def initialize(viewport, event, type)
@light = Sprite.new(viewport)
@light.bitmap = Cache.system("Light.png")
@light.z = 100
@event = event
@type = type
end
end
#------------------------------------------------------------------------------
class Spriteset_Map
attr_reader :light_effects
alias light_effect_spmap_initalize initialize
alias light_effect_spmap_update update
alias light_effect_spmap_dispose dispose
def initialize
@light_effects = []
create_light_effects
light_effect_spmap_initalize
end
def update
light_effect_spmap_update
update_light_effects
end
def dispose
light_effect_spmap_dispose
@light_effects.compact.each { |i| i.light.dispose }
@light_effects.clear
end
def create_light_effects
for event in $game_map.events.values
next if event.list.nil?
for i in 0...event.list.size
if event.list[i].code == 108 and event.list[i].parameters == ["Candle"]
type = "Candle"
light_effects = Light_Effect.new(@viewport2, event, type)
light_effects.light.zoom_x = 2
light_effects.light.zoom_y = 2
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["Ground"]
type = "Ground"
light_effects = Light_Effect.new(@viewport2, event, type)
light_effects.light.zoom_x = 2
light_effects.light.zoom_y = 2
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["Fire"]
type = "Fire"
light_effects = Light_Effect.new(@viewport2, event, type)
light_effects.light.zoom_x = 2
light_effects.light.zoom_y = 2
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["Light"]
type = "Light"
light_effects = Light_Effect.new(@viewport2, event, type)
light_effects.light.zoom_x = 1
light_effects.light.zoom_y = 1
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["Torch"]
type = "Torch"
light_effects = Light_Effect.new(@viewport2, event, type)
light_effects.light.zoom_x = 300 / 100.0
light_effects.light.zoom_y = 300 / 100.0
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["Post"]
type = "Post"
light_effects = Light_Effect.new(@viewport2, event, type)
light_effects.light.zoom_x = 3
light_effects.light.zoom_y = 3
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
end
end
for effect in @light_effects
next unless $game_map.in_range?(effect.event)
case effect.type
when "Candle"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.blend_type = 1
when "Ground"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.blend_type = 1
when "Fire"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.tone = Tone.new(255,-100,-255,0)
effect.light.blend_type = 1
when "Light"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
effect.light.blend_type = 1
when "Torch"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8
effect.light.tone = Tone.new(255,-100,-255,0)
effect.light.blend_type = 1
when "Post"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8
effect.light.blend_type = 1
end
end
end
def update_light_effects
for effect in @light_effects
unless $game_map.in_range?(effect.event)
effect.light.visible = false
next
end
effect.light.visible = true
case effect.type
when "Candle"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.opacity = rand(30) + 70
when "Ground"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
when "Fire"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.opacity = rand(30) + 120
when "Light"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
when "Torch"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(20) - 10
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(20) - 10
effect.light.opacity = rand(30) + 70
when "Post"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8
end
end
end
def refresh_light_effects
@light_effects.compact.each { |i| i.light.dispose }
@light_effects.clear
create_light_effects
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
def refresh_light_effects
return if @spriteset == nil
@spriteset.refresh_light_effects
end
end
- Spoiler:
#==============================================================================
# Vampyr Logo Screen
#==============================================================================
Vampyr_Kernel.register("Vampyr Logo Screen", 1.0, "03/23/2010")
#------------------------------------------------------------------------------
unless $TEST
images = {"VAMPYR"=>60, "ESRB"=>60, "ALERT"=>180}
sprite = Sprite.new
sprite.opacity = 0
sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
images.each { |key, value|
sprite.bitmap.fill_rect(sprite.bitmap.rect, Color.new(255,255,255))
bitmap = Cache.system(key)
x = (Graphics.width-bitmap.width)/2
y = (Graphics.height-bitmap.height)/2
sprite.bitmap.blt(x, y, bitmap, bitmap.rect)
for i in 0..255
next if sprite.opacity >= 255
sprite.opacity += 10
Graphics.update
end
Graphics.wait(value)
for i in 0..255
next if sprite.opacity <= 0
sprite.opacity -= 10
Graphics.update
end
Graphics.wait(10)
}
sprite.dispose
end
- Spoiler:
#==============================================================================
# Vampyr Map Effects
#==============================================================================
Vampyr_Kernel.register("Vampyr Map Effects", 1.0, "03/23/2010")
#------------------------------------------------------------------------------
# You need to put the image "Light.png" on system folder!!!
# Usage: create an event and put the following comments:
# Shadow Source -> make the event a source of shadow
# Anglemin -> Set the min angle to shadow appear
# Anglemax -> Set the max angle to shadow appear
# Shadow Point -> make the event have shadow
# Light Effect X -> change X for one of the effects below, it shows the light effect
Light_Effects = {}
# Name Zoom Tone Variance
Light_Effects["Candle"] = [1, Tone.new(0,-50,-50), [150,50]]
Light_Effects["Fire"] = [1, Tone.new(0,-150,-150), [150,100]]
Light_Effects["Ground"] = [1.5, Tone.new(0,-100,-100), [175,25]]
Light_Effects["Torch"] = [1.25, Tone.new(0,-100,-100), [175,100]]
Light_Effects["Post"] = [1.25, Tone.new(0,0,0), [180,20]]
Light_Effects["Ruber"] = [1.25, Tone.new(0,-255,-255), [175,50]]
Light_Effects["Caerulus"] = [1.25, Tone.new(-255,-100,0), [175,50]]
Light_Effects["Virdis"] = [1.25, Tone.new(-255,0,-100), [175,50]]
Light_Effects["Purpura"] = [1.25, Tone.new(-50,-255,0), [175,50]]
#------------------------------------------------------------------------------
class Game_Map
alias vme_gmap_refresh refresh
def refresh
setup_map_effects
vme_gmap_refresh
refresh_map_effects
end
def setup_map_effects
@map_effects = {}
for i in events.values.compact
if i.shadow_source or i.light_effect != ""
@map_effects[i.id] = i.page
end
end
end
def refresh_map_effects
refresh_effects = false
for i in events.values.compact
if @map_effects.has_key?(i.id) and @map_effects[i.id] != i.page
refresh_effects = true
end
end
if refresh_effects and $scene.is_a?(Scene_Map)
$scene.refresh_map_effects
end
end
end
#------------------------------------------------------------------------------
class Game_Event < Game_Character
attr_reader :light_effect
attr_reader :shadow_source
attr_reader :show_shadow
attr_reader :anglemin
attr_reader :anglemax
attr_reader :distance_max
alias vme_gevent_refresh refresh
def refresh
vme_gevent_refresh
@light_effect = check_comment("Light Effect").to_s
@shadow_source = comment_exists?("Shadow Source")
@show_shadow = comment_exists?("Shadow Point")
@anglemin = check_comment("Angle Min").to_i
@anglemax = check_comment("Angle Max").to_i
@distance_max = check_comment("Distance Max").to_i
end
end
#------------------------------------------------------------------------------
class Sprite_Light < Sprite_Base
attr_accessor :character
def initialize(viewport, character)
super(viewport)
@character = character
@params = Light_Effects[@character.light_effect]
self.bitmap = Cache.system("Light.png")
self.ox = self.bitmap.width/2
self.oy = self.bitmap.height/2
self.blend_type = 1
self.zoom_x = self.zoom_y = @params[0]
self.opacity = (@params[2][0] + rand(@params[2][1]))
self.tone = @params[1]
update
end
def update
super
self.x = (@character.real_x - $game_map.display_x + self.ox + 16) / 8
self.y = (@character.real_y - $game_map.display_y + self.oy + 8) / 8
self.opacity = (@params[2][0] + rand(@params[2][1]))
end
end
#------------------------------------------------------------------------------
class Sprite_Shadow < Sprite_Character
attr_accessor :character
def initialize(viewport, character = nil, id = 0)
@source = $effects_spriteset.map_effects[id]
@anglemin = @source.anglemin
@anglemax = @source.anglemin
@self_opacity = 100
@distancemax = (@source.distance_max > 0 ? (@source.distance_max*32) : (5*32))
super(viewport, character)
end
def update
super
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
end
#------------------------------------------------------------------------------
class Spriteset_Map
attr_reader :map_effects
alias vme_spmap_initalize initialize
alias vme_spmap_create_viewports create_viewports
alias vme_spmap_update_viewports update_viewports
alias vme_spmap_update_tilemap update_tilemap
alias vme_spmap_dispose_tilemap dispose_tilemap
alias vme_spmap_update update
alias vme_spmap_dispose dispose
def initialize
$effects_spriteset = self
vme_spmap_initalize
create_map_effects
end
def update
vme_spmap_update
update_map_effects
end
def dispose
vme_spmap_dispose
dispose_map_effects
end
def create_viewports
vme_spmap_create_viewports
@viewport1.z = 1
@viewport0 = Viewport.new(0, 0, Graphics.width, Graphics.height)
end
def update_viewports
vme_spmap_update_viewports
@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
vme_spmap_update_tilemap
@tilemap1.ox = $game_map.display_x / 8
@tilemap1.oy = $game_map.display_y / 8
@tilemap1.update
end
def dispose_tilemap
vme_spmap_dispose_tilemap
@tilemap1.dispose
end
def create_map_effects
@map_effects = []
@shadow_sprites = []
@lights_sprites = []
for event in $game_map.events.values
next unless event.shadow_source
@map_effects << event
end
for i in @map_effects
next if i.light_effect == ""
next if i.light_effect =~ /empty/i
@lights_sprites << [Sprite_Light.new(@viewport3, i), Sprite_Character.new(@viewport1, i)]
end
for i in 0...@map_effects.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 Verus Tempus Proelium")
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 update_map_effects
if @shadow_sprites != nil
for i in @shadow_sprites
next unless $game_map.in_range?(i.character)
i.update
end
end
if @lights_sprites != nil
for a in @lights_sprites.compact
a.compact.each { |b| b.update if $game_map.in_range?(b.character) }
end
end
end
def dispose_map_effects
@shadow_sprites.compact.each { |i| i.dispose }
@lights_sprites.compact.each { |a| a.each { |b| b.dispose } }
@shadow_sprites.clear
@lights_sprites.clear
@map_effects.clear
end
def refresh_map_effects
dispose_map_effects
create_map_effects
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
def refresh_map_effects
@spriteset.refresh_map_effects if @spriteset != nil
end
end
- Spoiler:
#==============================================================================
# Vampyr Map Name
#==============================================================================
# To show the names of the maps, put "*" in the name of the map (whitout quotes)
Font_Name = "Old English Text MT" # Name of the font
Font_Size = 32 # Size of the font
Show_One_Time = true # Show map name only one time? (true = yes / false = no)
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Map Name", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Map
def map_name
map = load_data("Data/MapInfos.rvdata")
return map[@map_id].name
end
end
#------------------------------------------------------------------------------
class Window_MapName < Window_Base
def initialize
super(0, 416-64-(Font_Size+32), Graphics.width, Font_Size+32)
self.opacity = self.contents_opacity = 0
self.visible = false
refresh
end
def refresh
self.contents.clear
self.contents.font.name = Font_Name
self.contents.font.size = Font_Size
map_name = $game_map.map_name.gsub(/[!@#%&*]/, "")
self.contents.font.shadow = false
self.contents.font.color = Color.new(0,0,0)
self.contents.draw_text(0, 0, contents.width, self.contents.font.size, map_name, 1)
self.contents.draw_text(2, 0, contents.width, self.contents.font.size, map_name, 1)
self.contents.draw_text(0, 2, contents.width, self.contents.font.size, map_name, 1)
self.contents.draw_text(2, 2, contents.width, self.contents.font.size, map_name, 1)
self.contents.font.color = Color.new(255,255,255)
self.contents.draw_text(1, 1, contents.width, self.contents.font.size, map_name, 1)
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
alias vampyr_mapname_start start
alias vampyr_mapname_update update
alias vampyr_mapname_terminate terminate
alias vampyr_mapname_update_transfer_player update_transfer_player
def start
vampyr_mapname_start
@map_name = Window_MapName.new
end
def update
vampyr_mapname_update
if showable?
@map_name.refresh
$mapname_delay = 300
@map_name.visible = true
$mapname_showed = true
if Show_One_Time and !$maps_showed.include?($game_map.map_id)
$maps_showed << $game_map.map_id
end
end
if $mapname_delay > 0
$mapname_delay -= 1
@map_name.contents_opacity += 5
elsif $mapname_delay <= 0 and @map_name.visible
if @map_name.contents_opacity > 0
@map_name.contents_opacity -= 5
else
@map_name.visible = false
end
end
end
def terminate
vampyr_mapname_terminate
@map_name.dispose
end
def update_transfer_player
return unless $game_player.transfer?
$mapname_delay = 0
$mapname_showed = false
@map_name.contents_opacity = 0
@map_name.visible = false
vampyr_mapname_update_transfer_player
end
def showable?
return false if $game_map.interpreter.running?
return false if Show_One_Time and $maps_showed.include?($game_map.map_id)
return true if $game_map.map_name.include?("*") and !$mapname_showed
return false
end
end
#------------------------------------------------------------------------------
$maps_showed = []
$mapname_delay = 0
$mapname_showed = false
- Spoiler:
#==============================================================================
# Vampyr Max Level Changer
#==============================================================================
Level_Max = 999
EXP_Max = 999999999
HP_Max = 99999
MP_Max = 99999
Atk_Max = 9999
Def_Max = 9999
Spi_Max = 9999
Agi_Max = 9999
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Max Level Changer", 1.0, "03/30/2009")
#------------------------------------------------------------------------------
class Game_Battler
def maxhp
return [[base_maxhp + @maxhp_plus, 1].max, HP_Max].min
end
def maxmp
return [[base_maxmp + @maxmp_plus, 0].max, MP_Max].min
end
def atk
n = [[base_atk + @atk_plus, 1].max, Atk_Max].min
for state in states do n *= state.atk_rate / 100.0 end
n = [[Integer(n), 1].max, Atk_Max].min
return n
end
def def
n = [[base_def + @def_plus, 1].max, Def_Max].min
for state in states do n *= state.def_rate / 100.0 end
n = [[Integer(n), 1].max, Def_Max].min
return n
end
def spi
n = [[base_spi + @spi_plus, 1].max, Spi_Max].min
for state in states do n *= state.spi_rate / 100.0 end
n = [[Integer(n), 1].max, Spi_Max].min
return n
end
def agi
n = [[base_agi + @agi_plus, 1].max, Agi_Max].min
for state in states do n *= state.agi_rate / 100.0 end
n = [[Integer(n), 1].max, Agi_Max].min
return n
end
def maxhp=(new_maxhp)
@maxhp_plus += new_maxhp - self.maxhp
@maxhp_plus = [[@maxhp_plus, -HP_Max].max, HP_Max].min
@hp = [@hp, self.maxhp].min
end
def maxmp=(new_maxmp)
@maxmp_plus += new_maxmp - self.maxmp
@maxmp_plus = [[@maxmp_plus, -MP_Max].max, MP_Max].min
@mp = [@mp, self.maxmp].min
end
def atk=(new_atk)
@atk_plus += new_atk - self.atk
@atk_plus = [[@atk_plus, -Atk_Max].max, Atk_Max].min
end
def def=(new_def)
@def_plus += new_def - self.def
@def_plus = [[@def_plus, -Def_Max].max, Def_Max].min
end
def spi=(new_spi)
@spi_plus += new_spi - self.spi
@spi_plus = [[@spi_plus, -Spi_Max].max, Spi_Max].min
end
def agi=(new_agi)
@agi_plus += new_agi - self.agi
@agi_plus = [[@agi_plus, -Agi_Max].max, Agi_Max].min
end
end
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
alias vampyr_maxlvl_setup setup
def setup(actor_id)
vampyr_maxlvl_setup(actor_id)
@exp_list = Array.new(Level_Max+1)
make_exp_list
@exp = @exp_list[@level]
end
def base_maxhp
return actor.parameters[0, 1] * @level
end
def base_maxmp
return actor.parameters[1, 1] * @level
end
def base_atk
n = actor.parameters[2, 1] * @level
for item in equips.compact do n += item.atk end
return n
end
def base_def
n = actor.parameters[3, 1] * @level
for item in equips.compact do n += item.def end
return n
end
def base_spi
n = actor.parameters[4, 1] * @level
for item in equips.compact do n += item.spi end
return n
end
def base_agi
n = actor.parameters[5, 1] * @level
for item in equips.compact do n += item.agi end
return n
end
def change_level(level, show=false)
level = [[level, Level_Max].min, 1].max
change_exp(@exp_list[level], show)
end
def make_exp_list
@exp_list[1] = @exp_list[Level_Max+1] = 0
m = actor.exp_basis
n = 0.75 + actor.exp_inflation / "#{Level_Max+1}.0".to_f;
for i in 2..Level_Max
@exp_list[i] = @exp_list[i-1] + Integer(m)
m *= 1 + n;
n *= 0.9;
end
end
def change_exp(exp, show)
last_level = @level
last_skills = skills
@exp = [[exp, EXP_Max].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
level_up
end
while @exp < @exp_list[@level]
level_down
end
@hp = [@hp, maxhp].min
@mp = [@mp, maxmp].min
if show and @level > last_level
display_level_up(skills - last_skills)
end
end
end
- Spoiler:
#==============================================================================
# Vampyr Vampyr Advanced Text
#==============================================================================
Name_Font_Name = Font.default_name
Name_Font_Size = Font.default_size
Name_Font_Color = Color.new(255,255,255)
=begin
\B - Turn on/off bold
\T - Turn on/off italic
\D[X] - Shows text in X speed
\E[X] - Shows enemy X name
\I[X] - Shows the name and icon of X item
\W[X] - Shows the name and icon of X weapon
\A[X] - Shows the name and icon of X armor
\S[X] - Shows the name and icon of X skill
\R[X] - Shows the name of X class
\SE[X] - Plays the SE X
\FN[X] - Changes the current font to X (empty return to default font)
\FS[X] - Changes the current font size to X (0 returns to default font size)
\Name[X] - Shows X written in a small window
\Map - Shows the map name
=end
#------------------------------------------------------------------------------
class Window_Message < Window_Selectable
alias vampyr_message_initialize initialize
alias vampyr_message_update update
alias vampyr_message_dispsoe dispose
alias vampyr_message_terminate_message terminate_message
alias vampyr_message_convert_special_characters convert_special_characters
def initialize
vampyr_message_initialize
@text_delay = 0
end
def update
vampyr_message_update
@name_window.update if @name_window != nil
end
def dispose
vampyr_message_dispsoe
close_name_window
end
def terminate_message
vampyr_message_terminate_message
close_name_window
end
def convert_special_characters
vampyr_message_convert_special_characters
@text.gsub!(/\\E\[(\d+)\]/i) { "#{$data_enemies[$1.to_i].name}" }
@text.gsub!(/\\R\[(\d+)\]/i) { "#{$data_classes[$1.to_i].name}" }
@text.gsub!(/\\Map/i) { "#{$game_map.map_name}" }
@text.gsub!(/\\D\[(\d+)\]/i) { "\x09[#{$1}]" }
@text.gsub!(/\\I\[(\d+)\]/i) { "\x10[#{$data_items[$1.to_i].icon_index}]#{$data_items[$1.to_i].name}" }
@text.gsub!(/\\W\[(\d+)\]/i) { "\x10[#{$data_weapons[$1.to_i].icon_index}]#{$data_weapons[$1.to_i].name}" }
@text.gsub!(/\\A\[(\d+)\]/i) { "\x10[#{$data_armors[$1.to_i].icon_index}]#{$data_armors[$1.to_i].name}" }
@text.gsub!(/\\S\[(\d+)\]/i) { "\x10[#{$data_skills[$1.to_i].icon_index}]#{$data_skills[$1.to_i].name}" }
@text.gsub!(/\\SE\[(.*?)\]/i) { "\x11[#{$1}]" }
@text.gsub!(/\\Name\[(.*)\]/i) { "\x12[#{$1}]" }
@text.gsub!(/\\FN\[(.*?)\]/i) { "\x13[#{$1}]" }
@text.gsub!(/\\FS\[(.*?)\]/i) { "\x14[#{$1}]" }
@text.gsub!(/\\B/i) { "\x15[#{$1}]" }
@text.gsub!(/\\T/i) { "\x16[#{$1}]" }
end
def update_message
loop do
c = @text.slice!(/./m)
case c
when nil
finish_message
break
when "\x00"
new_line
if @line_count >= MAX_LINE
unless @text.empty?
self.pause = true
break
end
end
when "\x01"
@text.sub!(/\[([0-9]+)\]/, "")
contents.font.color = text_color($1.to_i)
next
when "\x02"
@gold_window.refresh
@gold_window.open
when "\x03"
@wait_count = 15
break
when "\x04"
@wait_count = 60
break
when "\x05"
self.pause = true
break
when "\x06"
@line_show_fast = true
when "\x07"
@line_show_fast = false
when "\x08"
@pause_skip = true
when "\x09"
@text.sub!(/\[([0-9]+)\]/, "")
@text_delay = $1.to_i
when "\x10"
@text.sub!(/\[([0-9]+)\]/, "")
bitmap = Cache.system("Iconset")
draw_icon($1.to_i, @contents_x, @contents_y)
@contents_x += 26
when "\x11"
@text.sub!(/\[(.*?)\]/, "")
RPG::SE.new($1.to_s).play
when "\x12"
@text.sub!(/\[(.*?)\]/, "")
create_name_window("#{$1}")
when "\x13"
@text.sub!(/\[(.*?)\]/, "")
contents.font.name = ($1.to_s != "" ? $1.to_s : Font.default_name)
when "\x14"
@text.sub!(/\[(.*?)\]/, "")
contents.font.size = ($1.to_i > 0 ? $1.to_i : Font.default_size)
when "\x15"
@text.sub!(/\[(.*?)\]/, "")
contents.font.bold = !contents.font.bold
when "\x16"
@text.sub!(/\[(.*?)\]/, "")
contents.font.italic = !contents.font.italic
else
contents.draw_text(@contents_x, @contents_y, 40, contents.font.size+2, c)
c_width = contents.text_size(c).width
@contents_x += c_width
if @text_delay > 0
for i in 0..@text_delay-1
Graphics.update
end
end
end
break unless @show_fast or @line_show_fast
end
end
def update_cursor
if @index >= 0
x = $game_message.face_name.empty? ? 0 : 112
y = ($game_message.choice_start + @index) * WLH
self.cursor_rect.set(x+8, y, contents.text_size($game_message.texts[$game_message.choice_start]).width+16, WLH)
else
self.cursor_rect.empty
end
end
def create_name_window(text="")
a = Bitmap.new(1,1)
text_size = a.text_size(text).width
a.dispose
close_name_window
@name_window = Window.new
@name_window.windowskin = Cache.system("Window")
@name_window.x = self.x
@name_window.y = self.y - ((Name_Font_Size/3)*2)
@name_window.z = self.z+1
@name_window.width = text_size+32
@name_window.height = Name_Font_Size+16
@name_window.contents = Bitmap.new(1, 1)
@name_window.back_opacity = 200
@sprite = Sprite.new
@sprite.x = @name_window.x+8
@sprite.y = @name_window.y+5
@sprite.z = @name_window.z+1
@sprite.bitmap = Bitmap.new(text_size+16, Name_Font_Size)
@sprite.bitmap.font.name = Name_Font_Name
@sprite.bitmap.font.size = Name_Font_Size
@sprite.bitmap.font.color = Name_Font_Color
@sprite.bitmap.draw_text(@sprite.bitmap.rect, text, 1)
end
def close_name_window
return if @name_window.nil?
@name_window.dispose
@name_window = nil
@sprite.dispose
@sprite = nil
end
end
#------------------------------------------------------------------------------
class Game_Map
def map_name
map = load_data("Data/MapInfos.rvdata")
return map[@map_id].name
end
end
- Spoiler:
#==============================================================================
# Vampyr Auto Hide
#==============================================================================
# Put the comment "Auto Hide" to event fade automatically when player be far of it
#------------------------------------------------------------------------------
if Vampyr_Kernel.enabled?("Vampyr Character Core")
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr Auto Hide", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
class Game_Event < Game_Character
alias vampyr_autohide_gevent_refresh refresh
alias vampyr_autohide_gevent_update update
def refresh
vampyr_autohide_gevent_refresh
@auto_hide = check_command("Auto Hide")
@opacity = opacity_by_distance if @auto_hide
end
def update
vampyr_autohide_gevent_update
@opacity = opacity_by_distance if @auto_hide
end
def opacity_by_distance
if in_range?($game_player, self, 2) and !$game_player.transparent
return 255
elsif in_range?($game_player, self, 3) and !$game_player.transparent
return 255/4*3
elsif in_range?($game_player, self, 4) and !$game_player.transparent
return 255/4*2
elsif in_range?($game_player, self, 5) and !$game_player.transparent
return 255/4
else
return 0
end
end
end
#------------------------------------------------------------------------------
end
- Spoiler:
#==============================================================================
# Vampyr Door Arrows Like Castlevania
#==============================================================================
# Put this comment on events: Door Index Direction X+ Y+ Direction
#------------------------------------------------------------------------------
class Game_Map
alias vampyr_dors_arrows_gmap_refresh refresh
def refresh
vampyr_dors_arrows_gmap_refresh
$scene.refresh_doors_arrows if $scene.is_a?(Scene_Map) != nil
end
end
#------------------------------------------------------------------------------
class Sprite_Arrow < Sprite_Base
attr_reader :character
def initialize(viewport, character, data)
super(viewport)
@character = character
@data = data
self.bitmap = Cache.system("Arrow ##{@data[3]+1}")
self.ox = self.bitmap.width/2
self.oy = self.bitmap.height/2
@data[2] = 2 if @data[2] <= 0
case @data[2]
when 2; self.angle = 0
when 4; self.angle = -90
when 6; self.angle = 90
when 8; self.angle = 180
end
@ox = 0
@oy = 0
update
end
def update
super
return if opacity_by_distance <= 0
update_opacity
self.x = screen_x - plus_x
self.y = screen_y - plus_y
self.z = @character.screen_z
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
def update_opacity
if self.opacity <= 50 and @blink
@blink = false
elsif self.opacity >= opacity_by_distance and !@blink
@blink = true
end
if self.opacity > 50 and @blink
self.opacity -= 5
elsif self.opacity < opacity_by_distance and !@blink
self.opacity += 5
end
end
def screen_x
return ($game_map.adjust_x(@data[0]*256) + 8007) / 8 - 1000 + 16
end
def screen_y
return ($game_map.adjust_y(@data[1]*256) + 8007) / 8 - 1000 + 16
end
def plus_x
return 0 if @data[2] == 2 or @data[2] == 8
if @ox >= 10 and !@max_x
@max_x = true
elsif @ox <= 0 and @max_x
@max_x = false
end
if @ox < 10 and !@max_x
@ox += 0.25
elsif @ox > 0 and @max_x
@ox -= 0.25
end
return @ox
end
def plus_y
return 0 if @data[2] == 4 or @data[2] == 6
if @oy >= 10 and !@max_y
@max_y = true
elsif @oy <= 0 and @max_y
@max_y = false
end
if @oy < 10 and !@max_y
@oy += 0.25
elsif @oy > 0 and @max_y
@oy -= 0.25
end
return @oy
end
def opacity_by_distance
if $game_player.in_range?(@character, 2) and !$game_player.transparent
return 255
elsif $game_player.in_range?(@character, 3) and !$game_player.transparent
return 255/3*3
elsif $game_player.in_range?(@character, 4) and !$game_player.transparent
return 255/3*2
elsif $game_player.in_range?(@character, 5) and !$game_player.transparent
return 255/3
else
return 0
end
end
end
#------------------------------------------------------------------------------
class Spriteset_Map
alias vampyr_trace_spmap_create_characters create_characters
alias vampyr_trace_spmap_update_characters update_characters
alias vampyr_trace_spmap_dispose_characters dispose_characters
def create_characters
vampyr_trace_spmap_create_characters
create_doors_arrows
end
def create_doors_arrows
@arrows_sprites = []
for event in $game_map.events.values.compact
next if event.list == nil
for i in event.list
next unless (i.code == 108 or i.code == 408) and i.parameters[0] =~ /door/i
param = i.parameters[0].split(" ")
data = event.x+param[1].to_i, event.y+param[2].to_i, param[3].to_i, param[4].to_i
@arrows_sprites.push(Sprite_Arrow.new(@viewport1, event, data))
end
end
end
def update_characters
vampyr_trace_spmap_update_characters
for sprite in @arrows_sprites.compact
next unless $game_map.in_range?(sprite.character)
sprite.update
end
end
def dispose_characters
vampyr_trace_spmap_dispose_characters
@arrows_sprites.compact.each { |i| i.dispose }
end
def refresh_doors_arrows
@arrows_sprites.compact.each { |i| i.dispose }
create_doors_arrows
end
end
#------------------------------------------------------------------------------
class Scene_Map < Scene_Base
def refresh_doors_arrows
@spriteset.refresh_doors_arrows if @spriteset != nil
end
end
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
Por :
Kakashy Hatake
Marlos Gama
Vladimir Sistem
_________________
- Spoiler:
Re: -=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
Espero que le guste
_________________
- Spoiler:
Tópicos semelhantes
» -=[ Ψ † Super Pack Sistem Vampyr Script † 4 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † 1 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † 3 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † Ψ ]=-
» [RESOLVIDO]Problemas script Vampyr 1.6.4 R2
» -=[ Ψ † Super Pack Sistem Vampyr Script † 1 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † 3 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † Ψ ]=-
» [RESOLVIDO]Problemas script Vampyr 1.6.4 R2
Aldeia RPG :: RPG Maker :: Rpg Maker VX :: Scripts
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos