Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 06.04.2007, 17:15   #101
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

Ban

UPDATE user_account SET block_flag = 1,block_flag2 = 1 WHERE account='dumbass'

Unban

UPDATE user_account SET block_flag = 0,block_flag2 = 0 WHERE account='dumbass'

if you really really want to use cacheD commands try your cacheD command for 0 min. That's the only way i can get it to unban other than modifying the sql table.
khelben is offline  
Old 06.04.2007, 17:35   #102
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

That works for me

PHP Code:
#20 DisableCharacterPacket("ddS")
function DisableCharacterPacket($char_id) {
    
$buf = pack("c", 20);
    
$buf .= pack("i", $char_id);
    
$buf .= pack("i", 1);
    return 
CacheDInteractive($buf);
}

#21 EnableCharacterPacket("ddS")
function EnableCharacterPacket($char_id, $account_id) {
    
$buf = pack("c", 21);
    
$buf .= pack("i", $char_id);
    
$buf .= pack("i", $account_id);
    return 
CacheDInteractive($buf);
} 
FidoW is offline  
Old 06.04.2007, 17:37   #103
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

My function CacheDInteractive... is better than try to connect to the server in each function...

PHP Code:
function CacheDInteractive($buf) {
    
$fp = fsockopen("127.0.0.1", "2012", $errno, $errstr, 5); 
    
$rs = "x";
    if (!
$fp) die("Error conectando con CacheD: [Server OFF?]");
    
    
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);
} 
FidoW is offline  
Old 06.04.2007, 21:41   #104
SilverCloud
Архивный участник
 
Join Date: Feb 2006
Posts: 19
Default

These commands are only available when the character is offline right? If so, thats too bad.. I was about to create an auction site (php). Second, is it possible to check if a char is online?
SilverCloud is offline  
Old 06.04.2007, 21:58   #105
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by SilverCloud View Post
These commands are only available when the character is offline right? If so, thats too bad.. I was about to create an auction site (php). Second, is it possible to check if a char is online?
You can check if player is online with this function...
PHP Code:
#1 CheckCharacterPacket("dS")
function CheckCharacterPacket($char_id) {
    
$buf = pack("c", 1);
    
$buf .= pack("i", $char_id);
    return 
CacheDInteractive($buf);
} 

But always you can kick him first and problem solved.
PHP Code:
#5 KickCharacterPacket("dS")
function KickCharacterPacket($char_id) {
    
$buf = pack("c", 5);
    
$buf .= pack("i", $char_id);
    return 
CacheDInteractive($buf);
} 
FidoW is offline  
Old 12.04.2007, 19:33   #106
scrap512
Архивный участник
 
Join Date: Jul 2006
Posts: 77
Default

Can't get additem2 to work even. itemdata and cache are both in the cached script folder :-/ any other suggestions?
scrap512 is offline  
Old 23.04.2007, 11:56   #107
zabr
Архивный участник
 
Join Date: Apr 2007
Posts: 2
Default

has anybody make php function to add skill to char?
zabr is offline  
Old 23.04.2007, 12:39   #108
adriahu
Архивный участник
 
Join Date: Oct 2006
Posts: 47
Default

Quote:
Originally Posted by zabr View Post
has anybody make php function to add skill to char?
function fragment
PHP Code:
$buf=pack("cVVV",6,$char_id,$skill_id,$skill_level).tounicode("admin");
$cachedsocket=@fsockopen($cached_ip,$cached_port,$errno,$errstr,1) or die("error");
fwrite($cachedsocket,pack("s",(strlen($buf)+2)).$buf);
$len=unpack("v",fread($cachedsocket,2));$rid=unpack("c",fread($cachedsocket,1));
for(
$i=0;$i<(($len[1]-4)/4);$i++){$read=unpack("i",fread($cachedsocket,4));$rs.=$read[1];}
fclose($cachedsocket); 
adriahu is offline  
Old 24.04.2007, 04:34   #109
zabr
Архивный участник
 
Join Date: Apr 2007
Posts: 2
Default

tnx will try
zabr is offline  
Old 15.05.2007, 09:24   #110
Charis
Архивный участник
 
