[COLOR=#ff0000]mssql_query("Delete From AccountCharacter Where GameID1='$char'");
mssql_query("Delete From AccountCharacter Where GameID2='$char'");
mssql_query("Delete From AccountCharacter Where GameID3='$char'");
mssql_query("Delete From AccountCharacter Where GameID4='$char'");
mssql_query("Delete From AccountCharacter Where GameID5='$char'");
[/COLOR]mssql_query("Delete From Character Where Name='$char'");
[COLOR=#ff0000]mssql_query("Delete From AccountCharacter Where GameID1='$char' WHERE Id='$_SESSION[user]'");
mssql_query("Delete From AccountCharacter Where GameID2='$char' WHERE Id='$_SESSION[user]");
mssql_query("Delete From AccountCharacter Where GameID3='$char' WHERE Id='$_SESSION[user]");
mssql_query("Delete From AccountCharacter Where GameID4='$char' WHERE Id='$_SESSION[user]");
mssql_query("Delete From AccountCharacter Where GameID5='$char' WHERE Id='$_SESSION[user]");
[/COLOR]mssql_query("Delete From Character Where Name='$char'");
mssql_query("SELECT * FROM AccountCharacter as cnt Where GameID1='$char' OR GameID2='$char' OR GameID3='$char' OR GameID4='$char' OR GameID5='$char'");
mssql_query("UPDATE AccountCharacter SET cnt=0 Where cnt='$char'");
mssql_query("Delete From Character Where Name='$char'");
Научи PHP и като си гений го направи ТИ! От кога стана толкова "велик" ?!?
Всеки герой има warehouse! Акаунта служи само за secure!!! Поне при мойте файлове е така!
Който не го кефи да не го ползва!!
ПС: За вторият модул... почти е готов ама са празници и малко ще закаснея (само ядене и пиене) (hug)
mov3r оправи ей това:
Code:[COLOR=#ff0000]mssql_query("Delete From AccountCharacter Where GameID1='$char'"); mssql_query("Delete From AccountCharacter Where GameID2='$char'"); mssql_query("Delete From AccountCharacter Where GameID3='$char'"); mssql_query("Delete From AccountCharacter Where GameID4='$char'"); mssql_query("Delete From AccountCharacter Where GameID5='$char'"); [/COLOR]mssql_query("Delete From Character Where Name='$char'");
със
Code:[COLOR=#ff0000]mssql_query("Delete From AccountCharacter Where GameID1='$char' WHERE Id='$_SESSION[user]'"); mssql_query("Delete From AccountCharacter Where GameID2='$char' WHERE Id='$_SESSION[user]"); mssql_query("Delete From AccountCharacter Where GameID3='$char' WHERE Id='$_SESSION[user]"); mssql_query("Delete From AccountCharacter Where GameID4='$char' WHERE Id='$_SESSION[user]"); mssql_query("Delete From AccountCharacter Where GameID5='$char' WHERE Id='$_SESSION[user]"); [/COLOR]mssql_query("Delete From Character Where Name='$char'");
mssql_query("Delete From AccountCharacter Where GameID1='$char' and Id='$_SESSION[user]' or GameID2='$char' and Id='$_SESSION[user]' or GameID3='$char' and Id='$_SESSION[user]' or GameID4='$char' and Id='$_SESSION[user]' or GameID5='$char and Id='$_SESSION[user]'");
<form name='' action='' method='post'>
<table align='center' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'>Account:</td>
<td align='center'><input type='text' maxlength='12' value='<?php echo($_SESSION[user])?>' readonly></td>
</tr>
<tr>
<td align='center'>Warehouse Password:</td>
<td align='center'><input type='password' maxlength='12' name='password'></td>
</tr>
<tr>
<td align='center'>Repeat Password:</td>
<td align='center'><input type='password' maxlength='12' name='repassword'></td>
</tr>
</table>
<table align='center'>
<tr>
<td align='center'><input type='submit' name='set' value='Set Password'></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['set']))
{
$password = $_POST['password'];
$repassword = $_POST['repassword'];
$user = $_SESSION['user'];
$paswordlength = strlen($password);
$repasswordlength = strlen($repassword);
$vaultcheck = mssql_query("Select * from warehouse where AccountID='$user'");
$vault = mssql_num_rows($vaultcheck);
$passwordcheck = mssql_query("Select * from warehouse where AccountID='$user' and pw='0'");
$passwordchecked = mssql_num_rows($passwordcheck);
if($vault == 0) { echo"User has no vault"; $error=1; }
if($passwordchecked == 0) { echo"Warehouse has already got an password"; $error=1; }
if(empty($password) or empty($repassword)) { echo"Some fields are empty!"; $error=1;}
if($paswordlength < 4 or $repasswordlength < 4) { echo"Password must be at least 4 symbols"; $error=1;}
if($password != $repassword) { echo"Passwords didn't match!"; $error=1;}
if($error != 1) {
$vault = mssql_query("Update warehouse set pw='$password' where AccountID='$user'");
echo"<center><font color=GREEN>Password is set!</font></center>";
}
}
?>
Да, за darksweb 0.1 става въпрос, а модула за сандъка ми го направиха вече и с малко преработка от моя милост си стана перфе. Иначе мерси.
[B]Warning[/B]: mssql_query() [function.mssql-query]: message: Disallowed implicit conversion from data type varchar to data type varbinary, table 'MuOnline.dbo.warehouse', column 'Items'. Use the CONVERT function to run this query. (severity 16) in [B]./index.php[/B] on line [B]95[/B]
[COLOR=#008000]1111111100000000000000000000000000000000100000001000100000000000[/COLOR]
това за вторият модул помоли някой друг, защото аз забивам винаги тук...
Sorry, i can't help for now...Code:[B]Warning[/B]: mssql_query() [[URL="http://192.168.0.3/new/function.mssql-query"]function.mssql-query[/URL]]: message: Disallowed implicit conversion from data type varchar to data type varbinary, table 'MuOnline.dbo.warehouse', column 'Items'. Use the CONVERT function to run this query. (severity 16) in [B]./index.php[/B] on line [B]95[/B]
update warehouse set items=0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ето binary за Jewel of Chaos....:
Code:[COLOR=#008000]1111111100000000000000000000000000000000100000001000100000000000[/COLOR]
0F0000........0000C0000000000000
<table align="center" width="270" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="270">
<div align="center"><fieldset style="border: 1px dotted #808080">
<legend><b><font color="#FF0000"> Размени камъни за предмети</font></b><font color="#FF0000">
<font face="Times New Roman">»</font></font></legend>
<table align="center" width="270" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="270"><br>
<div align="center">
<form action="" method="post" name="stone_for_zen" id="stone_for_zen">
<table width="148" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="142">
<div align="right" class="normal_text_white">Герой:
</div></td>
<td width="104">
<?
$account_id = stripslashes($_SESSION['user']);
$account_id = clean_var($account_id);
print"<select name='name' id='name'>";
$query = mssql_query("select Name,Leveluppoint from Character where AccountID='$_SESSION[user]' ");
while($result = mssql_fetch_array($query)) {
echo "<option value='$result[Name]'>$result[Name]</option>";
}
print'</select>';
?></td>
</tr>
<tr>
<td>
<div align="right" class="normal_text_white">Размени:
</div></td>
<td>
<select name='itemid'>
<option value='' SELECTED DISABLED>Please, select item</option>
<option value='8F00FF00000000806232'>Jewel of Chaos</option>
<option value='CD00FF00000000806810'>Jewel of Bless</option>
<option value='CE00FF00000000809370'>Jewel of Soul</option>
</select>
</td>
</tr>
</table>
<table width="200" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="118">
<div align="right"><br>
<input type="hidden" name="stone_for_items" value="stone_for_items">
<input type="submit" name="Submit" value="Размени" class="button">
</div></td>
</tr>
</table>
</form></div></td>
</tr>
</table></fieldset> </div></td>
</tr>
</table>
<table align="center" width="393" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="394"> </td>
</tr>
<tr>
<td><div align="center">
<?php
if (isset($_POST["stone_for_items"]))
{
$login= stripslashes($_SESSION['user']);
$name = stripslashes($_POST['name']);
$needed = "20";
$item = $_POST[itemid];
$itemid = $_POST[itemid];
$stones = mssql_fetch_row(mssql_query("SELECT StoneCount FROM T_BLOOD_CASTLE WHERE AccountID = '$login'"));
$s_row = mssql_fetch_row($stones);
$online_check = mssql_fetch_row(mssql_query("SELECT ConnectStat FROM MEMB_STAT where memb___id='$login'"));
if($item == "8F00FF00000000806232"){ $item = "Jewel of Chaos";}
elseif($item == "CD00FF00000000806810") { $item = "Jewel of Bless";}
elseif($item == "CE00FF00000000809370") { $item = "Jewel of Soul";}
else{
$item = $item;
}
if($online_check[0] >0) {
$error = 1;
echo "$warning_start Моля излезте от играта. $warning_end";
}
elseif($s_row[0] < $needed)
{
$error = 1;
print "<center><font color=RED>Нямаш достатъчно камъни!</font></center>";
}
elseif($itemid == "")
{
$error = 1;
print "<center><font color=RED>Select item first!</font></center>";
}
if($error == 0)
{
$update_vault = mssql_query("Update warehouse SET items=0x$itemid WHERE accountid='$login'");
print "<center><font color=GREEN>Успешно добави <font color=GOLD>$item</font> в куфара на $name</font></center>";
}
}
?>
</div></td>
</tr>
</table>
Тоест все още не е довършен? Ако не е hex може и да успея да направя нещо ще опитам.
Постоянно ми казва, че нямам достатъчно камани, а аз имам 200.. Така докато преглеждах кода никаде не виждам променливата $needed да влиза в действие по заявките което ме навежда на мисълта, че не е дефинирано колко стонета да иска.
А това за изтриването на целия сандък сигурно е от заявката UPDATE... Вместо да добави към останалите итеми jewel-а, тя замества всичко с него.
П.С. По-хубаво щеше да е ако вместо jewel-и дава box-ове.