Post Pacific  

Go Back   Post Pacific > Lineage 2 > Tutorials & Guides

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 17.01.2006, 07:11   #21
SolarWind
Архивный участник
 
Join Date: Nov 2005
Posts: 7
Default

Without any extrnal scripts.

Just edit your stored procedure lin_CharLogout in lin2world DB
Code:
/********************************************    
lin_CharLogout    
 log character Logout    
INPUT    
 char_id    
OUTPUT    
return    
 week play time by sec    
made by    
 carrot    
date    
 2002-06-11    
change    
 2002.-12-20    
  add usetime set    
 2004-03-29    
  add function to write today's used sec    
********************************************/    
CREATE PROCEDURE [DBO].[lin_CharLogout]    
(    
 @char_id INT,    
 @usedTimeSec INT
)    
AS    
    
SET NOCOUNT ON    
    
DECLARE @logoutDate DATETIME    
SET @logoutDate = GETDATE()    
    
UPDATE user_data SET Logout = @logoutDate, use_time = use_time + @usedTimeSec WHERE char_id = @char_id

/***** SolarWind: Check for OVERBUFF and BAN account if any *****/


IF EXISTS(SELECT 1 AS obuff FROM lin2world.dbo.user_ActiveSkill
 WHERE (s1 <> 0) AND (s1 = s2 OR s1 = s3 OR s1 = s4 OR s1 = s5 OR s1 = s6 OR s1 = s7 OR s1 = s8 OR s1 = s9 OR s1 = s10
 OR s1 = s11 OR s1 = s12 OR s1 = s13 OR s1 = s14 OR s1 = s15 OR s1 = s16 OR s1 = s17 OR s1 = s18 OR s1 = s19 OR s1 = s20)
 AND (char_id = @char_id))
BEGIN
 DECLARE @account_id INT
 SELECT @account_id = account_id FROM lin2world.dbo.user_data WHERE char_id = @char_id
 UPDATE lin2db.dbo.user_account SET block_flag = 1 WHERE uid = @account_id
END
GO
But i'm still hate this MSSQL
SolarWind is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 15:30.