[Help] BC Ranking

6efa

New Member
Joined
Jun 25, 2009
Messages
213
Reaction score
3
Здравейте! можели да ми дадете БЦ РАНКИНГС за хтулинг веба 97д+99и версия благодаря ви предварително :)
 
Съмнявам се да ти дадат бц ранка но успех (rock)
 
след като не ти записва в никоя таблица информация от бц не можем да ти помогнем, трябва да си направиш или процедура или някой да ти намести гс-то да записва, иначе забрави
 
Ако пък ти се записват:

Code:
<table align="center" width="500" cellspacing="0" cellpadding="0" class="sort-table">
	<tr>
	<td colspan="6" class="news-head" style="text-align:center;">BC Ranking :: Points [Top 50]</td>
	</tr>
	<tr class="news-reset">
		<td align="center">Rank</td>
		<td align="center">Character</td>
		<td align="center">Points</td>
	</tr>
<?php
$query = mssql_query("SELECT top 50 charactername,point from event_info_bc order by Point desc");

for($i=0;$i < mssql_num_rows($query);++$i) {
$rank = $i+1;
$row = mssql_fetch_row($query);

if($i%2) { $colors = "#100c0d";} else { $colors="#232323"; }

echo"
<tr bgcolor='$colors'>
<td align='center'>$rank.</td>
<td align='center'>$row[0]</td>
<td align='center'>$row[1]</td>
</tr>";
}
?>
</table>
 
FrozeN, ти имаш ли процедура която да ти записва някаква информация за бц??
 
Имам да в базата Ranking

Таблица EVENT_INFO_BC_5TH

Процедури

SP_CHECK_BC
Code:
--//************************************************************************
--// 郴   侩 : 喉矾靛某浇 1老 涝厘力茄
--// 何   辑 : 霸烙俺惯评 
--// 父甸老 : 2003.08. 16
--// 父甸捞 : 霖老
--// 
--//************************************************************************

CREATE PROCEDURE	SP_CHECK_BC
	@AccountID		varchar(10),	-- 拌沥疙
	@CharacterName	varchar(10),	-- 纳腐疙
	@Server		smallint		-- 辑滚
As
Begin
	DECLARE	@iMaxEnterCheck	INT
	DECLARE	@iNowEnterCheck	INT

	SET		@iMaxEnterCheck	= 6		-- 老老 弥措 涝厘啊瓷 冉荐
	
	BEGIN TRANSACTION
	
	SET NOCOUNT ON	

	IF EXISTS ( SELECT AccountID FROM T_ENTER_CHECK_BC  WITH (READUNCOMMITTED) 
				WHERE  AccountID = @AccountID AND ServerCode = @Server AND CharName = @CharacterName )
	BEGIN
		SELECT @iNowEnterCheck = ToDayEnterCount 
		FROM T_ENTER_CHECK_BC  WITH (READUNCOMMITTED) 
		WHERE  AccountID = @AccountID AND ServerCode = @Server AND CharName = @CharacterName

		IF (@iNowEnterCheck >= @iMaxEnterCheck)
		BEGIN
			SELECT 0 As EnterResult	-- 喉矾靛某浇 涝厘 阂啊瓷
		END
		ELSE
		BEGIN
			SELECT 1 As EnterResult	-- 喉矾靛某浇 涝厘 啊瓷
		END
		
	END
	ELSE
	BEGIN
		SELECT 1 As EnterResult		-- 喉矾靛某浇 涝厘 啊瓷
	END

	IF(@@Error <> 0 )
		ROLLBACK TRANSACTION
	ELSE	
		COMMIT TRANSACTION

	SET NOCOUNT OFF	
End

GO


SP_ENTER_BC
Code:
--//************************************************************************
--// 郴   侩 : 喉矾靛某浇 1老 涝厘力茄
--// 何   辑 : 霸烙俺惯评 
--// 父甸老 : 2003.08. 16
--// 父甸捞 : 霖老
--// 
--//************************************************************************

CREATE PROCEDURE	SP_ENTER_BC
	@AccountID		varchar(10),	-- 拌沥疙
	@CharacterName	varchar(10),	-- 纳腐疙
	@Server		smallint		-- 辑滚
