• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Changing the starter money/unlimited GP

Joined
Feb 28, 2012
Messages
738
Reaction score
65
Credits: Naty
In usp_login, you can find this
F @@ROWCOUNT = 0
BEGIN
IF @bTestDB > 0 OR @InsertUser = 1
BEGIN
-- 테스트 DB이다.
-- For Debug, 없는 사용자의 경우 임시로 넣는다.
SET @userexp = 0;
SET @ladderpoint = 10000;
SET @nowservernum = 0;
SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 1000000 ELSE 0 END;
SET @attribute = 0;
SET @authusernum = @authnum;
SET @LiveTime = GETDATE();
-- if first login of this user, add new user

BEGIN TRAN

Now the edit changes is 1000000 and SET @ladderpoint = 10000;, which controllers it.
Also change UserInfoGames fdladderpoint default value.
Have fun.
 
Junior Spellweaver
Joined
Aug 1, 2012
Messages
145
Reaction score
16
Credits: Naty
In usp_login, you can find this
F @@ROWCOUNT = 0
BEGIN
IF @bTestDB > 0 OR @InsertUser = 1
BEGIN
-- 테스트 DB이다.
-- For Debug, 없는 사용자의 경우 임시로 넣는다.
SET @userexp = 0;
SET @ladderpoint = 10000;
SET @nowservernum = 0;
SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 1000000 ELSE 0 END;
SET @attribute = 0;
SET @authusernum = @authnum;
SET @LiveTime = GETDATE();
-- if first login of this user, add new user

BEGIN TRAN

Now the edit changes is 1000000 and SET @ladderpoint = 10000;, which controllers it.
Also change UserInfoGames fdladderpoint default value.
Have fun.


This is my usp_login

Code:
IF @@ROWCOUNT = 0  
 BEGIN  
  IF @bTestDB > 1 OR @InsertUser = 1  
   BEGIN  
    -- 테스트 DB이다.  
   -- For Debug, 없는 사용자의 경우 임시로 넣는다.  
     SET @userexp = 0;  
     SET @ladderpoint = 0;  
     SET @nowservernum = 0;  
     SET @gamemoney = CASE WHEN @InsertUser <> 0 THEN 1000000 ELSE 0 END;  
     SET @attribute = 0;  
     SET @authusernum = @authnum;  
     SET @LiveTime = GETDATE();

already set but I still have the same infinite gp
 
Newbie Spellweaver
Joined
Jul 13, 2010
Messages
48
Reaction score
4
Just set the 100000 to or something lower then 100k. 20000 is a good start until someone makes a voting system.

kevin, eL wei o morra puso ahi que cambies eL monto de 100000 a aLgo menor a 100,000, dice que 20,000 (20000) es un buen comienzo de gp.
 
Newbie Spellweaver
Joined
Aug 14, 2013
Messages
11
Reaction score
0
My usp_login

IF @@ROWCOUNT = 0
BEGIN
IF @bTestDB > 1 OR @InsertUser = 1
BEGIN
-- 테스트 DB이다.
-- For Debug, 없는 사용자의 경우 임시로 넣는다.
SET @userexp = 0;
SET @ladderpoint = 10000;
SET @nowservernum = 0;
SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 50000 ELSE 0 END;
SET @attribute = 0;
SET @authusernum = @authnum;
SET @LiveTime = GETDATE();



help please, how to remove infinite gp to 0?
Help Kevin Teran
 
Last edited:
Junior Spellweaver
Joined
Dec 21, 2009
Messages
188
Reaction score
40
My usp_login

IF @@ROWCOUNT = 0
BEGIN
IF @bTestDB > 1 OR @InsertUser = 1
BEGIN
-- 테스트 DB이다.
-- For Debug, 없는 사용자의 경우 임시로 넣는다.
SET @userexp = 0;
SET @ladderpoint = 10000;
SET @nowservernum = 0;
SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 50000 ELSE 0 END;
SET @attribute = 0;
SET @authusernum = @authnum;
SET @LiveTime = GETDATE();



help please, how to remove infinite gp to 0?
Help Kevin Teran
Edit the table in your database and you're good to go.
 
Joined
Feb 28, 2012
Messages
738
Reaction score
65
My usp_login

