What is love? Could I get one? Could I make one? Could I have one? Could I have it on my school?
Does it hurt? Does it have a pain? Does it nice? Does it feel happy? Does it make you better?
Maybe I can have one. Maybe I will get one. Maybe I can fell it. Maybe I can touched it.
All of I do is scripting to work on my program. Never be more than this.
What is love? Could I get one? Could I make one? Could I have one? Could I have it on my school?
Does it hurt? Does it have a pain? Does it nice? Does it feel happy? Does it make you better?
Maybe I can have one. Maybe I will get one. Maybe I can fell it. Maybe I can touched it.
All of I do is scripting to work on my program. Never be more than this.
Sorry no one could reply fast enough, but I looked over it. I do not know ModPE scripting, but I do know JavaScript, which is close enough to ModPE.
Here is the fixed code, you will have to put the rest of your code back in it.
function(x,y,z,itemId,blockId,side){
//Nothing was wrong with the "if" statement
if(itemId==347 && blockId==247 && getTile(x,y-1,z)==5 && getTile(x+1,y,z)==5
&& getTile(x,y,z+1)==5 && getTile(x-1,y,z)==5 && getTile(x,y,z-1)==5){
clientMessage("You have created Wooden House!"); //PROBLEM: you forgot a semi-colon here
//Put the rest of your code here
}
}
Also, next time use the "code" tags to put your scripts inside of when posting.
Last, instead of doing this:
//Part of your code:
setTile(x,y-1,z+1,5);
setTile(x,y-1,z+2,5);
setTile(x,y-1,z+3,5);
setTile(x,y-1,z-1,5);
setTile(x,y-1,z-2,5);
setTile(x,y-1,z-3,5);
//Another part of your code:
setTile(x,y,z+1,5);
setTile(x,y,z+2,5);
setTile(x,y+1,z+1,5);
setTile(x,y+1,z+2,5);
setTile(x,y+2,z+1,5);
setTile(x,y+2,z+2,5);
setTile(x,y,z+3,5);
setTile(x,y+1,z+3,5);
setTile(x,y+2,z+3,5);
...use a forloop. It is much easier to write, and is more "professional", like this:
//Same as what you did before, but much easier to see
for(var i=-3;i<=3;i++){
setTile(x,y-1,z+i,5);
}
//Another example:
for(var i=0;i<=3;i++){
for(var j=0;j<=3;j++){
setTile(x,y+i,z+j,5);
}
}
function(x,y,z,itemId,blockId,side)
{
//Not working below!
if(itemId==347&&blockId==247&&getTile(x,y-1,z)==5&&getTile(x+1,y,z)==5&&getTile(x,y,z+1)==5&&getTile(x-1,y,z)==5&&getTile(x,y,z-1)==5)
//Not working above!
{
//ยาว 8 บล๊อก กว้าง 7 บล๊อก
//bottom
clientMessage("You have created Wooden House!")
setTile(x,y-1,z+1,5);
setTile(x,y-1,z+2,5);
setTile(x,y-1,z+3,5);
setTile(x,y-1,z-1,5);
setTile(x,y-1,z-2,5);
setTile(x,y-1,z-3,5);
//ทำลายบล็อกขีดขวางทิ้ง
setTile(x,y-1,z,0);
setTile(x-1,y,z,0);
setTile(x+1,y,z,0);
//ซ้าย
setTile(x,y,z,0);
setTile(x,y,z+1,5);
setTile(x+1,y,z+1,50);
setTile(x,y,z+2,5);
setTile(x,y+1,z+1,5);
setTile(x,y+1,z+2,5);
setTile(x,y+2,z+1,5);
setTile(x,y+2,z+2,5);
setTile(x,y,z+3,5);
setTile(x,y+1,z+3,5);
setTile(x,y+2,z+3,5);
setTile(x,y,z+1,5);
setTile(x,y,z-1,5);
//ขวา
setTile(x+1,y,z-1,50);
setTile(x,y,z-2,5);
setTile(x,y+1,z-1,5);
setTile(x,y+1,z-2,5);
setTile(x,y+2,z-1,5);
setTile(x,y+2,z-2,5);
setTile(x,y+2,z,5);
setTile(x,y+2,z-2,5);
setTile(x,y,z-3,5);
setTile(x,y+1,z-3,5);
setTile(x,y+2,z-3,5);
//หน้าขวา 1 บล็อก
setTile(x-1,y,z-3,5);
setTile(x-1,y+1,z-3,5);
setTile(x-1,y+1,z-3,5);
setTile(x-1,y-1,z-3,5);
setTile(x-1,y+1,z-3,5);
setTile(x-1,y+1,z-3,5);
setTile(x-1,y+2,z-3,5);
//หน้าขวา 2 บล็อก
setTile(x-2,y,z-3,5);
setTile(x-2,y+1,z-3,5);
setTile(x-2,y+1,z-3,5);
setTile(x-2,y-1,z-3,5);
setTile(x-2,y+1,z-3,5);
setTile(x-2,y+1,z-3,5);
setTile(x-2,y+2,z-3,5);
//หน้าขวา 3 บล็อก
setTile(x-3,y,z-3,5);
setTile(x-3,y+1,z-3,5);
setTile(x-3,y+1,z-3,5);
setTile(x-3,y-1,z-3,5);
setTile(x-3,y+1,z-3,5);
setTile(x-3,y+1,z-3,5);
setTile(x-3,y+2,z-3,5);
//หน้าขวา 4 บล็อก
setTile(x-4,y,z-3,5);
setTile(x-4,y+1,z-3,5);
setTile(x-4,y+1,z-3,5);
setTile(x-4,y-1,z-3,5);
setTile(x-4,y+1,z-3,5);
setTile(x-4,y+1,z-3,5);
setTile(x-4,y+2,z-3,5);
//หน้าขวา 5 บล็อก
setTile(x-5,y,z-3,5);
setTile(x-5,y+1,z-3,5);
setTile(x-5,y+1,z-3,5);
setTile(x-5,y-1,z-3,5);
setTile(x-5,y+1,z-3,5);
setTile(x-5,y+1,z-3,5);
setTile(x-5,y+2,z-3,5);
//หน้าขวา 6 บล็อก
setTile(x-6,y,z-3,5);
setTile(x-6,y+1,z-3,5);
setTile(x-6,y+1,z-3,5);
setTile(x-6,y-1,z-3,5);
setTile(x-6,y+1,z-3,5);
setTile(x-6,y+1,z-3,5);
setTile(x-6,y+2,z-3,5);
//หน้าขวา 7 บล็อก
setTile(x-7,y,z-3,5);
setTile(x-7,y+1,z-3,5);
setTile(x-7,y+1,z-3,5);
setTile(x-7,y-1,z-3,5);
setTile(x-7,y+1,z-3,5);
setTile(x-7,y+1,z-3,5);
setTile(x-7,y+2,z-3,5);
//หน้าขวา 8 บล็อก
setTile(x-8,y,z-3,5);
setTile(x-8,y+1,z-3,5);
setTile(x-8,y+1,z-3,5);
setTile(x-8,y-1,z-3,5);
setTile(x-8,y+1,z-3,5);
setTile(x-8,y+1,z-3,5);
setTile(x-8,y+2,z-3,5);
//หน้าซ้าย 1 บล็อก
setTile(x-1,y,z+3,5);
setTile(x-1,y+1,z+3,5);
setTile(x-1,y+1,z+3,5);
setTile(x-1,y-1,z+3,5);
setTile(x-1,y+1,z-3,5);
setTile(x-1,y+1,z+3,5);
setTile(x-1,y+2,z+3,5);
//หน้าซ้าย 2 บล็อก
setTile(x-2,y,z+3,5);
setTile(x-2,y+1,z+3,5);
setTile(x-2,y+1,z+3,5);
setTile(x-2,y-1,z+3,5);
setTile(x-2,y+1,z+3,5);
setTile(x-2,y+1,z+3,5);
setTile(x-2,y+2,z+3,5);
//หน้าซ้าย 3 บล็อก
setTile(x-3,y,z+3,5);
setTile(x-3,y+1,z+3,5);
setTile(x-3,y+1,z+3,5);
setTile(x-3,y-1,z+3,5);
setTile(x-3,y+1,z+3,5);
setTile(x-3,y+1,z+3,5);
setTile(x-3,y+2,z+3,5);
//หน้าซ้าย 4
setTile(x-4,y,z+3,5);
setTile(x-4,y+1,z+3,5);
setTile(x-4,y+1,z+3,5);
setTile(x-4,y-1,z+3,5);
setTile(x-4,y+1,z+3,5);
setTile(x-4,y+1,z+3,5);
setTile(x-4,y+2,z+3,5);
//หน้าซ้าย 5
setTile(x-5,y,z+3,5);
setTile(x-5,y+1,z+3,5);
setTile(x-5,y+1,z+3,5);
setTile(x-5,y-1,z+3,5);
setTile(x-5,y+1,z+3,5);
setTile(x-5,y+1,z+3,5);
setTile(x-5,y+2,z+3,5);
//หน้าซ้าย 6
setTile(x-6,y,z+3,5);
setTile(x-6,y+1,z+3,5);
setTile(x-6,y+1,z+3,5);
setTile(x-6,y-1,z+3,5);
setTile(x-6,y+1,z+3,5);
setTile(x-6,y+1,z+3,5);
setTile(x-6,y+2,z+3,5);
//หน้าซ้าย 7
setTile(x-7,y,z+3,5);
setTile(x-7,y+1,z+3,5);
setTile(x-7,y+1,z+3,5);
setTile(x-7,y-1,z+3,5);
setTile(x-7,y+1,z+3,5);
setTile(x-7,y+1,z+3,5);
setTile(x-7,y+2,z+3,5);
//หน้าซ้าย 8
setTile(x-8,y,z+3,5);
setTile(x-8,y+1,z+3,5);
setTile(x-8,y+1,z+3,5);
setTile(x-8,y-1,z+3,5);
setTile(x-8,y+1,z+3,5);
setTile(x-8,y+1,z+3,5);
setTile(x-8,y+2,z+3,5);
//หลังซ้าย 1
setTile(x-8,y-1,z,5);
setTile(x-8,y,z,5);
setTile(x-8,y+1,z,5);
setTile(x-8,y+1,z,5);
setTile(x-8,y+2,z,5);
//หลังซ้าย 2
setTile(x-8,y-1,z+1,5);
setTile(x-8,y,z+1,5);
setTile(x-8,y+1,z+1,5);
setTile(x-8,y+1,z+1,5);
setTile(x-8,y+2,z+1,5);
//ไฟ
setTile(x-7,y,z+1,50);
//หลังซ้าย 3
setTile(x-8,y-1,z+2,5);
setTile(x-8,y,z+2,5);
setTile(x-8,y+1,z+2,5);
setTile(x-8,y+1,z+2,5);
setTile(x-8,y+2,z+2,5);
//หลังขวา 1
setTile(x-8,y-1,z-1,5);
setTile(x-8,y,z-1,5);
setTile(x-8,y+1,z-1,5);
setTile(x-8,y+1,z-1,5);
setTile(x-8,y+2,z-1,5);
//ไฟ
setTile(x-7,y,z-1,50);
//หน้าขวา 2
setTile(x-8,y-1,z-2,5);
setTile(x-8,y,z-2,5);
setTile(x-8,y+1,z-2,5);
setTile(x-8,y+1,z-2,5);
setTile(x-8,y+2,z-2,5);
//หลังคากลาง
setTile(x-1,y+2,z,5);
setTile(x-2,y+2,z,5);
setTile(x-3,y+2,z,5);
setTile(x-4,y+2,z,5);
setTile(x-5,y+2,z,5);
setTile(x-6,y+2,z,5);
setTile(x-7,y+2,z,5);
//เพิ่มหนึ่งชั้น
//หลังคาเสริม
setTile(x,y+4,z,5);
setTile(x-1,y+4,z,5);
setTile(x-2,y+4,z,5);
setTile(x-3,y+4,z,5);
setTile(x-4,y+4,z,5);
setTile(x-5,y+4,z,5);
setTile(x-6,y+4,z,5);
setTile(x-7,y+4,z,5);
setTile(x-8,y+4,z,5);
//กลับมาเพิ่มหนึ่งชั้น
setTile(x,y+3,z,5);
setTile(x-1,y+3,z,5);
setTile(x-2,y+3,z,5);
setTile(x-3,y+3,z,5);
setTile(x-4,y+3,z,5);
setTile(x-5,y+3,z,5);
setTile(x-6,y+3,z,5);
setTile(x-7,y+3,z,5);
setTile(x-8,y+3,z,5);
//หลังคาขวา 1
setTile(x-1,y+2,z+1,5);
setTile(x-2,y+2,z+1,5);
setTile(x-3,y+2,z+1,5);
setTile(x-4,y+2,z+1,5);
setTile(x-5,y+2,z+1,5);
setTile(x-6,y+2,z+1,5);
setTile(x-7,y+2,z+1,5);
//หลังคาเพิ่ม 2
setTile(x,y+3,z-1,5);
setTile(x-1,y+3,z-1,5);
setTile(x-2,y+3,z-1,5);
setTile(x-3,y+3,z-1,5);
setTile(x-4,y+3,z-1,5);
setTile(x-5,y+3,z-1,5);
setTile(x-6,y+3,z-1,5);
setTile(x-7,y+3,z-1,5);
setTile(x-8,y+3,z-1,5);
//หลังคาเพิ่ม 3
setTile(x,y+3,z+1,5);
setTile(x-1,y+3,z+1,5);
setTile(x-2,y+3,z+1,5);
setTile(x-3,y+3,z+1,5);
setTile(x-4,y+3,z+1,5);
setTile(x-5,y+3,z+1,5);
setTile(x-6,y+3,z+1,5);
setTile(x-7,y+3,z+1,5);
setTile(x-8,y+3,z+1,5);
//หลังคาขวา 2
setTile(x-1,y+2,z+2,5);
setTile(x-2,y+2,z+2,5);
setTile(x-3,y+2,z+2,5);
setTile(x-4,y+2,z+2,5);
setTile(x-5,y+2,z+2,5);
setTile(x-6,y+2,z+2,5);
setTile(x-7,y+2,z+2,5);
//หลังคาซ้าย 1
setTile(x-1,y+2,z-1,5);
setTile(x-2,y+2,z-1,5);
setTile(x-3,y+2,z-1,5);
setTile(x-4,y+2,z-1,5);
setTile(x-5,y+2,z-1,5);
setTile(x-6,y+2,z-1,5);
setTile(x-7,y+2,z-1,5);
//หลังคาซ้าย 2
setTile(x-1,y+2,z-2,5);
setTile(x-2,y+2,z-2,5);
setTile(x-3,y+2,z-2,5);
setTile(x-4,y+2,z-2,5);
setTile(x-5,y+2,z-2,5);
setTile(x-6,y+2,z-2,5);
setTile(x-7,y+2,z-2,5);
}
}
I made my Instant build mod the player must to build wooden plank like a plus in the bottom and put the nether reactor in the top.
I need help thanks.
Does it hurt? Does it have a pain? Does it nice? Does it feel happy? Does it make you better?
Maybe I can have one. Maybe I will get one. Maybe I can fell it. Maybe I can touched it.
All of I do is scripting to work on my program. Never be more than this.
Does it hurt? Does it have a pain? Does it nice? Does it feel happy? Does it make you better?
Maybe I can have one. Maybe I will get one. Maybe I can fell it. Maybe I can touched it.
All of I do is scripting to work on my program. Never be more than this.
Here is the fixed code, you will have to put the rest of your code back in it.
function(x,y,z,itemId,blockId,side){ //Nothing was wrong with the "if" statement if(itemId==347 && blockId==247 && getTile(x,y-1,z)==5 && getTile(x+1,y,z)==5 && getTile(x,y,z+1)==5 && getTile(x-1,y,z)==5 && getTile(x,y,z-1)==5){ clientMessage("You have created Wooden House!"); //PROBLEM: you forgot a semi-colon here //Put the rest of your code here } }Also, next time use the "code" tags to put your scripts inside of when posting.
Last, instead of doing this:
//Same as what you did before, but much easier to see for(var i=-3;i<=3;i++){ setTile(x,y-1,z+i,5); } //Another example: for(var i=0;i<=3;i++){ for(var j=0;j<=3;j++){ setTile(x,y+i,z+j,5); } }