搜索
 找回密码
 加入

谁贡献下在线泡点 和 商城研究下?

1111 2011-2-21 13:11:45 2360
给点提示也不措是

9 回复

binwang
2009-5-21 11:02:36
点击查看详情
泡点你可以该存储过程
角色登陆的时候记一次时间
下线的时候再记一次
时间相减
然后算泡点

商城家里的电脑有
不过不知道能用不
有空再传

评分

1

查看全部评分

chencjh
2009-5-21 17:09:35
本帖最后由 chencjh 于 2009-5-21 17:14 编辑

LOAD_USER_DATA存储过程最下面加上
  1. UPDATE TB_USER SET sTime=getdate() where strAccountID=@Accountid
复制代码
ACCOUNT_LOGOUT存储过程改为

  1. CREATE PROCEDURE ACCOUNT_LOGOUT
  2. @AccountID        varchar(21),
  3. @nRet                smallint        OUTPUT
  4. AS
  5. BEGIN TRAN
  6.         DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID       
  7. COMMIT TRAN
  8. UPDATE TB_USER SET eTime=getdate() where strAccountID=@AccountID
  9. DECLARE @sTime smalldatetime,@eTime smalldatetime,@point int
  10. SET @eTime=getdate()
  11. SELECT @sTime=sTime,@point=iPoint FROM TB_USER WHERE strAccountID=@AccountID
  12. if @point=null
  13. begin
  14. set @point=0
  15. end
  16. UPDATE [color=Red]TB_USER[/color] SET [color=Red]iPoint[/color]=@point+datediff(s,@sTime,@eTime)/60 where strAccountID=@AccountID
  17. SET @nRet = 1
  18. GO
复制代码

评分

1

查看全部评分

chencjh
2009-5-21 17:13:40
商店主要写入
  1. insert into [color=DarkRed]WEB_ITEMMALL[/color] (strAccountID,strCharID,ServerNo,ItemId,ItemCount) values ('$user','$charid',1,'$itemid','$adet

  2.                 ItemAl($user,$charid,$itemkod['itemkodu'],$itemkod['adet']);
  3.                 doquery("UPDATE TB_USER SET cashpoint=cashpoint-".$itemkod['ucret']." WHERE straccountid='$user'");
  4.                 doquery("UPDATE PUS_ITEMLERI SET alindi=alindi+1 WHERE id='$itemid'");
  5.                 $durum = "Item inventorinize eklenmistir.";
复制代码
ctgwglzc
2009-5-21 19:07:01
http://www.kofans.cn/bbs/thread-11107-1-1.html,免费版,商业版可以PM,呵呵
77738920
2009-5-24 17:29:04
骑士越来越先进了。
ww34856950
2009-6-8 09:08:10
还是不懂
1111
2009-6-8 18:22:35
楼主
是啊是啊!!  顶
2531521
2009-7-9 10:35:27
对啊。虽然我还是正在学习单机版,但是你这个功能实在太诱人了!
hl8882
2011-2-21 13:11:45
LOAD_USER_DATA存储过程最下面加上UPDATE TB_USER SET sTime=getdate() where strAccountID=@AccountidACCOUNT_LOGOUT存储过程改为
CREATE PROCEDURE ACCOUNT_LOGOUT
@AccountID        varchar(21),
@nRet                smallint        OU ...
chencjh 发表于 2009-5-21 17:09



哥们你发的这个有问题,
高级模式
游客