Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Gunz Exp and Lvl Change

Initiate Mage
Joined
Jan 29, 2007
Messages
29
Reaction score
0
<title>:: Private Gunz LVL CHANGEr</title>



<?php
$srvip = "***.***.***.***";
$srvport = "6000";
$mssql_user = "";
$mssql_pass = "";
$mssql_database = "GunZDB";
$mssql_host = "***\SQLEXPRESS";
$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass);
mssql_select_db($mssql_database);
?>
</p>

<tr>
<td><strong>Server Info:: </strong>Status:
<?php
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1);
if (!$fp) {
echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
} else {
echo "<font style='color: #009933'><B>Online</B></font></br>";
fclose($fp);
} ?>
- Total Accounts: <strong>
<?php
$query = mssql_query("SELECT * FROM Accounts");
$num_rows = mssql_num_rows($query);
echo "$num_rows";?>
</strong>- Total Characters: <strong>
<?php
$query = mssql_query("SELECT * FROM Character");
$num_rows = mssql_num_rows($query);
echo "$num_rows"; ?>
</strong>- </td>
</tr>
</table>
<br>
<br>
<tr>


<td><strong>Change Character Lvl and Exp </strong></td>
</tr>

<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?act=lvl">
Character:
<label>
<input name="personaje" type="text" id="personaje">
</label>
New Level:
<label>
<input name="nuevolvl" type="text" id="nuevolvl" size="3">
</label>
<label>
Exp:
<input name="nuevaexp" type="text" id="nuevaexp">
<input type="submit" name="Submit" value="Change">
</label>
</form>
<?php
if ($_GET['act'] == 'lvl') {
$personaje = $_POST['personaje']; // Get Character (Personaje) name
$nuevolvl = $_POST['nuevolvl']; // Get the new lvl number
$experiencia = $_POST['nuevaexp'];
$consultapj = "SELECT * FROM Character WHERE Name='$personaje'"; // Verify if Character exists
$act1 = mssql_query($consultapj); // Do query
if (!$act1) { echo "Error realizando la consulta. Error executing the query"; } else { // Show possible errors
$act2 = mssql_num_rows($act1); // Matchs
if ($act2 == 0) { echo "El personaje expesificado no existe en la base de datos. I cant find that character, check if is correctly writed."; } else { // Well, finished
$ArgentinaRulez = "UPDATE Character SET Level='$nuevolvl' WHERE Name='$personaje'";
$LoAnterior = mssql_query($ArgentinaRulez);
$CambiaExp = "UPDATE Character SET XP='$nuevaexp' WHERE Name='$personaje'";
$HacerMierda = mssql_query($CambiaExp);
if (!$LoAnterior) { echo "Error realizando la consulta. Error executing the query"; } else {
if ($experiencia == NULL) { echo "Listo :) . Done, but not changed the EXP"; } else { echo "Done allllllllllllllllllll, thanks you."; } } } } }

// Verificar Campos Vazios
function valida($campos){
foreach($campos as $c){
if(empty($c)){
echo "Complete all textboxs.";
return false;
}else{
return true;
}
}
}
?>

<tr>
</tr>
</table>
<p>  </p>
</body>
</html>

Credits to Fsaddario, he helped me make and i improved XDDD

 
Junior Spellweaver
Joined
Mar 16, 2007
Messages
135
Reaction score
0
LOL nice(not) i have tht :SniperHea XxDiexX :SniperHea
 
Initiate Mage
Joined
Jan 29, 2007
Messages
74
Reaction score
0
mmm there is a Release Upgrated admin panenl or something like that (i speak spanish :p) it have change char lvl, bounty, it have a lot of features so that isn't useful
 
Back
Top