IF @@ROWCOUNT = 0
BEGIN
IF @bTestDB > 1 OR @InsertUser = 1
BEGIN
-- 테스트 DB이다.
-- For Debug, 없는 사용자의 경우 임시로 넣는다.
SET @userexp = 0;
SET @ladderpoint = 10000;
SET @nowservernum = 0;
SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 50000 ELSE 0 END;
SET @attribute = 0;
SET @authusernum = @authnum;
SET @LiveTime = GETDATE();



help please, how to remove infinite gp to 0?
Help Kevin Teran

Please don't beg specific people for things in all caps.
You were annoying during MMOPs beta testing by posting the errors you got on youtube asking for help, and now you're being annoying on my threads... please stop.
 
Junior Spellweaver
Joined
Apr 30, 2011
Messages
118
Reaction score
14
Code:
USE [talesrunner]
GO
/****** Object:  StoredProcedure [dbo].[usp_login]    Script Date: 08/18/2013 15:35:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************  
 Name:   
 Desc:  
  
 Return-values:  
   
 Parameters:  
 Input  
 ----------------------------  
  
 Output  
 ----------------------------  
  
 Auth:   
 Date:  
 Version:  
******************************************************************************  
 Change History  
******************************************************************************  
 Date:2009-11-11  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 로그인시 커플의 접속중인 서버 번호를 반환해준다.  
 ----------------------------   
  
******************************************************************************  
 Date:2010-03-10  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 중복 로그인시 처리를 서버에서 처리할 수 있도록 코드 제거  
 ----------------------------   
  
******************************************************************************  
 Date:2010-10-25  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 로그인 채널를 반환하는 코드 추가  
 ----------------------------   
  
******************************************************************************  
 Date:2010-12-29  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 최적화  
 ----------------------------   
  
******************************************************************************  
 Date:2011-02-23  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: tblBlackList 인덱스 변경에 따른 코드 변경  
 ----------------------------   
  
******************************************************************************  
 Date:2011-03-23  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 엠게임 채널 추가  
 ----------------------------   
  
******************************************************************************  
 Date:2011-04-19  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 길드 버프 지급시 아이템 기간 만료 날짜 설정해줌.  
 ----------------------------   
  
******************************************************************************  
 Date:2011-05-17  
 ----------------------------  
   
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: PlayNet 채널 추가  
 ----------------------------   
   
******************************************************************************  
 Date: 2011.06.13  
 ----------------------------  
   
 Author: goldyeun  
 ----------------------------  
  
 Description: license 제거  
 ----------------------------   
  
******************************************************************************  
 Date: 2011.06.13  
 ----------------------------  
  
 Author: Seo Kwangsoo  
 ----------------------------  
  
 Description: 유저 성별 제거  
 ----------------------------   
  
******************************************************************************
 Date:2011-06-30
 ----------------------------
 
 Author: HoChul Yang
 ----------------------------

 Description: 중국 외에 대만/홍콩도 LoginKey 사용하지 않음
 ---------------------------- 

******************************************************************************
 Date:2011-10-12
 ----------------------------
 
 Author: Jeong HyeonJi
 ----------------------------

 Description: 휴면기간 및 휴면유저인지를 반환하는 코드 추가 
				접속하지 않은 기간이 3개월이상시 재판소에 등록
 ---------------------------- 

******************************************************************************
 Date:2011-10-13
 ----------------------------
 
 Author: Seo Kwangsoo
 ----------------------------

 Description: 1. 허그 시스템 추가
			  2. 길드 버프 지급시 길드 가입 여부 체크 코드 추가
 ---------------------------- 

******************************************************************************
 Date:2011-11-23
 ----------------------------
 
 Author: Seo Kwangsoo
 ----------------------------

 Description: 테섭 신규 접속일때 100만 TR 지급
 ---------------------------- 
******************************************************************************
 Date:2011-12-28
 ----------------------------
 
 Author: goldyeun
 ----------------------------

 Description: 멤버쉽 중국만 사용, 카오스채널 오픈 유무로 팀 조회, 길드번호 포함
 ---------------------------- 

******************************************************************************
 Date:2012-01-04
 ----------------------------
 
 Author: HyeonJi
 ----------------------------

 Description: 허그유저 기간 3개월에서 6개월로 변경
 ---------------------------- 

******************************************************************************  
 Date: 2012-01-11
 ----------------------------
 
 Author: Seo Kwangsoo
 ----------------------------

 Description: 카툰 네트워크 채널 추가
 ---------------------------- 

******************************************************************************
 Date: 2012.01.30
 ----------------------------

 Author: Kim SangUk
 ----------------------------

 Description: 길드 버프 아이템 지급 코드 없앰
 ---------------------------- 

******************************************************************************/
  
