TFS 1.4.2 MyAcc
Hi. I would like to make a script on the page check if a given boss is alive, and if not, how much time is left until the next boss respawns.
For example, Orshabaal is on the server, it shows him on the "Alive" page, if he is dead - it shows the time until the next boss respawns, e.g.
I received information that I need to create a table with bosses, save and update it. I have no idea how to do it
I was thinking of trying to make it auto respawn at a specific time on a specific day with this script (dont need checker, only auto respawn):
Hi. I would like to make a script on the page check if a given boss is alive, and if not, how much time is left until the next boss respawns.
For example, Orshabaal is on the server, it shows him on the "Alive" page, if he is dead - it shows the time until the next boss respawns, e.g.
Ferumbras
Time to respawn: 17:24:41.
I received information that I need to create a table with bosses, save and update it. I have no idea how to do it
I was thinking of trying to make it auto respawn at a specific time on a specific day with this script (dont need checker, only auto respawn):
Hi! This system it's the outcome of a request thread Lua - [1.X] Boss checker (https://otland.net/threads/1-x-boss-checker.281905/#post-2701825), it has been made by @Xikini and it's been correctly tested on TFS 1.5 downgrades.
It has some samples for daily bosses (in this case Orshabaal, Ferumbras, Ghazbaran), and added Pits of Inferno bosses, just change the coordinates and everything will work. If you set the day to Any it will show the current day as spawn day.
To install, go to data/scripts and create a new file with:
It has some samples for daily bosses (in this case Orshabaal, Ferumbras, Ghazbaran), and added Pits of Inferno bosses, just change the coordinates and everything will work. If you set the day to Any it will show the current day as spawn day.
To install, go to data/scripts and create a new file with:
LUA:
local raidBossInformation = {
{...
- ralke
- Replies: 9
- Forum: Revscripts
PHP:
if (!function_exists('checkMonsterOnline')) {
function checkMonsterOnline($monsterName) {
global $db;
if (!$db->hasTable('boss_status')) {
return false;
}
try {
$query = $db->query("SELECT alive FROM boss_status WHERE name = " . $db->quote($monsterName));
if ($query->rowCount() > 0) {
$result = $query->fetch();
return (bool)$result['alive'];
}
return false;
}
catch (PDOException $e) {
error_log("Błąd sprawdzania statusu bossa: " . $e->getMessage());
return false;
}
}
}
PHP:
<div class="right_box">
<div class="corner_lt"></div><div class="corner_rt"></div>
<div class="corner_lb"></div><div class="corner_rb"></div>
<div class="title">
<span class="title-like-menu">Bossy</span>
</div>
<div class="content">
<div class="rise-up-content" style="text-align: center;">
<div style="color: #00ff00; font-weight: bold; margin-bottom: 5px;">
Orshabaal
</div>
<img src="<?= $template_path; ?>/images/Orshabaal.gif" alt="Orshabaal">
<div style="margin-top: 5px;">
<?php
$monsterAlive = checkMonsterOnline("Orshabaal");
if($monsterAlive){
echo '<span style="color: #00ff00; font-weight: bold;">Alive</span>';
} else {
echo '<span style="color: #ff0000; font-weight: bold;">Death</span>';
}
?>
</div>
</div>
</div>
<div class="border_bottom"></div>
</div>