Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Instructions:
- --1. Create a 5x5 (on the inside) pod. (Filled with water)
- --2. Put a Command Computer in the middle block in the floor.
- --3. Do "pastebin get F3gqLfPf startup" without quotes to get the program.
- --4. Put a leather cap in your inventory (not on your head)
- --5. Walk into the pod, and wait to be healed!
- --IMPORTANT INFORMATION!
- --Make sure you don't edit ANYTHING except for the configuration! If you do, things may break!
- --Be warned, it only checks once for lava, or water, you have to reboot the program if you want to change it.
- -------------------------------------------------------------------------
- --Configuration!
- --Make sure to spell "false" right! (No quotes, of course!)
- --Negative Effects
- slowActive = true
- miningFatigueActive = true
- nauseaActive = true
- witherActive = true
- --Positive Effects
- resistanceActive = true
- hasteActive = true
- strengthActive = true
- foodActive = true
- extraHealthActive = true
- --Other Options
- verbose = true --This just puts in the console the player who is being healed / damaged.
- --End of Configuration
- -------------------------------------------------------------------------
- --Functions
- function heal()
- if commands.exec("clear @p [r=2] leather_helmet 0 0") then
- if !lavaNotWater then
- commands.exec("effect @p [r=2] 13 1 1") --Water Breathing KEEP THIS! Otherwise you will drown!
- else
- commands.exec("effect @p [r=2] 12 1 1") --Fire Resistance KEEP THIS TOO!
- end
- commands.exec("effect @p [r=2] 10 1 255") -- Regeneration (Duh keep this :P)
- if resistanceActive then
- commands.exec("effect @p [r=2] 11 30 3") --Resistance Effect (Configurable!)
- end
- if hasteActive then
- commands.exec("effect @p [r=2] 3 30 15") --Haste Effect (Configurable!)
- end
- if strengthActive then
- commands.exec("effect @p [r=2] 5 30 15") --Strength Effect (Configurable!)
- end
- if foodActive then
- commands.exec("effect @p [r=2] 23 30 255") --Saturation Effect (Configurable!)
- end
- if extraHealthActive then
- commands.exec("effect @p [r=2] 21 30 5") --Extra Health Bar (Configurable!)
- end
- commands.exec("give @p [r=2] leather_helmet 0 1")
- --Mind you, this can get VERY annoying, because of
- --the popping sound from picking up the helmet :/
- --Think of it as an injection of air ;)
- else
- if slowActive then
- commands.exec("effect @p [r=2] 2 1 3") --Slowness Effect if you don't bring in a leather helmet! (Configurable!)
- end
- if miningFatigueActive then
- commands.exec("effect @p [r=2] 4 1 255") --Mining Fatigue Effect if you don't bring in a leather helmet! (Configurable!)
- end
- if nauseaActive then
- commands.exec("effect @p [r=2] 9 1 255") --Nausea Effect if you don't bring in a leather helmet! (Configurable!)
- end
- if witherActive then
- commands.exec("effect @p [r=2] 20 1 5") --Wither Effect if you don't bring in a leather helmet! (Configurable!)
- end
- end
- ----------------------
- function checkThePlayer()
- player = commands.exec("testfor @p [r=2]")
- print(player .." is inside the chamber!")
- end
- ---------------------
- function checkForLava()
- if commands.exec("testforblock lava ~ ~1 ~") then
- lavaNotWater = true
- end
- ---------------------
- function main()
- while true do
- heal()
- if verbose then
- checkThePlayer()
- end
- sleep(1)
- end
- end
- -------------------
- --Main Program Beginning
- checkForLava()
- --The reason I don't put it in the main loop,
- --is for TPS optimization.
- --If I were to check every tick, it would
- --cause massive lag. Sorry!
- while true do
- main()
- end
- --Main Program End
Advertisement
Add Comment
Please, Sign In to add comment