Faction info

Results 1 to 25 of 25
  1. #1
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Faction info

    If you gonna use this please give me LIKE.
    Special thanks to Mr. Anderson for developing , gouranga and alexdnepro for some info and and to me for translating

    PHP Code:
    <?php error_reporting (E_ALL E_NOTICE); error_reporting(0); ?><?
    <?php header ('Content-type: text/html; charset=utf-8');

    function 
    cuint($data)
    {
            if(
    $data 64)
                    return 
    strrev(pack("C"$data));
            else if(
    $data 16384)
                    return 
    strrev(pack("S", ($data 0x8000)));
            else if(
    $data 536870912)
                    return 
    strrev(pack("I", ($data 0xC0000000)));
            return 
    strrev(pack("c", -32) . pack("I"$data));
    }
    if(isset(
    $_GET['fid'])){
    $fid $_GET['fid'];
    $sock socket_create(AF_INETSOCK_STREAMSOL_TCP);
    if(!
    $sock)
            die(
    socket_strerror(socket_last_error()));
    if(
    socket_connect($sock"192.168.0.51""29400"))
    {
        
    socket_set_block($sock);
        
    $datacuint(4608)."\x08\x80\x00\x00\x01".strrev(pack("I",$fid));
        
    socket_send($sock$data81920);
        
    socket_recv($sock$buf81920);
        
    socket_set_nonblock($sock);
        
    socket_close($sock);
            
    $pos14 ord(substr($buf141));

            if (
    ereg("[^0-9a-zA-Z_-]"$pos14$pos14)){
            
    $fnamelen ord(substr($buf151));
            
    $pholder 15;
            }else{
            
    $fnamelen ord(substr($buf161));
            
    $pholder 16;}
            
    $fname iconv("UCS-2LE""UTF-8"substr($buf$pholder+1$fnamelen));
            
    $flvl ord(substr($buf$pholder+$fnamelen+11))+1;
            
    $fmasterid hexdec(bin2hex(substr($buf$pholder+$fnamelen+24)));
            
    $fcommentlen ord(substr($buf$pholder+$fnamelen+61));
            
    $fcomment iconv("UCS-2LE""UTF-8"substr($buf$pholder+$fnamelen+7$fcommentlen));
            
    $fcount ord(substr($buf$pholder+$fnamelen+$fcommentlen+81));
            echo 
    "<b>Faction id:</b> ".$fid."<br><b>Faction name:</b> ".$fname."<br><b>Faction level:</b> ".$flvl."<br><b>Faction master id:</b> ".$fmasterid."<br><b>Faction info:</b> ".$fcomment."<br><b>Faction members count:</b> ".$fcount;
            echo 
    "<br><br><b>Faction members:</b><br><table width=60% border=1><tr><td align='center'><b>Role id</b></td><td align='center'><b>Role name</b></td><td align='center'><b>Role rank</b></td><td align='center'><b>Role title</b></td><td align='center'><b>Role level</b></td><td align='center'><b>Role class</b></td></tr>";
            
    $holder $pholder+$fnamelen+$fcommentlen+9;
            for(
    $i 0$i $fcount$i++){            
                
    $rid hexdec(bin2hex(substr($buf$holder4)));
                
    $rlvl ord(substr($buf$holder+41));
                
    $rcls ord(substr($buf$holder+51));
                if (
    $rcls == 0){$rcls='Blademaster';}else{
                if (
    $rcls == 1){$rcls='Wizard';}else{
                if (
    $rcls == 2){$rcls='Monk';}else{
                if (
    $rcls == 3){$rcls='Venomancer';}else{
                if (
    $rcls == 4){$rcls='Barbarian';}else{
                if (
    $rcls == 6){$rcls='Archer';}else{
                if (
    $rcls == 7){$rcls='Cleric';}else{$rcls='IDK';}}}}}}}
                
    $rrank ord(substr($buf$holder+61));
                if (
    $rrank == 2){$rrank='Master';}else{
                if (
    $rrank == 3){$rrank='Director';}else{
                if (
    $rrank == 4){$rrank='Marshal';}else{
                if (
    $rrank == 5){$rrank='Executor';}else{
                if (
    $rrank == 6){$rrank='Commissioner';}}}}}
                
    $rnamelen ord(substr($buf$holder+101));
                
    $rname iconv("UCS-2LE""UTF-8"substr($buf$holder+11$rnamelen));
                
    $rtitlelen ord(substr($buf$holder+$rnamelen+111));
                
    $rtitle iconv("UCS-2LE""UTF-8"substr($buf$holder+$rnamelen+12$rtitlelen));
                echo 
    "<tr><td align='center'>".$rid."</td><td align='center'>".$rname."</td><td align='center'>".$rrank."</td><td align='center'>".$rtitle."</td><td align='center'>".$rlvl."</td><td align='center'>".$rcls."</td></tr>";
                
    $holder $holder+$rnamelen+$rtitlelen+12;}
                echo 
    "</table>";                    
    }else{die(
    socket_strerror(socket_last_error()));}}else {echo "Please Enter Fid like this: test.php?fid=4 ";}
    ?>
    This script works good:



    Special thanks for the ones that contributed at this script and to me for fixing it.
    Last edited by Adriana; 25-08-11 at 11:19 AM.


  2. #2
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: PHP Faction info

    Up!!!!!!

  3. #3
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: PHP Faction info

    What are you saying/asking here ???

  4. #4
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: PHP Faction info

    Could you share this script here? I wanna take a look at it.

  5. #5
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: PHP Faction info

    if you know any fix for it please replay...the fix works till it finds a@

    ---------- Post added at 04:50 PM ---------- Previous post was at 04:41 PM ----------

    This is the string that dos not work:
    ��5$ Stuff��TEST_12345@ ���;i CLOUDLEADq`^;E Pluto8 �;iYoruichi��;iApeXP;i Lenusi��;ipanther��;h ScriptPant ;i Dina@�;i Satiny!��;`CandyCane
    and this is the one that works:
    ��/CruSaderS�^New_faction_Valhalla_pm_MrPain_or_any_exe_on_QQ'(��:�WereWolf218 :�RhimalotrhimR�;Dakocan206{�:� korner230�`�:�Sassori242���:� miZiimiZ��:� FelkanATK1���:�FastSlash178��:�Nephilimatk1&0 :� JacobJacq��:�BlackCatCat���:�**miZii**212��:�Karyll3200�1�:�Farfarell153l��:� _Divy_Divy���; Xiaox32001��:�Poseidon254 ��;dAnunakimid1$Q[;+Stabedrat1583�:�_Ashura_161:��:��!Julio�!195���:�DeathBUDeatl��:� Rayne255��;cRag3MID1���:� Razeldef1�;c1me�;fYC102:;>Dniky~��:�BowfingerMID2J��:� Auriae185I2�:� JesusAMEN�;c Rageynoob\і:� PaNdA!a!�:� wukkyC��:�/\rrowS[�:� brendaQt�;cArab!�;EBlooDGoD ��:�Shikamaru��:� Diablo

    it basically counts the digits and translate it into UTF-8 but counting is not enough if we don develop a autonomous function.

    ---------- Post added at 05:09 PM ---------- Previous post was at 04:50 PM ----------

    up!!!!!!!!!

  6. #6
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: PHP Faction info

    Oh my... and I thought the code I wrote was incredibly messy. And I know that I did release PW-Chat under an MIT license but what you have there and nearly identical to how I read names from the database. Heck you even used the same variable names! So if anyone deserves a like/credit it would be me (with some going to gouranga for providing me with an entirely unrelated example for GM broadcasting messages and Marshalling.php)

    You also don't seem to understand what you are doing with
    PHP Code:
    hexdec(bin2hex(substr($buf$pholder+$fnamelen+24))); 
    there is a reason why ord() exists you know...

    PHP Code:
                if ($rcls == 0){$rcls='Blademaster';}else{
                if (
    $rcls == 1){$rcls='Wizard';}else{
                if (
    $rcls == 2){$rcls='Monk';}else{
                if (
    $rcls == 3){$rcls='Venomancer';}else{
                if (
    $rcls == 4){$rcls='Barbarian';}else{
                if (
    $rcls == 6){$rcls='Archer';}else{
                if (
    $rcls == 7){$rcls='Cleric';}else{$rcls='IDK';}}}}}}}
                
    $rrank ord(substr($buf$holder+61));
                if (
    $rrank == 2){$rrank='Master';}else{
                if (
    $rrank == 3){$rrank='Director';}else{
                if (
    $rrank == 4){$rrank='Marshal';}else{
                if (
    $rrank == 5){$rrank='Executor';}else{
                if (
    $rrank == 6){$rrank='Commissioner';}}}}} 
    holy crap, lrn2caseswitch

    (also it's probably not working for that string because it's not really UCS2-LE, its actually probably GB2312 (edit: no it isn't, I have no idea what character set that could possibly be as it doesn't match anything valid, so it might just be gamedbd being difficult as always) but PHP doesn't support that so...)
    Last edited by das7002; 23-08-11 at 08:31 PM.

  7. #7
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: PHP Faction info

    from where i got the scrip in rusion dint say anyting about you and i translated some so i guess we can all take credit LOL nvm i will use 3% of it.

  8. #8
    Member MorzE is offline
    MemberRank
    Aug 2010 Join Date
    RussiaLocation
    70Posts

    Re: Faction info

    Where is copyrights?

  9. #9
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info

    Quote Originally Posted by MorzE View Post
    Where is copyrights?
    what copyrights? is the way i found it ...

  10. #10
    Nerd-IO Romulan is offline
    MemberRank
    Feb 2009 Join Date
    BelgiumLocation
    3,333Posts

    Re: Faction info

    (C) das7002, gouranga

  11. #11
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info

    Actually I have analyzed the package of information directly from the clan gamedbd. I express my gratitude for the content of this gouranga and alexdnepro.
    Last edited by Adriana; 25-08-11 at 11:16 AM. Reason: http://pwdev.ru/threads/getfactiondetail.765/

  12. #12
    Member MorzE is offline
    MemberRank
    Aug 2010 Join Date
    RussiaLocation
    70Posts

    Re: Faction info

    Quote Originally Posted by Romulan View Post
    (C) das7002, gouranga
    WTF?!
    GetFactionDetail | Сообщество разработчиков и администраторов Perfect World

    ---------- Post added at 09:19 AM ---------- Previous post was at 09:17 AM ----------

    Quote Originally Posted by Adriana View Post
    Actually I have analyzed the package of information directly from the clan gamedbd. I express my gratitude for the content of this gouranga and alexdnepro.
    Dont lie and fuck yorself.

  13. #13
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info

    Special thanks to Mr. Anderson for developing , gouranga and alexdnepro for some info and and to me for translating

  14. #14
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info


  15. #15
    Member MorzE is offline
    MemberRank
    Aug 2010 Join Date
    RussiaLocation
    70Posts

    Re: Faction info

    The code for this script is a little less than completely steal.

  16. #16
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info

    well enlighthen us and post the real thing....oh i forgot you want to seel it ...oh and btw you never answer to e-mails how do you espect to sell stuf if you dont answer to your possible customers?

  17. #17
    Member MorzE is offline
    MemberRank
    Aug 2010 Join Date
    RussiaLocation
    70Posts

    Re: Faction info

    Quote Originally Posted by Adriana View Post
    well enlighthen us and post the real thing....oh i forgot you want to seel it ...oh and btw you never answer to e-mails how do you espect to sell stuf if you dont answer to your possible customers?
    If i want to sell it, i'll tell about it on us russian forum. There i just want to see a true copyrights.
    P.S. The code for this script contains many errors.

  18. #18
    Angelemu founder tbnanubis is offline
    MemberRank
    Mar 2011 Join Date
    Unicorn ForestLocation
    527Posts

    Re: Faction info

    PHP Code:
    <?php error_reporting (E_ALL E_NOTICE); error_reporting(0); ?>
    just read that and lol'd so hard.
    you don't even know what this does i guess.

  19. #19
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Faction info

    I believe Romulan mentioned me simply because a good portion of what I did with PW-Chat is there, the variable names were even identical. Sure the people at pwdev.ru might've added onto it but the base did come from me... (and a bit before that from gouranga) I did disclaim copyright by using an MIT license, but even so I like seeing and giving credit where it is due.

    Quote Originally Posted by tbnanubis View Post
    PHP Code:
    <?php error_reporting (E_ALL E_NOTICE); error_reporting(0); ?>
    just read that and lol'd so hard.
    you don't even know what this does i guess.
    yes that is a bit funny...

    Quote Originally Posted by MorzE View Post
    If i want to sell it, i'll tell about it on us russian forum. There i just want to see a true copyrights.
    P.S. The code for this script contains many errors.
    Quote Originally Posted by Adriana View Post
    well enlighthen us and post the real thing....oh i forgot you want to seel it ...oh and btw you never answer to e-mails how do you espect to sell stuf if you dont answer to your possible customers?
    and the parts used from my code I honestly don't care if you do, if anyone wants it it's right here http://code.google.com/p/pw-chat/sou...p.php?r=47#435

    Also, he can do whatever the hell he wants with anything derived from my code of his own work it is, after all, completely allowed by the license

    If they do try to sell anything I've created and released via MIT license, then so be it. I release under MIT because I honestly don't care what people do with it, nor do I want to babysit it if I ever give up on it. People can either get it from me for free or pay someone else for it, either way it is perfectly acceptable by me. (I just like being attributed for anything I create even if I do let it float away)
    Last edited by das7002; 25-08-11 at 09:05 PM.

  20. #20
    Member MorzE is offline
    MemberRank
    Aug 2010 Join Date
    RussiaLocation
    70Posts

    Re: Faction info

    Whatever. I've realized that most users of this forum does not respect the authors.
    P.S. Your PW-Chat I had not even seen.

  21. #21
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Faction info

    Most may and probably do not, but we cannot let them ruin it for the good people here ;)

  22. #22
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info

    how the hell m i suppose to know he toked the codes from you? i dint say i made that script i just translate it and share it here.

    about this <?php error_reporting (E_ALL ^ E_NOTICE); error_reporting(0); ?>

    mistake we do all we are humans after all.

  23. #23
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Faction info

    Quote Originally Posted by Adriana View Post
    how the hell m i suppose to know he toked the codes from you? i dint say i made that script i just translate it and share it here.

    about this <?php error_reporting (E_ALL ^ E_NOTICE); error_reporting(0); ?>

    mistake we do all we are humans after all.
    I didn't know it came from that Russian site either until it was brought up...

  24. #24
    Member MorzE is offline
    MemberRank
    Aug 2010 Join Date
    RussiaLocation
    70Posts

    Re: Faction info

    Now I'm happy :)

  25. #25
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Re: Faction info

    Well guess your not mad of me right ?



Advertisement