stoneage8.5/服务器端lua文件/ablua/freecomplianceparameter.lua

189 lines
6.6 KiB
Lua
Raw Normal View History

2020-06-23 15:27:59 +08:00
--<2D><>luaӦ<61><D3A6><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD>ں<EFBFBD>C<EFBFBD><43><EFBFBD>أ<EFBFBD><D8A3><EFBFBD><EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>!
function getIntPart(x)
if x <= 0 then
return math.ceil(x);
end
if math.ceil(x) == x then
return math.ceil(x);
else
return math.ceil(x) - 1;
end
end
function GetTtileBuff(id)
if id >96 or id < 1 then
return 0,0,0,0
end
return titleinfo[id][3],titleinfo[id][4],titleinfo[id][5],titleinfo[id][6],titleinfo[id][7],titleinfo[id][8],titleinfo[id][9],titleinfo[id][10],titleinfo[id][11]
end
function FreeComplianceParameter( charaindex )
if char.getInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") == 3 then
local data= char.getChar(charaindex,"ף<EFBFBD><EFBFBD>״̬")
if data~="" then
local hp = other.atoi(other.getString(data, "|", 1))
local at = other.atoi(other.getString(data, "|", 2))
local df = other.atoi(other.getString(data, "|", 3))
local dx = other.atoi(other.getString(data, "|", 4))
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>HP", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>HP") + hp)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + at)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + df)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + dx)
end
end
if char.getInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") == 1 then
local itemindex = char.getItemIndex(charaindex,6)
if itemindex > 0 then
local data1 = item.getChar(itemindex, "<EFBFBD>ֶ<EFBFBD>")
local attrate = other.atoi(other.getString(data1, "|", 1))
local defrate = other.atoi(other.getString(data1, "|", 2))
local dexrate = other.atoi(other.getString(data1, "|", 3))
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", math.floor(char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") * (100+attrate)/100))
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", math.floor(char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") * (100+defrate)/100))
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", math.floor(char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") * (100+dexrate)/100))
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>HP", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>HP") + 150)
end
for i = 1,96 do
if char.getCharNewTitleMode(charaindex,i-1)== 1 then
temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8,temp9 = GetTtileBuff(i)
addhp = addhp + temp1
addat = addat + temp2
adddf = adddf + temp3
adddx = adddx + temp4
addpo = addpo + temp5
addpa = addpa + temp6
addsl = addsl + temp7
addst = addst + temp8
addco = addco + temp9
end
end
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>HP", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>HP") + addhp)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + addat)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + adddf)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", char.getWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + adddx)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", addpo)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", addpa)
char.setWorkInt(charaindex, "˯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", addsl)
char.setWorkInt(charaindex, "ʯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", addst)
char.setWorkInt(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", addco)
end
end
function data()
titleinfo = { --<2D><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><> <20><> <20><> <20><> <20><> ˯ ʯ <20><>
{"<EFBFBD><EFBFBD><EFBFBD>صľ<EFBFBD><EFBFBD><EFBFBD> <20><>+5",1,0,0,5,0,0,0,0,0,0}
,{"ˮ<EFBFBD>ľ<EFBFBD><EFBFBD><EFBFBD> HP+20",2,20,0,0,0,0,0,0,0,0}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D><EFBFBD><EFBFBD> <20><>+5",27,0,5,0,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>+3",28,0,3,0,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>+5",29,0,0,5,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>+3",30,0,0,3,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>սʿ HP+10",31,10,0,0,0,0,0,0,0,0}
,{"ʥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿ HP+15",32,15,0,0,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿Ӣ<EFBFBD><EFBFBD> HP+20",33,20,0,0,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD> HP+25",34,25,0,0,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˹ʹ<EFBFBD><EFBFBD> HP+30",35,30,0,0,0,0,0,0,0,0}
,{"<EFBFBD><EFBFBD>˹<EFBFBD><EFBFBD>½Ӣ<EFBFBD><EFBFBD> HP+100",36,100,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
,{"","",0,0,0,0,0,0,0,0,0}
}
end
function main()
data()
end