Join Date: Feb 2006
Posts: 39
Default

Quote:
Originally Posted by FidoW View Post
That works for me

PHP Code:
#21 EnableCharacterPacket("ddS")
function EnableCharacterPacket($char_id, $account_id) {
    
$buf = pack("c", 21);
    
$buf .= pack("i", $char_id);
    
$buf .= pack("i", $account_id);
    return 
CacheDInteractive($buf);
} 
Does EnableCharacter works correct for you?
I have the same one, but it places in account_id unsigned -2 (somesing like 65K o_O).

What is wrong????
Charis is offline  
Old 17.06.2007, 15:36   #111
l2russia
Архивный участник
 
Join Date: May 2007
Posts: 2
Default

ChangePledgeOwnerPacket
37 clan_id char_id unicode(admin)
выдает 1 при подходящих данных, при неверных 024
но абсолютно ничего не происходит.
l2russia is offline  
Old 17.06.2007, 15:45   #112
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by l2russia View Post
ChangePledgeOwnerPacket
37 clan_id char_id unicode(admin)
выдает 1 при подходящих данных, при неверных 024
но абсолютно ничего не происходит.
Estoy de acuerdo (?)
FidoW is offline  
Old 19.06.2007, 22:35   #113
Guaresnay
Архивный участник
 
Join Date: Oct 2005
Posts: 113
Default

Quote:
Originally Posted by FidoW View Post
Estoy de acuerdo (?)
claro es la unica forma (?)
Guaresnay is offline  
Old 22.06.2007, 21:30   #114
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

what is format ?
#2 SetCharacterLocationPacket("dddddS")

char_id, location_X, location_Y, Location_Z, ???????, admin

who can help ????

Write sample please...
xly99168 is offline  
Old 23.06.2007, 12:19   #115
Kenjiro
Архивный участник
 
Join Date: Apr 2006
Posts: 120
Default

Try: SetCharacterLocationPacket, char_id, 1, x, y, z, unicode(admin)

P.S. Look in cached 'system' and 'err' logs, it usually shows you what is wrong.
Kenjiro is offline  
Old 28.06.2007, 16:52   #116
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

test success.....

very THX!
xly99168 is offline  
Old 02.07.2007, 00:35   #117
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

about #50 ManAnnouncePacket("ddSS")????

Why arsy-varsy code after I write chinese on announce? But english is well.....

english 2byte = chinese 1byte
xly99168 is offline  
Old 10.07.2007, 18:36   #118
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

about ChangePledgeOwnerPacket
37 clan_id char_id unicode(admin) ????

37 to_char_id pledge_id is error....
37 pledge_id to_char_id is error too....

then ..... ?
xly99168 is offline  
Old 10.07.2007, 18:37   #119
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

cached 'system' and 'err' logs, it not shows me what is wrong.
xly99168 is offline  
Old 23.07.2007, 13:00   #120
Kenjiro
Архивный участник
 
Join Date: Apr 2006
Posts: 120
Default

ChangePledgeOwnerPacket is not working through cached :/
Kenjiro is offline  
Old 24.07.2007, 08:31   #121
djvogans
Архивный участник
 
Join Date: Apr 2005
Posts: 306
Default

not working in c1 modded cached . in retail cached it's working fine .
djvogans is offline  
Old 24.07.2007, 17:47   #122
Kenjiro
Архивный участник
 
Join Date: Apr 2006
Posts: 120
Default

I'm using file 'cached.exe' size '1 540 096' from c4retailpack. It is not working for me same as PledgeDeletePacket.
Kenjiro is offline  
Old 28.07.2007, 20:16   #123
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

Quote:
Originally Posted by Kenjiro View Post
ChangePledgeOwnerPacket is not working through cached :/

me too, and PledgeDeletePacket is not working too....
xly99168 is offline  
Old 29.07.2007, 08:48   #124
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

Indeed, me too.
Forcer is offline  
Old 07.08.2007, 18:12   #125
xly99168
Архивный участник
 
Join Date: Jun 2007
Posts: 7
Default

UP. who can help ?
xly99168 is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:54.