[Release] Blood Castle Ranking

Mr.Stoyanov

New Member
Joined
May 25, 2011
Messages
21
Reaction score
12
Здравейте драги потребите на DarksTeam.NET много мислих и накрая реших да ви споделя Blood Castle Rankings да но да съм взел правилно решение !

1. Oтивате в Query Analizer > MuOnline и добавяте тази процедура ;)


--//************************************************************************
--// 3» ?ë : oí─uaÄ311 AIoYAR A÷AÎAR Á¤o¸ ´cAu
--// oÎ 1* : °ÔAÓ°31ßAA
--// ¸¸uéAI : 2003.08. 16
--// ¸¸uéAI : ÁOAI
--//
--//************************************************************************
CREATE PROCEDURE SP_POINT_ACCM_BC
@Server smallint, -- 1*1ö
@Bridge tinyint, -- ´U¸R
@AccountID varchar(10), -- °cÁ¤¸í
@CharacterName varchar(10), -- Äɸ─¸í
@Class tinyint , -- A¬!1o 1oEL (0-Ea¸1ý»ç, 1-1O?i¸1oAÍ, 16-Ea+â»ç, 17-oí1AIua3aAIAR, 32-?äÁ¤, 33-1ÂÁî?¤ÇÁ, 48-¸°Ë»ç)
@Point int, -- A÷AÎAR
@PCRoomGUID int -- PC1a GUID (0AI¸é uîIuE PC1a 3A´Ô?)
As
Begin

BEGIN TRANSACTION

SET NOCOUNT ON
IF EXISTS ( SELECT CharacterName FROM EVENT_INFO_BC WITH (READUNCOMMITTED)
WHERE Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName )
Begin
DECLARE @iiiPoint int
SELECT @iiiPoint = Point FROM EVENT_INFO_BC
WHERE Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName
IF (@iiiPoint + @Point < 0)
BEGIN
UPDATE EVENT_INFO_BC
SET Point = 0 , Bridge = @Bridge, PlayCount = PlayCount+1
WHERE Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName
END
ELSE
BEGIN
UPDATE EVENT_INFO_BC
SET Point = Point + @Point , Bridge = @Bridge, PlayCount = PlayCount+1
WHERE Server = @Server AND AccountID = @AccountID AND CharacterName = @CharacterName
END
End
ELSE
Begin
INSERT INTO EVENT_INFO_BC ( Server, Bridge, AccountID, CharacterName, Class, Point, PlayCount ) VALUES (
@Server,
@Bridge,
@AccountID,
@CharacterName,
@Class,
@Point,
default
)
End
IF (@PCRoomGUID <> 0)
Begin
IF EXISTS (SELECT AccountID FROM T_BC_PCROOM_PLAYCOUNT WITH (READUNCOMMITTED)
WHERE PCROOM_GUID = @PCRoomGUID AND AccountID = @AccountID)
Begin
UPDATE T_BC_PCROOM_PLAYCOUNT
SET PlayCount = PlayCount + 1, Point = Point + @Point
WHERE PCROOM_GUID = @PCRoomGUID AND AccountID = @AccountID
End
ELSE
Begin
INSERT INTO T_BC_PCROOM_PLAYCOUNT
VALUES (@PCRoomGUID, @AccountID, default, @Point)
End
End
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
End
GO

2 . цъкате F5 и сте го записали следваща стъпка
3. отивате в директорият на сайта ви c:/hampp/htdocs
създавате нов документ bc.php в него слагате този код


?
/*-----------------------------------------------------*\
| |
| by Mr.Stoyanov |
\*-----------------------------------------------------*/
if(!defined('Mr.Stoyanov'))
{
die("Include error..");
}
?>
<div style="text-align:center">

<table width=70% align=center><tr>
<td align=left width=10%> </td>
<td align=left width=30%> <? echo $lang_Name; ?> </td>
<td align=left width=30%> <? echo $lang_race; ?> </td>
<td align=left width=30%> <? echo $lang_points; ?> </td>
<tr></tr>

<?php
mssql_select_db('Ranking', $conn) or die;
$result = mssql_query("SELECT
TOP 50
CharacterName,
(SELECT $nazwabazy.dbo.Character.Class FROM $nazwabazy.dbo.Character WHERE $nazwabazy.dbo.Character.Name COLLATE database_default = EVENT_INFO_BC.CharacterName COLLATE database_default) as Class,
Point
FROM EVENT_INFO_BC
ORDER BY Point DESC") or die;

for($i=0;$i<mssql_num_rows($result);++$i)
{
$row = mssql_fetch_row($result);
echo "<tr>";
echo "<td align=left width=10%>".($i+1);
echo "<td align=left width=30%>".htmlspecialchars($row[0])."</b></td>";
if(strlen($row[1]) == 0)
$row[1] = '<span class=serw_off>DELETED</span>';
else
$row[1] = $classes[$row[1]];
echo "<td align=left width=30%>" .$row[1]."<b></td>";
echo "<td align=left width=30%> ".$row[2]."</td>";
echo "</tr>";
}
echo '</table>';
?>
<br><br><br><br><center>created by <a href=http://elitemu.info target=_blank><b>Mr.Stoyanov</b></a></center>

</div>

Дано да съм помогнал на някой

Please USE THANKS BUTTON
 
  • Like
Reactions: AbdenMU
здрасти мойто момче, с 2 думи да ти кажа не работи, не съм го пробвал, но няма и смисъл, и на една калпава класация, която даже не си я правил ти на хиляда места си си сложил кредитс, кво са опитваш да направиш, да получиш нобелова награда ли
 
И сега какво, значи последно скрипта не бачка ?

ПС : А щом не бачка кой го е одобрил ?!?!?

Явно никой не гледа кво одобрява,за това форума се напълни със безсмислени теми.
 
оточнявай защото все има някои парцали дето си нямат друга работа и си чешат мазните ръце като пишат тъми коментари*