المشاركة الأصلية كتبت بواسطة Cherik
السلام عليكم
أنا متبدأ في الكاريوكي، وأريد ان أعرف كيف أضيف سكريبتات مثل هذه:
[php]
include("karaskel-adv.lua")
jjj=1
ttt, fff=0, 45
xxx={n=20, [1]=6, [2]=12, [3]=16, [4]=19, [5]=20, [6]=19, [7]=16, [8]=12, [9]=6, [10]=0, [11]=-6, [12]=-12, [13]=-16, [14]=-19, [15]=-20, [16]=-19, [17]=-16, [18]=-12, [19]=-6, [20]=0}
yyy={n=20, [1]=-19, [2]=-16, [3]=-12, [4]=-6, [5]=0, [6]=6, [7]=12, [8]=16, [9]=19, [10]=20, [11]=19, [12]=16, [13]=12, [14]=6, [15]=0, [16]=-6, [17]=-12, [18]=-16, [19]=-19, [20]=-20}
function do_syllable(meta, styles, config, line, syl)
local result = {n=0}
function result.add() local l = copy_line(line); table.insert(result, l); return l end
if syl.text == "" or syl.text == " " then
return { n=0 }
end
local x=syl.center + line.centerleft
local y=line.margin_v + 50
local oki = syl.start_time + math.floor(syl.duration*8,5)
local okis = syl.start_time + math.floor(syl.duration*2,5)
l = result.add()
l.text = string.format("{\\an5\\pos(%d,%d)\\t(%d,%d,\\bord4 \\3c&HFFFFFF&\\1c&H%s&)\\t(%d,%d,\\bord2\\3c&H%s&) }%s", x, y, syl.start_time, okis, line.styleref.color2, oki, syl.end_time, line.styleref.color3, syl.text_stripped)
l.layer = ttt+2
posx=0
posy=-(syl.height+20)/40
for g = 1, 20 do
l = result.add()
kkk=syl.height+20
iii = 40
if syl.duration >40 then
kkkk=360
else
kkkk=180
end
posx= (xxx[g]*(kkk/4))/20
posy=(yyy[g]*(kkk/4))/20
l.text = string.format("{\\an5\\1c&HFFFFFF&\\bord1\\shad0\\ fscx%d\\fscy%d\\pos(%d,%d)\\org(%d,%d)\\t(\\fscx20 \\fscy20\\frz%d)\\fad(0,%d)}{\\p2}m 10 49 l 52 19 0 19 42 49 26 0{\\p0}", iii, iii,x+posx, y+2+posy, x+(posx*2), y+2+(posy*2), kkkk, syl.duration*10)
--m 0 0 l 0 -13 1 0 14 -7 2 1 14 7 1 2 1 15 0 2 -13 7 -1 1 -13 -7
l.start_time = line.start_time + syl.start_time/10
l.end_time = line.start_time + syl.end_time/10
l.layer = ttt
end
ttt=ttt+1
return result
end
include("karaskel-adv.lua")
jjj=1
ttt, fff=0, 45
xxx={n=20, [1]=6, [2]=12, [3]=16, [4]=19, [5]=20, [6]=19, [7]=16, [8]=12, [9]=6, [10]=0, [11]=-6, [12]=-12, [13]=-16, [14]=-19, [15]=-20, [16]=-19, [17]=-16, [18]=-12, [19]=-6, [20]=0}
yyy={n=20, [1]=-19, [2]=-16, [3]=-12, [4]=-6, [5]=0, [6]=6, [7]=12, [8]=16, [9]=19, [10]=20, [11]=19, [12]=16, [13]=12, [14]=6, [15]=0, [16]=-6, [17]=-12, [18]=-16, [19]=-19, [20]=-20}
function do_syllable(meta, styles, config, line, syl)
local result = {n=0}
function result.add() local l = copy_line(line); table.insert(result, l); return l end
if syl.text == "" or syl.text == " " then
return { n=0 }
end
local x=syl.center + line.centerleft
local y=line.margin_v + 50
local oki = syl.start_time + math.floor(syl.duration*8,5)
local okis = syl.start_time + math.floor(syl.duration*2,5)
l = result.add()
l.text = string.format("{\\an5\\pos(%d,%d)\\t(%d,%d,\\bord4 \\3c&HFFFFFF&\\1c&H%s&)\\t(%d,%d,\\bord2\\3c&H%s&) }%s", x, y, syl.start_time, okis, line.styleref.color2, oki, syl.end_time, line.styleref.color3, syl.text_stripped)
l.layer = ttt+2
posx=0
posy=-(syl.height+20)/40
for g = 1, 20 do
l = result.add()
kkk=syl.height+20
iii = 40
if syl.duration >40 then
kkkk=360
else
kkkk=180
end
posx= (xxx[g]*(kkk/4))/20
posy=(yyy[g]*(kkk/4))/20
l.text = string.format("{\\an5\\1c&HFFFFFF&\\bord1\\shad0\\ fscx%d\\fscy%d\\pos(%d,%d)\\org(%d,%d)\\t(\\fscx20 \\fscy20\\frz%d)\\fad(0,%d)}{\\p2}m 10 49 l 52 19 0 19 42 49 26 0{\\p0}", iii, iii,x+posx, y+2+posy, x+(posx*2), y+2+(posy*2), kkkk, syl.duration*10)
--m 0 0 l 0 -13 1 0 14 -7 2 1 14 7 1 2 1 15 0 2 -13 7 -1 1 -13 -7
l.start_time = line.start_time + syl.start_time/10
l.end_time = line.start_time + syl.end_time/10
l.layer = ttt
end
ttt=ttt+1
return result
end
include("karaskel-adv.lua")
jjj=1
ttt, fff=0, 45
xxx={n=20, [1]=6, [2]=12, [3]=16, [4]=19, [5]=20, [6]=19, [7]=16, [8]=12, [9]=6, [10]=0, [11]=-6, [12]=-12, [13]=-16, [14]=-19, [15]=-20, [16]=-19, [17]=-16, [18]=-12, [19]=-6, [20]=0}
yyy={n=20, [1]=-19, [2]=-16, [3]=-12, [4]=-6, [5]=0, [6]=6, [7]=12, [8]=16, [9]=19, [10]=20, [11]=19, [12]=16, [13]=12, [14]=6, [15]=0, [16]=-6, [17]=-12, [18]=-16, [19]=-19, [20]=-20}
function do_syllable(meta, styles, config, line, syl)
local result = {n=0}
function result.add() local l = copy_line(line); table.insert(result, l); return l end
if syl.text == "" or syl.text == " " then
return { n=0 }
end
local x=syl.center + line.centerleft
local y=line.margin_v + 50
local oki = syl.start_time + math.floor(syl.duration*8,5)
local okis = syl.start_time + math.floor(syl.duration*2,5)
l = result.add()
l.text = string.format("{\\an5\\pos(%d,%d)\\t(%d,%d,\\bord4 \\3c&HFFFFFF&\\1c&H%s&)\\t(%d,%d,\\bord2\\3c&H%s&) }%s", x, y, syl.start_time, okis, line.styleref.color2, oki, syl.end_time, line.styleref.color3, syl.text_stripped)
l.layer = ttt+2
posx=0
posy=-(syl.height+20)/40
for g = 1, 20 do
l = result.add()
kkk=syl.height+20
iii = 40
if syl.duration >40 then
kkkk=360
else
kkkk=180
end
posx= (xxx[g]*(kkk/4))/20
posy=(yyy[g]*(kkk/4))/20
l.text = string.format("{\\an5\\1c&HFFFFFF&\\bord1\\shad0\\ fscx%d\\fscy%d\\pos(%d,%d)\\org(%d,%d)\\t(\\fscx20 \\fscy20\\frz%d)\\fad(0,%d)}{\\p2}m 10 49 l 52 19 0 19 42 49 26 0{\\p0}", iii, iii,x+posx, y+2+posy, x+(posx*2), y+2+(posy*2), kkkk, syl.duration*10)
--m 0 0 l 0 -13 1 0 14 -7 2 1 14 7 1 2 1 15 0 2 -13 7 -1 1 -13 -7
l.start_time = line.start_time + syl.start_time/10
l.end_time = line.start_time + syl.end_time/10
l.layer = ttt
end
ttt=ttt+1
return result
end
[/php]أرجو الإفادة
وشكرا لكم
المفضلات