ALTER PROCEDURE [dbo].[usp_login]  
 @servernum INT,  
 @userid VARCHAR(50),  
 @authnum BIGINT,  
 @loginkey INT,  
 @regpcroom INT,  
 @ip VARCHAR(20)  
AS  
SET NOCOUNT ON  
EXEC dbo.usp_LogTranCount @@procid  
  
DECLARE @InvalidIP INT;  
  
SELECT TOP 1 @InvalidIP = fdNum  
FROM tblInvalidLoginIP   
 WITH (NOLOCK)   
 WHERE fdStartIP <= @ip AND fdEndIP >= @ip AND fdUse = 1  
  
IF(@InvalidIP > 0 )  
 BEGIN  
  RAISERROR('invalid country', 16, 1);  
  RETURN;  
 END  
  
-- 로그인을 시도하는 IP가 자국 IP 인지 확인  
DECLARE @ret INT;  
SELECT TOP 1 @ret = fdNum FROM tblServerSettingInfo with(nolock) WHERE fdKey = 'useIPProtection' AND fdValue = 'true'  
IF @@rowcount = 1  
 BEGIN  
  DECLARE @checkResult INT  
  EXEC usp_checkValidIPAddress @ip, @checkResult OUTPUT  
  IF @checkResult = 0  
   BEGIN  
    RAISERROR('invalid country', 16, 1);  
    RETURN;  
   END  
 END  
  
------------------------------------------------------------------------------------------------------------------------  
-- 한게임 채널링 관련 처리.  
DECLARE @Channel INT;  
  
SET @Channel = -1;  
  
DECLARE @leftstr VARCHAR(50);  
DECLARE @rightstr VARCHAR(50);  
DECLARE @findTag INT;  
  
SET @findTag = CHARINDEX('@',@userid);  
IF @findTag <> 0  AND @findTag IS NOT NULL  
 BEGIN  
  SET @leftstr   = LEFT(@userid, @findTag - 1)   
  SET @rightstr = RIGHT(@userid, LEN(@userid) - @findTag)  
  SET @userid = @leftstr;  
  
  IF @rightstr = 'hg' -- 한게임에서 접속했다.  
   BEGIN  
    SET @Channel = 1;  
   END  
  ELSE IF @rightstr = 'sp' -- 심플 아이디  
   BEGIN  
    SET @Channel = 2;  
   END  
  ELSE IF @rightstr = 'nt' -- 네이트온에서 접속했다.  
   BEGIN  
    SET @Channel = 3;  
   END  
  ELSE IF @rightstr = 'dm' -- Daum 에서 접속했다.  
   BEGIN  
    SET @Channel = 4;  
   END  
  ELSE IF @rightstr = 'tn' -- 투니랜드 에서 접속했다.  
   BEGIN  
    SET @Channel = 5;  
   END  
  ELSE IF @rightstr = 'mg' -- 엠게임 에서 접속했다.  
   BEGIN  
    SET @Channel = 6;  
   END  
  ELSE IF @rightstr = 'pn' -- PlayNet 에서 접속했다.  
   BEGIN  
    SET @Channel = 7;  
   END 
  ELSE IF @rightstr = 'cn' -- 카툰 네트워크 에서 접속했다.
   BEGIN  
    SET @Channel = 8;  
   END  
 END  
------------------------------------------------------------------------------------------------------------------------  
  
-- check exist in blacklist  
-- check forever blacklist  
DECLARE @blacklistdatetime DATETIME;  
  
SELECT @blacklistdatetime = fdBlockEndDateTime   
 FROM tblBlacklist WITH (NOLOCK)   
 WHERE fduid = @userid;  
  
if @@rowcount <> 0  
 begin  
  IF @blacklistdatetime IS NULL  
   BEGIN  
    RAISERROR('in blacklist', 16, 1);  
    RETURN;  
   END  
  -- check block is expired  
  IF @blacklistdatetime < GETDATE()  
   BEGIN  
    -- block is expired and delete blacklist  
    DELETE FROM tblBlackList WHERE fduid = @userid;  
   END  
  ELSE  
   BEGIN  
    -- block is not expired  
    RAISERROR('in blacklist', 16, 1);  
    RETURN;  
   END  
 end  
  
