kd8lvt

ComputerCraft Torture Chamber Chamber Computer

Apr 21st, 2015
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.94 KB | None | 0 0
  1. version = 1,000 --Only one decimal point may be used. Try using commas instead!
  2. function returnVerisonAPI()
  3.   return version
  4. end
  5. -------CONFIG-------
  6. --You must change these after a computer reboot. Planning on a way to change these during program running, but I have no way to test it where I am at the time.
  7. applyNausea = true
  8. applyWeakness = true
  9. applyPoison = true
  10. applyBlindness = true
  11. applyBlurredVision = false --WARNING: ONLY TURN THIS TO TRUE IF YOU HAVE THAUMCRAFT! Only suggested if you have blindness false!
  12. applyHunger = true --Warning: In Hard mode this can kill!
  13. applyWither = false --Only Recomended if you actually want to kill the person, which isn't truly torture, but meh.
  14. -------CONFIG-------
  15. --THIS COMPUTER MUST BE A COMMAND COMPUTER!
  16.  
  17. function uselessCTRLT()
  18.   os.pullEventRaw()
  19. end
  20. os.pullEvent = uselessCTRLT() --This makes CTRL+T useless ^.^
  21.  
  22. function findPlayer()
  23.   player = "@p [r=2]"
  24. end
  25. function applyEffects()
  26.   findplayer()
  27.   commands.exec("effect ".. player .." 4 1 15") --Applies Mining Fatigue to keep the player from escaping whatsoever!
  28.   if applyNausea then
  29.     commands.exec("effect ".. player .." 9 1 15") --Applies Nausea, just to be evil! CONFIGURABLE!
  30.   end
  31.   if applyWeakness then
  32.     commands.exec("effect ".. player .." 18 1 15")
  33.   end
  34.   if applyPoison then
  35.     commands.exec("effect ".. player .." 19 1 15")
  36.   end
  37.   if applyBlindness then
  38.     commands.exec("effect ".. player .." 15 1 15")
  39.   end
  40.   if applyBlurredVision then
  41.     commands.exec("effect ".. player .." 33 1 15")
  42.   end
  43.   if applyHunger then
  44.     commands.exec("effect ".. player .." 17 1 15")
  45.   end
  46.   if applywither then
  47.     commands.exec("effect ".. player .." 20 1 15")
  48.   end
  49. end
  50.  
  51. function main()
  52.   while true do
  53.     applyEffects()
  54.     sleep(1)
  55.   end
  56. end
  57. --Main Program
  58. while true do --I do this in the case of a timeout or too long with out yield error, etc. Don't want it to stop, eh?
  59.   main()
  60.   sleep(1)
  61. end
Advertisement
Add Comment
Please, Sign In to add comment