![]() |
|
|
|
|
#1 |
|
Архивный участник
Join Date: May 2006
Posts: 43
|
nucer you can use AddItem2Packet?
help please |
|
|
|
|
#2 |
|
Архивный участник
Join Date: May 2006
Posts: 43
|
thx all
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Oct 2005
Posts: 8
|
the last S is the name of the admin that do the request, intended for use with l2admin, is the name of the admin logued on that panel... is not needed...
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: May 2006
Posts: 43
|
right
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Oct 2005
Posts: 8
|
// EDIT //
AddItem2(char_id, ware=1 or char=0, item_id, amount, enchants, eroded, bless, ident, wished, 1); u need a "1" at the end... |
|
|
|
|
#6 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Quote:
P.S. If You could explain me why i have error in system logs: 08/20/2006 14:47:xx.xx4, admin server closed(127.0.0.1) error: 997 when command has been executed correctly ? P.P.S. Sometimes i have: 08/20/2006 14:38:xx.xx5, admin server closed(127.0.0.1) error: 258 Weird... very weird... |
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Nov 2005
Posts: 504
|
the 1 at the end is the "admin id", also i would like to point out, that error when the socket closes is not an error to do with the function itself, it is just the response from WSAGetLastError()
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: May 2005
Posts: 33
|
Not work.
Anybody can help? |
|
|
|
|
#9 |
|
Архивный участник
Join Date: Oct 2005
Posts: 8
|
|
|
|
|
|
#10 |
|
Архивный участник
Join Date: Mar 2006
Posts: 160
|
$buf .= tounicode("Web1"); //who
Please explain what is TOUNICODE function? Your own? If it is your own please share this code! Also if anyone can help with PHP coding of commands CacheD... we neeeed it =) |
|
|
|
|
#11 |
|
Архивный участник
Join Date: Nov 2005
Posts: 504
|
for AddItem the admin id IS needed, it errors otherwise, though for me it refused to work so i hexed the cached to work without admin id xD
$pack=pack("cVVVVVVVVVVV",55,$charid,0,$itemid,$am ount,$enchant,0,0,0,0,0,0); $out=pack("s",strlen($pack)+2); $out.=$pack; ^ thats what i did for additem, and before anyone points out that im using V instead of "i", its because "i" is machine dependant, V is 32bit, and i run this on a 64bit server... |
|
|
|
|
#12 |
|
Архивный участник
Join Date: Jul 2006
Posts: 77
|
so anyone can run these commands from anywhere .. isn't that a bit unsafe?
|
|
|
|
|
#13 |
|
Архивный участник
Join Date: Nov 2005
Posts: 504
|
thats what firewalls are for
|
|
|
|
|
#14 |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Thanks a lot!
|
|
|
|
|
#15 |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
I have another problem, highest item_type (item id from itemdata) which can be added to database is 7838, everything above it results -> "01". Item is added to database (via 'load items' cached option), but... can not add...
What is weird, that i can add items which are not in database (not in itemcache.txt & loaded), but with item_type <= 7838. I'm stupid, You know... full cached restart (quit & run) has solved problem... (to be remembered: before asking, try to restart )
|
|
|
|
|
#16 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 36
|
Quote:
|
|
|
|
|
|
#17 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Quote:
P.S. Remember to have recent itemdata.txt in Your cachedscript directory. |
|
|
|
|
|
#18 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 36
|
Quote:
|
|
|
|
|
|
#19 | ||
|
Архивный участник
Join Date: Apr 2006
Posts: 36
|
Quote:
|
||
|
|
|
|
#20 |
|
Архивный участник
Join Date: Aug 2005
Posts: 10
|
Say if you please id function for Cached for the changes of subjob0_class and deleted all skill
I use translator, sorry. |
|
|
|
|
#21 |
|
Архивный участник
Join Date: Jan 2006
Posts: 55
|
So, I think you need to know structure of special Cashed Function for changing player profession. Couse, in lin2world>userdata there two rows class and sub_job0. And this two parameters are coordinating player profession. But cashed scripts for changing player's classes are working not correctly. If someone know or understand this problem - plz PM me. Together, we can solve this problem.
|
|
|
|
|
#22 |
|
Архивный участник
Join Date: May 2005
Posts: 33
|
Not work
You have original cached or patched "anti /block" ? |
|
|
|
|
#23 |
|
Архивный участник
Join Date: Aug 2006
Posts: 28
|
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);
}
?>
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. |
|
|
|
|
#24 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Quote:
|
|
|
|
|
|
#25 |
|
Архивный участник
Join Date: Feb 2006
Posts: 66
|
char must be offline, afaik
|
|
|
|
|