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 † 3 Parte Ψ ]=-
2 participantes
Aldeia RPG :: RPG Maker :: Rpg Maker VX :: Scripts
Página 1 de 1
-=[ Ψ † Super Pack Sistem Vampyr Script † 3 Parte Ψ ]=-
-=[ Ψ † Super Pack Sistem Vampyr Script 3 Parte † Ψ ]=-
Por :
Kakashy Hatake
Valentine
Vladimir Sistem
Bueno amigo hoy les tengo un Pack de barios Script :
Janua Sagitta.txt:
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
Por :
Kakashy Hatake
Valentine
Vladimir Sistem
Por :
Kakashy Hatake
Valentine
Vladimir Sistem
Bueno amigo hoy les tengo un Pack de barios Script :
Janua Sagitta.txt:
- Spoiler:
#==============================================================================
# Vampyr Janua Sagitta
#==============================================================================
# Put this comment on events: Door Index Direction X+ Y+
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Janua Sagitta", "0.1", "11/16/2010")
#------------------------------------------------------------------------------
class Game_Map
alias vjs_gmap_refresh refresh
def refresh
setup_doors_arrows
vjs_gmap_refresh
refresh_doors_arrows
end
def setup_doors_arrows
@doors_arrows = {}
for a in events.values.compact
next if a.list == nil
for b in a.list.compact
next unless (b.code == 108 or b.code == 408) and b.parameters[0] =~ /door/i
@doors_arrows[a.id] = a.page
end
end
end
def refresh_doors_arrows
refresh_doors = false
for a in events.values.compact
next if a.list == nil
for b in a.list.compact
next unless (b.code == 108 or b.code == 408) and b.parameters[0] =~ /door/i and
@doors_arrows[a.id] != a.page
refresh_doors = true
end
end
if refresh_doors and $scene.is_a?(Scene_Map)
$scene.refresh_doors_arrows
end
end
end
#------------------------------------------------------------------------------
class Sprite_Arrow < Sprite_Base
attr_reader :character
def initialize(viewport, character, data)
super(viewport)
self.bitmap = Bitmap.new(32, 32)
@character = character
@ox = 0
@oy = 0
refresh(data)
self.ox = self.bitmap.width/2
self.oy = self.bitmap.height/2
end
def refresh(data)
self.bitmap.clear
@data = data
index = (@data[3] <= 0 ? 1 : @data[3])
bitmap = Cache.system("Arrow ##{index}")
self.bitmap.blt(0, 0, bitmap, bitmap.rect)
@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
update
end
def update
super
if $game_player.in_range?(@character, 5)
self.visible = true
else
self.visible = false
end
return unless self.visible
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 <= distance_opacity and @blink
@blink = false
elsif self.opacity >= distance_opacity and !@blink
@blink = true
end
if self.opacity > distance_opacity and @blink
self.opacity -= 5
elsif self.opacity < distance_opacity 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 distance_opacity
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[3].to_i, event.y+param[4].to_i, param[2].to_i, param[1].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
- Spoiler:
#==============================================================================
# Vampyr Jump
#==============================================================================
Vampyr_Kernel.register("Vampyr Jump", 1.0, "09/01/2009")
#------------------------------------------------------------------------------
Jump_Key = Keys: # Key used to jump
Jump_Far_When_Dashing = true # Jump far when dashing? (true = yes/ false = no)
Jump_Distance = 2 # Range (in tiles) that hero jump
Jump_Dash_Distance = 3 # Range of jump when player is dashing
Jump_Dash_SE = "Dog" # SE playerd when jump far
Jump_Item = 15 # Item needed to jump (keep 0 if item is not necessary)
Jump_Switch = 0 # Switch needed to jump (keep 0 if switch is not necessary)
#------------------------------------------------------------------------------
class Game_Map
def jump_passable?(x, y, flag = 0x01)
for event in events_xy(x, y)
return false if event.priority_type == 1
end
passable?(x, y, flag)
end
end
#------------------------------------------------------------------------------
class Game_Player < Game_Character
alias vampyr_jump_initialize initialize
alias vampyr_jump_update update
def initialize
vampyr_jump_initialize
@jump_delay = 0
end
def update
vampyr_jump_update
@jump_delay -= 1 if @jump_delay > 0
update_jumping if jumpable?
end
def update_jumping
return unless Input.trigger?(Jump_Key) and @jump_delay <= 0
if Input.press?(Input::DOWN) ; jumping(2)
elsif Input.press?(Input::LEFT) ; jumping(4)
elsif Input.press?(Input::RIGHT) ; jumping(6)
elsif Input.press?(Input::UP) ; jumping(8)
else ; jumping(0)
end
@jump_delay = 30
end
def jumping(dir)
spaces = []
distance = ((dash? and Jump_Far_When_Dashing) ? Jump_Dash_Distance : Jump_Distance)
if dash? and Jump_Far_When_Dashing and Jump_Dash_SE != ""
RPG::SE.new(Jump_Dash_SE, 80).play
end
case dir
when 0
jump(0, 0)
when 2
for i in 0...distance+1
spaces << i if $game_map.jump_passable?(@x, @y+i)
end
jump(0, spaces.max)
when 4
for i in 0...distance+1
spaces << i if $game_map.jump_passable?(@x-i, @y)
end
jump(-spaces.max, 0)
when 6
for i in 0...distance+1
spaces << i if $game_map.jump_passable?(@x+i, @y)
end
jump(spaces.max, 0)
when 8
for i in 0...distance+1
spaces << i if $game_map.jump_passable?(@x, @y-i)
end
jump(0, -spaces.max)
end
end
def jumpable?
return false if $game_map.interpreter.running?
return false if Vampyr_Kernel.enabled?("Vampyr Transformations") and @bat_form
return false if Vampyr_Kernel.enabled?("Vampyr Transformations") and @mist_form
return false if Vampyr_Kernel.enabled?("Vampyr Transformations") and @mouse_form
return false if Vampyr_Kernel.enabled?("Vampyr Horror") and @sucking
return false if Jump_Item > 0 and !$game_party.has_item?($data_items[Jump_Item])
return false if Jump_Switch > 0 and !$game_switches[Jump_Switch]
return true
end
end
- Spoiler:
#==============================================================================
# Vampyr Kernel 1.5
#==============================================================================
# This module is necessary to activate and enhance compatibility of all Vampyr's Scripts
#------------------------------------------------------------------------------
module Vampyr_Kernel
@scripts = {}
@warnings = {}
Print_Errors = false
def self.register(script, version, date)
@scripts[script] = [version, date]
end
def self.enabled?(script, version=nil)
if @scripts.has_key?(script)
if version.nil?
return true
elsif @scripts[script][0] >= version
return true
else
if @warnings[script].nil? and Print_Errors
print "'#{script}' is obsolete.\r\nSome functions won't work correctly"
@warnings[script] = ["is obsolete"]
self.write_log
end
return false
end
else
if $TEST and @warnings[script].nil? and Print_Errors
print "Unable to find script '#{script}' or it is placed in wrong place.\r\nSome functions won't work correctly"
@warnings[script] = ["Unable to find"]
self.write_log
end
return false
end
end
def self.show_scripts(alert=true)
list = "Vampyr Scripts [#{@scripts.size}]:\r\n\r\n"
@scripts.each { |key, value| list += "#{key.gsub("Vampyr ", "")} #{value[0]} #{value[1]}\r\n" }
list += "\r\nWarnings:\r\n" if @warnings != {}
@warnings.each { |key, value| list += "#{key} #{value}\r\n" }
return print list if alert
return list
end
def self.write_log
file = File.new("Vampyr_Log-#{Time.now.strftime("%m_%d_%Y")}.txt", "wb")
file.write(self.show_scripts(false))
file.close
end
end
#------------------------------------------------------------------------------
class Object
def to_b
return true if self == "true"
return true if self.to_i > 0
return false
end
def getw
bitmap = Bitmap.new(1, 1)
size = bitmap.text_size(self.to_s).width
bitmap.dispose
return size
end
def to_rgb
x = self.delete("#").scan(/../).map { |i| i.to_i(16) }
return Color.new(x[0].to_f, x[1].to_f, x[2].to_f)
end
def number?
return true unless self.scan(/\d/).empty?
return false
end
def transform
return self.to_i if self.number?
return self.to_s
end
end
#------------------------------------------------------------------------------
class Sprite
def draw_icon(index, x, y, o=255)
bitmap = Cache.system("Iconset")
rect = Rect.new(index%16*24, index/16*24, 24, 24)
self.bitmap.blt(x, y, bitmap, rect, o)
end
end
#------------------------------------------------------------------------------
class Color
def self.index(i)
return Cache.system("Window").get_pixel(64+(i%8)*8, 96+(i/8)*8)
end
def self.get(x, y)
return Cache.system("Window").get_pixel(x, y)
end
end
#------------------------------------------------------------------------------
class Bitmap
def draw_outlined_text(*args)
if args[0].is_a?(Rect)
x = args[0].x
y = args[0].y
w = args[0].width
h = args[0].height
s = args[1]
a = (args[2].nil? ? 0 : args[2])
else
x = args[0]; y = args[1]
w = args[2]; h = args[3]
s = args[4]
a = (args[5].nil? ? 0 : args[5])
end
font.shadow = false
color = font.color.clone
font.color = Color.new(0,0,0)
draw_text(x-1, y-1, w, h, s, a)
draw_text(x+1, y-1, w, h, s, a)
draw_text(x-1, y+1, w, h, s, a)
draw_text(x+1, y+1, w, h, s, a)
font.color = color
draw_text(x, y, w, h, s, a)
end
end
#------------------------------------------------------------------------------
class Game_Map
def in_range?(object)
return true if object.is_a?(Game_Event) and object.comment_exists?("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
def update_events
for event in @events.values
if in_range?(event) or event.trigger >= 3 or event.comment_exists?("Forse Update")
event.update
end
end
for common_event in @common_events.values
common_event.update
end
end
def name
return load_data("Data/MapInfos.rvdata")[@map_id].name
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
attr_accessor :width
attr_accessor :height
def in_range?(target, range)
x = (@x - target.x) * (@x - target.x)
y = (@y - target.y) * (@y - target.y)
return true if (x + y) <= (range * range)
return false
end
def in_front?(target)
return true if @direction == 2 and @x == target.x and (@y+1) == target.y
return true if @direction == 4 and (@x-1) == target.x and @y == target.y
return true if @direction == 6 and (@x+1) == target.x and @y == target.y
return true if @direction == 8 and @x == target.x and (@y-1) == target.y
return false
end
def in_direction?(target)
return true if @direction == 2 and target.y >= @y and target.x == @x
return true if @direction == 4 and target.x <= @x and target.y == @y
return true if @direction == 6 and target.x >= @x and target.y == @y
return true if @direction == 8 and target.y <= @y and target.x == @x
return false
end
def in_behind?(target)
return true if @direction == 2 and @x == target.x and @y < target.y
return true if @direction == 4 and @x > target.x and @y == target.y
return true if @direction == 6 and @x < target.x and @y == target.y
return true if @direction == 8 and @x == target.x and @y > target.y
return false
end
def in_beside?(target)
return true if target.direction == 2 and @direction == 4 and target.x == (@x-1) and target.y == @y
return true if target.direction == 2 and @direction == 6 and target.x == (@x+1) and target.y == @y
return true if target.direction == 4 and @direction == 2 and target.x == @x and target.y == (@y+1)
return true if target.direction == 4 and @direction == 8 and target.x == @x and target.y == (@y-1)
return true if target.direction == 6 and @direction == 2 and target.x == @x and target.y == (@y+1)
return true if target.direction == 6 and @direction == 8 and target.x == @x and target.y == (@y-1)
return true if target.direction == 8 and @direction == 4 and target.x == (@x-1) and target.y == @y
return true if target.direction == 8 and @direction == 6 and target.x == (@x+1) and target.y == @y
return false
end
def face_to_face?(target)
return true if @direction == 2 and target.direction == 8
return true if @direction == 4 and target.direction == 6
return true if @direction == 6 and target.direction == 4
return true if @direction == 8 and target.direction == 2
return false
end
def over?(target)
return true if @x == target.x and @y == target.y
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(*params)
if params[0].is_a?(Numeric)
x = params[0]
y = params[1]
else
x = params[0].x
y = params[0].y
end
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 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(*params)
if params[0].is_a?(Numeric)
x = params[0]
y = params[1]
else
x = params[0].x
y = params[0].y
end
sx = distance_x(x)
sy = distance_y(y)
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(*params)
if params[0].is_a?(Numeric)
x = params[0]
y = params[1]
else
x = params[0].x
y = params[0].y
end
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(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 name
return @event.name
end
def check_comment(param)
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] =~ /#{param} (.*)/i
return $1.to_s
end
end
return nil
end
def comment_exists?(param)
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] =~ /#{param}/i
return true
end
end
end
return false
end
end
#------------------------------------------------------------------------------
class Game_Interpreter
attr_reader :id
alias vampyr_kernel_ginterpreter_setup setup
def setup(list, event_id = 0)
vampyr_kernel_ginterpreter_setup(list, event_id)
@id = @original_event_id
end
def self_event
return $game_map.events[@id]
end
def selfswitch(switch, status=nil, event_id=@id)
key = [$game_map.map_id, event_id, switch]
if status == nil
$game_self_switches[key] = !$game_self_switches[key]
else
$game_self_switches[key] = status
end
$game_map.need_refresh = true
end
end
#------------------------------------------------------------------------------
class Sprite_Character < Sprite_Base
alias vampyr_kernel_spchar_update_bitmap update_bitmap
def update_bitmap
vampyr_kernel_spchar_update_bitmap
@character.width = @cw if @character.width != @cw
@character.height = @ch if @character.height != @ch
end
end
#------------------------------------------------------------------------------
Win32API.new("kernel32", "SetPriorityClass", "pi", "i").call(-1, 0x80)
- Spoiler:
#==============================================================================
# Module Keys
#==============================================================================
module Keys
Localle = "EN-US"
MOUSEL = 0x01
MOUSER = 0x02
MOUSEM = 0x04
CANCEL = 0x03
BACKSPACE = 0x08
TAB = 0x09
CLEAR = 0x0C
ENTER = 0x0D
SHIFT = 0x10
CONTROL = 0x11
MENU = 0x12
PAUSE = 0x13
ESC = 0x1B
CONVERT = 0x1C
NONCONVERT = 0x1D
ACCEPT = 0x1E
SPACE = 0x20
PAGEUP = 0x21
PAGEDOWN = 0x22
ENDS = 0x23
HOME = 0x24
LEFT = 0x25
UP = 0x26
RIGHT = 0x27
DOWN = 0x28
SELECT = 0x29
PRINT = 0x2A
EXECUTE = 0x2B
SNAPSHOT = 0x2C
DELETE = 0x2E
HELP = 0x2F
LSHIFT = 0xA0
RSHIFT = 0xA1
LCONTROL = 0xA2
RCONTROL = 0xA3
LMENU = 0xA4
RMENU = 0xA5
PACKET = 0xE7
NUM0 = 0x30
NUM1 = 0x31
NUM2 = 0x32
NUM3 = 0x33
NUM4 = 0x34
NUM5 = 0x35
NUM6 = 0x36
NUM7 = 0x37
NUM8 = 0x38
NUM9 = 0x39
A = 0x41
B = 0x42
C = 0x43
D = 0x44
E = 0x45
F = 0x46
G = 0x47
H = 0x48
I = 0x49
J = 0x4A
K = 0x4B
L = 0x4C
M = 0x4D
N = 0x4E
O = 0x4F
P = 0x50
Q = 0x51
R = 0x52
S = 0x53
T = 0x54
U = 0x55
V = 0x56
W = 0x57
X = 0x58
Y = 0x59
Z = 0x5A
LWIN = 0x5B
RWIN = 0x5C
APPS = 0x5D
SLEEP = 0x5F
BROWSER_BACK = 0xA6
BROWSER_FORWARD = 0xA7
BROWSER_REFRESH = 0xA8
BROWSER_STOP = 0xA9
BROWSER_SEARCH = 0xAA
BROWSER_FAVORITES = 0xAB
BROWSER_HOME = 0xAC
VOLUME_MUTE = 0xAD
VOLUME_DOWN = 0xAE
VOLUME_UP = 0xAF
MEDIA_NEXT_TRACK = 0xB0
MEDIA_PREV_TRACK = 0xB1
MEDIA_STOP = 0xB2
MEDIA_PLAY_PAUSE = 0xB3
LAUNCH_MAIL = 0xB4
LAUNCH_MEDIA_SELECT = 0xB5
LAUNCH_APP1 = 0xB6
LAUNCH_APP2 = 0xB7
PROCESSKEY = 0xE5
ATTN = 0xF6
CRSEL = 0xF7
EXSEL = 0xF8
EREOF = 0xF9
PLAY = 0xFA
ZOOM = 0xFB
PA1 = 0xFD
NUMPAD0 = 0x60
NUMPAD1 = 0x61
NUMPAD2 = 0x62
NUMPAD3 = 0x63
NUMPAD4 = 0x64
NUMPAD5 = 0x65
NUMPAD6 = 0x66
NUMPAD7 = 0x67
NUMPAD8 = 0x68
NUMPAD9 = 0x69
MULTIPLY = 0x6A
ADD = 0x6B
SEPARATOR = 0x6C
SUBTRACT = 0x6D
DECIMAL = 0x6E
DIVIDE = 0x6F
F1 = 0x70
F2 = 0x71
F3 = 0x72
F4 = 0x73
F5 = 0x74
F6 = 0x75
F7 = 0x76
F8 = 0x77
F9 = 0x78
F10 = 0x79
F11 = 0x7A
F12 = 0x7B
CAPITAL = 0x14
MODECHANGE = 0x1F
INSERT = 0x2D
NUMLOCK = 0x90
SCROLL = 0x91
COMMADOT = 0xBA # ; :
EQUAL = 0xBB # = +
COMMA = 0xBC # , <
MINUS = 0xBD # - _
DOT = 0xBE # . >
BAR = 0xBF # / ?
ACCENT = 0xC0 # ` ~
LBRACKET = 0xDB # [ {
DASH = 0xDC # \ |
RBRACKET = 0xDD # ] }
QUOTE = 0xDE # ' "
OEM_8 = 0xDF
OEM_9 = 0xE1
OEM_10 = 0x92
OEM_11 = 0x93
OEM_12 = 0x94
OEM_13 = 0x95
OEM_14 = 0x96
OEM_15 = 0xE3
OEM_16 = 0xE4
OEM_17 = 0xE6
OEM_18 = 0xE9
OEM_19 = 0xEA
OEM_20 = 0xEB
OEM_21 = 0xEC
OEM_22 = 0xED
OEM_23 = 0xEE
OEM_24 = 0xEF
OEM_25 = 0xF1
OEM_26 = 0xF2
OEM_27 = 0xF3
OEM_28 = 0xF4
OEM_29 = 0xF5
OEM_102 = 0xE2
OEM_CLEAR = 0xFE
def self.capital?
return false if Win32API.new("user32", "GetKeyState", "i", "i").call(CAPITAL) == 0
return true
end
Numbers = [0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69]
Values = {}
Values["ALL"] = {0x20 => [" "], 0x30 => ["0", ")"], 0x31 => ["1", "!"],
0x32 => ["2", "@"], 0x33 => ["3", "#"], 0x34 => ["4", "$"], 0x35 => ["5", "%"],
0x36 => ["6", "¨"], 0x37 => ["7", "&"], 0x38 => ["8", "*"], 0x39 => ["9", "("],
0x41 => ["a", "A"], 0x42 => ["b", "B"], 0x43 => ["c", "C"], 0x44 => ["d", "D"],
0x45 => ["e", "E"], 0x46 => ["f", "F"], 0x47 => ["g", "G"], 0x48 => ["h", "H"],
0x49 => ["i", "I"], 0x4A => ["j", "J"], 0x4B => ["k", "K"], 0x4C => ["l", "L"],
0x4D => ["m", "M"], 0x4E => ["n", "N"], 0x4F => ["o", "O"], 0x50 => ["p", "P"],
0x51 => ["q", "Q"], 0x52 => ["r", "R"], 0x53 => ["s", "S"], 0x54 => ["t", "T"],
0x55 => ["u", "U"], 0x56 => ["v", "V"], 0x57 => ["w", "W"], 0x58 => ["x", "X"],
0x59 => ["y", "Y"], 0x5A => ["z", "Z"], 0x60 => ["0"], 0x61 => ["1"],
0x62 => ["2"], 0x63 => ["3"], 0x64 => ["4"], 0x65 => ["5"], 0x66 => ["6"],
0x67 => ["7"], 0x68 => ["8"], 0x69 => ["9"], 0x6A => ["*"], 0x6B => ["+"],
0x6D => ["-"], 0x6E => [","], 0x6F => ["/"], 0xBB => ["=", "+"], 0xBC => [",", "<"],
0xBD => ["-", "_"], 0xBE => [".", ">"]}
Values["EN-US"] = {0xBA => [";", ":"], 0xBF => ["/", "?"], 0xC0 => ["´", "~"],
0xDB => ["[", "{"], 0xDC => ["","|"], 0xDD => ["]", "}"], 0xDE => ["'", """]}
Values["PT-BR"] = {0xBA => ["ç", "Ç"], 0xBF => [";", ":"], 0xC0 => ["'", """],
0xC1 => ["/", "?"], 0xC2 =>["."], 0xDB => ["´", "`"], 0xDC => ["]", "}"],
0xDD => ["[", "{"], 0xDE => ["~", "^"], 0xE2 => ["","|"]}
def self.name(id)
return (Names.keys.include?(id) ? Names[id] : "???")
end
def self.value(id)
if Values["ALL"].keys.include?(id)
return Values["ALL"][id]
elsif Values[Localle].keys.include?(id)
return Values[Localle][id]
else
return ""
end
end
end
#------------------------------------------------------------------------------
module Input
LEFT = 0x25
UP = 0x26
RIGHT = 0x27
DOWN = 0x28
A = 0xA0, 0xA1
B = 0x1B, 0x58, 0x60
C = 0x0D, 0x20, 0x43
X = 0x41
Y = 0x53
Z = 0x44
L = 0x21, 0x51
R = 0x22, 0x57
SHIFT = 0x10
CTRL = 0x11
ALT = 0x12
F5 = 0x74
F6 = 0x75
F7 = 0x76
F8 = 0x77
F9 = 0x78
@time = Array.new(256, 0)
@press = Array.new(256, false)
@trigger = Array.new(256, false)
@repeat = Array.new(256, false)
@release = Array.new(256, false)
@dirs = [0, 0]
InputInitialize = Win32API.new("Input", "InputInitialize", "LLLLLL", "")
InputUpdate = Win32API.new("Input", "InputUpdate", "", "")
InputInitialize.call(
@time.object_id, @press.object_id, @trigger.object_id,
@repeat.object_id, @release.object_id, @dirs.object_id
)
def self.update
InputUpdate.call
end
def self.trigger?(id)
@trigger.indexes(*id.to_a).include?(true)
end
def self.press?(id)
@press.indexes(*id.to_a).include?(true)
end
def self.triggerd?(id)
return true if triggered.include?(id)
return false
end
def self.pressed?(id)
return true if pressed.include?(id)
return false
end
def self.repeat?(id)
@repeat.indexes(*id.to_a).include?(true)
end
def self.release?(id)
@release.indexes(*id.to_a).include?(true)
end
def self.triggered
array = Array.new
@trigger.each_index {|i| array << i if @trigger[i]}
return array
end
def self.pressed
array = Array.new
@press.each_index {|i| array << i if @press[i]}
return array
end
def self.repeated
array = Array.new
@repeat.each_index {|i| array << i if @repeat[i]}
return array
end
def self.released
array = Array.new
@release.each_index {|i| array << i if @release[i]}
return array
end
def self.dir4
@dirs[0]
end
def self.dir8
@dirs[1]
end
end
#------------------------------------------------------------------------------
unless File.exists?("Input.dll")
print("Unlable to load file - Input.dll")
exit
end
- Spoiler:
#==============================================================================
# Vampyr Lantern
#==============================================================================
# Key that turns on/off the lantern
Lantern_Key = Input::Z
# Item needed to use lantern
Lantern_Item = 0
# Switch that set the room dark
Lantern_Switch = 1
# Don't toutch
$Lantern = false
#------------------------------------------------------------------------------
class Spriteset_Map
alias vampyr_lanter_spmap_initialize initialize
alias vampyr_lanter_spmap_update update
alias vampyr_lanter_spmap_dispose dispose
def initialize
vampyr_lanter_spmap_initialize
create_lantern
end
def update
vampyr_lanter_spmap_update
update_lantern
end
def dispose
vampyr_lanter_spmap_dispose
dispose_lantern
end
def create_lantern
@dark = Sprite.new(@viewport2)
@dark.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@light = Sprite.new(@viewport2)
@light.bitmap = Cache.system("Lantern")
@switch = $game_switches[Lantern_Switch]
check_lantern
end
def refresh_lantern
return if @dark == nil or @dark.disposed?
return if @light == nil or @light.disposed?
@direction = $game_player.direction
@dark.bitmap.clear
@dark.bitmap.fill_rect(@dark.bitmap.rect, Color.new(0,0,0,245))
@light.opacity = ($Lantern ? 245 : 0)
return unless $Lantern
case $game_player.direction
when 2
@dark.bitmap.clear_rect($game_player.screen_x-80, $game_player.screen_y-32, 160, 160)
@light.src_rect.set(0, 0, 160, 160)
@light.x = $game_player.screen_x - 80
@light.y = $game_player.screen_y-32
when 4
@dark.bitmap.clear_rect($game_player.screen_x-144, $game_player.screen_y-80, 160, 160)
@light.src_rect.set(160, 0, 160, 160)
@light.x = $game_player.screen_x - 144
@light.y = $game_player.screen_y - 80
when 6
@dark.bitmap.clear_rect($game_player.screen_x-16, $game_player.screen_y-80, 160, 160)
@light.src_rect.set(320, 0, 160, 160)
@light.x = $game_player.screen_x - 16
@light.y = $game_player.screen_y - 80
when 8
@dark.bitmap.clear_rect($game_player.screen_x-80, $game_player.screen_y-144, 160, 160)
@light.src_rect.set(480, 0, 160, 160)
@light.x = $game_player.screen_x - 80
@light.y = $game_player.screen_y - 144
end
end
def check_lantern
if $game_switches[Lantern_Switch]
@dark.visible = true if @dark != nil and !@dark.disposed?
@light.visible = true if @light != nil and !@light.disposed?
refresh_lantern
else
@dark.visible = false if @dark != nil and !@dark.disposed?
@light.visible = false if @light != nil and !@light.disposed?
end
end
def update_lantern
return if @dark == nil or @dark.disposed?
return if @light == nil or @light.disposed?
if !$game_player.transfer? and @switch != $game_switches[Lantern_Switch]
@switch = $game_switches[Lantern_Switch]
check_lantern
end
if !@lantern and $game_switches[Lantern_Switch]
check_lantern unless $game_player.transfer?
@lantern = true
elsif @lantern and $game_switches[Lantern_Switch]
check_lantern unless $game_player.transfer?
@lantern = false
end
return unless $game_switches[Lantern_Switch]
if Input.trigger?(Lantern_Key) and
(Lantern_Item <= 0 or $game_party.has_item?($data_items[Lantern_Item]) or $TEST)
RPG::SE.new("Cursor").play
$Lantern = !$Lantern
refresh_lantern
end
if $Lantern and ($game_player.moving? or @direction != $game_player.direction)
refresh_lantern
end
end
def dispose_lantern
@dark.dispose if @dark != nil and !@dark.disposed?
@light.dispose if @light != nil and !@light.disposed?
end
end
Esto es todo de :
-=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
Por :
Kakashy Hatake
Valentine
Vladimir Sistem
Última edição por Kakashy Hatake em Ter Mar 15, 2011 3:01 am, editado 1 vez(es)
_________________
- Spoiler:
Re: -=[ Ψ † Super Pack Sistem Vampyr Script † 3 Parte Ψ ]=-
Espero que le guste
_________________
- Spoiler:
Re: -=[ Ψ † Super Pack Sistem Vampyr Script † 3 Parte Ψ ]=-
Aff Sempre floods no fim dos tópicos....
¬¬
¬¬
_________________
Com um pouco de criatividade o BOM fica ainda MELHOR.
By: Ykky
By: Ykky
Parceiro...
- Spoiler:
SrºJokker- Experiente
- Mensagens : 591
Créditos : 234
Re: -=[ Ψ † Super Pack Sistem Vampyr Script † 3 Parte Ψ ]=-
ahahahaa si por que eran mucho Script
_________________
- Spoiler:
Tópicos semelhantes
» -=[ Ψ † Super Pack Sistem Vampyr Script † 1 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † 4 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † Ψ ]=-
» [RESOLVIDO]Problemas script Vampyr 1.6.4 R2
» -=[ Ψ † Super Pack Sistem Vampyr Script † 2 Parte Ψ ]=-
» -=[ Ψ † Super Pack Sistem Vampyr Script † 4 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
|
|