PDA

View Full Version : Mọi người ơi. Help!



thuoclano12
09-09-10, 11:52 AM
Em đang chơi server thiệnácphântranh lúc load gameserver nó báo lỗi error cái file trungsinh.lua trong script. Giúp em sửa với. Thanks ^:)^

yukite26
09-09-10, 01:22 PM
Em đang chơi server thiệnácphântranh lúc load gameserver nó báo lỗi error cái file trungsinh.lua trong script. Giúp em sửa với. Thanks ^:)^

Vào thư mục Server --> Vào thư mục Script --> Vào thư mục skill --> Mở file trungsinh.lua lên và xóa toàn bộ nội dung trong đó, rùi chép nội dung này vào và save lại là hết lỗi !



Trích:
--µü´úº¯Êý£¬ÓÃÓÚ¼ÆËã¼¼ÄÜÊìÁ ·¶È
--¾ßÌå·½·¨£º
--¸ù¾Ý1¼¶ÊìÁ·¶È£¬Éý¼¶¼ÓËÙ¶È� �� �¬¼¶Êý£¬Öظ´É˺¦´ÎÊý£¬·¶� �� �£¬¼ÆËã³öÏàÓ¦µÈ¼¶ÊìÁ·¶È


SKILLS={
kynanghotro = {
allresmax_p = {{1,0},{2,1},{3,2},{4,3},{5,4},{6,5},{7,6},{8,7},{ 9,8},{10,9},{11,10},{20,10}},
lifereplenish_v = {{1,0},{2,0},{3,0},{4,0},{5,50},{6,50},{7,50},{8,5 0},{9,50},{10,100},{11,100},{12,100},{13,100},{14, 100},{15,200},{16,200},{17,200},{18,200},{19,200}, {20,300},},
manareplenish_v = {{1,0},{2,0},{3,0},{4,0},{5,50},{6,50},{7,50},{8,5 0},{9,50},{10,100},{11,100},{12,100},{13,100},{14, 100},{15,200},{16,200},{17,200},{18,200},{19,200}, {20,300},},
strength_v = {{1,0},{20,0}},
dexterity_v = {{1,0},{20,0}},
vitality_v = {{1,0},{20,0}},
energy_v = {{1,0},{20,0}},
fastwalkrun_p = {{1,0},{2,10},{3,10},{4,10},{5,20},{6,20},{7,20},{ 8,20},{9,20},{10,30},{11,30},{12,30},{13,30},{14,3 0},{15,30},{16,40},{17,40},{18,40},{19,40},{20,50} },
},
}
-----------------------------------------------
--Create by yfeng 2004-05-20
-----------------------------------------------

-----------------------------------------------
--¸ù¾Ý2¸öµã£¬ÇóÏßÐκ¯Êýf(x)=k*x+ b
--y= (y2-y1)*(x-x1)/(x2-x1)+y1
--µ±x2=x1, ÓÐx=c,¸ÃÖ±ÏßÊÇÒ»Ìõ´¹Ö±ÓÚxÖá� �� �ÄÖ±Ïß
--ÕâÊÇ¿ÉÒÔÈ¡µÃy=ÈÎÒâÖµ
--Òò´Ë£¬Èç¹ûÒÑÖªÁ½µã(x1,y1),(x2,y2 )¿ÉÇóµÃ¹ý´Ë2µãµÄ
--º¯ÊýΪ£º
function Line(x,x1,y1,x2,y2)
if(x2==x1) then
return y2
end
return (y2-y1)*(x-x1)/(x2-x1)+y1
end

-----------------------------------------------
--¸ù¾Ý2¸öµã£¬Çó2´ÎÐκ¯Êýf(x)=a*x 2+c
--y= (y2-y1)*x*x/(x2*x2-x1*x1)-(y2-y1)*x1*x1/(x2*x2-x1*x1)+y1
--µ±x1»òÕßx2 < 0 ,y =0
--µ±x2=x1, ÓÐx=c,ÊÇÒ»Ìõ´¹Ö±ÓÚxÖáµÄÖ±Ïß
--ÕâÊÇ¿ÉÒÔÈ¡µÃy=ÈÎÒâÖµ
--Òò´Ë£¬Èç¹ûÒÑÖªÁ½µã(x1,y1),(x2,y2 )¿ÉÇóµÃ¹ý´Ë2µãµÄ
--º¯ÊýΪ£ºextrac
function Conic(x,x1,y1,x2,y2)
if((x1 < 0) or (x2<0))then
return 0
end
if(x2==x1) then
return y2
end
return (y2-y1)*x*x/(x2*x2-x1*x1)-(y2-y1)*x1*x1/(x2*x2-x1*x1)+y1
end

