[Help] Как да добавя keep stats & items

EviL_Freak

New Member
Joined
Jul 22, 2008
Messages
95
Reaction score
6
Ползвам уеба като на xtyling сървъра.. как мога да добавя опция Keep Stats & items?
$_IfC6I = "1"; // Money for RESET
$_IfiQL = "350"; // Level Reset
$_Ifiof = "150"; // Max Reset
$_IfLIL = "500"; // Reset Points
Това е кода ,който го иам за рестарт..
 
От файла resetok.php :
<?php include"home.php"; ?>
</style></head><body leftmargin="0" topmargin="0">
<table align="center" border="1" bordercolor="#666666" cellpadding="0" cellspacing="0" frame="vsides" rules="none" width="760">
<tbody><tr>
<td align="left" background="images/left_bg.gif" valign="top" width="204"><img src="images/left_top_news.gif" height="36" width="204">
<?php include"pictures.php"; ?>
<?php include"menu.php"; ?></td>
<td background="images/xu.gif" height="190" width="1"></td>
<td align="center" bgcolor="#ffffff" valign="top" width="553">
<table width="540" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
<td colspan="3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="24">&nbsp;</td>
<td colspan="3"><div align="center"><span class="style6">Reset Character</span></div></td>
<td width="28">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="28">&nbsp;</td>
<td width="10">&nbsp;</td>
<td width="79">&nbsp;</td>
<td width="399"><?php

require("config.php");
include_once('sql_check.php');
_OQE01();





$_I6otf=mssql_connect("$_I6ooJ","$_I6Cto","$_I6i8Q");
$_I6iiJ=mssql_select_db("MuOnline",$_I6otf);

$_IfQ8O = stripslashes($_POST['character_name']);
$_I6L6J = stripslashes($_POST['login_name']);
$_IfI86 = stripslashes($_POST['password']);

if (
(eregi("[^a-zA-Z0-9_-]", $_IfQ8O)) ||
(eregi("[^a-zA-Z0-9_-]", $_I6L6J)) ||
(eregi("[^a-zA-Z0-9_-]", $_IfI86)) )
{
echo("Please use the following characters: A-Z 0-9");
exit();
}


$_IfQ8O = str_replace("'","","$_IfQ8O");
$_IfQ8O = str_replace(" ","","$_IfQ8O");

$_I6L6J = str_replace("'","","$_I6L6J");
$_I6L6J = str_replace(" ","","$_I6L6J");

$_IfI86 = str_replace("'","","$_IfI86");
$_IfI86 = str_replace(" ","","$_IfI86");


$_I6LiQ = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$_I6L6J'");
$_I6lI8 = mssql_num_rows($_I6LiQ);

$_IfjJt = mssql_query("SELECT Name FROM Character WHERE Name='$_IfQ8O' and AccountID = '$_I6L6J'");
$_Ifj6C = mssql_num_rows($_IfjJt);

$_If0IQ = mssql_query("SELECT memb__pwd FROM MEMB_INFO WHERE memb__pwd='$_IfI86' and memb___id='$_I6L6J'");
$_If0Lf = mssql_num_rows($_If0IQ);

$_IftOJ = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='$_I6L6J'");
$_IftCJ = mssql_fetch_row($_IftOJ);

$_I6J8j = mssql_query("Select Clevel,Resets,Money,LevelUpPoint,Class,ctlcode From Character where Name='$_IfQ8O'");
$_I66L1 = mssql_fetch_row($_I6J8j);

$_IojJQ=$_I66L1[1] + (1);
$_IoJ0t=$_I66L1[2]-$_IfC6I;

$_IoJQl=$_IfC6I;


$_IoJ8t=$_I66L1[1] + 1;

$_IoJLo=$_I66L1[1] * $_IfLIL + $_IfLIL;

if (empty($_IfQ8O) || empty($_I6L6J) || empty($_IfI86)){
echo " You dont have characters";}

elseif ($_I6lI8 <= 0){
echo "Your account doesn't exist. Please go back and try again.";}

elseif ($_Ifj6C <= 0){
echo "Your character doesn't exist in your account. Please go back and try again."; }

elseif ($_If0Lf <= 0){
echo "The password you entered is incorrect."; }

elseif ($_I66L1[1] > $_Ifiof-1){
echo "<font color=red><b>You are MAX resets possible, GG!</b>"; }

elseif ($_IftCJ[0] != 0){
echo "Please logoff before reset!"; }


elseif ($_I66L1[5]==8){
echo "<font color=red><b>Warning! GM cant reset! Good try! XTYLING will bann you :p</b></font>"; }




elseif ($_I66L1[0] < $_IfiQL){
echo " You need <font color=red>$_IfiQL</font> lvl to reset, your level is <font color=green>$_I66L1[0]</font>"; }



elseif ($_IoJ0t < 0){
echo " You need <font color=red>$_IoJQl</font> zen to reset!"; }






else {

if ($_I66L1[0]>0){
$_If1j0 = "
UPDATE dbo.Character
SET clevel=1
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET Resets = '$_IojJQ'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET experience = '0'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET money = '$_IoJ0t'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET LevelUpPoint = '$_IoJLo'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET MapNumber = '0'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET MapPosX= '125'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'
UPDATE dbo.Character SET MapPosY= '125'
WHERE Name = '$_IfQ8O'
UPDATE dbo.Character SET LevelUpPoint = '$_IoJLo'
WHERE Name = '$_IfQ8O'
AND AccountID = '$_I6L6J'";}


$_Io680 = mssql_query($_If1j0);

echo "$_IfQ8O have done $_IoJ8t reset successfully.";
}
?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="28">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="28">&nbsp;</td>
<td colspan="3"><p><p></td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</tbody></table>
</body></html>

Тествай и кажи дали работи !

Дай 1 Thanks-че :p
 
  • Like
Reactions: EviL_Freak
не стана, други идеи ?

извинявай - малка трешка ! ;):

