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!

[Request] ACCOUNT_LOGIN procedure

Junior Spellweaver
Joined
Oct 17, 2007
Messages
132
Reaction score
1
i need a working account_login procedure that doesnt auto create user or w/e...

quick plz

Ty , Lagalos
 
Experienced Elementalist
Joined
Jun 3, 2006
Messages
272
Reaction score
1
Re: ACCOUNT_LOGIN procedure

._.
use search button
i have posted 1 allready
 
Junior Spellweaver
Joined
Oct 17, 2007
Messages
132
Reaction score
1
Re: ACCOUNT_LOGIN procedure

no time for searching

you could post it now instead of that comment
 
Experienced Elementalist
Joined
Jan 3, 2008
Messages
299
Reaction score
1
Re: ACCOUNT_LOGIN procedure

Like this, Lagalos?

Code:
USE [KN_online]
GO
/****** Object:  StoredProcedure [dbo].[ACCOUNT_LOGIN]    Script Date: 08/24/2008 08:04:50 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO


ALTER PROCEDURE [dbo].[ACCOUNT_LOGIN]
@AccountID	varchar(21),
@Password	varchar(13),
@nRet		smallint	OUTPUT

AS


DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0

DECLARE @pwd varchar(13)

SET @pwd = null

SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
IF @pwd IS null
BEGIN
	SET @nRet = 0
             --SET @nRet = 4
	RETURN
END

ELSE IF @pwd <> @Password
BEGIN
	SET @nRet = 0
             --SET @nRet = 3
	RETURN
END

DECLARE @gokhantasci varchar(21)
select @gokhantasci = count(straccountid)  FROM premium_service WHERE strAccountID = @AccountID

if @gokhantasci = 0
begin
insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
end

SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
	SET @nRet = 1
	RETURN
END
IF @CharNum = 0
BEGIN
	SET @nRet = 1
	RETURN
END
ELSE 
BEGIN
	SET @nRet = @Nation+1
             --SET @nRet = 1
	RETURN
END
 
Junior Spellweaver
Joined
Oct 17, 2007
Messages
132
Reaction score
1
ty omega <3
&
darkangel... i just couldnt find the time to search so...
 
Junior Spellweaver
Joined
Oct 17, 2007
Messages
132
Reaction score
1
hahahah the guy posting unnecessary comments calling me nub : )
have you seen yourself first?
 
Back
Top