Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 General
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08.09.2006, 12:43   #11
hater
Архивный участник
 
Join Date: Aug 2006
Posts: 28
Default

I am using the next php script:
Code:
<?
$char_id = 8;

printf("giving adena to ", $char_id, additem($char_id) == "x1" ? "ok" : "error");


function additem($p0) {
    $fp = fsockopen("127.0.0.1", "2012", $errno, $errstr, 5); $rs = "x";
    if (!$fp) die("Error connecting to cached: $errstr");

$buf = pack("c", 55); // 55 = AddItem2Packet();
$buf .= pack("i", $p0); //char_id
$buf .= pack("i", 0); 
$buf .= pack("i", 57); //item_type
$buf .= pack("i", 1000); //item_amount
$buf .= pack("i", 0); //enchant 
$buf .= pack("i", 0); 
$buf .= pack("i", 0); 
$buf .= pack("i", 0); 
$buf .= pack("i", 1);

    fwrite($fp, pack("s", (strlen($buf)+2)).$buf);
    $len = unpack("v", fread($fp, 2)); $rid = unpack("c", fread($fp, 1));
    for ($i = 0; $i < (($len[1]-4) / 4); $i++) { $read = unpack("i", fread($fp, 4)); $rs .= $read[1]; }
    fclose($fp); return($rs);
}
?>
But it doesn't work =(

CacheD:
admin server create socket[127.0.0.1]
[.\adminsocket.cpp][3454] No Admin Id
admin server closed(127.0.0.1) error: 997


Please, help me.
hater is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 21:56.