SHARE
TWEET

Untitled

a guest Oct 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //////////////////
  2. function newLevel(){
  3.     clientMessage(ChatColor.GREEN+"MrGuy Lucky Block Mod activated!");
  4.     clientMessage(ChatColor.AQUA+"In SURVIVAL mode: Type /luckyguy in chat to add items");
  5.     var luncheon = false
  6. }
  7.  
  8. function procCmd(cmd)
  9. {
  10.     if(cmd=="luckyguy");
  11.     clientMessage("Item added, good luck and have fun !!!")
  12.     Player.addItemInventory(205, 1, 0)
  13.     Player.addItemInventory(206, 1, 0)
  14.     Player.addItemInventory(207, 1, 0)
  15.     Player.addItemInventory(208, 1, 0)
  16.     Player.addItemInventory(209, 1, 0)
  17.     Player.addItemInventory(210, 1, 0)
  18.     Player.addItemInventory(211, 1, 0)
  19.     Player.addItemInventory(212, 1, 0)
  20.     Player.addItemInventory(213, 1, 0)
  21.     Player.addItemInventory(214, 1, 0)
  22.     Player.addItemInventory(215, 1, 0)
  23. }
  24.  
  25. function leaveGame(){
  26. }
  27.  
  28. function modTick(x,y,z,i,b,s,d){
  29. useItem()
  30. if(i==601){
  31. setPosition(getPlayerEnt(),x,y+3,z)
  32. }
  33. if(i==602&&b==17){
  34. Level.destroyBlock(x,y,z,1)
  35. }
  36. if(i==604&&ini==1){
  37. ent = Level.spawnMob(x,y+4,z,inside,skin)
  38. Entity.setRenderType(ent,render)
  39. ini=0
  40. }
  41. if(i==601){
  42. setPosition(getPlayerEnt(),x,y+3,z)
  43. }
  44.  
  45. if(getCarriedItem()==618){
  46. destroyBlock();
  47. }
  48.  
  49. if(i==602&&b==17){
  50. Level.destroyBlock(x,y,z,1)
  51. }
  52.  
  53. if(i==604&&ini==1){
  54. ent = Level.spawnMob(x,y+4,z,inside,skin)
  55. Entity.setRenderType(ent,render)
  56. ini=0
  57. }
  58. fly()
  59. rain()
  60. web()
  61. if(getCarriedItem()==603&&Level.getGameMode()==0){
  62. Player.setCanFly(1)
  63. }else if(getCarriedItem()!=603&&Level.getGameMode()==0){
  64.          Player.setCanFly(0)
  65. }
  66. if(getCarriedItem()==605){
  67. Entity.addEffect(getPlayerEnt(),MobEffect.waterBreathing,1*20,2)
  68. Entity.addEffect(getPlayerEnt(),MobEffect.nightVision,1*20,2)
  69. }
  70.  
  71. }
  72. function attackHook(e,t){
  73. Entity.getEntityTypeId(t)<64&&(mainAttackHook(e,t),attackHook1(e,t))}
  74. function attackHook1(e,t){iD1=Player.getCarriedItem(),dE1=swords[swords.indexOf(Player.getCarriedItem())+1],dY1=swords[swords.indexOf(Player.getCarriedItem())+2],-1!=swordsId.indexOf(Player.getCarriedItem())&&Entity.getHealth(t)>dE1&&Entity.getHealth(t)>0&&(Entity.setHealth(t,Entity.getHealth(t)-dE1),Item.setDurability(iD1,dY1)),-1!=swordsId.indexOf(Player.getCarriedItem())&&Entity.getHealth(t)<=dE1&&Entity.getHealth(t)>0&&(Entity.setHealth(t,1),Item.setDurability(iD1,dY1))}
  75. var swords=[],swordsId=[],iD1,dE1,dY1,aY1,aR1;Item.setSword=function(e,t,s,i,a,r){ModPE.setItem(e,t,s,i,1),Item.setMaxDamage(e,a),Item.setHandEquipped(e,!0),swordsId.push(e),swords.push(e),swords.push(r-2),swords.push(a)}
  76. Item.setDurability=function(e,t){Player.getCarriedItem()==e&&Entity.setCarriedItem(Player.getEntity(),e,Player.getCarriedItemCount(),Player.getCarriedItemData()+1),Player.getCarriedItem()==e&&Player.getCarriedItemData()>t&&(Entity.setCarriedItem(Player.getEntity(),0,0,0),Level.playSoundEnt(Player.getEntity(),"random.break",10))};
  77. function mainAttackHook(a,v){
  78. if(getCarriedItem()==600){
  79. knockback(v,4)
  80. Entity.setFireTicks(v,100)
  81. }
  82. if(getCarriedItem()==601){
  83. knockback(v,2)
  84. }
  85. if(getCarriedItem()==602){
  86. knockback(v,6)
  87. Entity.setFireTicks(v,100)
  88. }
  89. if(getCarriedItem()==603){
  90. setVelY(v,1)
  91. knockback(v,10)
  92. }
  93.  if(getCarriedItem()==616){
  94. knockback(v,1)
  95. Entity.setFireTicks(v,250)
  96. }
  97.  if(getCarriedItem()==617){
  98. knockback(v,250)
  99. Entity.setFireTicks(v,0)
  100. }
  101. if(getCarriedItem()==614){
  102. Entity.addEffect(v,MobEffect.movementSlowdown,5*20,10)
  103. }
  104. if(getCarriedItem()==604&&ini==0){
  105. inside = Entity.getEntityTypeId(v)
  106. skin = Entity.getMobSkin(v)
  107. render = Entity.getRenderType(v)
  108. ent = v
  109. Entity.remove(v)
  110.  
  111. ini=1
  112. }
  113. if(getCarriedItem()==605){
  114. Entity.addEffect(v,MobEffect.movementSlowdown,5*20,5)
  115. }
  116. if(getCarriedItem()==606){
  117. knockback(v,6)
  118. Entity.setFireTicks(v,100)
  119. }
  120. if(getCarriedItem()==607){
  121. Entity.addEffect(v,MobEffect.poison,5*20,5)
  122. }
  123. if(getCarriedItem()==615){
  124. Entity.addEffect(v,MobEffect.poison,5*20,10)
  125. }
  126. }
  127. var ent
  128. var render
  129. var skin
  130. var inside = 0
  131. var ini = 0
  132. //Lucky Stuffs
  133. Item.setSword(600,"Lucky Sword",0,"Lucky Sword",1000,10);
  134. Item.setSword(601,"ender_sword",0,"Ender Sword",300,10);
  135. Item.setSword(602,"fire_axe",0,"Fire Axe",800,15);
  136. Item.setSword(603,"air_lance",0,"Air Lance",400,8);
  137. Item.setSword(604,"end_sword",0,"End Sword",500,12);
  138. Item.setSword(605,"water_trident",0,"Water Trident",800,10);
  139. Item.setSword(606,"fire_sword",0,"Fire Sword",800,20);
  140. Item.setSword(607,"poison_sword",0,"Poison Sword",300,20);
  141. Item.setSword(608,"lucky_wand",0,"Lucky Wand",300,10);
  142. Item.setSword(609,"lucky_red_blade",0,"Red Lucky Sword",300,10);
  143. Item.setSword(610,"cross_bow",0,"Earth Rod",300,10);
  144. ModPE.setItem(611,"air_shield",0,"Air Shield");
  145. Item.setSword(612,"wither_key",0,"Wither Rod",300,10);
  146. ModPE.setItem(613,"spawn_Cyclops",0,"Spawn Cyclops");
  147. Item.setSword(614,"water_orb",0,"Water Orb",300,10);
  148. Item.setSword(615,"poison_orb",0,"Poison Orb",300,10);
  149. Item.setSword(616,"fire_orb",0,"Fire Orb",300,10);
  150. Item.setSword(617,"wither_orb",0,"Orb of Darkness",300,10);
  151. Item.setSword(618,"lucky_wand",1,"Lucky Miner",300,10);
  152. Player.addItemCreativeInv(600);
  153. Player.addItemCreativeInv(601);
  154. Player.addItemCreativeInv(602);
  155. Player.addItemCreativeInv(603);
  156. Player.addItemCreativeInv(604);
  157. Player.addItemCreativeInv(605);
  158. Player.addItemCreativeInv(606);
  159. Player.addItemCreativeInv(607);
  160. Player.addItemCreativeInv(608);
  161. Player.addItemCreativeInv(609);
  162. Player.addItemCreativeInv(610);
  163. Player.addItemCreativeInv(611);
  164. Player.addItemCreativeInv(612);
  165. Player.addItemCreativeInv(614);
  166. Player.addItemCreativeInv(615);
  167. Player.addItemCreativeInv(616);
  168. Player.addItemCreativeInv(617);
  169. Player.addItemCreativeInv(618);
  170. Item.addShapedRecipe(618,1,0,["ooo","olo","ooo"],["o",266,0,"l",264,0]);
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179. var cd = 100
  180. var fl = false
  181. function fly(){
  182. if(fl==true){
  183. cd--;
  184. ModPE.showTipMessage("Launching In: "+cd)
  185.  
  186. }
  187. if(cd<=0){
  188. setVelY(getPlayerEnt(),7)
  189. cd = 100
  190. fl=false
  191. }
  192. }
  193. var zz
  194. var xx
  195. var yy
  196. var r = false
  197. var rcd = 200
  198. var Id
  199. function rain(){
  200. if(r==true){
  201. rcd--;
  202. Level.dropItem(xx,yy+2,zz,3,Id,1,0)
  203. }
  204. if(rcd<=0){
  205. r= false
  206. rcd = 200
  207. }
  208. }
  209. var sandy = false
  210. var scd = 200
  211. function web(){
  212. if(sandy==true){
  213. scd--;
  214. setTile(xx,yy,zz,30)
  215. setTile(xx,yy+10,zz,12)
  216. }
  217. if(scd<=0){
  218. sandy=false
  219. scd = 200
  220. }
  221. }
  222.  
  223. function Particle(type,x,y,z){
  224. Level.addParticle(type,x+Math.random() * 3-2,y,z+Math.random() * 3-2,0,0,0,50);
  225. Level.addParticle(type,x+Math.random() * 3-2,y,z+Math.random() * 3-2,0,0,0,50);
  226. Level.addParticle(type,x+Math.random() * 3-2,y,z+Math.random() * 3-2,0,0,0,50);
  227. Level.addParticle(type,x+Math.random() * 3-2,y,z+Math.random() * 3-2,0,0,0,50);
  228. Level.addParticle(type,x+Math.random() * 3-2,y,z+Math.random() * 3-2,0,0,0,50);
  229. Level.addParticle(type,x+Math.random() * 3-2,y,z+Math.random() * 3-2,0,0,0,50);
  230. }
  231.  
  232.  
  233.  
  234.  
  235. Block.defineBlock(205, "Black Lucky Block",[["lucky_block",0]],20,0);
  236. Block.setDestroyTime(205,0.1);
  237. Player.addItemCreativeInv(205);
  238. Item.addShapedRecipe(205,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  239.  
  240.  
  241. Block.defineBlock(206, "Classic Lucky Block",[["lucky_block",1]],20,0);
  242. Block.setDestroyTime(206,0.1);
  243. Player.addItemCreativeInv(206);
  244. Item.addShapedRecipe(206,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  245.  
  246. Block.defineBlock(207, "Green Lucky Block",[["lucky_block",2]],20,0);
  247. Block.setDestroyTime(207,0.1);
  248. Player.addItemCreativeInv(207);
  249. Item.addShapedRecipe(207,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  250.  
  251. Block.defineBlock(208, "Orange Lucky Block",[["lucky_block",3]],20,0);
  252. Block.setDestroyTime(208,0.1);
  253. Player.addItemCreativeInv(208);
  254. Item.addShapedRecipe(208,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  255.  
  256. Block.defineBlock(209, "Red Lucky Block",[["lucky_block",4]],20,0);
  257. Block.setDestroyTime(209,0.1);
  258. Player.addItemCreativeInv(209);
  259. Item.addShapedRecipe(209,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  260.  
  261.  
  262. Block.defineBlock(210, "Blue Lucky Block",[["lucky_block",5]],20,0);
  263. Block.setDestroyTime(210,0.1);
  264. Player.addItemCreativeInv(210);
  265. Item.addShapedRecipe(210,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  266.  
  267. Block.defineBlock(211, "Brown Lucky Block",[["lucky_block",6]],20,0);
  268. Block.setDestroyTime(211,0.1);
  269. Player.addItemCreativeInv(211);
  270. Item.addShapedRecipe(211,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  271.  
  272. Block.defineBlock(212, "Purple Lucky Block",[["lucky_block",7]],20,0);
  273. Block.setDestroyTime(212,0.1);
  274. Player.addItemCreativeInv(212);
  275. Item.addShapedRecipe(212,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  276.  
  277. Block.defineBlock(213, "Sky Lucky Block",[["lucky_block",8]],20,0);
  278. Block.setDestroyTime(213,0.1);
  279. Player.addItemCreativeInv(213);
  280. Item.addShapedRecipe(213,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  281.  
  282. Block.defineBlock(214, "Nether Lucky Block",[["lucky_block",9]],20,0);
  283. Block.setDestroyTime(214,0.1);
  284. Player.addItemCreativeInv(214);
  285. Item.addShapedRecipe(214,1,0,["ooo","olo","ooo"],["o",266,0,"l",1,0]);
  286.  
  287. Block.defineBlock(215, "Portal Lucky Block",[["lucky_block",10]],20,0);
  288. Item.addShapedRecipe(215,1,0,["olo","olo","olo"],["o",49,0,"l",206,0]);
  289. Player.addItemCreativeInv(215);
  290.  
  291.  
  292.  
  293.  
  294. function destroyBlock(x,y,z,side,i,b,s,d){
  295.  
  296. if(i==601){
  297. setPosition(getPlayerEnt(),x,y+3,z)
  298. }
  299.  
  300. if(i==602&&b==17){
  301. Level.destroyBlock(x,y,z,1)
  302. }
  303.  
  304. if(i==604&&ini==1){
  305. ent = Level.spawnMob(x,y+4,z,inside,skin)
  306. Entity.setRenderType(ent,render)
  307. ini=0
  308. }
  309.  
  310. if(getCarriedItem()==618){
  311.  
  312.         var random = Math.floor((Math.random()*63)+1);
  313. var effect = Entity.addEffect
  314. var me = MobEffect
  315. var p = getPlayerEnt()
  316. if(Level.getTile(x,y,z)) {
  317. var drop = Level.dropItem
  318. var c = clientMessage
  319.  
  320. switch(random){
  321.  
  322. case 1:
  323. c("Hmm.. seems Fishy")
  324. diamondTroll(x,y,z)
  325. break;
  326. case 2:
  327. c("You Look Hot in there")
  328. lava(Player.getX(),Player.getY(),Player.getZ())
  329. destroy(x,y,z)
  330. break;
  331. case 3:
  332.  
  333. c("Are you in some kind of Planet?!!")
  334. hSphere(Player.getX(),Player.getY()+30,Player.getZ())
  335. destroy(x,y,z)
  336. setPosition(getPlayerEnt(),Player.getX(),Player.getY()+50,Player.getZ())
  337. break;
  338. case 4:
  339.  
  340. destroy(x,y,z)
  341. fl=true
  342. break;
  343.  
  344. case 5:
  345. c("Let it Rain Iron")
  346. destroy(x,y,z)
  347. r=true
  348. Id = 265
  349. xx = Player.getX()
  350. yy = Player.getY()
  351. zz = Player.getZ()
  352. break;
  353. case 6:
  354. c("Whats That Above There??? Lets Jump!!")
  355. sky(x,y,z)
  356. effect(p,me.jump,30*20,40)
  357. destroy(x,y,z)
  358. break;
  359.  
  360. case 7:
  361. c("A Tree?!*yu dont say??*")
  362. tree(x,y,z)
  363.  
  364. destroy(x,y,z)
  365. break;
  366.  
  367. case 8:
  368. c("Sand Castle Of Doom!!")
  369. sand(x,y,z)
  370.  
  371. destroy(x,y,z)
  372. break;
  373.  
  374. case 9:
  375. c("The More You Know")
  376. destroy(x,y,z)
  377. sandy = true
  378. xx = x
  379. yy = y
  380. zz = z
  381. break;
  382.  
  383. case 10:
  384. c("Let it Rain Gold")
  385. destroy(x,y,z)
  386. r=true
  387. Id = 266
  388. xx = Player.getX()
  389. yy = Player.getY()
  390. zz = Player.getZ()
  391. break;
  392.  
  393. case 11:
  394. c("Chocolate Rain!!!*kinda*")
  395. destroy(x,y,z)
  396. r=true
  397. Id = 263
  398. xx = Player.getX()
  399. yy = Player.getY()
  400. zz = Player.getZ()
  401. break;
  402. case 12:
  403. c("Ohhh Diamond Gear")
  404. type = 310
  405. typeend = 314
  406. geardrop(x,y,z)
  407.  
  408. destroy(x,y,z)
  409. break;
  410. case 13:
  411. c("Ohhh Shiny Gear!")
  412. type = 314
  413. typeend = 318
  414. geardrop(x,y,z)
  415. destroy(x,y,z)
  416. break;
  417. case 14:
  418. c("Ugh Leather")
  419. type = 298
  420. typeend = 302
  421. geardrop(x,y,z)
  422. destroy(x,y,z)
  423. break;
  424. case 15:
  425. c("Nice. Chain!")
  426. type = 302
  427. typeend = 306
  428. geardrop(x,y,z)
  429. destroy(x,y,z)
  430. break;
  431. case 16:
  432. c("Orayt Iron!")
  433. type = 306
  434. typeend = 310
  435. geardrop(x,y,z)
  436. destroy(x,y,z)
  437. break;
  438. case 17:
  439. c("Wow You just got the Big Dungeon!! Go up for your Reward")
  440. destroy(x,y,z)
  441. dung(x,y,z)
  442. break;
  443. case 18:
  444. c("An Apple A Day Would Keep The Doctor Away")
  445. destroy(x,y,z)
  446. drop(x,y,z,1,260,1,0)
  447. break;
  448. case 19:
  449. c("Hungry???")
  450. destroy(x,y,z)
  451. drop(x,y,z,1,354,1,0)
  452. break;
  453. case 20:
  454. c("Gapples??!!")
  455. destroy(x,y,z)
  456. drop(x,y,z,1,322,5,0)
  457. break;
  458. case 21:
  459. c("Porkchop!!")
  460. destroy(x,y,z)
  461. drop(x,y,z,1,320,10,0)
  462. break;
  463. case 22:
  464. c("Kill Your worst Enemy!!!!")
  465. destroy(x,y,z)
  466. drop(x,y,z,1,276,10,0)
  467. break;
  468. case 23:
  469. c("Kill Your worst Enemy!!!!")
  470. destroy(x,y,z)
  471. drop(x,y,z,1,276,10,0)
  472. break;
  473. case 24:
  474. destroy(x,y,z)
  475. setPosition(getPlayerEnt(),x,y+30,z)
  476. effect(getPlayerEnt(),me.damageResistance,10*20,4)
  477. c("I Believe I Can Fly!!!")
  478. break;
  479. case 25:
  480. destroy(x,y,z)
  481. setPosition(getPlayerEnt(),x,y+30,z)
  482. c("I Believe I Can't Fly!!!")
  483. break;
  484. case 26:
  485. c("Mooooooo")
  486. destroy(x,y,z)
  487. cowSpawn(x,y,z)
  488. cowSpawn(x,y,z)
  489. break;
  490. case 27:
  491. c("Quack!! I mean Bok bok bok bok...")
  492. destroy(x,y,z)
  493. randomSpawn(x,y,z,10)
  494. break;
  495. case 28:
  496. c("I think i know what to do")
  497. destroy(x,y,z)
  498. drop(x,y,z,1,259,2,0)
  499. randomSpawn(x,y,z,14)
  500. break;
  501. case 29:
  502. c("I see some walking beds")
  503. destroy(x,y,z)
  504.  
  505. randomSpawn(x,y,z,13)
  506. break;
  507. case 30:
  508. c("Snow Golem Army")
  509. destroy(x,y,z)
  510. randomSpawn(x,y,z,21)
  511. break;
  512. case 31:
  513. c("Bob Army!")
  514. destroy(x,y,z)
  515. randomSpawn(x,y,z,32)
  516. randomSpawn(x,y,z,32)
  517. randomSpawn(x,y,z,32)
  518. break;
  519. case 32:
  520. c("Joey Party!")
  521. destroy(x,y,z)
  522. randomSpawn(x,y,z,34)
  523. randomSpawn(x,y,z,34)
  524. randomSpawn(x,y,z,34)
  525. break;
  526. case 33:
  527. c("Creeper Creeps")
  528. destroy(x,y,z)
  529. randomSpawn(x,y,z,33)
  530. randomSpawn(x,y,z,33)
  531. randomSpawn(x,y,z,33)
  532. break;
  533. case 34:
  534. c("Run!!!")
  535. destroy(x,y,z)
  536. effect(p,me.blindness,10*20,4)
  537. Level.setTime(14000);
  538. randomSpawn(x,y,z,33)
  539. randomSpawn(x,y,z,34)
  540. randomSpawn(x,y,z,35)
  541. randomSpawn(x,y,z,32)
  542. randomSpawn(x,y,z,36)
  543. randomSpawn(x,y,z,33)
  544. randomSpawn(x,y,z,34)
  545. randomSpawn(x,y,z,35)
  546. randomSpawn(x,y,z,32)
  547. randomSpawn(x,y,z,36)
  548. break;
  549. case 35:
  550. c("Nooooooooo!!!")
  551. destroy(x,y,z)
  552. randomSpawn(x,y,z,41)
  553. break;
  554. case 36:
  555. c("Ohh nothing?")
  556. destroy(x,y,z)
  557. randomSpawn(x,y+30,z,65)
  558. break;
  559. case 37:
  560. c("Ok. looke like your dead?")
  561. destroy(x,y,z)
  562. water(Player.getX(),Player.getY()-1,Player.getZ())
  563. break;
  564. case 38:
  565. c("Hello?")
  566. destroy(x,y,z)
  567. explode(Player.getX(),Player.getY()+1,Player.getZ(),4)
  568. break;
  569.  
  570. case 39:
  571. c("Just Do it!")
  572. destroy(x,y,z)
  573. anvil(Player.getX(),Player.getY()+1,Player.getZ())
  574. break;
  575. case 40:
  576. c("Trololololo")
  577. destroy(x,y,z)
  578. obs(Player.getX(),Player.getY()-1,Player.getZ())
  579. break;
  580. case 41:
  581. c("Bye.")
  582. destroy(x,y,z)
  583. hole(Player.getX(),Player.getY(),Player.getZ())
  584. break;
  585. case 42:
  586. c("Ahhh.. Goodluck!")
  587. destroy(x,y,z)
  588. webhole(Player.getX(),Player.getY(),Player.getZ())
  589. break;
  590. case 43:
  591. c("Bob?!!!")
  592. destroy(x,y,z)
  593. var bob = Level.spawnMob(x,y+2,z,36,"mob/zombie_diamond.png")
  594. Entity.setMaxHealth(bob,200)
  595. Entity.setNameTag(bob,"Friendly Bob. Punch to Be by your side")
  596. Entity.setCarriedItem(bob,276,1,0)
  597. Entity.setHealth(bob,200)
  598. effect(bob,me.damageBoost,10000*8000,1)
  599. effect(bob,me.movementSpeed,10000*8000,4)
  600. break;
  601. case 44:
  602. c("Joey??")
  603. destroy(x,y,z)
  604. var bob = Level.spawnMob(x,y+2,z,34,"mob/skeleton_4.png")
  605. Entity.setMaxHealth(bob,200)
  606. Entity.setNameTag(bob,"Joey")
  607. Entity.setCarriedItem(bob,276,1,0)
  608. Entity.setHealth(bob,200)
  609. effect(bob,me.damageBoost,10000*8000,1)
  610. effect(bob,me.movementSpeed,10000*8000,4)
  611. effect(bob,me.fireResistance,10000*8000,4)
  612. break;
  613. case 45:
  614. c("Run!!")
  615. destroy(x,y,z)
  616. var bob = Level.spawnMob(x,y+2,z,32,"mob/cyclops.png")
  617. Entity.setMaxHealth(bob,20)
  618. Entity.setNameTag(bob,"Cyclops")
  619. Entity.setCarriedItem(bob,276,1,0)
  620. Entity.setHealth(bob,20)
  621. effect(bob,me.damageBoost,10000*8000,3)
  622. effect(bob,me.movementSpeed,10000*8000,4)
  623. effect(bob,me.fireResistance,10000*8000,4)
  624. break;
  625. case 46:
  626. c("Bob On Steroids?!!")
  627. destroy(x,y,z)
  628. var bob = Level.spawnMob(x,y+2,z,36,"mob/zombie_diamond.png")
  629. Entity.setMaxHealth(bob,20)
  630. Entity.setNameTag(bob,"Bob on Steroids")
  631. Entity.setCarriedItem(bob,276,1,0)
  632. Entity.setHealth(bob,20)
  633. effect(bob,me.damageBoost,10000*8000,1)
  634. effect(bob,me.movementSpeed,10000*8000,20)
  635. effect(bob,me.fireResistance,10000*8000,4)
  636. break;
  637. case 47:
  638. c("Oh Ma Gahd!!")
  639. destroy(x,y,z)
  640. drop(x,y,z,1,600,1,0)
  641. break;
  642. case 48:
  643. c("Tap The Ground With this.")
  644. destroy(x,y,z)
  645. drop(x,y,z,1,601,1,0)
  646. break;
  647. case 49:
  648. c("What is that?")
  649. destroy(x,y,z)
  650. drop(x,y,z,1,602,1,0)
  651. break;
  652. case 50:
  653. c("This Is A Very Unique Sword Tap A Mob/Animal With This And Tap the ground next and see What Happens")
  654. destroy(x,y,z)
  655. drop(x,y,z,1,604,1,0)
  656. break;
  657.  case 51:
  658. c("Air Stuffs!!")
  659. destroy(x,y,z)
  660. drop(x,y,z,1,603,1,0)
  661. drop(x,y,z,1,611,1,0)
  662. break;
  663. case 52:
  664. c("The Trident OF Neptune!")
  665. destroy(x,y,z)
  666. drop(x,y,z,1,605,1,0)
  667. break;
  668. case 53:
  669. c("Time to cook some meat")
  670. destroy(x,y,z)
  671. drop(x,y,z,1,606,1,0)
  672. break;
  673. case 54:
  674. c("A Very Really Poison Sword(Yes i Grammar very well)")
  675. destroy(x,y,z)
  676. drop(x,y,z,1,607,1,0)
  677. break;
  678. case 55:
  679. c("Cool,a Lucky wand")
  680. destroy(x,y,z)
  681. drop(x,y,z,1,608,1,0)
  682. break;
  683. case 56:
  684. c("What do I do with this?")
  685. destroy(x,y,z)
  686. drop(x,y,z,1,609,1,0)
  687. break;
  688. case 57:
  689. c("┬┐Where did this come from?")
  690. destroy(x,y,z)
  691. drop(x,y,z,1,610,1,0)
  692. break;
  693. case 58:
  694. c("Ohh fancy")
  695. destroy(x,y,z)
  696. drop(x,y,z,1,611,1,0)
  697. break;
  698. case 59:
  699. c("Its black,very black")
  700. destroy(x,y,z)
  701. drop(x,y,z,1,612,1,0)
  702. break;
  703. case 60:
  704. c("Is it a circle?Is it some sort of 1000 sided shape?")
  705. destroy(x,y,z)
  706. drop(x,y,z,1,614,1,0)
  707. break;
  708. case 61:
  709. c("A ball of poison just for you")
  710. destroy(x,y,z)
  711. drop(x,y,z,1,615,1,0)
  712. break;
  713. case 62:
  714. c("Hot,Hot,Hot")
  715. destroy(x,y,z)
  716. drop(x,y,z,1,616,1,0)
  717. break;
  718. case 63:
  719. c("...")
  720. destroy(x,y,z)
  721. drop(x,y,z,1,617,1,0)
  722. break;
  723. }
  724. }
  725. }
  726. }
  727.  
  728. function hole(x,y,z){
  729. var set = setTile
  730. for(i = x-2; i<x+3;i++){
  731.                 for(j = z-2; j<z+3;j++){
  732. for(k = y-200; k<y+1;k++){
  733. set(i,k,j,0)
  734. }
  735. }
  736. }
  737. }
  738. function webhole(x,y,z){
  739. var set = setTile
  740. for(i = x-2; i<x+3;i++){
  741.                 for(j = z-2; j<z+3;j++){
  742. for(k = y-200; k<y+1;k++){
  743. set(i,k,j,30)
  744. }
  745. }
  746. }
  747. }
  748. function anvil(x,y,z){
  749. var set = setTile
  750. for(i = x-5; i<x+6;i++){
  751.                 for(j = z-5; j<z+6;j++){
  752.  
  753. set(i,y+10,j,145)
  754.  
  755. }
  756. }
  757. }
  758. function knockback(v,p){
  759. if(getYaw() < 0){
  760.             var hit = getYaw()+90;
  761.             for(go=0; hit<0; go++)
  762.             {
  763.                 hit+= 360;
  764.             }
  765.             x = Math.cos(hit*(Math.PI/180));
  766.             z = Math.sin(hit*(Math.PI/180));
  767.             setVelX(v, x*p);
  768.             setVelY(v, 1);
  769.             setVelZ(v, z*p);
  770.         }
  771.         else if(getYaw() > 0 && getYaw() < 360)
  772.         {
  773.             var hit = getYaw()+90;
  774.             XVel = Math.cos(hit*(Math.PI/180));
  775.             ZVel= Math.sin(hit*(Math.PI/180));
  776.             setVelX(v, XVel*p);
  777.             setVelY(v, 1);
  778.             setVelZ(v, ZVel*p);
  779.         }
  780.         else if( getYaw() >= 360)
  781.         {
  782.             var hit= getYaw()+90;
  783.             for(go=0; hit>=360; go++)
  784.             {
  785.                 hit -= 360;
  786.             }
  787.             XVel = Math.cos(hit*(Math.PI/180));
  788.             ZVel = Math.sin(hit*(Math.PI/180));
  789.             setVelX(v, XVel*p);
  790.             setVelY(v, 1);
  791.             setVelZ(v, ZVel*p);
  792.          
  793.     }
  794.  
  795. }
  796.  
  797. function water(x,y,z){
  798. var set = setTile
  799. for(i = x-5; i<x+6;i++){
  800.                 for(j = z-5; j<z+6;j++){
  801. for(k = y-0; k<y+11;k++){
  802. set(i,y,j,49)
  803. set(x-5,k,j,49)
  804. set(x+5,k,j,49)
  805. set(i,k,z-6,49)
  806. set(i,k,z+6,49)
  807. //2
  808. set(i,y+10,j,10)
  809. }
  810. }
  811. }
  812. }
  813.  
  814. function obs(x,y,z){
  815. var set = setTile
  816. for(i = x-5; i<x+6;i++){
  817.                 for(j = z-5; j<z+6;j++){
  818. for(k = y-0; k<y+11;k++){
  819. set(i,y,j,7)
  820. set(x-5,k,j,7)
  821. set(x+5,k,j,7)
  822. set(i,k,z-6,7)
  823. set(i,k,z+6,7)
  824. //2
  825. set(i,y+10,j,7)
  826. }
  827. }
  828. }
  829. }
  830.  
  831.  
  832. function randomSpawn(x,y,z,e){
  833. Level.spawnMob(x,y,z,e)
  834. Level.spawnMob(x,y,z,e)
  835. Level.spawnMob(x,y,z,e)
  836. Level.spawnMob(x,y,z,e)
  837. Level.spawnMob(x,y,z,e)
  838. Level.spawnMob(x,y,z,e)
  839. Level.spawnMob(x,y,z,e)
  840. Level.spawnMob(x,y,z,e)
  841. Level.spawnMob(x,y,z,e)
  842. Level.spawnMob(x,y,z,e)
  843. Level.spawnMob(x,y,z,e)
  844. Level.spawnMob(x,y,z,e)
  845. Level.spawnMob(x,y,z,e)
  846. Level.spawnMob(x,y,z,e)
  847. Level.spawnMob(x,y,z,e)
  848. Level.spawnMob(x,y,z,e)
  849. }
  850.  
  851. function cowSpawn(x,y,z){
  852. Level.spawnMob(x,y,z,11)
  853. Level.spawnMob(x,y,z,11)
  854. Level.spawnMob(x,y,z,11)
  855. Level.spawnMob(x,y,z,11)
  856. Level.spawnMob(x,y,z,11)
  857. Level.spawnMob(x,y,z,11)
  858. Level.spawnMob(x,y,z,11)
  859. Level.spawnMob(x,y,z,11)
  860. Level.spawnMob(x,y,z,11)
  861. Level.spawnMob(x,y,z,11)
  862. Level.spawnMob(x,y,z,11)
  863. Level.spawnMob(x,y,z,11)
  864. Level.spawnMob(x,y,z,11)
  865. Level.spawnMob(x,y,z,11)
  866. Level.spawnMob(x,y,z,11)
  867. Level.spawnMob(x,y,z,11)
  868. Level.spawnMob(x,y,z,11)
  869. Level.spawnMob(x,y,z,11)
  870.  
  871. }
  872.  
  873.  
  874.  
  875.  
  876. function dung(x,y,z){
  877. var set = setTile
  878. for(i = x-5; i<x+6;i++){
  879.                 for(j = z-5; j<z+6;j++){
  880. for(k = y-0; k<y+11;k++){
  881. set(i,y,j,1)
  882.  
  883.  
  884. set(x,y+1,z,52)
  885. Level.setSpawnerEntityType(x,y+1,z,32)
  886. set(x+1,y+1,z,205)
  887. set(x-1,y+1,z,205)
  888. set(x,y+1,z+1,205)
  889. set(x,y+1,z-1,205)
  890.  
  891.  
  892. set(x,y+11,z,52)
  893. Level.setSpawnerEntityType(x,y+11,z,32)
  894. set(x+1,y+11,z,205)
  895. set(x-1,y+11,z,205)
  896. set(x,y+11,z+1,205)
  897. set(x,y+11,z-1,205)
  898.  
  899.  
  900.  
  901. set(x-5,k,j,1)
  902. set(x+5,k,j,1)
  903. set(i,k,z-6,1)
  904. set(i,k,z+6,1)
  905. //2
  906. set(i,y+10,j,1)
  907. set(x-5,k+11,j,1)
  908. set(x+5,k+11,j,1)
  909. set(i,k+11,z-6,1)
  910. set(i,k+11,z+6,1)
  911. set(i,y+20,j,1)
  912. set(i,y+21,j,57)
  913.  
  914.  
  915. }
  916. }
  917. }
  918.  
  919. }
  920.  
  921. var type
  922. var typeend
  923. function geardrop(x,y,z){
  924. for(var i = type;i<typeend;i++){
  925. Level.dropItem(x,y,z,1,i,1,0)
  926. }
  927. }
  928. function destroy(x,y,z){
  929. setTile(x,y,z,0)
  930. preventDefault()
  931. }
  932.  
  933.  
  934. function diamondTroll(x,y,z){
  935. var set = setTile
  936. for(i = x-1; i<x+2;i++){
  937.                 for(j = z-1; j<z+2;j++){
  938. set(i,y,j,57)
  939. set(i,y+1,j,57)
  940. set(i,y+2,j,57)
  941. Level.spawnMob(x,y+1,z,65)
  942.  
  943. }
  944. }
  945. }
  946.  
  947. function lava(x,y,z){
  948. var set = setTile
  949. for(i = x-2; i<x+3;i++){
  950.                 for(j = z-2; j<z+3;j++){
  951. for(k = y-0; k<y+5;k++){
  952. set(i,y+4,j,10)
  953. set(i,y-1,j,49)
  954. set(x+1,k,z,101)
  955. set(x-1,k,z,101)
  956. set(x+1,k,z+1,101)
  957. set(x+1,k,z-1,101)
  958. set(x-1,k,z+1,101)
  959. set(x-1,k,z-1,101)
  960. set(x,k,z-1,101)
  961. set(x,k,z+1,101)
  962. }
  963. }
  964. }
  965. }
  966.  
  967.  
  968. var radius
  969. function hSphere(x,y,z){
  970. var voxelBlockId = 1
  971. var voxelDiameter = 20
  972. var voxelBlockData = 0
  973.             radius = (voxelDiameter-1)/2
  974.             radius++
  975.             for(var i=0;i<radius;i++){
  976.                 for(var j=0;j<radius;j++){
  977.                     for(var k=0;k<radius;k++){
  978.                         hBlockRadius = Math.sqrt(i*i+k*k)                    
  979.                         blockRadius = Math.sqrt(hBlockRadius*hBlockRadius+j*j)
  980.                         if(Math.ceil(blockRadius)==Math.round(radius)){
  981.                            
  982.                                 setTile(x+i,y+j,z+k,voxelBlockId,voxelBlockData)
  983.                                 setTile(x+i,y-j,z+k,voxelBlockId,voxelBlockData)
  984.                                 setTile(x+i,y+j,z-k,voxelBlockId,voxelBlockData)
  985.                                 setTile(x-i,y+j,z+k,voxelBlockId,voxelBlockData)
  986.                                 setTile(x-i,y-j,z-k,voxelBlockId,voxelBlockData)
  987.                                 setTile(x+i,y-j,z-k,voxelBlockId,voxelBlockData)
  988.                                 setTile(x-i,y+j,z-k,voxelBlockId,voxelBlockData)
  989.                                 setTile(x-i,y-j,z+k,voxelBlockId,voxelBlockData)
  990.                            
  991.                         }
  992.                     }
  993.                 }
  994.             }
  995.             radius = Math.round(radius)
  996.             setTile(x,y-1+radius,z,voxelBlockId,voxelBlockData)
  997.             setTile(x,y+1-radius,z,voxelBlockId,voxelBlockData)
  998.             setTile(x,y,z-1+radius,voxelBlockId,voxelBlockData)
  999.             setTile(x,y,z+1-radius,voxelBlockId,voxelBlockData)
  1000.             setTile(x-1+radius,y,z,voxelBlockId,voxelBlockData)
  1001.             setTile(x+1-radius,y,z,voxelBlockId,voxelBlockData)
  1002.    
  1003. }
  1004.  
  1005.  
  1006. function tree(x,y,z){
  1007. for(i = x-2; i<x+3;i++){
  1008.                 for(j = z-2; j<z+3;j++){
  1009. Level.setChestSlot(x+1,y+5,z,0,264,0,10)
  1010. Level.setChestSlot(x+1,y+5,z,1,265,0,10)
  1011. Level.setChestSlot(x+1,y+5,z,2,266,0,10)
  1012.  
  1013.  
  1014. setTile(i,y+2,j,49)
  1015. setTile(i,y+3,j,1)
  1016. setTile(i,y+4,j,2)
  1017. setTile(x,y+5,z,17)
  1018. setTile(x,y+6,z,17)
  1019. setTile(x,y+7,z,17)
  1020. setTile(x,y+8,z,17)
  1021. setTile(x,y+9,z,17)
  1022. setTile(x+1,y+5,z,54)
  1023.  
  1024. setTile(i,y+10,j,18)
  1025. setTile(i,y+11,j,18)
  1026. setTile(i,y+12,j,18)
  1027. setTile(i,y+13,j,18)
  1028. }
  1029. }
  1030. }
  1031.  
  1032. function sky(x,y,z){
  1033. for(i = x-2; i<x+3;i++){
  1034.                 for(j = z-2; j<z+3;j++){
  1035. //Mid
  1036. setTile(i,y+40,j,49)
  1037. setTile(i,y+41,j,49)
  1038. setTile(x,y+42,z,57)
  1039. setTile(x+1,y+42,z,57)
  1040. setTile(x-1,y+42,z,57)
  1041. setTile(x,y+42,z+1,57)
  1042. setTile(x,y+42,z-1,57)
  1043.  
  1044. }
  1045. }
  1046. }
  1047.  
  1048. function sand(x,y,z){
  1049. clientMessage("Lol not")
  1050. }
  1051.  
  1052.  
  1053. function useItem(x,y,z,i,b,s,d) {
  1054. if(i==601){
  1055. setPosition(getPlayerEnt(),x,y+3,z)
  1056. }
  1057. if(i==602&&b==17){
  1058. Level.destroyBlock(x,y,z,1)
  1059. }
  1060. if(i==604&&ini==1){
  1061. ent = Level.spawnMob(x,y+4,z,inside,skin)
  1062. Entity.setRenderType(ent,render)
  1063. ini=0
  1064. }
  1065. if(i==215){
  1066. getTile(x+1,y,z,57);
  1067. getTile(x+2,y,z,57);
  1068. getTile(x-1,y,z,57);
  1069. getTile(x-2,y,z,57);
  1070. getTile(x-2,y+1,z,57);
  1071. getTile(x+2,y+1,z,57);
  1072. getTile(x-2,y+2,z,57);
  1073. getTile(x+2,y+2,z,57);
  1074. getTile(x-2,y+3,z,57);
  1075. getTile(x+2,y+3,z,57);
  1076. getTile(x-2,y+4,z,57);
  1077. getTile(x+2,y+4,z,57);
  1078. getTile(x-1,y+4,z,57);
  1079. getTile(x+1,y+4,z,57);
  1080. clientMessage("Active");
  1081. Block.defineBlock(2, "Green Lucky Block", ["lucky_block",2],false,0);
  1082. Block.defineBlock(3, "Brown Lucky Block", ["lucky_block",6],false,0);
  1083. Block.defineBlock(1, "Black Lucky Block", ["lucky_block",0],false,0);
  1084. Block.defineBlock(4, "Blue Lucky Block", ["lucky_block",5],false,0);
  1085. Block.defineBlock(161, "Green Lucky Block", ["lucky_block",2],false,0);
  1086. Block.defineBlock(18, "Green Lucky Block", ["lucky_block",2],false,0);
  1087. Block.defineBlock(17, "Brown Lucky Block", ["lucky_block",6],false,0);
  1088. Block.defineBlock(162, "Brown Lucky Block", ["lucky_block",6],false,0);
  1089. Block.defineBlock(12, "Classic Lucky Block", ["lucky_block",1],false,0);
  1090. Block.defineBlock(60, "Brown Lucky Block", ["lucky_block",6],false,0);
  1091. ModPE.setItem(260,"aether_apple",0,"Ohhh Im a shiny apple");
  1092. Block.defineBlock(243, "Green Lucky Block", ["lucky_block",2],false,0);
  1093. Block.defineBlock(8, "Blue Lucky Block", ["lucky_block",5],false,0);
  1094. Block.defineBlock(110, "Purple Lucky Block", ["lucky_block",7],false,0);
  1095. Block.defineBlock(9, "Blue Lucky Block", ["lucky_block",5],false,0);
  1096. }
  1097. }
RAW Paste Data
Top