DECLARE @bTestDB INT;  
DECLARE @InsertUser INT;  
DECLARE @CheckLoginKey INT;  
DECLARE @bUseMembership INT;  

SELECT @bTestDB = COUNT(*)   
 FROM tblServerSettingInfo WITH (NOLOCK)   
 WHERE fdKey = 'TestDB' AND fdValue = 'true'  
  
SELECT @InsertUser = ISNULL(  
 CASE fdValue  
 WHEN 'china' THEN   1  
 ELSE 0  
 END, 0)  
 ,   
 @bUseMembership = ISNULL(  
 CASE fdValue  
 WHEN 'china' THEN   1  
 ELSE 0  
 END, 0)
 ,   
 @CheckLoginKey = ISNULL(  
 CASE fdValue  
 WHEN 'china' THEN   0  
 WHEN 'hongkong' THEN   0  
 WHEN 'taiwan' THEN   0  
 ELSE 1  
 END,1)  
 FROM tblServerSettingInfo WITH (NOLOCK)  
 WHERE fdKey = 'countrycode'  
  
DECLARE @usernum INT;  
DECLARE @userexp INT;  
DECLARE @ladderpoint INT;  
DECLARE @nowservernum INT;  
DECLARE @gamemoney INT;  
DECLARE @attribute INT;  
DECLARE @usernickname VARCHAR(50);  
DECLARE @authusernum INT;  
DECLARE @Livetime DATETIME;  
DECLARE @playingTime INT  
declare @lastLoginTime datetime, @lastLogoutTime datetime
  
IF @bTestDB > 0 OR @CheckLoginKey = 0  
 BEGIN  
  -- 테스트 DB이다.  
  SELECT  @authusernum = fdAuthUserNum  
    ,@usernum = t1.fdUserNum  
    ,@usernickname = fdNickname  
    ,@nowservernum = fdServerNum  
    ,@userexp = fdExp  
    ,@ladderpoint = fdLadderPoint  
    ,@gamemoney = fdGameMoney  
    ,@attribute = fdAttribute  
    ,@playingTime = fdPlayingTime  
    ,@lastLoginTime = t3.fdLastLoginTime
    ,@lastLogoutTime = t3.fdLastLogoutTime
   FROM UserInfo t1 WITH(NOLOCK)  
   JOIN UserInfoGame t2 WITH(NOLOCK)  
   ON  t1.fdUserNum = t2.fdUserNum  
   JOIN UserInfoLogin t3 WITH(NOLOCK)  
   ON  t1.fdUserNum = t3.fdUserNum  
  WHERE t1.fdUID = @userid  
 END  
ELSE  
 BEGIN  
  -- 정식 DB이다.  
  SELECT  @authusernum = fdAuthUserNum  
    ,@usernum = t1.fdUserNum  
    ,@usernickname = fdNickname  
    ,@nowservernum = fdServerNum  
    ,@userexp = fdExp  
    ,@ladderpoint = fdLadderPoint  
    ,@gamemoney = fdGameMoney  
    ,@attribute = fdAttribute  
    ,@playingTime = fdPlayingTime  
    ,@lastLoginTime = t3.fdLastLoginTime
    ,@lastLogoutTime = t3.fdLastLogoutTime
   FROM UserInfo t1 WITH(NOLOCK)  
   JOIN UserInfoGame t2 WITH(NOLOCK)  
   ON  t1.fdUserNum = t2.fdUserNum  
   JOIN UserInfoLogin t3 WITH(NOLOCK)  
   ON  t1.fdUserNum = t3.fdUserNum  
  WHERE fdUID = @userid AND fdLoginKey = @loginkey;  
 END  
  
  
