EXAMPLE: Lets say you want to add 34 sand to your inventory when you hit a block with a stick
function useItem(x,y,z,itemId,blockId,side) if(itemId==280);//The 280 is the iD for stick addItemInventory(12,34);//The 12 is the id for sand and 34 is the amount
Orrrrrrrrrrrrrrrrrrrrrr
function useItem(x,y,z,itemId,blockId,side)
if(itemId==280);//Stick again addItemInventory(1,35);//1 is the iD for stone
The semicolons are VERY important they end the function if you don't you will crash or get no result also in JavaScript capitals are important on certain functions check TreeBL post for a list of avaible functions and where the caps need to be! this is also untested so there might be a error
I need someone help in coding MODSCRIPTS.
Also i made a map where i build the biggest house in survival with scripts.
So please tell me ASAP.
Thanks
function useItem(x,y,z,itemId,blockId,side)
if(itemId==280);//The 280 is the iD for stick
addItemInventory(12,34);//The 12 is the id for sand and 34 is the amount
Orrrrrrrrrrrrrrrrrrrrrr
function useItem(x,y,z,itemId,blockId,side)
if(itemId==280);//Stick again
addItemInventory(1,35);//1 is the iD for stone
The semicolons are VERY important they end the function if you don't you will crash or get no result also in JavaScript capitals are important on certain functions check TreeBL post for a list of avaible functions and where the caps need to be! this is also untested so there might be a error
Or (if you are on android, like me) you can use PocketInvEditor... Btw, I also am in the same position as you, Zekousfai.