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)

AHTUKULLEP 30.10.2006 13:24

Deleted ^)

Kenster 30.10.2006 20:16

Half of the funcions you say you use you dont even put up here. Thats why it doesn't work I guess. l2_cached_push ect. Please include these funcions.

Code:


function additem($p0) {
    $fp = fsockopen("XXXXX", "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", 1); //item_type
$buf .= pack("i", 1); //item_amount
$buf .= pack("i", 0); //enchant
$buf .= pack("i", 0);
$buf .= pack("i", 0);
$buf .= pack("i", 0);
$buf .= pack("i", 1);
$buf .= tounicode("web1"); // remember to add function
            fwrite($fp, pack("s", (strlen($buf)+2)).$buf);
            $len = unpack("i", 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);
}

This doesnt work.

Namenlos 30.10.2006 20:50

Who can decode what means "ddddS" or ect? I mean NOT integer(4 bytes) or unicode format.
I mean:
Packet 39 - character ban ("ddS") - ddS its CHAR_ID, HOUR_BAN and NAME. What about other packets?

zekillers 30.10.2006 21:08

I also have additem2 working.

djvogans 30.10.2006 21:14

http://img58.imageshack.us/img58/859/afn8.th.jpghttp://img53.imageshack.us/img53/7979/bmi3.th.jpg


credits to russia :)

Majesty 31.10.2006 05:17

Quote:

Originally Posted by djvogans (Post 71058)

I'm also started rewriting this :) My posts - functions for l2z.

Kenjiro 31.10.2006 10:30

Quote:

Originally Posted by Kenster (Post 71049)
Half of the funcions you say you use you dont even put up here. Thats why it doesn't work I guess. l2_cached_push ect. Please include these funcions.

Code:

...cut code...
This doesnt work.

Code:

$cached_ip = "127.0.0.1";
$cached_port = 2012;

function ansi2unicode ( $ansi_str ) {
  $unicode_str = "";
  for ( $i = 0; $i < strlen ( $ansi_str ); $i++ )
    $unicode_str .= $ansi_str [ $i ] . chr ( 0 );
  return ( $unicode_str . chr ( 0 ) . chr ( 0 ) );
}

function l2_cached_push ( $cached_packet ) {
  // print ( "Unicode: " . wordwrap ( bin2hex ( $cached_packet ), 80, "<br />", 1 ) . "<br />" );
  $cached_fptr = @fsockopen ( $GLOBALS [ "cached_ip" ], $GLOBALS [ "cached_port" ], $errno, $errstr, 5 ) or die ( "Error connecting to cached: $errstr [server down??]\n" );
  fwrite ( $cached_fptr,  $cached_packet );
  $array_ret_length = unpack ( "v", fread ( $cached_fptr, 2 ) );
  $ret_id = unpack ( "c", fread ( $cached_fptr, 1 ) );
  $ret_string = "";
  for ( $i = 0; $i < ( ( $array_ret_length [ 1 ] - 4 ) / 4 ); $i++ ) {
    $array_read = unpack ( "i", fread ( $cached_fptr, 4 ) );
    $ret_string .= $array_read [ 1 ];
  }
  fclose ( $cached_fptr );
  return ( $ret_string );
}

It works.

P.S. L2Z... looks nice... o.O

luisfn 31.10.2006 20:07

And for a Permanent BAN? Only a very large value for "$hour" or a specific value?

Thanks

Nevyn 01.11.2006 00:02

m00
 
Quote:

Originally Posted by Kenster (Post 71052)
Yeah and I have full C5 with a gold bar and unlimited hershy kisses. anyone can make up bull shit without any proof.

Kenster, You can try http://deo-lan.se/cachedscript.rar if you did not succeed with your code yet.
In general it contains a php script allthough its adepted to be executed from a php shellscript.

You can check the php script if you expect malware, aswell as get your own php.exe and php.ini and php5s.dll if you dont trust them.

In general you only need to press the exec.bat

And it will ask you what charid you want to target (I guess you know how to look up charids ;P)
After that it will ask what itemid (Try 600 since thats avadon boots)
After that it will ask for amount.

If it returns a 1x. It should "most" likly have worked.

Hopefully it will work for ya :P

lordchaos 01.11.2006 14:20

Quote:

Originally Posted by Nevyn (Post 71179)
Kenster, You can try http://deo-lan.se/cachedscript.rar if you did not succeed with your code yet.
In general it contains a php script allthough its adepted to be executed from a php shellscript.

You can check the php script if you expect malware, aswell as get your own php.exe and php.ini and php5s.dll if you dont trust them.

In general you only need to press the exec.bat

And it will ask you what charid you want to target (I guess you know how to look up charids ;P)
After that it will ask what itemid (Try 600 since thats avadon boots)
After that it will ask for amount.

If it returns a 1x. It should "most" likly have worked.

Hopefully it will work for ya :P

Looks familiar to me ;)

Nevyn 02.11.2006 10:10

Quote:

Originally Posted by lordchaos (Post 71229)
Looks familiar to me ;)

How strange :P

Ollisso 03.11.2006 09:19

Can anybody help me in this situation:

I want to give SubJob's to players.
like he had subjob's 10 15 -1 -1 (just example)
and after that he will get:
20 15 -1 -1 (also, only example)

