function procCmd()
{
var cmd = cmd.split(" ");
if (cmd[0] == "help") {
clientMessage("Type /help 2 for more");
clientMessage("Bowl on Mushroom-MushroomStew");
clientMessage("Bone on Sapling-Cool tree");
clientMessage("Brick-place Brick(Block)");
clientMessage("Clay-place Clay(Block)");
clientMessage("Flint on Iron(Block)-Fire");
}
if (cmd[0] == "help 2") {
clientMessage("Type /help 3 for more");
clientMessage("GlowstoneDust-Place Glowstone");
clientMessage("MushroomStew on Cobble-MossyCobble");
clientMessage("NetherBrick on Obsidian-Glowing Obs");
clientMessage("Seed on on farmland-Wheat");
clientMessage("String-Place Cobweb");
}
if (cmd[0] == "help 3") {
clientMessage("Snowball-Place Snow");
clientMessage("Shears on Leaves-Get Sappling");
clientMessage("Wheat on Stone-Get Seeds");
clientMessage("Axe on Wood-Get Wood");
clientMessage("SugarCane on Stone-Get Sugar");
clientMessage("More Comming Soon! :)");
}
}
now my whole script wont work!
//MattPocketEdition v.1.5 Beta
//By MattdaveMatt
//Date 12/2/2013
//Time 9:42-9:48 PM
//ScripId 14846
function procCmd(cmd)
{
preventDefault();
var cmd = cmd.split(" ");
switch(cmd[0])
{
case "give bucket":
addItemInventory(325, 1);
clientMessage("\ngot bucket!");
}
}
function procCmd()
{
var cmd = cmd.split(" ");
if (cmd[0] == "help") {
clientMessage("Type /help 2 for more");
clientMessage("Bowl on Mushroom-MushroomStew");
clientMessage("Bone on Sapling-Cool tree");
clientMessage("Brick-place Brick(Block)");
clientMessage("Clay-place Clay(Block)");
clientMessage("Flint on Iron(Block)-Fire");
}
if (cmd[0] == "help 2") {
clientMessage("Type /help 3 for more");
clientMessage("GlowstoneDust-Place Glowstone");
clientMessage("MushroomStew on Cobble-MossyCobble");
clientMessage("NetherBrick on Obsidian-Glowing Obs");
clientMessage("Seed on on farmland-Wheat");
clientMessage("String-Place Cobweb");
}
if (cmd[0] == "help 3") {
clientMessage("Snowball-Place Snow");
clientMessage("Shears on Leaves-Get Sappling");
clientMessage("Wheat on Stone-Get Seeds");
clientMessage("Axe on Wood-Get Wood");
clientMessage("SugarCane on Stone-Get Sugar");
clientMessage("More Comming Soon! :)");
}
}
function useItem(x,y,z,itemId,blockId,side) //Defines the function of useItem eg. itemId, and blockId, and setTitle..
{
if(itemId == 295&&blockId==60) // If seeds on farmland.
{
setTile(x,y+1,z,59); //Place grown seeds above the block tapped.
addItemInventory(295,-1); //Removes one Seed form inventory.
}
else if(itemId==267) //If Iron Sword on anything.
{
setTile(x,y+1,z,51); //Place fire the block above it.
}
else if(itemId==287) //If String on anything.
{
setTile(x,y+1,z,30); //Place cobweb.
addItemInventory(287,-1); //Take away one String.
}
else if(itemId==282&&blockId==4) //If Mushroom Stew on cobblestone.
{
setTile(x,y,z,48); //Change it into Mossy Stone.
addItemInventory(282,-1); //Remove one Mushroom Stew from inventory.
}
else if(itemId==296&&blockId==1) //If Wheat on stone.
{
addItemInventory(295,3); //Give player seeds.
addItemInventory(296,-1); //Take away one Wheat.
}
else if(itemId==332) //If Snowball on anything.
{
setTile(x,y+1,z,78); //Place snow on top of it.
addItemInventory(332,-1); //Remove one Snowball from inventory.
}
else if(itemId==318&&blockId==42) //If Flint on a Iron Block.
{
setTile(x,y+1,z); //Put fire on top of the Iron Block
addItemInventory(318,-1);
}
else if(itemId==352&&blockId==6) //If a bone on a sapling.
{
addItemInventory(352,-1); //Remove one bone from player inventory.
setTile(x,y,z,17); //Replace the sapling with wood.
setTile(x,y+1,z,17); //place a log above the sapling cords.
setTile(x,y+2,z,17); //Place a log two blocks above the sapling.
setTile(x,y+3,z,17); //Place a log three blocks above the sapling.
setTile(x,y+4,z,17); //Place a log four blocks above the sapling.
setTile(x,y+5,z,17); //Place a log five blocks above the sapling.
setTile(x,y+6,z,17);
setTile(x+1,y,z,17); //Replace the sapling with wood.
setTile(x+1,y+1,z,17); //place a log above the sapling cords.
setTile(x+1,y+2,z,17); //Place a log two blocks above the sapling.
setTile(x+1,y+3,z,17); //Place a log three blocks above the sapling.
setTile(x+1,y+4,z,17); //Place a log four blocks above the sapling.
setTile(x+1,y+5,z,17); //Place a log five blocks above the sapling.
setTile(x+1,y+6,z,17);
setTile(x,y,z+1,17); //Replace the sapling with wood.
setTile(x,y+1,z+1,17); //place a log above the sapling cords.
setTile(x,y+2,z+1,17); //Place a log two blocks above the sapling.
setTile(x,y+3,z+1,17); //Place a log three blocks above the sapling.
setTile(x,y+4,z+1,17); //Place a log four blocks above the sapling.
setTile(x,y+5,z+1,17); //Place a log five blocks above the sapling.
setTile(x,y+6,z+1,17);
setTile(x+1,y+1,z+1,17); //place a log above the sapling cords.
setTile(x+1,y+2,z+1,17); //Place a log two blocks above the sapling.
setTile(x+1,y+3,z+1,17); //Place a log three blocks above the sapling.
setTile(x+1,y+4,z+1,17); //Place a log four blocks above the sapling.
setTile(x+1,y+5,z+1,17); //Place a log five blocks above the sapling.
setTile(x+1,y+6,z+1,17);
setTile(x+1,y,z+1,17);
setTile(x,y+7,z,18);
setTile(x+1,y+7,z,18);
setTile(x,y+7,z+1,18);
setTile(x+1,y+7,z+1,18);
}
else if(itemId==405&&blockId==49)//if neatherbrick on obsidian.
{
setTile(x,y,z,246); //turn it into glowing obsidian
addItemInventory(405,-1); //Remove a neatherbrick from inventory.
}
else if(getCarriedItem==337>4) //if clay on any thing
{
setTile(x,y+1,z,82); //puts a block of clay where you tapped with the clay
addItemInventory(337,-4); //removes four clay.
}
else if(getCarriedItem==348>4)//if Glowstone dust on anything.
{
setTile(x,y+1,z); //puts a glowstone block 1 block higher than the one tapped.
addIemInventory(348,-4); //take away 4 glowsstone dust
}
else if(itemId==359&&blockId==18) //if shears on leavs
{
setTile(x,y,z,0); //get a sapling
addItemInventory(6,1); //remove the block tapped
}
else if(itemId==281&&itemId==39) //if a bowl on a mushroom
{
setTile(x,y,z,0); //delete the mushroom
addItemInventory(282,1); //give player 1 mushroom stew
addItemInventory(281,-1); //remove one bowl
}
else if(getCarriedItem==336>4)// if a brick(item) on anything
{
setTile(x,y+1,z,45); //place a brick (block)
addItemInventory(336,-4); // remove 4 brick (item) from inventory.
}
else if(itemId==271&&blockId==17)// if wood axe on wood
{
setTile(x,y,z,0); //break wood
addItemInventory(17,1); //give player wood
}
else if(itemId==275&&blockId==17)// if stone axe on wood
{
setTile(x,y,z,0); //break wood
addItemInventory(17,1); //give player wood
}
else if(itemId==258&&blockId==17)// if iron axe on wood
{
setTile(x,y,z,0); //break wood
addItemInventory(17,1); //give player wood
}
else if(itemId==279&&blockId==17)// if wood axe on wood
{
setTile(x,y,z,0); //break wood
addItemInventory(17,2); //give player wood
}
else if(itemId==338&&blockId==2) //if sugarcane o alot of stuff
{
addItemInventory(338,-1);
addItemInventory(353,4);
}
}
if(itemId==280,283 && blockId==1,2,4,2) { }Also, this doesn't work..
function procCmd() { var cmd = cmd.split(" "); if (cmd[0] == "help") { clientMessage("Type /help 2 for more"); clientMessage("Bowl on Mushroom-MushroomStew"); clientMessage("Bone on Sapling-Cool tree"); clientMessage("Brick-place Brick(Block)"); clientMessage("Clay-place Clay(Block)"); clientMessage("Flint on Iron(Block)-Fire"); } if (cmd[0] == "help 2") { clientMessage("Type /help 3 for more"); clientMessage("GlowstoneDust-Place Glowstone"); clientMessage("MushroomStew on Cobble-MossyCobble"); clientMessage("NetherBrick on Obsidian-Glowing Obs"); clientMessage("Seed on on farmland-Wheat"); clientMessage("String-Place Cobweb"); } if (cmd[0] == "help 3") { clientMessage("Snowball-Place Snow"); clientMessage("Shears on Leaves-Get Sappling"); clientMessage("Wheat on Stone-Get Seeds"); clientMessage("Axe on Wood-Get Wood"); clientMessage("SugarCane on Stone-Get Sugar"); clientMessage("More Comming Soon! :)"); } }now my whole script wont work!
//MattPocketEdition v.1.5 Beta //By MattdaveMatt //Date 12/2/2013 //Time 9:42-9:48 PM //ScripId 14846 function procCmd(cmd) { preventDefault(); var cmd = cmd.split(" "); switch(cmd[0]) { case "give bucket": addItemInventory(325, 1); clientMessage("\ngot bucket!"); } } function procCmd() { var cmd = cmd.split(" "); if (cmd[0] == "help") { clientMessage("Type /help 2 for more"); clientMessage("Bowl on Mushroom-MushroomStew"); clientMessage("Bone on Sapling-Cool tree"); clientMessage("Brick-place Brick(Block)"); clientMessage("Clay-place Clay(Block)"); clientMessage("Flint on Iron(Block)-Fire"); } if (cmd[0] == "help 2") { clientMessage("Type /help 3 for more"); clientMessage("GlowstoneDust-Place Glowstone"); clientMessage("MushroomStew on Cobble-MossyCobble"); clientMessage("NetherBrick on Obsidian-Glowing Obs"); clientMessage("Seed on on farmland-Wheat"); clientMessage("String-Place Cobweb"); } if (cmd[0] == "help 3") { clientMessage("Snowball-Place Snow"); clientMessage("Shears on Leaves-Get Sappling"); clientMessage("Wheat on Stone-Get Seeds"); clientMessage("Axe on Wood-Get Wood"); clientMessage("SugarCane on Stone-Get Sugar"); clientMessage("More Comming Soon! :)"); } } function useItem(x,y,z,itemId,blockId,side) //Defines the function of useItem eg. itemId, and blockId, and setTitle.. { if(itemId == 295&&blockId==60) // If seeds on farmland. { setTile(x,y+1,z,59); //Place grown seeds above the block tapped. addItemInventory(295,-1); //Removes one Seed form inventory. } else if(itemId==267) //If Iron Sword on anything. { setTile(x,y+1,z,51); //Place fire the block above it. } else if(itemId==287) //If String on anything. { setTile(x,y+1,z,30); //Place cobweb. addItemInventory(287,-1); //Take away one String. } else if(itemId==282&&blockId==4) //If Mushroom Stew on cobblestone. { setTile(x,y,z,48); //Change it into Mossy Stone. addItemInventory(282,-1); //Remove one Mushroom Stew from inventory. } else if(itemId==296&&blockId==1) //If Wheat on stone. { addItemInventory(295,3); //Give player seeds. addItemInventory(296,-1); //Take away one Wheat. } else if(itemId==332) //If Snowball on anything. { setTile(x,y+1,z,78); //Place snow on top of it. addItemInventory(332,-1); //Remove one Snowball from inventory. } else if(itemId==318&&blockId==42) //If Flint on a Iron Block. { setTile(x,y+1,z); //Put fire on top of the Iron Block addItemInventory(318,-1); } else if(itemId==352&&blockId==6) //If a bone on a sapling. { addItemInventory(352,-1); //Remove one bone from player inventory. setTile(x,y,z,17); //Replace the sapling with wood. setTile(x,y+1,z,17); //place a log above the sapling cords. setTile(x,y+2,z,17); //Place a log two blocks above the sapling. setTile(x,y+3,z,17); //Place a log three blocks above the sapling. setTile(x,y+4,z,17); //Place a log four blocks above the sapling. setTile(x,y+5,z,17); //Place a log five blocks above the sapling. setTile(x,y+6,z,17); setTile(x+1,y,z,17); //Replace the sapling with wood. setTile(x+1,y+1,z,17); //place a log above the sapling cords. setTile(x+1,y+2,z,17); //Place a log two blocks above the sapling. setTile(x+1,y+3,z,17); //Place a log three blocks above the sapling. setTile(x+1,y+4,z,17); //Place a log four blocks above the sapling. setTile(x+1,y+5,z,17); //Place a log five blocks above the sapling. setTile(x+1,y+6,z,17); setTile(x,y,z+1,17); //Replace the sapling with wood. setTile(x,y+1,z+1,17); //place a log above the sapling cords. setTile(x,y+2,z+1,17); //Place a log two blocks above the sapling. setTile(x,y+3,z+1,17); //Place a log three blocks above the sapling. setTile(x,y+4,z+1,17); //Place a log four blocks above the sapling. setTile(x,y+5,z+1,17); //Place a log five blocks above the sapling. setTile(x,y+6,z+1,17); setTile(x+1,y+1,z+1,17); //place a log above the sapling cords. setTile(x+1,y+2,z+1,17); //Place a log two blocks above the sapling. setTile(x+1,y+3,z+1,17); //Place a log three blocks above the sapling. setTile(x+1,y+4,z+1,17); //Place a log four blocks above the sapling. setTile(x+1,y+5,z+1,17); //Place a log five blocks above the sapling. setTile(x+1,y+6,z+1,17); setTile(x+1,y,z+1,17); setTile(x,y+7,z,18); setTile(x+1,y+7,z,18); setTile(x,y+7,z+1,18); setTile(x+1,y+7,z+1,18); } else if(itemId==405&&blockId==49)//if neatherbrick on obsidian. { setTile(x,y,z,246); //turn it into glowing obsidian addItemInventory(405,-1); //Remove a neatherbrick from inventory. } else if(getCarriedItem==337>4) //if clay on any thing { setTile(x,y+1,z,82); //puts a block of clay where you tapped with the clay addItemInventory(337,-4); //removes four clay. } else if(getCarriedItem==348>4)//if Glowstone dust on anything. { setTile(x,y+1,z); //puts a glowstone block 1 block higher than the one tapped. addIemInventory(348,-4); //take away 4 glowsstone dust } else if(itemId==359&&blockId==18) //if shears on leavs { setTile(x,y,z,0); //get a sapling addItemInventory(6,1); //remove the block tapped } else if(itemId==281&&itemId==39) //if a bowl on a mushroom { setTile(x,y,z,0); //delete the mushroom addItemInventory(282,1); //give player 1 mushroom stew addItemInventory(281,-1); //remove one bowl } else if(getCarriedItem==336>4)// if a brick(item) on anything { setTile(x,y+1,z,45); //place a brick (block) addItemInventory(336,-4); // remove 4 brick (item) from inventory. } else if(itemId==271&&blockId==17)// if wood axe on wood { setTile(x,y,z,0); //break wood addItemInventory(17,1); //give player wood } else if(itemId==275&&blockId==17)// if stone axe on wood { setTile(x,y,z,0); //break wood addItemInventory(17,1); //give player wood } else if(itemId==258&&blockId==17)// if iron axe on wood { setTile(x,y,z,0); //break wood addItemInventory(17,1); //give player wood } else if(itemId==279&&blockId==17)// if wood axe on wood { setTile(x,y,z,0); //break wood addItemInventory(17,2); //give player wood } else if(itemId==338&&blockId==2) //if sugarcane o alot of stuff { addItemInventory(338,-1); addItemInventory(353,4); } }?
Thanks!
~MattdaveMatt
Want GUI Templates? Done!
https://github.com/BeATz-UnKNoWN/ModPE_Scripts/wiki/ModPE-Script-Templates
P.S. Feel free to follow me so you know when I post "awesome" content and make the MCForums a brighter place (totally).
If you need to contact me you can either shoot a Kik message to beatz_unknown or send an email to [email protected]
Thanks!