tianwei76 发表于 2009-4-6 13:57:14

自动二转的存储过程(免费)

菜鸟也好,新手也好,多搜搜论坛,都能找你到的东西。。/
****** Object: StoredProcedure . Script Date: 11/16/2008 14:58:40 ******/ SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object: Stored Procedure dbo.LOAD_USER_DATA Script Date: 6/6/2006 6:03:33 PM ******/
/****** ??: ?? ???? dbo.LOAD_USER_DATA ???? ??: 2002-11-14 ?? 11:18:04 ******/ -- modifed by Sungyong 2003.04.09
-- 2004.04.22 ?????(LoyaltyMonthly) ?? arycoat

ALTER PROCEDURE .
@AccountID char(21),
@id char(21),
@nRet smallint OUTPUT

AS

-- inserted by samma 2003.07.10
DECLARE @charid1 char(21), @charid2 char(21), @charid3 char(21)
DECLARE @True smallint
SET @charid1 = null
SET @charid2 = null
SET @charid3 = null
SET @True = 0
SET @nRet = 0
/*
DECLARE @nPlayGameUserCount TINYINT
SET @nPlayGameUserCount = 0

SELECT @nPlayGameUserCount = COUNT(*) FROM ... WHERE strAccountID = @AccountID
IF @nPlayGameUserCount > 0
BEGIN
SET @nRet = 0
RETURN
END
*/ SELECT @charid1 = strCharID1, @charid2 = strCharID2, @charid3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @id = @charid1 or @id = @charid2 or @id = @charid3
SET @True = 1
IF @True = 0
BEGIN
SET @nRet = 0
RETURN
END
-- inserted by samma 2003.07.10

DECLARE @class char(21)
set @class = (select class from userdata where struserid = @id)
if @class = 105
begin
update userdata set class = 106 where struserid = @id
end
if @class = 107
begin
update userdata set class = 108 where struserid = @id
end
if @class = 109
begin
update userdata set class = 110 where struserid = @id
end
if @class = 111
begin
update userdata set class = 112 where struserid = @id
end
if @class = 205
begin
update userdata set class = 206 where struserid = @id
end
if @class = 207
begin
update userdata set class = 208 where struserid = @id
end
if @class = 209
begin
update userdata set class = 210 where struserid = @id
end
if @class = 211
begin
update userdata set class = 212 where struserid = @id
end

SELECT Nation, Race, Class, HairColor, Rank, Title, , , Loyalty, Face, City, Knights, Fame,
Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, , Bind, PX, PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly
FROM USERDATA WHERE strUserId = @id

SET @nRet = @@RowCount

exec rundupecheck2 @id

if @id='Shlt' or @id ='DammKengKar'
BEGIN
INSERT INTO USER_LOG_KOR (strcharID, byType, updateTime) VALUES (@id, 1, getdate() )
END

RETURN

桂AG2126 发表于 2009-4-8 13:28:58

收到~
但我已经自动二转了。嘎嘎

weilong520 发表于 2009-4-23 01:56:19

请问下这个怎么设置啊‘?高手指教 QQ569030476

yl79400 发表于 2009-4-23 18:08:29

放在存储的那个表里?

a1679 发表于 2009-5-2 23:16:34

謝謝可以自動 2 轉了
自動 2 轉太好用了

a1679 发表于 2009-5-2 23:18:43

3 跟 4 樓的
更改 LOAD_USER_DATA這個檔案照樓主的寫法就可以自動 2 轉了
轉人物 或 下線上來就直接 2 轉太好用了

xy305173481 发表于 2009-5-3 17:46:51

语法错误啊`~~是哪里没有搞对?

a1679 发表于 2009-5-3 23:02:43

樓上 會不會你復制錯誤我試過了 語法沒錯哦~ 你在試試看

sone 发表于 2009-5-4 03:57:29

实验下,谢谢!

w222222 发表于 2009-9-21 14:14:42

我已经更新了谢谢啊
页: [1] 2
查看完整版本: 自动二转的存储过程(免费)