奇迹私服在线加钱方法
用数据分析器 查询分析 执行下面语句
---创建触发器,每分钟为在线玩家仓库加50000钱
Create Trigger [美U在线送钱] ON dbo.[MEMB_STAT]
After Update
As
declare @memb___id varchar(10)
declare @ConnectStat tinyint
declare @ConnectTM datetime
declare @DisConnectTM datetime
declare @ConnectStat2 tinyint
declare @DisConnectTM2 datetime
declare @AddMoney int
select @memb___id=memb___id,
@ConnectStat=ConnectStat,
@ConnectTM=ConnectTM,
@DisConnectTM=DisConnectTM
from Inserted
select @ConnectStat2=ConnectStat,
@DisConnectTM2=DisConnectTM
from Deleted
IF (@ConnectStat < @ConnectStat2) and (@DisConnectTM > @DisConnectTM2) and (@ConnectTM < @DisConnectTM)
Begin
Set @AddMoney = datediff(minute,@ConnectTM,@DisConnectTM)*50000---这个数字你自己定,想发多少你自己定
UpDate Warehouse set [money]=(case when 2000000000-@AddMoney >[money] then [money]+@AddMoney else 2000000000 end)
where accountid=@memb___id
End
Go
---创建触发器,每分钟为在线玩家仓库加50000钱
Create Trigger [美U在线送钱] ON dbo.[MEMB_STAT]
After Update
As
declare @memb___id varchar(10)
declare @ConnectStat tinyint
declare @ConnectTM datetime
declare @DisConnectTM datetime
declare @ConnectStat2 tinyint
declare @DisConnectTM2 datetime
declare @AddMoney int
select @memb___id=memb___id,
@ConnectStat=ConnectStat,
@ConnectTM=ConnectTM,
@DisConnectTM=DisConnectTM
from Inserted
select @ConnectStat2=ConnectStat,
@DisConnectTM2=DisConnectTM
from Deleted
IF (@ConnectStat < @ConnectStat2) and (@DisConnectTM > @DisConnectTM2) and (@ConnectTM < @DisConnectTM)
Begin
Set @AddMoney = datediff(minute,@ConnectTM,@DisConnectTM)*50000---这个数字你自己定,想发多少你自己定
UpDate Warehouse set [money]=(case when 2000000000-@AddMoney >[money] then [money]+@AddMoney else 2000000000 end)
where accountid=@memb___id
End
Go
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论