ModPE Script v0.4 Alpha Release
Licensed under the Creative Commons Attribution-NoDerivs 3.0 Unported license
Please View the details of the license here: http://creativecommons.org/licenses/by-nd/3.0/legalcode
Made by Carter Feldman
Copyright 2013
Steps:
1.
Put the dylib and plist in /Library/MobileSubstrate/DynamicLibraries/
2.
Register at
http://betamodpe2.cf.gy/user/register.php
3.
Confirm your email
4.
Login and click on LOAD SCRIPT EDITOR
5.
Under "Create New Script" type in your script name and press "Create New Script"
6.
Wait a few seconds and then click on the "My Scripts" drop down, select your script and press "Load"
7.
Code your script, and when your done, press "Save" in the top left hand corner.
8.
Copy down the Script ID displayed in the top right hand corner (It should say Currently Editing: <your script name> Script ID: <your script id>)
9.
Start Minecraft PE and enter in your id!
----------------------
Built in Function List:
function print(text);
function clientMessage(text);
function setNightMode(isNight);
function getPlayerX();
function getPlayerY();
function getPlayerZ();
function getPlayerEnt();
function getLevel();
function getYaw();
function getPitch();
function setPosition(ent,x,y,z);
function setPositionRelative(ent,x,y,z);
function setRot(ent,x,y);
function getTile(x,y,z);
function setVelX(ent, amount);
function setVelY(ent, amount);
function setVelZ(ent, amount);
function explode(x, y, z, radius);
function addItemInventory(id, amount);
function rideAnimal(player, target);
function getCarriedItem();
function preventDefault();
function setTile(x,y,z,type);
function spawnChicken(x,y,z,image);
function spawnCow(x,y,z,image);
Example Scripts:
---------------------------------------------------
Example 1:
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==280)//If your item is a stick
{
addItemInventory(3,5);//Add 5 Dirt blocks to your inventory.
print("Hello World");
}
}
function attackHook(attacker, victim)
{
if(getCarriedItem()==280)//If your item is a stick
{
preventDefault();//Don't call the real attack function after
setVelY(victim,1.5);//Make them fly vertically =)
}
}
function modTick()
{
}
---------------------------------------------------
---------------------------------------------------
Example 2:
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==291&&blockId==4)//If your item is a stone hoe, and the block your using it on is stone
{
explode(x,y,z,3.1);//Blow it up!
}
else if(blockId==5)//If the block we are using is a wooden plank
{
setTile(x,y,z,11);//Turn it into lava!!
}
else if(itemId==287)//If our item is string
{
ImAHelperFunction(x,y,z);//make a gold tower!
}
}
function ImAHelperFunction(x,y,z)
{
for(var i=0;i<5;i++)
{
setTile(x,y+i,z,14);
}
}
function attackHook(attacker, victim)
{
var ourItem = getCarriedItem();//The id of the item we are wielding
if(ourItem==288)//If the item is a feather
{
preventDefault();//Don't call the real attack function after
rideAnimal(attacker,victim);//ride the animal
}
else if(ourItem==262)//If the item is an arrow
{
spawnChicken(getPlayerX(),getPlayerY()+4,getPlayerZ(),"mob/chicken.png");//spawn a chicken above our head (you can change it to your own picture if you like)
}
}
function modTick()
{
}
------------------------------------------------------
More Examples Coming Soon!
---------------------------------------------------
New Hook CMD!
function procCmd(cmd)
{
}
How do you use commands on it or does someone have to make a mod for commands?
Here's a quick documentation of the currently available functions:
Hook functions
- These functions are used to execute other specified functions if certain actions are performed.
function useItem(x,y,z,itemId,blockId,side){}
Performs specified functions when the player uses an item.
Can be used to identify:
On what block an item was used.
The used item's ID.
The used blocks ID.
The side of the used block.
To test for specific use cases, use if/else statements
function useItem(x,y,z,itemId,blockId,side) { // When an item/block is used...
if(itemId==280) { // And if your item is a stick...
clientMessage("You used a stick!"); // Send a message to the chat.
}
}
function attackHook(attacker, victim){}
Performs specified functions when a player attacks another entity.
Can be used to performs actions onto both the attacker and the victim
function attackHook(attacker, victim) { // If an attack is performed...
if(getCarriedItem()==280) { // And if the used item is a stick...
preventDefault(); // Don't call the real attack function...
setVelY(victim,1.5); // Set the victim's Y Velocity to 1.5.
}
}
function procCmd(cmd){}
Can be used to identify what has been written in the chat.
function procCmd(cmd) { // When something is said in chat...
var Data = cmd.split(" "); // Split different sets of data at the spaces.
if(Data[0]=="coords") { // If the first bit of data is "coords"...
var xc = getPlayerX(); // Get the players X coordinate...
var yc = getPlayerY(); // The players Y coordinate...
var zc = getPlayerX(); // And the players Z coordinates...
clientMessage("X:" + xc + ", Y:" + yc + ", Z:" + zc); // Then send the info to the chat.
}
}
function modTick(){}
Can be used for timed functions.
Necessary to be at the end of every script for it to work.
Text functions
- These functions are used to display information.
function print(text);
Displays the specified text.
Accepts text strings.
On iOS, it displays the text in an alert popup.
function clientMessage(text);
Displays the specified text.
Accepts text strings.
Differs from print(); as clientMessage(); shows the string in the chat rather than in an alert.
GET functions
- These functions are used to get specified information. They don't cause any on screen changes.
function getPlayerX();
function getPlayerY();
function getPlayerZ();
Gets the players X, Y, and Z coordinates respectively.
When "x,y,z" is passed as an argument, getTile(); will get the Data Value of the selected block.
When coordinates are specified, getTile(); will get the Data Value of the block that it finds at said coordinates.
function getCarriedItem();
Gets the Data Value of the currently carried item.
Accepts no arguments.
SET functions
- These functions are used to set information and values. They may cause on screen changes.
function setNightMode(isNight);
Doesn't seem to work.
Assumed to change time of day.
function setTile(x,y,z,type);
Sets the Data Value of the selected block to the specified Data Value
Accepts X, Y, and Z coordinates and Data Values.
When "x,y,z,--data value--" is passed as an argument, setTile(); will set the Data Value of the selected block to the specified Data Value.
When coordinates are specified, setTile(); will set the Data Value of the block it finds at said coordinates to the specified Data Value.
function setPosition(ent,x,y,z);
Sets the position of the specified entity to the specified coordinates.
Accepts X, Y, and Z, coordinates and an entity value.
When attackHook(); isn't used, setPosition(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setPosition(); needs one of the two arguments passed in attackHook(); for "ent".
setPositionRelative(); IS POSSIBLY WRONG
function setPositionRelative(ent,x,y,z);
Sets the position of the specified entity relative to the current direction the entity is facing.
Accepts X, Y, and Z coordinates and an entity value.
When attackHook(); isn't used, setPositionRelative(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setPositionRelative(); needs one of the two arguments passed in attackHook(); for "ent".
function setRot(ent,x,y);
Sets the rotation of the head of the specified entity.
Accepts X and Y coordinates and an entity value.
When attackHook(); isn't used, setRot(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setRot(); needs one of the two arguments passed in attackHook(); for "ent".
function setVelX(ent,amount);
function setVelY(ent,amount);
function setVelZ(ent,amount);
Sets the respective X, Y, and Z velocities of the specified entity.
Accepts an entity value and an amount value.
When attackHook(); isn't used, setVel?(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setVel?(); needs one of the two arguments passed in attackHook(); for "ent".
Spawn functions
- These functions are used for spawning mobs
function spawnChicken(x,y,z,image);
function spawnCow(x,y,z,image);
Spawns the respective mob at the specified coordinates with the specified image.
Accepts X, Y, and Z, coordinates and an image file location value.
When "x,y,z,--image--" is passed as an argument, the respective mob will be spawned on the selected block.
When coordinates are specified, the mob is spawned at said coordinates.
Miscellaneous functions
- These functions don't fit anywhere else and are more random
function preventDefault();
Prevents the default action of the current function and/or item.
Accepts no arguments.
function explode(x,y,z,radius);
Causes an explosion centered at the specified coordinates with the size of the explosion depending on the radius specified.
Accepts X, Y, and Z coordinates and a radius value.
When "x,y,z,--radius--" is passed as an argument, explode(); will cause an explosion centered on the selected block with a radius of the radius specified.
When coordinates are specified, explode(); will cause an explosion centered at said coordinates with a radius of the radius specified.
function addItemInventory(id,amount);
Adds the specified amount of the specified item.
Accepts Data Values of blocks and items and amount values ranging from 1 to 255.
function rideAnimal(player,target);
Makes the player ride the target.
Requires the attackHook(); function and its arguments.
Rollback Post to RevisionRollBack
-------------------- If I helped you, made you laugh, or you just like my post, click this button! --------------------v
Here's a quick documentation of the currently available functions:
Hook functions
- These functions are used to execute other specified functions if certain actions are performed.
function useItem(x,y,z,itemId,blockId,side){}
Performs specified functions when the player uses an item.
Can be used to identify:
On what block an item was used.
The used item's ID.
The used blocks ID.
The side of the used block.
To test for specific use cases, use if/else statements
function useItem(x,y,z,itemId,blockId,side) { // When an item/block is used...
if(itemId==280) { // And if your item is a stick...
clientMessage("You used a stick!"); // Send a message to the chat.
}
}
function attackHook(attacker, victim){}
Performs specified functions when a player attacks another entity.
Can be used to performs actions onto both the attacker and the victim
function attackHook(attacker, victim) { // If an attack is performed...
if(getCarriedItem()==280) { // And if the used item is a stick...
preventDefault(); // Don't call the real attack function...
setVelY(victim,1.5); // Set the victim's Y Velocity to 1.5.
}
}
function procCmd(cmd){}
Can be used to identify what has been written in the chat.
function procCmd(cmd) { // When something is said in chat...
var Data = cmd.split(" "); // Split different sets of data at the spaces.
if(Data[0]=="coords") { // If the first bit of data is "coords"...
var xc = getPlayerX(); // Get the players X coordinate...
var yc = getPlayerY(); // The players Y coordinate...
var zc = getPlayerX(); // And the players Z coordinates...
clientMessage("X:" + xc + ", Y:" + yc + ", Z:" + zc); // Then send the info to the chat.
}
}
function modTick(){}
Can be used for timed functions.
Necessary to be at the end of every script for it to work.
Text functions
- These functions are used to display information.
function print(text);
Displays the specified text.
Accepts text strings.
On iOS, it displays the text in an alert popup.
function clientMessage(text);
Displays the specified text.
Accepts text strings.
Differs from print(); as clientMessage(); shows the string in the chat rather than in an alert.
GET functions
- These functions are used to get specified information. They don't cause any on screen changes.
function getPlayerX();
function getPlayerY();
function getPlayerZ();
Gets the players X, Y, and Z coordinates respectively.
When "x,y,z" is passed as an argument, getTile(); will get the Data Value of the selected block.
When coordinates are specified, getTile(); will get the Data Value of the block that it finds at said coordinates.
function getCarriedItem();
Gets the Data Value of the currently carried item.
Accepts no arguments.
SET functions
- These functions are used to set information and values. They may cause on screen changes.
function setNightMode(isNight);
Doesn't seem to work.
Assumed to change time of day.
function setTile(x,y,z,type);
Sets the Data Value of the selected block to the specified Data Value
Accepts X, Y, and Z coordinates and Data Values.
When "x,y,z,--data value--" is passed as an argument, setTile(); will set the Data Value of the selected block to the specified Data Value.
When coordinates are specified, setTile(); will set the Data Value of the block it finds at said coordinates to the specified Data Value.
function setPosition(ent,x,y,z);
Sets the position of the specified entity to the specified coordinates.
Accepts X, Y, and Z, coordinates and an entity value.
When attackHook(); isn't used, setPosition(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setPosition(); needs one of the two arguments passed in attackHook(); for "ent".
setPositionRelative(); IS POSSIBLY WRONG
function setPositionRelative(ent,x,y,z);
Sets the position of the specified entity relative to the current direction the entity is facing.
Accepts X, Y, and Z coordinates and an entity value.
When attackHook(); isn't used, setPositionRelative(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setPositionRelative(); needs one of the two arguments passed in attackHook(); for "ent".
function setRot(ent,x,y);
Sets the rotation of the head of the specified entity.
Accepts X and Y coordinates and an entity value.
When attackHook(); isn't used, setRot(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setRot(); needs one of the two arguments passed in attackHook(); for "ent".
function setVelX(ent,amount);
function setVelY(ent,amount);
function setVelZ(ent,amount);
Sets the respective X, Y, and Z velocities of the specified entity.
Accepts an entity value and an amount value.
When attackHook(); isn't used, setVel?(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setVel?(); needs one of the two arguments passed in attackHook(); for "ent".
Spawn functions
- These functions are used for spawning mobs
function spawnChicken(x,y,z,image);
function spawnCow(x,y,z,image);
Spawns the respective mob at the specified coordinates with the specified image.
Accepts X, Y, and Z, coordinates and an image file location value.
When "x,y,z,--image--" is passed as an argument, the respective mob will be spawned on the selected block.
When coordinates are specified, the mob is spawned at said coordinates.
Miscellaneous functions
- These functions don't fit anywhere else and are more random
function preventDefault();
Prevents the default action of the current function and/or item.
Accepts no arguments.
function explode(x,y,z,radius);
Causes an explosion centered at the specified coordinates with the size of the explosion depending on the radius specified.
Accepts X, Y, and Z coordinates and a radius value.
When "x,y,z,--radius--" is passed as an argument, explode(); will cause an explosion centered on the selected block with a radius of the radius specified.
When coordinates are specified, explode(); will cause an explosion centered at said coordinates with a radius of the radius specified.
function addItemInventory(id,amount);
Adds the specified amount of the specified item.
Accepts Data Values of blocks and items and amount values ranging from 1 to 255.
function rideAnimal(player,target);
Makes the player ride the target.
Requires the attackHook(); function and its arguments.
Error: Modtick does NOT have to be at the end of a script. I don't use the editor and write them from scratch and I never add the modtick hook.
Ok, im working on a Super Speed command for android. There are no syntax errors, or any others in this code, but it crashes my BlockLauncher after typing
/speed on
This is part of a bigger command list, located in my signature.
for(r=-18000;r<=18000;r==r+360) {
Any help?
Spotted it right off: change "r==r+360" to "r=r+360" or "r+=360".
"==" is the comparison operator, "=" is the assignment operator.
Rollback Post to RevisionRollBack
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Changed it to "r = r + 360", but still crashes BlockLauncher
Also: 'speed' 'on' and 'off' need to be "speed" "on" and "off".
" " are for strings (multiple characters of text.)
' ' are for single characters.
Also, your 6 nested "for"-loops at the beginning have no code inside!
Also, the variables 'r','s','t','u','v', and 'w' need to be declared outside the function "modTick" if you want to access them in the function "useItem"
Here's a quick documentation of the currently available functions:
Hook functions
- These functions are used to execute other specified functions if certain actions are performed.
function useItem(x,y,z,itemId,blockId,side){}
Performs specified functions when the player uses an item.
Can be used to identify:
On what block an item was used.
The used item's ID.
The used blocks ID.
The side of the used block.
To test for specific use cases, use if/else statements
function useItem(x,y,z,itemId,blockId,side) { // When an item/block is used...
if(itemId==280) { // And if your item is a stick...
clientMessage("You used a stick!"); // Send a message to the chat.
}
}
function attackHook(attacker, victim){}
Performs specified functions when a player attacks another entity.
Can be used to performs actions onto both the attacker and the victim
function attackHook(attacker, victim) { // If an attack is performed...
if(getCarriedItem()==280) { // And if the used item is a stick...
preventDefault(); // Don't call the real attack function...
setVelY(victim,1.5); // Set the victim's Y Velocity to 1.5.
}
}
function procCmd(cmd){}
Can be used to identify what has been written in the chat.
function procCmd(cmd) { // When something is said in chat...
var Data = cmd.split(" "); // Split different sets of data at the spaces.
if(Data[0]=="coords") { // If the first bit of data is "coords"...
var xc = getPlayerX(); // Get the players X coordinate...
var yc = getPlayerY(); // The players Y coordinate...
var zc = getPlayerX(); // And the players Z coordinates...
clientMessage("X:" + xc + ", Y:" + yc + ", Z:" + zc); // Then send the info to the chat.
}
}
function modTick(){}
Can be used for timed functions.
Necessary to be at the end of every script for it to work.
Text functions
- These functions are used to display information.
function print(text);
Displays the specified text.
Accepts text strings.
On iOS, it displays the text in an alert popup.
function clientMessage(text);
Displays the specified text.
Accepts text strings.
Differs from print(); as clientMessage(); shows the string in the chat rather than in an alert.
GET functions
- These functions are used to get specified information. They don't cause any on screen changes.
function getPlayerX();
function getPlayerY();
function getPlayerZ();
Gets the players X, Y, and Z coordinates respectively.
When "x,y,z" is passed as an argument, getTile(); will get the Data Value of the selected block.
When coordinates are specified, getTile(); will get the Data Value of the block that it finds at said coordinates.
function getCarriedItem();
Gets the Data Value of the currently carried item.
Accepts no arguments.
SET functions
- These functions are used to set information and values. They may cause on screen changes.
function setNightMode(isNight);
Doesn't seem to work.
Assumed to change time of day.
function setTile(x,y,z,type);
Sets the Data Value of the selected block to the specified Data Value
Accepts X, Y, and Z coordinates and Data Values.
When "x,y,z,--data value--" is passed as an argument, setTile(); will set the Data Value of the selected block to the specified Data Value.
When coordinates are specified, setTile(); will set the Data Value of the block it finds at said coordinates to the specified Data Value.
function setPosition(ent,x,y,z);
Sets the position of the specified entity to the specified coordinates.
Accepts X, Y, and Z, coordinates and an entity value.
When attackHook(); isn't used, setPosition(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setPosition(); needs one of the two arguments passed in attackHook(); for "ent".
setPositionRelative(); IS POSSIBLY WRONG
function setPositionRelative(ent,x,y,z);
Sets the position of the specified entity relative to the current direction the entity is facing.
Accepts X, Y, and Z coordinates and an entity value.
When attackHook(); isn't used, setPositionRelative(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setPositionRelative(); needs one of the two arguments passed in attackHook(); for "ent".
function setRot(ent,x,y);
Sets the rotation of the head of the specified entity.
Accepts X and Y coordinates and an entity value.
When attackHook(); isn't used, setRot(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setRot(); needs one of the two arguments passed in attackHook(); for "ent".
function setVelX(ent,amount);
function setVelY(ent,amount);
function setVelZ(ent,amount);
Sets the respective X, Y, and Z velocities of the specified entity.
Accepts an entity value and an amount value.
When attackHook(); isn't used, setVel?(); needs the entity ID of the player for "ent".
When attackHook(player,target); is used, setVel?(); needs one of the two arguments passed in attackHook(); for "ent".
Spawn functions
- These functions are used for spawning mobs
function spawnChicken(x,y,z,image);
function spawnCow(x,y,z,image);
Spawns the respective mob at the specified coordinates with the specified image.
Accepts X, Y, and Z, coordinates and an image file location value.
When "x,y,z,--image--" is passed as an argument, the respective mob will be spawned on the selected block.
When coordinates are specified, the mob is spawned at said coordinates.
Miscellaneous functions
- These functions don't fit anywhere else and are more random
function preventDefault();
Prevents the default action of the current function and/or item.
Accepts no arguments.
function explode(x,y,z,radius);
Causes an explosion centered at the specified coordinates with the size of the explosion depending on the radius specified.
Accepts X, Y, and Z coordinates and a radius value.
When "x,y,z,--radius--" is passed as an argument, explode(); will cause an explosion centered on the selected block with a radius of the radius specified.
When coordinates are specified, explode(); will cause an explosion centered at said coordinates with a radius of the radius specified.
function addItemInventory(id,amount);
Adds the specified amount of the specified item.
Accepts Data Values of blocks and items and amount values ranging from 1 to 255.
function rideAnimal(player,target);
Makes the player ride the target.
Requires the attackHook(); function and its arguments.
This'll need testing, but I think "setPositionRelative" moves the chosen entity relative to the player, not the direction it's facing.
Rollback Post to RevisionRollBack
"There is no greater good than Justice; and only if law serves Justice is it a good law."
This'll need testing, but I think "setPositionRelative" moves the chosen entity relative to the player, not the direction it's facing.
Yeah I'll look into it. Btw, the documentation is somewhat outdated now. It appears that some functions were removed while others were changed. I'll look into updating it some other time.
How do you use commands on it or does someone have to make a mod for commands?
Code to add new blocks:
//Made by TreeBl unsigned int * makeNewItem(int id, int vTable, int materialDword, int pictureId, char * name) { unsigned int * item = new unsigned int[0xb8]; int * disa = (int *)(materialDword-0x1000+myPidAddr); TileNew((int)item,id,pictureId,*disa); item[0] = vTable+8-0x1000+myPidAddr; item[3] = 0; item[4] = 0; item[5] = 0; item[6] = 0x3f666666; item[7] = 0x3E000000; item[8] = 0x3f666666; //int idk = item[2]; char * tst =(char *)(0x216230-0x1000+myPidAddr+id); *tst = 0x1; TileInit((int)item); setDestroyTime((int)item, 0x3DCCCCCD); setSoundType((int)item, 0x216358-0x1000+myPidAddr); item[15] = 1; std::string testa = (std::string)name; setDescriptionId((int)item,testa); int * inTable = (int *)(0x2154D0-0x1000+myPidAddr+(id*4)); *inTable = (int)item; return item; }Can someone test this?
See if it really works?
I don't believe this is JavaScript. It looks more like a form of C but I'm not 100% sure
I am secretly a modder, who works only for himself, seldom publishes.
Hook functions
- These functions are used to execute other specified functions if certain actions are performed.
function useItem(x,y,z,itemId,blockId,side){}function useItem(x,y,z,itemId,blockId,side) { // When an item/block is used... if(itemId==280) { // And if your item is a stick... clientMessage("You used a stick!"); // Send a message to the chat. } }function attackHook(attacker, victim){}function attackHook(attacker, victim) { // If an attack is performed... if(getCarriedItem()==280) { // And if the used item is a stick... preventDefault(); // Don't call the real attack function... setVelY(victim,1.5); // Set the victim's Y Velocity to 1.5. } }function procCmd(cmd){}function procCmd(cmd) { // When something is said in chat... var Data = cmd.split(" "); // Split different sets of data at the spaces. if(Data[0]=="coords") { // If the first bit of data is "coords"... var xc = getPlayerX(); // Get the players X coordinate... var yc = getPlayerY(); // The players Y coordinate... var zc = getPlayerX(); // And the players Z coordinates... clientMessage("X:" + xc + ", Y:" + yc + ", Z:" + zc); // Then send the info to the chat. } }function modTick(){}Text functions
- These functions are used to display information.
GET functions
- These functions are used to get specified information. They don't cause any on screen changes.
SET functions
- These functions are used to set information and values. They may cause on screen changes.
- Sets the position of the specified entity to the specified coordinates.
- Accepts X, Y, and Z, coordinates and an entity value.
- When attackHook(); isn't used, setPosition(); needs the entity ID of the player for "ent".
- When attackHook(player,target); is used, setPosition(); needs one of the two arguments passed in attackHook(); for "ent".
setPositionRelative(); IS POSSIBLY WRONGSpawn functions
- These functions are used for spawning mobs
Miscellaneous functions
- These functions don't fit anywhere else and are more random
Error: Modtick does NOT have to be at the end of a script. I don't use the editor and write them from scratch and I never add the modtick hook.
New Funcs:
http://pastebin.com/w4AWwVkG
Darn....
Nope, but it will be in the near future.
This ModPE also has an auto updator, support for OOP funcs, and the ability to swap texture packs within a ModPE script!
Example:
function useItem(x,y,z,itemId,blockId,side) { //Your Code Here clientMessage("Refreshing Terrain..."); ModPE.setTerrain("https://lh3.googleusercontent.com/-G4gsVakl35I/UgP23GEeeII/AAAAAAAAAIk/nKZiei3T-oY/s256-no/terrain.png"); } function attackHook(attacker, victim) { //Your Code Here } function modTick() { //Your Code Here } function procCmd(cmd) { }Oh my god. TreeBl. You are amazing. I love you. xD!!! That's awesome jeep up the good work!!!
Darn....
Spotted it right off: change "r==r+360" to "r=r+360" or "r+=360".
"==" is the comparison operator, "=" is the assignment operator.
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Also: 'speed' 'on' and 'off' need to be "speed" "on" and "off".
" " are for strings (multiple characters of text.)
' ' are for single characters.
Also, your 6 nested "for"-loops at the beginning have no code inside!
Also, the variables 'r','s','t','u','v', and 'w' need to be declared outside the function "modTick" if you want to access them in the function "useItem"
"There is no greater good than Justice; and only if law serves Justice is it a good law."
This'll need testing, but I think "setPositionRelative" moves the chosen entity relative to the player, not the direction it's facing.
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Yeah I'll look into it. Btw, the documentation is somewhat outdated now. It appears that some functions were removed while others were changed. I'll look into updating it some other time.
for iOS I believe is
Correct me if I'm wrong