搜索
 找回密码
 加入

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

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

  9. ALTER PROCEDURE [dbo].[LOAD_USER_DATA]
  10. @AccountID char(21),
  11. @id char(21),
  12. @nRet smallint OUTPUT

  13. AS

  14. -- inserted by samma 2003.07.10
  15. DECLARE @charid1 char(21), @charid2 char(21), @charid3 char(21)
  16. DECLARE @True smallint
  17. SET @charid1 = null
  18. SET @charid2 = null
  19. SET @charid3 = null
  20. SET @True = 0
  21. SET @nRet = 0
  22. /*
  23. DECLARE @nPlayGameUserCount TINYINT
  24. SET @nPlayGameUserCount = 0

  25. SELECT @nPlayGameUserCount = COUNT(*) FROM [192.168.178.30].[knight_Account].[dbo].[CURRENTUSER] WHERE strAccountID = @AccountID
  26. IF @nPlayGameUserCount > 0
  27. BEGIN
  28. SET @nRet = 0
  29. RETURN
  30. END
  31. */ SELECT @charid1 = strCharID1, @charid2 = strCharID2, @charid3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
  32. IF @id = @charid1 or @id = @charid2 or @id = @charid3
  33. SET @True = 1
  34. IF @True = 0
  35. BEGIN
  36. SET @nRet = 0
  37. RETURN
  38. END
  39. -- inserted by samma 2003.07.10

  40. DECLARE @class char(21)
  41. set @class = (select class from userdata where struserid = @id)
  42. if @class = 105
  43. begin
  44. update userdata set class = 106 where struserid = @id
  45. end
  46. if @class = 107
  47. begin
  48. update userdata set class = 108 where struserid = @id
  49. end
  50. if @class = 109
  51. begin
  52. update userdata set class = 110 where struserid = @id
  53. end
  54. if @class = 111
  55. begin
  56. update userdata set class = 112 where struserid = @id
  57. end
  58. if @class = 205
  59. begin
  60. update userdata set class = 206 where struserid = @id
  61. end
  62. if @class = 207
  63. begin
  64. update userdata set class = 208 where struserid = @id
  65. end
  66. if @class = 209
  67. begin
  68. update userdata set class = 210 where struserid = @id
  69. end
  70. if @class = 211
  71. begin
  72. update userdata set class = 212 where struserid = @id
  73. end

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

  77. SET @nRet = @@RowCount

  78. exec rundupecheck2 @id

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

  83. RETURN
复制代码

评分

1

查看全部评分

12 回复

桂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
我已经更新了谢谢啊
12下一页
高级模式
游客