var countdown = 500;
var Zombie = 0;

function useItem(x,y,z,itemId,blockId)
{
if(itemId==336)
{
var stve = Level.spawnMob(x, y + 1, z, 32, "mob/Chica Zombie.png");
Entity.setRenderType(stve, 3);
Entity.setHealth(stve, 20);
Zombie = 1;
clientMessage(ChatColor.RED + "Chicas Mobs by LuisEg3441 ");
}
}

function modTick()
{
if(Zombie==1)
{
countdown--;
var fws = Math.floor ((Math.random() * 15) + 1);
{
if(countdown==0&&fws==1)
{
}
}
}
}

function attackHook(attacker,victim)
{
if(Entity.getEntityTypeId(victim)==11&&Zombie==1)
{
Level.playSound(getPlayerX(), getPlayerY(), getPlayerZ(), "random.hurt", 100, 30);
}
}

function deathHook(attacker, victim)
{
if(Entity.getEntityTypeId(victim)==11&&Zombie==1)
{
Zombie = 0;
}
}


