This repository has been archived by the owner on May 22, 2023. It is now read-only.
forked from Eniripsa96/SkillAPI
-
Notifications
You must be signed in to change notification settings - Fork 10
/
exp.html
205 lines (170 loc) · 4.9 KB
/
exp.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>SkillAPI Experience Formula Tool</title>
<style>
* {
padding: 0;
margin: 0;
}
html {
height: 100%;
}
body {
background-color: black;
color: white;
height: 100%;
overflow: hidden;
}
a, a:visited {
position: absolute;
top: 250px;
width: 238px;
right: 0;
background-color: #333;
border: 3px solid #666;
border-radius: 10px;
padding: 5px;
margin: 5px;
color: #00AAFF;
text-align: center;
font-size: 24px;
text-decoration: none;
}
h2 {
margin-bottom: 10px;
}
h3 {
margin-bottom: 10px;
}
form {
position: absolute;
top: 0;
right: 10px;
border-left: 3px solid #666;
border-bottom: 3px solid #666;
padding-left: 10px;
}
label {
display: inline-block;
width: 30px;
font-size: 24px;
margin-bottom: 5px;
}
section {
width: calc(100% - 275px);
border: 1px solid #666;
height: calc(100% - 10px);
margin: 5px;
margin-bottom: 0;
}
span {
display: inline-block;
padding: 2px 0;
}
.left {
width: 7%;
border: 1px solid #666;
background-color: #333;
text-align: center;
}
.right {
width: calc(18% - 9px);
border: 1px solid #666;
padding-left: 5px;
}
@media screen and (min-width: 980px) {
.left {
width: 6%;
}
.right {
width: calc(14% - 9px);
}
}
@media screen and (min-width: 1800px) {
.left {
width: 3%;
}
.right {
width: calc(7% - 9px);
}
}
@media screen and (max-width: 650px) {
.left {
width: 10%;
}
.right {
width: calc(23% - 9px);
}
}
@media screen and (max-width: 550px) {
.left {
width: 15%;
}
.right {
width: calc(35% - 9px);
}
}
@media screen and (max-width: 450px) {
.left {
width: 30%;
}
.right {
width: calc(70% - 9px);
}
}
</style>
<script>
function update() {
var section = document.querySelector('section');
while (section.hasChildNodes()) {
section.removeChild(section.lastChild);
}
var x = parseInt(document.querySelector('#x').value);
var y = parseInt(document.querySelector('#y').value);
var z = parseInt(document.querySelector('#z').value);
var w = parseInt(document.querySelector('#w').value);
for (var i = 1; i <= 100; i++) {
var left = document.createElement('span');
var right = document.createElement('span');
left.className = 'left';
right.className = 'right';
left.innerHTML = i;
right.innerHTML = x * (i + y) * (i + y) + z * i + w;
section.appendChild(left);
section.appendChild(right);
}
}
window.onload = function() {
var inputs = document.querySelectorAll('input');
for (var i = 0; i < inputs.length; i++) {
inputs[i].addEventListener('input', update);
}
update();
}
</script>
</head>
<body>
<form>
<h1>SkillAPI</h1>
<h2>Exp Formula Tool</h2>
<h3>Exp = x*(lvl + y)<sup>2</sup> + z*lvl + w</h3>
<label>x</label>
<input type="number" id="x" value="1">
<br/>
<label>y</label>
<input type="number" id="y" value="4">
<br/>
<label>z</label>
<input type="number" id="z" value="0">
<br/>
<label>w</label>
<input type="number" id="w" value="0">
<br/>
</form>
<a href="http://dev.bukkit.org/bukkit-plugins/skillapi/">Back to BukkitDev</a>
<section>
</section>
</body>
</html>