-----------------------------------------------
--¸ù¾Ý2¸öµã£¬Çó-2´ÎÐκ¯Êýf(x)=a*sqrt(x2)+c
--y=(y2-y1)*x/(sqrt(x2)-sqrt(x1))+y1-(y2-y1)/((sqrt(x2)-sqrt(x1))
--µ±x2»òÕßx1<0, y=0,
--µ±x1=x2,ÓÐx=c,ÊÇÒ»Ìõ´¹Ö±ÓÚxÖáµ� �� �Ö±Ïß
--ÕâÊÇ¿ÉÒÔÈ¡µÃy=ÈÎÒâÖµ
--Òò´Ë£¬Èç¹ûÒÑÖªÁ½µã(x1,y1),(x2,y2 )¿ÉÇóµÃ¹ý´Ë2µãµÄ
--º¯ÊýΪ£ºextrac
function Extrac(x,x1,y1,x2,y2)
if((x1 < 0) or (x2<0))then
return 0
end
if(x2==x1) then
return y2
end
return (y2-y1)*(x-x1)/(x2-x1)+y1
end

-----------------------------------------------
--Ãè»æÁ¬½ÓÏß:Link(x,points)
--¸ù¾ÝpointsÌṩµÄһϵÁе㣬Óà ÏàÁÚµÄÁ½¸öµãÃè»æÇúÏß
--return yÖµ
--x ÊäÈëÖµ
--points µã¼¯ºÏ
--ÐÎÈ磺pointsÊÇÐÎÈç{{x1,y1,func=xxx},{x 2,y2,func=xxx},...{xn,yn,func=xxx}}µÄÓ³Éä
function Link(x,points)
num = getn(points)
if(num<2) then
return -1
end
for i=1,num do
if(points[i][3]==nil) then
points[i][3]=Line
end
end
if(x < points[1][1]) then
return points[1][3](x,points[1][1],points[1][2],points[2][1],points[2][2])
end
if(x > points[num][1]) then
return points[num][3](x,points[num-1][1],points[num-1][2],points[num][1],points[num][2])
end

c = 2
for i=2,num do
if((x >= points[i-1][1]) and (x <= points[i][1])) then
c = i
break
end
end
return points[c][3](x,points[c-1][1],points[c-1][2],points[c][1],points[c][2])
end

------------------------------------------------------
--¼¼ÄÜÉ趨¸ñʽÈçÏ£º
--SKILLS={
-- ¼¼ÄÜÃû³Æ= {
-- ħ·¨ÊôÐÔ= {
-- [1]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [2]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [3]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- }£¬
-- ħ·¨ÊôÐÔ= {
-- [1]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [2]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [3]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- }£¬
-- ¡£¡£¡£¡£¡£
-- }£¬
-- ¼¼ÄÜÃû³Æ= {
-- ħ·¨ÊôÐÔ= {
-- [1]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [2]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [3]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- }£¬
-- ħ·¨ÊôÐÔ= {
-- [1]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [2]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- [3]={{¼¶±ð,ÊýÖµ£¬ÇúÏß}£¬{¼¶±ð£¬ ÊýÖµ£¬ÇúÏß}£¬¡£¡£¡£¡£}£¬
-- }£¬
-- ¡£¡£¡£¡£¡£
-- }£¬
-- ¡£¡£¡£¡£¡£
--}
--È磺
--SKILLS={
-- Sanhuan-taoyue={
-- physicsenhance_p={
-- [1]={{1,50},{20,335}},--ħ·¨ÊôÐÔphysicsenhance_p²ÎÊý1£¬1¼¶ ʱΪ35£¬20¼¶Ê±Îª335£¬ÇúÏß²»Ì� �� �£¬Ä¬ÈÏÏßÐÎ
-- [2]={{1,0},{20,0}},
-- },--ûÓÐ[3]£¬±íʾħ·¨ÊôÐÔphysicsenhance_p²ÎÊ ý2£¬Ä¬ÈÏΪÈκÎʱºò¶¼ÊÇ0
-- lightingdamage_v={
-- [1]={{1,65},{20,350}},
-- [3]={{1,65},{20,350}},
-- }
-- }
--}
--ÒÔÉÏÃèÊö¼¼ÄÜ¡°Èý»·Ì×Ô¡±µ Äħ·¨ÊôÐÔºÍÊýÖµ
-----------------------------------------------------------
--º¯ÊýGetSkillLevelData(levelname, data, level)
--levelname£ºÄ§·¨ÊôÐÔÃû³Æ
--data£º¼¼ÄÜÃû³Æ
--level£º¼¼Äܵȼ¶
--return£ºµ±¼¼ÄÜÃû³ÆΪdata£¬¼¼ÄÜ µÈ¼¶Îªlevel
-- ʱµÄħ·¨ÊôÐÔlevelnameËùÐèÇóµÄ� �� �ý¸ö²ÎÊýµÄ¾ßÌåÖµ
-----------------------------------------------------------
function GetSkillLevelData(levelname, data, level)
if(data==nil) then
return ""
end
if(data == "") then
return ""
end
if(SKILLS[data]==nil) then
return ""
end
if(SKILLS[data][levelname]==nil) then
return ""
end
if(SKILLS[data][levelname][1]==nil) then
SKILLS[data][levelname][1]={{0,0},{20,0}}
end
if(SKILLS[data][levelname][2]==nil) then
SKILLS[data][levelname][2]={{0,0},{20,0}}
end
if(SKILLS[data][levelname][3]==nil) then
SKILLS[data][levelname][3]={{0,0},{20,0}}
end
p1=floor(Link(level,SKILLS[data][levelname][1]))
p2=floor(Link(level,SKILLS[data][levelname][2]))
p3=floor(Link(level,SKILLS[data][levelname][3]))
return Param2String(p1,p2,p3)
end;


function Param2String(Param1, Param2, Param3)
return Param1..","..Param2..","..Param3
end;

bài hướng dẫn cua bạn thaihoa91 đấy bạn