Creepypasta mod
This is my script though it is a simple one I think it is awsome. Tap a gold block with paper to spawn Creepypasta monsters.
download:https://www.dropbox.com/s/r24ibjxzd8yhcek/Creepypasta%20Mod.zip
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==339&&blockId==41)
{
spawnPigZombie(x, y, z, 286, "mob/Janethekiller.png");
spawnPigZombie(x, y, z, 283, "mob/Slenderman.png");
spawnPigZombie(x, y, z, 286, "mob/Masky.png");
spawnPigZombie(x, y, z, 276, "mob/Invisible Suit.png");
spawnPigZombie(x, y, z, 286, "mob/Eyeless Jack.png");
spawnPigZombie(x, y, z, 286, "mob/Jeffthekiller.png");
clientMessage("SHHHHH GO TO SLEEP");
setNightMode(14500,"environment/eclipse.png");
var convertRads = Math.PI / 180;
var autowalk = false;
var vel = 0.5;
function procCmd(cmd) {
if (cmd.split(" ")[0] == "walk") autowalk = !autowalk;
}
function modTick() {
if (!autowalk) return;
var playerYaw = getYaw();
var deltaZ = vel * Math.cos(playerYaw * convertRads);
var deltaX = vel * -1 * Math.sin(playerYaw * convertRads);
var playerEnt = getPlayerEnt();
setVelX(playerEnt, deltaX);
setVelZ(playerEnt, deltaZ);
}
Type /walk to start walking automatically and really fast.
name:invisiblity on everything
lines:45lines including 9lines of comment
how to use:try stuffs with paper
var nx,ny,nz,np,cc;
function useItem(x,y,z,itemId)
{if(itemId==339&&!cc)
{np=Player.getEntity();
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);
cc=3;}}
function destroyBlock(x,y,z)
{var itemId=getCarriedItem();
if(itemId==339)
{preventDefault();
Level.setTile(x,y,z,95);}}
function attackHook(a,v)
{var itemId=getCarriedItem();
if(itemId==339&&!cc)
{np=v;
cc=3;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);}}
function modTick()
{if(cc) cc--;
if(cc==2)
{nx=Entity.getX(np);
ny=Entity.getY(np);
nz=Entity.getZ(np);
if(getTile(nx,ny,nz)==0)
{setTile(nx,ny,nz,30);
setPosition(np,nx,ny+0.2,nz);}}
if(cc==1)
setTile(nx,ny,nz,0);
var itemId=getCarriedItem();
if(itemId==339&&!cc&&Math.random()*100<1)
Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)}
/*well, I love invisible kind of things, and
I still have a lot of space to put some words...
Who needs texture for invisiblity? Thats stupid....
BTW attackHook may not work propery on pig, chicken, spider
but mostly it works because they jump a little bit
when they get punched....
and invisible item may not work...
I havent tested this script cuz I dont have phone now...
if it doesnt works, just Let me know.*/
idont think you need dowload link for thisjust copy-paste it
FIXED!!(at least i hope)
name:invisiblity on everything
lines:44lines including 9lines of comment
how to use:try stuffs with paper
=========================
var nx,ny,nz,np,cc;
function useItem(x,y,z,itemId)
{if(itemId==339&&!cc)
{np=Player.getEntity;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);
cc=3;}}
function destroyBlock(x,y,z)
{var itemId=getCarriedItem();
if(itemId==339)
{Level.setTile(x,y,z,95);}}
function attackHook(a,v)
{var itemId=getCarriedItem();
if(itemId==339&&!cc)
{np=v;
cc=3;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);}}
function modTick()
{if(cc) cc--;
if(cc==2)
{nx=Entity.getX(np);
ny=Entity.getY(np);
nz=Entity.getZ(np);
if(getTile(nx,ny,nz)==0)
{setTile(nx,ny,nz,30);
setPosition(np,nx,ny+0.2,nz);}}
if(cc==1)
setTile(nx,ny,nz,0);
var itemId=getCarriedItem();
if(itemId==339&&!cc&&Math.random()*100<1)
Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)}
/*well, I love invisible kind of things, and
I still have a lot of space to put some words...
Who needs texture for invisiblity? Thats stupid....
BTW attackHook may not work propery on pig, chicken, spider
but mostly it works because they jump a little bit
when they get punched....
and invisible item may not work...
I havent tested this script cuz I dont have phone now...
if it doesnt works, just Let me know.*/
================================
cuz im not used to forum writing I dont know how to make boxes :-(
+idont think you need dowload link for this
just copy-paste it
ooops!
I missed () after that... lol
+it turned out that destroyBlock with setTile does not work as i expected
so i just added one line>>preventDefault();//this time i didnt missed () :->
Ill post the fixed ver tommorow. Thanks for testing
+It has super secret feature. AttackHook in some situation will activate it
Name: Majestic Butter Pick Enchantments Lines: 45 Description: as the name tells
Only fortune by using dirt on chest presently
This is custom experience level system. The MCPC system is too complicated. Different from others: you need to collect enchantment points! Code:
function newLevel(){
if(readData("getFortuneLevel")==null/*or whatever returned when undefined*/){
saveData("getFortuneLevel",0);//hope accept int
}
if(readData("xp")==null)saveData("xp",0);
if(readData("nethered")==null)saveData("xp",0);
//DONTDO function toggle(a){if(readData(a)=="true"){saveData(a, "false");}else{saveData(a, "true");}}//hope this thing is useless
}
function useItem(x,y,z,i,B){
if(b==247){
aE(6);
saveData("nethered",1);}
else if(b==54&&i==3){
if(readData("xp"<100))return;
preventDefault();
saveData("getFortuneLevel",readData("getFortuneLevel")+1);
saveData("xp",readData("xp")-100);
}
}
function destroyBlock(x,y,z,s){
if(getCarriedItem!=285)return;
addItemInventory(getTile(x,y,z),readData("getFortuneLevel")*Math.random()-1,getData(x,y,z));
}
function aE(B){
saveData("xp",readData("xp")+B);//Connor4898 said accept any data but parameters can only be string?
}
function deathHook(a,v){
var vT=Entity.getEntityTypeId(v);
if(Math.abs(Entity.getX(v)-Player.getX())+Math.abs(Entity.getZ(v)-Player.getZ())<322)return;//Even in MCPC you won't be able to get XP from that far. Can be changed when there is getTime().
switch(vT){
case 32:aE(3);break;
case 33:aE(5);break;
case 34:ae(4);break;
case 35:aE(4);break;
case 36:aE(6);break;
case 10:aE(1);break;
default:aE(2);
}
}
function modTick(){
playerTime++;//what did I want to use this for?
}
function leaveGame(){
;
}//forgot what I wanted to add lol
not debugged.
Download: null. Well if you really want download press "reload". (Doesn't BlockLauncher import from ClipBoard too?)
Name: Mobs of Mobs Lines: 33 Description: Spawns a mob of mobs according to the difficulty level every time a mob spawns. The difficulty level doesn't read the default in the settings. It is defined by /diff <int 0-5> in command. Default is 0. ORIGINAL IDEA! Code:
function newLevel(){
if(readData("noctDiff")==""/*or whatever returned if undefined*/){
saveData("noctDiff","0");
}
}
function entityAddedHook(e){
if(!(32<=Entity.getEntityTypeId(e)<=36))return;
var coor1=Entity.getX(e);
var coor2=Entity.getY(e);
var coor3=Entity.getZ(e);
var a=readData("noctDiff");
if(a=="1"){
var no=1;
}else if(a=="2"){
var no=2;
}else if(a=="3"){
var no=3;
}else if(a=="4"){
var no=4;
}else if(a=="5"){
var no=5;
}else var no=0;
while(no>0){
Entity.spawnMob(coor1,coor2,coor3,Entity.getEntityTypeId(e));
no--;
}
}
function procCmd(c){
if(c.split(" ")[0]!="/diff")return;
if(c.split(" ").length<2)printInvPar();return;
var p = c.split(" ")[1];
if(p!="0"&&p!="1"&&p!="2"&&p!="3"&&p!="4"&&p!="5"){
printInvPar();return;
}else saveData("noctDiff",p);
}
function printInvPar(){
print("Invalid parameters! Type /diff <int 0-5>");
}
Debugged in Eclipse JavaScript plugin.
Download: null. Well if you really want download press refresh/reload. (Doesn't BlockLauncher import from ClipBoard too?)
Name: Breeding Description: tap wheat/seed/melon slices on farm animals and send them to love mode Change log: Initial release Upcoming: love mode animations Lines: barely shinked into 48 lines from 63 lines without the first line (comment). If all comments are deleted, some lines are unreasonably long some might think, but met your written instructions <150 chars. Code:
/*this script is more "reasonable" if the comments are not counted*/
var lovemodeChickenList,lovemodeCowList,lovemodePigList,lovemodeSheepList;
function attackHook(a,v){var target=Entity.getEntityTypeId(v);if(Entity.getAnimalAge(v)!=0)clientMessage("only an adult can breed");return;
if(getCarriedItem()==296/*wheat*/){
if(target==11/*cow*/)preventDefault();lovemodeCowList[lovemodeCowList.length]=v;addItemInventory(296,-1);
if(target==13/*sheep*/)preventDefault();lovemodeSheepList[lovemodeSheepList.length]=v;addItemInventory(296,-1);}
if(getCarriedItem()==295/*seed wheat*/&&target==10/*chicken*/){
preventDefault();lovemodeChickenList[lovemodeChickenList.length]=v;addItemInventory(295,-1);}
if(getCarriedItem()==360/*melon sub carrots*/&&target==12/*pigs*/){
preventDefault();lovemodePigList[lovemodePigList.length]=v;addItemInventory(360,-1);}}
function modTick(){rndTime++;//to avoid lagging because of the massive for loop. I think checking it every 5 seconds is the best. (there won't be a lot lovers, right?)
if(rndTime%(20*(lovemodeChickenList.length))==0)testChickenLove();if(rndTime%(20*(lovemodeCowlist.length))==0)testCowLove();
if(rndTime%(20*(lovemodePiglist.length))==0)testPigLove();if(rndTime%(20*(lovemodeSheeplist.length))==0)testSheepLove();}
function testChickenLove(){var chickenLovers=lovemodeChickenList.length;var j,k;
for(j=0;j<chickenLovers;j++){for(k=j+1;k<chickenLovers;k++){
var jX=Entity.getX(lovemodeChickenList[j]),jY=Entity.getY(lovemodeChickenList[j]),jZ=Entity.getZ(lovemodeChickenList[j]);
var kX=Entity.getX(lovemodeChickenList[k]),jY=Entity.getY(lovemodeChickenList[k]),jZ=Entity.getZ(lovemodeChickenList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeChickenList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeChickenList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeChickenList[j],-24000);Entity.setAnimalAge(lovemodeChickenList[k],-24000);}}}}
function testCowLove(){var cowLovers=lovemodeCowList.length;var j,k;
for(j=0;j<cowLovers;j++){for(k=j+1;k<cowLovers;k++){
var jX=Entity.getX(lovemodeCowList[j]),jY=Entity.getY(lovemodeCowList[j]),jZ=Entity.getZ(lovemodeCowList[j]);
var kX=Entity.getX(lovemodeCowList[k]),jY=Entity.getY(lovemodeCowList[k]),jZ=Entity.getZ(lovemodeCowList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeCowList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeCowList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeCowList[j],-24000);Entity.setAnimalAge(lovemodeCowList[k],-24000);}}}}
function testPigLove(){var pigLovers=lovemodePigList.length;var j,k;
for(j=0;j<pigLovers;j++){for(k=j+1;k<pigLovers;k++){
var jX=Entity.getX(lovemodePigList[j]),jY=Entity.getY(lovemodePigList[j]),jZ=Entity.getZ(lovemodePigList[j]);
var kX=Entity.getX(lovemodePigList[k]),jY=Entity.getY(lovemodePigList[k]),jZ=Entity.getZ(lovemodePigList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodePigList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodePigList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodePigList[j],-24000);Entity.setAnimalAge(lovemodePigList[k],-24000);}}}}
function testSheepLove(){var pigLovers=lovemodePigList.length;var j,k;
for(j=0;j<sheepLovers;j++){for(k=j+1;k<sheepLovers;k++){
var jX=Entity.getX(lovemodeSheepList[j]),jY=Entity.getY(lovemodeSheepList[j]),jZ=Entity.getZ(lovemodeSheepList[j]);
var kX=Entity.getX(lovemodeSheepList[k]),jY=Entity.getY(lovemodeSheepList[k]),jZ=Entity.getZ(lovemodeSheepList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeSheepList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeSheepList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeSheepList[j],-24000);Entity.setAnimalAge(lovemodeSheepList[k],-24000);}}}}
Download: Press reload/refresh if you really need download.
Name: Wither Description: As named, totally written on a phone (terrible) Lines: Half ready but already 100. But you see part of it and you will understand:
l++;
}
l=-1;
k++;
}
k=-1;
j++;
}
j=-1;
}
obviously they can be all in one line.
Changelog: Pre-release Code:
//Still making. A block wither is much easier than magic carpet because of its destructive nature.
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:
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:
And just as I was preparing a modscript! How convenient! BTW does modscript have to be incredibly complex? Mine isn't.
I think presently the most complex thing in javascript is the for loop and arrays and .length because you have to analyze a large amount of data and the possibilities for each datum.
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:
mcpe_modder pls use a spoiler/null to hide your duplicated post.
I updated my post. Added the breeding mod in the MCPC-fx-port-to-MCPC-by-MCPC package. Fixed some bugs.
This quote contains a lot of & bugs. Please don't refer to this.
Name: Majestic Butter Pick Enchantments Lines: 45 Description: as the name tells
Only fortune by using dirt on chest presently
This is custom experience level system. The MCPC system is too complicated. Different from others: you need to collect enchantment points! Code:
function newLevel(){
if(readData("getFortuneLevel")==null/*or whatever returned when undefined*/){
saveData("getFortuneLevel",0);//hope accept int
}
if(readData("xp")==null)saveData("xp",0);
if(readData("nethered")==null)saveData("xp",0);
//DONTDO function toggle(a){if(readData(a)=="true"){saveData(a, "false");}else{saveData(a, "true");}}//hope this thing is useless
}
function useItem(x,y,z,i,B){
if(b==247){
aE(6);
saveData("nethered",1);}
else if(b==54&&i==3){
if(readData("xp"<100))return;
preventDefault();
saveData("getFortuneLevel",readData("getFortuneLevel")+1);
saveData("xp",readData("xp")-100);
}
}
function destroyBlock(x,y,z,s){
if(getCarriedItem!=285)return;
addItemInventory(getTile(x,y,z),readData("getFortuneLevel")*Math.random()-1,getData(x,y,z));
}
function aE(B){
saveData("xp",readData("xp")+B);//Connor4898 said accept any data but parameters can only be string?
}
function deathHook(a,v){
var vT=Entity.getEntityTypeId(v);
if(Math.abs(Entity.getX(v)-Player.getX())+Math.abs(Entity.getZ(v)-Player.getZ())<322)return;//Even in MCPC you won't be able to get XP from that far. Can be changed when there is getTime().
switch(vT){
case 32:aE(3);break;
case 33:aE(5);break;
case 34:ae(4);break;
case 35:aE(4);break;
case 36:aE(6);break;
case 10:aE(1);break;
default:aE(2);
}
}
function modTick(){
playerTime++;//what did I want to use this for?
}
function leaveGame(){
;
}//forgot what I wanted to add lol
not debugged.
Download: null. Well if you really want download press "reload". (Doesn't BlockLauncher import from ClipBoard too?)
Name: Mobs of Mobs Lines: 33 Description: Spawns a mob of mobs according to the difficulty level every time a mob spawns. The difficulty level doesn't read the default in the settings. It is defined by /diff <int 0-5> in command. Default is 0.
ORIGINAL IDEA! Code:
function newLevel(){
if(readData("noctDiff")==""/*or whatever returned if undefined*/){
saveData("noctDiff","0");
}
}
function entityAddedHook(e){
if(!(32<=Entity.getEntityTypeId(e)<=36))return;
var coor1=Entity.getX(e);
var coor2=Entity.getY(e);
var coor3=Entity.getZ(e);
var a=readData("noctDiff");
if(a=="1"){
var no=1;
}else if(a=="2"){
var no=2;
}else if(a=="3"){
var no=3;
}else if(a=="4"){
var no=4;
}else if(a=="5"){
var no=5;
}else var no=0;
while(no>0){
Entity.spawnMob(coor1,coor2,coor3,Entity.getEntityTypeId(e));
no--;
}
}
function procCmd(c){
if(c.split(" ")[0]!="/diff")return;
if(c.split(" ").length<2)printInvPar();return;
var p = c.split(" ")[1];
if(p!="0"&&p!="1"&&p!="2"&&p!="3"&&p!="4"&&p!="5"){
printInvPar();return;
}else saveData("noctDiff",p);
}
function printInvPar(){
print("Invalid parameters! Type /diff <int 0-5>");
}
Debugged in Eclipse JavaScript plugin.
Download: null. Well if you really want download press refresh/reload. (Doesn't BlockLauncher import from ClipBoard too?)
Name: Breeding Description: tap wheat/seed/melon slices on farm animals and send them to love mode Change log: Initial release Upcoming: love mode animations Lines: barely shinked into 48 lines from 63 lines without the first line (comment). If all comments are deleted, some lines are unreasonably long some might think, but met your written instructions <150 chars. Code:
/*this script is more "reasonable" if the comments are not counted*/
var lovemodeChickenList,lovemodeCowList,lovemodePigList,lovemodeSheepList;
function attackHook(a,v){var target=Entity.getEntityTypeId(v);if(Entity.getAnimalAge(v)!=0)clientMessage("only an adult can breed");return;
if(getCarriedItem()==296/*wheat*/){
if(target==11/*cow*/)preventDefault();lovemodeCowList[lovemodeCowList.length]=v;addItemInventory(296,-1);
if(target==13/*sheep*/)preventDefault();lovemodeSheepList[lovemodeSheepList.length]=v;addItemInventory(296,-1);}
if(getCarriedItem()==295/*seed wheat*/&&target==10/*chicken*/){
preventDefault();lovemodeChickenList[lovemodeChickenList.length]=v;addItemInventory(295,-1);}
if(getCarriedItem()==360/*melon sub carrots*/&&target==12/*pigs*/){
preventDefault();lovemodePigList[lovemodePigList.length]=v;addItemInventory(360,-1);}}
function modTick(){rndTime++;//to avoid lagging because of the massive for loop. I think checking it every 5 seconds is the best. (there won't be a lot lovers, right?)
if(rndTime%(20*(lovemodeChickenList.length))==0)testChickenLove();if(rndTime%(20*(lovemodeCowlist.length))==0)testCowLove();
if(rndTime%(20*(lovemodePiglist.length))==0)testPigLove();if(rndTime%(20*(lovemodeSheeplist.length))==0)testSheepLove();}
function testChickenLove(){var chickenLovers=lovemodeChickenList.length;var j,k;
for(j=0;j<chickenLovers;j++){for(k=j+1;k<chickenLovers;k++){
var jX=Entity.getX(lovemodeChickenList[j]),jY=Entity.getY(lovemodeChickenList[j]),jZ=Entity.getZ(lovemodeChickenList[j]);
var kX=Entity.getX(lovemodeChickenList[k]),jY=Entity.getY(lovemodeChickenList[k]),jZ=Entity.getZ(lovemodeChickenList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeChickenList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeChickenList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeChickenList[j],-24000);Entity.setAnimalAge(lovemodeChickenList[k],-24000);}}}}
function testCowLove(){var cowLovers=lovemodeCowList.length;var j,k;
for(j=0;j<cowLovers;j++){for(k=j+1;k<cowLovers;k++){
var jX=Entity.getX(lovemodeCowList[j]),jY=Entity.getY(lovemodeCowList[j]),jZ=Entity.getZ(lovemodeCowList[j]);
var kX=Entity.getX(lovemodeCowList[k]),jY=Entity.getY(lovemodeCowList[k]),jZ=Entity.getZ(lovemodeCowList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeCowList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeCowList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeCowList[j],-24000);Entity.setAnimalAge(lovemodeCowList[k],-24000);}}}}
function testPigLove(){var pigLovers=lovemodePigList.length;var j,k;
for(j=0;j<pigLovers;j++){for(k=j+1;k<pigLovers;k++){
var jX=Entity.getX(lovemodePigList[j]),jY=Entity.getY(lovemodePigList[j]),jZ=Entity.getZ(lovemodePigList[j]);
var kX=Entity.getX(lovemodePigList[k]),jY=Entity.getY(lovemodePigList[k]),jZ=Entity.getZ(lovemodePigList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodePigList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodePigList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodePigList[j],-24000);Entity.setAnimalAge(lovemodePigList[k],-24000);}}}}
function testSheepLove(){var pigLovers=lovemodePigList.length;var j,k;
for(j=0;j<sheepLovers;j++){for(k=j+1;k<sheepLovers;k++){
var jX=Entity.getX(lovemodeSheepList[j]),jY=Entity.getY(lovemodeSheepList[j]),jZ=Entity.getZ(lovemodeSheepList[j]);
var kX=Entity.getX(lovemodeSheepList[k]),jY=Entity.getY(lovemodeSheepList[k]),jZ=Entity.getZ(lovemodeSheepList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeSheepList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeSheepList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeSheepList[j],-24000);Entity.setAnimalAge(lovemodeSheepList[k],-24000);}}}}
Download: Press reload/refresh if you really need download.
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:
How do I put this in block lanucher
also how do you guys learn java script
Sincerely. I didn't take any lessons or anything. I started reading javascript when I saw Treebl's post. I managed to learn javascript syntax (mostly) by myself, and recently used Eclipse javascript plugin to learn about Math class etc by myself. In fact, you can say I just copied and modified 500 ISE's scripts at first, those for loops that I hardly got to understand.
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:
name:invisiblity on everything
lines:42lines
how to use:try stuffs with paper
(use it on ground, break block, attack mobs, just hold it)
var newX,newY,newZ,ent,timer;
function useItem(x,y,z,itemId)
{if(itemId==339&&!timer)
{ent=Player.getEntity();
setVelY(ent,0/0);
setVelX(ent,0/0);
setVelZ(ent,0/0);
timer=3;}}
function destroyBlock(x,y,z)
{var itemId=getCarriedItem();
if(itemId==339)
{preventDefault();
Level.setTile(x,y,z,95);}}
function attackHook(attacker,victim)
{var itemId=getCarriedItem();
if(itemId==339&&!timer)
{ent=victim;
setVelY(ent,0/0);
setVelX(ent,0/0);
setVelZ(ent,0/0);
timer=3;}}
function modTick()
{if(timer) timer--;
if(timer==2)
{newX=Entity.getX(ent);
newY=Entity.getY(ent);
newZ=Entity.getZ(ent);
if(getTile(newX,newY,newZ)==0)
{setTile(newX,newY,newZ,30);
setPosition(ent,newX,newY+0.2,newZ);}}
if(timer==1)
setTile(newX,newY,newZ,0);
var itemId=getCarriedItem();
if(itemId==339&&!timer&&Math.random()*400<1)
Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)}
/*0/0 is NaN*/
well, I love invisible kind of things
Who needs texture for invisiblity? Thats stupid....
+who can make skeleton invisible with just adding texture?
and who can make armored yourself invisible?
Can you spoiler-ize different scripts? They are so messy on this page.
E.g. Name [ spoiler name="" ]desc [/spoiler] Name [ spoiler name="" ]desc [/spoiler]
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:
//Creepig01's Second Entry For The "ModPE In 50 Lines Challenge"
function useItem(x,y,z,itemId,blockId,side)
{
var gpx = getPlayerX(); var gpy = getPlayerY(); var gpz = getPlayerZ();
if(itemId==267)
{
setTile(gpx+10,gpy+10,gpz+10,12);//First line in "Hi"
setTile(gpx+10,gpy+11,gpz+10,12);
setTile(gpx+10,gpy+12,gpz+10,12);
setTile(gpx+10,gpy+13,gpz+10,12);
setTile(gpx+10,gpy+14,gpz+10,12);//End of the first line in "Hi"
setTile(gpx+9,gpy+1,gpz+10,24);//Start of the middle line in the "H" in "Hi"
setTile(gpx+8,gpy+1,gpz+10,24);//End of the middle line in the "H" in "Hi"
setTile(gpx+7,gpy+10,gpz+10,12);//Start or the second line in "Hi"
setTile(gpx+7,gpy+11,gpz+10,12);
setTile(gpx+7,gpy+12,gpz+10,12);
setTile(gpx+7,gpy+13,gpz+10,12);
setTile(gpx+7,gpy+14,gpz+10,12);//End of the second line in "Hi"
setTile(gpx+4,gpy+10,gpz+10,12);//Start of the "I" in "Hi"
setTile(gpx+4,gpy+11,gpz+10,12);
setTile(gpx+4,gpy+12,gpz+10,12);
setTile(gpx+4,gpy+13,gpz+10,12);
setTile(gpx+4,gpy+14,gpz+10,12);//End of the "I" in "Hi"
}
}
name:invisiblity on everything
lines:42lines
how to use:try stuffs with paper
(use it on ground, break block, attack mobs, just hold it)
var newX,newY,newZ,ent,timer;
function useItem(x,y,z,itemId)
{if(itemId==339&&!timer)
{ent=Player.getEntity();
setVelY(ent,0/0);
setVelX(ent,0/0);
setVelZ(ent,0/0);
timer=3;}}
function destroyBlock(x,y,z)
{var itemId=getCarriedItem();
if(itemId==339)
{preventDefault();
Level.setTile(x,y,z,95);}}
function attackHook(attacker,victim)
{var itemId=getCarriedItem();
if(itemId==339&&!timer)
{ent=victim;
setVelY(ent,0/0);
setVelX(ent,0/0);
setVelZ(ent,0/0);
timer=3;}}
function modTick()
{if(timer) timer--;
if(timer==2)
{newX=Entity.getX(ent);
newY=Entity.getY(ent);
newZ=Entity.getZ(ent);
if(getTile(newX,newY,newZ)==0)
{setTile(newX,newY,newZ,30);
setPosition(ent,newX,newY+0.2,newZ);}}
if(timer==1)
setTile(newX,newY,newZ,0);
var itemId=getCarriedItem();
if(itemId==339&&!timer&&Math.random()*400<1)
Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)}
/*0/0 is NaN*/
well, I love invisible kind of things
Who needs texture for invisiblity? Thats stupid....
+who can make skeleton invisible with just adding texture?
and who can make armored yourself invisible?
//Creepig01's Second Entry For The "ModPE In 50 Lines Challenge"
function useItem(x,y,z,itemId,blockId,side)
{
var gpx = getPlayerX(); var gpy = getPlayerY(); var gpz = getPlayerZ();
if(itemId==267)
{
setTile(gpx+10,gpy+10,gpz+10,12);//First line in "Hi"
setTile(gpx+10,gpy+11,gpz+10,12);
setTile(gpx+10,gpy+12,gpz+10,12);
setTile(gpx+10,gpy+13,gpz+10,12);
setTile(gpx+10,gpy+14,gpz+10,12);//End of the first line in "Hi"
setTile(gpx+9,gpy+1,gpz+10,24);//Start of the middle line in the "H" in "Hi"
setTile(gpx+8,gpy+1,gpz+10,24);//End of the middle line in the "H" in "Hi"
setTile(gpx+7,gpy+10,gpz+10,12);//Start or the second line in "Hi"
setTile(gpx+7,gpy+11,gpz+10,12);
setTile(gpx+7,gpy+12,gpz+10,12);
setTile(gpx+7,gpy+13,gpz+10,12);
setTile(gpx+7,gpy+14,gpz+10,12);//End of the second line in "Hi"
setTile(gpx+4,gpy+10,gpz+10,12);//Start of the "I" in "Hi"
setTile(gpx+4,gpy+11,gpz+10,12);
setTile(gpx+4,gpy+12,gpz+10,12);
setTile(gpx+4,gpy+13,gpz+10,12);
setTile(gpx+4,gpy+14,gpz+10,12);//End of the "I" in "Hi"
}
}
Name: Majestic Butter Pick Enchantments Lines: 45 Description: as the name tells
Only fortune by using dirt on chest presently
This is custom experience level system. The MCPC system is too complicated. Different from others: you need to collect enchantment points! Code:
function newLevel(){
if(readData("getFortuneLevel")==null/*or whatever returned when undefined*/){
saveData("getFortuneLevel",0);//hope accept int
}
if(readData("xp")==null)saveData("xp",0);
if(readData("nethered")==null)saveData("xp",0);
//DONTDO function toggle(a){if(readData(a)=="true"){saveData(a, "false");}else{saveData(a, "true");}}//hope this thing is useless
}
function useItem(x,y,z,i,B){
if(b==247){
aE(6);
saveData("nethered",1);}
else if(b==54&&i==3){
if(readData("xp"<100))return;
preventDefault();
saveData("getFortuneLevel",readData("getFortuneLevel")+1);
saveData("xp",readData("xp")-100);
}
}
function destroyBlock(x,y,z,s){
if(getCarriedItem!=285)return;
addItemInventory(getTile(x,y,z),readData("getFortuneLevel")*Math.random()-1,getData(x,y,z));
}
function aE(B){
saveData("xp",readData("xp")+B);//Connor4898 said accept any data but parameters can only be string?
}
function deathHook(a,v){
var vT=Entity.getEntityTypeId(v);
if(Math.abs(Entity.getX(v)-Player.getX())+Math.abs(Entity.getZ(v)-Player.getZ())<322)return;//Even in MCPC you won't be able to get XP from that far. Can be changed when there is getTime().
switch(vT){
case 32:aE(3);break;
case 33:aE(5);break;
case 34:ae(4);break;
case 35:aE(4);break;
case 36:aE(6);break;
case 10:aE(1);break;
default:aE(2);
}
}
function modTick(){
playerTime++;//what did I want to use this for?
}
function leaveGame(){
;
}//forgot what I wanted to add lol
not debugged.
Download: null. Well if you really want download press "reload". (Doesn't BlockLauncher import from ClipBoard too?)
Name: Mobs of Mobs Lines: 33 Description: Spawns a mob of mobs according to the difficulty level every time a mob spawns. The difficulty level doesn't read the default in the settings. It is defined by /diff <int 0-5> in command. Default is 0. ORIGINAL IDEA! Code:
function newLevel(){
if(readData("noctDiff")==""/*or whatever returned if undefined*/){
saveData("noctDiff","0");
}
}
function entityAddedHook(e){
if(!(32<=Entity.getEntityTypeId(e)<=36))return;
var coor1=Entity.getX(e);
var coor2=Entity.getY(e);
var coor3=Entity.getZ(e);
var a=readData("noctDiff");
if(a=="1"){
var no=1;
}else if(a=="2"){
var no=2;
}else if(a=="3"){
var no=3;
}else if(a=="4"){
var no=4;
}else if(a=="5"){
var no=5;
}else var no=0;
while(no>0){
Entity.spawnMob(coor1,coor2,coor3,Entity.getEntityTypeId(e));
no--;
}
}
function procCmd(c){
if(c.split(" ")[0]!="/diff")return;
if(c.split(" ").length<2)printInvPar();return;
var p = c.split(" ")[1];
if(p!="0"&&p!="1"&&p!="2"&&p!="3"&&p!="4"&&p!="5"){
printInvPar();return;
}else saveData("noctDiff",p);
}
function printInvPar(){
print("Invalid parameters! Type /diff <int 0-5>");
}
Debugged in Eclipse JavaScript plugin.
Download: null. Well if you really want download press refresh/reload. (Doesn't BlockLauncher import from ClipBoard too?)
Name: Breeding Description: tap wheat/seed/melon slices on farm animals and send them to love mode Change log: Initial release Upcoming: love mode animations Lines: barely shinked into 48 lines from 63 lines without the first line (comment). If all comments are deleted, some lines are unreasonably long some might think, but met your written instructions <150 chars. Code:
/*this script is more "reasonable" if the comments are not counted*/
var lovemodeChickenList,lovemodeCowList,lovemodePigList,lovemodeSheepList;
function attackHook(a,v){var target=Entity.getEntityTypeId(v);if(Entity.getAnimalAge(v)!=0)clientMessage("only an adult can breed");return;
if(getCarriedItem()==296/*wheat*/){
if(target==11/*cow*/)preventDefault();lovemodeCowList[lovemodeCowList.length]=v;addItemInventory(296,-1);
if(target==13/*sheep*/)preventDefault();lovemodeSheepList[lovemodeSheepList.length]=v;addItemInventory(296,-1);}
if(getCarriedItem()==295/*seed wheat*/&&target==10/*chicken*/){
preventDefault();lovemodeChickenList[lovemodeChickenList.length]=v;addItemInventory(295,-1);}
if(getCarriedItem()==360/*melon sub carrots*/&&target==12/*pigs*/){
preventDefault();lovemodePigList[lovemodePigList.length]=v;addItemInventory(360,-1);}}
function modTick(){rndTime++;//to avoid lagging because of the massive for loop. I think checking it every 5 seconds is the best. (there won't be a lot lovers, right?)
if(rndTime%(20*(lovemodeChickenList.length))==0)testChickenLove();if(rndTime%(20*(lovemodeCowlist.length))==0)testCowLove();
if(rndTime%(20*(lovemodePiglist.length))==0)testPigLove();if(rndTime%(20*(lovemodeSheeplist.length))==0)testSheepLove();}
function testChickenLove(){var chickenLovers=lovemodeChickenList.length;var j,k;
for(j=0;j<chickenLovers;j++){for(k=j+1;k<chickenLovers;k++){
var jX=Entity.getX(lovemodeChickenList[j]),jY=Entity.getY(lovemodeChickenList[j]),jZ=Entity.getZ(lovemodeChickenList[j]);
var kX=Entity.getX(lovemodeChickenList[k]),jY=Entity.getY(lovemodeChickenList[k]),jZ=Entity.getZ(lovemodeChickenList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeChickenList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeChickenList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeChickenList[j],-24000);Entity.setAnimalAge(lovemodeChickenList[k],-24000);}}}}
function testCowLove(){var cowLovers=lovemodeCowList.length;var j,k;
for(j=0;j<cowLovers;j++){for(k=j+1;k<cowLovers;k++){
var jX=Entity.getX(lovemodeCowList[j]),jY=Entity.getY(lovemodeCowList[j]),jZ=Entity.getZ(lovemodeCowList[j]);
var kX=Entity.getX(lovemodeCowList[k]),jY=Entity.getY(lovemodeCowList[k]),jZ=Entity.getZ(lovemodeCowList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeCowList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeCowList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeCowList[j],-24000);Entity.setAnimalAge(lovemodeCowList[k],-24000);}}}}
function testPigLove(){var pigLovers=lovemodePigList.length;var j,k;
for(j=0;j<pigLovers;j++){for(k=j+1;k<pigLovers;k++){
var jX=Entity.getX(lovemodePigList[j]),jY=Entity.getY(lovemodePigList[j]),jZ=Entity.getZ(lovemodePigList[j]);
var kX=Entity.getX(lovemodePigList[k]),jY=Entity.getY(lovemodePigList[k]),jZ=Entity.getZ(lovemodePigList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodePigList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodePigList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodePigList[j],-24000);Entity.setAnimalAge(lovemodePigList[k],-24000);}}}}
function testSheepLove(){var pigLovers=lovemodePigList.length;var j,k;
for(j=0;j<sheepLovers;j++){for(k=j+1;k<sheepLovers;k++){
var jX=Entity.getX(lovemodeSheepList[j]),jY=Entity.getY(lovemodeSheepList[j]),jZ=Entity.getZ(lovemodeSheepList[j]);
var kX=Entity.getX(lovemodeSheepList[k]),jY=Entity.getY(lovemodeSheepList[k]),jZ=Entity.getZ(lovemodeSheepList[k]);
var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ);
if(xDist+yDist+zDist<=15){setPosition(lovemodeSheepList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ));
setPosition(lovemodeSheepList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2);
Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10);
Entity.setAnimalAge(lovemodeSheepList[j],-24000);Entity.setAnimalAge(lovemodeSheepList[k],-24000);}}}}
Download: Press reload/refresh if you really need download.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThis is my script though it is a simple one I think it is awsome. Tap a gold block with paper to spawn Creepypasta monsters.
download:https://www.dropbox.com/s/r24ibjxzd8yhcek/Creepypasta%20Mod.zip
function useItem(x,y,z,itemId,blockId,side)
{
if(itemId==339&&blockId==41)
{
spawnPigZombie(x, y, z, 286, "mob/Janethekiller.png");
spawnPigZombie(x, y, z, 283, "mob/Slenderman.png");
spawnPigZombie(x, y, z, 286, "mob/Masky.png");
spawnPigZombie(x, y, z, 276, "mob/Invisible Suit.png");
spawnPigZombie(x, y, z, 286, "mob/Eyeless Jack.png");
spawnPigZombie(x, y, z, 286, "mob/Jeffthekiller.png");
clientMessage("SHHHHH GO TO SLEEP");
setNightMode(14500,"environment/eclipse.png");
}
}
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumvar convertRads = Math.PI / 180; var autowalk = false; var vel = 0.5; function procCmd(cmd) { if (cmd.split(" ")[0] == "walk") autowalk = !autowalk; } function modTick() { if (!autowalk) return; var playerYaw = getYaw(); var deltaZ = vel * Math.cos(playerYaw * convertRads); var deltaX = vel * -1 * Math.sin(playerYaw * convertRads); var playerEnt = getPlayerEnt(); setVelX(playerEnt, deltaX); setVelZ(playerEnt, deltaZ); }Type /walk to start walking automatically and really fast.
lines:45lines including 9lines of comment
how to use:try stuffs with paper
var nx,ny,nz,np,cc; function useItem(x,y,z,itemId) {if(itemId==339&&!cc) {np=Player.getEntity(); setVelY(np,0/0); setVelX(np,0/0); setVelZ(np,0/0); cc=3;}} function destroyBlock(x,y,z) {var itemId=getCarriedItem(); if(itemId==339) {preventDefault(); Level.setTile(x,y,z,95);}} function attackHook(a,v) {var itemId=getCarriedItem(); if(itemId==339&&!cc) {np=v; cc=3; setVelY(np,0/0); setVelX(np,0/0); setVelZ(np,0/0);}} function modTick() {if(cc) cc--; if(cc==2) {nx=Entity.getX(np); ny=Entity.getY(np); nz=Entity.getZ(np); if(getTile(nx,ny,nz)==0) {setTile(nx,ny,nz,30); setPosition(np,nx,ny+0.2,nz);}} if(cc==1) setTile(nx,ny,nz,0); var itemId=getCarriedItem(); if(itemId==339&&!cc&&Math.random()*100<1) Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)} /*well, I love invisible kind of things, and I still have a lot of space to put some words... Who needs texture for invisiblity? Thats stupid.... BTW attackHook may not work propery on pig, chicken, spider but mostly it works because they jump a little bit when they get punched.... and invisible item may not work... I havent tested this script cuz I dont have phone now... if it doesnt works, just Let me know.*/FIXED!!(at least i hope)
ooops!
I missed () after that... lol
+it turned out that destroyBlock with setTile does not work as i expected
so i just added one line>>preventDefault();//this time i didnt missed () :->
Ill post the fixed ver tommorow. Thanks for testing
+It has super secret feature. AttackHook in some situation will activate it
Lines: 45
Description: as the name tells
Only fortune by using dirt on chest presently
This is custom experience level system. The MCPC system is too complicated.
Different from others: you need to collect enchantment points!
Code:
function newLevel(){ if(readData("getFortuneLevel")==null/*or whatever returned when undefined*/){ saveData("getFortuneLevel",0);//hope accept int } if(readData("xp")==null)saveData("xp",0); if(readData("nethered")==null)saveData("xp",0); //DONTDO function toggle(a){if(readData(a)=="true"){saveData(a, "false");}else{saveData(a, "true");}}//hope this thing is useless } function useItem(x,y,z,i,B){ if(b==247){ aE(6); saveData("nethered",1);} else if(b==54&&i==3){ if(readData("xp"<100))return; preventDefault(); saveData("getFortuneLevel",readData("getFortuneLevel")+1); saveData("xp",readData("xp")-100); } } function destroyBlock(x,y,z,s){ if(getCarriedItem!=285)return; addItemInventory(getTile(x,y,z),readData("getFortuneLevel")*Math.random()-1,getData(x,y,z)); } function aE(B){ saveData("xp",readData("xp")+B);//Connor4898 said accept any data but parameters can only be string? } function deathHook(a,v){ var vT=Entity.getEntityTypeId(v); if(Math.abs(Entity.getX(v)-Player.getX())+Math.abs(Entity.getZ(v)-Player.getZ())<322)return;//Even in MCPC you won't be able to get XP from that far. Can be changed when there is getTime(). switch(vT){ case 32:aE(3);break; case 33:aE(5);break; case 34:ae(4);break; case 35:aE(4);break; case 36:aE(6);break; case 10:aE(1);break; default:aE(2); } } function modTick(){ playerTime++;//what did I want to use this for? } function leaveGame(){ ; }//forgot what I wanted to add lolnot debugged.##################################################################################
Name: Mobs of Mobs
Lines: 33
Description: Spawns a mob of mobs according to the difficulty level every time a mob spawns. The difficulty level doesn't read the default in the settings. It is defined by /diff <int 0-5> in command. Default is 0.
ORIGINAL IDEA!
Code:
function newLevel(){ if(readData("noctDiff")==""/*or whatever returned if undefined*/){ saveData("noctDiff","0"); } } function entityAddedHook(e){ if(!(32<=Entity.getEntityTypeId(e)<=36))return; var coor1=Entity.getX(e); var coor2=Entity.getY(e); var coor3=Entity.getZ(e); var a=readData("noctDiff"); if(a=="1"){ var no=1; }else if(a=="2"){ var no=2; }else if(a=="3"){ var no=3; }else if(a=="4"){ var no=4; }else if(a=="5"){ var no=5; }else var no=0; while(no>0){ Entity.spawnMob(coor1,coor2,coor3,Entity.getEntityTypeId(e)); no--; } } function procCmd(c){ if(c.split(" ")[0]!="/diff")return; if(c.split(" ").length<2)printInvPar();return; var p = c.split(" ")[1]; if(p!="0"&&p!="1"&&p!="2"&&p!="3"&&p!="4"&&p!="5"){ printInvPar();return; }else saveData("noctDiff",p); } function printInvPar(){ print("Invalid parameters! Type /diff <int 0-5>"); } Debugged in Eclipse JavaScript plugin.#####################################################################################
Package: MCPCfx-port-to-MCPE-by-ModPE-Scripts
Name: Breeding
Description: tap wheat/seed/melon slices on farm animals and send them to love mode
Change log: Initial release
Upcoming: love mode animations
Lines: barely shinked into 48 lines from 63 lines without the first line (comment). If all comments are deleted, some lines are unreasonably long some might think, but met your written instructions <150 chars.
Code:
/*this script is more "reasonable" if the comments are not counted*/ var lovemodeChickenList,lovemodeCowList,lovemodePigList,lovemodeSheepList; function attackHook(a,v){var target=Entity.getEntityTypeId(v);if(Entity.getAnimalAge(v)!=0)clientMessage("only an adult can breed");return; if(getCarriedItem()==296/*wheat*/){ if(target==11/*cow*/)preventDefault();lovemodeCowList[lovemodeCowList.length]=v;addItemInventory(296,-1); if(target==13/*sheep*/)preventDefault();lovemodeSheepList[lovemodeSheepList.length]=v;addItemInventory(296,-1);} if(getCarriedItem()==295/*seed wheat*/&&target==10/*chicken*/){ preventDefault();lovemodeChickenList[lovemodeChickenList.length]=v;addItemInventory(295,-1);} if(getCarriedItem()==360/*melon sub carrots*/&&target==12/*pigs*/){ preventDefault();lovemodePigList[lovemodePigList.length]=v;addItemInventory(360,-1);}} function modTick(){rndTime++;//to avoid lagging because of the massive for loop. I think checking it every 5 seconds is the best. (there won't be a lot lovers, right?) if(rndTime%(20*(lovemodeChickenList.length))==0)testChickenLove();if(rndTime%(20*(lovemodeCowlist.length))==0)testCowLove(); if(rndTime%(20*(lovemodePiglist.length))==0)testPigLove();if(rndTime%(20*(lovemodeSheeplist.length))==0)testSheepLove();} function testChickenLove(){var chickenLovers=lovemodeChickenList.length;var j,k; for(j=0;j<chickenLovers;j++){for(k=j+1;k<chickenLovers;k++){ var jX=Entity.getX(lovemodeChickenList[j]),jY=Entity.getY(lovemodeChickenList[j]),jZ=Entity.getZ(lovemodeChickenList[j]); var kX=Entity.getX(lovemodeChickenList[k]),jY=Entity.getY(lovemodeChickenList[k]),jZ=Entity.getZ(lovemodeChickenList[k]); var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ); if(xDist+yDist+zDist<=15){setPosition(lovemodeChickenList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ)); setPosition(lovemodeChickenList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2); Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10); Entity.setAnimalAge(lovemodeChickenList[j],-24000);Entity.setAnimalAge(lovemodeChickenList[k],-24000);}}}} function testCowLove(){var cowLovers=lovemodeCowList.length;var j,k; for(j=0;j<cowLovers;j++){for(k=j+1;k<cowLovers;k++){ var jX=Entity.getX(lovemodeCowList[j]),jY=Entity.getY(lovemodeCowList[j]),jZ=Entity.getZ(lovemodeCowList[j]); var kX=Entity.getX(lovemodeCowList[k]),jY=Entity.getY(lovemodeCowList[k]),jZ=Entity.getZ(lovemodeCowList[k]); var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ); if(xDist+yDist+zDist<=15){setPosition(lovemodeCowList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ)); setPosition(lovemodeCowList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2); Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10); Entity.setAnimalAge(lovemodeCowList[j],-24000);Entity.setAnimalAge(lovemodeCowList[k],-24000);}}}} function testPigLove(){var pigLovers=lovemodePigList.length;var j,k; for(j=0;j<pigLovers;j++){for(k=j+1;k<pigLovers;k++){ var jX=Entity.getX(lovemodePigList[j]),jY=Entity.getY(lovemodePigList[j]),jZ=Entity.getZ(lovemodePigList[j]); var kX=Entity.getX(lovemodePigList[k]),jY=Entity.getY(lovemodePigList[k]),jZ=Entity.getZ(lovemodePigList[k]); var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ); if(xDist+yDist+zDist<=15){setPosition(lovemodePigList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ)); setPosition(lovemodePigList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2); Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10); Entity.setAnimalAge(lovemodePigList[j],-24000);Entity.setAnimalAge(lovemodePigList[k],-24000);}}}} function testSheepLove(){var pigLovers=lovemodePigList.length;var j,k; for(j=0;j<sheepLovers;j++){for(k=j+1;k<sheepLovers;k++){ var jX=Entity.getX(lovemodeSheepList[j]),jY=Entity.getY(lovemodeSheepList[j]),jZ=Entity.getZ(lovemodeSheepList[j]); var kX=Entity.getX(lovemodeSheepList[k]),jY=Entity.getY(lovemodeSheepList[k]),jZ=Entity.getZ(lovemodeSheepList[k]); var xDist=Math.abs(jX-kX),yDist=Math.abs(jY-kY),zDist=Math.abs(jZ-kZ); if(xDist+yDist+zDist<=15){setPosition(lovemodeSheepList[j],Math.min(jX,kX),Math.min(jY,kY),Math.min(jZ,kZ)); setPosition(lovemodeSheepList[k],Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2); Entity.spawnMob(Math.min(jX,kX)+xDist/2,Math.min(jY,kY)+yDist/2,Math.min(jZ,kZ)+zDist/2,10); Entity.setAnimalAge(lovemodeSheepList[j],-24000);Entity.setAnimalAge(lovemodeSheepList[k],-24000);}}}}#####################################################################################
Name: Wither
Description: As named, totally written on a phone (terrible)
Lines: Half ready but already 100. But you see part of it and you will understand:
Changelog: Pre-release
Code:
I think presently the most complex thing in javascript is the for loop and arrays and .length because you have to analyze a large amount of data and the possibilities for each datum.
But why can't others make their own cookies by achievementscraft.com directly, but from you?
also how do you guys learn java script
var nx,ny,nz,np,cc;
function useItem(x,y,z,itemId)
{if(itemId==339&&!cc)
{np=Player.getEntity;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);
cc=3;}}
function destroyBlock(x,y,z)
{var itemId=getCarriedItem();
if(itemId==339)
{Level.setTile(x,y,z,95);}}
function attackHook(a,v)
{var itemId=getCarriedItem();
if(itemId==339&&!cc)
{np=v;
cc=3;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);}}
function modTick()
{if(cc) cc--;
if(cc==2)
{nx=Entity.getX(np);
ny=Entity.getY(np);
nz=Entity.getZ(np);
if(getTile(nx,ny,nz)==0)
{setTile(nx,ny,nz,30);
setPosition(np,nx,ny+0.2,nz);}}
if(cc==1)
setTile(nx,ny,nz,0);
var itemId=getCarriedItem();
if(itemId==339&&!cc&&Math.random()*100<1)
Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)}
also how do you guys learn java script
var nx,ny,nz,np,cc;
function useItem(x,y,z,itemId)
{if(itemId==339&&!cc)
{np=Player.getEntity;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);
cc=3;}}
function destroyBlock(x,y,z)
{var itemId=getCarriedItem();
if(itemId==339)
{Level.setTile(x,y,z,95);}}
function attackHook(a,v)
{var itemId=getCarriedItem();
if(itemId==339&&!cc)
{np=v;
cc=3;
setVelY(np,0/0);
setVelX(np,0/0);
setVelZ(np,0/0);}}
function modTick()
{if(cc) cc--;
if(cc==2)
{nx=Entity.getX(np);
ny=Entity.getY(np);
nz=Entity.getZ(np);
if(getTile(nx,ny,nz)==0)
{setTile(nx,ny,nz,30);
setPosition(np,nx,ny+0.2,nz);}}
if(cc==1)
setTile(nx,ny,nz,0);
var itemId=getCarriedItem();
if(itemId==339&&!cc&&Math.random()*100<1)
Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)}
free cokie
I updated my post. Added the breeding mod in the MCPC-fx-port-to-MCPC-by-MCPC package. Fixed some bugs.
This quote contains a lot of & bugs. Please don't refer to this.
Sincerely. I didn't take any lessons or anything. I started reading javascript when I saw Treebl's post. I managed to learn javascript syntax (mostly) by myself, and recently used Eclipse javascript plugin to learn about Math class etc by myself. In fact, you can say I just copied and modified 500 ISE's scripts at first, those for loops that I hardly got to understand.
name:invisiblity on everything
lines:42lines
how to use:try stuffs with paper
(use it on ground, break block, attack mobs, just hold it)
var newX,newY,newZ,ent,timer; function useItem(x,y,z,itemId) {if(itemId==339&&!timer) {ent=Player.getEntity(); setVelY(ent,0/0); setVelX(ent,0/0); setVelZ(ent,0/0); timer=3;}} function destroyBlock(x,y,z) {var itemId=getCarriedItem(); if(itemId==339) {preventDefault(); Level.setTile(x,y,z,95);}} function attackHook(attacker,victim) {var itemId=getCarriedItem(); if(itemId==339&&!timer) {ent=victim; setVelY(ent,0/0); setVelX(ent,0/0); setVelZ(ent,0/0); timer=3;}} function modTick() {if(timer) timer--; if(timer==2) {newX=Entity.getX(ent); newY=Entity.getY(ent); newZ=Entity.getZ(ent); if(getTile(newX,newY,newZ)==0) {setTile(newX,newY,newZ,30); setPosition(ent,newX,newY+0.2,newZ);}} if(timer==1) setTile(newX,newY,newZ,0); var itemId=getCarriedItem(); if(itemId==339&&!timer&&Math.random()*400<1) Level.dropItem(Player.getX(),Player.getY(),Player.getZ(),3,95,0)} /*0/0 is NaN*/well, I love invisible kind of things
Who needs texture for invisiblity? Thats stupid....
+who can make skeleton invisible with just adding texture?
and who can make armored yourself invisible?
E.g. Name [ spoiler name="" ]desc [/spoiler] Name [ spoiler name="" ]desc [/spoiler]
//Creepig01's Second Entry For The "ModPE In 50 Lines Challenge" function useItem(x,y,z,itemId,blockId,side) { var gpx = getPlayerX(); var gpy = getPlayerY(); var gpz = getPlayerZ(); if(itemId==267) { setTile(gpx+10,gpy+10,gpz+10,12);//First line in "Hi" setTile(gpx+10,gpy+11,gpz+10,12); setTile(gpx+10,gpy+12,gpz+10,12); setTile(gpx+10,gpy+13,gpz+10,12); setTile(gpx+10,gpy+14,gpz+10,12);//End of the first line in "Hi" setTile(gpx+9,gpy+1,gpz+10,24);//Start of the middle line in the "H" in "Hi" setTile(gpx+8,gpy+1,gpz+10,24);//End of the middle line in the "H" in "Hi" setTile(gpx+7,gpy+10,gpz+10,12);//Start or the second line in "Hi" setTile(gpx+7,gpy+11,gpz+10,12); setTile(gpx+7,gpy+12,gpz+10,12); setTile(gpx+7,gpy+13,gpz+10,12); setTile(gpx+7,gpy+14,gpz+10,12);//End of the second line in "Hi" setTile(gpx+4,gpy+10,gpz+10,12);//Start of the "I" in "Hi" setTile(gpx+4,gpy+11,gpz+10,12); setTile(gpx+4,gpy+12,gpz+10,12); setTile(gpx+4,gpy+13,gpz+10,12); setTile(gpx+4,gpy+14,gpz+10,12);//End of the "I" in "Hi" } }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumCookies given.