![]() |
|
|
#51 |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Any lin2error.txt? Or anything in '/err' log?
|
|
|
|
|
#52 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
-- Deleted --
|
|
|
|
|
#53 |
|
Архивный участник
Join Date: Jul 2005
Posts: 123
|
Any idea from Telnet?
|
|
|
|
|
#54 |
|
Архивный участник
Join Date: Feb 2005
Posts: 200
|
CLog::Add -> CLog::AddV -> Log::AddV - vswprintf_s
hm - it could not make log record into console ... |
|
|
|
|
#55 |
|
Архивный участник
Join Date: Oct 2006
Posts: 8
|
Does anybody know what is packet format for:
- change subjob ? - move character to different account ? Which data should I give to CacheD ? (just order of them
|
|
|
|
|
#56 |
|
Архивный участник
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 =) |
|
|
|
|
#57 |
|
Архивный участник
Join Date: Jan 2006
Posts: 607
|
it's in the first example post Namenlos...
Code:
function tounicode($string) {
$rs = ""; for($i = 0; $i < strlen($string); $i++) $rs .= $string[$i].chr(0);
return($rs.chr(0).chr(0));
}
|
|
|
|
|
#58 |
|
Архивный участник
Join Date: Oct 2006
Posts: 3
|
Please help with adding a builder rights to a existing player account.
#3 SetBuilderCharacterPacket("ddS") The third argument is any string in unicode? Must I add '1' at the end of the packet as in the AddItem packet? |
|
|
|
|
#59 |
|
Архивный участник
Join Date: Jan 2006
Posts: 54
|
PHP Code:
|
|
|
|
|
#60 |
|
Архивный участник
Join Date: Nov 2005
Posts: 70
|
Gah, I can get EVERY function to work besides additem2... it isn't reporting any errors. I did the adminid thing... just no errors now. it connects to the cache and disconnects and no item is created.
|
|
|
|
|
#61 |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Make sure You have working itemdata.txt in your CachedScript directory. My additem2 php code:
$cached_op = pack ( "cVVVVVVVVVV", 55, $char_id, $warehouse, $item_type, $amount, $enchant, $eroded, $bless, $ident, $wished, 1 ); $cached_op .= ansi2unicode ( "yourwebuserorwhatever" ); $ret_string = l2_cached_push ( pack ( "s", strlen ( $cached_op ) + 2 ) . $cached_op ); It works. |
|
|
|
|
#62 |
|
Архивный участник
Join Date: Mar 2006
Posts: 22
|
What about 67 AddSkillsPacket("dSd") ?
When trying to add all skills, nothing happens. Also, no errors in CacheD. CacheD returns "1". Code:
function cached_new($buf){
global $cached_ip,$cached_port;
$fp = fsockopen($cached_ip, $cached_port, $errno, $errstr, 5); $rs = "x";
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";
}
}
Code:
function set_skill_all_char($id,$char_name){
kick_char($id);
$buf = pack("c", 67); // 67 = AddSkillsPacket("dSd");
$buf .= pack("i", $id); //char_id
$buf .= tounicode ( "GM" );
$buf .= pack("i", 0);
$answ=cached_new($buf);
if($answ==="x1")return "<font class=log_number>$char_name</font> successfully got all skills.";
else return "<font color=red>Error:</font><font class=log_text>$answ</font> giving all skills to <font class=log_number>$char_name</font>.";
}
|
|
|
|
|
#63 | |
|
Архивный участник
Join Date: Nov 2005
Posts: 70
|
Quote:
|
|
|
|
|
|
#64 |
|
Архивный участник
Join Date: Sep 2005
Posts: 455
|
When trying the code, no error is reported but it doesn't work. Simply to load the itemdata just put in the folder and your good to go right? I have itemname-e.txt itemdata.txt and itemcache.txt all in there, but no item is loaded with the PHP your provided. I do get recognition of it attempting in the CACHE
|
|
|
|
|
#65 | |
|
Архивный участник
Join Date: Mar 2006
Posts: 160
|
What about Char Ban?
This script can not do that. Please help! Quote:
|
|
|
|
|
|
#66 |
|
Архивный участник
Join Date: Apr 2006
Posts: 729
|
Namenlos:
Your php-script invalid... Where is a function calling? -> echo (ban_char($name, $hour)); Where $char_id variable defined? -> is there must be name or char_id? -> if $name, then you must convert it to unicode tounicode($name); -> if $char_id, then you have error in function arguments... You have error in a packet data... Because you're using packet for ChangeCharNamePacket. -> you must know right packet structure (with all parameters, which sended to cached) -> function ban_char($name, $hour) -> $buf = pack("c", 39); -> $buf .= pack("i", $char_id); -> $buf .= pack("i", $name); -> $buf .= tounicode("GM1"); -> it's what you must edit... I can't help with structure, because I can't understand, which parameters used for that function... |
|
|
|
|
#67 | |
|
Архивный участник
Join Date: Mar 2006
Posts: 160
|
after this script. Didn't post it here.
Quote:
I POSTED WRONG CODE. I mean $buf = pack("c", 39); $name = tounicode($name); $buf .= pack("i", $name); $buf .= pack("i", $hour); 39 is the packet for BanChar, look at the first post. Changing name is 4th packet. |
|
|
|
|
|
#68 |
|
Архивный участник
Join Date: Mar 2006
Posts: 160
|
I am sorry for my posts.
This is right code. Code:
$hour = 48; //ban hour
$char_id = 123; // ID OF CHAR
function ban_char($char_id, $hour) {
$fp = fsockopen("127.0.0.1", "2012", $errno, $errstr, 5); $rs = "x";
if (!$fp) die("<script>alert('Error connecting to cached: $errstr
[server down??]')</script>");
$buf = pack("c", 39); // packet for character ban
$buf .= pack("i", $char_id); //char_id
$buf .= pack("i", $hour); //hours of ban
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);
}
|
|
|
|
|
#69 |
|
Архивный участник
Join Date: Sep 2005
Posts: 455
|
For anyone reading this thread, AddItem2 doesn't work, so don't waste your time. Everything is ok, ban char check online status, ect.
Just wanted to make an update so you dont waste your time like I did. |
|
|
|
|
#70 | ||
|
Архивный участник
Join Date: Mar 2006
Posts: 22
|
Quote:
Quote:
|
||
|
|
|
|
#71 | |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
Quote:
PHP Code:
|
|
|
|
|
|
#72 |
|
Архивный участник
Join Date: Feb 2006
Posts: 57
|
//ENG
PLZ help me, what the need packet for stopsay(BanChat) player??? //RUS Какой пакет нужен чтобы банить чат у игрока ??? |
|
|
|
|
#73 |
|
Архивный участник
Join Date: Apr 2006
Posts: 729
|
PunishCharPacket
|
|
|
|
|
#74 |
|
Архивный участник
Join Date: Feb 2006
Posts: 57
|
tnx
![]() //RUS Большое спасибо! |
|
|
|
|
#75 |
|
Архивный участник
Join Date: May 2006
Posts: 43
|
help whis pakets to set_noobless and set_hero
#106 SetNoblessPacket("ddS") #107 SetHeroPacket("ddS") not work |
|
|
|
|