[HELP] Rena & Stone

View previous topic View next topic Go down

[HELP] Rena & Stone

Post by VIRUS on Wed Nov 04, 2015 6:07 pm

Need me stone and rena deposit thx
avatar
VIRUS
Member
Member

Брой мнения : 9
Points : 13
Reputation : 0
Join date : 2014-12-10
Age : 33

View user profile

Back to top Go down

Re: [HELP] Rena & Stone

Post by Asgard on Wed Nov 04, 2015 6:10 pm

Server version?

!!! Download links are open only to registered users !!!


!!! Линковете за сваляне са отворени единствено за регистрирани потребители !!!

[You must be registered and logged in to see this image.] You don't make the rules! [You must be registered and logged in to see this image.]
avatar
Asgard
Admin
Admin

Брой мнения : 37
Points : 119
Reputation : 14
Join date : 2014-12-10
Age : 29
Местожителство : Germany

View user profile http://WARTUNEMU.COM

Back to top Go down

Re: [HELP] Rena & Stone

Post by VIRUS on Wed Nov 04, 2015 6:13 pm

97
avatar
VIRUS
Member
Member

Брой мнения : 9
Points : 13
Reputation : 0
Join date : 2014-12-10
Age : 33

View user profile

Back to top Go down

Re: [HELP] Rena & Stone

Post by Asgard on Fri Nov 06, 2015 5:58 pm

install.txt

Code:
1. In Query Analyzer Add SQL.txt
2. Change That information:
$host = "127.0.0.1";
$database = "MuOnline";
$user = "sa";
$password = "SQL pass";
3. Settings Ranking
sranking.php - Stone
rranking.php - Rena
3.1 Change Information
$host = "127.0.0.1";
$database = "MuOnline";
$user = "sa";
$password = "SQL pass";
3.2 Results on page
$lines = '10';
3.3 Don't have Style(desing).

Rena.php

