forked from Bongs237/Cow-clicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnotherIndexBackup.html
408 lines (400 loc) · 20.7 KB
/
AnotherIndexBackup.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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Lobster+Two" rel="stylesheet">
<title>Cow Clicker!</title>
<meta charset="UTF-8">
<style>
.myProgress {
width: 50%;
background-color: #ccc;
}
.myBar {
width: 0%;
height: 35px;
background-color: #2da82d;
font-weight: bold;
font-size: 25px;
}
#mcount {
font-family: monospace;
font-weight: bold;
}
.mooo:hover {
cursor: pointer;
}
.display-4 {
font-family: 'Lobster Two', cursive;
}
#locked {
display: none;
}
body {
background-image: url('background.png');
background-color: lightblue;
background-size: cover;
background-position: center;
color: black;
}
</style>
</head>
<body class="container container-fluid">
<br>
<h1 class="display-4" onclick="var audio = new Audio('http://mattersofgrey.com/audio/Minecraft-cow3.mp3'); audio.play()" class="mooo">Cow Clicker!</h1>
<div>
<hr>
<h1><img src="Milk_Bucket.png" alt="Milk: " height="25"> <span id="mcount">0</span></h1>
<h3>Cow x<span id="bongscount">1</span></h3>
<img src="Cow.png" alt="Cow" height="200" onclick="move('boo', 2.5)" class="mooo">
<div class="myProgress">
<div class="myBar" id="boo">1</div>
</div>
<br>
<button class="btn btn-secondary" onclick="buy('bongsprice', 'boo', 'bongscount', 2, false, 2.5)">Buy (<span id="bongsprice">1</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div><br>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Shop</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Upgrades</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<div>
<br>
<h3>Turtle x<span id="turtlecount">0</span></h3>
<img src="Turtle.png" height="69">
<button class="btn btn-secondary" onclick="buy('turtleprice', 'turtlebar', 'turtlecount', 8, true, 5)">Buy (<span id="turtleprice">4</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="turtlebar">0</div>
</div>
</div>
<div>
<hr>
<h3>Potato x<span id="potatocount">0</span></h3>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/1/11/Baked_Potato.png" height="69">
<button class="btn btn-secondary" onclick="buy('potatoprice', 'potatobar', 'potatocount', 96, true, 8)">Buy (<span id="potatoprice">48</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="potatobar">0</div>
</div>
</div>
<div>
<hr>
<h3>Command Block x<span id="cmdcount">0</span></h3>
<img src="https://static.planetminecraft.com/files/resource_media/screenshot/1416/commandblock_lrg.jpg" height="69">
<button class="btn btn-secondary" onclick="buy('cmdprice', 'cmdbar', 'cmdcount', 1152, true, 16)">Buy (<span id="cmdprice">576</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="cmdbar">0</div>
</div>
</div>
<div>
<hr>
<h3>Hay.com Machine x<span id="haycount">0</span></h3>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/b/b9/Hay_Bale.png" height="69">
<button class="btn btn-secondary" onclick="buy('hayprice', 'haybar', 'haycount', 13824, true, 24)">Buy (<span id="hayprice">6,912</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="haybar">0</div>
</div>
</div>
<div>
<hr>
<h3>Epic Stone x<span id="epiccount">0</span></h3>
<img src="epicrock.png" height="69">
<button class="btn btn-secondary" onclick="buy('epicprice', 'epicbar', 'epiccount', 165888, true, 48); if ($('#epiccount').html() == 30) {$('#locked').fadeIn();}">Buy (<span id="epicprice">82,944</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button> <!-- You will unlock new stuff when you have 30 epic stones! -->
<br>
<div class="myProgress">
<div class="myBar" id="epicbar">0</div>
</div>
</div>
<div id="locked">
<br>
<h4>You unlocked new stuff!</h4>
<div>
<hr>
<h3>Pig x<span id="pigcount">0</span></h3>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/3/30/Pig.png" height="69">
<button class="btn btn-secondary" onclick="buy('pigprice', 'pigbar', 'pigcount', 10, true, 2.5)">Buy (<span id="pigprice">10</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="pigbar">0</div>
</div>
</div>
<div>
<hr>
<h3>Chicken x<span id="chickencount">0</span></h3>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/a/a3/Chicken.png" height="69">
<button class="btn btn-secondary" onclick="buy('chickenprice', 'chickenbar', 'chickencount', 99, true, 1.25)">Buy (<span id="chickenprice">100</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="chickenbar">0</div>
</div>
</div>
<div>
<hr>
<h3>Silverfish x<span id="fishcount">0</span></h3>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/b/b9/Silverfish.png" height="69">
<button class="btn btn-secondary" onclick="buy('fishprice', 'fishbar', 'fishcount', 998, true, 0.625)">Buy (<span id="fishprice">1,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="fishbar">0</div>
</div>
</div>
<div>
<hr>
<h3>Redstone x<span id="redcount">0</span></h3>
<img src="redstone_wire.png" height="69">
<button class="btn btn-secondary" onclick="buy('redprice', 'redbar', 'redcount', 9997, true, 0.3125)">Buy (<span id="redprice">10,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
<br>
<div class="myProgress">
<div class="myBar" id="redbar">0</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<div id="bettermilk">
<br>
<h3>Bigger Cows</h3>
<h4>Cows: Milk x2</h4>
<img src="https://crafatar.com/avatars/f159b274-c22e-4340-b7c1-52abde147713?size=100" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('bettermilk-p', 'bettermilk', 'boo', 2)">Buy (<span id="bettermilk-p">5,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="superturtle">
<hr>
<h3>Super Turtle Powers</h3>
<h4>Turtles: Milk x2</h4>
<img src="asdf.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('superturtle-p', 'superturtle', 'turtlebar', 2)">Buy (<span id="superturtle-p">10,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="potatofarm">
<hr>
<h3>Potato Farms</h3>
<h4>Potatoes: Milk x2</h4>
<img src="potatoes.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('potatofarm-p', 'potatofarm', 'potatobar', 2)">Buy (<span id="potatofarm-p">25,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="givecmd">
<hr>
<h3>/give Commands</h3>
<h4>Command Blocks: Milk x2</h4>
<img src="https://static.planetminecraft.com/files/resource_media/screenshot/1416/commandblock_lrg.jpg" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('givecmd-p', 'givecmd', 'cmdbar', 2)">Buy (<span id="givecmd-p">75,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="pigclicker">
<hr>
<h3>Pig Clickers</h3>
<h4>Hay.com Machines: Milk x2</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/b/b9/Hay_Bale.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('pigclicker-p', 'pigclicker', 'haybar', 2)">Buy (<span id="pigclicker-p">100,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="modlymod">
<hr>
<h3>Modly Mods</h3>
<h4>Epic Stones: Milk x2</h4>
<img src="https://epicmc.rocks/modly/images/extension_icon.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('modlymod-p', 'modlymod', 'epicbar', 2)">Buy (<span id="modlymod-p">125,000</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="pigupgrade">
<br>
<h3>Bacon and Milk</h3>
<h4>Pigs: Milk x2</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/3/30/Pig.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('pigupgrade-p', 'pigupgrade', 'pigbar', 2)">Buy (<span id="pigupgrade-p">10M</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="chickenupgrade">
<hr>
<h3>More Feathers</h3>
<h4>Chickens: Milk x2</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/a/a3/Chicken.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('chickenupgrade-p', 'chickenupgrade', 'chickenbar', 2)">Buy (<span id="chickenupgrade-p">100M</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="silverfishupgrade">
<hr>
<h3>Monster Egg Blocks</h3>
<h4>Silverfish: Milk x2</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/b/b9/Silverfish.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('silverfishupgrade-p', 'silverfishupgrade', 'fishbar', 2)">Buy (<span id="silverfishupgrade-p">1B</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="redstoneupgrade">
<hr>
<h3>Faster Repeaters</h3>
<h4>Redstone: Milk x2</h4>
<img src="redstone_wire.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('redstoneupgrade-p', 'redstoneupgrade', 'redbar', 2)">Buy (<span id="redstoneupgrade-p">10B</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="randomstuff">
<hr>
<h3>Giant Buckets</h3>
<h4>Everything: Milk x2</h4>
<img src="Milk_Bucket.png" height="69">
<button class="btn btn-secondary" onclick="buyEverythingUpgrade('randomstuff-p', 'randomstuff', 2)">Buy (<span id="randomstuff-p">100B</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="bettermilk2">
<hr>
<h3>Better Cows</h3>
<h4>Cows: Milk x3</h4>
<img src="https://crafatar.com/avatars/f159b274-c22e-4340-b7c1-52abde147713?size=100" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('bettermilk-p2', 'bettermilk2', 'boo', 3)">Buy (<span id="bettermilk-p2">1T</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="superturtle2">
<hr>
<h3>Sea Turtles</h3>
<h4>Turtles: Milk x3</h4>
<img src="asdf.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('superturtle-p2', 'superturtle2', 'turtlebar', 3)">Buy (<span id="superturtle-p2">10T</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="potatofarm2">
<hr>
<h3>Potato Houses</h3>
<h4>Potatoes: Milk x3</h4>
<img src="potatoes.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('potatofarm-p2', 'potatofarm2', 'potatobar', 3)">Buy (<span id="potatofarm-p2">100T</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="givecmd2">
<hr>
<h3>Robotic Milk Makers</h3>
<h4>Command Blocks: Milk x3</h4>
<img src="https://static.planetminecraft.com/files/resource_media/screenshot/1416/commandblock_lrg.jpg" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('givecmd-p2', 'givecmd2', 'cmdbar', 3)">Buy (<span id="givecmd-p2">1P</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="pigclicker2">
<hr>
<h3>Browser HackPads</h3>
<h4>Hay.com Machines: Milk x3</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/b/b9/Hay_Bale.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('pigclicker-p2', 'pigclicker2', 'haybar', 3)">Buy (<span id="pigclicker-p2">10P</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="modlymod2">
<hr>
<h3>More Mods with Milk</h3>
<h4>Epic Stones: Milk x3</h4>
<img src="https://epicmc.rocks/modly/images/extension_icon.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('modlymod-p2', 'modlymod2', 'epicbar', 3)">Buy (<span id="modlymod-p2">100P</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="pigupgrade2">
<br>
<h3>Pig-Cows</h3>
<h4>Pigs: Milk x3</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/3/30/Pig.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('pigupgrade-p2', 'pigupgrade2', 'pigbar', 3)">Buy (<span id="pigupgrade-p2">1E</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="chickenupgrade2">
<hr>
<h3>Milk and Eggs</h3>
<h4>Chickens: Milk x3</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/a/a3/Chicken.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('chickenupgrade-p2', 'chickenupgrade2', 'chickenbar', 3)">Buy (<span id="chickenupgrade-p2">10E</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="silverfishupgrade2">
<hr>
<h3>Gold Fish</h3>
<h4>Silverfish: Milk x3</h4>
<img src="https://gamepedia.cursecdn.com/minecraft_gamepedia/b/b9/Silverfish.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('silverfishupgrade-p2', 'silverfishupgrade2', 'fishbar', 3)">Buy (<span id="silverfishupgrade-p2">100E</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="redstoneupgrade2">
<hr>
<h3>Redstone Milk Generators</h3>
<h4>Redstone: Milk x3</h4>
<img src="redstone_wire.png" height="69">
<button class="btn btn-secondary" onclick="buyUpgrade('redstoneupgrade-p2', 'redstoneupgrade2', 'redbar', 3)">Buy (<span id="redstoneupgrade-p2">1Z</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
<div id="randomstuff2">
<hr>
<h3>Cows Take Over</h3>
<h4>Everything: Milk x3</h4>
<img src="Milk_Bucket.png" height="69">
<button class="btn btn-secondary" onclick="buyEverythingUpgrade('randomstuff-p2', 'randomstuff2', 3)">Buy (<span id="randomstuff-p2">10Z</span><img src="Milk_Bucket.png" alt="milk bucket" height="15">)</button>
</div>
</div>
</div>
<br>
<br>
<br>
<br>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://epicmc.rocks/derpythingy.js"></script>
<script>
var money = 0;
function move(bar, speed) {
var elem = document.getElementById(bar);
var moneyz = _.num.parse($('#' + bar).html());
var width = 1;
if (elem.style.width == '0%' || elem.style.width == '') {
} else {
return;
}
var id = setInterval(frame, speed);
function frame() {
if (width >= 100) {
clearInterval(id);
elem.style.width = '0%';
money += moneyz;
$('#mcount').html(_.num.withCommas(_.num.formatNumber(money)));
} else {
width = width + 0.5;
elem.style.width = width + '%';
}
}
}
function buy(priceId, bar, count, origPrice, isAuto, speed) {
var price = _.num.parse($('#' + priceId).html());
if (money < price) {
alert('Not enough milk!');
} else {
money = money - price;
$('#mcount').html(_.num.withCommas(_.num.formatNumber(money)));
var audio = new Audio('https://www.myinstants.com/media/sounds/yes1.mp3');
audio.play(); // Hurrrr...
$('#' + count).html(parseFloat($('#' + count).html()) + 1);
$('#' + bar).html(_.num.withCommas(_.num.formatNumber(Math.ceil((_.num.parse($('#' + bar).html()) * 1.1 + origPrice)))));
$('#' + priceId).html(_.num.withCommas(_.num.formatNumber(Math.ceil((_.num.parse($('#' + priceId).html()) * 1.12)))));
if (isAuto && $('#' + count).html() == 1) {
setInterval(move, 30, bar, speed);
}
}
}
function buyUpgrade(priceId, divId, barToMultiply, m) {
var price = _.num.parse($('#' + priceId).html());
if ($('#' + barToMultiply).html() == 0) {
alert('You don\'t have this item! Buy it in the shop!');
return;
}
if (money < price) {
alert('Not enough milk!');
} else {
money = money - price;
$('#mcount').html(_.num.withCommas(_.num.formatNumber(money)));
var audio = new Audio('https://www.myinstants.com/media/sounds/yes1.mp3');
audio.play(); // Hurrrr...
$('#' + divId).fadeOut();
$('#' + barToMultiply).html(_.num.withCommas(_.num.formatNumber(_.num.parse($('#' + barToMultiply).html()) * m)));
}
}
function buyEverythingUpgrade(priceId, divId, m) {
var price = _.num.parse($('#' + priceId).html());
if (money < price) {
alert('Not enough milk!');
} else {
money = money - price;
$('#mcount').html(_.num.withCommas(_.num.formatNumber(money)));
var audio = new Audio('https://www.myinstants.com/media/sounds/yes1.mp3');
audio.play(); // Hurrrr...
$('#' + divId).fadeOut();
for (var i = 0; i < _.c('.myBar'); i++) {
_.i('.myBar', i).e(_.num.withCommas(_.num.formatNumber(_.num.parse(_.i('.myBar', i).c) * m)));
}
}
}
</script>
</body>
</html>