- Joined
- Jul 18, 2009
- Messages
- 658
- Reaction score
- 75
anyone can help me how to add ecoins automatically add to thier account after finishing the dungeon
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!USE [Server01]
GO
/****** Object: Table [dbo].[cabal_DungeonEcoin_Table] Script Date: 10/28/2020 11:54:22 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[cabal_DungeonEcoin_Table](
[DungeonIdx] [int] NOT NULL,
[ecoin] [int] NOT NULL
) ON [PRIMARY]
GO
Msg 137, Level 15, State 2, Line 5Must declare the scalar variable "@dungeonIdx".
Msg 137, Level 15, State 1, Line 7Must declare the scalar variable "@CNT".
Msg 137, Level 15, State 2, Line 8Must declare the scalar variable "@CNT".
Msg 137, Level 15, State 2, Line 10Must declare the scalar variable "@memberData".
Msg 137, Level 15, State 2, Line 11Must declare the scalar variable "@memId".
Msg 137, Level 15, State 2, Line 12Must declare the scalar variable "@CNT".
USE [Server01]
GO
/****** Object: StoredProcedure [dbo].[cabal_sp_DungeonRanking_Party_Clear_Set] Script Date: 10/11/2020 8:14:53 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[cabal_sp_DungeonRanking_Party_Clear_Set] @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx int, @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec int
, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erCharIdx int, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erName [varchar](20)
, @[I][B][URL="http://forum.ragezone.com/members/2000286505.html"]Levels[/URL][/B][/I]um int, @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData [varbinary](300))
AS
BEGIN
SET NOCOUNT ON
DECLARE @SavedClearTimeSec int
DECLARE @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] int
DECLARE @ecoin int
DECLARE @CNT int, @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]Id int
SELECT @ecoin = ecoin
FROM cabal_DungeonEcoin_Table
WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx
SET @CNT = 1
WHILE @CNT < DATALENGTH ( @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData )
BEGIN
SET @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]Id = dbo.BinToInt(SUBSTRING ( @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData,@CNT,4 ))
UPDATE CabalCash.dbo.CashAccount set Cash = Cash + @ecoin where UserNum = @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]Id/8
SET @CNT= @CNT+27
END
SELECT TOP 20 @SavedClearTimeSec = [ClearTimeSec]
FROM [cabal_DungeonRankingParty_table]
WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx
ORDER BY [ClearTimeSec]
SET @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] = @@rowCount
IF(@SavedClearTimeSec < @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec and @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] >= 20)
BEGIN
RETURN
END
INSERT [cabal_DungeonRankingParty_table] ([DungeonIdx], [ClearTimeSec], [LeaderCharIdx]
, [LeaderName], [LevelSum], [PartyMemberData], [CurrentRank], [LastRank], [ClearDate])
VALUES @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx, @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erCharIdx, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erName, @[I][B][URL="http://forum.ragezone.com/members/2000286505.html"]Levels[/URL][/B][/I]um, @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData, 0, 0, GetDate())
IF @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] >= 20)
BEGIN
DELETE [cabal_DungeonRankingParty_table]
WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx AND [ClearTimeSec] = @SavedClearTimeSec
END
END
USE [Server01]
GO
/****** Object: StoredProcedure [dbo].[cabal_sp_DungeonRanking_Single_Clear_Set] Script Date: 10/28/2020 1:18:19 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[cabal_sp_DungeonRanking_Single_Clear_Set] [USER=2000255614]dung[/USER]eonIdx int, [USER=1333429346]Clear[/USER]TimeSec int, [USER=551894]Char[/USER]Idx int
, [USER=1333344765]name[/USER] [varchar](20), [USER=501312]level[/USER] int, [USER=1333388099]Battle[/USER]Style int)
AS
BEGIN
SET NOCOUNT ON
DECLARE @SavedClearTimeSec int
DECLARE [USER=138004]count[/USER] int
DECLARE @ecoin int
SELECT @ecoin = ecoin
FROM cabal_DungeonEcoin_Table
WHERE DungeonIdx = [USER=2000255614]dung[/USER]eonIdx
UPDATE CabalCash.dbo.CashAccount set Cash = Cash + @ecoin where UserNum = [USER=551894]Char[/USER]idx/8
SELECT @SavedClearTimeSec = [ClearTimeSec]
FROM [cabal_DungeonRankingSingle_table]
WHERE DungeonIdx = [USER=2000255614]dung[/USER]eonIdx AND [CharIdx] = [USER=551894]Char[/USER]Idx
IF(@@rowcount <> 0)
BEGIN
IF [USER=1333429346]Clear[/USER]TimeSec < @SavedClearTimeSec)
BEGIN
UPDATE [cabal_DungeonRankingSingle_table]
SET [ClearTimeSec] = [USER=1333429346]Clear[/USER]TimeSec, [Level] = [USER=501312]level[/USER], Name = [USER=1333344765]name[/USER], ClearDate = Getdate()
WHERE DungeonIdx = [USER=2000255614]dung[/USER]eonIdx AND [CharIdx] = [USER=551894]Char[/USER]Idx
END
RETURN
END
SELECT TOP 200 @SavedClearTimeSec = [ClearTimeSec]
FROM [cabal_DungeonRankingSingle_table]
WHERE DungeonIdx = [USER=2000255614]dung[/USER]eonIdx
ORDER BY [ClearTimeSec]
SET [USER=138004]count[/USER] = @@rowCount
IF(@SavedClearTimeSec < [USER=1333429346]Clear[/USER]TimeSec and [USER=138004]count[/USER] >= 200)
BEGIN
RETURN
END
INSERT [cabal_DungeonRankingSingle_table]
([DungeonIdx], [ClearTimeSec], [CharIdx], [Name], [Level],
[BattleStyle], [CurrentRank], [LastRank], [ClearDate])
VALUES [USER=2000255614]dung[/USER]eonIdx, [USER=1333429346]Clear[/USER]TimeSec, [USER=551894]Char[/USER]Idx, [USER=1333344765]name[/USER], [USER=501312]level[/USER],
[USER=1333388099]Battle[/USER]Style, 0, 0, GetDate())
IF [USER=138004]count[/USER] >= 200)
BEGIN
DELETE [cabal_DungeonRankingSingle_table]
WHERE DungeonIdx = [USER=2000255614]dung[/USER]eonIdx AND [ClearTimeSec] = @SavedClearTimeSec
END
END
Not working after some attempts, first and some attempts it workscabal_sp_DungeonRanking_Party_Clear_Set
Code:USE [Server01] GO /****** Object: StoredProcedure [dbo].[cabal_sp_DungeonRanking_Party_Clear_Set] Script Date: 10/11/2020 8:14:53 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[cabal_sp_DungeonRanking_Party_Clear_Set] @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx int, @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec int , @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erCharIdx int, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erName [varchar](20) , @[I][B][URL="http://forum.ragezone.com/members/2000286505.html"]Levels[/URL][/B][/I]um int, @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData [varbinary](300)) AS BEGIN SET NOCOUNT ON DECLARE @SavedClearTimeSec int DECLARE @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] int DECLARE @ecoin int DECLARE @CNT int, @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]Id int SELECT @ecoin = ecoin FROM cabal_DungeonEcoin_Table WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx SET @CNT = 1 WHILE @CNT < DATALENGTH ( @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData ) BEGIN SET @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]Id = dbo.BinToInt(SUBSTRING ( @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData,@CNT,4 )) UPDATE CabalCash.dbo.CashAccount set Cash = Cash + @ecoin where UserNum = @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]Id/8 SET @CNT= @CNT+27 END SELECT TOP 20 @SavedClearTimeSec = [ClearTimeSec] FROM [cabal_DungeonRankingParty_table] WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx ORDER BY [ClearTimeSec] SET @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] = @@rowCount IF(@SavedClearTimeSec < @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec and @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] >= 20) BEGIN RETURN END INSERT [cabal_DungeonRankingParty_table] ([DungeonIdx], [ClearTimeSec], [LeaderCharIdx] , [LeaderName], [LevelSum], [PartyMemberData], [CurrentRank], [LastRank], [ClearDate]) VALUES @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx, @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erCharIdx, @[I][B][URL="http://forum.ragezone.com/members/313019.html"]Lead[/URL][/B][/I]erName, @[I][B][URL="http://forum.ragezone.com/members/2000286505.html"]Levels[/URL][/B][/I]um, @[I][B][URL="http://forum.ragezone.com/members/2000256504.html"]mem[/URL][/B][/I]berData, 0, 0, GetDate()) IF @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] >= 20) BEGIN DELETE [cabal_DungeonRankingParty_table] WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx AND [ClearTimeSec] = @SavedClearTimeSec END END
cabal_sp_DungeonRanking_Single_Clear_Set
Code:USE [Server01] GO /****** Object: StoredProcedure [dbo].[cabal_sp_DungeonRanking_Single_Clear_Set] Script Date: 10/28/2020 1:18:19 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[cabal_sp_DungeonRanking_Single_Clear_Set] @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx int, @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec int, @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]Idx int , @[I][B][URL="http://forum.ragezone.com/members/1333344765.html"]name[/URL][/B][/I] [varchar](20), @[I][B][URL="http://forum.ragezone.com/members/501312.html"]level[/URL][/B][/I] int, @[I][B][URL="http://forum.ragezone.com/members/1333388099.html"]Battle[/URL][/B][/I]Style int) AS BEGIN SET NOCOUNT ON DECLARE @SavedClearTimeSec int DECLARE @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] int DECLARE @ecoin int SELECT @ecoin = ecoin FROM cabal_DungeonEcoin_Table WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx UPDATE CabalCash.dbo.CashAccount set Cash = Cash + @ecoin where UserNum = @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]idx/8 SELECT @SavedClearTimeSec = [ClearTimeSec] FROM [cabal_DungeonRankingSingle_table] WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx AND [CharIdx] = @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]Idx IF(@@rowcount <> 0) BEGIN IF @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec < @SavedClearTimeSec) BEGIN UPDATE [cabal_DungeonRankingSingle_table] SET [ClearTimeSec] = @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec, [Level] = @[I][B][URL="http://forum.ragezone.com/members/501312.html"]level[/URL][/B][/I], Name = @[I][B][URL="http://forum.ragezone.com/members/1333344765.html"]name[/URL][/B][/I], ClearDate = Getdate() WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx AND [CharIdx] = @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]Idx END RETURN END SELECT TOP 200 @SavedClearTimeSec = [ClearTimeSec] FROM [cabal_DungeonRankingSingle_table] WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx ORDER BY [ClearTimeSec] SET @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] = @@rowCount IF(@SavedClearTimeSec < @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec and @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] >= 200) BEGIN RETURN END INSERT [cabal_DungeonRankingSingle_table] ([DungeonIdx], [ClearTimeSec], [CharIdx], [Name], [Level], [BattleStyle], [CurrentRank], [LastRank], [ClearDate]) VALUES @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx, @[I][B][URL="http://forum.ragezone.com/members/1333429346.html"]Clear[/URL][/B][/I]TimeSec, @[I][B][URL="http://forum.ragezone.com/members/551894.html"]Char[/URL][/B][/I]Idx, @[I][B][URL="http://forum.ragezone.com/members/1333344765.html"]name[/URL][/B][/I], @[I][B][URL="http://forum.ragezone.com/members/501312.html"]level[/URL][/B][/I], @[I][B][URL="http://forum.ragezone.com/members/1333388099.html"]Battle[/URL][/B][/I]Style, 0, 0, GetDate()) IF @[I][B][URL="http://forum.ragezone.com/members/138004.html"]count[/URL][/B][/I] >= 200) BEGIN DELETE [cabal_DungeonRankingSingle_table] WHERE DungeonIdx = @[I][B][URL="http://forum.ragezone.com/members/2000255614.html"]dung[/URL][/B][/I]eonIdx AND [ClearTimeSec] = @SavedClearTimeSec END END
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 2 [Batch Start Line 7]
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 22 [Batch Start Line 7]
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 47 [Batch Start Line 7]
Incorrect syntax near '@dungeonIdx'.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 50 [Batch Start Line 7]
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 56 [Batch Start Line 7]
Incorrect syntax near 'Quick'.
Msg 319, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 56 [Batch Start Line 7]
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Msg 319, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Single_Clear_Set, Line 56 [Batch Start Line 7]
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Party_Clear_Set, Line 3 [Batch Start Line 7]
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Party_Clear_Set, Line 38 [Batch Start Line 7]
Incorrect syntax near '@dungeonIdx'.
Msg 102, Level 15, State 1, Procedure cabal_sp_DungeonRanking_Party_Clear_Set, Line 40 [Batch Start Line 7]
Incorrect syntax near ')'.
There is no helping you unless you show what the code you're using looks like as I don't really want to guess where that error is in your case..ive got this errors , any solution for that ?????