mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-04-27 14:55:38 +00:00
146 lines
4.7 KiB
PHP
146 lines
4.7 KiB
PHP
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Required meta tags -->
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!-- Bootstrap CSS -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="https://bootswatch.com/4/materia/bootstrap.min.css">
|
|
<style>
|
|
input {
|
|
width: 108px;
|
|
padding: 5px;
|
|
margin: 5xp;
|
|
text-align: center;
|
|
border: 0px;
|
|
background: #eef;
|
|
}
|
|
.inputs-bottom input { float: ;}
|
|
#w-select {
|
|
margin-left: 40px;
|
|
}
|
|
</style>
|
|
<script
|
|
src="https://code.jquery.com/jquery-3.6.0.min.js"
|
|
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
|
|
<script type="text/javascript">
|
|
|
|
function val() {
|
|
d = document.getElementById("w-select");
|
|
d.value = '';
|
|
}
|
|
function val2() {
|
|
d = document.getElementById("a-select");
|
|
d.value = '';
|
|
}
|
|
</script>
|
|
<title>Uniqe Maker</title>
|
|
</head>
|
|
<div class="container type">
|
|
<h1>Unique Maker by Hash</h1>
|
|
<body>
|
|
<?php
|
|
$u = "UniqueItems.txt";
|
|
$w = "Weapons.txt";
|
|
$a = "Armor.txt";
|
|
$p = "Properties.txt";
|
|
function toPHP($file)
|
|
{
|
|
$rows = array_map(function ($v)
|
|
{
|
|
return str_getcsv($v, "\t");
|
|
}
|
|
, file($file));
|
|
$header = array_shift($rows);
|
|
foreach ($rows as $row)
|
|
{
|
|
$csv[] = array_combine($header, $row);
|
|
}
|
|
return $csv;
|
|
}
|
|
$armor = toPHP($a);
|
|
$weapon = toPHP($w);
|
|
$prop = toPHP($p);
|
|
$uni = toPHP($u);
|
|
?>
|
|
<form action="/index.php" method="post">
|
|
<div class="container">
|
|
<div class="inputs-top">
|
|
Index: <input style="width: 300px;" type="text" name="index" ><br>
|
|
Version: <input type="number" name="version" value="100">
|
|
Enabled: <input type="boolean" name="enabled" value="1">
|
|
<input type="hidden" name="ladder" >
|
|
Rarity: <input type="number" name="rarity" >
|
|
<input type="hidden" name="nolimit" value="">
|
|
Lvl: <input type="number" name="lvl" >
|
|
Lvl Req: <input type="number" name="lvl req" > <br>
|
|
</div>
|
|
<div style="margin: 20px;" class="row"><select onChange="val();" name="code[]" id="a-select">;
|
|
<option value="">Armors</option>;
|
|
<?php
|
|
foreach ($armor as $a)
|
|
{
|
|
$oa .= '<option value="' . $a['code'] . '">' . $a['name'] . '</option>';
|
|
}
|
|
$oa .= '</select>';
|
|
echo $oa;
|
|
?>
|
|
<select onChange="val2();" name="code[]" id="w-select">;
|
|
<option value="">Weapons</option>';
|
|
<?php
|
|
foreach ($weapon as $a)
|
|
{
|
|
$ow .= '<option value="' . $a['code'] . '">' . $a['name'] . '</option>';
|
|
}
|
|
$ow .= '</select></div>';
|
|
echo $ow;
|
|
?>
|
|
<input type="hidden" name="type" value=""> <br>
|
|
<input type="hidden" name="uber" value=""><br>
|
|
<div class="inputs-bottom">
|
|
Carry 1: <input type="number" name="carry1" value="">
|
|
Cost Mult: <input type="number" name="cost mult" value="5">
|
|
Cost Add: <input type="number" name="cost add" value="5000">
|
|
Chrtransform: <input type="text" name="chrtransform" value="">
|
|
<br>
|
|
Invtransform: <input type="text" name="invtransform" value="">
|
|
Flippyfile: <input type="text" name="flippyfile" value="">
|
|
InvFile: <input type="text" name="invfile" >
|
|
Dropsound: <input type="text" name="dropsound" value="">
|
|
<br>
|
|
DropsFxFrame: <input type="text" name="dropsfxframe" value="">
|
|
Usesound: <input type="text" name="usesound" value="">
|
|
</div>
|
|
<?php
|
|
echo "<div class='container'><div class='row'>";
|
|
|
|
foreach (range(01, 12) as $p)
|
|
{
|
|
$html .= '<div style="border: 1px solid black;margin: 5px;padding: 15px;" class="col-2"><h4>Prop ' . $p . '</h4>';
|
|
$html .= '<select name="prop' . $p . '" id="prop' . $p . '-select">';
|
|
$html .= '<option value=""></option>';
|
|
foreach ($prop as $a)
|
|
{
|
|
$html .= '<option value="' . $a['code'] . '">' . $a['code'] . '</option>';
|
|
|
|
}
|
|
$html .= '</select>';
|
|
$html .= '<p>Par' . $p . '</p><input type="number" class="par' . $p . '" name="prop' . $p . '-par">';
|
|
$html .= '<p>Min' . $p . '</p><input type="number" class="min' . $p . '" name="prop' . $p . '-min">';
|
|
$html .= '<p>Max' . $p . '</p><input type="number" class="max' . $p . '" name="prop' . $p . '-max"></div>';
|
|
}
|
|
echo $html;
|
|
?>
|
|
<div>
|
|
Usesound: <input type="hidden" name="eol" value="0"> <br>;
|
|
<button class='btn-success' style="height: 48px;width: 250px;" id="submit">Save Item</button>
|
|
<input class="btn-danger" style="height: 48px;width:200px; margin-left: 10px;" type="reset">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html>
|