thaihoa91
21-06-11, 10:30 PM
Ko có cái gọi là tài khoản GM ! Miễn đặt tên nhân vật đúng tên GM đã set thì chạy code thui !
Lỗi GameServer.exe đó thì vào thư mục Server --> Vào thư mục Script --> Vào thư mục skill --> Mở file trungsinh.lua và xóa hết nội dung, rùi copy nội dung sau vào và save lại là hết !
--Script sever Jx 49
--Write: DNTmaster
--Edited + Fixed: thaihoa91
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*x2+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
-----------------------------------------------
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,技能等级为l evel
-- 时的魔法属性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;
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.