[PHP]-- Aegisub Automation script
-- Original written by Ivan Tanev aka Crafty_Shadow
name = "HOLIC OP"
description = "HOLIC Blurry Shaking OP"
configuration = {}
version, kind = 3, 'basic_ass'
-->--includes and global variables
include("karaskel-adv.lua")
br=0
time=1
--<--end include
function do_syllable(meta, styles, config, line, syl)
-->>FUNCTION FOR RESULT PARSING>>--
local result = {n=0}
function result.add() local l = copy_line(line); table.insert(result, l); return l end
--<<FUNCTION FOR RESULT PARSING<<--
-->--check for empty line
if syl.text == "" then
return { n=0 }
end
if syl.text == " " then
return { n=0 }
end
--<--end check
-->-- x and y coordination definition
local x=syl.center + line.centerleft + 10
local y=line.styleref.margin_v + 13
--<-- end def
-->--check if a new line has started, and zero the brer if it has; increase the brer
if time ~= line.start_time then
time=line.start_time
br=-1
end
br=br+1
--<--end of check
-->--intro animation + TYPESET_CONSTANT_EFFECT
for b=0,10 do
l = result.add()
l.layer=25
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&HF F&\\t(\\alpha&HDF&)}%s", x+math.random(-7,7), y+math.random(-7,7), x+math.random(-1,1), y+math.random(-1,1), syl.text)
l.end_time = line.start_time
l.start_time = l.end_time - 50
end
--general animation sequence
z=(line.end_time - line.start_time - (line.end_time - line.start_time - syl.start_time/10))/10
for i=0,z do
bla=line.start_time + i*10
ble=bla+10
for b=0,10 do
l = result.add()
l.layer=5
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&HC F&}%s", x+math.random(-1,1), y+math.random(-1,1), x+math.random(-1,1), y+math.random(-1,1), syl.text)
l.start_time = bla
l.end_time = ble
end
end
--<--end intro animation
-->--real effect
--color change
for b=0,12 do
l = result.add()
l.layer=81
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&HE 4&\\fscx100\\t(\\1c&H292929&\\3c&HE6E6E8&)}%s", x+math.random(-1,1), y+math.random(-1,1), x+math.random(-1,1), y+math.random(-1,1), syl.text)
l.start_time = line.start_time + syl.start_time/10 + b
l.end_time = line.start_time + syl.start_time/10 + syl.duration + b*3
-->--extra_check(wether the syl goes on after line_end)
if l.end_time>line.end_time then
l.end_time = line.end_time
end
--<--end_extra_check
end
--multiple black and white layers
for i=0,15 do
l = result.add()
l.layer=30+i
if math.mod(i,2)==0 then
--black
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&H4 0&\\fscx80\\fscy80\\1c&H292929\\3c&HE6E6E8&\\t(\\a lpha&HF7&\\fscx30\\fscy30)}%s", x, y, x+math.random(-20,20), y+math.random(-30,30), syl.text)
else
--white
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&H8 0&\\fscx80\\fscy80 \\t(\\alpha&HF7&\\fscx30\\fscy30)}%s", x, y, x+math.random(-20,20), y+math.random(-30,30), syl.text)
end
l.start_time = line.start_time + syl.start_time/10
l.end_time = line.start_time + syl.start_time/10 + syl.duration + i*3
end
--<--end real effect
-->--TYPESET_CONSTANT_EFFECT + outro animation (Blur out)
z=(line.end_time - line.start_time - syl.start_time/10)/10
for i=0,(z-2) do
bla=line.start_time + syl.start_time/10 + syl.duration + i*10
ble=bla+10
for b=0,10 do
l = result.add()
l.layer=20
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&HC F&\\1c&H292929\\3c&HE6E6E8&}%s", x+math.random(-1,1), y+math.random(-1,1), x+math.random(-1,1), y+math.random(-1,1), syl.text)
l.start_time = bla
if (ble>(line.end_time)) then
l.end_time = line.end_time
else
l.end_time = ble
end
end
end
--Blur Out
ble = line.end_time + 40
bla = ble - 50
for b=0,10 do
l = result.add()
l.layer=2
l.text = string.format("{\\an5\\move(%d,%d,%d,%d)\\alpha&HD F&\\t(\\alpha&HFF&)\\1c&H292929\\3c&HE6E6E8&}%s" , x+math.random(-1,1), y+math.random(-1,1), x+math.random(-7,7), y+math.random(-7,7), syl.text)
l.start_time = bla
l.end_time = ble
end
--<--end outro animation
return result
end[/PHP]
المفضلات