Page 2 of 4 PrimeiroPrimeiro 1234 ÚltimoÚltimo
Resultados 11 a 20 de 36
  1. #11
    Membro LuizerA's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    85
    Thanks Thanks Given 
    79
    Thanks Thanks Received 
    634
    Thanked in
    26 Posts
    Mentioned
    3 Post(s)
    País
    Brazil
    nao entendo muito, mas pelo musite, ele usa um código pra gerar.

    logoGuildDecode

    Código:
    <?phpif($_GET['returnType'] == "table")
    {
    ?>
    <style>   
    body
    {
        margin: 0px;
        padding: 0px;       
    } 
    .guildMarkMaker
    {                          
        border-width: 1px;
        border-style: solid;
        border-color: #999999;     
        background-color: #FFFFFF;
        border-collapse: collapse;
    }
    .guildMarkMaker td
    {
        width: 13.5px;
        height: 13px;
        background-color: #000000;
    }
    </style>
     
    <table class="guildMarkMaker">
        <tr>
            <td id="0"></td>
            <td id="1"></td>
            <td id="2"></td>
            <td id="3"></td>
            <td id="4"></td>
            <td id="5"></td>
            <td id="6"></td>
            <td id="7"></td>
        </tr>
        <tr>
            <td id="8"></td>
            <td id="9"></td>
            <td id="10"></td>
            <td id="11"></td>
            <td id="12"></td>
            <td id="13"></td>
            <td id="14"></td>
            <td id="15"></td>
        </tr>
        <tr>
            <td id="16"></td>
            <td id="17"></td>
            <td id="18"></td>
            <td id="19"></td>
            <td id="20"></td>
            <td id="21"></td>
            <td id="22"></td>
            <td id="23"></td>
        </tr>
        <tr>
            <td id="24"></td>
            <td id="25"></td>
            <td id="26"></td>
            <td id="27"></td>
            <td id="28"></td>
            <td id="29"></td>
            <td id="30"></td>
            <td id="31"></td>
        </tr>
        <tr>
            <td id="32"></td>
            <td id="33"></td>
            <td id="34"></td>
            <td id="35"></td>
            <td id="36"></td>
            <td id="37"></td>
            <td id="38"></td>
            <td id="39"></td>
        </tr>
        <tr>
            <td id="40"></td>
            <td id="41"></td>
            <td id="42"></td>
            <td id="43"></td>
            <td id="44"></td>
            <td id="45"></td>
            <td id="46"></td>
            <td id="47"></td>
        </tr>
        <tr>
            <td id="48"></td>
            <td id="49"></td>
            <td id="50"></td>
            <td id="51"></td>
            <td id="52"></td>
            <td id="53"></td>
            <td id="54"></td>
            <td id="55"></td>
        </tr>
        <tr>
            <td id="56"></td>
            <td id="57"></td>
            <td id="58"></td>
            <td id="59"></td>
            <td id="60"></td>
            <td id="61"></td>
            <td id="62"></td>
            <td id="63"></td>
        </tr>
    </table> 
    <script type="text/javascript"> 
    var PSetColor = "#FFFFFF";
    var PSetHex = 0;
    var newHex = new Array();
    function getHexColor(blockHex)
    {
        switch(blockHex)
        {
            case("0"): return "#FFFFFF";
            case("1"): return "#000000";
            case("2"): return "#8c8a8d";
            case("3"): return "#ffffff";
            case("4"): return "#fe0000";
            case("5"): return "#ff8a00";
            case("6"): return "#ffff00";
            case("7"): return "#8cff01";
            case("8"): return "#00ff00";
            case("9"): return "#01ff8d";
            case("A"):case("a"): return "#00ffff";
            case("B"):case("b"): return "#008aff";
            case("C"):case("c"): return "#0000fe";
            case("D"):case("d"): return "#8c00ff";
            case("E"):case("e"): return "#ff00fe";
            case("F"):case("f"): return "#ff008c";
            default: return "#000000"; 
        }
    }
     
    function setBlockColor(block, hex)
    {
        document.getElementById(block).style.background = hex;
        return true;
    }
     
    function str_split(string, split_length) 
    {
        if (string === undefined || !string.toString || split_length < 1) {
            return false;
        }
        return string.toString().match(new RegExp('.{1,' + (split_length || '1') + '}', 'g'));
    }
     
    function makeDefaultColorsBlock(dumpHex)
    {
        dumpHex = str_split(dumpHex); 
        for(loop = 0; loop < 64; loop++)
        {   
            newHex[loop] = dumpHex[loop]; 
            setBlockColor(loop, getHexColor( dumpHex[loop] ));
        }
    }                                                                                            
     
    makeDefaultColorsBlock("<?=$_GET['decode'];?>");
    </script>
    <?php
    exit();    
    }
    class gmark {
        private $mark;
        private $img;
        private $px;
        private $size;
        public function __construct($mark, $size) 
        {
            if($size > 100) $size = 100;
            $this->size = $size;
            $this->createImage();
            if(strlen($mark) != 64) 
            {
                imagecolorallocate($this->img, 255, 255, 255);
                $this->getMarkX();     
            } 
            else 
            {
                imagecolorallocatealpha($this->img, 255, 255, 255, 127);
                $this->mark = str_split($mark);
                $this->getMark();
            }
        }
        private function getMarkX() 
        {
            imagefilledrectangle($this->img, 0, 0, $this->size, $this->size, imagecolorallocate($this->img, 255, 255, 255));
            $red = imagecolorallocate($this->img, 255, 0, 0);
            imageline($this->img, 0, 0, $this->size, $this->size, $red);
            imageline($this->img, 0, $this->size, $this->size, 0, $red);
        }
        private function createImage() 
        {
            $this->img = imagecreate($this->size, $this->size);
            $this->px = $this->size/8;  
        }
        private function getMark() 
        {
            $y = 0; $x = 0;
            foreach($this->mark as $i => $new) 
            {
                if(ctype_xdigit($new) == false) 
                {
                    $this->getMarkX();
                    break;
                }
                if($i == 0) { $x = 0; } 
                elseif(($i % 8) == 0) { $y += $this->px; $x = 0;}
                else { $x += $this->px; }
                $tempColor = $this->getColor($new);
                if($tempColor != false) $cor = imagecolorallocate($this->img, $tempColor[0], $tempColor[1], $tempColor[2]);
                else $cor = imagecolorallocatealpha($this->img, 255, 255, 255, 127);
                imagefilledrectangle($this->img, $x, $y, $x+$this->px, $y+$this->px, $cor);
            }
        }
        private function getColor($str) 
        {
            switch(strtolower($str)) 
            {
                case(1) : return(array(0 ,0, 0)); break;
                case(2) : return(array(128, 128, 128)); break;
                case(3) : return(array(255, 255, 255)); break;
                case(4) : return(array(254, 0, 0)); break;
                case(5) : return(array(255, 127, 0)); break;
                case(6) : return(array(255, 255, 0)); break;
                case(7) : return(array(128, 255, 0)); break;
                case(8) : return(array(0, 255, 1)); break;
                case(9) : return(array(0, 254, 129)); break;
                case("a") : return(array(0, 255, 255)); break;
                case("b") : return(array(0, 128, 255)); break;
                case("c") : return(array(0, 0, 254)); break;
                case("d") : return(array(127, 0, 255)); break;
                case("e") : return(array(255, 0, 254)); break;
                case("f") : return(array(255,0 ,128)); break;
                default : return(false); break;
            }
        }
        public function __destruct() 
        {
            header("Content-Type: image/png", true);
            imagepng($this->img, null, 9);
            imagedestroy($this->img);
        }
    }
    new gmark($_GET['decode'], 130);
    ?>
    funcao do rank:
    Código:
                global $ldTpl, $RANKING_HOME_CONFIGS;            $findTopsQ = $this->query("SELECT TOP 3 G_Name, G_Score, G_Mark, RankingCSWeek FROM ".DATABASE_CHARACTERS.".dbo.webRankingGuildCS ORDER BY RankingCSWeek DESC");
                while($findTops = mssql_fetch_row($findTopsQ))
                {
                    $tmpLogo = urlencode(bin2hex($findTops[2]));
                    $tempTpl .= sprintf("<td align=\"center\"><a href=\"?page=rankings&type=8&name=%s\"><strong>%s</strong><br /><img src=\"modules/classes/logoGuildDecode.php?decode=%s\" width=\"100\" height=\"100\" style=\"border:1px solid black\" /><br />Sieges: %d</a></td>", $findTops[0],$findTops[0],$tmpLogo,$findTops[3]);
                }
                $ldTpl->set("RANK_TOP_GUILDCS_HOME", $tempTpl);
                unset($tempTpl);
            }

  2. The Following User Says Thank You to LuizerA For This Useful Post:


  3. #12
    Developer Python kingrox's Avatar


    Data de Ingresso
    Jul 2022
    Posts
    132
    Thanks Thanks Given 
    129
    Thanks Thanks Received 
    712
    Thanked in
    60 Posts
    Mentioned
    2 Post(s)
    Humor
    Fine
    País
    Brazil
    consegui

    baixei o musite fui no decoder da guild e fiz similar em python

  4. The Following 2 Users Say Thank You to kingrox For This Useful Post:


  5. #13
    Developer Python kingrox's Avatar


    Data de Ingresso
    Jul 2022
    Posts
    132
    Thanks Thanks Given 
    129
    Thanks Thanks Received 
    712
    Thanked in
    60 Posts
    Mentioned
    2 Post(s)
    Humor
    Fine
    País
    Brazil
    Update Home

  6. #14
    Developer C++ Romário's Avatar

    Data de Ingresso
    Jul 2022
    Posts
    72
    Thanks Thanks Given 
    39
    Thanks Thanks Received 
    367
    Thanked in
    33 Posts
    Mentioned
    6 Post(s)
    País
    Brazil
    Citação Originally Posted by kingrox Ver Post
    Ok e um codigo binario, mas nao consigo extrair e exibir no html

    exemplo do codigo binario da minha guild

    b'\x11\x11\x11\x11\x15UUQ\x15ffQ\x15dFQ\x15dFQ\x15 ffQ\x15UUQ\x11\x11\x11\x11'
    Depois de você conseguir o binary de G_Mark na tabela Guild, você precisa converter o valor para uma string hexadecimal, no PHP se usa a função bin2hex. Depois você tem que usar esse valor hex para construir uma imagem baseada nele. Eu sei fazer isso usando PHP e C++.

    Outra coisa que você precisa fazer é garantir que caracteres inseguros como espaços retornem seus valores ASCII.

    Usando o exemplo que você forneceu, o binary convertido em Hex deve ficar algo como: 11111111155555511566665115644651156446511566665115 55555111111111

    Usando esse valor vc consegue construir uma imagem.

    Na Web do Daldegam ele tem uma função especifica pra isso lá em modules. É bem complexo, mas como já existe um trabalho desse, fica mais fácil adaptar para outra linguagem. Veja a base do MuSite.
    Last edited by Romário; 02-14-2025 at 04:25 AM.

  7. The Following 2 Users Say Thank You to Romário For This Useful Post:


  8. #15
    Developer Python kingrox's Avatar


    Data de Ingresso
    Jul 2022
    Posts
    132
    Thanks Thanks Given 
    129
    Thanks Thanks Received 
    712
    Thanked in
    60 Posts
    Mentioned
    2 Post(s)
    Humor
    Fine
    País
    Brazil
    Obrigado @Romário, já consegui essa parte, obrigado

  9. #16
    Membro cronusmaker's Avatar

    Data de Ingresso
    Dec 2022
    Localização
    brasil / SADE
    Posts
    62
    Thanks Thanks Given 
    63
    Thanks Thanks Received 
    279
    Thanked in
    29 Posts
    Mentioned
    0 Post(s)
    Humor
    Bored
    País
    Brazil
    Citação Originally Posted by kingrox Ver Post
    Obrigado @Romário, já consegui essa parte, obrigado
    ja ia recomendar isso tem o sistema que le o bau tambem porem isso vai dar mais trabalho que a função web valt e o golden archer

  10. #17
    Developer Python kingrox's Avatar


    Data de Ingresso
    Jul 2022
    Posts
    132
    Thanks Thanks Given 
    129
    Thanks Thanks Received 
    712
    Thanked in
    60 Posts
    Mentioned
    2 Post(s)
    Humor
    Fine
    País
    Brazil
    Update - pagina de informações

  11. #18
    Membro alefmello157's Avatar

    Data de Ingresso
    Jun 2023
    Posts
    35
    Thanks Thanks Given 
    47
    Thanks Thanks Received 
    45
    Thanked in
    8 Posts
    Mentioned
    0 Post(s)
    País
    Albania
    se puder colocar template clássico essa web ficaria show

  12. #19
    Developer Python kingrox's Avatar


    Data de Ingresso
    Jul 2022
    Posts
    132
    Thanks Thanks Given 
    129
    Thanks Thanks Received 
    712
    Thanked in
    60 Posts
    Mentioned
    2 Post(s)
    Humor
    Fine
    País
    Brazil

    ✔️ Vantagens Vip - Update =D

    Sobre o templates classicos, depois que concluir a web adaptar template e mais facil e qualquer pessoa pode fazer ou comprar a gosto





    Como pegar os horários dos eventos?
    Last edited by kingrox; 02-16-2025 at 05:07 AM.

  13. #20
    Developer C++ André's Avatar


    Data de Ingresso
    Jul 2022
    Posts
    36
    Thanks Thanks Given 
    28
    Thanks Thanks Received 
    29
    Thanked in
    12 Posts
    Mentioned
    4 Post(s)
    País
    Brazil
    Meus parabéns pelo seu projeto, é algo inovador e bastante prático

    Eu te parabenizo mais ainda pela iniciativa de RESSUCITAR o espírito da comunidade MU dedicando o seu tempo e conhecimentos
    para disponibilizar algo gratuitamente desta forma. Infelizmente hoje, nossa realidade é outra...

    Acompanho suas postagens por muitos anos aqui na PZ e em outros locais e te desejo muito sucesso em seus projetos públicos como este e também
    profissionais. Obrigado por contribuir com o verdadeiro espírito da Comunidade MU.

    Os mercenários que só visam explorar por esmolas que se lasquem, vão chegar a lugar algum como sempre!

  14. The Following User Says Thank You to André For This Useful Post:


Page 2 of 4 PrimeiroPrimeiro 1234 ÚltimoÚltimo

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • You may not post Resposta(s)
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •