Advertisement
Guest User

startup

a guest
May 22nd, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function stuff()
  2. sleep(3)
  3.  
  4. shell.run("OverlordAPI/web.lua")
  5. Overlord.Web.SetAPIKey("mc_inf_sys")
  6. if (Overlord.Web.SetName("mc_inf_miner")) then
  7.   print("Connected to Overlord!")
  8. end
  9.  
  10. local vars = Overlord.Web.GetVars({"z"})
  11. while (not vars) do
  12.   print("Pauzing, cannot connect to Overlod API")
  13.  
  14.   sleep(10)
  15.   vars = Overlord.Web.GetVars({"z"})
  16. end
  17.  
  18. Overlord.Web.SetVars({z = vars["z"] - 1})
  19.  
  20. while(true) do
  21.   shell.run("rs pulse bottom")
  22.   sleep(1)
  23. end
  24. end
  25.  
  26. local ret = pcall(stuff)
  27. if (not ret) then
  28.   shell.run("reboot")
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement