كود:
include("karaskel.lua")
include("zheolib.lua")
-------------------------------CONFIGURACIONES DE LA MACRO--------------------------------
script_name = "Dream Fight - Perfume"
script_description = "Corazones y vainitas"
script_author = "aelmiger gracias a Zheo Kami"
script_version = "0.8.1 Beta"
--FUNCIسN GENERADOR FX... NO TOCAR!!!
function fx_zheo(subs)
aegisub.progress.task("ESPERA MIESTRAS SE HACE EL FX... (Sale a dar una vuelta D:)")
local meta, styles = karaskel.collect_head(subs)
aegisub.progress.task("Aplicando tu Cagل de FX D:")
local i, ai, maxi, maxai = 1, 1, #subs, #subs
while i <= maxi do
aegisub.progress.task(string.format("Esto llevo trabajado (%d/%d)...", ai, maxai))
aegisub.progress.set((ai-1)/maxai*100)
local l = subs[i]
if l.class == "dialogue" and
not l.comment and
(l.style == "Default") then
karaskel.preproc_line(subs, meta, styles, l)
do_fx(subs, meta, l)
maxi = maxi - 1
subs.delete(i)
else
i = i + 1
end
ai = ai + 1
end
aegisub.progress.task("Al fin xDDD")
aegisub.progress.set(100)
end
--TERMINA FUNCION GENERADOR
-------------------------------TERMINA CONFIGURACIONES DE LA MACRO------------------------
-------------------------------ACء COMIENZAN LOS EFECTOS-----------------------------------
--CONFIGURACION DE X-Y
function do_fx(subs, meta, line)
for i = 1, line.kara.n do
--local actor=line.actor --flag en script .ass +++++++++++++No se como uuarlo+++++++++++++++
local syl = line.kara[i]
local x=syl.center + line.left
local y=line.margin_v + 30
if i ==1 then
tiempo=0
end
--if actor==1 then +++++++++++++++++++ Como usar esto ni idea++++++++++++++++
--FX INICIAL
--l = table.copy(line)
--l.text = string.format("{\\fad(100,0)\\an5\\pos(%d,%d)\\q3\\bord3\\be3\\blur10\\fry360\\1c&HFFFFFF&\\3c&HFFFFFF&\\t(\\frz360\\frx360\\q0\\1c%s\\3c%s\\bord1\\blur0\\be0\\frz0\\fry0)}%s",x,y,line.styleref.color1,line.styleref.color3,syl.text_stripped)
--l.start_time = line.start_time -1000
--l.end_time = line.start_time
--l.layer=0
--subs.append(l)
--else actor==2 then
--SILABAS ESTATICAS
--l = table.copy(line)
--l.text = string.format("{\\an5\\fade(100,0)\\pos(%d,%d)\\1c%s}%s",x,y,line.styleref.color1,syl.text_stripped)
--l.start_time = line.start_time+syl.start_time - 100
--l.end_time = syl.start_time
--l.layer=0
--subs.append(l)
--end +++++++++++++++++ No aplica mi puta idea ++++++++++++++++++++++++++
function sil()
silaba = ""..syl.text_stripped..""
return silaba
end
function blurco(valor)
blurC = "\\blur" ..math.floor(valor).. "\\bord" ..math.floor(valor+valor/2/1).. ""
return blurC
end
--FX INICIAL
--l = table.copy(line)
--l.text = string.format("{\\fad(100,0)\\an5\\pos(%d,%d)\\q3\\bord3\\be3\\blur10\\fry360\\1c&HFFFFFF&\\3c&HFFFFFF&\\t(\\frz360\\frx360\\q0\\1c%s\\3c%s\\bord1\\blur0\\be0\\frz0\\fry0)}%s",x,y,line.styleref.color1,line.styleref.color3,syl.text_stripped)
--l.start_time = line.start_time -1000
--l.end_time = line.start_time
--l.layer=0
--subs.append(l)
--FX INICIAL 2
l = table.copy(line)
l.text = string.format("{\\an5\\alpha&HFF&\\pos(%d,%d)\\1c%s\\t(\\alpha&H00&)}%s",x,y,line.styleref.color1,syl.text_stripped)
l.start_time = line.start_time
l.end_time = line.start_time+syl.start_time-100+tiempo
l.layer=0
subs.append(l)
--SILABAS ESTATICAS ++++++++++No colocar cuando aplique FX INICIAL 2++++++++++++++++
--l = table.copy(line)
--l.text = string.format("{\\an5\\pos(%d,%d)\\1c%s}%s",x,y,line.styleref.color1,syl.text_stripped)
--l.start_time = line.start_time
--l.end_time = line.start_time+syl.start_time
--l.layer=0
--subs.append(l)
--FX DE SILABAS
l = table.copy(line)
l.text = string.format("{\\an5\\pos(%d,%d)\\fscx100\\fscy100\\1c%s\\t(\\frz90\\blur10\\bord5\\frx360\\fry360\\fscx150\\fscy150\\fry-95\\fscx80\\fscy80\\frz-95\\frx-95\\blur0\\bord0))}%s", x, y, line.styleref.color2, syl.text_stripped)
l.start_time=line.start_time+syl.start_time
l.end_time=l.start_time+syl.duration
l.layer = 1
subs.append(l)
--Fx Particulas
l = table.copy(line)
for i=0,50 do
random_pos = math.random(100,500)
l.layer=0
l.text = string.format("{\\fad(0,200)\\move(%d,%d,%d,%d)\\an5\\shad0\\bord0\\be1\\1c&H29A5E5&\\t(\\fscx%d\\fscy%d))}{\\p%d}m 0 0 m 10 20 b 16 20 20 16 20 10 b 20 4 16 0 10 0 b 2 0 0 6 0 10 b 0 16 4 20 10 20 {\\p0}",x-math.random(-20,20),y-math.random(-20,20),x+math.random(-35,25),y+math.random(-35,25),random_pos,random_pos,math.random(4,6))
l.start_time=line.start_time+syl.start_time
l.end_time=l.start_time+syl.duration+math.random(100,200)
l.start_time=l.start_time+i
subs.append(l)
end
end
end
-------------------------------ACء TERMINAN LOS EFECTOS----------------------------------------------------
-------------------------------REGISTRO DE LA MACRO Y REGISTRO DE EXPORTACIN-------------------------------
aegisub.register_macro("JR-F FX!", "Aplica tu FX! D:", fx_zheo)
aegisub.register_filter("JR-F FX!", "Aplica tu FX! D:", 2000, fx_zheo)
-------------------------------TERMINO DE REGISTRO DE LA MACRO Y REGISTRO DE EXPORTACIN--------------------
المفضلات