Postado Fevereiro 16, 2017 8 anos Galera estou usando o top frags disponibilizado no tk Citar porém estou usando para um servidor derivado, quando ele vê a looktype do meu personagem que é 2 invez de ele mostrar a sprite, ele seleciona a pasta 2 dentro da pasta outfit, ai tem mais 5 opções de addon, body, head, legs e feet. Com o numero dessas 5 ultimas opções ele forma a sprite do personagem e mostra na tela com a cor certa, porém eu queria que invez de buscar por essas 5 opções, quando ele pedir a looktype 2 mostrar a sprite 2 que ta dentro da pasta outfit. Parte do script onde está sendo editada foreach ($rankingFrags as $member) { $main_content .= ' <td align="center"> <img style="margin-top: -40px; margin-left: -50px; position: relative;" src="images/trofeus/'.$rm.'.gif" /> <img style="margin-top: -45px; margin-left: -40px;" src="outfit.php?id='.$member['looktype'].'&addons='.$member['lookaddons'].'&head='.$member['lookhead'].'&body='.$member['lookbody'].'&legs='.$member['looklegs'].'&feet='.$member['lookfeet'].'" width="80" height="80" /> <br> <a href="?subtopic=characters&name='.$member['name'].'"> '.$member['name'].'</a> <br> <b>'.$member['frags_all'].'</b> </td> '; $rm++; } <img style="margin-top: -45px; margin-left: -40px;" src="outfit.php?id='.$member['looktype'].'&addons='.$member['lookaddons'].'&head='.$member['lookhead'].'&body='.$member['lookbody'].'&legs='.$member['looklegs'].'&feet='.$member['lookfeet'].'" width="80" height="80" /> basicamente ele manda buscar no outfit.php, que seria um php das cores das outfits se não me engano. só gostaria q ele buscasse a sprite invez das cores de outfit para formar a sprite Script completo caso necessite de mais modificações <?php if(!defined('INITIALIZED')) exit; $main_content .= ' <div class="TableContainer"> <div class="CaptionContainer"> <div class="CaptionInnerContainer"> <span class="CaptionEdgeLeftTop" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> <span class="CaptionBorderTop" style="background-image:url(./layouts/tibiarl/images/content/table-headline-border.gif);"></span> <span class="CaptionVerticalLeft" style="background-image:url(./layouts/tibiarl/images/content/box-frame-vertical.gif);"></span> <div class="Text">The 3 best killers on '.htmlspecialchars($config['server_name']).'</div> <span class="CaptionVerticalRight" style="background-image:url(./layouts/tibiarl/images/content/box-frame-vertical.gif);"></span> <span class="CaptionBorderBottom" style="background-image:url(./layouts/tibiarl/images/content/table-headline-border.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> </div> </div> <table class="Table5" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div class="InnerTableContainer"> <table style="width:100%;"> <tbody> <tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table bgcolor="#D4C0A1" border="0" cellpadding="3" cellspacing="1" width="100%"> <tr bgcolor="#505050"></tr> <tr> <td> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="#505050"> <td align="center" class="white" colspan="3"><b>Ranking</b> </td> </tr> <tbody> <tr bgcolor="#F1E0C6"> '; $rankingFrags = $SQL->query('SELECT name, frags_all, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons FROM players WHERE group_id = 1 AND account_id != 1 ORDER BY frags_all DESC LIMIT 3'); $rm = 1; foreach ($rankingFrags as $member) { $main_content .= ' <td align="center"> <img style="margin-top: -40px; margin-left: -50px; position: relative;" src="images/trofeus/'.$rm.'.gif" /> <img style="margin-top: -45px; margin-left: -40px;" src="outfit.php?id='.$member['looktype'].'&addons='.$member['lookaddons'].'&head='.$member['lookhead'].'&body='.$member['lookbody'].'&legs='.$member['looklegs'].'&feet='.$member['lookfeet'].'" width="80" height="80" /> <br> <a href="?subtopic=characters&name='.$member['name'].'"> '.$member['name'].'</a> <br> <b>'.$member['frags_all'].'</b> </td> '; $rm++; } $main_content .= ' </td> </tr> </table></tr></tbody> </table> <br/> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-br.gif);"></div> </div> </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </div> <br /> '; $main_content .= ' <div class="TableContainer"> <div class="CaptionContainer"> <div class="CaptionInnerContainer"> <span class="CaptionEdgeLeftTop" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightTop" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> <span class="CaptionBorderTop" style="background-image:url(./layouts/tibiarl/images/content/table-headline-border.gif);"></span> <span class="CaptionVerticalLeft" style="background-image:url(./layouts/tibiarl/images/content/box-frame-vertical.gif);"></span> <div class="Text">TOP Frags on '.htmlspecialchars($config['server_name']).'</div> <span class="CaptionVerticalRight" style="background-image:url(./layouts/tibiarl/images/content/box-frame-vertical.gif);"></span> <span class="CaptionBorderBottom" style="background-image:url(./layouts/tibiarl/images/content/table-headline-border.gif);"></span> <span class="CaptionEdgeLeftBottom" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> <span class="CaptionEdgeRightBottom" style="background-image:url(./layouts/tibiarl/images/content/box-frame-edge.gif);"></span> </div> </div> <table class="Table5" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div class="InnerTableContainer"> <table style="width:100%;"> <tbody> <tr> <td> <div class="TableShadowContainerRightTop"> <div class="TableShadowRightTop" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-rt.gif);"></div> </div> <div class="TableContentAndRightShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-rm.gif);"> <div class="TableContentContainer"> <table border="0" cellspacing="1" cellpadding="4" width="100%"> <tr bgcolor="#505050"> <td class="white" style="text-align: center; font-weight: bold;">Name</td> <td class="white" style="text-align: center; font-weight: bold;">Frags</td> </tr>'; $topFrags = $SQL->query('SELECT name, frags_all FROM players WHERE group_id = 1 AND account_id != 1 ORDER BY frags_all DESC LIMIT 30'); $bgcount = 0; foreach ($topFrags as $member) { $bgcount++; if(is_int($bgcount / 2)): $bgcolor = $config['site']['darkborder']; else: $bgcolor = $config['site']['lightborder']; endif; $main_content .= '<tr bgcolor="'.$bgcolor.'"> <td><a href="?subtopic=characters&name='.$member['name'].'">'.$member['name'].'</a></td> <td style="text-align: center;">'.$member['frags_all'].'</td> </tr>'; }; $main_content .= ' </table> </div> </div> <div class="TableShadowContainer"> <div class="TableBottomShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-bm.gif);"> <div class="TableBottomLeftShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-bl.gif);"></div> <div class="TableBottomRightShadow" style="background-image:url(./layouts/tibiarl/images/content/table-shadow-br.gif);"></div> </div> </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </div> '; ?> vlw Editado Fevereiro 16, 2017 8 anos por bringsz (veja o histórico de edições) Servidor de Dragon Ball Online - dbsbattleofgods.com
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.