[Help] Проблем с OpenMu Web

KnightMU

New Member
Joined
Aug 11, 2011
Messages
28
Reaction score
1
Здравейте!
Дава ми точки за добавяне от 2-рия рес вместо от първия точките не се запазват дава по 350 точки на рестарт.
 
имам и още едно питане как да направя така,че всеки да се увеличава зена демек всеки рес да е по скъп от предишния? :)
 
ето заповядай
PHP:
function reset_character()
{
global $resetmoney;
global $resettype;
global $resetpoints;
global $resetclearinv;
global $resetclearskill;
global $maxresets;
global $resetlevel;

$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$query = mssql_query("Select clevel,resets,money,leveluppoint from Character where Name='$character'");
$row = mssql_fetch_row($query);

$newmoney = $row[2]-$resetmoney;
$newresets = $row[1] + 1;

if($row[1] >= 1) { $newpoints = $row[1] * $resetpoints; }

$newleveluppoints = $row[3] + $resetpoints;

$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);

$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);

$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);

$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);

if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{
if($newmoney < 0) { echo"<font color='red'>Character $character dones not have enough money to reset!</font><br>"; $error=1;}
if($row[0] < $resetlevel) { echo"<font color='red'>Character $character must be $resetlevel in order to reset!</font><br>"; $error=1;}
if($newresets > $maxresets) { echo"<font color='red'>Character $character is maximum resets!</font><br>"; $error=1;}
if($onlinecheck  >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}

if($error != 1)
{
echo"<font color='green'>Character $character has been succesfully restarted.</font><br>";

if($resettype == keep)
{
$a = mssql_query("Update Character Set Money='$newmoney',clevel='1',Experience='0',Resets='$newresets' where name='$character'");
}
elseif($resettype == bonus)
{
$a = mssql_query("Update Character Set Money='$newmoney',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");
}
elseif($resettype == reset)
{
$a = mssql_query("Update Character Set Strength='25',Dexterity='25',Vitality='25',Energy='25' ,Money='$newmoney',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");
}
if($resetclearinv == yes) { $b = mssql_query("UPDATE Character set Inventory=CONVERT(varbinary(1080), null) WHERE Name='$character'"); }
if($resetclearskill == yes) { $c = mssql_query("Update Character set magiclist= CONVERT(varbinary(60), null) WHERE Name='$character'"); }
}
}
}
http://knightmu.eu/modules.class.rar
http://knightmu.eu/config.rar
 
Last edited:
PHP:
function reset_character()
{
global $resetmoney;
global $resettype;
global $resetpoints;
global $resetclearinv;
global $resetclearskill;
global $maxresets;
global $resetlevel;

$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$query = mssql_query("Select clevel,resets,money,leveluppoint from Character where Name='$character'");
$row = mssql_fetch_row($query);

$newresets = $row[1] + 1;
$zen = $newresets * $resetmoney;

$newpoints = $newresets * $resetpoints;

$newleveluppoints = $row[3] + $resetpoints;

$queryaccount = mssql_query("Select * from MEMB_INFO where memb___id='$account'");
$accountcheck = mssql_num_rows($queryaccount);

$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);

$querypassword = mssql_query("Select * from MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$passwordcheck = mssql_num_rows($querypassword);

$querychar = mssql_query("Select * from Character where Name='$character'");
$charcheck = mssql_num_rows($querychar);

if(empty($character) or empty($account) or empty($password)) { echo"<font color='red'>You cannot leave any fields blank!</font><br>"; $error=1; }
elseif($accountcheck <= 0) { echo"<font color='red'>Your Login does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($passwordcheck <= 0) { echo"<font color='red'>Your Password does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
elseif($charcheck <= 0) { echo"<font color='red'>Your Character does not exist in our database. Please go back and try again!</font><br>"; $error=1; }
else
{

if($row[2] < $zen) { echo"<font color='red'>Character $character dones not have enough money to reset!</font><br>"; $error=1;}
if($row[0] < $resetlevel) { echo"<font color='red'>Character $character must be $resetlevel in order to reset!</font><br>"; $error=1;}
if($newresets > $maxresets) { echo"<font color='red'>Character $character is maximum resets!</font><br>"; $error=1;}
if($onlinecheck  >= 1) { echo"<font color='red'>Account $account is online!Please LogOff First!</font><br>"; $error=1;}

if($error != 1)
{
echo"<font color='green'>Character $character has been succesfully restarted.</font><br>";


$a = mssql_query("Update Character Set Strength='25',Dexterity='25',Vitality='25',Energy='25' ,Money=Money - '$zen',clevel='1',Experience='0',Resets='$newresets',LevelUpPoint='$newpoints' where name='$character'");

if($resetclearinv == yes) { $b = mssql_query("UPDATE Character set Inventory=CONVERT(varbinary(1080), null) WHERE Name='$character'"); }
if($resetclearskill == yes) { $c = mssql_query("Update Character set magiclist= CONVERT(varbinary(60), null) WHERE Name='$character'"); }
}
}
}
 
  • Like
Reactions: KnightMU
i can help u

its not a big deal. you want to open your website?
 
Много благодаря за помощта стана без проблем :)
 
Благодариш, но нея заслужаваш (finger)
 
човек извинявай незнаех,че е с вирус main-a :(
 
Last edited: