forked from Inconcessus/OTBM2JSON
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathitems.html
More file actions
63 lines (60 loc) · 1.49 KB
/
items.html
File metadata and controls
63 lines (60 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Map items viewer</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="tiles.json"></script>
<script src="items.json"></script>
</head>
<body>
<table align="center">
<tr>
<th>Items</th>
<th>Tiles</th>
</tr>
<tr>
<td>
<table align="center" border="1">
<thead>
<tr>
<th>ItemID</th>
<th>Icon</th>
<th>Count</th>
<th>Positions</th>
</tr>
</thead>
<tbody id="items"></tbody>
</table>
</td>
<td>
<table align="center" border="1">
<thead>
<tr>
<th>ItemID</th>
<th>Icon</th>
<th>Count</th>
</tr>
</thead>
<tbody id="tiles"></tbody>
</table>
</td>
</tr>
</table>
<script>
function printItems() {
$('#tiles').html('');
$('#items').html('');
for (var i = 0; i < tiles.length; i++) {
$('#tiles').append('<tr><td>' + tiles[i][0] + '</td><td><img src="https://item-images.ots.me/860/' + tiles[i][0] + '.gif"/></td><td>' + tiles[i][1] + '</td></tr>');
}
for (var i = 0; i < items.length; i++) {
$('#items').append('<tr><td>' + items[i][0] + '</td><td><img src="https://item-images.ots.me/860/' + items[i][0] + '.gif"/></td><td>' + items[i][1].count + '</td><td>' + items[i][1].positions.join('<br/>') + '</td></tr>');
}
}
$(document).ready(function () {
printItems();
});
</script>
</body>
</html>