Convert Code to MineCraft Command Blocks


SUBMITTED BY: Guest

DATE: July 5, 2014, 8:59 p.m.

FORMAT: Text only

SIZE: 3.1 kB

HITS: 1389

  1. This idea is by James (ign: MinecraftM3rcy) and is to be credited to him.
  2. Twitter: @MayorOwel
  3. This is the outline to a code that the map maker might use in order to control a mob arena.
  4. This specific mob arena would allow for a leveling system according to how many skeletons thet player had killed.
  5. This code would be written in this easier format, then sent through a program that converts this type of code into the commandblock language, arranges the command blocks to a 20Hz clock, and exports the schematic.
  6. List of variables used in this example:
  7. title - This would be the name of the schematic exported
  8. user - This would be the closest person
  9. # # # - These are locations, in the order of XYZ
  10. set - This sets the scoreboard number, the creator must make the scoreboard
  11. if - Uses a scoreboard <user> test command to see if a user has done specific things
  12. clear - Clears specific things from the users inventory, if "inventory" is set then it will clear all
  13. spawn - Spawns the specified mob, the specific amount of times
  14. teleport - Teleports the user to a specific location
  15. heal - Heals specified player, or user
  16. repair - Repairs specified items, use "armor" for all armor or "tools" for all tools (including swords)
  17. add user to - This adds the user to a scoreboard objective or team
  18. title MyCommandBlockSchematic
  19. if user at 20 20 20 -- If user is at a specific location, perform the following, this loops the entire time they are in the arena
  20. set skeletonsKilled = 0
  21. if skeletonsKilled == 0 -- If the user is at the location and has killed no skeletons, do this
  22. set level = 1 -- Updates the users level with scoreboard
  23. clear inventory -- Clears the inventory so that the user cant cheat
  24. give user iron sword -- Give the user their sword
  25. spawn 5 skeleton -- Spawns five skeletons inside the arena
  26. if skeletonsKilled == 5
  27. set level = 2
  28. give user diamond chestplate
  29. spawn 10 skeleton
  30. if skeletonsKilled == 15
  31. set level = 3
  32. give user diamond pants
  33. spawn 15 skeleton
  34. if skeletonsKilled == 30
  35. set level = 4
  36. give user diamond boots
  37. spawn 20 skeleton
  38. if skeletonsKilled == 50
  39. set level = 5
  40. give user diamond helmet
  41. spawn 25 skeleton
  42. if skeletonsKilled == 75
  43. give user diamond sword { enchants: knockback5, fireaspect1 }
  44. teleport user 10 10 10
  45. heal user
  46. repair user armor
  47. if user at 10 10 10 -- Checks to see if the user has been teleported to the winner location
  48. if user wins > 0 -- Tests to see if the user has won before
  49. set wins = wins + 1 --Increases how many times the user has won
  50. teleport user to spawn -- Teleports the user to spawn so that they don't get indinite wins
  51. if user wins == 0 --Tests to see if this is the first time the user won
  52. add user to winList -- Adds the user to the winners list
  53. set wins = wins + 1 -- Increases how many times the user has won
  54. teleport user to spawn -- Teleports the user to spawn so that they don't get infinite wins

comments powered by Disqus