Hi guys i will make few tutorials about Modpe and i hope you like it.
Ok guys... Let's start with the basic functions of Modpe.
Important things that you have to know:
1° Everything that you write before the //, will be ignored.
Example:
//Everything in this line will be ignored
2° Everything that you write inside the /*Here*/ will be ignored.
/*Everything that you write inside here will be ignored */
function useItem():
With the function useItem you can make something happens when you use a determined item in a determined block.
Example:
function useItem(x,y,z,itemId,blockId)
{
if(itemId==280 && blockId==2)//If your item is a stick and the block a grass block
{
clientMessage("Hi Guys")
}
}
function clientMessage():
With this function you can make appear messages in the chat.
Example:
function useItem(x,y,z,itemId,blockId)
{
if(itemId==280 && blockId==2)
{
clientMessage("Hi Guys")//Will appear this message in the chat
}
}
function print():
This function make appear a popup message.
Example:
function useItem(x,y,z,itemId,blockId)
{
if(itemId==280 && blockId==2)
{
print("Hi Guys")//Will appear this message
}
}
function addItemInventory():
With this function you can add or remove items or blocks of your inventory.
The first number(276) is the id of the diamond sword, and the second number(1) is amount of items you want add.
Example 1:
function useItem(x,y,z,itemId,blockId)
{
if(itemId==280 && blockId==2)
{
addItemInventory(276,1);//Will add one diamond sword to your inventory.
}
}
If you place a negative number, you will remove a the item of your inventory.
Example 2:
function useItem(x,y,z,itemId,blockId)
{
if(itemId==280 && blockId==2)
{
addItemInventory(276,-1);//Will remove one diamond sword of your inventory.
}
}
function attackHook():
Make something happens when you attack someone with a determined item.
Example:
function attackHook(attacker, victim)
{
if(getCarriedItem==280)//If attack someone with a stick.
{
clientMessage("Hi Guys");
}
}
function Level.setTime():
Use the function Level.setTime() to change the time, like the command of PC version.
Example:
function useItem(x,y,z,itemId,blockId)
{
if(itemId==280)
{
Level.setTime(8280);//Will set the time to night.
}
}
Remember this topic are in development, i will add many others things.
If i helped you, support me by clicking in the green buttom.
Anything that you want ask.
Follow me on Twitter @AuthenticPixel
Add me on Skype: AuthenticPixel
I can be found on Freenode IRC channels #pocketmine, #ModPEScripts, #LegendOfMCPE, #pmplugins or #BeaconMine.
I am a PocketMine-MP plugin developer. I hate it when people think that I love stupid admin positions. Being an admin is nothing compared to being a plugin developer.
I am also a main developer of BlockServer, a work-in-progress MCPE server software. You are welcome to download it, but it so far onlly spawns you in the upther (above the world). You can chat, though.
I do not own this server but I just love to put this banner here:
No, I meant "please move things into here"I'd rather seeing someone explaining &$data in PocketMine
Rollback Post to RevisionRollBack
I can be found on Freenode IRC channels #pocketmine, #ModPEScripts, #LegendOfMCPE, #pmplugins or #BeaconMine.
I am a PocketMine-MP plugin developer. I hate it when people think that I love stupid admin positions. Being an admin is nothing compared to being a plugin developer.
I am also a main developer of BlockServer, a work-in-progress MCPE server software. You are welcome to download it, but it so far onlly spawns you in the upther (above the world). You can chat, though.
I do not own this server but I just love to put this banner here:
To post a comment, please login or register a new account.
Hi guys i will make few tutorials about Modpe and i hope you like it.
Ok guys... Let's start with the basic functions of Modpe.
Important things that you have to know:
1° Everything that you write before the //, will be ignored.
Example:
2° Everything that you write inside the /*Here*/ will be ignored.
With the function useItem you can make something happens when you use a determined item in a determined block.
Example:
function useItem(x,y,z,itemId,blockId) { if(itemId==280 && blockId==2)//If your item is a stick and the block a grass block { clientMessage("Hi Guys") } }With this function you can make appear messages in the chat.
Example:
function useItem(x,y,z,itemId,blockId) { if(itemId==280 && blockId==2) { clientMessage("Hi Guys")//Will appear this message in the chat } }This function make appear a popup message.
Example:
function useItem(x,y,z,itemId,blockId) { if(itemId==280 && blockId==2) { print("Hi Guys")//Will appear this message } }With this function you can add or remove items or blocks of your inventory.
The first number(276) is the id of the diamond sword, and the second number(1) is amount of items you want add.
Example 1:
function useItem(x,y,z,itemId,blockId) { if(itemId==280 && blockId==2) { addItemInventory(276,1);//Will add one diamond sword to your inventory. } }If you place a negative number, you will remove a the item of your inventory.
Example 2:
function useItem(x,y,z,itemId,blockId) { if(itemId==280 && blockId==2) { addItemInventory(276,-1);//Will remove one diamond sword of your inventory. } }Make something happens when you attack someone with a determined item.
Example:
function attackHook(attacker, victim) { if(getCarriedItem==280)//If attack someone with a stick. { clientMessage("Hi Guys"); } }Use the function Level.setTime() to change the time, like the command of PC version.
Example:
function useItem(x,y,z,itemId,blockId) { if(itemId==280) { Level.setTime(8280);//Will set the time to night. } }Remember this topic are in development, i will add many others things.
If i helped you, support me by clicking in the green buttom.
Anything that you want ask.
Follow me on Twitter @AuthenticPixel
Add me on Skype: AuthenticPixel
http://www.twitter.com/AuthenticPixel
e.g. addItemInventory(1,1);
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]
no problem
I don't understand what you mean
http://www.twitter.com/AuthenticPixel
Is not necessary use the semicolon
http://www.twitter.com/AuthenticPixel
Thanks man
Sure.
I will send a message to you
I don't need this, i know all the functions.
http://www.twitter.com/AuthenticPixel
No, I meant "please move things into here"I'd rather seeing someone explaining &$data in PocketMine