Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 General (https://postpacific.mmorpg-game.online/forumdisplay.php?f=31)
-   -   C4 CacheD, 2012 port commands (https://postpacific.mmorpg-game.online/showthread.php?t=5371)

KciNicK 15.08.2006 17:06

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...

Stinker 15.08.2006 17:47

right

KciNicK 15.08.2006 18:59

// 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...

scott 18.08.2006 07:24

Not work.
Anybody can help?

KciNicK 18.08.2006 15:08

Quote:

Originally Posted by scott (Post 65051)
Not work.
Anybody can help?

it works for me...

testdude 18.08.2006 15:39

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...

scrap512 18.08.2006 17:54

so anyone can run these commands from anywhere .. isn't that a bit unsafe?

testdude 18.08.2006 17:57

thats what firewalls are for

Kenjiro 20.08.2006 12:46

Quote:

Originally Posted by KciNicK (Post 64926)
// 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...

Why is that 1 at the end? Are another commands used like that (with addidional 1)?

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...

testdude 20.08.2006 14:50

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()

Kenjiro 20.08.2006 16:40

Thanks a lot!

Kenjiro 21.08.2006 15:02

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 ;))

AgeNT2005 30.08.2006 15:59

Say if you please id function for Cached for the changes of subjob0_class and deleted all skill
I use translator, sorry.

barabashka 01.09.2006 14:49

Quote:

Originally Posted by AgeNT2005 (Post 66075)
Say if you please id function for Cached for the changes of subjob0_class and deleted all skill
I use translator, sorry.

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.

Haygor 02.09.2006 01:30

Quote:

Originally Posted by Kenjiro (Post 65387)
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 ;))

I have this exact same problem, I know for a fact the items are added to the table, pllus I have restarted cached several times, but still receiving a code 01 (item not in ItemData table). Any other ideas?

scott 02.09.2006 09:51

Not work :(
You have original cached or patched "anti /block" ?

Kenjiro 04.09.2006 06:58

Quote:

Originally Posted by Haygor (Post 66188)
I have this exact same problem, I know for a fact the items are added to the table, pllus I have restarted cached several times, but still receiving a code 01 (item not in ItemData table). Any other ideas?

Try to generate itemcache.txt from your client itemname-e.txt and itemdata (quest/stacking flag) files and directly insert data to Itemdata table (in lin2world db) - remember to stop cached before db operations. Try to load generated itemcache. Then check db and restart cached. Should work.

P.S. Remember to have recent itemdata.txt in Your cachedscript directory.

Haygor 07.09.2006 23:59

Quote:

Originally Posted by Kenjiro (Post 66350)
Try to generate itemcache.txt from your client itemname-e.txt and itemdata (quest/stacking flag) files and directly insert data to Itemdata table (in lin2world db) - remember to stop cached before db operations. Try to load generated itemcache. Then check db and restart cached. Should work.

P.S. Remember to have recent itemdata.txt in Your cachedscript directory.

Well, the funny thing is I generated it off the itemdata on server side (so no descriptions) and inserted via the cached update script command. Might try inserting manually and restarting cached to see if this works. Will post results once I get a chance to do this.

hater 08.09.2006 12:43

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.

RumanticK 08.09.2006 13:33

char must be offline, afaik

hater 08.09.2006 13:56

Quote:

Originally Posted by RumanticK (Post 66794)
char must be offline, afaik

No-no, my char is offline..
This error doesn't connect with chars, imho.. <_<

Kenjiro 09.09.2006 18:11

Quote:

Originally Posted by hater (Post 66788)
I am using the next php script:
Code:

<?
// cut before to shorten message
$buf .= pack("i", 0); //enchant
$buf .= pack("i", 0);
$buf .= pack("i", 0);
$buf .= pack("i", 0);
$buf .= pack("i", 1);

$buf .= tounicode ( "webadmin" ); // remember to add function

    fwrite($fp, pack("s", (strlen($buf)+2)).$buf);
// cut after to shorten message
?>

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.

Try add admin name. Look above in Your corrected example.

Haygor 10.09.2006 07:29

Quote:

Originally Posted by Kenjiro (Post 66350)
Try to generate itemcache.txt from your client itemname-e.txt and itemdata (quest/stacking flag) files and directly insert data to Itemdata table (in lin2world db) - remember to stop cached before db operations. Try to load generated itemcache. Then check db and restart cached. Should work.

P.S. Remember to have recent itemdata.txt in Your cachedscript directory.
Quote:

Originally Posted by Haygor (Post 66759)
Well, the funny thing is I generated it off the itemdata on server side (so no descriptions) and inserted via the cached update script command. Might try inserting manually and restarting cached to see if this works. Will post results once I get a chance to do this.


Still a no go for any item above 7838, any other ideas?

hater 18.09.2006 11:57

how I can add builder to player/acc from CacheD?..

FidoW 22.09.2006 03:24

-- Deleted --


All times are GMT. The time now is 16:43.