заповядай :

<?php include"home.php"; ?>
</style></head><body leftmargin="0" topmargin="0">
<table align="center" border="1" bordercolor="#666666" cellpadding="0" cellspacing="0" frame="vsides" rules="none" width="760">
<tbody><tr>
<td align="left" background="images/left_bg.gif" valign="top" width="204"><img src="images/left_top_news.gif" height="36" width="204">
<?php include"pictures.php"; ?>
<?php include"menu.php"; ?></td>
<td background="images/xu.gif" height="190" width="1"></td>
<td align="center" bgcolor="#ffffff" valign="top" width="553">
<table width="540" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
<td colspan="3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="24">&nbsp;</td>
<td colspan="3"><div align="center"><span class="style6">reset character</span></div></td>
<td width="28">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="28">&nbsp;</td>
<td width="10">&nbsp;</td>
<td width="79">&nbsp;</td>
<td width="399"><?php

require("config.php");
include_once('sql_check.php');
_oqe01();





$_i6otf=mssql_connect("$_i6ooj","$_i6cto","$_i6i8q");
$_i6iij=mssql_select_db("muonline",$_i6otf);

$_ifq8o = stripslashes($_post['character_name']);
$_i6l6j = stripslashes($_post['login_name']);
$_ifi86 = stripslashes($_post['password']);

if (
(eregi("[^a-za-z0-9_-]", $_ifq8o)) ||
(eregi("[^a-za-z0-9_-]", $_i6l6j)) ||
(eregi("[^a-za-z0-9_-]", $_ifi86)) )
{
echo("please use the following characters: A-z 0-9");
exit();
}


$_ifq8o = str_replace("'","","$_ifq8o");
$_ifq8o = str_replace(" ","","$_ifq8o");

$_i6l6j = str_replace("'","","$_i6l6j");
$_i6l6j = str_replace(" ","","$_i6l6j");

$_ifi86 = str_replace("'","","$_ifi86");
$_ifi86 = str_replace(" ","","$_ifi86");


$_i6liq = mssql_query("select memb___id from memb_info where memb___id='$_i6l6j'");
$_i6li8 = mssql_num_rows($_i6liq);

$_ifjjt = mssql_query("select name from character where name='$_ifq8o' and accountid = '$_i6l6j'");
$_ifj6c = mssql_num_rows($_ifjjt);

$_if0iq = mssql_query("select memb__pwd from memb_info where memb__pwd='$_ifi86' and memb___id='$_i6l6j'");
$_if0lf = mssql_num_rows($_if0iq);

$_iftoj = mssql_query("select connectstat from memb_stat where memb___id='$_i6l6j'");
$_iftcj = mssql_fetch_row($_iftoj);

$_i6j8j = mssql_query("select clevel,resets,money,leveluppoint,class,ctlcode from character where name='$_ifq8o'");
$_i66l1 = mssql_fetch_row($_i6j8j);

$_iojjq=$_i66l1[1] + (1);
$_ioj0t=$_i66l1[2]-$_ifc6i;

$_iojql=$_ifc6i;


$_ioj8t=$_i66l1[1] + 1;

$_iojlo=$_i66l1[1] * $_iflil + $_iflil;

if (empty($_ifq8o) || empty($_i6l6j) || empty($_ifi86)){
echo " you dont have characters";}

elseif ($_i6li8 <= 0){
echo "your account doesn't exist. Please go back and try again.";}

elseif ($_ifj6c <= 0){
echo "your character doesn't exist in your account. Please go back and try again."; }

elseif ($_if0lf <= 0){
echo "the password you entered is incorrect."; }

elseif ($_i66l1[1] > $_ifiof-1){
echo "<font color=red><b>you are max resets possible, gg!</b>"; }

elseif ($_iftcj[0] != 0){
echo "please logoff before reset!"; }


elseif ($_i66l1[5]==8){
echo "<font color=red><b>warning! Gm cant reset! Good try! Xtyling will bann you :p</b></font>"; }




elseif ($_i66l1[0] < $_ifiql){
echo " you need <font color=red>$_ifiql</font> lvl to reset, your level is <font color=green>$_i66l1[0]</font>"; }



elseif ($_ioj0t < 0){
echo " you need <font color=red>$_iojql</font> zen to reset!"; }






else {

if ($_i66l1[0]>0){
$_if1j0 = "
update dbo.character
set clevel=1
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set resets = '$_iojjq'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set experience = '0'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set money = '$_ioj0t'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set leveluppoint = '$_iojlo'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set mapnumber = '0'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set mapposx= '125'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set mapposy= '125'
where name = '$_ifq8o'
and accountid = '$_i6l6j'
update dbo.character set leveluppoint = '$_iojlo'
where name = '$_ifq8o'
and accountid = '$_i6l6j'";}


$_io680 = mssql_query($_if1j0);

echo "$_ifq8o have done $_ioj8t reset successfully.";
}
?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="28">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="28">&nbsp;</td>
<td colspan="3"><p><p></td>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</tbody></table>
</body></html>
 
Last edited:
  • Like
Reactions: nick_1896
може ли да постнете тука скрипта който работи без да маха items?
 
може ли да постнете тука скрипта който работи без да маха items?

да ще го постна след малко чакай ,че има малък проблем..
 
Заповядай ... :)
 

Attachments

  • resetok.rar
    1.6 KB · Views: 4
  • Like
Reactions: IAmSnake