Code:
<table align="center" width="400" id="main">
<form method="POST" action="">
<tr><td><b>acc:</b></td><td><input type="text" name="acc" size="25"/></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="pass" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Deposit" /></td></tr>
</form>
</table>
<?
if (isset($_POST['submit'])) {
$host = "127.0.0.1";
$database = "MuOnline";
$user = "sa";
$password = "SQL Pass";
if (extension_loaded('gd')){echo("");}
else{Die("<center>Loading php_gd2.dll Failed!<br>Please Enable php_gd2.dll In Your Php.ini</center>");}

$connect = mssql_connect($host,$user,$password);
$db = mssql_select_db($database,$connect);
if(!$db) die('<center>Connection with SQL Server failed!</center>');

$account = htmlspecialchars(addslashes(stripslashes($_POST['acc'])));
$pass= htmlspecialchars(addslashes(stripslashes($_POST['pass'])));

$querya = mssql_query("SELECT * From MEMB_STAT where memb___id='$account' and ConnectStat='1'");
$rowa = mssql_num_rows($querya);

$queryacc = mssql_query("SELECT * From MEMB_INFO where memb___id='$account' and memb__pwd='$pass'");
$rowacc = mssql_num_rows($queryacc);

if($rowa>0){ echo "Your Account is Online"; $err=1;}
elseif($rowacc<=0){ echo "Wrong Password or Account"; $err=1;}
if ($err!=1) {
function rena($account){
$query= mssql_query("declare @it varbinary(1200);
set @it=(select [Items] from [warehouse] where [AccountID]='$account');
print @it");
$items = substr(mssql_get_last_message(),2);

$br=0;
for($i=0;$i<120;$i++){
if(substr($items,$i*20,4)=="D500"){$br++;$items=substr_replace($items,"FFFFFFFFFFFFFFFFFFFF",$i*20,20);}
}
$new_warehouse=mssql_query("update [warehouse] set [Items]=0x$items where [AccountID]='$account'");
return $br;


$querych = mssql_query("SELECT * From StoneRena where acc='$account'");
$rowch = mssql_num_rows($querych); 
$rena= rena($account);
if($rowch<=0){
$a = mssql_query("INSERT INTO StoneRena (acc, Rena) VALUES('$account', '$rena')");
echo "You Deposited $rena Rena ";
 }
 else {
$a= mssql_query("update StoneRena set Rena=Rena+$rena where [acc]='$account'"); 
echo "You Deposited $rena Rena ";
}
return $br;
}
}
?>


Stone.php

Code:
<table align="center" width="400" id="main">
<form method="POST" action="">
<tr><td><b>acc:</b></td><td><input type="text" name="acc" size="25"/></td></tr>
<tr><td><b>Password:</b></td><td><input type="password" name="pass" size="25"/></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Deposit" /></td></tr>
</form>
</table>
<?
if (isset($_POST['submit'])) {
$host = "127.0.0.1";
$database = "MuOnline";
$user = "sa";
$password = "SQL pass";
if (extension_loaded('gd')){echo("");}
else{Die("<center>Loading php_gd2.dll Failed!<br>Please Enable php_gd2.dll In Your Php.ini</center>");}

$connect = mssql_connect($host,$user,$password);
$db = mssql_select_db($database,$connect);
if(!$db) die('<center>Connection with SQL Server failed!</center>');

$account = htmlspecialchars(addslashes(stripslashes($_POST['acc'])));
$pass= htmlspecialchars(addslashes(stripslashes($_POST['pass'])));

$querya = mssql_query("SELECT * From MEMB_STAT where memb___id='$account' and ConnectStat='1'");
$rowa = mssql_num_rows($querya);

$queryacc = mssql_query("SELECT * From MEMB_INFO where memb___id='$account' and memb__pwd='$pass'");
$rowacc = mssql_num_rows($queryacc);

if($rowa>0){ echo "Your Account is Online"; $err=1;}
elseif($rowacc<=0){ echo "Wrong Password or Account"; $err=1;}
if ($err!=1) {
function stone($account){
$query= mssql_query("declare @it varbinary(1200);
set @it=(select [Items] from [warehouse] where [AccountID]='$account');
print @it");
$items = substr(mssql_get_last_message(),2);

$br=0;
for($i=0;$i<120;$i++){
if(substr($items,$i*20,4)=="D508"){$br++;$items=substr_replace($items,"FFFFFFFFFFFFFFFFFFFF",$i*20,20);}
}
$new_warehouse=mssql_query("update [warehouse] set [Items]=0x$items where [AccountID]='$account'");
return $br;


$querych = mssql_query("SELECT * From StoneRena where acc='$account'");
$rowch = mssql_num_rows($querych); 
$stones= stone($account);
if($rowch<=0){
$a = mssql_query("INSERT INTO StoneRena (acc, stone) VALUES('$account', '$stones')");
echo "You Deposited $stones Stone ";
 }
 else {
$a= mssql_query("update StoneRena set stone=stone+$stones where [acc]='$account'"); 
echo "You Deposited $stones Stone ";
}
return $br;
}
}
?>


rrankings.php

Code:
<table width='400' align='center'>
<tr>
<td align='center'>#</td>
<td align='center'>Char</td>
<td align='center'>Rena</td>
</tr>
<?
$host = "127.0.0.1";
$database = "MuOnline";
$user = "sa";
$password = "SQL pass";
if (extension_loaded('gd')){echo("");}
else{Die("<center>Loading php_gd2.dll Failed!<br>Please Enable php_gd2.dll In Your Php.ini</center>");}

$connect = mssql_connect($host,$user,$password);
$db = mssql_select_db($database,$connect);
if(!$db) die('<center>Connection with SQL Server failed!</center>');


$total = mssql_num_rows(mssql_query("SELECT * FROM StoneRena where acc like '%%'"));
$lines = '10';
if(!isset($_GET['pages']))
{
$limit='0';
$pagesa='1';
}
else
{
$page = (int)$_GET['pages'];

$pages = $page - 1;
$pagesa =$page;
$limit = $lines * $pages;
}
$total = ceil($total/$lines);
if($total >0){
   echo '<center>';
   if(($page-1) > 0)echo '<a href="?pages='.($pagesa-1).'"><b>&lt;&lt;Previous</b></a> ';
   echo '[Page '.$pagesa.' of total '.$total.']';
   if(($page+1) <= $total)echo ' <a href="?pages='.($pagesa+1).'"><b>Next&gt;&gt;</b></a>';
   echo '</center><br>';}
   $topq = mssql_query("Select ToP $lines acc,rena from StoneRena where acc not in (Select TOP $limit acc from StoneRena order by rena desc) order by rena desc");

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

$charr = mssql_query("Select GameIDC From AccountCharacter where Id='$row[0]'");
$char = mssql_fetch_row($charr);
echo"
<tr>

<td align='center'>$rank.</td>
<td align='center'>$char[0]</td>
<td align='center'>$row[1]</td>
</tr>
";

}
echo "</table>";
   if($total >0){
   echo '<center>';
   if(($page-1) > 0)echo '<a href="?pages='.($pagesa-1).'"><b>&lt;&lt;Previous</b></a> ';
   echo '[Page '.$pagesa.' of total '.$total.']';
   if(($page+1) <= $total)echo ' <a href="?pages='.($pagesa+1).'"><b>Next&gt;&gt;</b></a>';
   echo '</center><br>';}
?>


srankings.php

Code:
<table width='400' align='center'>
<tr>
<td align='center'>#</td>
<td align='center'>Char</td>
<td align='center'>Stone</td>
</tr>
<?
$host = "127.0.0.1";
$database = "MuOnline";
$user = "sa";
$password = "SQL pass";
if (extension_loaded('gd')){echo("");}
else{Die("<center>Loading php_gd2.dll Failed!<br>Please Enable php_gd2.dll In Your Php.ini</center>");}

$connect = mssql_connect($host,$user,$password);
$db = mssql_select_db($database,$connect);
if(!$db) die('<center>Connection with SQL Server failed!</center>');


$total = mssql_num_rows(mssql_query("SELECT * FROM StoneRena where acc like '%%'"));
$lines = '10';
if(!isset($_GET['pages']))
{
$limit='0';
$pagesa='1';
}
else
{
$page = (int)$_GET['pages'];

$pages = $page - 1;
$pagesa =$page;
$limit = $lines * $pages;
}
$total = ceil($total/$lines);
if($total >0){
   echo '<center>';
   if(($page-1) > 0)echo '<a href="?pages='.($pagesa-1).'"><b>&lt;&lt;Previous</b></a> ';
   echo '[Page '.$pagesa.' of total '.$total.']';
   if(($page+1) <= $total)echo ' <a href="?pages='.($pagesa+1).'"><b>Next&gt;&gt;</b></a>';
   echo '</center><br>';}
   $topq = mssql_query("Select ToP $lines acc,stone from StoneRena where acc not in (Select TOP $limit acc from StoneRena order by Stone desc) order by Stone desc");

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

$charr = mssql_query("Select GameIDC From AccountCharacter where Id='$row[0]'");
$char = mssql_fetch_row($charr);
echo"
<tr>

<td align='center'>$rank.</td>
<td align='center'>$char[0]</td>
<td align='center'>$row[1]</td>
</tr>
";

}
echo "</table>";
   if($total >0){
   echo '<center>';
   if(($page-1) > 0)echo '<a href="?pages='.($pagesa-1).'"><b>&lt;&lt;Previous</b></a> ';
   echo '[Page '.$pagesa.' of total '.$total.']';
   if(($page+1) <= $total)echo ' <a href="?pages='.($pagesa+1).'"><b>Next&gt;&gt;</b></a>';
   echo '</center><br>';}
?>


SQLL
sql query:

Code:
Use MuOnline
CREATE TABLE StoneRena ([acc] [varchar] (10)  NOT NULL ,[Stone] [bigint] NOT NULL default (0),[Rena] [bigint] NOT NULL default (0)) ON [PRIMARY];



!!! Download links are open only to registered users !!!


!!! Линковете за сваляне са отворени единствено за регистрирани потребители !!!

[You must be registered and logged in to see this image.] You don't make the rules! [You must be registered and logged in to see this image.]
avatar
Asgard
Admin
Admin

Брой мнения : 37
Points : 119
Reputation : 14
Join date : 2014-12-10
Age : 29
Местожителство : Germany

View user profile http://WARTUNEMU.COM

Back to top Go down

Re: [HELP] Rena & Stone

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum