Advertisement
MCFunRide

BowCore

Aug 8th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1.    
  2.  
  3.     -- BowCore
  4.     -- Coded for BowWhalley by fun_ride
  5.      
  6.     -- Code
  7. local tcmd = {}
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. print("BowCore")
  11. function drawBit()
  12. term.setTextColor(colors.yellow)
  13. write("$ ")
  14. term.setTextColor(colors.white)
  15. end
  16.  
  17. while true do
  18. drawBit()
  19. cmd = read(nil, tcmd)
  20. table.insert(tcmd,cmd)
  21. if cmd:sub(1,8) == "/prefix " then
  22. s = cmd:gsub("/prefix ","")
  23. t = s:gsub("&","\194\167")
  24. peripheral.find("command").setCommand('setblock ~ ~-1 ~ air')
  25. peripheral.find("command").runCommand()
  26. peripheral.find("command").setCommand('setblock ~ ~-1 ~ command_block 0  {CustomName:"'..t..'"}')
  27. peripheral.find("command").runCommand()
  28. peripheral.find("command").setCommand('setblock ~ ~-1 ~ air')
  29. peripheral.find("command").runCommand()
  30. else
  31. s = cmd:gsub("&","\194\167")
  32. peripheral.find("command").setCommand("say "..s)
  33. peripheral.find("command").runCommand()
  34. end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement