30 lines
1.2 KiB
Lua
30 lines
1.2 KiB
Lua
![]() |
function addpay(charaindex, data)
|
|||
|
local value = other.atoi(other.getString(data, " ", 1))
|
|||
|
local cdkey = other.getString(data, " ", 2)
|
|||
|
if cdkey == "" then
|
|||
|
local oldvalue = sasql.getPayPoint(charaindex)
|
|||
|
sasql.setPayPoint(charaindex, sasql.getPayPoint(charaindex) + value)
|
|||
|
char.TalkToCli(charaindex, -1, "<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>[" .. char.getChar(charaindex, "<EFBFBD>˺<EFBFBD>") .. "]<5D><><EFBFBD><EFBFBD>[" .. char.getChar(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") .. "]<5D><><EFBFBD>˳<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ԭ" .. oldvalue .. "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" .. sasql.getPayPoint(charaindex), "<EFBFBD><EFBFBD>ɫ")
|
|||
|
else
|
|||
|
local maxplayer = char.getPlayerMaxNum()
|
|||
|
local cimelia = other.atoi(data)
|
|||
|
for i = 0, maxplayer - 1 do
|
|||
|
if char.check(i) == 1 then
|
|||
|
if char.getChar(i, "<EFBFBD>˺<EFBFBD>") == cdkey then
|
|||
|
local oldvalue = sasql.getPayPoint(i)
|
|||
|
sasql.setPayPoint(i, sasql.getPayPoint(i) + value)
|
|||
|
char.TalkToCli(charaindex, -1, "<EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>[" .. char.getChar(i, "<EFBFBD>˺<EFBFBD>") .. "]<5D><><EFBFBD><EFBFBD>[" .. char.getChar(i, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") .. "]<5D><><EFBFBD>˳<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ԭ" .. oldvalue .. "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" .. sasql.getPayPoint(i), "<EFBFBD><EFBFBD>ɫ")
|
|||
|
char.TalkToCli(i, -1, "GM[" .. char.getChar(charaindex, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") .. "]<5D><><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><C4B8>˳<EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ԭ" .. oldvalue .. "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ" .. sasql.getPayPoint(i), "<EFBFBD><EFBFBD>ɫ")
|
|||
|
return
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
function main()
|
|||
|
minute = 0
|
|||
|
magic.addLUAListFunction("<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "addpay", "", 1, "[]")
|
|||
|
end
|
|||
|
|