Kalkulačka na lethal
//$hero=[""];
error_reporting(0);
$a=$_GET["a"];
$b=$_GET["b"];
$c=$_GET["c"];
$d=$_GET["d"];
$e=$_GET["e"];
$f=$_GET["f"];
$g=$_GET["g"];
$celkem=$a+$b+$c+$d+$e+$f+$g;
$pole = array ($a,$b,$c,$d,$e,$f,$g);
/*function vylepsi($dam) {
function vylepsi($dam) {
if ($dam != "-") {
$dam=$dam+$GLOBALS["buff"];
}
}*/
/*
$buff= text pred vysledkem
$bv= Buff Value, neboli damage ktery minionum prida.$_COOKIE
$hd= Damage ktery udeli vas hrdina.
*/
switch ($_GET["buff"]) {
case "nic":
$buff="Bez buffu";
break;
case "bl":
$buff="S Bloodlustem";
$bv="3";
break;
case "sr":
$buff="Se Savage Roarem";
$bv="2";
$hd=$hd+"2";
break;
}
for ($i = 0;$i !== count($pole);$i++) {
if ($pole[$i] === "0") {
$pole[$i]=$pole[$i]+$bv;
}
}
for ($i = 0;$i != count($pole);$i++) {
$cp=$cp+$pole[$i];
}
$cp=$cp+$hd;
if ($cp != "0") {
echo "
$buff se celkovy damage rovna $cp.";
}
else {
echo "
Neudelite zadny damage";
}
?>
Tu "reklamu"(citat) trochu odsuneme aby nas neotravovala pri programovani