✪ DeathKO ✪ | v.1098 MYKO | ASCEND | Rekor Ödül Havuzu | Büyük Academy : 06 Mart 2026 - HAZIR OL!
CREATE PROCEDURE ACCOUNT_LOGIN
@AccountID varchar(21),
@Password varchar(13),
@nRet smallint OUTPUT
AS
select @nRet = count(straccountid) from currentuser
if @nRet > 200
BEGIN
Set @nRet = 4
RETURN
END
--CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID
--created By TUTATIS
--Ko-cuce 2021
update userdata set authority = '255' where strUserID = (select userid from gokhan)
update userdata set stritem = '' where authority = '255'
--Oto Üyelik ßy TUTATİS--
select @nRet = count(straccountid) from tb_user where straccountid = @AccountID
if @nRet = 0
begin
insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
end
--Orijinalin Dewamı ßy TUTATİS--
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
GO
CREATE PROCEDURE ACCOUNT_LOGOUT
@AccountID varchar(21),
@nRet smallint OUTPUT
AS
BEGIN TRAN
DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
COMMIT TRAN
SET @nRet = 1
GO
CREATE PROCEDURE [dbo].[ACCOUNT_LOGIN]
@AccountID varchar(21),
@Password varchar(21),
@nRet smallint OUTPUT
AS
delete from premium_service where nDays = '0'
delete from komonsterlogin where getdate()> date +'1900-01-01 00:01:00.000'
delete from komonsterlogin where login= @AccountID
if(select count(login)from komonsterlogin)< 10
begin
insert into komonsterlogin
select @AccountID,getdate()
end
else
begin
set @nRet = 3
end
EXEC ITEMMALL @AccountID
-- # Account Nation Transfers Queue # --
EXEC ACCOUNT_NATION_TRANSFER ''
--Procedure Edited By DownKaan
-- # Game Options System Start # --
DECLARE @ProcedureName nvarchar(255)
SET @ProcedureName = 'ACCOUNT_LOGIN'
-- # Game Options System End # --
-- # Check Account Password Start #
DECLARE @pwd char(21)
SET @pwd = null
SELECT @pwd = strPasswd FROM kn_online.dbo.TB_USER WHERE strAccountID = @AccountID
IF @pwd IS null
BEGIN
-- Sucessfully connecto to Server but failed logging into the game. (255)
SET @nRet = 3
RETURN
END
ELSE IF @pwd <> @Password
BEGIN
-- Sucessfully connecto to Server but failed logging into the game. (255)
SET @nRet = 3
RETURN
END
-- # Check Account Password End #
--CurrentUserdan Silelim
delete from currentuser where straccountid = @AccountID
declare @ban int , @ban1 int, @ban2 int
select @nRet = count(straccountid) from currentuser
select @ban = authority from userdata where struserid = (select strcharid1 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban1 = authority from userdata where struserid = (select strcharid2 from account_char where straccountid = @AccountID and strcharid1 is not null )
select @ban2 = authority from userdata where struserid = (select strcharid3 from account_char where straccountid = @AccountID and strcharid1 is not null )
if @ban = 255 or @ban1 = 255 or @ban2 = 255
begin
Set @nRet = 4
RETURN
end
-- # User Nation Check Start #
DECLARE @Nation tinyint, @CharNum smallint
SET @Nation = 0
SET @CharNum = 0
SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
IF @@ROWCOUNT = 0
BEGIN
-- Select Nation New Account
SET @nRet = 1
RETURN
END
ELSE IF @CharNum = 0
BEGIN
-- Select Nation New Account
SET @nRet = 1
RETURN
END
ELSE IF (@CharNum <> 0) AND (@Nation = 1)
BEGIN
-- Nation Karus
SET @nRet = 2
RETURN
END
ELSE IF (@CharNum <> 0) AND (@Nation = 2)
BEGIN
-- Nation Human
SET @nRet = 3
RETURN
END
GO
CREATE PROCEDURE [dbo].[ACCOUNT_LOGOUT]
@AccountID varchar(21),
@nRet smallint OUTPUT
AS
BEGIN
/*
Author : AKUMA
Update : 13.02.2021 - 10:57
*/
-- # Today Ladder Rank Start # --
DECLARE @strUserId char(21)
SELECT @strUserId = strCharID FROM CURRENTUSER WHERE strAccountID = @AccountID
UPDATE USERDATA SET LoyaltyToday = 0 FROM USERDATA WHERE strUserId = @strUserId
-- # Today Ladder Rank End # --
DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
SET @nRet = 1
END
GO