This commit is contained in:
aixianling
2024-12-13 13:41:02 +08:00
commit 06658f112f
3887 changed files with 2687822 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
--lua script
--ʹ<><CAB9><EFBFBD><EFBFBD>ʯ<EFBFBD><CAAF><EFBFBD>
--#include "data\functions\GlobalMiscExpand\GlobalMisc.txt" once
--#include "data\config\item\ConcVipItem.txt" once
--[[
--<2D><><EFBFBD><EFBFBD>buff<66><66><EFBFBD><EFBFBD>Ʒ
--sysarg:ʵ<><CAB5><EFBFBD>ָ<EFBFBD><D6B8>
--itemidx: <20><>Ʒ<EFBFBD><C6B7>ID
--itemPtr: <20><>Ʒ<EFBFBD><C6B7>ָ<EFBFBD><D6B8>
--ItemTable: <20><><EFBFBD>õIJ<C3B5><C4B2><EFBFBD><EFBFBD>б<EFBFBD>
--]]
function UseConcVipItem(sysarg, count, itemidx, itemPtr,ItemTable, delType, param) --<2D><>ʯ<EFBFBD><CAAF><EFBFBD><EFBFBD><E5BFA8>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--print("UseConcVipItem, itemidx="..itemidx)
if(Actor.getItemCount(sysarg, itemidx) == 0) then
Actor.sendTipmsg( sysarg, OldLang.Script.comm015, ttFlyTip )
return
end
local vipType = ItemTable.vipType
if not vipType then --<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʯ<EFBFBD><CAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Actor.sendTipmsg( sysarg,OldLang.Script.vipConc021, ttTipmsgWindow + ttFly)
return
end
local vip = VipConcCfg.Vips[vipType]
if not vip then
Actor.sendTipmsg( sysarg,OldLang.Script.vipConc021, ttTipmsgWindow + ttFly)
return
end
if Actor.removeItemByPtr(sysarg, itemPtr, 1, true, "ConcVipItem", 233) > 0 then
if not Actor.isConcurrentVip( sysarg, vipType ) then
if DoBuyConcVip( sysarg, vip, ItemTable.addHour ) then --<2D><><EFBFBD><EFBFBD>
local actorId = Actor.getActorId(sysarg)
local actorName = Actor.getName(sysarg)
System.sendCommonLog(234, actorId, actorName, vipType, ItemTable.item_id, ConcVipWay.AddByItem, "", "",
OldLang.Script.vipConc025)
end
else
if DoRenewalConcVip( sysarg, vip, ItemTable.addHour ) then --<2D><><EFBFBD><EFBFBD>
local actorId = Actor.getActorId(sysarg)
local actorName = Actor.getName(sysarg)
System.sendCommonLog(234, actorId, actorName, vipType, ItemTable.item_id, ConcVipWay.AddByItem, "", "",
OldLang.Script.vipConc026)
end
end
return true
end
end
function UseConcVipItemInit(sysarg)
for i = 1,table.getn(ConcVipItemTable) do
local x = ConcVipItemTable[i]
GlobalItemFn[x.item_id] = { func = UseConcVipItem, params = x }
end
end
table.insert(InitFnTable, UseConcVipItemInit)