nice one keep it up
This is a discussion on Unique Ranking [PHP] within the SilkRoad Releases forums, part of the SilkRoad Online category; Hey Guys, This My First Release :) Now Starting :) I <3 Ragezone :) Table Codes :) Code: CREATE TABLE ...
Hey Guys,
This My First Release :)
Now Starting :)
I <3 Ragezone :)![]()
Table Codes :)
Code:CREATE TABLE [dbo].[killl]( [name] [varchar](50) NULL, [uniq] [varchar](50) NULL, [tarih] [varchar](50) NULL ) ON [PRIMARY]PHP Code:<?php
// Here Mssql Connects
$sqltb = "dbo.Killl"; // Table Name
$query = $mssql->dbQuery("TRUNCATE TABLE $sqltb");
$todaydate=@date("Y-m-d");
$dosya = fopen("c:\\Users\\Administrator\\Desktop\\BlackRogue+Package\\server\\Server\\".$todaydate."_FatalLog.txt", "r");
// Here Server Path :) or Gameserver Path
while( ! feof($dosya) ) {
$yaz = fgets($dosya);
$server=substr($yaz,20,15);
if($server=="[SR_GameServer]"){
$uniquekilled=substr($yaz,36,22);
if($uniquekilled=="Unique Monster Killed!"){
$uniquekilleds=substr($yaz,36,22);
if($uniquekilleds=="Unique Monster Killed!"){
$data=substr($yaz,0,10);
$hora=substr($yaz,11,8);
$minutos=substr($hora,3,2);
$hora=substr($hora,0,2);
$minutos=(int)$minutos+(60*(int)$hora);
$passou=$agoram-$minutos;
$fimpos=strrpos($yaz,"]",66);
$fimpos=$fimpos-66;
$uniquestr=substr($line,66,$fimpos);
$fimpos=strrpos($uniquestr,"]");
$unique=substr($uniquestr,0,$fimpos);
$fimpos+=6;
$char=substr($uniquestr,$fimpos,20);
list($tarih, $saat , $game, $uniq, $monster, $killed, $uniqadi, $by, $kill) = explode(" ", $yaz);
$uniqueadi = explode(" ",$yaz);
list ($perf, $log) = explode("[", $killed);
list ($perfs, $logs) = explode("]", $log);
list ($tarihh, $game, $zaman, $time) = explode("[SR_GameServer]", $tarih);
list ($tarihp, $saat) = explode("$todaydate", $tarihh);
if ($uniq == "UNIQUE[MOB_RM_TAHOMET]"){
$uniq = "Demon Shaitan";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_TK_BONELORD]"){
$uniq = "Lord Yarkan";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_AM_IVY]"){
$uniq = "Captain IVY";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_OA_URUCHI]"){
$uniq = "Uruchi";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_EU_KERBEROS]"){
$uniq = "Cerberus";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}
elseif ($uniq == "UNIQUE[MOB_KK_ISYUTARU]"){
$uniq = "Isyutaru";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_CH_TIGERWOMAN]"){
$uniq = "Tiger Girl";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif($uniq == "UNIQUE[MOB_FW_TAESE_100]"){
$uniq = "Tai Sui(100 LvL)";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}
}}
}}
fclose($dosya);?>
<div class="page-body newsblock">
<div class="news-title">
Unique Ranking
</div>
<table style="border:1px solid #3f3f3f; border-radius: 8px 8px 8px 8px;padding: 4px;background-color:rgba(50,50,50,0.55);text-align:center;color: #fff;font-weight: bold; font-family: Arial, Helvetica, sans-serif;font-size:12px;" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);"></td>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Killer</td>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Uniq Name</td>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Date</td>
</tr>
<?php
$rank = $mssql->dbQuery("SELECT top 50 * FROM $sqltb ORDER BY tarih desc");
$place = 1;
while($row = sqlsrv_fetch_array($rank, SQLSRV_FETCH_ASSOC)) {
echo '<tr>';
echo '<td style="border:1px solid #3f3f3f;">'.$place.'</td>';
echo '<td style="border:1px solid #3f3f3f;">'.$row['name'].'</td>';
echo '<td style="border:1px solid #3f3f3f;">'.$row['uniq'].'</td>';
echo '<td style="border:1px solid #3f3f3f;">'.$row['tarih'].'</td>';
echo '</tr>';
$place ++;
}
sqlsrv_free_stmt($rank);
?>
</table>
nice one keep it up
actually this means when each one go on that page it will get executed and the player will get new points lol you're making it too complex here is snippet of code
if($server=="[SR_GameServer]"){
$uniquekilled=substr($line,36,22);
if($uniquekilled=="Unique Monster Killed!"){
$pos=strrpos($line,"]",66);
$pos=$pos-66;
$uniquestr=substr($line,66,$pos);
$pos=strrpos($uniquestr,"]");
$unique=substr($uniquestr,0,$pos);
$pos+=6;
$char=substr($uniquestr,$pos,20);
getUniqueKills($unique,$char);
}
}
Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\uniqueranking.php on line 8
Line 8= $query = $mssql->dbQuery("TRUNCATE TABLE $sqltb");
this is working good (the rank itself)
but i get those :
Notice: Undefined variable: agoram in C:\xampp\htdocs\mod\uniquekill.php on line 32
Notice: Undefined variable: line in C:\xampp\htdocs\mod\uniquekill.php on line 35
Notice: Undefined offset: 8 in C:\xampp\htdocs\mod\uniquekill.php on line 40
Notice: Undefined offset: 7 in C:\xampp\htdocs\mod\uniquekill.php on line 40
Notice: Undefined offset: 6 in C:\xampp\htdocs\mod\uniquekill.php on line 40
hundreds of those.. and in the bottom the ranking (does work!)
anyway to remove those errors ?
to remove php errors fix them or dirty-fix them by putting this into your script:
error_reporting(0);
have fun =)
well , that's what i did - but still those errors not coming from no where.. , they must be there because something is **** up..
i would love to know how to fix them :D
i already got rid for few of them by removing not decleared data.
help error
Fatal error: Call to a member function dbQuery() on a non-object in C:\AppServ\www\index.php on line 8
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 7
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 7
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 59
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 59
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in C:\AppServ\www\rank\rank.php on line 75
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in C:\AppServ\www\rank\rank.php on line 75
Fatal error: Maximum execution time of 30 seconds exceeded in C:\AppServ\www\rank\rank.php on line 75
Guys help to fix this lines.
Whats the wrongs with php codes?
its not working for me :(
I need Asp Versiyon pls help me