Last active
January 1, 2016 19:39
-
-
Save Tsa6/8192161 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<!--Made by Tsa6--> | |
<head> | |
<title>Random Boss Genorator</title> | |
<style> | |
body { | |
background: linear-gradient(90deg, blue, green); | |
} | |
body p.cheese { | |
font-size: 500%; | |
text-align: center; | |
color: red; | |
text-shadow: black 10px 10px 10px; | |
line-height: 10%; | |
} | |
.code { | |
color: yellow; | |
font-weight: bold; | |
text-shadow: black 10px 10px 10px; | |
padding-left: 20%; | |
padding-right: 20%; | |
} | |
</style> | |
</head> | |
<body> | |
<p class='cheese'>Random Boss</p> | |
<p class='cheese'>Generator</p> | |
<p id="Code" class='code'>Loading...</p> | |
<script> | |
//Random Boss | |
var command = "/summon "; | |
var randomSelect = function() { | |
randomNum = Math.round(Math.random() * (arguments.length - 1)); | |
return arguments[randomNum]; | |
}; | |
mobType = randomSelect('Zombie', 'PigZombie', 'Skeleton', 'Skeleton', 'Witch', 'Spider'); | |
command += mobType + ' ~ ~1 ~ {'; | |
var Health = Math.round(Math.random() * 30); | |
var Speed = ((5 - Health / 6) * 2 + (Math.random() * 5)) / 3; | |
var Attack = (Health * 0.66 + Math.random() * 40) / 3; | |
command += 'CustomName:' + randomSelect('Joe', 'Bob', 'Phil', 'Fred', 'Nan The Terrible', 'George', 'Susan', 'Emma', 'Matt', 'Jake', 'Alfred', 'Bub', 'Alex', 'John'); | |
var effects = ['', '', '', '{Id:12,Duration:15000,Amplifier:0}']; | |
command += ',ActiveEffects:['; | |
for (var i = 0; i < Math.round(Math.random() * 3); i++) { | |
var type = randomSelect(1, 5, 8, 10, 11, 12, 13, 14, 21, 22); | |
var level = Math.round(Math.random() * 3); | |
if (type === 11) { | |
level -= 1; | |
} | |
effects[i] = '{Id:' + type + ',Duration:9999,Amplifier:' + level + '},'; | |
command += effects[i]; | |
} | |
command += ']'; | |
Enchantments1 = 'ench:['; | |
for (var i = 0; i < Math.round(Math.random() * 3); i++); { | |
Enchantments1 += '{id:' + randomSelect(16, 17, 18, 19, 20, 21, 32, 33, 34, 35) + ',lvl:' + Math.round(Math.random() * 6 + 1) + '},'; | |
} | |
Enchantments1 += ']'; | |
Enchantments2 = 'ench:['; | |
for (var i = 0; i < Math.round(Math.random() * 3); i++); { | |
Enchantments2 += '{id:' + randomSelect(0, 1, 2, 3, 4, 5, 7) + ',lvl:' + Math.round(Math.random() * 6 + 1) + '},'; | |
} | |
Enchantments2 += ']'; | |
Enchantments3 = 'ench:['; | |
for (var i = 0; i < Math.round(Math.random() * 3); i++); { | |
Enchantments3 += '{id:' + randomSelect(0, 1, 2, 3, 4, 5, 7) + ',lvl:' + Math.round(Math.random() * 6 + 1) + '},'; | |
} | |
Enchantments3 += ']'; | |
Enchantments4 = 'ench:['; | |
for (var i = 0; i < Math.round(Math.random() * 3); i++); { | |
Enchantments4 += '{id:' + randomSelect(0, 1, 2, 3, 4, 5, 7) + ',lvl:' + Math.round(Math.random() * 6 + 1) + '},'; | |
} | |
Enchantments4 += ']'; | |
Enchantments5 = 'ench:['; | |
for (var i = 0; i < Math.round(Math.random() * 3); i++); { | |
Enchantments5 += '{id:' + randomSelect(0, 1, 2, 3, 4, 5, 7) + ',lvl:' + Math.round(Math.random() * 6 + 1) + '},'; | |
} | |
Enchantments5 += ']'; | |
arm1 = '{},'; | |
if (Math.round(Math.random()) === 1) { | |
arm1 = '{id:' + randomSelect(298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317) + ',tag:{' + Enchantments2 + '},Count:1},'; | |
} | |
arm2 = '{},'; | |
if (Math.round(Math.random()) === 1) { | |
arm2 = '{id:' + randomSelect(298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317) + ',tag:{' + Enchantments3 + '},Count:1},'; | |
} | |
arm3 = '{},'; | |
if (Math.round(Math.random()) === 1) { | |
arm3 = '{id:' + randomSelect(298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317) + ',tag:{' + Enchantments4 + '},Count:1},'; | |
} | |
arm4 = '{}'; | |
if (Math.round(Math.random() * 2) > 1) { | |
arm4 = '{id:' + randomSelect(298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317) + ',tag:{' + Enchantments5 + '},Count:1}'; | |
} | |
command += ',Equipment:[{id:' + randomSelect(256, 257, 258, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 283, 284, 285, 286) + ',tag:{' + Enchantments1 + ',AttributeModifiers:[{Name:Speed,AttributeName:generic.movementSpeed,UUIDMost:1,UUIDLeast:2,Amount:' + Speed + ',Operation:1},{Name:Attack,AttributeName:generic.attackDamage,UUIDMost:3,UUIDLeast:4,Amount:' + Attack + ',Operation:0},{Name:Health,AttributeName:generic.maxHealth,UUIDMost:5,UUIDLeast:6,Amount:' + Math.abs(Health - 10) + ',Operation:0}]},Count:1},' + arm1 + arm2 + arm3 + arm4 + ']'; | |
command += ',DropChances:[1.0f,1.0f,1.0f,1.0f,1.0]'; | |
if (Math.round(Math.random()) === 1) { | |
mountType = randomSelect('Cow', 'Spider', 'Ghast', 'Blaze', 'Slime'); | |
command += ',Riding:{id:' + mountType + ',Equipment:[{id:373,Count:1,Damage:8193,tag:{CustomPotionEffects:[' + effects[0] + effects[1] + effects[2] + effects[3] + ']}},{},{},{},{}],DropChances:[1.0f],Health:' + Health; | |
if (mountType === 'Slime') { | |
command += ',Size:4'; | |
} | |
command += '}'; | |
} | |
if (mobType === 'Skeleton') { | |
command += ',SkeletonType:' + Math.round(Math.random()) + '}'; | |
} | |
output = document.getElementById("Code").innerHTML = 'Type this command into a command block and power it to spawn the boss. If you don\'t know how to get a command block, in a creative world, or world with cheats on, type \'/give @p command_block\'. Refresh to get a new code.<br/><br/><br/><br/>' + command; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment