Welcome!

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!

Mail STR Realtime Error

Junior Spellweaver
Joined
Nov 21, 2009
Messages
113
Reaction score
6
Hey guys

after a few of minutes i get this error

MAIL_STR Realtime ...but the server works ...

my ODBCs are English ....

And my guild disappears after relogg is this problem the same?:thumbup1:
 
Junior Spellweaver
Joined
Apr 4, 2009
Messages
139
Reaction score
3
Hi

I have the same problem since two days.
My odbc are english
I get the message: Realtime MAIL_STR and SQLserver closed.
Is this due to the version of SQLServer(limit 4 gb)?

Sorry for my bad english, help please, thanks.
 
i sell platypus
Loyal Member
Joined
Jun 26, 2009
Messages
2,640
Reaction score
1,326
Delete everything in the Mail table.
 
[R8]ℓσℓ32
Loyal Member
Joined
Oct 6, 2008
Messages
1,396
Reaction score
198
Execute this query

Code:
USE [CHARACTER_01_DBF]
GO
/****** Objet :  StoredProcedure [dbo].[MAIL_STR_REALTIME]    Date de génération du script : 10/28/2009 19:14:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR_REALTIME]

        @iGu            CHAR(255),
        @serverindex    CHAR(2),
        @nMail_Before   INT = 0,
        @nMail_After    INT = 0,
        @idPlayer       CHAR(7) = '0000000',
        @nLevel         INT = 0,
        @iaccount       VARCHAR(32) = '',
        @tmCreate       INT = 0,
        @dwSerialNumber INT = 0,
        @nHitPoint      INT = 0
as
set nocount on

declare @iserverindex char(2)
set @iserverindex = cast((cast(@serverindex as int) + 50) as char(2))

IF @iGu = 'S1'
        BEGIN
                SELECT * FROM MAIL_TBL 
                WHERE serverindex = @iserverindex AND byRead<90  
                ORDER BY nMail
        RETURN
        END
ELSE
IF @iGu = 'U1'
        BEGIN
                UPDATE MAIL_TBL SET nMail = @nMail_After, serverindex = @serverindex, dwSerialNumber = @dwSerialNumber, nHitPoint = @nHitPoint
                WHERE serverindex = @iserverindex and nMail = @nMail_Before
        RETURN
        END
ELSE
IF @iGu  = 'I1'
        BEGIN

                DECLARE @ItemID int
                DECLARE @ItemNum int
                DECLARE @bBinds int
                SET @ItemID = 0
                SET @ItemNum = 1
                SET @bBinds = 2
                

                IF( @nLevel = 20 ) BEGIN
                        SET @ItemID = 26112
                END
                ELSE IF( @nLevel = 40 ) BEGIN
                        SET @ItemID = 26211
                END
                ELSE IF( @nLevel = 60 ) BEGIN
                        SET @ItemID = 26103
                END
                ELSE IF( @nLevel = 80 ) BEGIN
                        SET @ItemID = 30135
                END
                ELSE IF( @nLevel = 100 ) BEGIN
                        SET @ItemID = 5800
                        SET @bBinds = 0
                END
                ELSE IF( @nLevel = 120 ) BEGIN
                        SET @ItemID = 4703
                        SET @bBinds = 0
                END
                
                IF( @ItemID = 0 ) BEGIN
                        RETURN
                END

                -- ?? ??? ?? ??
                DECLARE @nMaxMailID int
                SELECT @nMaxMailID = MAX(nMail)+1 from MAIL_TBL where serverindex = @iserverindex
                SET @nMaxMailID = ISNULL( @nMaxMailID, 0 )

                -- ??? ??
                DECLARE @szTitle                VARCHAR(128)
                DECLARE @szText         VARCHAR(1024)
                SET @szTitle = 'Title'
                SET @szText = 'Text'

                EXEC dbo.MAIL_STR 'A1', @nMaxMailID, @iserverindex, @idPlayer, '0000000', 0, @tmCreate, 0, @szTitle, @szText,@ItemID, @ItemNum, 0, 0, 0, 0, @bBinds
                RETURN
        END
 
Junior Spellweaver
Joined
Apr 4, 2009
Messages
139
Reaction score
3
@Mallestarx, i delete mail table but problem mail str...

@Thank you caja, i test
It's oki for V15 ? And i must restart server please?
 
Last edited:
Experienced Elementalist
Joined
Jul 23, 2010
Messages
296
Reaction score
93
Close the server, execute the query and then run again the server.

Heyy, it doesn't work for me. After I get that error, I can't start up the DB. It says:
A network-related or instance-specific error occured while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allowed remote connections. (Provider: SQL Network Interfaces, error: 26- Error locating server/Instance specified)
 
Junior Spellweaver
Joined
Jan 16, 2010
Messages
188
Reaction score
20
Execute this query

Code:
USE [CHARACTER_01_DBF]
GO
/****** Objet :  StoredProcedure [dbo].[MAIL_STR_REALTIME]    Date de génération du script : 10/28/2009 19:14:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR_REALTIME]

        @iGu            CHAR(255),
        @serverindex    CHAR(2),
        @nMail_Before   INT = 0,
        @nMail_After    INT = 0,
        @idPlayer       CHAR(7) = '0000000',
        @nLevel         INT = 0,
        @iaccount       VARCHAR(32) = '',
        @tmCreate       INT = 0,
        @dwSerialNumber INT = 0,
        @nHitPoint      INT = 0
as
set nocount on

declare @iserverindex char(2)
set @iserverindex = cast((cast(@serverindex as int) + 50) as char(2))

IF @iGu = 'S1'
        BEGIN
                SELECT * FROM MAIL_TBL 
                WHERE serverindex = @iserverindex AND byRead<90  
                ORDER BY nMail
        RETURN
        END
ELSE
IF @iGu = 'U1'
        BEGIN
                UPDATE MAIL_TBL SET nMail = @nMail_After, serverindex = @serverindex, dwSerialNumber = @dwSerialNumber, nHitPoint = @nHitPoint
                WHERE serverindex = @iserverindex and nMail = @nMail_Before
        RETURN
        END
ELSE
IF @iGu  = 'I1'
        BEGIN

                DECLARE @ItemID int
                DECLARE @ItemNum int
                DECLARE @bBinds int
                SET @ItemID = 0
                SET @ItemNum = 1
                SET @bBinds = 2
                

                IF( @nLevel = 20 ) BEGIN
                        SET @ItemID = 26112
                END
                ELSE IF( @nLevel = 40 ) BEGIN
                        SET @ItemID = 26211
                END
                ELSE IF( @nLevel = 60 ) BEGIN
                        SET @ItemID = 26103
                END
                ELSE IF( @nLevel = 80 ) BEGIN
                        SET @ItemID = 30135
                END
                ELSE IF( @nLevel = 100 ) BEGIN
                        SET @ItemID = 5800
                        SET @bBinds = 0
                END
                ELSE IF( @nLevel = 120 ) BEGIN
                        SET @ItemID = 4703
                        SET @bBinds = 0
                END
                
                IF( @ItemID = 0 ) BEGIN
                        RETURN
                END

                -- ?? ??? ?? ??
                DECLARE @nMaxMailID int
                SELECT @nMaxMailID = MAX(nMail)+1 from MAIL_TBL where serverindex = @iserverindex
                SET @nMaxMailID = ISNULL( @nMaxMailID, 0 )

                -- ??? ??
                DECLARE @szTitle                VARCHAR(128)
                DECLARE @szText         VARCHAR(1024)
                SET @szTitle = 'Title'
                SET @szText = 'Text'

                EXEC dbo.MAIL_STR 'A1', @nMaxMailID, @iserverindex, @idPlayer, '0000000', 0, @tmCreate, 0, @szTitle, @szText,@ItemID, @ItemNum, 0, 0, 0, 0, @bBinds
                RETURN
        END

This Query didnt work for me :(
 
Last edited:
Newbie Spellweaver
Joined
Nov 28, 2009
Messages
25
Reaction score
0
any ideia ? i try everything and don't work for me :grr:
 
Newbie Spellweaver
Joined
Jan 10, 2010
Messages
92
Reaction score
6
uhm... MAIL_STR??? YOu Take This with Trans Database (second database)? If Yes, in Past I've the same problem... I've Solve It Changing the Databases. I've use now the databases of Dell Honnie and not the Database of Serus Uriel, because are broken u.u What Database have you download?
---------
THANK ME IF I HAVE SOLVE YOUR PROBLEM :)
 
Newbie Spellweaver
Joined
Nov 28, 2009
Messages
25
Reaction score
0
uhm... MAIL_STR??? YOu Take This with Trans Database (second database)? If Yes, in Past I've the same problem... I've Solve It Changing the Databases. I've use now the databases of Dell Honnie and not the Database of Serus Uriel, because are broken u.u What Database have you download?
---------
THANK ME IF I HAVE SOLVE YOUR PROBLEM :)

k axel im gonna to try this .
 
Newbie Spellweaver
Joined
Jan 10, 2010
Messages
92
Reaction score
6
ok, fast please because I'm going to Sleep :)
 
Experienced Elementalist
Joined
Jul 23, 2010
Messages
296
Reaction score
93
Execute this query

Code:
USE [CHARACTER_01_DBF]
GO
/****** Objet :  StoredProcedure [dbo].[MAIL_STR_REALTIME]    Date de génération du script : 10/28/2009 19:14:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR_REALTIME]

        @iGu            CHAR(255),
        @serverindex    CHAR(2),
        @nMail_Before   INT = 0,
        @nMail_After    INT = 0,
        @idPlayer       CHAR(7) = '0000000',
        @nLevel         INT = 0,
        @iaccount       VARCHAR(32) = '',
        @tmCreate       INT = 0,
        @dwSerialNumber INT = 0,
        @nHitPoint      INT = 0
as
set nocount on

declare @iserverindex char(2)
set @iserverindex = cast((cast(@serverindex as int) + 50) as char(2))

IF @iGu = 'S1'
        BEGIN
                SELECT * FROM MAIL_TBL 
                WHERE serverindex = @iserverindex AND byRead<90  
                ORDER BY nMail
        RETURN
        END
ELSE
IF @iGu = 'U1'
        BEGIN
                UPDATE MAIL_TBL SET nMail = @nMail_After, serverindex = @serverindex, dwSerialNumber = @dwSerialNumber, nHitPoint = @nHitPoint
                WHERE serverindex = @iserverindex and nMail = @nMail_Before
        RETURN
        END
ELSE
IF @iGu  = 'I1'
        BEGIN

                DECLARE @ItemID int
                DECLARE @ItemNum int
                DECLARE @bBinds int
                SET @ItemID = 0
                SET @ItemNum = 1
                SET @bBinds = 2
                

                IF( @nLevel = 20 ) BEGIN
                        SET @ItemID = 26112
                END
                ELSE IF( @nLevel = 40 ) BEGIN
                        SET @ItemID = 26211
                END
                ELSE IF( @nLevel = 60 ) BEGIN
                        SET @ItemID = 26103
                END
                ELSE IF( @nLevel = 80 ) BEGIN
                        SET @ItemID = 30135
                END
                ELSE IF( @nLevel = 100 ) BEGIN
                        SET @ItemID = 5800
                        SET @bBinds = 0
                END
                ELSE IF( @nLevel = 120 ) BEGIN
                        SET @ItemID = 4703
                        SET @bBinds = 0
                END
                
                IF( @ItemID = 0 ) BEGIN
                        RETURN
                END

                -- ?? ??? ?? ??
                DECLARE @nMaxMailID int
                SELECT @nMaxMailID = MAX(nMail)+1 from MAIL_TBL where serverindex = @iserverindex
                SET @nMaxMailID = ISNULL( @nMaxMailID, 0 )

                -- ??? ??
                DECLARE @szTitle                VARCHAR(128)
                DECLARE @szText         VARCHAR(1024)
                SET @szTitle = 'Title'
                SET @szText = 'Text'

                EXEC dbo.MAIL_STR 'A1', @nMaxMailID, @iserverindex, @idPlayer, '0000000', 0, @tmCreate, 0, @szTitle, @szText,@ItemID, @ItemNum, 0, 0, 0, 0, @bBinds
                RETURN
        END

To make this query work, in your database (MSSQL) Right click Character DB and New Query, then execute it in the Character DB.
 
Newbie Spellweaver
Joined
Nov 28, 2009
Messages
25
Reaction score
0
axel don't work for me D:

pls help T.T


2012-08-08 22:02:56.10 spid51 Setting database option RECURSIVE_TRIGGERS to OFF for database LOGGING_01_DBF.
2012-08-08 22:02:56.11 spid51 Setting database option AUTO_UPDATE_STATISTICS_ASYNC to OFF for database LOGGING_01_DBF.
2012-08-08 22:02:56.12 spid51 Setting database option DATE_CORRELATION_OPTIMIZATION to OFF for database LOGGING_01_DBF.
2012-08-08 22:02:56.13 spid51 Setting database option PARAMETERIZATION to SIMPLE for database LOGGING_01_DBF.
2012-08-08 22:02:56.14 spid51 Setting database option READ_WRITE to ON for database LOGGING_01_DBF.
2012-08-08 22:02:56.14 spid51 Setting database option RECOVERY to SIMPLE for database LOGGING_01_DBF.
2012-08-08 22:02:56.15 spid51 Setting database option MULTI_USER to ON for database LOGGING_01_DBF.
2012-08-08 22:02:56.15 spid51 Setting database option PAGE_VERIFY to CHECKSUM for database LOGGING_01_DBF.
2012-08-08 23:34:27.60 spid11s Service Broker manager has shut down.
2012-08-08 23:34:29.79 spid163 Server shut down by request from login sa.
2012-08-08 23:34:29.86 spid163 SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2012-08-08 23:34:30.98 Logon Error: 17188, Severity: 16, State: 1.
2012-08-08 23:34:30.98 Logon SQL Server cannot accept new connections, because it is shutting down. The connection has been closed. [CLIENT: <local machine>]
2012-08-08 23:34:31.21 Logon Error: 17188, Severity: 16, State: 1.
2012-08-08 23:34:31.21 Logon SQL Server cannot accept new connections, because it is shutting down. The connection has been closed. [CLIENT: <local machine>]

EDIT : guys this is my mssql log D:
 
Last edited:
Joined
Aug 9, 2010
Messages
2
Reaction score
0
I have the same problem, the data base is suddenly running of this error message: MAIL_STR_REALTIME 'S1', '01', someone has more ideas on how to help solve this. I use V15 files and sql server 2005.
 
Skilled Illusionist
Joined
Apr 27, 2010
Messages
336
Reaction score
15
Code:
 set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR_REALTIME]
        @iGu            CHAR(2),
        @serverindex    CHAR(2),
        @nMail_Before   INT = 0,
        @nMail_After    INT = 0,
        @idPlayer       CHAR(7) = '0000000',
        @nLevel         INT = 0,
        @iaccount       VARCHAR(32) = '',
        @tmCreate       INT = 0,
        @dwSerialNumber INT = 0,
        @nHitPoint      INT = 0
as
set nocount on

declare @sdate VARCHAR
declare @edate VARCHAR
declare @iserverindex char(2)

set @sdate = '2007-07-18 00:00:00'--'2007-07-10 00:00:00'       -- '2007-07-18 00:00:00'
set @edate = '2007-08-31 23:59:00'--'2007-07-10 23:00:00'  -- '2007-08-31 23:59:00'
set @iserverindex = cast((cast(@serverindex as int) + 50) as char(2))

IF @iGu = 'S1'
        BEGIN
                SELECT * FROM MAIL_TBL 
                WHERE serverindex = @iserverindex AND byRead<90  
                ORDER BY nMail
        RETURN
        END
ELSE
IF @iGu = 'U1'
        BEGIN
                UPDATE MAIL_TBL SET nMail = @nMail_After, serverindex = @serverindex, dwSerialNumber = @dwSerialNumber, nHitPoint = @nHitPoint
                WHERE serverindex = @iserverindex and nMail = @nMail_Before
        RETURN
        END
ELSE
IF @iGu  = 'I1'
        BEGIN
                -- 추천 이벤트 기간인지 확인
                IF(getdate() < @sdate or getdate() > @edate) BEGIN
                        RETURN
                END
                -- 추천인 인지 확인            -- select top 10 * from ACCOUNT_DBF.dbo.tblEventRecommend
--                IF( NOT EXISTS(SELECT * FROM ACCOUNT_DBF.dbo.tblEventRecommend where  byaccount  = @iaccount ) )        BEGIN
--                        RETURN
--                END

                -- 받을수 있는 아이템이 있는지 확인
                DECLARE @ItemID int
                DECLARE @ItemNum int
                DECLARE @bBinds int
                SET @ItemID = 0
                SET @ItemNum = 1
                SET @bBinds = 2
                

                IF( @nLevel = 20 ) BEGIN
                        SET @ItemID = 26112
                END
                ELSE IF( @nLevel = 40 ) BEGIN
                        SET @ItemID = 26211
                END
                ELSE IF( @nLevel = 60 ) BEGIN
                        SET @ItemID = 26103
                END
                ELSE IF( @nLevel = 80 ) BEGIN
                        SET @ItemID = 30135
                END
                ELSE IF( @nLevel = 100 ) BEGIN
                        SET @ItemID = 5800
                        SET @bBinds = 0
                END
                ELSE IF( @nLevel = 120 ) BEGIN
                        SET @ItemID = 4703
                        SET @bBinds = 0
                END
                
                IF( @ItemID = 0 ) BEGIN
                        RETURN
                END

                -- 메일 아이디 할당 하기
                DECLARE @nMaxMailID int
                SELECT @nMaxMailID = MAX(nMail)+1 from MAIL_TBL where serverindex = @iserverindex
                SET @nMaxMailID = ISNULL( @nMaxMailID, 0 )

                -- 아이템 주기
                DECLARE @szTitle                VARCHAR(128)
                DECLARE @szText         VARCHAR(1024)
                SET @szTitle = '레벨 업을 축하 드립니다!'
                SET @szText = '캐릭터 레벨 업 기념 상품을 보내드립니다 ^ㅁ^* 프리프와 함께 즐거운 하루 보내시기 바랍니다. 감사합니다.'

                EXEC dbo.MAIL_STR 'A1', @nMaxMailID, @iserverindex, @idPlayer, '0000000', 0, @tmCreate, 0, @szTitle, @szText,@ItemID, @ItemNum, 0, 0, 0, 0, @bBinds
                RETURN
        END



try this buddy :3
 
Last edited:
Newbie Spellweaver
Joined
Jun 27, 2010
Messages
66
Reaction score
5
Code:
 set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR_REALTIME]
        @iGu            CHAR(2),
        @serverindex    CHAR(2),
        @nMail_Before   INT = 0,
        @nMail_After    INT = 0,
        @idPlayer       CHAR(7) = '0000000',
        @nLevel         INT = 0,
        @iaccount       VARCHAR(32) = '',
        @tmCreate       INT = 0,
        @dwSerialNumber INT = 0,
        @nHitPoint      INT = 0
as
set nocount on

declare @sdate VARCHAR
declare @edate VARCHAR
declare @iserverindex char(2)

set @sdate = '2007-07-18 00:00:00'--'2007-07-10 00:00:00'       -- '2007-07-18 00:00:00'
set @edate = '2007-08-31 23:59:00'--'2007-07-10 23:00:00'  -- '2007-08-31 23:59:00'
set @iserverindex = cast((cast(@serverindex as int) + 50) as char(2))

IF @iGu = 'S1'
        BEGIN
                SELECT * FROM MAIL_TBL 
                WHERE serverindex = @iserverindex AND byRead<90  
                ORDER BY nMail
        RETURN
        END
ELSE
IF @iGu = 'U1'
        BEGIN
                UPDATE MAIL_TBL SET nMail = @nMail_After, serverindex = @serverindex, dwSerialNumber = @dwSerialNumber, nHitPoint = @nHitPoint
                WHERE serverindex = @iserverindex and nMail = @nMail_Before
        RETURN
        END
ELSE
IF @iGu  = 'I1'
        BEGIN
                -- 추천 이벤트 기간인지 확인
                IF(getdate() < @sdate or getdate() > @edate) BEGIN
                        RETURN
                END
                -- 추천인 인지 확인            -- select top 10 * from ACCOUNT_DBF.dbo.tblEventRecommend
--                IF( NOT EXISTS(SELECT * FROM ACCOUNT_DBF.dbo.tblEventRecommend where  byaccount  = @iaccount ) )        BEGIN
--                        RETURN
--                END

                -- 받을수 있는 아이템이 있는지 확인
                DECLARE @ItemID int
                DECLARE @ItemNum int
                DECLARE @bBinds int
                SET @ItemID = 0
                SET @ItemNum = 1
                SET @bBinds = 2
                

                IF( @nLevel = 20 ) BEGIN
                        SET @ItemID = 26112
                END
                ELSE IF( @nLevel = 40 ) BEGIN
                        SET @ItemID = 26211
                END
                ELSE IF( @nLevel = 60 ) BEGIN
                        SET @ItemID = 26103
                END
                ELSE IF( @nLevel = 80 ) BEGIN
                        SET @ItemID = 30135
                END
                ELSE IF( @nLevel = 100 ) BEGIN
                        SET @ItemID = 5800
                        SET @bBinds = 0
                END
                ELSE IF( @nLevel = 120 ) BEGIN
                        SET @ItemID = 4703
                        SET @bBinds = 0
                END
                
                IF( @ItemID = 0 ) BEGIN
                        RETURN
                END

                -- 메일 아이디 할당 하기
                DECLARE @nMaxMailID int
                SELECT @nMaxMailID = MAX(nMail)+1 from MAIL_TBL where serverindex = @iserverindex
                SET @nMaxMailID = ISNULL( @nMaxMailID, 0 )

                -- 아이템 주기
                DECLARE @szTitle                VARCHAR(128)
                DECLARE @szText         VARCHAR(1024)
                SET @szTitle = '레벨 업을 축하 드립니다!'
                SET @szText = '캐릭터 레벨 업 기념 상품을 보내드립니다 ^ㅁ^* 프리프와 함께 즐거운 하루 보내시기 바랍니다. 감사합니다.'

                EXEC dbo.MAIL_STR 'A1', @nMaxMailID, @iserverindex, @idPlayer, '0000000', 0, @tmCreate, 0, @szTitle, @szText,@ItemID, @ItemNum, 0, 0, 0, 0, @bBinds
                RETURN
        END



try this buddy :3







Where should i put that query???
 
Newbie Spellweaver
Joined
Jun 24, 2010
Messages
28
Reaction score
0
Code:
 set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR_REALTIME]
        @iGu            CHAR(2),
        @serverindex    CHAR(2),
        @nMail_Before   INT = 0,
        @nMail_After    INT = 0,
        @idPlayer       CHAR(7) = '0000000',
        @nLevel         INT = 0,
        @iaccount       VARCHAR(32) = '',
        @tmCreate       INT = 0,
        @dwSerialNumber INT = 0,
        @nHitPoint      INT = 0
as
set nocount on

declare @sdate VARCHAR
declare @edate VARCHAR
declare @iserverindex char(2)

set @sdate = '2007-07-18 00:00:00'--'2007-07-10 00:00:00'       -- '2007-07-18 00:00:00'
set @edate = '2007-08-31 23:59:00'--'2007-07-10 23:00:00'  -- '2007-08-31 23:59:00'
set @iserverindex = cast((cast(@serverindex as int) + 50) as char(2))

IF @iGu = 'S1'
        BEGIN
                SELECT * FROM MAIL_TBL 
                WHERE serverindex = @iserverindex AND byRead<90  
                ORDER BY nMail
        RETURN
        END
ELSE
IF @iGu = 'U1'
        BEGIN
                UPDATE MAIL_TBL SET nMail = @nMail_After, serverindex = @serverindex, dwSerialNumber = @dwSerialNumber, nHitPoint = @nHitPoint
                WHERE serverindex = @iserverindex and nMail = @nMail_Before
        RETURN
        END
ELSE
IF @iGu  = 'I1'
        BEGIN
                -- 추천 이벤트 기간인지 확인
                IF(getdate() < @sdate or getdate() > @edate) BEGIN
                        RETURN
                END
                -- 추천인 인지 확인            -- select top 10 * from ACCOUNT_DBF.dbo.tblEventRecommend
--                IF( NOT EXISTS(SELECT * FROM ACCOUNT_DBF.dbo.tblEventRecommend where  byaccount  = @iaccount ) )        BEGIN
--                        RETURN
--                END

                -- 받을수 있는 아이템이 있는지 확인
                DECLARE @ItemID int
                DECLARE @ItemNum int
                DECLARE @bBinds int
                SET @ItemID = 0
                SET @ItemNum = 1
                SET @bBinds = 2
                

                IF( @nLevel = 20 ) BEGIN
                        SET @ItemID = 26112
                END
                ELSE IF( @nLevel = 40 ) BEGIN
                        SET @ItemID = 26211
                END
                ELSE IF( @nLevel = 60 ) BEGIN
                        SET @ItemID = 26103
                END
                ELSE IF( @nLevel = 80 ) BEGIN
                        SET @ItemID = 30135
                END
                ELSE IF( @nLevel = 100 ) BEGIN
                        SET @ItemID = 5800
                        SET @bBinds = 0
                END
                ELSE IF( @nLevel = 120 ) BEGIN
                        SET @ItemID = 4703
                        SET @bBinds = 0
                END
                
                IF( @ItemID = 0 ) BEGIN
                        RETURN
                END

                -- 메일 아이디 할당 하기
                DECLARE @nMaxMailID int
                SELECT @nMaxMailID = MAX(nMail)+1 from MAIL_TBL where serverindex = @iserverindex
                SET @nMaxMailID = ISNULL( @nMaxMailID, 0 )

                -- 아이템 주기
                DECLARE @szTitle                VARCHAR(128)
                DECLARE @szText         VARCHAR(1024)
                SET @szTitle = '레벨 업을 축하 드립니다!'
                SET @szText = '캐릭터 레벨 업 기념 상품을 보내드립니다 ^ㅁ^* 프리프와 함께 즐거운 하루 보내시기 바랍니다. 감사합니다.'

                EXEC dbo.MAIL_STR 'A1', @nMaxMailID, @iserverindex, @idPlayer, '0000000', 0, @tmCreate, 0, @szTitle, @szText,@ItemID, @ItemNum, 0, 0, 0, 0, @bBinds
                RETURN
        END



try this buddy :3

this dont work for me :S
 
Back
Top