pour le faire marcher il vous faudra easyphp, je compte pas faire de support sur comment installer l'ensemble, je partage simplement l'outils qui permet d'être le plus efficace possible sur le farm MVP.
- Code: Tout sélectionner
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
<!--
body {
font:11px Verdana;
}
input {
font:11px Verdana;
}
input.hide {
border: 0;
margin-left: 4px;
width:55px;
}
table.t1 {
margin-left:10%;
float:left;
border: 1px solid black;
border-collapse: collapse;
}
table.t2 {
margin-right:16%;
float:right;
border: 1px solid black;
border-collapse: collapse;
}
-->
</style>
<script type="text/javascript">
// <![CDATA[
function date( a, s )
{
var d = isNaN( s *= 1000 ) ? new Date() : new Date( s ), f = d.getTime();
return ( '' + a ).replace( /H|i|s/g, function( a )
{
switch ( a )
{
case 'H' : return ( '0' + d.getHours() ).slice(-2);
case 'i' : return ( '0' + d.getMinutes() ).slice(-2);
case 's' :
default : return ( '0' + d.getSeconds() ).slice(-2);
};
});
}
function test()
{
for( i = 1; i <= 52; i++ )
{
var time = new Date();
time = time.getTime() / 1000;
var seconds = time.toFixed(0);
var timerrespawn = document.getElementById( i ).title;
var data = new Array();
data = timerrespawn.split(",");
var kill = parseInt(data[0]), minspawn = parseInt(data[1]), maxspawn = parseInt(data[2]);
var respawn = (kill + minspawn - seconds);
if( respawn > 0 && respawn <= maxspawn )
{
if( respawn < 300 )
{
document.getElementById( i ).style.color = "green";
document.getElementById( i ).style.fontWeight = "bold";
}
aff = date("H", respawn - 3600) + ":" + date("i", respawn) + ":" + date("s", respawn);
}
if( respawn < - (maxspawn - minspawn + 1200) )
{
document.getElementById( i ).style.color = "black";
document.getElementById( i ).style.fontWeight = "";
aff = "Inconnu";
}
else if( respawn < - (maxspawn - minspawn) )
{
document.getElementById( i ).style.color = "red";
document.getElementById( i ).style.fontWeight = "bold";
aff = "Spawn";
}
else if( respawn <= 0 )
{
document.getElementById( i ).style.color = "orange";
document.getElementById( i ).style.fontWeight = "bold";
aff = date("H", (respawn + 3600) * -1) + ":" + date("i", (respawn + 3600) * -1) + ":" + date("s", (respawn + 3600) * -1); // mettre couleur orange
}
document.getElementById( i ).innerHTML = (aff);
}
setTimeout("test()", 1000);
return;
}
// ]]>
</script>
</head>
<body onload="test();">
<script language="javascript" type="text/javascript" src="./tooltip.js "></script>
<?php
header("REFRESH:30");
$ipServeur = "localhost";
$loginSql = "xxx";
$passSql = "xxx";
$dbSql = "xxx";
$baseSql = "`mvp_table`";
$nomscript = $_SERVER['PHP_SELF'];
$link = mysql_connect($ipServeur, $loginSql, $passSql);
/*
Status :
1 = dépassé aléatoire
2 = en aléatoire
3 = en recharge
4 = inconnu
*/
if( $link )
{
$db = mysql_select_db($dbSql, $link);
if( $db )
{
$result = mysql_query("SELECT * FROM $baseSql ORDER BY status ASC, temps_spawn ASC, mvpname ASC");
if( $result )
{
if( isset($_POST["refresh"]) )
{
header("Location:$nomscript");
}
else if( isset($_POST["button"]) && isset($_POST["id"]) && isset($_POST["htuer"]) )
{
$res = mysql_query("SELECT `heure_kill` FROM $baseSql WHERE `id` = '" . $_POST["id"] . "'");
$data = mysql_fetch_array($res);
mysql_free_result($res);
$heure_kill = $_POST["heure_kill"];
if( ereg("^[0-2][0-9]:[0-6][0-9]:[0-6][0-9]$", $heure_kill) )
{
list( $heure , $minute , $seconde ) = explode(':', $heure_kill);
if( $heure > 24 ) $heure = 24;
$heure_kill = mktime($heure, $minute, $seconde);
}
else
$heure_kill = "0";
$sql = "UPDATE $baseSql SET `heure_kill` = '" . $heure_kill . "', `lastkill` = '" . $data["heure_kill"] . "', `status` = '3' WHERE `id` = '" . $_POST["id"] . "'";
mysql_query($sql);
header("Location:$nomscript");
}
else if( isset($_POST["button"]) && isset($_POST["id"]) && isset($_POST["ctuer"]) )
{
$res = mysql_query("SELECT `heure_kill` FROM $baseSql WHERE `id` = '" . $_POST["id"] . "'");
$data = mysql_fetch_array($res);
mysql_free_result($res);
$sql = "UPDATE $baseSql SET `heure_kill` = '" . TIME() . "', `lastkill` = '" . $data["heure_kill"] . "', `status` = '3' WHERE `id` = '" . $_POST["id"] . "'";
mysql_query($sql);
header("Location:$nomscript");
}
else if( isset($_POST["reset"]) && isset($_POST["id"]) && isset($_POST["creset"]) )
{
$sql = "UPDATE $baseSql SET `heure_kill` = '0', `temps_spawn` = '0', `lastkill` = '0', `status` = '4' WHERE `id` = '" . $_POST["id"] . "'";
mysql_query($sql);
header("Location:$nomscript");
}
else if( isset($_POST["resetall"]) && isset($_POST["cresetall"]) )
{
$sql = "UPDATE $baseSql SET `heure_kill` = '0', `temps_spawn` = '0', `lastkill` = '0', `status` = '4'";
mysql_query($sql);
header("Location:$nomscript");
}
echo "
<table border=\"1\" cellpadding=\"2\" class=\"t1\">
<caption><font color=\"green\"><strong>5Minute avant aléatoire</strong></font> - <font color=\"orange\"><strong>En aléatoire</strong></font></caption>
<tr>
<th><center><form method=\"post\"><input type=\"checkbox\" name=\"cresetall\" value=\"1\" /><input type=\"submit\" name=\"resetall\" value=\"Reset\" /></form></center></th>
<th width=\"220\"><center>MVP</center></th>
<th width=\"90\"><center>Tué à </center></th>
<th width=\"70\"><center>Respawn</center></th>
<th width=\"70\"><center>MIN</center></th>
<th width=\"70\"><center>MAX</center></th>
<th><form method=\"post\"><input type=\"submit\" name=\"refresh\" value=\"Refresh\"></form></th>
</tr>";
$count = mysql_num_rows($result);
$i = 0;
while( $array = mysql_fetch_array($result) )
{
$id = $array["id"];
$hinput = "hinput" . $array["id"];
$htuer = "htuer" . $array["id"];
$ctuer = "ctuer" . $array["id"];
$mvpnameaff = $array["mvpname"] . " (" . $array["map"] . ")";
$mapname = $array["map"] . ".gif";
$respawn = (($array["heure_kill"] + $array["min_delay_spawn"]) - TIME());
$java = $array["heure_kill"] . "," . $array["min_delay_spawn"] . "," . $array["max_delay_spawn"];
$alea = ($array["max_delay_spawn"] - $array["min_delay_spawn"]);
$lastkill_date = "Dernier kill le ";
$lastkill_date .= date("d-m-y \Ã H:i:s", $array["lastkill"]);
if( $lastkill_date == "Dernier kill le 01-01-70 Ã 01:00:00" ) $lastkill_date = "Aucun enregistrement de dernier kill.";
if( $respawn > 0 && ($respawn <= $array["max_delay_spawn"]) ) $status = 3;
if( $respawn <= 0 ) $status = 2;
if( $respawn < -$alea ) $status = 1;
if( $respawn < -($alea + 1200) ) $status = 4;
switch( $status )
{
case 1:
$kill_date = date("H:i:s", $array["heure_kill"]);
mysql_query("UPDATE $baseSql SET `status` = '1', `temps_spawn` = '$respawn' WHERE `id` = '$id'");
break;
case 2:
$kill_date = date("H:i:s", $array["heure_kill"]);
mysql_query("UPDATE $baseSql SET `status` = '2', `temps_spawn` = '$respawn' WHERE `id` = '$id'");
break;
case 3:
$kill_date = date("H:i:s", $array["heure_kill"]);
mysql_query("UPDATE $baseSql SET `status` = '3', `temps_spawn` = '$respawn' WHERE `id` = '$id'");
break;
default:
$kill_date = "Inconnu";
mysql_query("UPDATE $baseSql SET `status` = '4', `temps_spawn` = '0' WHERE `id` = '$id'");
break;
}
if( $array["heure_kill"] == 0 )
{
$kill_date = "Inconnu";
$status = 4;
}
$fix = ($respawn < -1000000)?(3600):(0);
$respawn_min = ($array["heure_kill"] + $array["min_delay_spawn"] - $fix);
$respawn_min_heure = ($kill_date == "Inconnu")?(date("H\hi\m", $array["min_delay_spawn"] - 3600)):(date("H\hi\m", $respawn_min));
$respawn_max = ($array["heure_kill"] + $array["max_delay_spawn"] - $fix);
$respawn_max_heure = ($kill_date == "Inconnu")?(date("H\hi\m", $array["max_delay_spawn"] - 3600)):(date("H\hi\m", $respawn_max));
if( $i == $count >> 1 )
{
echo "
</table>
<table align=\"center\" border=\"1\" cellpadding=\"2\" caption=\"1\" class=\"t2\">
<caption><font color=\"green\"><strong>5Minute avant aléatoire</strong></font> - <font color=\"orange\"><strong>En aléatoire</strong></font></caption>
<tr>
<th><center><form method=\"post\"><input type=\"checkbox\" name=\"cresetall\" value=\"1\" /><input type=\"submit\" name=\"resetall\" value=\"Reset\" /></form></center></th>
<th width=\"220\"><center>MVP</center></th>
<th width=\"90\"><center>Tué à </center></th>
<th width=\"70\"><center>Respawn</center></th>
<th width=\"70\"><center>MIN</center></th>
<th width=\"70\"><center>MAX</center></th>
<th><form method=\"post\"><input type=\"submit\" name=\"refresh\" value=\"Refresh\"></form></th>
</tr>";
}
echo "
<tr>
<form method=\"post\">
<td><center><input type=\"checkbox\" name=\"creset\" value=\"\" /><input type=\"hidden\" name=\"id\" value=\"$id\" /><input type=\"submit\" name=\"reset\" value=\"Reset\" /></center></td>
<td onmouseover=\"Tip('<img src=../images/maps/$mapname />', WIDTH, 200, HEIGHT, 200)\" onmouseout=\"UnTip()\">$mvpnameaff</td>
<td title=\"$lastkill_date\">
<input id=\"$hinput\" name=\"heure_kill\" class=\"hide\" type=\"text\" value=\"$kill_date\" disabled/>
<input type=\"checkbox\" name=\"htuer\" id=\"$htuer\" OnClick=\"if($htuer.checked == true) $hinput.disabled = false; else $hinput.disabled = true;\" />
</td>
<td><center id=\"$id\" title=\"$java\"></center></td>
<td><center>$respawn_min_heure</center></td>
<td><center>$respawn_max_heure</center></td>
<td>
<center>
<input type=\"submit\" name=\"button\" value=\"Mort\" />
<input type=\"checkbox\" name=\"ctuer\" id=\"$ctuer\" />
</center>
</td>
</form>
</tr>";
$i++;
}
?>
</table>
</center>
<?php
mysql_free_result($result);
}
else
{
echo "Aucun résultat.";
}
}
else
{
echo "Aucun résultat.";
}
}
else
{
echo "Aucun résultat.";
}
mysql_close($link);
?>
</body>
</html>
- Code: Tout sélectionner
CREATE TABLE IF NOT EXISTS `mvp_table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mvpname` varchar(255) NOT NULL,
`status` int(11) NOT NULL,
`lastkill` int(11) NOT NULL,
`heure_kill` int(11) NOT NULL,
`temps_spawn` int(11) NOT NULL,
`min_delay_spawn` int(11) NOT NULL,
`max_delay_spawn` int(11) NOT NULL,
`map` varchar(255) NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=54 ;
INSERT INTO `mvp_table` VALUES(27, 'Turtle General', 4, 0, 0, 0, 3600, 4200, 'tur_dun04');
INSERT INTO `mvp_table` VALUES(18, 'Stormy Knight', 4, 0, 0, 0, 3600, 4200, 'xmas_dun02');
INSERT INTO `mvp_table` VALUES(17, 'Moonlight Flower', 4, 0, 0, 0, 3600, 4200, 'pay_dun04');
INSERT INTO `mvp_table` VALUES(10, 'Golden Thief Bug', 4, 0, 0, 0, 3600, 4200, 'prt_sewb4');
INSERT INTO `mvp_table` VALUES(24, 'Osiris', 4, 0, 0, 0, 3600, 4200, 'moc_pryd04');
INSERT INTO `mvp_table` VALUES(15, 'Amon Ra', 4, 0, 0, 0, 3600, 4200, 'moc_pryd06');
INSERT INTO `mvp_table` VALUES(20, 'Pharaoh', 4, 0, 0, 0, 3600, 4200, 'in_sphinx5');
INSERT INTO `mvp_table` VALUES(5, 'Dark Lord', 4, 0, 0, 0, 3600, 4200, 'gl_chyard');
INSERT INTO `mvp_table` VALUES(23, 'Dracula', 4, 0, 0, 0, 3600, 4200, 'gef_dun01');
INSERT INTO `mvp_table` VALUES(8, 'Samurai Specter', 4, 0, 0, 0, 5460, 6060, 'ama_dun03');
INSERT INTO `mvp_table` VALUES(12, 'Evil Snake Lord', 4, 0, 0, 0, 5650, 6250, 'gon_dun03');
INSERT INTO `mvp_table` VALUES(2, 'White Lady', 4, 0, 0, 0, 7000, 7600, 'lou_dun03');
INSERT INTO `mvp_table` VALUES(45, 'Baphomet', 4, 0, 0, 0, 7200, 7800, 'prt_maze03');
INSERT INTO `mvp_table` VALUES(11, 'Drake', 4, 0, 0, 0, 7200, 7800, 'treasure02');
INSERT INTO `mvp_table` VALUES(6, 'Baphomet', 4, 0, 0, 0, 7200, 7800, 'gef_dun03');
INSERT INTO `mvp_table` VALUES(7, 'Doppelganger', 4, 0, 0, 0, 7200, 7800, 'gef_dun03');
INSERT INTO `mvp_table` VALUES(3, 'Dark Lord', 4, 0, 0, 0, 7200, 7800, 'gef_dun03');
INSERT INTO `mvp_table` VALUES(34, 'Lord of Death', 4, 0, 0, 0, 7200, 7800, 'gef_dun03');
INSERT INTO `mvp_table` VALUES(33, 'Boitata', 4, 0, 0, 0, 7200, 7800, 'bra_dun02');
INSERT INTO `mvp_table` VALUES(13, 'Maya', 4, 0, 0, 0, 7200, 7800, 'anthell02');
INSERT INTO `mvp_table` VALUES(19, 'Vesper', 4, 0, 0, 0, 7200, 7800, 'jupe_core');
INSERT INTO `mvp_table` VALUES(21, 'Egnigem Cenia', 4, 0, 0, 0, 7200, 7800, 'lhz_dun02');
INSERT INTO `mvp_table` VALUES(48, 'Gopinich', 4, 0, 0, 0, 7200, 7800, 'mosk_dun03');
INSERT INTO `mvp_table` VALUES(4, 'Doppelganger', 4, 0, 0, 0, 7200, 7800, 'gef_dun02');
INSERT INTO `mvp_table` VALUES(22, 'Kiel D-01', 4, 0, 0, 0, 7200, 7800, 'kh_dun02');
INSERT INTO `mvp_table` VALUES(47, 'Fallen Bishop Hibram', 4, 0, 0, 0, 7200, 7800, 'abbey02');
INSERT INTO `mvp_table` VALUES(9, 'RSX-0806', 4, 0, 0, 0, 7500, 8100, 'ein_dun02');
INSERT INTO `mvp_table` VALUES(36, 'Detardeurus', 4, 0, 0, 0, 10800, 11400, 'abyss_03');
INSERT INTO `mvp_table` VALUES(38, 'Gloom Under Night', 4, 0, 0, 0, 18000, 18600, 'ra_san05');
INSERT INTO `mvp_table` VALUES(40, 'Tao Gunka', 4, 0, 0, 0, 18000, 18600, 'beach_dun');
INSERT INTO `mvp_table` VALUES(26, 'Lady Tanee', 4, 0, 0, 0, 25200, 25800, 'ayo_dun02');
INSERT INTO `mvp_table` VALUES(30, 'Eddga', 4, 0, 0, 0, 28800, 29400, 'gld_dun01');
INSERT INTO `mvp_table` VALUES(1, 'Valkyrie Randgris', 4, 0, 0, 0, 28800, 29400, 'odin_tem03');
INSERT INTO `mvp_table` VALUES(41, 'Doppelganger', 4, 0, 0, 0, 28800, 29400, 'gld_dun02');
INSERT INTO `mvp_table` VALUES(46, 'Dark Lord', 4, 0, 0, 0, 28800, 29400, 'gld_dun04');
INSERT INTO `mvp_table` VALUES(50, 'Maya', 4, 0, 0, 0, 28800, 29400, 'gld_dun03');
INSERT INTO `mvp_table` VALUES(49, 'Ifrit', 4, 0, 0, 0, 39600, 40200, 'thor_v03');
INSERT INTO `mvp_table` VALUES(42, 'Beelzebub', 4, 0, 0, 0, 43200, 43800, 'abbey03');
INSERT INTO `mvp_table` VALUES(16, 'Orc Lord', 4, 0, 0, 0, 7200, 7800, 'gef_fild10');
INSERT INTO `mvp_table` VALUES(31, 'Garm', 4, 0, 0, 0, 7200, 7800, 'xmas_fild01');
INSERT INTO `mvp_table` VALUES(51, 'Mistress', 4, 0, 0, 0, 7200, 7800, 'mjolnir_04');
INSERT INTO `mvp_table` VALUES(28, 'Phreeoni', 4, 0, 0, 0, 7200, 7800, 'moc_fild17');
INSERT INTO `mvp_table` VALUES(32, 'Eddga', 4, 0, 0, 0, 7200, 7800, 'pay_fild11');
INSERT INTO `mvp_table` VALUES(35, 'Atroce', 4, 0, 0, 0, 10800, 11400, 'ra_fild03');
INSERT INTO `mvp_table` VALUES(43, 'Atroce', 4, 0, 0, 0, 10800, 11400, 've_fild01');
INSERT INTO `mvp_table` VALUES(37, 'Atroce', 4, 0, 0, 0, 14400, 15000, 'ra_fild02');
INSERT INTO `mvp_table` VALUES(39, 'Atroce', 4, 0, 0, 0, 18000, 18600, 'ra_fild04');
INSERT INTO `mvp_table` VALUES(44, 'Atroce', 4, 0, 0, 0, 21600, 22200, 've_fild02');
INSERT INTO `mvp_table` VALUES(25, 'Orc Hero', 4, 0, 0, 0, 3600, 4200, 'gef_fild14');
INSERT INTO `mvp_table` VALUES(14, 'Thanatos', 4, 0, 0, 0, 7200, 9000, 'thana_boss');
INSERT INTO `mvp_table` VALUES(29, 'Lord of Death', 4, 0, 0, 0, 7980, 7980, 'niflheim');
INSERT INTO `mvp_table` VALUES(52, 'Bio Lab', 4, 0, 0, 0, 6000, 7800, 'lhz_dun03');
pour utilisateur débrouillards/expérimentés, google powa.
je répète je garantit pas de faire du support pour expliquer comment installer easyphp, je répondrais si l'envie me prend car c'est pas non plus simple à expliquer.
edit : maj le 02/02/14