If I use: ChangeSubJobPacket it only changes current profession. (like from subjob #1 to #2 )
If I modify subjobs via database - cache does not reload data from db next time players login. (only if I restart server).

Any idea how to chage it ? :)

May be there is some sort of "delete character from cache" packet ?

hel 03.11.2006 09:22

Share ChangeSubJobPacket structure...

barabashka 03.11.2006 12:34

Hel, i give it to you yesterday. Take it again: #89 ChangeSubJob("ddS; ID char; Subjob ID ;") , where Subjob ID from 0 to 3

Also some other functions:

#15 ModCharPacket("dddddddS; ID char; Set SP; Set EXP; Set Karma; Set PK; Set PK pardon; Set Duel; ;")

#16 ModCharPacket2("dddddddS;ID char;gender;rase;class;face;hair_shape;hair_color; ;")

#29 ModCharPacket3("dddddddS; ID char ; Add SP; Add Exp; Add Karma; Add PK; Add PK pardon; Add duel; ;")

2hel: вчера был занят сильно, неуспел записать все пакеты в таком формате. постучи мне в асю завтра.

barabashka 03.11.2006 12:39

For add subjob to player need to use #96 AddSubjobsPacket("dSd"; ID char; String; id"), but for this moment i don't know what means String and last parameter.

hel 03.11.2006 13:02

Thanks. :)

Ollisso 05.11.2006 18:50

hel
My structure is same as of barabashka:
#89 ChangeSubJob($char_id,$sub_job_id)
but it only changes active subjob :(

barabashka
Have you found anything about AddSubjobsPacket ?

PS: Is there any "reload information about char packet" ?

Kenjiro 07.11.2006 23:00

Has someone know about PledgeDeletePacket, how it works? I use this:
Code:

function l2_pledgedelete ( $pledge_id ) {
  // 38 - PledgeDelete, pledge_id
  $cached_op = pack ( "cV", 38, $pledge_id );
  $cached_op .= ansi2unicode ( "webadmin" );
  $ret_string = l2_cached_push ( pack ( "s", strlen ( $cached_op ) + 2 ) . $cached_op );
  return ( $ret_string );
}

Command correctly return "1", but some 'test' clan has not been deleted, and i don't know where is the problem. Disband in-game command works ok.

djtincho 08.11.2006 20:12

add subjob
 
any news about addsubjobpacket?
it suposted to be something like addsubjobpacket($charid, $packetnumber, $class) but it doesn´t work :(

Ollisso 18.11.2006 00:44

I tried to use this one:
#96 AddSubjobsPacket("dSd")
with list of parametres:
$char_id,$new_class,$f['hp'],$f['mp'],$f['sp'],$f['exp'],$f['level'],$subjob_id, $f['henna_1'],$f['henna_2'],$f['henna_3']

but no success :(

khelben 16.03.2007 14:57

How about the StopChar packet? Anyone know the variables for this one? I would imagine one is the character ID, and the other?

Nevermind it's 90;<charid>;<min to freeze>

Character must be offline

Drag 16.03.2007 20:35

Quote:

Originally Posted by Ollisso (Post 72612)
I tried to use this one:
#96 AddSubjobsPacket("dSd")
with list of parametres:
$char_id,$new_class,$f['hp'],$f['mp'],$f['sp'],$f['exp'],$f['level'],$subjob_id, $f['henna_1'],$f['henna_2'],$f['henna_3']

but no success :(

Ollisso as You see on description... u need data such int,string,int... 3 vars... how many did u listed? xD sry for eng - tired...

Stazis 18.03.2007 17:13

does anyone have ChangePledgeOwner packet works?

FidoW 18.03.2007 17:24

Quote:

Originally Posted by Stazis (Post 81631)
does anyone have ChangePledgeOwner packet works?

I try everything... and cant get it working... i have most of the packets working but that or give error or give 01 but nothing happen... I try with pledge owner online.. offline.. new leader offline.. online... all combinations has been tested unsuscesfully.

Charis 05.04.2007 16:59

Does Someone checked 20 and 21 packets?
Enable and Disable Char?

I have written code below, but if Unban char seems to work (returns 1), BanChar returns 03 - wrong args o_O

Code:

function ansi2unicode($string) {
    $rs = ""; for($i = 0; $i < strlen($string); $i++) $rs .= $string[$i].chr(0);
    return($rs.chr(0).chr(0));
}

function l2_cached_push($buf){
$cached_ip = "127.0.0.1";
$cached_port = "2012";
$fp = fsockopen($cached_ip, $cached_port, $errno, $errstr, 5); $rs = "";
if(!$fp)return 0;
else{
    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]; }
    stream_set_timeout($fp, 2);
    $answ=$rs;
    fclose($fp);
    return "$answ";
  }
 }


function l2_banCharacter($webadmin, $char_id) {
    $cached_op = pack("c", 20); // 20 = DisableCharacterPacket();
    $cached_op .= pack("i", $char_id);
    $cached_op .= ansi2unicode ( $webadmin );
    $rs = l2_cached_push ($cached_op);
    return ( $rs );
}

function l2_unbanCharacter($webadmin, $char_id) {
    $cached_op = pack("c", 21); // 21 = EnableCharacterPacket();
    $cached_op .= pack("i", $char_id);
    $cached_op .= ansi2unicode ( $webadmin );
    $rs = l2_cached_push ($cached_op);
    return ( $rs );
}



All times are GMT. The time now is 17:00.