首先在chars表新建一个列 shopk1 int即可 默认0
存储过程
IF(@Value2 = 44086)and @ActionType = 114
update ps_gamedata.dbo.chars set shopk1 = shopk1 + @Value4 * 10 where charid = @charid;
44086 即为出售道具 10为兑换的值 此句意思为出售44086一个即可增加shopk1 10点
--小退兑换
if @actiontype=108
begin
if (select shopk1 from ps_gamedata.dbo.chars where charid=@charid)>0 and (select k1 from ps_gamedata.dbo.chars where charid=@charid)<200000
begin
WAITFOR DELAY '00:00:02'
update ps_gamedata.dbo.chars set k1=k1+shopk1 where charid=@charid
update ps_gamedata.dbo.chars set shopk1=0 where charid=@charid
end
end
限制战功大于0然后小于20W,首先兑换战功 然后清除shopk1值即可! 中间延迟2秒是为了保存角色本身所杀战功值
火爆游戏推荐:
斗魂神泣
139微变神泣
广告位50/月
广告位50/月
广告位50/月
广告位50/月
广告位50/月
广告位50/月