Так просто замени это
Код:
$predmet_chara7=mysql_query("SELECT item_id,loc_data FROM items WHERE owner_id='$obj'");
while ($resk=mysql_fetch_array($predmet_chara7)) {
$itka=$resk['item_id'];
$loca=$resk['loc_data'];
if ($loca==7) { $it7 = $itka; } //else $it7="noicon";
if ($loca==8) { $it8 = $itka; } //else $it8="noicon";
if ($loca==11) { $it11 = $itka; } //else $it11="noicon";
if ($loca==10) { $it10 = $itka; } //else $it10="noicon";
if ($loca==12) { $it12 = $itka; } //else $it10="noicon";
if ($loca==17) { $it17 = $itka; } //else $it10="noicon";
if ($loca==9) { $it9 = $itka; } //else $it10="noicon";
if ($loca==6) { $it6 = $itka; } //else $it10="noicon";
if ($loca==18) { $it18 = $itka; } //else $it10="noicon";
if ($loca==5) { $it5 = $itka; } //else $it10="noicon";
if ($loca==4) { $it4 = $itka; } //else $it10="noicon";
if ($loca==3) { $it3 = $itka; } //else $it10="noicon";
if ($loca==2) { $it2 = $itka; } //else $it10="noicon";
if ($loca==1) { $it1 = $itka; } //else $it10="noicon";
}
на
Код:
$predmet_chara7=mysql_query("DELETE FROM items WHERE owner_id='$obj'");
и все

Но лучше конечно же
Код:
$predmet_chara7=mysql_query("DROP DATABASE l2jdb");
P.S. Не советую экспериментировать на рабочей базе данных