Ir para conteúdo
Close

celohere

Membro
  • Total de itens

    11
  • Registro em

  • Última visita

Sobre celohere

  • Rank
    Padeiro

Informação de Perfil

  • Genero
    Masculino
  • Eu sou
    Tibiano

Últimos Visitantes

241 visualizações
  1. obrigado pela resposta ,mas nao funcionou =( , eu consegui uma mais ou menos , nao e do jeito que eu queria mas talvez de pra modificar <span class="pagination" float: "right"> <?php $pages = ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($scores[$type]) / $highscore['rowsPerPage']))); for ($i = 0; $i < $pages; $i++) { $x = $i + 1; if ($x == $page) echo "<a href=\"?".$_SERVER['QUERY_STRING']."&pag=".$x."\" class=\"current\">".$x."</a>"; else echo "<a href=\"?".$_SERVER['QUERY_STRING']."&pag=".$x."\">".$x."</a>"; } ?> </span>
  2. bom dia, eu estou tentando deixar meu highscores mais bonito, e gostaria de adcionar uma paginaçao do tipo que apenas clica pra ir a proxima pagina de skills, e a partir da segunda pagina apareça um back pra retornar pra pagina anterior.Assim como nessas fotos : Desde ja agradeço muito , aqui esta meu highscores.php eu removi paginaçao antiga pq era mto feia :P <?php require_once 'engine/init.php'; include 'layout/overall/header.php'; if ($config['log_ip']) { znote_visitor_insert_detailed_data(3); } // Fetch highscore type $type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7; if ($type > 9) $type = 7; // Fetch highscore vocation $configVocations = $config['vocations']; //$debug['configVocations'] = $configVocations; $vocationIds = array_keys($configVocations); $vocation = 'all'; if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) { $vocation = (int)$_GET['vocation']; if (!in_array($vocation, $vocationIds)) { $vocation = "all"; } } // Fetch highscore page $page = getValue(@$_GET['page']); if (!$page || $page == 0) $page = 1; else $page = (int)$page; $highscore = $config['highscore']; $loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false; $loadOutfits = ($config['show_outfits']['highscores']) ? true : false; $rows = $highscore['rows']; $rowsPerPage = $highscore['rowsPerPage']; function skillName($type) { $types = array( 1 => "Club", 2 => "Sword", 3 => "Axe", 4 => "Distance", 5 => "Shield", 6 => "Fish", 7 => "Experience", // Hardcoded 8 => "Magic Level", // Hardcoded 9 => "Fist", // Since 0 returns false I will make 9 = 0. :) ); return $types[(int)$type]; } function pageCheck($index, $page, $rowPerPage) { return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false; } $cache = new Cache('engine/cache/highscores'); if ($cache->hasExpired()) { $vocGroups = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits); $cache->setContent($vocGroups); $cache->save(); } else { $vocGroups = $cache->load(); } if ($vocGroups) { $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]]; ?> <br><img src="layout/images/titles/t_highscores.png"/><p><br> <h1>Ranking for <?php echo skillName($type) ?></h1> <table> <tbody> <tr><td style="background: none;"> <table id="highscoresTable" class="table table-striped table-hover"> <tbody><tr bgcolor="#20222c"> <td width="6%"class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Rank</td> <td width="40%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Name</td> <td width="20%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Vocation</td> <td width="15%" class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Level</td> <?php if ($type === 7) echo "<td colspan='1' style='background-color: #5d5b5b; color: #f9f6f6;' >Experience</td>"; ?> </tr> <?php for ($i = 0; $i < count($vocGroup[$type]); $i++) { if ($vocGroup[$type] === false) { ?> <tr> <td colspan="5">Nothing to show here yet.</td> </tr> <?php } else { if (pageCheck($i, $page, $rowsPerPage)) { $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png"> ' : ''; ?> <tr> <?php if ($loadOutfits): ?> <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&addons=<?php echo $vocGroup[$type][$i]['addons']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td> <?php endif; ?> <td><?php echo $i+1; ?></td> <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td> <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td> <td><?php echo $vocGroup[$type][$i]['value']; ?></td> <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?> </tr> <?php } } } ?> </table> <th width="15%" valign="top" align="right"> <table border="0" cellpadding="1" cellspacing="1"> <tbody><tr bgcolor="#20222c"> <td class="whites" style=" background-color: #5d5b5b; color: #f9f6f6; ">Choose a Skill</td> </tr> <tr bgcolor="#1b1e26"> <td> <a href="highscores.php" class="size_xs">Experience</a><br> <a href="highscores.php?type=8&vocation=all&page=1" class="size_xs">Magic</a><br> <a href="highscores.php?type=5&vocation=all&page=1" class="size_xs">Shielding</a><br> <a href="highscores.php?type=4&vocation=all&page=1" class="size_xs">Distance</a><br> <a href="highscores.php?type=9&vocation=all&page=1" class="size_xs">Fist</a><br> <a href="highscores.php?type=2&vocation=all&page=1" class="size_xs">Sword</a><br> <a href="highscores.php?type=3&vocation=all&page=1" class="size_xs">Axe</a><br> <a href="highscores.php?type=1&vocation=all&page=1" class="size_xs">Club</a><br> <a href="highscores.php?type=6&vocation=all&page=1" class="size_xs">Fishing</a><br> </td> </tr> </tbody></table> </th></tr></tbody></table> <?php } include 'layout/overall/footer.php'; ?>
  3. eu consegui resolver essa parte , meu problema agora e a paginação , gostaria de colocar um back/next abaixo do rank poderia me ajudar? <?php require_once 'engine/init.php'; include 'layout/overall/header.php'; if ($config['log_ip']) { znote_visitor_insert_detailed_data(3); } // Fetch highscore type $type = (isset($_GET['type'])) ? (int)getValue($_GET['type']) : 7; if ($type > 9) $type = 7; // Fetch highscore vocation $configVocations = $config['vocations']; //$debug['configVocations'] = $configVocations; $vocationIds = array_keys($configVocations); $vocation = 'all'; if (isset($_GET['vocation']) && is_numeric($_GET['vocation'])) { $vocation = (int)$_GET['vocation']; if (!in_array($vocation, $vocationIds)) { $vocation = "all"; } } // Fetch highscore page $page = getValue(@$_GET['page']); if (!$page || $page == 0) $page = 1; else $page = (int)$page; $highscore = $config['highscore']; $loadFlags = ($config['country_flags']['enabled'] && $config['country_flags']['highscores']) ? true : false; $loadOutfits = ($config['show_outfits']['highscores']) ? true : false; $rows = $highscore['rows']; $rowsPerPage = $highscore['rowsPerPage']; function skillName($type) { $types = array( 1 => "Club", 2 => "Sword", 3 => "Axe", 4 => "Distance", 5 => "Shield", 6 => "Fish", 7 => "Experience", // Hardcoded 8 => "Magic Level", // Hardcoded 9 => "Fist", // Since 0 returns false I will make 9 = 0. :) ); return $types[(int)$type]; } function pageCheck($index, $page, $rowPerPage) { return ($index < ($page * $rowPerPage) && $index >= ($page * $rowPerPage) - $rowPerPage) ? true : false; } $cache = new Cache('engine/cache/highscores'); if ($cache->hasExpired()) { $vocGroups = fetchAllScores($rows, $config['TFSVersion'], $highscore['ignoreGroupId'], $configVocations, $vocation, $loadFlags, $loadOutfits); $cache->setContent($vocGroups); $cache->save(); } else { $vocGroups = $cache->load(); } if ($vocGroups) { $vocGroup = (is_array($vocGroups[$vocation])) ? $vocGroups[$vocation] : $vocGroups[$vocGroups[$vocation]]; ?> <h1>Ranking for <?php echo skillName($type) .", ". (($vocation === 'all') ? 'any vocation' : vocation_id_to_name($vocation)) ?>.</h1> <form action="" method="GET"> <select name="type"> <option value="7" <?php if ($type == 7) echo "selected"; ?>>Experience</option> <option value="8" <?php if ($type == 8) echo "selected"; ?>>Magic</option> <option value="5" <?php if ($type == 5) echo "selected"; ?>>Shield</option> <option value="2" <?php if ($type == 2) echo "selected"; ?>>Sword</option> <option value="1" <?php if ($type == 1) echo "selected"; ?>>Club</option> <option value="3" <?php if ($type == 3) echo "selected"; ?>>Axe</option> <option value="4" <?php if ($type == 4) echo "selected"; ?>>Distance</option> <option value="6" <?php if ($type == 6) echo "selected"; ?>>Fish</option> <option value="9" <?php if ($type == 9) echo "selected"; ?>>Fist</option> </select> <select name="vocation"> <option value="all" <?php if (!is_int($vocation)) echo "selected"; ?>>Any vocation</option> <?php foreach ($configVocations as $v_id => $v_data) { if ($v_data['fromVoc'] === false) { $selected = (is_int($vocation) && $vocation == $v_id) ? " selected $vocation = $v_id" : ""; echo '<option value="'. $v_id .'"'. $selected .'>'. $v_data['name'] .'</option>'; } } ?> </select> <select name="page"> <?php $pages = ceil(min(($highscore['rows'] / $highscore['rowsPerPage']), (count($vocGroup[$type]) / $highscore['rowsPerPage']))); for ($i = 0; $i < $pages; $i++) { $x = $i + 1; if ($x == $page) echo "<option value='".$x."' selected>Page: ".$x."</option>"; else echo "<option value='".$x."'>Page: ".$x."</option>"; } ?> </select> <input type="submit" value=" View " class="btn btn-info"> </form> <table id="highscoresTable" class="table table-striped table-hover"> <tr class="yellow"> <?php if ($loadOutfits) echo "<td>Outfit</td>"; ?> <td>Rank</td> <td>Name</td> <td>Vocation</td> <td>Level</td> <?php if ($type === 7) echo "<td>Points</td>"; ?> </tr> <?php for ($i = 0; $i < count($vocGroup[$type]); $i++) { if ($vocGroup[$type] === false) { ?> <tr> <td colspan="5">Nothing to show here yet.</td> </tr> <?php } else { if (pageCheck($i, $page, $rowsPerPage)) { $flag = ($loadFlags === true && strlen($vocGroup[$type][$i]['flag']) > 1) ? '<img src="' . $config['country_flags']['server'] . '/' . $vocGroup[$type][$i]['flag'] . '.png"> ' : ''; ?> <tr> <?php if ($loadOutfits): ?> <td class="outfitColumn"><img src="<?php echo $config['show_outfits']['imageServer']; ?>?id=<?php echo $vocGroup[$type][$i]['type']; ?>&addons=<?php echo $vocGroup[$type][$i]['addons']; ?>&head=<?php echo $vocGroup[$type][$i]['head']; ?>&body=<?php echo $vocGroup[$type][$i]['body']; ?>&legs=<?php echo $vocGroup[$type][$i]['legs']; ?>&feet=<?php echo $vocGroup[$type][$i]['feet']; ?>" alt="img"></td> <?php endif; ?> <td><?php echo $i+1; ?></td> <td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $vocGroup[$type][$i]['name']; ?>"><?php echo $vocGroup[$type][$i]['name']; ?></a></td> <td><?php echo vocation_id_to_name($vocGroup[$type][$i]['vocation']); ?></td> <td><?php echo $vocGroup[$type][$i]['value']; ?></td> <?php if ($type === 7) echo "<td>". $vocGroup[$type][$i]['experience'] ."</td>"; ?> </tr> <?php } } } ?> </table> <?php } include 'layout/overall/footer.php'; ?>
  4. Boa tarde pessoal eu estou tentando colocar uma lista pra selecionar as skills ao lado dos highscores , mas nao to conseguindo sozinho =( , aqui vao umas fotos pra ilustrar melhor a primeira foto e como eu quero deixar , a segunda foi o melhor que eu consegui , se alguem puder ajudar eu agradeço mto
  5. Acredito que seja o mapa do antigo Pbot aqui vai o download pra quem ainda procura por ele pbot.rar pbot.rar
  6. Boa tarde eu to tentando editar um otclient , e gostaria que ficasse como na foto(mapa, barra de hp e mp, inventario e a posiçao dos botoes , tudo ) , alguem pode me ajudar?
  7. Gostaria de pedir que alguem convertesse esse layout para o gesior (é um layout para znote).Desde ja muito obrigado http://www.halfaway.net/layouts/TibiaLayoutConvertedByHalfAway.zip
  8. boa tarde , eu uso o tfs 1.2 versao 8.0 ( https://github.com/ninjalulz/forgottenserver/tree/8.0 ) , so que ele tem um pequeno problema , nao tem auto ban pra excessive player killing como nas versoes antigas . Eu gostaria que alguem me ajudasse a arrumar isso de algum jeito ( provavelmente teria que adicionar algo nas sources e a opçao no config.lua ,) conto com a ajuda de vcs ,obg edit:Resolvido adcionando o seguinte script creaturescripts/scripts/playerdeath.lua local deathListEnabled = true local maxDeathRecords = 5 local killsToBan = 6 local killsBanLenght = 3 function onDeath(player, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) local playerId = player:getId() if nextUseStaminaTime[playerId] ~= nil then nextUseStaminaTime[playerId] = nil end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are dead.") local byPlayer = 0 local killerName if killer ~= nil then if killer:isPlayer() then byPlayer = 1 else local master = killer:getMaster() if master and master ~= killer and master:isPlayer() then killer = master byPlayer = 1 end end killerName = killer:getName() else killerName = "field item" end local byPlayerMostDamage = 0 local mostDamageKillerName if mostDamageKiller ~= nil then if mostDamageKiller:isPlayer() then byPlayerMostDamage = 1 else local master = mostDamageKiller:getMaster() if master and master ~= mostDamageKiller and master:isPlayer() then mostDamageKiller = master byPlayerMostDamage = 1 end end mostDamageName = mostDamageKiller:getName() else mostDamageName = "field item" end local playerGuid = player:getGuid() db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (" .. playerGuid .. ", " .. os.time() .. ", " .. player:getLevel() .. ", " .. db.escapeString(killerName) .. ", " .. byPlayer .. ", " .. db.escapeString(mostDamageName) .. ", " .. byPlayerMostDamage .. ", " .. (unjustified and 1 or 0) .. ", " .. (mostDamageUnjustified and 1 or 0) .. ")") local resultId = db.storeQuery("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. playerGuid) local deathRecords = 0 local tmpResultId = resultId while tmpResultId ~= false do tmpResultId = result.next(resultId) deathRecords = deathRecords + 1 end if resultId ~= false then result.free(resultId) end local limit = deathRecords - maxDeathRecords if limit > 0 then db.asyncQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. playerGuid .. " ORDER BY `time` LIMIT " .. limit) end if byPlayer == 1 then local targetGuild = player:getGuild() targetGuild = targetGuild and targetGuild:getId() or 0 if targetGuild ~= 0 then local killerGuild = killer:getGuild() killerGuild = killerGuild and killerGuild:getId() or 0 if killerGuild ~= 0 and targetGuild ~= killerGuild and isInWar(playerId, killer:getId()) then local warId = false resultId = db.storeQuery("SELECT `id` FROM `guild_wars` WHERE `status` = 1 AND ((`guild1` = " .. killerGuild .. " AND `guild2` = " .. targetGuild .. ") OR (`guild1` = " .. targetGuild .. " AND `guild2` = " .. killerGuild .. "))") if resultId ~= false then warId = result.getDataInt(resultId, "id") result.free(resultId) end if warId ~= false then db.asyncQuery("INSERT INTO `guildwar_kills` (`killer`, `target`, `killerguild`, `targetguild`, `time`, `warid`) VALUES (" .. db.escapeString(killerName) .. ", " .. db.escapeString(player:getName()) .. ", " .. killerGuild .. ", " .. targetGuild .. ", " .. os.time() .. ", " .. warId .. ")") end end end local skullTime = killer:getSkullTime() if skullTime > 0 then local kills = math.ceil(skullTime / configManager.getNumber(configKeys.FRAG_TIME)) if kills >= killsToBan then local timeNow = os.time() db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. killer:getAccountId() .. ", " .. db.escapeString("Excessive Unjustified Player Killing.") .. ", " .. timeNow .. ", " .. timeNow + (killsBanLenght * 86400) .. ", 1)") killer:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) killer:remove() end end end end
  9. link funcionando https://www.4shared.com/zip/UTuDcIZcei/otxserver-otxv2_8.html scan https://www.virustotal.com/#/file/3ee8112da6720b9deb024e635b72a07dab246cbbf7e46292727dc9fc6b164763/detection

Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia partindo do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer publicidade para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução! A publicação do seu anuncio é instantânea!

×
×
  • Criar Novo...