Guest User

jscript FIRST SCRIPT

a guest
Mar 4th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //note: file test.txt (%appdata%\.minecraft\saves\<world>\test.txt
  2. //note: A line starting with '//' won't be executed as code
  3.  
  4. //note: this must be in every script
  5. function main(func){
  6.  
  7. //note: the following command executes a minecraft-command
  8. func.sendCommand(func.var1, "/say example");
  9. //note: you don't have to know what "func.var" is, but you need to type it :D
  10. //note: the '"' are required arround the command you want to execute!
  11. //      the command (/say example) can be replaced with every minecraft-command you want, as long as it doesn't include '"'
  12. //      If you want to execute a command, that includes '"' just read on, it will be explained later (no it won't didn't have time to //        write a tutorial yet :( )
  13.  
  14. //note: the following command places a Block in the minecraft world
  15. func.setBlock("diamond_block", 1, 2, 3);
  16. //note: "diamond_block" can be replaced with any block you like
  17. //note: 1, 2, 3 are the x, y and z coordinates where the block should be placed
  18. //note: you can replace the coordinates with func.getX(), func.getY(), func.getZ() to place the block inside the player / command-
  19. //      block that is executeing this script. You can also use mathematic expressions such as '+2' or '/20' or '-200' and so on.
  20. //      for example 'func.setBlock("diamond_block", func.getX(), func.getY() + 2, func.getZ());' would place a diamond block 2 blocks
  21. //      abov the player's / command-block's location
  22.  
  23. //note: of corse you can also use normal javascript commands and syntaxes, which i won't explain here, because it would take ways too
  24. //      long. Just  google: "javascript beginner tutorial" or something like that, and it will be fine :)
  25. }
Add Comment
Please, Sign In to add comment