var sk = 0; var sk = [0]; var pos; var created = 1;
var spawned = -1; var explode = 0; var peaceful = false;
var random_max = 30; 
var random_1 = 0; var random_2 = 16;  var itemID_1 = 287; var itemMin_1 = 1; var itemMax_1 = 3; var itemDmg_1 = 0;
var random_3 = 0; var random_4 = 0;  var itemID_2 = 0; var itemMin_2 = 0; var itemMax_2 = 0; var itemDmg_2 = 0;
var random_5 = 0; var random_6 = 0;  var itemID_3 = 0; var itemMin_3 = 0; var itemMax_3 = 0; var itemDmg_3 = 0;
var random_7 = 0; var random_8 = 0;  var itemID_4 = 0; var itemMin_4 = 0; var itemMax_4 = 0; var itemDmg_4 = 0;
var random_9 = 0; var random_10 = 0;  var itemID_5 = 0; var itemMin_5 = 0; var itemMax_5 = 0; var itemDmg_5 = 0;

var shealth = 36; var moveSpeed = 0.9;
var texture = "mob/white_spider.png"; var damageSound = "";
var power = 2; var itemHeldID = 0;

for (var i = 0; spawnedEntities != null &&  i < spawnedEntities.length; i++) {var ent = spawnedEntities[i];
if (peaceful != true) {ent.setAttackStrength(power);} 
ent.setTexture(texture); ent.attackEntityFrom(player, 1);
ent.setMaxHealth(shealth); ent.setMoveSpeed(moveSpeed); 
ent.setHealth(ent.getMaxHealth()); ent.pathToEntity(player);
var healthcare = ent.getHealth();
if (itemHeldID != 0) {ent.setHeldItem(Item(itemHeldID));}}

function everyTick() {var epos = ent.getPosition(); var pos = player.getPosition(); var rot = player.getRotation();
var distance = Math.floor(Math.sqrt(Math.pow(epos.x-pos.x,2)+Math.pow(epos.y-pos.y,2)+Math.pow(epos.z-pos.z,2)));
if (distance < 1.2) {poison = 6; poisonP = 1;}}