[Sorry for my bad english.]
Hello guys. I create my ModPE using android device. But I need to know the function for this script
this is my code its not working.
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2)//If your item is a wooden hoe and stone hoe, and the block your using it on is stone.
{
if(itemId==291&&blockId==2)
}
addItemInventory(264,1);//Add 1 diamond to your inventory.
alert("Add 1 diamond.");
}
}
function attackHook(attacker, victim)
{
//Your Code Here
}
function modTick()
{
//Your Code Here
}
Please fix this thank. And I hope the next update of ModPE have the output. So work at the code easily.
I UPLOAD MY MOD NOW THANKS :D!
SEE ANOTHER THREAD!
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.
if (itemId==290&&blockId==2)//If your item is a wooden hoe and stone hoe, and the block your using it on is stone.
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2)
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
Use must make "block" with the "{" and "}".
Your code mean:if item is wooden hoe and block is stone and item is stone hoe then...
but you can't use 2 items at the same time.
So you must make 2 different blocks.
And I'm not sure if "alert" works,so just use "print" or "clientMessage".
if (itemId==290&&blockId==2)//If your item is a wooden hoe and stone hoe, and the block your using it on is stone.{addItemInventory(264,1);//Add 1 diamond to your iinventory.print("Add 1 diamond.");}else if(itemId==291&&blockId==2){addItemInventory(264,1);//Add 1 diamond to your iinventory.print("Add 1 diamond.");}
Use must make "block" with the "{" and "}".Your code mean:if item is wooden hoe and block is stone and item is stone hoe then...but you can't use 2 items at the same time.So you must make 2 different blocks.And I'm not sure if "alert" works,so just use "print" or "clientMessage".
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.
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2);If your item is a wooden hoe and stone hoe, and the block your using it on is stone.
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2);
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
}
Why it still not working??
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.
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2);If your item is a wooden hoe and stone hoe, and the block your using it on is stone.
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2);
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
}
Why it still not working??
Try This:
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2)
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2)
{
addItemInventory(264,1);
print("Add 1 diamond.");
}
}
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2);If your item is a wooden hoe and stone hoe, and the block your using it on is stone.
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2);
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
}
Why it still not working??
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2)
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2)
{
addItemInventory(264,1);
print("Add 1 diamond.");
}
}
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2)
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2)
{
addItemInventory(264,1);
print("Add 1 diamond.");
}
}
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==290&&blockId==2)
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2)
{
addItemInventory(264,1);
print("Add 1 diamond.");
}
}
You guy are awesone thank for help, but I don't know how does amp are on my code.
Rollback Post to RevisionRollBack
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.
I'm making my mods right now
1.Diamonds Farm
2.Upgrade Tools
3.Upgrade Armor
I will upload download link tommorrow.
Rollback Post to RevisionRollBack
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.
I will do it on another thread soon.
1.Diamond Farm 100%
download coming soon:
2.Upgrade Tools 80%
download coming soon:
3.Upgrade Armors
didn't work on it yet.
I hate samsung Galaxy S1, its lagging T-T
Rollback Post to RevisionRollBack
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.
To post a comment, please login or register a new account.
Hello guys. I create my ModPE using android device. But I need to know the function for this script
this is my code its not working.
function useItem(x,y,z,itemId,blockId,side) { if(itemId==290&&blockId==2)//If your item is a wooden hoe and stone hoe, and the block your using it on is stone. { if(itemId==291&&blockId==2) } addItemInventory(264,1);//Add 1 diamond to your inventory. alert("Add 1 diamond."); } } function attackHook(attacker, victim) { //Your Code Here } function modTick() { //Your Code Here }Please fix this thank. And I hope the next update of ModPE have the output. So work at the code easily.
I UPLOAD MY MOD NOW THANKS :D!
SEE ANOTHER THREAD!
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.
if (itemId==290&&blockId==2)//If your item is a wooden hoe and stone hoe, and the block your using it on is stone. { addItemInventory(264,1);//Add 1 diamond to your iinventory. print("Add 1 diamond."); } else if(itemId==291&&blockId==2) { addItemInventory(264,1);//Add 1 diamond to your iinventory. print("Add 1 diamond."); }Use must make "block" with the "{" and "}".
Your code mean:if item is wooden hoe and block is stone and item is stone hoe then...
but you can't use 2 items at the same time.
So you must make 2 different blocks.
And I'm not sure if "alert" works,so just use "print" or "clientMessage".
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.
No problem.
{
if(itemId==290&&blockId==2);If your item is a wooden hoe and stone hoe, and the block your using it on is stone.
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
else if(itemId==291&&blockId==2);
{
addItemInventory(264,1);//Add 1 diamond to your iinventory.
print("Add 1 diamond.");
}
}
Why it still not working??
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.
Try This:
function useItem(x,y,z,itemId,blockId,side) { if(itemId==290&&blockId==2) { addItemInventory(264,1);//Add 1 diamond to your iinventory. print("Add 1 diamond."); } else if(itemId==291&&blockId==2) { addItemInventory(264,1); print("Add 1 diamond."); } }function useItem(x,y,z,itemId,blockId,side) { if(itemId==290&&blockId==2) { addItemInventory(264,1);//Add 1 diamond to your iinventory. print("Add 1 diamond."); } else if(itemId==291&&blockId==2) { addItemInventory(264,1); print("Add 1 diamond."); } }Yes,that must work.
But why do you not just copied my code,because it's the same?
You guy are awesone thank for help, but I don't know how does amp are on my code.
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.
i don't know it too.
1.Diamonds Farm
2.Upgrade Tools
3.Upgrade Armor
I will upload download link tommorrow.
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.
I will do it on another thread soon.
1.Diamond Farm 100%
download coming soon:
2.Upgrade Tools 80%
download coming soon:
3.Upgrade Armors
didn't work on it yet.
I hate samsung Galaxy S1, its lagging T-T
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.