• 1

    posted a message on customblock

    I downloaded the script: see how many errors you can spot. (I saw three)
    function useItem(x,y,z,itemId255,blockId2,side)
    {
    	Block.defineBlock(501, "Oh Ya", [[4, 1]])//Your Code Here
    }
    function attackHook(attacker, victim)
    {
    	BlockdefineBlock(999, "test", [[9, 9]])//Your Code Here
    }
    function modTick()
    {
    	//Your Code Here
    }



    no problem with functions, but missing . after block, and I have to ask myself
    "can block Id exceed 255? doesnt day have only 00 to ff?"
    And I think no prob with ; cuz javascript will add it by it self,
    and Im not sure he is meaning if itemId==255&&blockId==2
    so I found two(blockId, missing.).
    Posted in: MCPE: Mod / Tool Discussion
  • 1

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    Quote from Teslam

    sorry i will delete it after i just wanted to edit out all the block movement script and get it on my phone faster.

    i only want to move entities i was not going to take credit and or commercialize your hard work.

    ah! tahts okay!
    sorry for bad words lol
    Posted in: MCPE: Mods / Tools
  • 22

    posted a message on portalgun beta- (only pick block supported) move blocks smoothly where ever you want!
    here is little iron hoe which will make big difference.

    you can pick blocks, entities, and move them around.


    var blockArray=new Array();//saves ent of blocks
    var timer=-30;//what makes it work
    var pickedBlock=46;//Id of TNT by default
    var pickedDam=0;
    var pickedBool,pickedEnt,playerEnt;
    var readyFor=false;
    var portalGun=292;//can be changed easily
    var GUI=null;
    //events
    function newLevel()
    {var toAddAct=com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    toAddAct.runOnUiThread(new java.lang.Runnable({run:function()
    {try{GUI=new android.widget.PopupWindow();
    var layout=new android.widget.RelativeLayout(toAddAct);
    var button=new android.widget.Button(toAddAct);
    button.setText("PUT");
    button.setOnClickListener(new android.view.View.OnClickListener({onClick:
    function(viewarg){putBlockOperator();}}));
    layout.addView(button);
    GUI.setContentView(layout);
    GUI.setWidth(100);
    GUI.setHeight(100);
    GUI.showAtLocation(toAddAct.getWindow().getDecorView(),android.view.Gravity.LEFT | android.view.Gravity.BOTTOM,0,0);
    GUI.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(android.graphics.Color.TRANSPARENT));}
    catch(err){print("Error: "+err);}}})); //just making button
    timer=-30; //reseting
    }
    function modTick()
    {entityMover();startup();}
    function useItem(x,y,z,itemId)
    {if(itemId==portalGun&&!pickedBool&&readyFor)
    {preventDefault();
    if(getTile(x,y,z)<81)
    {pickedBlock=getTile(x,y,z);
    pickedDam=Level.getData(x,y,z);
    playerEnt=getPlayerEnt();
    pickedEnt=blockArray[80-pickedBlock];
    pickedBool=true;
    setTile(x,y,z,0);}
    else
    {clientMessage("this block can't be picked with portalgun");}
    }}
    function attackHook(attacker,victim)
    {playerEnt=attacker;
    var intype=Entity.getEntityTypeId(victim);
    if(intype==83)
    return;
    if(!pickedBool&&readyFor)
    {pickedEnt=victim;
    pickedBool=true;
    if(Entity.getEntityTypeId(victim)==65)
    {pickedBlock=46;
    pickedDam=0;}}
    else if(Entity.getX(pickedEnt)==Entity.getX(victim)&&Entity.getY(pickedEnt)==Entity.getY(victim)&&Entity.getZ(pickedEnt)==Entity.getZ(victim))
    {preventDefault();
    if(!getTile(Math.round(Entity.getX(victim)-0.5),Math.round(Entity.getY(victim)-0.5),Math.round(Entity.getZ(victim)-0.5)))
    {pickedBool=false;
    if(Entity.getEntityTypeId(victim)==65)
    putBlock(victim);}
    }}
    function deathHook(a,v)
    {if(!pickedBool)
    return;
    var intype=Entity.getEntityTypeId(v);
    if(intype==64||intype==80||intype==81||intype==82||intype==83)
    return;
    if(Entity.getX(pickedEnt)==Entity.getX(v)&&Entity.getY(pickedEnt)==Entity.getY(v)&&Entity.getZ(pickedEnt)==Entity.getZ(v)){
    pickedBool=false;}}
    function entityRemovedHook(ent)
    {if(!pickedBool)
    return;
    var intype=Entity.getEntityTypeId(ent);
    if(intype==64||intype==80||intype==81||intype==82||intype==83)
    return;
    if(Entity.getX(pickedEnt)==Entity.getX(ent)&&Entity.getY(pickedEnt)==Entity.getY(ent)&&Entity.getZ(pickedEnt)==Entity.getZ(ent)){
    pickedBool=false;}}
    function leaveGame()
    {var toAddAct = com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
    toAddAct.runOnUiThread(new java.lang.Runnable({ run: function() {
    if(GUI != null){GUI.dismiss();}}})); //delete button
    blockArray=new Array();
    timer=-30;
    pickedBlock=46;
    pickedDam=0;
    readyFor=false;
    GUI=null;
    pickedBool=false; //reset
    }
    
    function startup() //make blocks when entering game
    {if(timer>100)
    return;
    timer++;
    if(!timer)
    {for(var i=0;i<80;i++)
    {blockArray[i]=Level.spawnMob(128,256,128,65);
    Entity.setRenderType(blockArray[i],20);}}
    if(timer<80&&timer>=0)
    {for(var i=0;i<80;i++)
    {stopper(blockArray[i]);
    Entity.setPosition(blockArray[i],128,256,128);}
    Entity.rideAnimal(blockArray[timer],blockArray[timer]);}
    if(timer==90)
    {readyFor=true;clientMessage("portal gun succesfully booted");}}
    
    function stopper(ent) //stop entity falling
    {setVelY(ent,0);
    setVelX(ent,0);
    setVelZ(ent,0);}
    function entityMover() //move entity
    {if(pickedBool)
    {var px,py,pz,dx,dy,dz,yaw,pit;
    px=Player.getX();
    py=Player.getY()-0.5;
    pz=Player.getZ();
    yaw=Math.PI*Entity.getYaw(playerEnt)/180;
    pit=Math.PI*Entity.getPitch(playerEnt)/180;
    dx=-1*Math.cos(pit)*Math.sin(yaw);
    dy=-1*Math.sin(pit);
    dz=Math.cos(pit)*Math.cos(yaw);
    if(Entity.getEntityTypeId(pickedEnt)==65)
    moveBlock(pickedEnt,px+2*dx,py+2*dy-0.5,pz+2*dz);
    else
    Entity.setPosition(pickedEnt,px+2*dx,py+2*dy,pz+2*dz);
    stopper(pickedEnt);
    }}
    function moveBlock(ent,x,y,z) //special moving method for rATNT
    {var newMob=Level.spawnMob(x,y,z,80);
    Entity.setRenderType(newMob,21);
    stopper(newMob);
    Entity.rideAnimal(ent,newMob);
    Entity.remove(newMob);
    Entity.rideAnimal(ent,ent);}
    function putBlock(ent) //put block and reset ent
    {setTile(Math.round(Entity.getX(ent)-0.5),Math.round(Entity.getY(ent)-0.5),Math.round(Entity.getZ(ent)-0.5),pickedBlock,pickedDam);
    moveBlock(ent,128,256,128);
    pickedBool=false;}
    function putBlockOperator() //put block if possible
    {if(!pickedBool)
    return;
    var inblock=getTile(Math.round(Entity.getX(pickedEnt)-0.5),Math.round(Entity.getY(pickedEnt)-0.5),Math.round(Entity.getZ(pickedEnt)-0.5));
    if(inblock==0||(inblock>7&&inblock<12)||inblock==51||inblock==78)
    {pickedBool=false;
    if(Entity.getEntityTypeId(pickedEnt)==65)
    putBlock(pickedEnt);}}

    (and I have to say somethings to somebody, I'M NOT DRUNK!!)
    Posted in: MCPE: Mods / Tools
  • 5

    posted a message on preview for portal gun's pick block on MCPE. (how to move block smoothlly where ever you want)
    lol I want to close/delete this topic, but I dont know how...
    Posted in: MCPE: WIP Mods / Tools
  • 1

    posted a message on 3picture is enough
    pic.twitter.com/Ou4ug2J5SY
    pic.twitter.com/2vOMUXd2gc
    pic.twitter.com/vQxfO6UurT
    thats enough! dosent it!
    Just ModPE script(well its kinddu fake)
    Posted in: MCPE: Mods / Tools
  • To post a comment, please .