As
Begin
	BEGIN TRANSACTION
	
	SET NOCOUNT ON	

	IF EXISTS ( SELECT AccountID FROM T_ENTER_CHECK_BC  WITH (READUNCOMMITTED) 
				WHERE  AccountID = @AccountID AND ServerCode = @Server AND CharName = @CharacterName )
	BEGIN
		UPDATE T_ENTER_CHECK_BC 
		SET ToDayEnterCount = ToDayEnterCount + 1, LastEnterDate = GetDate()
		WHERE  AccountID = @AccountID AND ServerCode = @Server AND CharName = @CharacterName
	END
	ELSE
	BEGIN
		INSERT INTO T_ENTER_CHECK_BC ( AccountID, CharName, ServerCode, ToDayEnterCount, LastEnterDate ) VALUES (
			@AccountID,
			@CharacterName,
			@Server,
			1,
			DEFAULT
		)
	END

	IF(@@Error <> 0 )
		ROLLBACK TRANSACTION
	ELSE	
		COMMIT TRANSACTION

	SET NOCOUNT OFF	
End


GO


SP_LEFT_ENTERCOUNT_BC
Code:
-//************************************************************************
--// 郴   侩 : 喉矾靛某浇 1老 巢篮 涝厘冉荐 炼雀
--// 何   辑 : 霸烙俺惯评 
--// 父甸老 : 2004.04. 02
--// 父甸捞 : 霖老
--// 
--//************************************************************************

CREATE PROCEDURE	SP_LEFT_ENTERCOUNT_BC
	@AccountID		varchar(10),	-- 拌沥疙
	@CharacterName	varchar(10),	-- 纳腐疙
	@Server		smallint		-- 辑滚
As
Begin
	DECLARE	@iMaxEnterCheck	INT
	DECLARE	@iNowEnterCheck	INT

	SET		@iMaxEnterCheck	= 6		-- 老老 弥措 涝厘啊瓷 冉荐
	
	BEGIN TRANSACTION
	
	SET NOCOUNT ON	

	IF EXISTS ( SELECT AccountID FROM T_ENTER_CHECK_BC  WITH (READUNCOMMITTED) 
				WHERE  AccountID = @AccountID AND ServerCode = @Server AND CharName = @CharacterName )
	BEGIN
		SELECT @iMaxEnterCheck - ToDayEnterCount As LeftEnterCount FROM T_ENTER_CHECK_BC  WITH (READUNCOMMITTED)	-- 喉矾靛某浇 巢篮 涝厘冉荐
		WHERE  AccountID = @AccountID AND ServerCode = @Server AND CharName = @CharacterName
	END
	ELSE
	BEGIN
		INSERT INTO T_ENTER_CHECK_BC ( AccountID, CharName, ServerCode, ToDayEnterCount, LastEnterDate ) VALUES (
			@AccountID,
			@CharacterName,
			@Server,
			0,
			GetDate()
		)
	
		SELECT @iMaxEnterCheck As LeftEnterCount		-- 喉矾靛某浇 巢篮 涝厘冉荐
	END

	IF(@@Error <> 0 )
		ROLLBACK TRANSACTION
	ELSE	
		COMMIT TRANSACTION

	SET NOCOUNT OFF	
End


GO


SP_POINT_ACCM_BC
Code:
--//************************************************************************
--// 郴   侩 : 喉矾靛某浇 捞亥飘 器牢飘 沥焊 穿利
--// 何   辑 : 霸烙俺惯评 
--// 父甸老 : 2003.08. 16
--// 父甸捞 : 霖老
--// 
--//************************************************************************

CREATE PROCEDURE	SP_POINT_ACCM_BC
	@Server		smallint,		-- 辑滚 
	@Bridge		tinyint,		-- 促府
	@AccountID		varchar(10),	-- 拌沥疙
	@CharacterName	varchar(10),	-- 纳腐疙
	@Class			tinyint ,		-- 努贰胶 锅龋 	(0-孺付过荤, 1-家匡付胶磐, 16-孺扁荤, 17-喉饭捞靛唱捞飘, 32-夸沥, 33-孤令郡橇, 48-付八荤)
	@Point			int,		-- 器牢飘
	@PCRoomGUID	int		-- PC规 GUID (0捞搁 殿废等 PC规 酒丛?)
