![]() |
|
|
#76 |
|
Архивный участник
Join Date: Feb 2006
Posts: 57
|
Deleted ^)
|
|
|
|
|
#77 |
|
Архивный участник
Join Date: Sep 2005
Posts: 455
|
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);
}
|
|
|
|
|
#78 |
|
Архивный участник
Join Date: Mar 2006
Posts: 160
|
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? |
|
|
|
|
#79 |
|
Архивный участник
Join Date: Oct 2006
Posts: 9
|
I also have additem2 working.
|
|
|
|
|
#80 |
|
Архивный участник
Join Date: Apr 2005
Posts: 306
|
|
|
|
|
|
#81 |
|
Архивный участник
Join Date: Mar 2006
Posts: 22
|
|
|
|
|
|
#82 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Quote:
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 );
}
P.S. L2Z... looks nice... o.O |
|
|
|
|
|
#83 |
|
Архивный участник
Join Date: May 2006
Posts: 5
|
And for a Permanent BAN? Only a very large value for "$hour" or a specific value?
Thanks |
|
|
|
|
#84 | |
|
Архивный участник
Join Date: Sep 2006
Posts: 114
|
Quote:
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 |
|
|
|
|
|
#85 | |
|
Архивный участник
Join Date: Nov 2006
Posts: 5
|
Quote:
|
|
|
|
|
|
#86 |
|
Архивный участник
Join Date: Sep 2006
Posts: 114
|
|
|
|
|
|
#87 |
|
Архивный участник
Join Date: Oct 2006
Posts: 8
|
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 ? |
|
|
|
|
#88 |
|
Архивный участник
Join Date: Apr 2006
Posts: 729
|
Share ChangeSubJobPacket structure...
|
|
|
|
|
#89 |
|
Архивный участник
Join Date: Jan 2006
Posts: 55
|
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: вчера был занят сильно, неуспел записать все пакеты в таком формате. постучи мне в асю завтра. |
|
|
|
|
#90 |
|
Архивный участник
Join Date: Jan 2006
Posts: 55
|
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.
|
|
|
|
|
#91 |
|
Архивный участник
Join Date: Apr 2006
Posts: 729
|
Thanks.
|
|
|
|
|
#92 |
|
Архивный участник
Join Date: Oct 2006
Posts: 8
|
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" ? |
|
|
|
|
#93 |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
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 );
}
|
|
|
|
|
#94 |
|
Архивный участник
Join Date: Nov 2006
Posts: 3
|
any news about addsubjobpacket?
it suposted to be something like addsubjobpacket($charid, $packetnumber, $class) but it doesn´t work
|
|
|
|
|
#95 |
|
Архивный участник
Join Date: Oct 2006
Posts: 8
|
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
|
|
|
|
|
#96 |
|
Архивный участник
Join Date: Mar 2006
Posts: 104
|
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 |
|
|
|
|
#97 |
|
Архивный участник
Join Date: Mar 2006
Posts: 241
|
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...
|
|
|
|
|
#98 |
|
Архивный участник
Join Date: Feb 2005
Posts: 200
|
does anyone have ChangePledgeOwner packet works?
|
|
|
|
|
#99 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
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.
|
|
|
|
|
#100 |
|
Архивный участник
Join Date: Feb 2006
Posts: 39
|
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 );
}
|
|
|
|
|