怎样开放一帐号三个角度。
只能建一个,浪费帐号。单机 只能建一个,浪费帐号。单机fxjwvf 发表于 2010-11-13 11:21 http://www.kofans.cn/bbs/static/image/common/back.gif
你是什么版本1299还是?把你的CREATE_NEW_CHAR存储发上来 现在在路上,回家给你发。如果我有发附件的权限。我下载的漂亮小开心的。 原来不用附件,下面是CREATE_NEW_CHAR存储,我用的是漂亮小开心的,版本不详(我不知道).
/****** Object:Stored Procedure dbo.CREATE_NEW_CHAR Script Date: 6/6/2006 6:03:33 PM ******/
/****** 개체: 저장 프로시저 dbo.CREATE_NEW_CHAR 스크립트 날짜: 2002-11-14 오전 11:18:03 ******/
-- scripted by samma
-- 2002.01.17
-- 2003.02.06 sungyong
CREATE PROCEDURE CREATE_NEW_CHAR
@nRet smallint OUTPUT,
@AccountID char(21),
@index tinyint,
@CharID char(21),
@Race tinyint,
@Class smallint,
@Hair tinyint,
@Face tinyint,
@Str tinyint,
@Sta tinyint,
@Dex tinyint,
@Intel tinyint,
@Cha tinyint
AS
DECLARE @Row tinyint, @Nation tinyint, @Zone tinyint, @PosX int, @PosZ int
SET @Row = 0 SET @Nation = 0SET @Zone = 0SET @PosX = 0 SET @PosZ = 0
SELECT @Nation = bNation, @Row = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @Row >= 1 SET @nRet =1
IF @Nation = 1 AND @Race > 10 SET @nRet = 2
ELSE IF @Nation = 2 AND @Race < 10 SET @nRet = 2
ELSE IF @Nation <>1 AND @Nation <> 2 SET @nRet = 2
IF @nRet > 0
RETURN
SELECT @Row = COUNT(*) FROM USERDATA WHERE strUserId = @CharID
IF @Row > 0
BEGIN
SET @nRet =1
RETURN
END
--SET @Zone = @Nation
SET @Zone=21
SELECT @PosX = InitX, @PosZ = InitZFROM ZONE_INFO WHERE ZoneNo = @Zone
BEGIN TRAN
IF @index = 0
UPDATE ACCOUNT_CHAR SET strCharID1 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
ELSE
BEGIN
ROLLBACK TRAN
SET @nRet=4
RETURN
END
--IF @index = 1
--UPDATE ACCOUNT_CHAR SET strCharID2 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
--ELSE IF @index = 2
--UPDATE ACCOUNT_CHAR SET strCharID3 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
--ELSE IF @index = 3
--UPDATE ACCOUNT_CHAR SET strCharID4 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
--ELSE IF @index = 4
--UPDATE ACCOUNT_CHAR SET strCharID5 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
INSERT INTO USERDATA (strUserId, Nation, Race, Class, HairColor, Face, Strong, Sta, Dex, Intel, Cha, Zone, PX, PZ ,loyalty,gold,exp)
VALUES (@CharID, @Nation, @Race, @Class, @Hair, @Face, @Str, @Sta, @Dex, @Intel, @Cha, @Zone, @PosX, @PosZ,100,100000,2000000000)
insert into MAIL_ITEM(bType,sId,tId,title,bAccess,content,type) values(6,'',@CharID,'宣传猛虎骑士得到巨额奖励!',1,'宣传猛虎骑士得到巨额奖励,详情请看论坛:bbs.mhko.net--这是系统邮件请您不要回复。',2)
IF @@ERROR <> 0
BEGIN
ROLLBACK TRAN
SET @nRet =4
RETURN
END
COMMIT TRAN
SET @nRet =0
GO 请问下改下哪才能建三个角色?是不是用那个 IF @nRet 来判断的?本人没有尝过SQL语句.只学过C语言和汇编语言. BEGIN TRAN
IF @index = 0
UPDATE ACCOUNT_CHAR SET strCharID1 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
ELSE
BEGIN
ROLLBACK TRAN
SET @nRet=4
RETURN
END
--IF @index = 1
--UPDATE ACCOUNT_CHAR SET strCharID2 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
--ELSE IF @index = 2
--UPDATE ACCOUNT_CHAR SET strCharID3 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
--ELSE IF @index = 3
--UPDATE ACCOUNT_CHAR SET strCharID4 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
--ELSE IF @index = 4
--UPDATE ACCOUNT_CHAR SET strCharID5 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
这一段,更改成BEGIN TRAN
IF @index = 0
UPDATE ACCOUNT_CHAR SET strCharID1 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
IF @index = 1
UPDATE ACCOUNT_CHAR SET strCharID2 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
ELSE IF @index = 2
UPDATE ACCOUNT_CHAR SET strCharID3 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
ELSE IF @index = 3
UPDATE ACCOUNT_CHAR SET strCharID4 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
ELSE IF @index = 4
UPDATE ACCOUNT_CHAR SET strCharID5 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID
ELSE
BEGIN
ROLLBACK TRAN
SET @nRet=4
RETURN
END
我换了这个存储怎么还不管用啊? 我换了这个存储怎么还不管用啊?
龙王 发表于 2010-11-14 12:00 http://www.kofans.cn/bbs/static/image/common/back.gif
那你估计要改EB了,EB里也可以限制一号一角色 谢谢.不过我的也是不行,要改EB,但是我下了个工具,英文的,看不懂.不会改. 我也同意楼上的说法,CT能给个详细的说明吗?谢谢!
页:
[1]
2