Postado Janeiro 1, 2019 6 anos @Matador18 Tenta achar ele na pasta jss, deve estar com nome diferente Meu Curso sobre Programação para OTServer Programando OTServer Peça o seu script! Entre agora mesmo no grupo Developing Conteúdos: Spoiler • Cidade [8.60] • Cave de Boss • Widget Gesior • Autoloot 100% • [Old Client] Como Hookar Dll • Configurando VPS Windowns • [Solução] Código Caracteres Especiais Discord: Belmont#7352 Não esqueça do REP+
Postado Janeiro 10, 2021 4 anos Em 01/01/2019 em 14:34, Pedro. disse: cria um arquivo monsters.php em pages e adiciona lá dentro obs: não esquecer de trocar o diretorio do seu servidor dentro do php $otdir = '/home/otserv/'; <?php ###### AUTHOR: Colandus ###### Adaptado: Yinz $otdir = '/home/otserv/'; // In percent (highest first). $rarity = array( 'Not Rare' => 7, 'Semi Rare' => 2, 'Rare' => 0.5, 'Very Rare' => 0 ); ?> <html> <head> <title>Colandus' Monster Loot Checker 1.5</title> </head> <script language="javascript"> function toggleVisibility(obj) { var el = document.getElementById('d' + obj.id); var name = obj.innerHTML.substring(4); if(el.style.display == 'none') { obj.innerHTML = '[ -]'; el.style.display = 'block'; } else { obj.innerHTML = '[+]'; el.style.display = 'none'; } obj.innerHTML += ' ' + name; } </script> <style type="text/css"> a { color:red; font: bold 13px verdana; text-decoration: none; } a:hover { text-decoration: underline; } </style> <?php if(isset($_GET['lootrate'])) $add = '?subtopic=monsters'; echo '<a href="' . $_SERVER['PHP_SELF'] . ($add ? '?subtopic=monsters' : '') . '">Hide None</a> | '; echo '<a href="?subtopic=monsters&hidefail' . $add . '">Hide Not Found</a> | '; echo '<a href="?subtopic=monsters&hideempty' . $add . '">Hide Monsters Without Loot</a> |'; echo '<a href="?subtopic=monsters&hideempty&hidefail' . $add . '">Hide All</a>'; ?> <br /><br /> <br /><br /> <?php $items = simplexml_load_file($otdir . '/data/items/items.xml') or die('<b>Could not load items!</b>'); foreach($items->item as $v) $itemList[(int)$v['id']] = $v['name']; if(isset($_GET['lootrate'])) { $config = parse_ini_file($otdir . '/config.lua'); $lootRate = $config['rateLoot']; } $monsters = simplexml_load_file($otdir . '/data/monster/monsters.xml') or die('<b>Could not load monsters!</b>'); foreach($monsters->monster as $monster) { $loot = simplexml_load_file($otdir . '/data/monster/' . $monster['file']); if($loot) { if($item = $loot->loot->item) { echo ' <a id="' . ++$i . '" style="text-decoration: none; font: bold 14px verdana; color: orange;" href="javascript:void(0);" onclick="toggleVisibility(this)">[+] ' . $monster['name'] . '</a> <br /><div style="display: none;" id="d' . $i . '"> <pre>>>> <b><u>' . $otdir . '/' . $monster['file'] . '</u></b><br /><br />'; addLoot($item); echo '</pre></div>'; } elseif(!isset($_GET['hideempty'])) echo '<span style="font: bold 14px verdana; color: red;">[x] ' . $monster['name'] . '</span><br />'; } elseif(!isset($_GET['hidefail'])) echo '<span style="color: white;">Failed to load monster <b>' . $monster[name] . '</b> <i>(' . $monster[file] . ')</i><br />'; } function addLoot($loot, $level=1) { foreach($loot as $test) { $chance = $test['chance']; if(!$chance) $chance = $test['chance1']; printLoot($level, $test['id'], $test['countmax'], $chance); foreach($test as $k => $v) addLoot($v->item, $level + 1); } } function printLoot($level, $itemid, $count, $chance) { global $itemList, $rarity; $chance /= 1000; if(isset($_GET['lootrate'])) { global $lootRate; $chance *= $lootRate; } foreach($rarity as $lootRarity => $percent){ if($chance >= $percent) { echo str_repeat("... ", $level) . '<u>' . ($count ? $count : 1) . '</u> <span style="color: #7878FF; font-weight: bold;">' . $itemList[(int)$itemid] . '</span> ' . $itemid . ' <span style="color: #C45; font-weight: bold;">' . $lootRarity . '</span> (<span style="color: #FF9A9A;">' . $chance . '%</span>)<br />'; break; } } } ?> <br /><p style="font: bold 24px georgia;">By Colandus</p> </body> </html> adicionei em library, mas você pode mudar. em layouts/tibiacom/layouts.php da um ctrl + f e procura library <a href="?subtopic=monsters"> <div id="submenu_monters" class="Submenuitem" onmouseover="MouseOverSubmenuItem(this)" onmouseout="MouseOutSubmenuItem(this)"> <div class="LeftChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> <div id="ActiveSubmenuItemIcon_monters" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_monters" class="SubmenuitemLabel"><font color=red>Monsters</font></div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> Olá muito obrigado, coloquei aqui e funcionou, mas alguém poderia me ajudar para não aparecer o caminho da pasta dos monsters quando abre para ver os loots??
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.