-
Notifications
You must be signed in to change notification settings - Fork 1
/
index0.html
203 lines (197 loc) · 8.06 KB
/
index0.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
<!DOCTYPE html>
<html>
<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">
<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-repeat: no-repeat;
background-color: white;
background-size: cover;
background-position: center;
color: black;
}
</style>
<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>
<div>
<hr>
<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', 2.5, true, 5)">Buy (<span id="turtleprice">5</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', 12.5, true, 8)">Buy (<span id="potatoprice">25</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="http://www.techacademymn.com/wp-content/uploads/2018/02/commandblock.png" height="69">
<button class="btn btn-secondary" onclick="buy('cmdprice', 'cmdbar', 'cmdcount', 62.5, true, 16)">Buy (<span id="cmdprice">125</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', 312.5, true, 24)">Buy (<span id="hayprice">625</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', 1562.5, true, 48); if ($('#epiccount').html() == 30) {$('#locked').fadeIn();}">Buy (<span id="epicprice">3125</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">1000</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">10000</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>
<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 = parseFloat($('#' + 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 = parseFloat($('#' + 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(Math.ceil((parseFloat($('#' + bar).html()) * 1.1 + origPrice)));
$('#' + priceId).html(Math.ceil(parseFloat($('#' + priceId).html()) * 1.15));
if (isAuto && $('#' + count).html() == 1) {
setInterval(move, 30, bar, speed);
}
}
}
</script>
</body>
</html>