As
Begin
	DECLARE	@TEMP	INT
End	



GO


SP_POINT_ACCM_BC_5TH
Code:
--//************************************************************************
--// 郴   侩 : 喉矾靛某浇 捞亥飘 器牢飘 沥焊 穿利 (5瞒)
--// 何   辑 : 霸烙俺惯评 
--// 父甸老 : 2004.05. 31
--// 父甸捞 : 霖老
--// 
--//************************************************************************

CREATE PROCEDURE	SP_POINT_ACCM_BC_5TH
	@Server		smallint,		-- 辑滚 
	@Bridge		tinyint,		-- 促府
	@AccountID		varchar(10),	-- 拌沥疙
	@CharacterName	varchar(10),	-- 纳腐疙
	@Class			tinyint ,		-- 努贰胶 锅龋 	(0-孺付过荤, 1-家匡付胶磐, 16-孺扁荤, 17-喉饭捞靛唱捞飘, 32-夸沥, 33-孤令郡橇, 48-付八荤)
	@Point			int,		-- 器牢飘
	@LeftTime		int,		-- 喉矾靛某浇 版扁 巢篮矫埃 穿利
	@AlivePartyCount	int		-- 喉矾靛某浇 版扁 巢篮矫埃 穿利
As
BEGIN
	
	BEGIN TRANSACTION
	
	SET NOCOUNT ON

	DECLARE @RegDate	SMALLDATETIME
	SET @RegDate = CAST(DATEPART(YY, GetDate()) AS VARCHAR(4)) + '-' + CAST(DATEPART(MM, GetDate()) AS VARCHAR(2)) + '-' + CAST(DATEPART(DD, GetDate()) AS VARCHAR(2)) + ' 00:00:00'

	IF EXISTS ( SELECT CharacterName FROM EVENT_INFO_BC_5TH  WITH (READUNCOMMITTED) 
				WHERE RegDate = @RegDate AND Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName )
		BEGIN			
			DECLARE @iiiPoint		int
			DECLARE @iMinLeftTime	int
			DECLARE @iAlivePartyCount	int
			DECLARE @iMaxPointLeftTime	int

			SELECT @iiiPoint = Point, @iMinLeftTime = MinLeftTime, @iAlivePartyCount = AlivePartyCount, @iMaxPointLeftTime = MaxPointLeftTime
			FROM EVENT_INFO_BC_5TH
			WHERE  RegDate = @RegDate AND Server = @Server  AND AccountID = @AccountID AND CharacterName = @CharacterName

			-- 痢荐绰 啊厘 臭篮 痢荐 窍唱父 历厘茄促.
			-- 弥绊 痢荐甫 罐疽阑 锭 弊 矫埃阑 鞍捞 盎脚茄促.
			IF (@iiiPoint < @Point)
			BEGIN
				IF (@Point > 0)			-- 某浇俊 己傍 沁阑 锭 父 弥绊 痢荐啊 盎脚瞪 巴捞促.
				BEGIN
					SET @iiiPoint = @Point
					SET @iMaxPointLeftTime = @LeftTime
				END
			END

			-- 痢荐啊 鞍阑 锭绰 穿利矫埃捞 奴率阑 历厘茄促.
			IF (@iiiPoint = @Point)
			BEGIN
				IF (@Point > 0)			-- 某浇俊 己傍 沁阑 锭 父 弥绊 痢荐啊 盎脚瞪 巴捞促.
				BEGIN
					IF (@iMaxPointLeftTime < @LeftTime)
					BEGIN
						SET @iMaxPointLeftTime = @LeftTime
					END
				END
			END

			-- 颇萍盔篮 啊厘 腹篮 巴 趣篮 鞍篮 巴老 版快父 历厘茄促.
			-- 颇萍盔荐啊 盎脚瞪 锭 弥窜矫埃档 鞍捞 盎脚等促.
			IF (@iAlivePartyCount <= @AlivePartyCount)
			BEGIN
				IF (@iMinLeftTime < @LeftTime)
				BEGIN
					IF (@Point > 0)			-- 某浇俊 己傍 沁阑 锭 父 弥窜矫埃 痢荐啊 盎脚瞪 巴捞促.
					BEGIN
						SET @iMinLeftTime = @LeftTime
					END
				END
				SET @iAlivePartyCount = @AlivePartyCount
			END

			IF (@iiiPoint < 0)
			BEGIN
				UPDATE EVENT_INFO_BC_5TH
				SET Point = 0 , Bridge = @Bridge, PlayCount = PlayCount+1, SumLeftTime = SumLeftTime + @LeftTime, MinLeftTime = @iMinLeftTime, AlivePartyCount = @iAlivePartyCount, MaxPointLeftTime = @iMaxPointLeftTime
				WHERE  RegDate = @RegDate AND Server = @Server  AND AccountID = @AccountID AND CharacterName = @CharacterName	
			END	
			ELSE
			BEGIN
				UPDATE EVENT_INFO_BC_5TH
				SET Point = @iiiPoint, Bridge = @Bridge, PlayCount = PlayCount+1, SumLeftTime = SumLeftTime + @LeftTime, MinLeftTime = @iMinLeftTime, AlivePartyCount = @iAlivePartyCount, MaxPointLeftTime = @iMaxPointLeftTime
				WHERE  RegDate = @RegDate AND Server = @Server  AND AccountID = @AccountID AND CharacterName = @CharacterName	
			END
		END
	ELSE
		BEGIN
			IF (@Point < 0)
			BEGIN
				INSERT INTO EVENT_INFO_BC_5TH ( Server,  Bridge, AccountID, CharacterName, Class, Point, PlayCount, SumLeftTime, MinLeftTime, RegDate, AlivePartyCount, MaxPointLeftTime ) VALUES (
					@Server,
					@Bridge,
					@AccountID,
					@CharacterName,
					@Class,
					0,
					1,
					0,
					0,
					@RegDate,
					0,
					0
				)
			END
			ELSE
			BEGIN
				INSERT INTO EVENT_INFO_BC_5TH ( Server,  Bridge, AccountID, CharacterName, Class, Point, PlayCount, SumLeftTime, MinLeftTime, RegDate, AlivePartyCount, MaxPointLeftTime ) VALUES (
					@Server,
					@Bridge,
					@AccountID,
					@CharacterName,
					@Class,
					@Point,
					1,
					@LeftTime,
					@LeftTime,
					@RegDate,
					@AlivePartyCount,
					@LeftTime
				)
			END

		END

	IF(@@Error <> 0 )
		ROLLBACK TRANSACTION
	ELSE	
		COMMIT TRANSACTION

	SET NOCOUNT OFF	