IF @@ROWCOUNT = 0  
 BEGIN  
  IF @bTestDB > 0 OR @InsertUser = 1  
   BEGIN  
    -- 테스트 DB이다.  
   -- For Debug, 없는 사용자의 경우 임시로 넣는다.  
     SET @userexp = 0;  
     SET @ladderpoint = 0;  
     SET @nowservernum = 0;  
     SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 0 ELSE 0 END;  
     SET @attribute = 0;  
     SET @authusernum = @authnum;  
     SET @LiveTime = GETDATE();  
     -- if first login of this user, add new user  
       
     BEGIN TRAN       
       
     INSERT INTO UserInfo  
             ( fdAuthUserNum ,  
               fdChannelNum ,  
               fdUID  
             )  
     VALUES  ( @authnum , -- fdAuthUserNum - bigint  
               @channel , -- fdChannelNum - int  
               @userid -- fdUID - varchar(50)  
             )  
     IF @@ROWCOUNT = 0 OR @@ERROR <> 0  
     BEGIN  
      RAISERROR ('Insert New User Failed', 16, 1);  
      ROLLBACK TRAN  
      RETURN  
     END  
       
     SELECT  @usernum = @@IDENTITY  
       
     INSERT INTO UserInfoGame ( fdUserNum, fdGameMoney )  
     VALUES  ( @usernum, @gamemoney )  
       
     IF @@ROWCOUNT = 0 OR @@ERROR <> 0  
     BEGIN  
      RAISERROR ('Insert New User Failed', 16, 1);  
      ROLLBACK TRAN  
      RETURN  
     END  
       
     INSERT INTO UserInfoLogin ( fdUserNum )  
     VALUES  ( @usernum )  
       
     IF @@ROWCOUNT = 0 OR @@ERROR <> 0  
     BEGIN  
      RAISERROR ('Insert New User Failed', 16, 1);  
      ROLLBACK TRAN  
      RETURN  
     END  
       
     COMMIT TRAN  
  
     -- logging...  
     INSERT INTO tblLogNewUser (fduid, fdUserNum, fdChannelNum, fdDateTime)  
      VALUES (@userid, @usernum, @channel, GETDATE());  
   END  
  ELSE  
   BEGIN  
    SELECT @nowservernum = t1.fdServerNum   
    FROM UserInfoLogin t1 WITH (NOLOCK)   
    JOIN UserInfo t2 ON t1.fdUserNum = t2.fdUserNum  
    WHERE t2.fdUID = @userid;  
    IF @@ROWCOUNT > 0  
     BEGIN  
      RAISERROR ('loginkey incorrect', 16, 1)  
      RETURN  
     END  
    RAISERROR ('유저 row 가 없습니다. prelogin 이 제대로 불리지 않았습니다.', 16, 1);  
    RETURN;  
   END  
 END  
   
   
DECLARE @Newloginkey INT;  
SELECT @Newloginkey = (1 + 1000000000*RAND( (DATEPART(mm, GETDATE()) * 100000 )  
           + (DATEPART(ss, GETDATE()) * 1000 )  
           + DATEPART(ms, GETDATE()) ));  
  
DECLARE @bServerDown INT;  
  
SELECT @bServerDown = fdNum  
FROM tblServerListAgentSvr WITH (NOLOCK)  
WHERE fdNum = @nowservernum AND   
  fdUserCountDateTime < DATEADD(n,-15,GETDATE())  
  
