152 lines
5.1 KiB
Lua
152 lines
5.1 KiB
Lua
![]() |
function FreeCharLogin( charindex )
|
|||
|
if char.getWorkInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID") == 48 then
|
|||
|
char.TalkToCli(charindex, -1, "<EFBFBD>汾<EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><EFBFBD>ѻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Һ<EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
|
|||
|
char.logou(charindex)
|
|||
|
return 0;
|
|||
|
end
|
|||
|
if char.getWorkInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID") == 4096 and config.getGameservername() == "ʯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư浥<EFBFBD><EFBFBD><EFBFBD><EFBFBD>" then
|
|||
|
char.TalkToCli(charindex, -1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD>ƽ<EFBFBD>⣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>½<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD>ɫ")
|
|||
|
char.logou(charindex)
|
|||
|
return 0;
|
|||
|
end
|
|||
|
for i = 1, table.getn(unlawthislogut) do
|
|||
|
if char.getInt(charindex, "<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>") <= other.time() then
|
|||
|
if char.getInt(charindex, "<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>") == unlawthislogut[i][1] then
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>", unlawthislogut[i][2][1] )
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>X", unlawthislogut[i][2][2] )
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Y", unlawthislogut[i][2][3] )
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
if char.getInt(charindex, "<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>") >=800 and char.getInt(charindex, "<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>") <=851 then
|
|||
|
char.WarpToSpecificPoint(charindex, 1000, 71, 49)
|
|||
|
end
|
|||
|
|
|||
|
if char.getInt(charindex, "<EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD>") == 500 then
|
|||
|
if char.getInt(charindex, "<EFBFBD>ȼ<EFBFBD>")< 80 then
|
|||
|
char.WarpToSpecificPoint(charindex, 1000, 71, 49)
|
|||
|
end
|
|||
|
end
|
|||
|
if char.getInt(charindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ")>0 and char.getInt(charindex,"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ")~=2 then
|
|||
|
if char.getChar(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") == other.getString(family.ShowPointListArray(0), "|", 6) then
|
|||
|
char.setWorkInt(charindex,"ׯ<EFBFBD><EFBFBD>Ч",103213)
|
|||
|
elseif char.getChar(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") == other.getString(family.ShowPointListArray(1), "|", 6) then
|
|||
|
char.setWorkInt(charindex,"ׯ<EFBFBD><EFBFBD>Ч",103214)
|
|||
|
end
|
|||
|
end
|
|||
|
if char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>") < 0 then
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>", 0)
|
|||
|
end
|
|||
|
|
|||
|
if char.getInt(charindex, "<EFBFBD><EFBFBD>Ʒ") ~=1 then
|
|||
|
local vital = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
local str = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
local tgh = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
local dex = char.getInt(charindex, "<EFBFBD>ٶ<EFBFBD>")
|
|||
|
local skillpoint = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD>")
|
|||
|
local sum = vital + str + tgh + dex + skillpoint * 100
|
|||
|
if sum > 63700 then
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 1000)
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 0)
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 0)
|
|||
|
char.setInt(charindex, "<EFBFBD>ٶ<EFBFBD>", 0)
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD>", 627)
|
|||
|
end
|
|||
|
else
|
|||
|
local vital = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
local str = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
local tgh = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
local dex = char.getInt(charindex, "<EFBFBD>ٶ<EFBFBD>")
|
|||
|
local skillpoint = char.getInt(charindex, "<EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD>")
|
|||
|
local sum = vital + str + tgh + dex + skillpoint * 100
|
|||
|
if sum > 61000 then
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 1000)
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 0)
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", 0)
|
|||
|
char.setInt(charindex, "<EFBFBD>ٶ<EFBFBD>", 0)
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD>", 600)
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
token = "UPDATE CSAlogin set Offline = 0 , MAC = '" .. char.getWorkChar(charindex, "MAC") .. "', ServerName = '" .. config.getGameservername() .. "', ServerId = " .. char.getWorkInt(charindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID") + 1 .. " WHERE Name=BINARY'" .. char.getChar(charindex, "<EFBFBD>˺<EFBFBD>") .. "'"
|
|||
|
|
|||
|
ret = sasql.query(token)
|
|||
|
token = "SELECT `newsafe`, `flg` FROM `safedata` "
|
|||
|
.. " WHERE `cdkey` = '" .. char.getChar(charindex, "<EFBFBD>˺<EFBFBD>") .. "'"
|
|||
|
ret = sasql.query(token)
|
|||
|
if ret == 1 then
|
|||
|
sasql.free_result()
|
|||
|
sasql.store_result()
|
|||
|
num = sasql.num_rows()
|
|||
|
if num > 0 then
|
|||
|
sasql.fetch_row(0)
|
|||
|
if sasql.data(1) ~= char.getWorkChar(charindex, "MAC2") then
|
|||
|
if sasql.data(2) == "0" then
|
|||
|
char.setInt(charindex, "<EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD>", 2)
|
|||
|
end
|
|||
|
token = "UPDATE `safedata` SET "
|
|||
|
.. "`newsafe` = '" .. char.getWorkChar(charindex, "MAC2") .. "',"
|
|||
|
.. "`oldsafe` = '" .. sasql.data(1) .. "',"
|
|||
|
.. "`FixTime` = NOW()"
|
|||
|
.. " WHERE `cdkey` = '" .. char.getChar(charindex, "<EFBFBD>˺<EFBFBD>") .. "'"
|
|||
|
ret = sasql.query(token)
|
|||
|
end
|
|||
|
else
|
|||
|
token = "INSERT INTO `safedata` ( "
|
|||
|
.. "`cdkey` ,"
|
|||
|
.. "`newsafe` ,"
|
|||
|
.. "`oldsafe` ,"
|
|||
|
.. "`flg`,"
|
|||
|
.. "`FixTime`"
|
|||
|
.. ")"
|
|||
|
.. " VALUES ("
|
|||
|
.. "'" .. char.getChar(charindex, "<EFBFBD>˺<EFBFBD>")
|
|||
|
.. "', '" .. char.getWorkChar(charindex, "MAC2")
|
|||
|
.. "', '" .. char.getWorkChar(charindex, "MAC2")
|
|||
|
.. "', 0, NOW()"
|
|||
|
.. ");"
|
|||
|
ret = sasql.query(token)
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
return 1;
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
function data()
|
|||
|
|
|||
|
unlawthislogut = {{125, {1000, 92, 99}}
|
|||
|
,{126, {1000, 92, 99}}
|
|||
|
,{127, {1000, 92, 99}}
|
|||
|
,{128, {1000, 92, 99}}
|
|||
|
,{140, {141, 25, 17}}
|
|||
|
,{8190, {2000, 44, 67}}
|
|||
|
,{12345, {1000, 92, 99}}
|
|||
|
,{40001, {1000, 92, 99}}
|
|||
|
,{40002, {1000, 92, 99}}
|
|||
|
,{40003, {1000, 92, 99}}
|
|||
|
,{40004, {1000, 92, 99}}
|
|||
|
,{40005, {1000, 92, 99}}
|
|||
|
,{40006, {1000, 92, 99}}
|
|||
|
,{40007, {1000, 92, 99}}
|
|||
|
,{40008, {1000, 92, 99}}
|
|||
|
,{40009, {1000, 92, 99}}
|
|||
|
,{40010, {1000, 92, 99}}
|
|||
|
,{50001, {1000, 92, 99}}
|
|||
|
,{50002, {1000, 92, 99}}
|
|||
|
,{50003, {1000, 92, 99}}
|
|||
|
,{50004, {1000, 92, 99}}
|
|||
|
,{104, {1000, 92, 99}}
|
|||
|
,{133, {1000, 92, 99}}
|
|||
|
,{130, {1000, 92, 99}}
|
|||
|
,{602, {1000, 92, 99}}
|
|||
|
,{61001, {1000, 92, 99}}
|
|||
|
,{65501, {1000, 92, 99}}
|
|||
|
,{50005, {1000, 92, 99}}
|
|||
|
}
|
|||
|
end
|
|||
|
|
|||
|
function main()
|
|||
|
data()
|
|||
|
end
|