30.10.2006, 04:42
|
#70
|
|
Архивный участник
Join Date: Mar 2006
Posts: 22
|
Quote:
Originally Posted by Kenster
For anyone reading this thread, AddItem2 doesn't work, so don't waste your time.
|
Why? Works good for me.
Quote:
function add_item_to_char($id,$item_type,$amount,$enchant,$ char_name){
kick_char($id);
$buf = pack("c", 55); // 55 = AddItem2Packet();
$buf .= pack("i", $id); //char_id
$buf .= pack("i", 0);
$buf .= pack("i", $item_type); //item_type
$buf .= pack("i", $amount); //item_amount
$buf .= pack("i", $enchant); //enchant
$buf .= pack("i", 0);
$buf .= pack("i", 0);
$buf .= pack("i", 0);
$buf .= pack("i", 1);
$buf .= tounicode ( "GM" );
$answ=cached_new($buf);
if($answ==="x1")return "<font class=log_number>$char_name</font> successfully got an item.";
else return "<font color=red>Error:</font><font class=log_text></font> giving item to <font class=log_number>$char_name</font>.";
}
|
|
|
|