I want a stick to spawn cows on whatever block, so i did this:
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId=280)//Your Code Here
{
function Level.spawnCow()
print("You spawned a fabulas cow. Kill the pigs!")
}
function attackHook(attacker, victim)
{
if(getcarrieditem()==280)//Your Code Here
{
preventDefault();
setVelY(attacker,1.5);
print("Did I mention that they fly?")
}
function modTick()
{
//Your Code Here
}
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId=280)
{
Level.spawnCow( x, y, z, "mob/pig.png")
print("You spawned a fabulas cow. Kill the pigs!") }
function attackHook(attacker, victim)
{
if(getcarrieditem()==280)
{
preventDefault();
setVelY(attacker,1.5);
print("Did I mention that they fly?")
}
I want a stick to spawn cows on whatever block, so i did this:
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId=280)//Your Code Here
{
function Level.spawnCow()
print("You spawned a fabulas cow. Kill the pigs!")
}
function attackHook(attacker, victim)
{
if(getcarrieditem()==280)//Your Code Here
{
preventDefault();
setVelY(attacker,1.5);
print("Did I mention that they fly?")
}
function modTick()
{
//Your Code Here
}
Is there a error with this? I use blocklauncher.
-The Fab Interade
{
if(itemId=0)
spawnCow(x,y,z,"mob/cow.png");
print("You spawned a fabulas cow. Kill the pigs!");
setTile(x,y,z,20);
setPosition(getPlayerEnt(),x,y+2,z);
}
{
if(itemId=319)
spawnPig(x,y+4,z,"mob/pig.png");
print("KILL THAT PIGGY!");
}
PLZ HELP
{
if(itemId=280)
{
Level.spawnCow( x, y, z, "mob/pig.png")
print("You spawned a fabulas cow. Kill the pigs!") }
function attackHook(attacker, victim)
{
if(getcarrieditem()==280)
{
preventDefault();
setVelY(attacker,1.5);
print("Did I mention that they fly?")
}