[Release] Grand Reset Module + Ranking [MuWeb 0.8]

........ за този в който ти дава грешка демек като гледам горе дет си дал грешката значи трябва да е кода от този файл C:\Program Files\xampp\htdocs\modules\gres.php ...
 
Ето го

Code:
<?php
if(!isset($_GET['op'])){
require("../includes/denied.php");
denied('register');
}
?>

<table width="331" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">
<form action="" method="post" name="register_from" id="register_from">
                    <table align="center"  width="100" border="0" cellspacing="2" cellpadding="2">
					   <tr>
                        <td><div align="right" class="normal_text_white">Character</div></td>
                        <td colspan="4"><div align="left">
                            <input name="character" type="text" class="input"  id="character" size="14" maxlength="10" value="">
                        </div></td>
                      </tr>
                     
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>

      <td><label>
	  <input name="quest" type="hidden" id="quest" value="quest">
	<input type="submit" name="submit" value="Make GrandRes" class="button" onClick="return validate(document.register_from);">
      </label><br><Br></td>
    </tr>
</FORM> </div></td>
  </tr>
</table>
<?php


function reqres()
{
include("config.php");
$account_id = htmlspecialchars($_SESSION['user'], ENT_QUOTES);
$account_id = clean_var($account_id);
$id = (int)$_GET['id'];
$character=htmlspecialchars($_POST[character], ENT_QUOTES);
$resets = $db->Execute("SELECT Resets from Character where Name='$character'");
$resetsdone = $resets->fetchrow();
$isonline = $db->Execute("SELECT ConnectStat from MEMB_STAT where memb___id='$account_id'");
$isonlinedone = $isonline->fetchrow();
$pcredits = $db->Execute("SELECT credits from MEMB_CREDITS where memb___id='$account_id'");
$pcreditsdone = $pcredits->fetchrow();
$gquery = $db->Execute("SELECT GrandRes from Character where name='$character' and accountid='$account_id'");
$gquerydone = $gquery->fetchrow();

if($account_id == NULL)
{
show_error("$warning_start You Are Not Logged! $warning_end"); 
exit();
}

if($resetsdone[0] < 999)
{
$error=1;
show_error("$warning_start $character Need 999 Resets To Grand Reset! $warning_end"); 
exit();
}

if($isonlinedone[0] == 1)
{
$error=1;
                                         show_error("$warning_start $character Is Online! $warning_end"); 
                                                                   }
																   
if($gquerydone[0] == 0)
{ 
$run=mssql_query("UPDATE Character set GrandRes=1 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 1 Grand Reset!";
}
elseif($gquerydone[0] == 1)
{
$run1=mssql_query("UPDATE Character set GrandRes=2 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 2 Grand Reset!";
}
elseif($gquerydone[0] == 2)
{
$run1=mssql_query("UPDATE Character set GrandRes=3 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 3 Grand Reset!";
}
elseif($gquerydone[0] == 3)
{
$run1=mssql_query("UPDATE Character set GrandRes=4 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 4 Grand Reset!";
}
elseif($gquerydone[0] == 4)
{
$run1=mssql_query("UPDATE Character set GrandRes=5 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 5 Grand Reset!";
}
elseif($gquerydone[0] == 5)
{
$run1=mssql_query("UPDATE Character set GrandRes=6 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 6 Grand Reset!";
}
elseif($gquerydone[0] == 6)
{
$run1=mssql_query("UPDATE Character set GrandRes=7 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 7 Grand Reset!";
}
elseif($gquerydone[0] == 7)
{
$run1=mssql_query("UPDATE Character set GrandRes=8 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 8 Grand Reset!";
}
elseif($gquerydone[0] == 8)
{
$run1=mssql_query("UPDATE Character set GrandRes=9 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 9 Grand Reset!";
}
elseif($gquerydone[0] == 9)
{
$run1=mssql_query("UPDATE Character set GrandRes=10 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 10 Grand Reset!";
}
																   }
if(isset($_POST[quest]))
{

																   reqres();
					}											   

																   


?></table>
 
Code:
<table width="331" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">
<form action="" method="post" name="register_from" id="register_from">
                    <table align="center"  width="100" border="0" cellspacing="2" cellpadding="2">
					   <tr>
                        <td><div align="right" class="normal_text_white">Character</div></td>
                        <td colspan="4"><div align="left">
                            <input name="character" type="text" class="input"  id="character" size="14" maxlength="10" value="">
                        </div></td>
                      </tr>
                     
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>

      <td><label>
	  <input name="quest" type="hidden" id="quest" value="quest">
	<input type="submit" name="submit" value="Make GrandRes" class="button" onClick="return validate(document.register_from);">
      </label><br><Br></td>
    </tr>
</FORM> </div></td>
  </tr>
</table>
<?php


function reqres()
{
include("config.php");
$account_id = htmlspecialchars($_SESSION['user'], ENT_QUOTES);
$account_id = clean_var($account_id);
$id = (int)$_GET['id'];
$character=htmlspecialchars($_POST[character], ENT_QUOTES);
$resets = mssql_query("SELECT Resets from Character where Name='$character'");
$resetsdone = mssql_fetch_row($resets);
$isonline = mssql_query("SELECT ConnectStat from MEMB_STAT where memb___id='$account_id'");
$isonlinedone = mssql_fetch_row($isonline);
$pcredits = mssql_query("SELECT credits from MEMB_CREDITS where memb___id='$account_id'");
$pcreditsdone = mssql_fetch_row($pcredits);
$gquery = mssql_query("SELECT GrandRes from Character where name='$character' and accountid='$account_id'");
$gquerydone = mssql_fetch_row($gquery);

if($account_id == NULL)
{
echo("$warning_start You Are Not Logged! $warning_end"); 
exit();
}

if($resetsdone[0] < 999)
{
$error=1;
echo("$warning_start $character Need 999 Resets To Grand Reset! $warning_end"); 
exit();
}

if($isonlinedone[0] == 1)
{
$error=1;
                                         echo("$warning_start $character Is Online! $warning_end"); 
                                                                   }
																   
if($gquerydone[0] == 0)
{ 
$run=mssql_query("UPDATE Character set GrandRes=1 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 1 Grand Reset!";
}
elseif($gquerydone[0] == 1)
{
$run1=mssql_query("UPDATE Character set GrandRes=2 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 2 Grand Reset!";
}
elseif($gquerydone[0] == 2)
{
$run1=mssql_query("UPDATE Character set GrandRes=3 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 3 Grand Reset!";
}
elseif($gquerydone[0] == 3)
{
$run1=mssql_query("UPDATE Character set GrandRes=4 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 4 Grand Reset!";
}
elseif($gquerydone[0] == 4)
{
$run1=mssql_query("UPDATE Character set GrandRes=5 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 5 Grand Reset!";
}
elseif($gquerydone[0] == 5)
{
$run1=mssql_query("UPDATE Character set GrandRes=6 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 6 Grand Reset!";
}
elseif($gquerydone[0] == 6)
{
$run1=mssql_query("UPDATE Character set GrandRes=7 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 7 Grand Reset!";
}
elseif($gquerydone[0] == 7)
{
$run1=mssql_query("UPDATE Character set GrandRes=8 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 8 Grand Reset!";
}
elseif($gquerydone[0] == 8)
{
$run1=mssql_query("UPDATE Character set GrandRes=9 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 9 Grand Reset!";
}
elseif($gquerydone[0] == 9)
{
$run1=mssql_query("UPDATE Character set GrandRes=10 where name='$character'");
$run3=mssql_query("UPDATE Character set Resets=0 where name='$character'");
$run2=mssql_query("UPDATE MEMB_CREDITS set credits=5000 where memb___id='$account_id'");
echo "You Succesfuly Made Your 10 Grand Reset!";
}
																   }
if(isset($_POST[quest]))
{

																   reqres();
					}											   

																   


?></table>

Ето ;)
 
Значи, кода понеже искаше 999 рестарта, тук го промених и 2-те 999 на 50, проблема е, че от 14 000 кредита ме свали на 5000 кредита, от 220 рестарта на 0-ла рестарта ми направи героя, а трябва да свали само 50 рестарта, ако е променено така и да ме остави на 170 рестарта и да мога да направя още 3 гранд резета и да ми останат 20 рестарта и да трябва да направя още 30 за още един гранд резет мисля ? - Иначе изписа, че ми е направило 1 grand reset
А grank , вече работи след като оправи тоя код, само тея 2 проблема, горе дето са ?

Code:
if($resetsdone[0] < 999)
{
$error=1;
echo("$warning_start $character Need 999 Resets To Grand Reset! $warning_end"); 
exit();
 
Last edited:
ето един едит от мен

$needed_res - колко реса ти трябват за да гранд реснеш
$max_gr - колко е мах гранд ресета
$gets_credits - колко кредита да дава

ако има проблем пишете

НЕ СЪМ ГО ТЕСТВАЛ

http://darksteam.net/160941-post30.html
 
Last edited:
MeMoS при мен с този скрипт, нищо не става, цъкам направи гранд рес и нищо, нито изписва текст, нито кредити нито ГР, все едно току що отварям модула и още не съм направил нищо ?
 
MeMoS при мен с този скрипт, нищо не става, цъкам направи гранд рес и нищо, нито изписва текст, нито кредити нито ГР, все едно току що отварям модула и още не съм направил нищо ?

едитнах го пробвай сега
 
Значи 2 проблема има останалото работи, не са много фатални, не е за плачкане, защото можеш да предупредиш, ама все пак ако можеш да го изгладиш, нагласил съм го 50 рестарта да е 1 gr

1. Ако имаш 70 рестарта те свежда до 0-ла рестарта и ти добавя 1 Gr, а трябва да вземе 50 и да ти остави 20, ама ги гълта всичките.
2. Ако имаш 100 рестарта, като цъкнеш "Направи гранд резет" ти дава само 1 гранд резет вместо 2
 
+1MeMoS тествах бачка безусърдно
 
готово

PHP:
<form action="" method="post">
<table align="center"  width="100" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><div align="right" class="normal_text_white">Character</div></td>
<td colspan="4"><div align="left"><input name="character" type="text" class="input"  id="character" size="14" maxlength="10" value="" /></div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="greset" value="Make Grand Reset" class="button" />
</td>
</tr>
</table>
</form>
<?php
if(isset($_POST['greset']))
{
include("config.php");

$needed_res=999;
$max_gr=10;
$gets_credits=5000;

$account_id = htmlspecialchars($_SESSION['user'], ENT_QUOTES);
$account_id = clean_var($account_id);
$character=htmlspecialchars($_POST['character'], ENT_QUOTES);
$error=0;
$query1 = mssql_query("SELECT Resets,GrandRes FROM Character WHERE Name='".$character."' AND AccountID='".$account_id."'");
$resets = mssql_fetch_row($query1);
$isonline = mssql_query("SELECT ConnectStat from MEMB_STAT WHERE memb___id='".$account_id."'");
$isonlinedone = mssql_fetch_row($isonline);
$pcredits = mssql_query("SELECT credits from MEMB_CREDITS WHERE memb___id='".$account_id."'");
$pcreditsdone = mssql_fetch_row($pcredits);
$new_gr=($resets[1]+1);
$new_credits=($pcreditsdone[0]+$gets_credits);
$new_reset=($resets[0] - $needed_res);
if(!isset($_SESSION['user']))
{
	echo("$warning_start You Are Not Logged! $warning_end"); 
	$error=1;
}

if($resets[0] < $needed_res)
{
	$error=1;
	echo("$warning_start $character Need $needed_res Resets To Grand Reset! $warning_end"); 
}
if($new_gr > $max_gr)
{
	$error=1;
	echo("$warning_start $character You Have Reach The Maximum Grand Resets! $warning_end"); 
}

if($isonlinedone[0] == 1)
{
	$error=1;
	echo("$warning_start $character Is Online! $warning_end"); 
}
if($error==0){
	$run=mssql_query("UPDATE Character set GrandRes='".$new_gr."',Resets='".$new_reset."' WHERE Name='".$character."' AND AccountID='".$account_id."'");
	$run2=mssql_query("UPDATE MEMB_CREDITS set credits='".$new_credits."' WHERE memb___id='".$account_id."'");
	echo "You Succesfuly Made Your ".$new_gr." Grand Reset!";
}
}
?>
 
Last edited:
  • Like
Reactions: Holder
Същото е:

1. Ако имаш 110 рестарта гълта всичките 110 и ти дава 1 gr и оставаш с 0-ла рестарта
2. Дава само 2000 кредита вместо 4000 кредита

Тествах и редакцията ти:
Last edited by MeMoS; Today at 03:19. - няма промяна.
 
Last edited:
готово тествах го и бачка
 
  • Like
Reactions: Holder
При мен няма промяна..

Едит: не объркал съм конфига със стария сега ще пробвам, сори ако съм те объркал.
Едит: Работи перфектно, много ти благодаря, от седмици ако не и месеци се мъча да го набарам, благодаря пак.
 
Last edited:
Модула на MeMos е сложен в първия пост.
 
Да ма е за 0.8 Mu Web и не ми работи, той го преработи..