Kristaps220

distcal

Aug 10th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. if not fs.exists("adv-refuel") then
  2.  print("Downloading adv-refuel...")
  3.  http.request("http://pastebin.com/raw.php?i=bZPUL52U")
  4.  event, url, SourceTXT = os.pullEvent()
  5.  if event == "http_success" then
  6.   AcText = SourceTXT.readAll()
  7.   print("Success!")
  8.   print("Use adv-refuel to use advanced refuel!")
  9.   h = fs.open("adv-refuel","w")
  10.   h.write(AcText)
  11.   h.close()
  12.  elseif event == "http_failure" then
  13.   print("Failed to download adv-refuel.")
  14.  end
  15. end
  16.  
  17. write("Distance: ")
  18. dist = read()
  19. coal = 80
  20. stick = 5
  21. plank = 15
  22. wood = 15
  23. booksh = 15
  24. chest = 15
  25. print("You will need "..dist.." fuel level.")
  26. print("You can get that fuel level from: ")
  27. fuel = 0
  28. fuel = dist / coal
  29. print(fuel.." coal;")
  30. fuel = dist / stick
  31. print(fuel.." stick;")
  32. fuel = dist / plank
  33. print(fuel.." plank;")
  34. fuel = dist / wood
  35. print(fuel.." wood;")
  36. fuel = dist / booksh
  37. print(fuel.." bookshelf;")
  38. fuel = dist / chest
  39. print(fuel.." chest;")
Advertisement
Add Comment
Please, Sign In to add comment