Anaka Kruma Ranking Script
Greetings Developer..
Anyone please share your knowledge about anaka kruma how do i change ranking.php and what should i include in config.php..
thank you in Advance..
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
heinz1
Greetings Developer..
Anyone please share your knowledge about anaka kruma how do i change ranking.php and what should i include in config.php..
thank you in Advance..
What do you really want?
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
John
What do you really want?
I want to make a ranking for anaka Kruma sir...but i don't know the script ....
Re: Anaka Kruma Ranking Script
well...
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
$sql['HOST'] = 'localhost'; // SQL hostname
$sql['USER'] = 'root'; // SQL username (without writing permissions)
$sql['PASS'] = '123'; // SQL user password
$sql['NAME'] = 'Tantra'; // SQL database name
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db($sql['NAME'], $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
John
well...
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
$sql['HOST'] = 'localhost'; // SQL hostname
$sql['USER'] = 'root'; // SQL username (without writing permissions)
$sql['PASS'] = '123'; // SQL user password
$sql['NAME'] = 'Tantra'; // SQL database name
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db($sql['NAME'], $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE idx >= 0 ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
Thank You so Much John....
By The Way this Is only for Config.php and I will create another Rank.php for Anaka Kruma Sir?
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
heinz1
Thank You so Much John....
By The Way this Is only for Config.php and I will create another Rank.php for Anaka Kruma Sir?
In top are the variables to connect to sql, if is only for anaka kruma then show chars between 30 level and the max level in anaka.
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
$sql['HOST'] = 'localhost'; // SQL hostname
$sql['USER'] = 'root'; // SQL username (without writing permissions)
$sql['PASS'] = '123'; // SQL user password
$sql['NAME'] = 'Tantra'; // SQL database name
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
$rank['LVL1'] = 30; // Minimum level of the chars to show
$rank['LVL2'] = 70; // Maximum level of the characters to show
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db($sql['NAME'], $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank['LVL1']." AND ".$rank['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
I've added two new variables to control the level of the chararacters to show, so, choose the levels depending the kruma. Show me your config.php to combinate the variables.
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
John
In top are the variables to connect to sql, if is only for anaka kruma then show chars between 30 level and the max level in anaka.
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
$sql['HOST'] = 'localhost'; // SQL hostname
$sql['USER'] = 'root'; // SQL username (without writing permissions)
$sql['PASS'] = '123'; // SQL user password
$sql['NAME'] = 'Tantra'; // SQL database name
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
$rank['LVL1'] = 30; // Minimum level of the chars to show
$rank['LVL2'] = 70; // Maximum level of the characters to show
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db($sql['NAME'], $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank['LVL1']." AND ".$rank['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
I've added two new variables to control the level of the chararacters to show, so, choose the levels depending the kruma. Show me your config.php to combinate the variables.
<?php
require_once "sql_inject.php";
$bDestroy_session = TRUE;
$url_redirect = 'index.php';
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect);
function Conectarse()
{
global $link;
$link=mssql_pconnect("sdacaz\SQLEXPRESS","sa","qwers");
if (!$link) {
exit();
}
if (!mssql_select_db("UserLogin",$link)) {
exit();
}
return $link;
}
Conectarse();
$AccDir = "C:\SERVER\DBSRV\account";
$NameServer = "Tantra";
$TantraWebLink = "http://tantra.net/";
$TantraForumLink = "http://www.tantra.com/forums/";
$SupportLink = "http://www.tantra/support.php";
$SMTPHost = "mail.tantra.com";
$SMTPPort = "465";
$SMTPUser = "server@tantra.com";
$SMTPPass = "smtp";
$SMTPEmail = "server.com";
$SMTPName = "Tantra";
$GM1 = "";
$GM2 = "";
$GM3 = "";
$GM4 = "";
$LinkC1 = "#"; // Link Cliente Mediafire
$LinkC2 = "#"; // Link Cliente Mediafire
$LinkP1 = "#"; // Link Client GigaSize
$LinkP2 = "#"; // Link Parche GigaSize
$mantenimiento = "Off"; // Modo Mantenimiento On / Off
?>
Thank you sir John for Answering ..
Sir...John this is my Config.. By the way i want to create Two Ranking one is for higher Kruma anad One is for Anaka Kruma sir John..what should i change in ranking.php??
Re: Anaka Kruma Ranking Script
Your new config:
PHP Code:
<?php
require_once "sql_inject.php";
$bDestroy_session = TRUE;
$url_redirect = 'index.php';
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect);
/* sql connection data */
$sql['HOST'] = 'sdacaz\SQLEXPRESS'; // SQL hostname
$sql['USER'] = 'sa'; // SQL username
$sql['PASS'] = 'qwers'; // SQL user password
/* ranking configurations */
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
/* for anaka kruma */
$rank1['LVL1'] = 30; // Minimum level of the chars to show
$rank1['LVL2'] = 68; // Maximum level of the characters to show
/* for vedi kruma */
$rank2['LVL1'] = 69; // Minimum level of the chars to show
$rank2['LVL2'] = 99; // Maximum level of the characters to show
/* for kruma */
$rank3['LVL1'] = 100; // Minimum level of the chars to show
$rank3['LVL2'] = 200; // Maximum level of the characters to show
$AccDir = "C:\SERVER\DBSRV\account";
$NameServer = "Tantra";
$TantraWebLink = "http://tantra.net/";
$TantraForumLink = "http://www.tantra.com/forums/";
$SupportLink = "http://www.tantra/support.php";
$SMTPHost = "mail.tantra.com";
$SMTPPort = "465";
$SMTPUser = "server@tantra.com";
$SMTPPass = "smtp";
$SMTPEmail = "server.com";
$SMTPName = "Tantra";
$GM1 = "";
$GM2 = "";
$GM3 = "";
$GM4 = "";
$LinkC1 = "#"; // Link Cliente Mediafire
$LinkC2 = "#"; // Link Cliente Mediafire
$LinkP1 = "#"; // Link Client GigaSize
$LinkP2 = "#"; // Link Parche GigaSize
$mantenimiento = "Off"; // Modo Mantenimiento On / Off
function Conectarse(){
global $link;
$link=mssql_pconnect($sql['HOST'], $sql['USER'], $sql['PASS']);
if (!$link) {
exit();
};
if (!mssql_select_db("UserLogin",$link)) {
exit();
};
return $link;
};
Conectarse();
?>
ranking for anaka:
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
include('config.php');
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db('Tantra', $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank1['LVL1']." AND ".$rank1['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
ranking for vedi
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
include('config.php');
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db('Tantra', $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank2['LVL1']." AND ".$rank2['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
for kruma
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
include('config.php');
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db('Tantra', $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank3['LVL1']." AND ".$rank3['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
in the config file edit the lines:
PHP Code:
/* for anaka kruma */
$rank1['LVL1'] = 30; // Minimum level of the chars to show
$rank1['LVL2'] = 68; // Maximum level of the characters to show
/* for vedi kruma */
$rank2['LVL1'] = 69; // Minimum level of the chars to show
$rank2['LVL2'] = 99; // Maximum level of the characters to show
/* for kruma */
$rank3['LVL1'] = 100; // Minimum level of the chars to show
$rank3['LVL2'] = 200; // Maximum level of the characters to show
according the level of the ranking (or the map), if you look, the 3 files are the same, only changed 2 variables, of the levels.
already have the base, edit how you want
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
John
Your new config:
PHP Code:
<?php
require_once "sql_inject.php";
$bDestroy_session = TRUE;
$url_redirect = 'index.php';
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect);
/* sql connection data */
$sql['HOST'] = 'sdacaz\SQLEXPRESS'; // SQL hostname
$sql['USER'] = 'sa'; // SQL username
$sql['PASS'] = 'qwers'; // SQL user password
/* ranking configurations */
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
/* for anaka kruma */
$rank1['LVL1'] = 30; // Minimum level of the chars to show
$rank1['LVL2'] = 68; // Maximum level of the characters to show
/* for vedi kruma */
$rank2['LVL1'] = 69; // Minimum level of the chars to show
$rank2['LVL2'] = 99; // Maximum level of the characters to show
/* for kruma */
$rank3['LVL1'] = 100; // Minimum level of the chars to show
$rank3['LVL2'] = 200; // Maximum level of the characters to show
$AccDir = "C:\SERVER\DBSRV\account";
$NameServer = "Tantra";
$TantraWebLink = "http://tantra.net/";
$TantraForumLink = "http://www.tantra.com/forums/";
$SupportLink = "http://www.tantra/support.php";
$SMTPHost = "mail.tantra.com";
$SMTPPort = "465";
$SMTPUser = "server@tantra.com";
$SMTPPass = "smtp";
$SMTPEmail = "server.com";
$SMTPName = "Tantra";
$GM1 = "";
$GM2 = "";
$GM3 = "";
$GM4 = "";
$LinkC1 = "#"; // Link Cliente Mediafire
$LinkC2 = "#"; // Link Cliente Mediafire
$LinkP1 = "#"; // Link Client GigaSize
$LinkP2 = "#"; // Link Parche GigaSize
$mantenimiento = "Off"; // Modo Mantenimiento On / Off
function Conectarse(){
global $link;
$link=mssql_pconnect($sql['HOST'], $sql['USER'], $sql['PASS']);
if (!$link) {
exit();
};
if (!mssql_select_db("UserLogin",$link)) {
exit();
};
return $link;
};
Conectarse();
?>
ranking for anaka:
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
include('config.php');
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db('Tantra', $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank1['LVL1']." AND ".$rank1['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
ranking for vedi
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
include('config.php');
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db('Tantra', $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank2['LVL1']." AND ".$rank2['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
for kruma
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
include('config.php');
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db('Tantra', $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 WHERE CharacterLevel BETWEEN ".$rank3['LVL1']." AND ".$rank3['LVL2']." ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
in the config file edit the lines:
PHP Code:
/* for anaka kruma */
$rank1['LVL1'] = 30; // Minimum level of the chars to show
$rank1['LVL2'] = 68; // Maximum level of the characters to show
/* for vedi kruma */
$rank2['LVL1'] = 69; // Minimum level of the chars to show
$rank2['LVL2'] = 99; // Maximum level of the characters to show
/* for kruma */
$rank3['LVL1'] = 100; // Minimum level of the chars to show
$rank3['LVL2'] = 200; // Maximum level of the characters to show
according the level of the ranking (or the map), if you look, the 3 files are the same, only changed 2 variables, of the levels.
already have the base, edit how you want
Sir.. John Thank you so much....
- - - Updated - - -
By the way Sir John.. Do you Have Any Video Tutorial for Making A New Set or Weapon...
:ott:
- - - Updated - - -
By the way Sir John.. Do you Have Any Video Tutorial for Making A New Set or Weapon...
:ott:
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
heinz1
Sir.. John Thank you so much....
- - - Updated - - -
By the way Sir John.. Do you Have Any Video Tutorial for Making A New Set or Weapon...
:ott:
- - - Updated - - -
By the way Sir John.. Do you Have Any Video Tutorial for Making A New Set or Weapon...
:ott:
No, sorry, i don't have
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
John
well...
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # ---------------------------------------------------------------- # ||
|| # Copyleft ©2011-2016 Amir Torrez # ||
|| # ---------------- Basic Rank ---------------- # ||
|| # amirtorrez@openmailbox.org # ||
|| #################################################################### ||
\*======================================================================*/
$sql['HOST'] = 'localhost'; // SQL hostname
$sql['USER'] = 'root'; // SQL username (without writing permissions)
$sql['PASS'] = '123'; // SQL user password
$sql['NAME'] = 'Tantra'; // SQL database name
$rank['TOPN'] = 50; // Max chars in top
$rank['ORD1'] = 'BrahmanPoint'; // Order by BrahmanPoint or CharacterLevel
$rank['ORD2'] = 'desc'; // Order by descending (desc) or ascending (asc)
?>
<table width="80%" align="center" border="0">
<thead>
<tr>
<td align="center"><b>Rank</b></td>
<td align="center"><b>Character</b></td>
<td align="center"><b>Level</b></td>
<td align="center"><b>Master Points</b></td>
<td align="center"><b>Guild</b></td>
<td align="center"><b>God</b></td>
<td align="center"><b>Tribe</b></td>
</tr>
</thead>
<tbody>
<?php
function FormatLevel($var){
if($var > 99 && $var < 140){ $ResulLevel = 'Amarah '.($var-99); }
elseif($var > 140 && $var < 180){ $ResulLevel = 'Eda '.($var-140); }
elseif($var > 179){ $ResulLevel = 'Astica '.($var-179);}
else { $ResulLevel = $var; }
return $ResulLevel;
};
function FormatGod($var){
if($var == 1){ $ResultGod = 'Brahma'; }
elseif($var == 2){ $ResultGod = 'Vishnu'; }
elseif($var == 4){ $ResultGod = 'Shiva'; }
else { $ResultGod = 'None'; }
return $ResultGod;
};
function FormatTribe($var){
if($var == 1){ $ResultTribe = 'Naga'; }
elseif($var == 2){ $ResultTribe = 'Kimnara'; }
elseif($var == 4){ $ResultTribe = 'Ashura'; }
elseif($var == 8){ $ResultTribe = 'Rakshasa'; }
elseif($var == 16){ $ResultTribe = 'Yaksa'; }
elseif($var == 32){ $ResultTribe = 'Gandharva'; }
elseif($var == 64){ $ResultTribe = 'Deva'; }
elseif($var == 128){ $ResultTribe = 'Garuda'; }
else{ $ResultTribe = 'GM'; }
return $ResultTribe;
};
$link = mssql_connect($sql['HOST'], $sql['USER'], $sql['PASS']);
mssql_select_db($sql['NAME'], $link);
$query = mssql_query("SELECT TOP ".$rank['TOPN']." * FROM TantraBackup00 ORDER BY ".$rank['ORD1']." ".$rank['ORD2']."");
$i = 0;
while($row = mssql_fetch_array($query)){
$rank = $i+1;
$i += 1;
?>
<tr>
<td align="center"><?php echo($rank);?></td>
<td align="center"><?php echo($row['CharacterName']);?></td>
<td align="center"><?php echo(FormatLevel($row['CharacterLevel']));?></td>
<td align="center"><?php echo($row['BrahmanPoint']);?></td>
<td align="center"><?php echo($row['GuildName']);?></td>
<td align="center"><?php echo(FormatGod($row['Trimurity']));?></td>
<td align="center"><?php echo(FormatTribe($row['Tribe'])); ?></td>
</tr>
<?php
};
mssql_close($link);
?>
</tbody>
</table>
Sir John . do you have script for Instant Astica 20 ?
Re: Anaka Kruma Ranking Script
Quote:
Originally Posted by
Panyawan
Sir John . do you have script for Instant Astica 20 ?
I don't understand
Re: Anaka Kruma Ranking Script
@John He is talking about the php script to make the character Astica 20 from the website.
Re: Anaka Kruma Ranking Script
sir Jbeitz Do you have Tutorial on making a Set ??
Re: Anaka Kruma Ranking Script
I have a colleague that has created tutorials for such things. If you are interested, he is asking $75 for the tutorials but, they are well worth it when you think about having someone that can answer your questions and also save you money on purchasing the sets without the tutorial. Anyhow let me know if you are interested. I don't get anything from this other than the satisfaction of helping others.