- Registriert
- 22 Januar 2002
- Beiträge
- 3.736
- Punkte Reaktionen
- 24
Klar ne app wäre was schönes, aber ob es letztendlich soviele leute dann benutzen würden?
Das lohnt sich natürlich nicht. Dafür ist D2 zu tot
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
Herzlich Willkommen!
Nach der Schließung von inDiablo.de wurden die Inhalte und eure Accounts in dieses Forum konvertiert. Ihr könnt euch hier mit eurem alten Account weiterhin einloggen, müsst euch dafür allerdings über die "Passwort vergessen" Funktion ein neues Passwort setzen lassen.
Solltet ihr keinen Zugriff mehr auf die mit eurem Account verknüpfte Emailadresse haben, so könnt ihr euch unter Angabe eures Accountnamens, eurer alten Emailadresse sowie eurer gewünschten neuen Emailadresse an einen Administrator wenden.
Klar ne app wäre was schönes, aber ob es letztendlich soviele leute dann benutzen würden?
<?php
include($_SERVER['DOCUMENT_ROOT']."/layout/header.php");
include("affix_alvl.php");
if (!isset($_GET['type']))
die("Missing parameter 'type'");
else
$type = $_GET['type'];
if (strpos("ring amul jewl scha mcha lcha helm tors shie glov boot belt pelt phlm ashd head circ axe wand club mace hamm scep swor knif tkni taxe jave spea pole staf bow xbow h2h orb abow aspe ajav ", ($type . " ") ) === FALSE)
die("Illegal parameter 'type'");
if (!isset($_GET['ilvl']))
$ilvl = 90;
else
$ilvl = (int) $_GET['ilvl'];
if (($ilvl < 0) || ($ilvl > 99))
die("Illegal parameter 'ilvl'");
if (isset($_GET['mlvl']))
{
$mlvl = (int)$_GET['mlvl'];
if (($mlvl < 0) || ($mlvl > 99))
die("Illegal parameter 'mlvl'");
}
if (isset($_GET['qlvl']))
{
$qlvl = (int)$_GET['qlvl'];
if (($qlvl < 0) || ($qlvl > 99))
die("Illegal parameter 'qlvl'");
}
if ($ilvl == -1)
$alvl = -1;
else
$alvl = GetAlvl($ilvl, $qlvl, $mlvl);
if (!isset($_GET['item']))
die("Illegal parameter 'item'");
else
$item = htmlspecialchars($_GET['item']);
if (!isset($_GET['lang']))
$lang = "de";
else
$lang = $_GET['lang'];
if (strpos("de en ", $lang . " " ) === FALSE)
die("Illegal parameter 'lang'");
if (!isset($_GET['version']))
$version = "lod";
else
$version = $_GET['version'];
if (strpos("lod d2c ", $version . " " ) === FALSE)
die("Illegal parameter 'version'");
if(!isset($_GET['patch']))
$patch = "111";
else
$patch = $_GET['patch'];
if (strpos("109 110 111 ", $patch . " " ) === FALSE)
die("Illegal parameter 'patch'");
if ($patch=="110") $patchs = "1.10";
else if ($patch=="111") $patchs = "1.11";
else $patchs = "1.09";
$sortbys = "prefix`,`group`,`lvl`,`maxlvl";
?>
<style type="text/css">
<!--
tr.header { background-color:#45070E; }
tr.one { background-color:#2E2927; }
tr.two { background-color:#151515; }
input.black { font-family:Verdana,Arial,Helvetica,sans-serif; background-color:#000000; color:#D0CCD0; border-width:0px; font-size: 10pt;}
input.one { font-family:Verdana,Arial,Helvetica,sans-serif; background-color:#2E2927; color:#D0CCD0; border-width:0px; font-size: 10pt;}
input.two { font-family:Verdana,Arial,Helvetica,sans-serif; background-color:#151515; color:#D0CCD0; border-width:0px; font-size: 10pt;}
input.onered { font-family:Verdana,Arial,Helvetica,sans-serif; background-color:#2E2927; color:#FF0000; border-width:0px; font-size: 10pt;}
input.oneblue { font-family:Verdana,Arial,Helvetica,sans-serif; background-color:#2E2927; color:#0000FF; border-width:0px; font-size: 10pt;}
input.twoblue { font-family:Verdana,Arial,Helvetica,sans-serif; background-color:#151515; color:#0000FF; border-width:0px; font-size: 10pt;}
td.blue { color: #5555FF; }
th.header { background-color:#45070E; font-weight: bold; }
td.header { background-color:#45070E; font-weight: bold; }
.nav { font-size:8pt; line-height:10pt; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: none; }
.small { font-size:8pt; line-height:10pt; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: none; }
.big { font-size:12pt; line-height:10pt; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: none; }
-->
</style>
<?php
include("openaffixdb.php");
// name,prefix,lvl,maxlvl,lvlreq,rare,frequency,group,color,stats,types
$sql = "select * from list_" . $patch . "_" . $lang . "_" . $version . " where types like \"%$type%\" AND rare = 1 AND lvl <= $alvl AND maxlvl >= $alvl order by `prefix`,`group`,`lvl`";
//echo "Query: $sql<br>";
$result = mysql_query($sql, $db);
if ($lang == "de")
{
echo "<h2>Affixwahrscheinlichkeiten für crafted $item</h2>";
echo "mit Itemlevel: $ilvl Affix-Level: $alvl<br><br>\n";
echo "[ <a href=\"affix_info.php\" target=\"_blank\">Informationen zur Affixgenerierung</a> ]<br>";
echo "[ <a href=\"affix_index.php?lang=$lang&version=$version&patch=$patch\">zurück zum Inhalt</a> ]<br>";
echo "[ <a href=\"affix_display.php?type=$type&lang=$lang&version=$version&patch=$patch&ilvl=$ilvl&mlvl=$mlvl&qlvl=$qlvl&item=$item&sortby=$sortby\">zurück zu den Tabellen</a> ]<br><br>";
echo "<font color=red>Bitte vor Verwendung des Calcs unbedingt die <a href=\"affix_info.php\" target=\"_blank\"><font color=red>Informationen zur Affixgenerierung</font></a> durchlesen!</font><br>";
echo "<form action=\"affix_chances_crafted.php\">";
echo "Item-Level (1-99): <input type=hidden name=lang value=\"$lang\"><input type=hidden name=version value=\"$version\"><input type=hidden name=patch value=\"$patch\"><input type=hidden name=type value=\"$type\"><input type=hidden name=item value=\"$item\"><input type=hidden name=sortby value=\"$sortby\"><input type=hidden name=mlvl value=\"$mlvl\"><input type=hidden name=qlvl value=\"$qlvl\"><input name=ilvl type=text size=4 value=$ilvl><input type=submit value=\"Ok\"></form><br>";
}
else
{
echo "<h2>Affixchances for crafted $item</h2>";
echo "with Itemlevel: $ilvl Affix-Level: $alvl<br><br>\n";
echo "[ <a href=\"affix_info_en.php\" target=\"_blank\">Information about Affix Generation</a> ]<br>";
echo "[ <a href=\"affix_index.php?lang=$lang&version=$version&patch=$patch\">back to Index</a> ]<br>";
echo "[ <a href=\"affix_display.php?type=$type&lang=$lang&version=$version&patch=$patch&ilvl=$ilvl&mlvl=$mlvl&qlvl=$qlvl&item=$item&sortby=$sortby\">back to tables</a> ]<br><br>";
echo "<font color=red>Please read the <a href=\"affix_info_en.php\" target=\"_blank\"><font color=red>Information about Affix Generation</font></a> before using this calculator!</font><br>";
echo "<form action=\"affix_chances_crafted.php\">";
echo "Item-Level (1-99): <input type=hidden name=lang value=\"$lang\"><input type=hidden name=version value=\"$version\"><input type=hidden name=patch value=\"$patch\"><input type=hidden name=type value=\"$type\"><input type=hidden name=item value=\"$item\"><input type=hidden name=sortby value=\"$sortby\"><input type=hidden name=mlvl value=\"$mlvl\"><input type=hidden name=qlvl value=\"$qlvl\"><input name=ilvl type=text size=4 value=$ilvl><input type=submit value=\"Ok\"></form><br>";
}
$a = NULL;
$prefix = 0;
$suffix = 0;
$prefixfreq = 0;
$suffixfreq = 0;
while ($myrow = mysql_fetch_array($result))
{
if ($mlvl != 0) $myrow['frequency'] = $myrow['frequency'] * $myrow['lvl'];
$a[] = $myrow;
if ($myrow['prefix'] == "P")
{
$prefix++;
$prefixfreq += $myrow['frequency'];
}
else
{
$suffix++;
$suffixfreq += $myrow['frequency'];
}
}
$count = count($a);
?>
<br>
<script language="JavaScript" src="affix_chances.js"></script>
<script language="JavaScript">
<!--
function U(calculateall)
{
var myform = document.forms.aform;
var i, k;
var group = 0;
var prefixgroups = 0;
var suffixgroups = 0;
var prefixfreq = <?= $prefixfreq ?>;
var suffixfreq = <?= $suffixfreq ?>;
var chance = 1;
for (i=0;i<4;i++)
eval ("myform.group" + i + ".value = \"---\"");
myform.chance.value = "";
for (i=0;i<groups.length-1;i++)
{
eval ("myform.g" + groups[i][0] + "[0].value = \"0 %\"");
groups[i][3] = 0;
groups[i][4] = 0;
}
for (i=0;i<groups.length-1;i++)
{
var myelement = eval("myform.g" + groups[i][0]);
var freqcount = 0;
for (k=1;k<myelement.length;k++)
{
if (myelement[k].checked == true)
freqcount += parseInt(myelement[k].value);
}
if (freqcount > 0)
{
groups[i][4] = 1;
if (group >= 4)
{
myform.chance.value = "<?= $lang=="de" ? "Fehler: zu viele Affixgruppen ausgewählt" : "Error: Too many Affix Groups selected" ?>";
return;
}
if (groups[i][2] == 1)
prefixgroups++;
else
suffixgroups++;
if (prefixgroups > 3)
{
myform.chance.value = "<?= $lang=="de" ? "Fehler: mehr als 3 Prefixgruppen ausgewählt" : "Error: More than 3 Prefix Groups selected" ?>";
return;
}
if (suffixgroups > 3)
{
myform.chance.value = "<?= $lang=="de" ? "Fehler: mehr als 3 Suffixgruppen ausgewählt" : "Error: More than 3 Suffix Groups selected" ?>";
return;
}
var str = "";
var thisfreq = 0;
if (groups[i][2] == 1)
{
str += "<?= $lang=="de" ? "Prefixgruppe" : "Prefix Group" ?>";
thisfreq = prefixfreq;
}
else
{
str += "<?= $lang=="de" ? "Suffixgruppe" : "Suffix Group" ?>";
thisfreq = suffixfreq;
}
str += " " + groups[i][0] + " Chance: " + RChance(freqcount, thisfreq) + " (" + Chance(freqcount/thisfreq) + ")";
eval ("myform.group" + group + ".value = str");
group++;
str = RChance(freqcount, groups[i][1]) + " (" + Chance(freqcount/groups[i][1]) + ")";
eval ("myform.g" + groups[i][0] + "[0].value = str");
chance *= freqcount/groups[i][1];
}
}
if ((group > 0) && (calculateall == 1))
{
totalchance = 0;
count = 0;
var ilvl = <?= $ilvl ?>;
if (ilvl <= 30)
{
// 1
AddAffix(0, 1, 0.5*0.4, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 0, 0.5*0.4, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
// 2
AddAffix(0, 2, 0.25*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 2, 0.50*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 0, 0.25*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
// 3
AddAffix(3, 0, 1/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 1, 3/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 2, 3/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(0, 3, 1/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
// 4
AddAffix(3, 1, 5/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 2, 6/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 3, 5/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
}
if ((ilvl > 30) && (ilvl <= 50))
{
// 2
AddAffix(0, 2, 0.25*0.6, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 2, 0.50*0.6, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 0, 0.25*0.6, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
// 3
AddAffix(3, 0, 1/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 1, 3/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 2, 3/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(0, 3, 1/8*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
// 4
AddAffix(3, 1, 5/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 2, 6/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 3, 5/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
}
if ((ilvl > 50) && (ilvl <= 70))
{
// 3
AddAffix(3, 0, 1/8*0.8, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 1, 3/8*0.8, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 2, 3/8*0.8, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(0, 3, 1/8*0.8, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
// 4
AddAffix(3, 1, 5/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 2, 6/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 3, 5/16*0.2, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
}
if (ilvl > 70)
{
// 4
AddAffix(3, 1, 5/16, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(2, 2, 6/16, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
AddAffix(1, 3, 5/16, prefixfreq, suffixfreq, prefixgroups, suffixgroups);
}
myform.chance.value = Chance(chance * totalchance);
}
}
// -->
</script>
<form name="aform">
<?php
function OutputTableHeader($affixname)
{
global $lang;
if ($lang == "de")
{
echo "<br><br><b>", $affixname, "e:</b><br>";
echo "<br><table><tr class=\"header\" align=center><td> </td><td><b>Name</b></td><td><b>Level</b></td><td><b>Level-<br>req.</b></td><td><b>freq.</b></td><td><b>Eigenschaften</b></td></tr>\n";
}
else
{
echo "<br><br><b>", $affixname, "es:</b><br>";
echo "<br><table><tr class=\"header\" align=center><td> </td><td><b>Name</b></td><td><b>Level</b></td><td><b>Level-<br>req.</b></td><td><b>freq.</b></td><td><b>Stats</b></td></tr>\n";
}
}
if ($lang == "de")
{
echo "<table>";
for ($i=0;$i<4;$i++)
echo "<tr><td>Gruppe Nr ", $i+1, ": </td><td><input class=black name=\"group$i\" value=\"---\" type=\"text\" size=50 readonly><br></td></tr>\n";
echo "<tr><td colspan=2><input type=button onClick=\"U(1)\" value=\"Gesamt-Wahrscheinlichkeit berechnen\"></td></tr>";
echo "<tr><td>Wahrscheinlichkeit: </td><td><input class=black name=\"chance\" value=\"\" type=\"text\" size=50 readonly><br></td></tr>\n</table>\n";
echo "<br><input type=reset value=\"Alle Häkchen entfernen\">";
}
else
{
echo "<table>";
for ($i=0;$i<4;$i++)
echo "<tr><td>Group Nr ", $i+1, ": </td><td><input class=black name=\"group$i\" value=\"---\" type=\"text\" size=50 readonly><br></td></tr>\n";
echo "<tr><td colspan=2><input type=button onClick=\"U(1)\" value=\"Calculate total Chance\"></td></tr>";
echo "<tr><td>Chance: </td><td><input class=black name=\"chance\" value=\"\" type=\"text\" size=50 readonly><br></td></tr>\n</table>\n";
echo "<br><input type=reset value=\"Clear all Checkmarks\">";
}
OutputTableHeader("Prefix");
$grouparray = "var groups = [\n";
$lastgroup = -1;
$lastlvl = -1;
$lastmaxlvl = -1;
$lastlvlreq = -1;
$firstsuffix = FALSE;
for ($i = 0 ; $i < $count ; $i++)
{
if (($firstsuffix === FALSE) && ($a[$i]['prefix'] == "S"))
{
echo "</table><br><br>";
OutputTableHeader("Suffix");
$firstsuffix = $i;
}
$lastgroup_bak = $lastgroup;
if ($lastgroup != $a[$i]['group'])
{
$rowspan = 0;
$row = $i;
$lastgroup = $a[$i]['group'];
$freqcount = 0;
while (($row < $count) && ($a[$row]['group'] == $lastgroup))
{
$freqcount += $a[$row]['frequency'];
$row++;
$rowspan++;
}
$grouparray .= "[" . $lastgroup . "," . $freqcount . "," . ($a[$i]['prefix']=="P"?"1":"2") . ",0,0],\n";
echo "<tr><td> </td><td colspan=3>", $lang=="de"?"Gruppe ":"Group ", $lastgroup, ":</td><td align=center>", $freqcount, "</td><td><input class=black name=\"g$lastgroup\" value=\"0 %\" type=\"text\" size=25 readonly></td></tr>\n";
}
if ($a[$i]['prefix'] == "P")
echo "<tr class=\"one\">";
else
echo "<tr class=\"one\">";
echo "<td><input type=\"checkbox\" name=\"g", $lastgroup, "\" value=\"", $a[$i]['frequency'], "\" onClick=\"U()\"></td>";
echo "<td><font color=#FF8000>", $a[$i]['name'], "</font></td>";
$lastlvl_bak = $lastlvl;
$lastmaxlvl_bak = $lastmaxlvl;
if (($lastlvl != $a[$i]['lvl']) || ($lastmaxlvl != $a[$i]['maxlvl']) || ($lastgroup_bak != $a[$i]['group']))
{
$rowspan = 0;
$row = $i;
$lastlvl = $a[$i]['lvl'];
$lastmaxlvl = $a[$i]['maxlvl'];
while (($row < $count) && ($a[$row]['lvl'] == $lastlvl) && ($a[$row]['maxlvl'] == $lastmaxlvl) && ($a[$row]['group'] == $lastgroup))
{
$row++;
$rowspan++;
}
echo "<td rowspan=$rowspan align=center>",$a[$i]['lvl'],$a[$i]['maxlvl'] != "100" ? " - " . $a[$i]['maxlvl'] : "","</td>";
}
if (($lastlvlreq != $a[$i]['lvlreq']) || ($lastlvl_bak != $a[$i]['lvl']) || ($lastmaxlvl_bak != $a[$i]['maxlvl']) || ($lastgroup_bak != $a[$i]['group']))
{
$rowspan = 0;
$row = $i;
$lastlvlreq = $a[$i]['lvlreq'];
while (($row < $count) && ($a[$row]['lvlreq'] == $lastlvlreq) && ($lastlvl == $a[$row]['lvl']) && ($lastmaxlvl == $a[$row]['maxlvl']) && ($a[$row]['group'] == $lastgroup))
{
$row++;
$rowspan++;
}
echo "<td rowspan=$rowspan align=center>",$a[$i]['lvlreq'],"</td>";
}
echo "<td align=center>",$a[$i]['frequency'],"</td>";
echo "<td>",$a[$i]['stats'],"</td></tr>\n";
}
echo "</table></form>\n";
?>
<script LANGUAGE="JavaScript">
<!--
<?= $grouparray ?>0];
var pgroups = new Array();
var sgroups = new Array();
var z;
for (z=0;z<groups.length-1;z++)
{
if (groups[z][2] == 1)
pgroups[pgroups.length] = groups[z];
else
sgroups[sgroups.length] = groups[z];
}
// -->
</script>
<?php
include($_SERVER['DOCUMENT_ROOT']."/layout/footer_empty.php");
?>
So, der Affixcalc ist wieder online: http://planetdiablo.eu/diablodb/affix_index.php