• 0

    posted a message on BlockLauncher: an Android app that patches Minecraft PE without reinstall
    Can anyone help me?

    Trying to make a addon. Hooked all necessary methods and tested:

    static float (*Player_getArmorValue_real)();

    float Player_getArmorValue_hook() {

    if (god_mode==1) return 20.0f;

    return 0.0f

    }

    That code works perfectly, but vanilla armor wont work.

    static float (*Player_getArmorValue_real)();

    float Player_getArmorValue_hook() {

    if (god_mode==1) return 20.0f;

    return Player_getArmorValue_real();

    }

    That code crashes on return... Whats i going wrong?

    (Sorry for my bad english)
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on Addon crash
    Anyone?..
    Posted in: MCPE: Mod / Tool Help & Requests
  • 0

    posted a message on Addon crash
    Crashing...
    Posted in: MCPE: Mod / Tool Help & Requests
  • 0

    posted a message on Addon crash
    Trying to make a addon. Hooked all necessary methods and tested:

    static float (*Player_getArmorValue_real)();

    float Player_getArmorValue_hook() {

    if (god_mode==1) return 20.0f;

    return 0.0f

    }

    That code works perfectly, but vanilla armor wont work.

    static float (*Player_getArmorValue_real)();

    float Player_getArmorValue_hook() {

    if (god_mode==1) return 20.0f;

    return Player_getArmorValue_real();

    }

    That code crashes on return... Whats i going wrong?

    (Sorry for my bad english)
    Posted in: MCPE: Mod / Tool Help & Requests
  • 0

    posted a message on [Private] Tekkit UMS Whitelisted Server [Looking for Admins]
    Username : gamergator
    Age: 16
    Tekkit experience : I played on BigDig, Voltz, Tekkit classic, Tekkit and Hexxit.
    Do you have any experience with server administration & configuration ? : Yes, previously, I had my public server (Minecraft 1.4.7, my owned modpack), but soon it had to close (not enough money for hosting).
    Posted in: PC Servers
  • 0

    posted a message on BlockLauncher: an Android app that patches Minecraft PE without reinstall
    Quote from Craftyawesome

    Google didn't help. What is NBT tags?

    It is difficult to explain, it must be like to have the subject in hand except rooms and damage was more information. If it is possible to add to the mod will make backpacks and others. Sorry for my very bad English.
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on BlockLauncher: an Android app that patches Minecraft PE without reinstall
    500ISE, please add NBT Tags support
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on ComputerCraft Script
    Quote from wilco375

    Yes I knie, but if I give myself an item with the id 250 it doesn't add anything to my inventory

    Give it from tmi inserted in this mod. TMI is with support other mods. (Sorry for my very bad english)
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on ComputerCraft Script
    Quote from wilco375

    It sucks, 250 isn't even an item?!

    blocks id is <256 and >0
    Posted in: MCPE: Mods / Tools
  • 1

    posted a message on ComputerCraft Script
    ComputerCraft
    by Creeplays
    This mod like ComputerCraft on pc.
    Turtle id is 250 (Craft dont work 0_0).
    This mod also includes my version of TooManyItems (With other mods support and searching for items)
    Download:
    Posted in: MCPE: Mods / Tools
  • 0

    posted a message on ComputerCraft Script
    [size=xx-large]ComputerCraft[/size]
    [size=x-small]by Creeplays[/size]
    This mod like ComputerCraft on pc.
    Turtle id is 250 (Craft dont work 0_0).
    This mod also includes my version of TooManyItems (With other mods support and searching for items)
    [size=xx-large]Download:[/size]
    [size=xx-large]Source:[/size]
    [size=xx-small]//ComputerCraft
    //by Creeplays
    //Uses filelib v 1.31 (by RusJJ (4pda.ru))
    //Uses parts of creecoder (javascript obfuscator by me)[/size][/center]
    [center][size=xx-small]//Uses timer API
    versions = new Array(); //versions of mods
    ccturtx = new Array(); //x integer
    ccturty = new Array(); //y integer
    ccturtz = new Array(); //z integer
    ccturtp = new Array(); //program text
    ccturtf = new Array(); //fuel integer
    ccturt1 = new Array(); //slot 1 id integer
    ccturt2 = new Array(); //slot 2 id integer
    ccturt3 = new Array(); //slot 3 id integer
    ccturt4 = new Array(); //slot 4 integer
    ccturt5 = new Array(); //slot 5 integer
    ccturt1d = new Array(); //slot 1 damage integer
    ccturt2d = new Array(); //slot 2 damage integer
    ccturt3d = new Array(); //slot 3 damage integer
    ccturt4d = new Array(); //slot 4 damage integer
    ccturt5d = new Array(); //slot 5 damage integer
    ccturt1c = new Array(); //slot 1 count integer
    ccturt2c = new Array(); //slot 2 count integer
    ccturt3c = new Array(); //slot 3 count integer
    ccturt4c = new Array(); //slot 4 count integer
    ccturt5c = new Array(); //slot 5 count integer
    ccturti = new Array(); //turtle id integer
    ccturts = new Array(); //slot integer
    ccturtc = null; //current turtle integer
    ccturtv = new Array(); //turtle style
    ccturtv[0] = "Creeplays,ThisIsCreeplays" //nicks of the modcreator
    ccturtv[1] = "Wirelless turtle"; //name
    ccturtv[2] = "stone_slab"; //texture n 1
    ccturtv[3] = "cauldron_top"; //texture n 2
    ccturtv[4] = 250; //id turtle block
    ccturtcount = 0; //total turtles in world
    ccturtcountmax = 100; //maximum turtles
    ccturtinit = false; //init flag
    ccturtsavetick = 160;
    ccturtnexttick = 35;
    ccturtaddons = new Array();
    cccameraent=null;
    img=" iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAIGklEQVR4nO3dQWgcVRzH8dnNJm1sGg2kkVChJKmFxoKWlKatDR4UPQkW0UPxklN7skdBqVmbS/FgKS1CQagULaUi9VQQ9dRYjLSgoD0IIQ0NBILQmKRJd7Ob9SL/+asz7m6zz1h/38/pz2b2zSv0x5u3b95MJpttjUIaGNgVtP1isUj769h+qVQK2v7MzEzQ9rNBWwf+4wgApBEASCMAkEYAII0AQBoBgDQCAGkEANIIAKQRAEgjAJBGACCNAEAaAYA0AgBpBADSCACkEQBIIwCQRgAgjQBAGgGANAIAaQQA0ggApBEASCMAkEYAII0AQBoBgLTM/v37g56gUqkEbf9hf74+7f+z0P9/GAEgjQBAGgGANAIAaQQA0ggApBEASCMAkEYAII0AQBoBgDQCAGkEANIIAKQRAEgjAJBGACCNAEAaAYA0AgBpBADSCACkEQBIIwCQRgAgjQBAGgGANAIAaQQA0ggApBEASMtlMpmgJwjdfjYbNsO0v77tl8vloO0zAkAaAYA0AgBpBADSCACkEQBIIwCQRgAgjQBAGgGANAIAaQQA0ggApBEASCMAkEYAII0AQBoBgDQCAGkEANIIAKQRAEgjAJBGACCNAEAaAYA0AgBpBADSCACkEQBIIwCQlisUCkFP8PLNG0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gjAEjjHACZvPzhVx1t/83jX+fyvuH5wIajwf780Nn+xLACQBoBQBoBQBrnAIja8FD753VuGlrjxq8f/d5yd6L2bVm34NeyAkAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAaAUAa9wPAXPisz1B4v28323eDFQDSCADSCADSSmPXJk3foNlsms5vbeTiBdP5i+W7+zSsMtv+50t0euze6fbV2lxH24dYASCNACCNACCNACCNACCNACCNACCNACCNACCNACCNACCNACCNACCNACCNACDt7v5mdNyxHl57zvgdXshlFlYASCMASCMASCMASCMASCMASCMASOM6AEwcOnTodu9CJqwAkEYAkEYAkMY5AHLz7tah3Oecrf6T+5whVgBIIwBIIwBI+xexgkITuFgUnQAAAABJRU5ErkJggg== ";
    var menu;function modTick()
    {
    time_runTimers();
    ccmodTick();
    }
    function destroyBlock(x, y, z, side)
    {
    ccdestroyBlock(x, y, z, side);
    }
    function selectLevelHook()
    {
    ccselectLevelHook();
    }
    function useItem(x, y, z, itemId, blockId, side)
    {
    ccuseItem(x, y, z, itemId, blockId, side);
    }
    function leaveGame()
    {
    ccleaveGame();
    }[/size][/center]
    
    [center]
    [size=xx-small]function ccdestroyBlock(x, y, z, side)
    {
    blockId = getTile(x, y, z);
    if (blockId == ccturtv[4] || blockId == ccturtv[4] + 1 || blockId == ccturtv[4] + 2 || blockId == ccturtv[4] + 3)
    {
    for (var ccturtsearch = 0; ccturtsearch < ccturtcountmax; ccturtsearch++)
    {
    if (ccturtx[ccturtsearch] == x && ccturty[ccturtsearch] == y && ccturtz[ccturtsearch] == z)
    {
    ccturtmessage("Destroyed turtle, id: " + ccturtsearch);
    ccturtx[ccturtsearch] = null;
    ccturty[ccturtsearch] = null;
    ccturtz[ccturtsearch] = null;
    ccturtf[ccturtsearch] = null;
    //inventory drop
    Level.dropItem(x, y, z, 1, ccturtv[4], 1, 1);
    ccturtcount--;
    break;
    }
    }}
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function about()
    {
    var nick = new Array();
    nick = ccturtv[0].split(',');
    var nickrand = random(0, 1);
    nickrand = nick[nickrand];
    ccturtmessage("§1ComputerCraft §2v1.3");
    ccturtmessage("§1By §2" + nickrand + "§1, for §k4pda.ru");
    ccturtmessage("§3Do not distribute!");
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function ccmodTick()
    {
    setVelX(cccameraent, 0);
    setVelY(cccameraent, 0);
    setVelZ(cccameraent, 0);
    setPosition(cccameraent, ccturtx[ccturtc], ccturty[ccturtc], ccturtz[ccturtc]);
    Entity.setHealth(cccameraent, 345567890);
    Entity.setRenderType(cccameraent, 0);
    //Entity.setRot(cccameraent, getYaw() , getPitch());
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function ccselectLevelHook()
    {
    newLevelgui();
    loadstate();
    if (!ccturtinit)
    {
    Block.defineBlock(ccturtv[4] + 4, "Computer", [[ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[2], 0]]);
    Item.addCraftRecipe(ccturtv[4] + 4, 1, 0, [1, 7, 0, 102, 1, 0, 331, 1, 0]);
    Item.setCategory(ccturtv[4] + 4,8,0);
    Block.setDestroyTime(ccturtv[4] + 4, 1.5); //block init finished
    Block.defineBlock(ccturtv[4] + 2, ccturtv[1], [[ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[3], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[2], 0]]);
    Item.setCategory(ccturtv[4] + 2,8,0);
    Block.setDestroyTime(ccturtv[4] + 2, 1.5); //block init finished
    Block.defineBlock(ccturtv[4], ccturtv[1], [[ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[3], 0],
    [ccturtv[2], 0], [ccturtv[2], 0]]);
    Item.addCraftRecipe(ccturtv[4], 1, 0, [ccturtv[4] + 4, 1, 0, 265, 1, 0, 54, 1, 0]);
    Item.setCategory(ccturtv[4],8,0);
    Block.setDestroyTime(ccturtv[4], 1.5); //block init finished
    Block.defineBlock(ccturtv[4] + 3, ccturtv[1], [[ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[3], 0], [ccturtv[2], 0]]);
    Item.setCategory(ccturtv[4] + 3,8,0);
    Block.setDestroyTime(ccturtv[4] + 3, 1.5); //block init finished
    Block.defineBlock(ccturtv[4] + 1, ccturtv[1], [[ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[2], 0],
    [ccturtv[2], 0], [ccturtv[3], 0]]);
    Item.setCategory(ccturtv[4] + 1,8,0);
    Block.setDestroyTime(ccturtv[4] + 1, 1.5); //block init finished
    ccturtinit = !ccturtinit; //true or false switch
    }
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function ccuseItem(x, y, z, itemId, blockId, side)
    {
    if (blockId == ccturtv[4] || blockId == ccturtv[4] + 1 || blockId == ccturtv[4] + 2 || blockId == ccturtv[4] + 3)
    {
    for (var ccturtsearch = 0; ccturtsearch < ccturtcountmax; ccturtsearch++)
    {
    if (ccturtx[ccturtsearch] == x && ccturty[ccturtsearch] == y && ccturtz[ccturtsearch] == z)
    {
    if (ccturtsearch == ccturtc)
    {
    if (itemId == 263 || itemId == "Other stuff")
    {
    if (itemId == 263)
    {
    ccturtf[ccturtc] += 700;
    ccturtmessage("Fuel in turtle: " + ccturtf[ccturtc]);
    }
    }
    else
    {
    ccturtmessage("Turtle already selected!");
    }
    }
    else
    {
    ccturtmessage("Control on this turtle enabled, id: " + ccturtsearch);
    ccturtc = ccturtsearch;
    break;
    }
    }
    }
    preventDefault();
    }
    else
    {
    if (side == 1)
    {
    if (itemId == ccturtv[4] || itemId == ccturtv[4] + 1 || itemId == ccturtv[4] + 2 || itemId == ccturtv[4] + 3)
    {
    if (ccturtcount + 1 > ccturtcountmax)
    {
    preventDefault();
    ccturtmessage("maximum turtles reached");
    }
    else
    {
    var ccturtadd = 0;
    while (ccturtx[ccturtadd] != null)
    {
    ccturtadd++;
    }
    ccturtx[ccturtadd] = x;
    ccturty[ccturtadd] = y + 1;
    ccturtz[ccturtadd] = z;
    ccturti[ccturtadd] = itemId;
    ccturtf[ccturtadd] = 0;
    ccturtcount++;
    setTile(x, y + 1, z, ccturtv[4], 1);
    ccturtmessage("Computerized success, id: " + ccturtadd);
    ccturt1[ccturtadd] = 0;
    ccturt2[ccturtadd] = 0;
    ccturt3[ccturtadd] = 0;
    ccturt4[ccturtadd] = 0;
    ccturt5[ccturtadd] = 0;
    ccturt1d[ccturtadd] = 0;
    ccturt2d[ccturtadd] = 0;
    ccturt3d[ccturtadd] = 0;
    ccturt4d[ccturtadd] = 0;
    ccturt5d[ccturtadd] = 0;
    ccturt1c[ccturtadd] = 0;
    ccturt2c[ccturtadd] = 0;
    ccturt3c[ccturtadd] = 0;
    ccturt4c[ccturtadd] = 0;
    ccturt5c[ccturtadd] = 0;
    ccturtadd = 0;
    }
    }
    }
    else
    {
    preventDefault();
    }
    }
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function ccturtmessage(text)
    {
    clientMessage("§1[§2CC§1]§3:§5 " + text);
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    var Turtle = {
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    Up: function (id)
    {
    if (id==null||id==undefined||id=='')
    {
    id=ccturtc;
    }
    if (ccturtf[id] > 15)
    {
    if (getTile(ccturtx[id], ccturty[id] + 1, ccturtz[id]) == 0)
    {
    setTile(ccturtx[id], ccturty[id], ccturtz[id], 0);
    setTile(ccturtx[id], ccturty[id] + 1, ccturtz[id], ccturti[id]);
    ccturty[id]++;
    }
    else
    {
    ccturtmessage("Block prevent move");
    }
    }
    else
    {
    ccturtmessage("Not enught fuel!");
    }[/size][/center]
    [center]
    [size=xx-small]},
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    Down: function (id)
    {
    if (id==null||id==undefined||id=='')
    {
    id=ccturtc;
    }
    if (ccturtf[id] > 15)
    {
    if (getTile(ccturtx[id], ccturty[id] - 1, ccturtz[id]) == 0)
    {
    setTile(ccturtx[id], ccturty[id], ccturtz[id], 0);
    setTile(ccturtx[id], ccturty[id] - 1, ccturtz[id], ccturti[id]);
    ccturty[id]--;
    }
    else
    {
    ccturtmessage("Block prevent move");
    }
    }
    else
    {
    ccturtmessage("Not enught fuel!")
    }[/size][/center]
    [center]
    [size=xx-small]},
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    turnRight: function (id)
    {
    if (id==null||id==undefined||id=='')
    {
    id=ccturtc;
    }
    if (ccturtf[id] > 15)
    {
    ccturti[id]--;
    if (ccturti[id] < ccturtv[4])
    {
    ccturti[id] += 4;
    }
    setTile(ccturtx[id], ccturty[id], ccturtz[id], ccturti[id]);
    }
    else
    {
    ccturtmessage("Not enught fuel!");
    }[/size][/center]
    [center]
    [size=xx-small]},
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    turnLeft: function (id)
    {
    if (id==null||id==undefined||id=='')
    {
    id=ccturtc;
    }
    if (ccturtf[id] > 15)
    {
    ccturti[id]++;
    if (ccturti[id] > ccturtv[4] + 3)
    {
    ccturti[id] -= 4;
    }
    setTile(ccturtx[id], ccturty[id], ccturtz[id], ccturti[id]);
    }
    else
    {
    ccturtmessage("Not enught fuel!");
    }[/size][/center]
    [center]
    [size=xx-small]},
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    Forward: function (id)
    {
    if (id==null||id==undefined||id=='')
    {
    id=ccturtc;
    }
    if (ccturtf[id] > 15)
    {
    if (ccturti[id] == ccturtv[4])
    {
    if (getTile(ccturtx[id], ccturty[id], ccturtz[id] + 1) == 0)
    {
    setTile(ccturtx[id], ccturty[id], ccturtz[id], 0);
    setTile(ccturtx[id], ccturty[id], ccturtz[id] + 1, ccturti[id]);
    ccturtz[id]++;
    }
    else
    {
    ccturtmessage("Block prevent move");
    }
    }
    if (ccturti[id] == ccturtv[4] + 1)
    {
    if (getTile(ccturtx[id] + 1, ccturty[id], ccturtz[id]) == 0)
    {
    setTile(ccturtx[id], ccturty[id], ccturtz[id], 0);
    setTile(ccturtx[id] + 1, ccturty[id], ccturtz[id], ccturti[id]);
    ccturtx[id]++;
    }
    else
    {
    ccturtmessage("Block prevent move");
    }
    }
    if (ccturti[id] == ccturtv[4] + 2)
    {
    if (getTile(ccturtx[id], ccturty[id], ccturtz[id] - 1) == 0)
    {
    setTile(ccturtx[id], ccturty[id], ccturtz[id], 0);
    setTile(ccturtx[id], ccturty[id], ccturtz[id] - 1, ccturti[id]);
    ccturtz[id]--;
    }
    else
    {
    ccturtmessage("Block prevent move");
    }
    }
    if (ccturti[id] == ccturtv[4] + 3)
    {
    if (getTile(ccturtx[id] - 1, ccturty[id], ccturtz[id]) == 0)
    {
    setTile(ccturtx[id], ccturty[id], ccturtz[id], 0);
    setTile(ccturtx[id] - 1, ccturty[id], ccturtz[id], ccturti[id]);
    ccturtx[id]--;
    }
    else
    {
    ccturtmessage("Block prevent move");
    }
    }
    }
    else
    {
    ccturtmessage("Not enught fuel!");
    }[/size][/center]
    [center]
    [size=xx-small]},
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    dig: function (id)
    {
    if (id==null||id==undefined||id=='')
    {
    id=ccturtc;
    }
    if (ccturtf[id] > 20)
    {
    if (ccturti[id] == ccturtv[4])
    {
    if (getTile(ccturtx[id], ccturty[id], ccturtz[id] + 1) != 7)
    {
    var ccturtdrop = getTile(ccturtx[id], ccturty[id], ccturtz[id] + 1);
    var ccturtdropdata = Level.getData(ccturtx[id], ccturty[id], ccturtz[id] + 1);
    if (ccturtdrop != 0)
    {
    destroyBlock(ccturtx[id], ccturty[id], ccturtz[id] + 1);
    Level.destroyBlock(ccturtx[id], ccturty[id], ccturtz[id] + 1);
    addtoturtinv(ccturtx[id], ccturty[id], ccturtz[id] + 1, 1, ccturtdrop, 1, ccturtdropdata);
    }
    else
    {
    ccturtmessage("Break the air?! Okay...");
    }
    }
    else
    {
    ccturtmessage("Unbreakable");
    }
    }
    if (ccturti[id] == ccturtv[4] + 1)
    {
    if (getTile(ccturtx[id] + 1, ccturty[id], ccturtz[id]) != 7)
    {
    var ccturtdrop = getTile(ccturtx[id] + 1, ccturty[id], ccturtz[id]);
    var ccturtdropdata = Level.getData(ccturtx[id] + 1, ccturty[id], ccturtz[id]);
    if (ccturtdrop != 0)
    {
    destroyBlock(ccturtx[id] + 1, ccturty[id], ccturtz[id]);
    Level.destroyBlock(ccturtx[id] + 1, ccturty[id], ccturtz[id]);
    addtoturtinv(ccturtx[id] + 1, ccturty[id], ccturtz[id], 1, ccturtdrop, 1, ccturtdropdata);
    }
    else
    {
    ccturtmessage("Break the air?! Okay...");
    }
    }
    else
    {
    ccturtmessage("Unbreakable");
    }
    }
    if (ccturti[id] == ccturtv[4] + 2)
    {
    if (getTile(ccturtx[id], ccturty[id], ccturtz[id] - 1) != 7)
    {
    var ccturtdrop = getTile(ccturtx[id], ccturty[id], ccturtz[id] - 1);
    var ccturtdropdata = Level.getData(ccturtx[id], ccturty[id], ccturtz[id] - 1);
    if (ccturtdrop != 0)
    {
    destroyBlock(ccturtx[id], ccturty[id], ccturtz[id] - 1);
    Level.destroyBlock(ccturtx[id], ccturty[id], ccturtz[id] - 1);
    addtoturtinv(ccturtx[id], ccturty[id], ccturtz[id] - 1, 1, ccturtdrop, 1, ccturtdropdata);
    }
    else
    {
    ccturtmessage("Break the air?! Okay...");
    }
    }
    else
    {
    ccturtmessage("Unbreakable");
    }
    }
    if (ccturti[id] == ccturtv[4] + 3)
    {
    if (getTile(ccturtx[id] - 1, ccturty[id], ccturtz[id]) != 7)
    {
    var ccturtdrop = getTile(ccturtx[id] - 1, ccturty[id], ccturtz[id]);
    var ccturtdropdata = Level.getData(ccturtx[id] - 1, ccturty[id], ccturtz[id]);
    if (ccturtdrop != 0)
    {
    destroyBlock(ccturtx[id] - 1, ccturty[id], ccturtz[id]);
    Level.destroyBlock(ccturtx[id] - 1, ccturty[id], ccturtz[id]);
    addtoturtinv(ccturtx[id] - 1, ccturty[id], ccturtz[id], 1, ccturtdrop, 1, ccturtdropdata);
    }
    else
    {
    ccturtmessage("Break the air?! Okay...");
    }
    }
    else
    {
    ccturtmessage("Unbreakable");
    }
    }
    }
    else
    {
    ccturtmessage("Not enught fuel!")
    }[/size][/center]
    [center]
    [size=xx-small]},
    /*==================*/
    /*===Sub Function===*/
    /*==================*/
    };
    /*====================*/
    /*======Function======*/
    /*====================*/
    function newLevelgui()
    {
    var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    ctx.runOnUiThread(new java.lang.Runnable(
    {
    run: function ()
    {
    try
    {
    var layout2 = new android.widget.LinearLayout(ctx);
    layout2.setOrientation(0);[/size][/center]
    [center][size=xx-small]var img2 = android.util.Base64.decode(img, 0);
    var menuBtn3 = new android.widget.ImageView(ctx);
    menuBtn3.setImageBitmap(android.graphics.BitmapFactory.decodeByteArray(img2, 0, img2.length));
    menuBtn3.setOnClickListener(new android.view.View.OnClickListener({
    onClick: function(viewarg){
    starterUI.dismiss();
    starterUI = null;
    } }));
    layout2.addView(menuBtn3);
    starterUI = new android.widget.PopupWindow(layout2, dip2px(ctx, 50), dip2px(ctx, 50));
    starterUI.showAtLocation(ctx.getWindow().getDecorView(), android.view.Gravity.LEFT | android.view.Gravity.TOP, ctx.getScreenWidth()/2-24 , ctx.getScreenHeight()/2-24 );[/size][/center]
    [center][size=xx-small]var layout = new android.widget.LinearLayout(ctx);
    layout.setOrientation(0);
    var menuBtn = new android.widget.Button(ctx);
    menuBtn.setText("CC");
    menuBtn.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    mainMenu("0");
    }
    }));
    layout.addView(menuBtn);
    var menuBtn2 = new android.widget.Button(ctx);
    menuBtn2.setText("TMI");
    menuBtn2.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    mainMenu2("main");
    }
    }));
    layout.addView(menuBtn2);
    GUI = new android.widget.PopupWindow(layout, android.widget.RelativeLayout.LayoutParams.WRAP_CONTENT, android.widget
    .RelativeLayout.LayoutParams.WRAP_CONTENT);
    GUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT));
    GUI.showAtLocation(ctx.getWindow()
    .getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.BOTTOM, 0, 0);
    }
    catch (err)
    {
    print("An error occured: " + err);
    }
    }
    }));
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function mainMenu(id)
    {
    var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    ctx.runOnUiThread(new java.lang.Runnable(
    {
    run: function ()
    {
    try
    {
    var menuLayout = new android.widget.LinearLayout(ctx);
    var menuScroll = new android.widget.ScrollView(ctx);
    var menuLayout1 = new android.widget.LinearLayout(ctx);
    menuLayout.setOrientation(1);
    menuLayout1.setOrientation(1);
    menuScroll.addView(menuLayout);
    menuLayout1.addView(menuScroll);
    var button = new android.widget.Button(ctx);
    button.setText("Close");
    button.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    if (menu != null)
    {
    menu.dismiss();
    menu = null;
    }
    }
    }));
    menuLayout.addView(button);
    if(id=="0"){
    var buttonmov = new android.widget.Button(ctx);
    buttonmov.setText("Move");
    buttonmov.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {[/size][/center]
    [center][size=xx-small]menu.dismiss();
    menu = null;
    mainMenu(2);
    }
    }));
    menuLayout.addView(buttonmov);[/size][/center]
    [center][size=xx-small]var buttonok = new android.widget.Button(ctx);
    buttonok.setText("Execute script");
    buttonok.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg) {}
    }));
    menuLayout.addView(buttonok);
    var buttonab = new android.widget.Button(ctx);
    buttonab.setText("About computercraft");
    buttonab.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    about();
    }
    }));
    menuLayout.addView(buttonab);[/size][/center]
    [center][size=xx-small]var buttoninv = new android.widget.Button(ctx);
    buttoninv.setText("Inventory");
    buttoninv.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {if(ccturtc!=null)
    {
    ccturtmessage("Slot 1: " + ccturt1[ccturtc] + ":" + ccturt1d[ccturtc] + ", count: " + ccturt1c[ccturtc] + ".");
    ccturtmessage("Slot 2: " + ccturt2[ccturtc] + ":" + ccturt2d[ccturtc] + ", count: " + ccturt2c[ccturtc] + ".");
    ccturtmessage("Slot 3: " + ccturt3[ccturtc] + ":" + ccturt3d[ccturtc] + ", count: " + ccturt3c[ccturtc] + ".");
    ccturtmessage("Slot 4: " + ccturt4[ccturtc] + ":" + ccturt4d[ccturtc] + ", count: " + ccturt4c[ccturtc] + ".");
    ccturtmessage("Slot 5: " + ccturt5[ccturtc] + ":" + ccturt5d[ccturtc] + ", count: " + ccturt5c[ccturtc] + ".");
    }else
    {ccturtmessage("No turtle selected!")}}
    }));
    menuLayout.addView(buttoninv);
    var buttonsel = new android.widget.Button(ctx);
    buttonsel.setText("Select");
    buttonsel.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {[/size][/center]
    [center][size=xx-small]menu.dismiss();
    menu = null;
    mainMenu(1);
    }
    }));
    menuLayout.addView(buttonsel);
    if(cccameraent==null)
    {
    var buttoncam = new android.widget.Button(ctx);
    buttoncam.setText("Camera: off");
    buttoncam.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    if (ccturtx[ccturtc]!=undefined|| ccturtx[i]!=null )
    {
    menu.dismiss();
    menu = null;
    cccameraent=Level.spawnMob(ccturtx[ccturtc],ccturty[ccturtc]+1,ccturtz[ccturtc],36,"/mob/creeper.png");
    ModPE.setCamera(cccameraent);
    }
    }
    }));
    menuLayout.addView(buttoncam);
    }
    else
    {
    var buttoncam = new android.widget.Button(ctx);
    buttoncam.setText("Camera: on");
    buttoncam.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    if (ccturtx[ccturtc]!=undefined|| ccturtx[i]!=null )
    {
    menu.dismiss();
    menu = null;
    Entity.remove(cccameraent);
    cccameraent=null;
    ModPE.setCamera( getPlayerEnt() );
    }
    }
    }));
    menuLayout.addView(buttoncam);[/size][/center]
    [center][size=xx-small]}[/size][/center]
    [center]
    [size=xx-small]}
    if(id=="1")
    {
    for (var i = 0; i < ccturtcountmax; i++)
    {
    if (ccturtx[i]!=undefined|| ccturtx[i]!=null )
    {eval("var buttona" + i + " = new android.widget.Button(ctx)");
    eval("buttona" + i+ ".setText('id:" + i + "')");
    eval("buttona" + i + ".setOnClickListener(new android.view.View.OnClickListener({onClick: function (viewarg){ ccturtc="+i+" }}));menuLayout.addView(buttona" + i + ");");
    }}[/size][/center]
    [center][size=xx-small]}
    if(id=="2")
    {
    var buttondig = new android.widget.Button(ctx);
    buttondig.setText("Dig block");
    buttondig.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    Turtle.dig();
    }
    }));
    menuLayout.addView(buttondig);
    var buttonUp = new android.widget.Button(ctx);
    buttonUp.setText("Move up");
    buttonUp.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    Turtle.Up();
    }
    }));
    menuLayout.addView(buttonUp);
    var buttondown = new android.widget.Button(ctx);
    buttondown.setText("Move down");
    buttondown.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    Turtle.Down();
    }
    }));
    menuLayout.addView(buttondown);
    var buttonleft = new android.widget.Button(ctx);
    buttonleft.setText("Turn left");
    buttonleft.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    Turtle.turnLeft();
    }
    }));
    menuLayout.addView(buttonleft);
    var buttonright = new android.widget.Button(ctx);
    buttonright.setText("Turn right");
    buttonright.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    Turtle.turnRight();
    }
    }));
    menuLayout.addView(buttonright);
    var buttonfor = new android.widget.Button(ctx);
    buttonfor.setText("Move forward");
    buttonfor.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    Turtle.Forward();
    }
    }));
    menuLayout.addView(buttonfor);
    }
    menu = new android.widget.PopupWindow(menuLayout1, ctx.getWindowManager()
    .getDefaultDisplay()
    .getWidth() / 4, ctx.getWindowManager()
    .getDefaultDisplay()
    .getHeight());
    menu.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK));
    menu.showAtLocation(ctx.getWindow()
    .getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0);
    }
    catch (error)
    {
    print("An error occured: " + error);
    }
    }
    }));
    }[/size][/center]
    [center][size=xx-small]function mainMenu2(sub)
    {
    var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    ctx.runOnUiThread(new java.lang.Runnable(
    {
    run: function ()
    {
    try
    {
    var menuLayout = new android.widget.LinearLayout(ctx);
    var menuScroll = new android.widget.ScrollView(ctx);
    var menuLayout1 = new android.widget.LinearLayout(ctx);
    menuLayout.setOrientation(1);
    menuLayout1.setOrientation(1);
    menuScroll.addView(menuLayout);
    menuLayout1.addView(menuScroll);
    var button = new android.widget.Button(ctx);
    button.setText("Close");
    button.setOnClickListener(new android.view.View.OnClickListener(
    {
    onClick: function (viewarg)
    {
    if (menu != null)
    {
    menu.dismiss();
    menu = null;
    if (sub != 'main')
    {mainMenu2("main")}
    }
    }
    }));
    menuLayout.addView(button);
    var al = new Array();
    al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
    if (sub=='main')
    {
    eval("var buttonalphitem = new android.widget.Button(ctx)");
    eval("buttonalphitem.setText('items')");
    eval("buttonalphitem.setOnClickListener(new android.view.View.OnClickListener({onClick: function (viewarg){ menu.dismiss();menu = null;items='i';mainMenu2('main1')}}));menuLayout.addView(buttonalphitem);");[/size][/center]
    [center][size=xx-small]eval("var buttonalphitem2 = new android.widget.Button(ctx)");
    eval("buttonalphitem2.setText('blocks')");
    eval("buttonalphitem2.setOnClickListener(new android.view.View.OnClickListener({onClick: function (viewarg){ menu.dismiss();menu = null;items='t';mainMenu2('main1')}}));menuLayout.addView(buttonalphitem2);");[/size][/center]
    [center][size=xx-small]}
    else
    {
    if (sub == 'main1')
    {
    for (var i = 0; i < 27; i++)
    {
    if (al[i] != undefined)
    {
    eval("var buttonalph" + al[i] + " = new android.widget.Button(ctx)");
    eval("buttonalph" + al[i] + ".setText('" + al[i] + "')");
    eval("buttonalph" + al[i] + ".setOnClickListener(new android.view.View.OnClickListener({onClick: function (viewarg){ menu.dismiss();menu = null;mainMenu2(" + i +
    ")}}));menuLayout.addView(buttonalph" + al[i] + ");");
    }
    }
    }
    else
    {
    for (var i = 1; i < 4096; i++)
    {
    name = Item.getName(i, 0, true);
    if (name != "" && name != "tile." && name != "item." && name != null)
    {
    if (Item.getName(i, 0, true).charAt(0) == items)
    {
    name = Item.getName(i, 0, true)
    .replace("item.", "")
    .replace("tile.", "")
    .replace(".", " ")
    .first();
    if (name.charAt(0) == al[sub])
    {
    eval("var button" + i + " = new android.widget.Button(ctx)");
    eval("button" + i + ".setText('" + name + "')");
    eval("button" + i + ".setOnClickListener(new android.view.View.OnClickListener({onClick: function (viewarg) { Player.addItemInventory(" +
    i + ",64,0); }}));menuLayout.addView(button" + i + ");");
    }
    }
    }
    }
    }
    }
    menu = new android.widget.PopupWindow(menuLayout1, ctx.getWindowManager()
    .getDefaultDisplay()
    .getWidth() / 4, ctx.getWindowManager()
    .getDefaultDisplay()
    .getHeight());
    menu.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.BLACK));
    menu.showAtLocation(ctx.getWindow()
    .getDecorView(), android.view.Gravity.RIGHT | android.view.Gravity.TOP, 0, 0);
    }
    catch (error)
    {
    print("An error occured: " + error);
    }
    }
    }));
    }
    String.prototype.first = function ()
    {
    return this.charAt(0)
    .toUpperCase() + this.slice(1);
    }
    String.prototype.first = function ()
    {
    return this.charAt(0)
    .toUpperCase() + this.slice(1);
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function ccleaveGame()
    {
    var ctx = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    ctx.runOnUiThread(new java.lang.Runnable(
    {
    run: function ()
    {
    if (GUI != null)
    {
    GUI.dismiss();
    GUI = null;
    }
    if (menu != null)
    {
    menu.dismiss();
    menu = null;
    }
    }
    }));
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function loadstate()
    {
    var dir = new java.io.File(android.os.Environment.getExternalStorageDirectory()
    .getPath() + "/games/com.mojang/minecraftWorlds/" + Level.getWorldDir() + "/ComputerCraft/state/");
    dir.mkdirs();
    var file = new java.io.File(android.os.Environment.getExternalStorageDirectory()
    .getPath() + "/games/com.mojang/minecraftWorlds/" + Level.getWorldDir() + "/ComputerCraft/state/state.dat");
    var scanner = new java.util.Scanner(file);
    var toload = scanner.next();
    var toloada = (toload + "Xr");
    toload = encrypt(toloada, "dec");
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    function savestate()
    {
    var state = [ccturtc, ccturtx.join("ð"), ccturty.join("ð"), ccturtz.join("ð")];
    var tosave = state.join("ß");
    tosave = encrypt(tosave, "enc");
    var dir = new java.io.File(android.os.Environment.getExternalStorageDirectory()
    .getPath() + "/games/com.mojang/minecraftWorlds/" + Level.getWorldDir() + "/ComputerCraft/state/");
    dir.mkdirs();
    file = new java.io.File(android.os.Environment.getExternalStorageDirectory()
    .getPath() + "/games/com.mojang/minecraftWorlds/" + Level.getWorldDir() + "/ComputerCraft/state/state.dat");
    file.delete();
    savewrite = new java.io.PrintWriter(file);
    savewrite.print(tosave);
    savewrite.close();
    }
    /*====================*/
    /*======Function======*/
    /*====================*/
    /*====================*/
    /*======Function======*/
    /*====================*/
    function random(min, max)
    {
    return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    /*====================*/
    /*======Function======*/
    /*====================*/[/size][/center]
    [center][size=xx-small]/*====================*/
    /*======Function======*/
    /*====================*/
    function addtoturtinv(x, y, z, easteregg, item, count, data)
    {
    if (ccturt1[ccturtc] == item || ccturt1[ccturtc] == 0)
    {
    if (ccturt1d[ccturtc] == data || ccturt1d[ccturtc] > -1)
    {
    if (ccturt1c[ccturtc] + count < 65)
    {
    ccturt1[ccturtc] = item;
    ccturt1d[ccturtc] = data;
    ccturt1c[ccturtc] = ccturt1c + count
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    if (ccturt2[ccturtc] == item || ccturt2[ccturtc] == 0)
    {
    if (ccturt2d[ccturtc] == data || ccturt2d[ccturtc] > -1)
    {
    if (ccturt2c[ccturtc] - (-count) < 65)
    {
    ccturt2[ccturtc] = item;
    ccturt2d[ccturtc] = data;
    ccturt2c[ccturtc] = ccturt1c - (-count);
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    if (ccturt3[ccturtc] == item || ccturt3[ccturtc] == 0)
    {
    if (ccturt3d[ccturtc] == data || ccturt3d[ccturtc] > -1)
    {
    if (ccturt3c[ccturtc] - (-count) < 65)
    {
    ccturt3[ccturtc] = item;
    ccturt3d[ccturtc] = data;
    ccturt3c[ccturtc] = ccturt1c - (-count);
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    if (ccturt4[ccturtc] == item || ccturt4[ccturtc] == 0)
    {
    if (ccturt4d[ccturtc] == data || ccturt4d[ccturtc] > -1)
    {
    if (ccturt4c[ccturtc] - (-count) < 65)
    {
    ccturt4[ccturtc] = item;
    ccturt4d[ccturtc] = data;
    ccturt4c[ccturtc] = ccturt1c - (-count);
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    if (ccturt5[ccturtc] == item || ccturt5[ccturtc] == 0)
    {
    if (ccturt5d[ccturtc] == data || ccturt5d[ccturtc] > -1)
    {
    if (ccturt5c[ccturtc] - (-count) < 65)
    {
    ccturt5[ccturtc] = item;
    ccturt5d[ccturtc] = data;
    ccturt5c[ccturtc] = ccturt1c - (-count);
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    else
    {
    Level.dropItem(x, y, z, 1, item, count, data);
    }
    }
    }
    }
    }
    }
    var addons = {
    reload: function () {},
    calladdonfunc: function (func) {}
    };[/size][/center]
    
    [center]
    [size=xx-small]//API
    //Creecoder by Creeplays
    function encrypt(b_x, b_n)
    {
    var b_alf =
    'АжЩЮюУеvИ5ЭQDIAðПC3эСiRХгTlß4HЫнaШЯаqЗлKя2m6kзДкJYЧu18MgpZЦтБР7мбV0tьКоОLBЛ9ceфhёPМsnыNyшФщЬXrSГEусWbцdдfЖВFjпGЕвoхТUwчиНOxрz "@$&№,.;:?!|/\~*+-)(}{<>]#%&^=';
    var b_result = '';
    if (b_n == "enc")
    {
    for (i = 0; i < b_x.length; i++)
    {
    b_pos = b_alf.lastIndexOf(b_x.charAt(i));
    b_char1 = b_alf.charAt(b_pos - 2);
    b_char2 = b_alf.charAt(b_pos - 1);
    b_result = b_result + b_char1 + b_char2;
    }
    }
    if (b_n == "dec")
    {
    for (i = 0; i < b_x.length; i = i + 2)
    {
    b_pos = b_alf.indexOf(b_x.charAt(i));
    b_result = b_result + b_alf.charAt(b_pos + 2);
    }
    }
    return b_result;
    }
    /*==========[FileLib by RusJJ v1.31]==========*/
    /*
    Included functions[/size][/center]
    [center][size=xx-small]file.select(dir, fileName);
    file.exist(selectedFile);
    file.create(selectedFile);
    file.del(selectedFile);
    file.read(selectedFile);
    file.readLine(selectedFile, line);
    file.readKey(selectedFile, key, keySeparator);
    file.write(selectedFile, text);
    file.rewrite(selectedFile, text);
    file.writeKey(selectedFile, key, keyText, keySeparator);
    file.mPlay(musicPath);
    file.mStop(musicPath);
    */
    var sdcard = android.os.Environment.getExternalStorageDirectory(),
    File = java.io.File,
    FileReader = java.io.FileReader,
    BufferedReader = java.io.BufferedReader,
    FOS = java.io.FileOutputStream,
    String = java.lang.String,
    StringBuilder = java.lang.StringBuilder,
    MediaPlayer = android.media.MediaPlayer(),
    file = {
    select: function (a, B)
    {
    return new File(a, B);
    },
    exists: function (a)
    {
    return a.exists();
    },
    create: function (a)
    {
    a.createNewFile();
    return a;
    },
    del: function (a)
    {
    a["delete"]();
    },
    read: function (a)
    {
    a = new BufferedReader(new FileReader(a));
    for (var b = new StringBuilder, c; null != (c = a.readLine());)
    {
    b.append(c), b.append("\n");
    }
    return b.toString();
    },
    readLine: function (a, B)
    {
    return (new file.read(a))
    .split("\n")[b - 1];
    },
    readKey: function (a, b, c)
    {
    for (a = (new file.read(a))
    .split("\n"); 0 < a.length;)
    {
    return c = a[0].split(c), c[0] == b ? c[1] : "[Unknown]";
    }
    },
    write: function (a, B)
    {
    file.rewrite(a, new file.read(a) + B);
    },
    rewrite: function (a, B)
    {
    (new FOS(a))
    .write((new String(B))
    .getBytes());
    },
    writeKey: function (a, b, c, e)
    {
    for (var d = 0, g = new file.read(a), h = g.split("\n"), f = 0; f < h.length; f++)
    {
    if (h[f].split(e)[0] == B)
    {
    d = g.split(b + e + new file.readKey(a, B));
    file.rewrite(a, d[0] + b + e + c + d[1]);
    d = 1;
    break;
    }
    }
    d || file.write(a, b + e + c);
    },
    mPlay: function (a)
    {
    MediaPlayer.setDataSource(a);
    MediaPlayer.prepare();
    MediaPlayer.start();
    },
    mStop: function ()
    {
    MediaPlayer.reset();
    }
    };
    /*==========[FileLib by RusJJ v1.31]==========*/[/size][/center]
    [center][size=xx-small]//timerlib by 500ise
    //timers are stored as [id, ticksRemaining, functionPointer, repeating
    //(-1 for no repeating, ticks for repeating)] inside the following array.
    var time_timers = [];
    var time_nextId = 0;[/size][/center]
    [center][size=xx-small]//timerlib_setTimeout(func, ticks):
    //after the specified number of in-game ticks, run the function.
    //one tick is equal to 1/20th of a second.
    //this is different from browser JavaScript, which takes in milliseconds instead.
    //returns a timer ID you can use to cancel the timer.[/size][/center]
    [center][size=xx-small]function setTimeout(func, ticks) {
    var id = time_nextId++;
    time_timers.push([id, ticks, func, -1]);
    return id;
    }[/size][/center]
    [center][size=xx-small]function setInterval(func, ticks) {
    var id = time_nextId++;
    time_timers.push([id, ticks, func, ticks]);
    return id;
    }[/size][/center]
    [center][size=xx-small]//clear a timeout that was previously set with setTimeout.
    //pass in the returned ID.
    function clearTimeout(id) {
    for (var i = time_timers.length - 1; i >= 0; --i) {
    var t = time_timers[i];
    if (t[0] == id) {
    time_timers.splice(i, 1);
    break;
    }
    }
    }[/size][/center]
    [center][size=xx-small]function clearInterval(id) {
    clearTimeout(id);
    }[/size][/center]
    [center][size=xx-small]function time_runTimers() {
    for (var i = time_timers.length - 1; i >= 0; --i) {
    var t = time_timers[i];
    t[1]--;
    if (t[1] == 0) {
    t[2]();
    if (t[3] == -1) {
    time_timers.splice(i, 1);
    } else {
    t[1] = t[3];
    }
    }
    }
    }[/size][/center]
    [center][size=xx-small]//end copy and paste here
    function dip2px(ctx, dips){
        return Math.ceil(dips * ctx.getResources().getDisplayMetrics().density);
    }
    [/size]
    Posted in: MCPE: Mods / Tools
  • To post a comment, please or register a new account.