//MoreToolsEX ver 1.2b Stable
//by 7thGrader
/*
   Copyright 2015 7thGrader

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0
*/
var author = "7thGrader";
var version = "1.2b dev1";

function newLevel()
{
clientMessage("MoreToolsEX 1.2b dev1 by 7thGrader Loaded!");
}

//setitem
ModPE.setItem(407, "ruby", 0, "Power Gem");
ModPE.setFoodItem(408,"magma_cream",0, 9001,"Insta-Heal");
ModPE.setItem(409, "blaze_rod", 0, "Super Stick");
ModPE.setItem(410, "ender_eye", 0, "Ender Wings");
ModPE.setItem(411, "book_enchanted", 0, "TimeSpell(Fast)");
ModPE.setItem(412, "book_enchanted", 0, "TimeSpell(Normal)");
ModPE.setItem(413, "book_enchanted", 0, "TimeSpell(Slow)");
ModPE.setItem(414, "nether_star", 0, "Block Extractor");
ModPE.setItem(415, "sword", 3, "Budder Sword");


//Making Power Gem and Reverting
Item.addFurnaceRecipe(57, 407, 1);
Item.addFurnaceRecipe(407, 57, 1);

//tools recipe
Item.addShapedRecipe(408, 32, 0, ["ttt", "jpj", "ttt"], ["j", 407, 0, "t", 354, 0, "p", 293, 0]);
Item.addShapedRecipe(409, 1, 0, ["jpj", "tjt", "jjj"], ["j", 407, 0, "t", 46, 0, "p", 278, 0]);
Item.addShapedRecipe(410, 1, 0, ["jlj", "ltl", "jjj"], ["j", 407, 0, "t", 276, 0, "l", 325, 10]);
Item.addShapedRecipe(411, 1, 0, ["jlj", "ltl", "jjj"], ["j", 407, 0, "t", 277, 0, "l", 347, 0]);
Item.addShapedRecipe(412, 1, 0, ["jlj", "ltl", "jjj"], ["j", 407, 0, "t", 279, 0, "l", 347, 0]);
Item.addShapedRecipe(413, 1, 0, ["jlj", "ltl", "jjj"], ["j", 407, 0, "t", 247, 0, "l", 347, 0]);
Item.addShapedRecipe(414, 1, 0, ["jlj", "ltl", "jjj"], ["j", 407, 0, "t", 278, 0, "l", 388, 0]);
Item.addShapedRecipe(415, 1, 0, ["jlj", "ltl", "jjj"], ["j", 407, 0, "t", 325, 10, "l", 259, 0]);

//effect
function useItem(x,y,z,i,b)
{
if (i == 409)
{
explode(x,y,z,5);
}
else if (i == 410)
{
clientMessage("Flight Enabled!");
Player.setCanFly(1/0);
}
else if (i == 411)
{
clientMessage("It feels weird..");
ModPE.setGameSpeed(40);
}
else if (i == 412)
{
clientMessage("Normal Speed!");
ModPE.setGameSpeed(20);
}
else if (i == 413)
{
clientMessage("Slow it down.");
ModPE.setGameSpeed(10);
}
else if (i == 414)
{
clientMessage("Block Extracted.");
if(b != 7) // no obtain bedrock
{
if(Math.random >= 0.06)
{
Level.destroyBlock(x,y,z,true)
}
else
{
explode(x, y, z, 3);
}
}
else return;
}
else return;
}

function attackHook(a,v)
{
if (Player.getCarriedItem()==415)
{
Entity.setFireTicks(v, 9001);
Entity.setHealth(v, 3);
Entity.setVelY(v, 2);
}
else return;
}

/*
Tested : 3cf975f47c7489ff5565e72b19db581c
*/

@@ -17,17 +17,15 @@
 r 1.
-2b Stable
+3b dev2
 %0A//b
@@ -343,23 +343,23 @@
 on = %221.
-2
+3
 b dev
-1
+2
 %22;%0A%0Afunc
@@ -409,15 +409,15 @@
 X 1.
-2
+3
 b dev
-1
+2
  by 
@@ -2297,107 +2297,113 @@
 %22);%0A
-if(b != 7) // no obtain bedrock%0A%7B%0Aif(Math.random %3E= 0.06)%0A%7B%0ALevel.destroyBlock(x,y,z,true)%0A%7D%0Aelse%0A%7B
+Level.destroyBlock(x,y,z,true)%0A%7D%0Aelse if(b==57&&i==331&&getTile(x,y-1,z)==46)%0A%7B%0AaddItemInventory(407, 2);
 %0Aexp
@@ -2420,27 +2420,34 @@
  z, 
-3);%0A%7D%0A%7D%0Aelse return
+4);%0AclientMessage(%22Boom!%22)
 ;%0A%7D%0A
@@ -2619,16 +2619,17 @@
 urn;%0A%7D%0A%0A
+%0A
 /*%0ATeste

Create MoreToolsEX.js