END


GO


SP_POINT_ACCUMULATION
Code:
--//************************************************************************
--// 郴   侩 : 单呼 捞亥飘 器牢飘 沥焊 穿利
--// 何   辑 : 霸烙俺惯评 
--// 父甸老 : 2003.01. 21
--// 父甸捞 : 眠槛
--// 
--//************************************************************************

CREATE PROCEDURE	SP_POINT_ACCUMULATION
	@Server		smallint,	-- 辑滚 
	@Square		tinyint,	-- 堡厘 

	@AccountID		varchar(10),
	@CharacterName	varchar(10),
	@Class			tinyint ,
	@Point			int
As
Begin
	
	BEGIN TRANSACTION
	
	SET NOCOUNT ON	

	IF EXISTS ( SELECT CharacterName FROM EVENT_INFO  WITH (READUNCOMMITTED) 
				WHERE  Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName )
		Begin			
			UPDATE EVENT_INFO
			SET Point = Point + @Point , Square = @Square 										
			WHERE  Server = @Server  AND AccountID = @AccountID AND CharacterName = @CharacterName		
		End
	ELSE
		Begin
			INSERT INTO EVENT_INFO ( Server, 	Square, 	AccountID, CharacterName, Class, Point ) VALUES (
				@Server,
				@Square,
				@AccountID,
				@CharacterName,
				@Class,
				@Point	
			)	
		End 


	IF(@@Error <> 0 )
		ROLLBACK TRANSACTION
	ELSE	
		COMMIT TRANSACTION

	SET NOCOUNT OFF	
End

GO


