Simlor_GER

SimpleSimSoft_API

May 31st, 2016 (edited)
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. --SimpleSimSoft_API by SimlorLP
  2.  
  3.  
  4. function Clear()
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. end
  8. --Example: Clear()
  9.  
  10. function CP(x,y)
  11. term.setCursorPos(x,y)
  12. end
  13. --Example: CP(1,1)
  14.  
  15. function TC(color)
  16. term.setTextColor(color)
  17. end
  18. --Example: TC(32768)
  19.  
  20. function BC(color)
  21. term.setBackgroundColor(color)
  22. end
  23. --Example: BC(32)
  24.  
  25. function Download(PastebinCode, Path)
  26. local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
  27. local datei = http.get("https://pastebin.com/raw/" .. textutils.urlEncode(PastebinCode) .. "?cb=" .. cacheBuster)
  28. datei = datei.readAll()
  29.  
  30. local file = fs.open(Path, "w")
  31. file.write(datei)
  32. file.close()
  33. end
  34. --Example: Download("m9ZVhHD4", "Setup/SimSoft/Installer")
Add Comment
Please, Sign In to add comment