Scene Teleport FFXII
Compativel com: RMVX,
Compatibilidade : ?
Facilidade de uso: ?
Lag gerado: ?
[box class=titlebg]
Para que serve o script
[/box]
Assim como no jogo Final Fantasy 12, esse script possibilita que você crie ponto de teletransporte em determinados locais usando um item chamado teleport stone (no game esses pontos também serviam para salvar o progresso no game).
[box class=titlebg]
Script
[/box]
#-------------------------------------------------------------------------------
# :..: Scene Teleport FFXII
# by: Master I
#-------------------------------------------------------------------------------
module Pernalonga
Teleport_data = []
#===============================================================================
# Fonte, Tamanho, ID_Item, Tempo, Animação, Sons, Efeito do Tremor,
# Largura & Altura, Windowskin
#-------------------------------------------------------------------------------
Teleport_font = ["Arial Narrow", 16]
Teleport_item = 21
Teleport_time = 250
Teleport_animation = 80
Teleport_sons = ["Teleport IN", "Teleport OUT"]
Teleport_tremor = [5,3]
Teleport_LG = [150,150]
Teleport_windowskin = "vx-sepia01"
#===============================================================================
#Teleport_data[Ordem] = [ID do Mapa, Posx, Posy1, Swtich]
#-------------------------------------------------------------------------------
Teleport_data[0] = [3, 18, 29, 1] #Town
Teleport_data[1] = [11, 10, 10, 1] #Village
Teleport_data[2] = [12, 14, 27, 2] #Village |snow|
Teleport_data[3] = [2, 13, 19, 3] #Desert Town
Teleport_data[4] = [4, 15, 18, 6] #Castle
Teleport_data[5] = [10, 41, 19, 4] #Field
Teleport_data[6] = [1, 18, 41, 5] #Dugeon
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Fim das Configurações
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#===============================================================================
# Window Teleport
#-------------------------------------------------------------------------------
class Window_Teleport < Window_Selectable
include Pernalonga
def initialize(x, y, width, height)
super(x, y, width, height)
@column_max = 1
self.index = 0
self.windowskin = Cache.system(Teleport_windowskin)
refresh
end
def teleport
return @data[index]
end
def refresh
@data = []
for i in 0...Teleport_data.size
if $game_switches[Teleport_data[i][3]] and not Teleport_data[i][0] == $game_map.map_id
@data.push(Teleport_data[i])
end
end
@item_max = @data.size
create_contents
for i in 0...@item_max
draw_item(i)
end
end
def draw_item(index)
self.contents.font.name = Teleport_font[0]
self.contents.font.size = Teleport_font[1]
nome = load_data("Data/MapInfos.rvdata")[@data[index][0]].name
self.contents.draw_text(0, 24 * index, 100, WLH, nome)
end
end
#===============================================================================
# Scene Teleport
#-------------------------------------------------------------------------------
class Scene_Teleport < Scene_Base
include Pernalonga
def start
super
@guardar = []
@mapa = Spriteset_Map.new
y = $game_player.screen_y - Teleport_LG[0] / 2 if $game_player.screen_y <= 304
y = $game_player.screen_y / 2 if $game_player.screen_y > 305
x = $game_player.screen_x + 20 if $game_player.screen_x <= 300
x = $game_player.screen_x - Teleport_LG[1] / 2 if $game_player.screen_x >= 301
@teleport = Window_Teleport.new(x, y, Teleport_LG[0], Teleport_LG[1])
@animação = Sprite_Base.new
@teleport.active = true
@sair = 0
@p_sair = false
end
def update
super
@teleport.update
@mapa.update
@animação.update
$game_map.interpreter.update
$game_system.update
$game_map.update
@sair += 1 if @p_sair
saida
udpate_selection
end
def terminate
super
@teleport.dispose
@mapa.dispose
@animação.dispose
@sair = 0
@p_sair = false
end
def udpate_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
item = $data_items[Teleport_item]
item_número = $game_party.item_number(item)
if @teleport.teleport != nil and item_número > 0
@animação.start_animation($data_animations[Teleport_animation])
Audio.se_play("Audio/ME/" + Teleport_sons[0], 100)
$game_party.lose_item(item, 1)
@teleport.visible = false
tone = Tone.new(255,255,255,255)
$game_map.screen.start_tone_change(tone, 120)
$game_map.screen.start_shake(Teleport_tremor[0],Teleport_tremor[1],120)
RPG::BGM.fade(1500)
@p_sair = true
# Graphics.wait(60)
else
Sound.play_buzzer
end
end
end
def saida
if @sair == Teleport_time - 80
$game_map.setup(@teleport.teleport[0])
$game_map.autoplay
elsif @sair == Teleport_time
#@sair = 300
pode_sair
@p_sair = false
end
end
def pode_sair
# $game_map.setup(@teleport.teleport[0])
# $game_map.autoplay
Audio.se_play("Audio/ME/" + Teleport_sons[1], 100)
tone = Tone.new(0,0,0,0)
$game_map.screen.start_tone_change(tone, 120)
$game_map.screen.start_shake(Teleport_tremor[0],Teleport_tremor[1],120)
$game_player.moveto(@teleport.teleport[1],@teleport.teleport[2])
Graphics.wait(60)
@animação.start_animation($data_animations[Teleport_animation])
$scene = Scene_Map.new
end
end
$pernalonga = {} if $pernalonga == nil
$pernalonga = {"Teleport_FFXII" => true}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Fim do Script
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[box class=titlebg]
Imagens
[/box]
Spoiler
(http://img134.imageshack.us/img134/598/demo1t.png)
(http://img55.imageshack.us/img55/4070/demo2.png)
(http://img301.imageshack.us/img301/1740/demo3.png)
(http://img241.imageshack.us/img241/5973/demo4.png)
[box class=titlebg]
Download
[/box]
Download (http://www.4shared.com/file/113976661/ab4897f6/Teleport_FFXII.html)
[box class=titlebg]
Créditos e Avisos
[/box]
Criador : Master I
Valeu cara!eu uso o VX e não tem muitos scripts desses aí...
Valeu por postar aqui.
Spoiler
+1 ouro :cool:
Não teste o sistema,mas acredito que não seja muito difícil fazer isso por eventos,mas um script plug'n'play sempre facilita a nossa vida.Não vou baixar porque não preciso,mas vou dar rep por ter postado aqui.
Bom, apesar de fazer tempo que responderam aqui
O script tem um bug de você abrir o menu ou você apertar Z de novo, isso é um bug terrível, tem como alguém dar um jeito?