USP_BloodCastle5_Ranking
Code:
/*******************************************************************************************************
 橇肺璃飘疙 : 孤柯扼牢 ver3.0
 荤捞飘疙 : event.muonline.co.kr
 橇肺矫历疙 : USP_BloodCastle5_Ranking
 扁瓷 : 矫埃喊 珐欧阑 啊廉柯促.
 其捞瘤疙 : 
 涝仿 : @BridgeSearch
 馆券 : 
 捞仿 : 2005.06.21 捞驱版
********************************************************************************************************/
CREATE PROCEDURE dbo.USP_BloodCastle5_Ranking

	@BridgeSearch	TINYINT

AS

SET NOCOUNT ON

	SELECT TOP 50  T1.CharacterName, T1.Server, 0 AS Point, MAX(T1.MinLeftTime) as MinLeftTime, T1.Bridge, 

	(SELECT TOP 1 T2.AlivePartyCount FROM EVENT_INFO_BC_5TH T2 WHERE T1.CharacterName = T2.CharacterName AND T1.Server = T2.Server 
	 AND T1.Bridge = T2.Bridge AND T1.AccountID = T2.AccountID AND T2.AlivePartyCount >= 5 ORDER BY T2.MinLeftTime DESC) AS AlivePartyCount,

	(SELECT TOP 1 Convert(char(8),T3.RegDate,112) FROM EVENT_INFO_BC_5TH T3 WHERE T1.CharacterName = T3.CharacterName AND T1.Server = T3.Server 
	 AND T1.Bridge = T3.Bridge AND T1.AccountID = T3.AccountID AND T3.AlivePartyCount >= 5 ORDER BY T3.MinLeftTime DESC, T3.RegDate) AS RegDate
	FROM EVENT_INFO_BC_5TH  T1 WHERE AlivePartyCount > 4 AND T1.Server <> 13 

	GROUP BY T1.CharacterName,T1.Server, T1.Bridge,T1.AccountID
	Having  T1.Bridge = @BridgeSearch

	ORDER BY AlivePartyCount DESC, MinLeftTime DESC, RegDate, T1.Server


	


			
SET NOCOUNT OFF

GO
 
я дай сял код за правенето на тая таблица EVENT_INFO_BC_5TH
 
EVENT_INFO_BC_5TH
Code:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EVENT_INFO_BC_5TH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EVENT_INFO_BC_5TH]
GO

CREATE TABLE [dbo].[EVENT_INFO_BC_5TH] (
	[Server] [tinyint] NOT NULL ,
	[Bridge] [tinyint] NOT NULL ,
	[AccountID] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[CharacterName] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Class] [tinyint] NOT NULL ,
	[Point] [int] NOT NULL ,
	[PlayCount] [int] NOT NULL ,
	[SumLeftTime] [int] NOT NULL ,
	[MinLeftTime] [int] NOT NULL ,
	[RegDate] [smalldatetime] NOT NULL ,
	[AlivePartyCount] [int] NOT NULL ,
	[MaxPointLeftTime] [int] NOT NULL 
) ON [PRIMARY]
GO

Има и още 1 таблица.
T_ENTER_CHECK_BC
Code:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[T_ENTER_CHECK_BC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[T_ENTER_CHECK_BC]
GO

CREATE TABLE [dbo].[T_ENTER_CHECK_BC] (
	[AccountID] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[CharName] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ServerCode] [smallint] NOT NULL ,
	[ToDayEnterCount] [tinyint] NOT NULL ,
	[LastEnterDate] [smalldatetime] NOT NULL 
) ON [PRIMARY]
GO
 
  • Like
Reactions: oveRLuckEd
я някой от по-разбиращите да каже, освен тея процедури трябва ли да се бута и нещо допълнително към ГС, за да записва?
 
я някой от по-разбиращите да каже, освен тея процедури трябва ли да се бута и нещо допълнително към ГС, за да записва?

DevilSquareEventConnect = 0 // 0 - записва, 1 - не записва (в базата).
 
При мене си се записват, ама ползвам сезон 4 файлове. Не знам как седят нещата при по старите версии.
 
Еми кво да кажа.. бр че ги сподели ако беше друг .. :) щеше да имаш да зимаш :p
 
Frozen на С4 има такива раоти докато на 97д няма такива таблици :)