1111 发表于 2009-5-20 23:50:22

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

给点提示也不措是

binwang 发表于 2009-5-21 11:02:36

泡点你可以该存储过程
角色登陆的时候记一次时间
下线的时候再记一次
时间相减
然后算泡点

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

chencjh 发表于 2009-5-21 17:09:35

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

LOAD_USER_DATA存储过程最下面加上UPDATE TB_USER SET sTime=getdate() where strAccountID=@AccountidACCOUNT_LOGOUT存储过程改为
CREATE PROCEDURE ACCOUNT_LOGOUT
@AccountID        varchar(21),
@nRet                smallint        OUTPUT
AS
BEGIN TRAN
        DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID       
COMMIT TRAN
UPDATE TB_USER SET eTime=getdate() where strAccountID=@AccountID
DECLARE @sTime smalldatetime,@eTime smalldatetime,@point int
SET @eTime=getdate()
SELECT @sTime=sTime,@point=iPoint FROM TB_USER WHERE strAccountID=@AccountID
if @point=null
begin
set @point=0
end
UPDATE TB_USER SET iPoint=@point+datediff(s,@sTime,@eTime)/60 where strAccountID=@AccountID
SET @nRet = 1
GO

chencjh 发表于 2009-5-21 17:13:40

商店主要写入insert into WEB_ITEMMALL (strAccountID,strCharID,ServerNo,ItemId,ItemCount) values ('$user','$charid',1,'$itemid','$adet

                ItemAl($user,$charid,$itemkod['itemkodu'],$itemkod['adet']);
                doquery("UPDATE TB_USER SET cashpoint=cashpoint-".$itemkod['ucret']." WHERE straccountid='$user'");
                doquery("UPDATE PUS_ITEMLERI SET alindi=alindi+1 WHERE id='$itemid'");
                $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 http://www.kofans.cn/bbs/static/image/common/back.gif


哥们你发的这个有问题,http://b38.photo.store.qq.com/http_imgload.cgi?/rurl4_b=4d7d915ebf722dae8bef52c31e4957885369c9705c8c72cf82673e9695511f67008b6bee971c5663647d11fef22a89351606406273f1db1d07632d444c02596c242fc293d9ec81f0e01adb8d7c14eb13ec2a0ddf&a=62&b=38
页: [1]
查看完整版本: 谁贡献下在线泡点 和 商城研究下?