IF @nowservernum = 0  
 BEGIN  
  UPDATE UserInfoLogin   
   SET fdLoginKey = @Newloginkey,  
    fdServerNum = @servernum,   
    fdLastLoginTime = GETDATE(),   
    fdLoginCount = fdLoginCount + 1  
   WHERE fdUserNum = @usernum;  
     
  -- Check pc room  
  DECLARE @checkroom INT  
  EXEC @checkroom = usp_checkPCRoom @ip, @regpcroom;  
  
  IF @checkroom = 1 -- pc방이 아니라면   
   BEGIN  
    -- 프로모션인지 체크한다.  
    EXEC @checkroom = usp_checkPromotionPCRoom @ip;  
   END  
   
  DECLARE @couplenum INT;  
  DECLARE @matename VARCHAR(50);  
  DECLARE @mateUserNum INT;  
  DECLARE @createtime DATETIME;  
  DECLARE @coupleRingNum INT;  
  DECLARE @condDays INT;  
  DECLARE @maxRingDays INT;  
  DECLARE @coupleType INT;  
  DECLARE @marriedDateTime DATETIME;  
  
  select @couplenum = fdCoupleNum, @mateUserNum = fdUserNum from tblCoupleUserInfo with(nolock) where fdUserNum <> @usernum  
   and fdCoupleNum in (SELECT fdCoupleNum FROM tblCoupleUserInfo WITH(NOLOCK) WHERE fdUserNum = @usernum)  
  
  SELECT @matename = fdNickname FROM UserInfo WITH(NOLOCK) WHERE fdUserNum = @mateUserNum;  
   
  SELECT @createtime = fdCreateDateTime, @coupleRingNum = fdCoupleRingNum, @maxRingDays = fdMaxRequireDays , @coupleType = fdCoupleType, @marriedDateTime = fdMarriedDateTime  
   FROM tblCoupleInfo WITH(NOLOCK)   
   WHERE fdCoupleNum = @couplenum;  
   
  SELECT @condDays = fdValue   
   FROM tblAvatarItemDescAttr WITH(NOLOCK)   
   WHERE fdItemNum = @coupleRingNum AND fdAttr = 54;  
  
  DECLARE @farmPoint INT;  
  SET @farmPoint = NULL;   
  
  SELECT @farmPoint = fdFarmPoint  
   FROM tblUserFarmInfo WITH (NOLOCK)  
   WHERE fdUserNum = @usernum;   
  
  IF (@@rowcount=0) OR (@farmPoint IS NULL)  
   BEGIN  
    SET @farmPoint = 0;   
   END  
  
  -- 카오스 채널 진영 정보  
  DECLARE @partyType TINYINT  
  IF exists(SELECT fdNum FROM tblServerSettingInfo WITH (NOLOCK) WHERE fdKey = 'useChaosChannel' AND fdValue = 'true') 
   BEGIN  
    SELECT @partyType = fdPartyType FROM tblChaosChannelUserPartyInfo WITH(NOLOCK) WHERE fdUserNum = @usernum  
   END  
  
  -- 내 커플의 온/오프라인 유무  
  DECLARE @coupleMateServerNum INT  
  if @mateUserNum is not null  
   begin  
    SELECT @coupleMateServerNum = fdServerNum  
    from UserInfoLogin with(nolock)  
    WHERE fdUserNum = @mateUserNum  
   end  
     
  -- login log 기록  
  IF @usernickname IS NULL  
   BEGIN  
    SET @usernickname = '_firstLogin_';  
   END  
  INSERT INTO tblLogLoginAndLogout (fduid, fdNickname, fdLogKind, [fdChannelNum], fdServerNum, fdGameMoney, fdFarmPoint, fdExp, fdLadderPoint, fdIP)  
   VALUES (@userid, @usernickname, 0, @channel ,@servernum, @gamemoney, @farmPoint, @userexp, @ladderpoint, @ip);  
 END  
-- 중복 로그인인 경우 서버 번호를 리셋해준다. (서버가 셧다운 상황 or 그밖의 상황 포함)  
else IF @nowservernum <> 0  
 BEGIN  
  UPDATE UserInfoLogin SET fdServerNum = 0 where fdUserNum = @usernum  
 END  
   
-- 유저가 가입한 멤버쉽 정보  
if @bUseMembership = 1
 begin  
  EXEC usp_membership_CheckExpiryDate @usernum  
 end  
  
-- 길드 출석 체크 (하루에 한번만)  
if datediff(dd, getdate(), @lastLoginTime) <> 0  
 begin  
  exec usp_guild_increaseAttendance @usernum  
 end  


-- 길드 번호 얻기
declare @guildNum int
select @guildNum = fdGuildNum from UserGuild with(nolock) where fdUserNum = @usernum
/*
declare @buffItemNum int, @guildLevel int  
select @guildLevel = fdLevel, @guildNum = t1.fdNum  from GameDataGuild t1 with(nolock) inner join UserGuild t2 with(nolock)  
on t1.fdNum = t2.fdGuildNum where t2.fdUserNum = @usernum
if @guildLevel is not null
	begin
		select @buffItemNum = fdBuffItemNum from EssenGuild with(nolock) where fdLevel = @guildLevel  
		if @buffItemNum <> 0
		 begin  
		  if not exists (select fdUserNum from tblAvatarUser with(nolock) where fdUserNum = @usernum and fdItemDescNum = @buffItemNum)  
		   begin  
			insert tblAvatarUser  
			 select @usernum, @buffItemNum, 0, 0, dateadd(dd, 30, getdate()), 1, 1, getdate()  
			insert tblAvatarUserAttr  
			 select @usernum, @buffItemNum, fdAttr, fdValue from tblAvatarItemDescAttr with(nolock)  
			 where fdItemNum = @buffItemNum  
		   end  
		 end  
	end
*/

DECLARE @membershipID TINYINT;  
DECLARE @expiryDateTime DATETIME;  
SELECT @membershipID = fdMembershipID,  
  @expiryDateTime = fdEndDateTime  
 FROM UserMembership WITH(NOLOCK) WHERE fdUserNum = @usernum;  

-- 휴면유저 대상이면 재판소에 보낸다. (6개월동안 접속한적 없는 발바닥 이상 레벨의 유저)
declare @dormancyPeriod smallint
set @dormancyPeriod = datediff(month, @lastLogoutTime, getdate())
if @dormancyPeriod >= 6 and @userexp >= 600
	begin
		exec usp_badUserReport @usernickname, 5
	end

-- 휴면시스템 대상 유저인지 여부 체크
declare @dormancyType tinyint -- 0 : 유니크유저, 1 : 신규유저, 2 : 휴면유저
set @dormancyType = 0
select @dormancyType = fdType from Userdormancy t1 with(nolock) where t1.fdUserNum = @usernum
if @@ROWCOUNT = 0
	begin
		if @userexp < 600 begin set @dormancyType = 1 end -- 병아리 레벨 여부
		else if @dormancyPeriod >= 6 begin set @dormancyType = 2 end -- 최근 비접속 시간 6개월 여부
		else begin set @dormancyType = 0 end
	end
else
	begin
		if @dormancyPeriod >= 6
			begin
				--3개월 전에 허그미션이 도전중일수도 있기때문에 완료상태로 만들어준다.
				update UserMissionOneDayInfo set fdChallengeState = 2 where fdKind = 7 and fdUserNum = @usernum
				
				if @userexp >= 600 begin set @dormancyType = 2 end
				else begin set @dormancyType = 1 end
			end
	end
	
-- 임시로 핫타임 이벤트를 진행하기 위한 코드 Seo Kwangsoo
--insert UserLoginLogOutForEvent (fdUserNum) values (@usernum)

SELECT userindex = @usernum,   
  nickName = ISNULL(@usernickname, ''),  
  userexp = @userexp,   
  ladderpoint = @ladderpoint,   
  lastservernum = @nowservernum,   
  gamemoney = @gamemoney,   
  attribute = @attribute,   
  pcroom = ISNULL(@checkroom,-1),   
  authusernum = @authusernum ,   
  couplenum = ISNULL(@couplenum, -1),   
  matename = ISNULL(@matename, -1),   
  createtime = ISNULL(@createtime, 0),   
  coupleRingNum = ISNULL(@coupleRingNum, -1) ,   
  condDays = ISNULL(@condDays, -1),   
  maxCoupleRingDays = ISNULL(@maxRingDays, -1),  
  coupleType = ISNULL(@coupleType, 0),  
  marriedDateTime = ISNULL(@marriedDateTime, 0),  
  partyType = ISNULL(@partyType, 0),  
  coupleMateServerNum = ISNULL(@coupleMateServerNum, 0),  
  membershipID = ISNULL(@membershipID, 0),  
  membershipExpiryDateTime = ISNULL(@expiryDateTime, GETDATE()),  
  playingTime = ISNULL(@playingTime,0),  
  loginChannel = @channel,
  dormancyType = @dormancyType,
  guildNum = ISNULL(@guildNum, -1)
InnoDark12: Copy and paste this into a new Microsoft SQL Management Studio query and execute it. If your DB is different change talesrunner to whatever your DB name is.
 
Junior Spellweaver
Joined
Aug 1, 2012
Messages
145
Reaction score
16
My usp_login

IF @@ROWCOUNT = 0
BEGIN
IF @bTestDB > 1 OR @InsertUser = 1
BEGIN
-- 테스트 DB이다.
-- For Debug, 없는 사용자의 경우 임시로 넣는다.
SET @userexp = 0;
SET @ladderpoint = 10000;
SET @nowservernum = 0;
SET @gamemoney = CASE WHEN @InsertUser <> 1 THEN 50000 ELSE 0 END;
SET @attribute = 0;
SET @authusernum = @authnum;
SET @LiveTime = GETDATE();



help please, how to remove infinite gp to 0?
Help Kevin Teran

Wtf....
 
Back
Top