Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --name cleanstart
- --version 1.0
- args = { ... }
- if args[1] ~= "false" then
- fs.delete("watch")
- end
- function downloadFile(name)
- site = http.get("https://dl.dropbox.com/u/27836116/lua/"..name)
- if site == nil then
- print("File not found at address: "..address)
- return false
- else
- content = site.readAll()
- end
- fs.makeDir("watch")
- file = fs.open("watch/"..name,"w")
- file.write(content)
- file.close()
- return true
- end
- os.setComputerLabel("watchturtle"..os.getComputerID())
- if (not downloadFile("watchapi")) or (not downloadFile("internetapi")) or (not downloadFile("variablesapi")) then
- do return end
- end
- os.loadAPI("watch/watchapi")
- watchapi.loadModuleVariables()
- watchapi.addAPItolist("watchapi")
- watchapi.addAPItolist("internetapi")
- watchapi.addAPItolist("variablesapi")
- watchapi.addAPItolist("movementapi")
- watchapi.addAPItolist("queueapi")
- watchapi.addAPItolist("persistantapi")
- watchapi.updateAndLoad()
- watchapi.addProgramtolist("watch/gow")
- watchapi.addProgramtolist("watch/pos")
- watchapi.addProgramtolist("watch/watchscript")
- watchapi.addProgramtolist("cleanstart")
- watchapi.addProgramtolist("treefarm")
- watchapi.updatePrograms()
- if (args[2] ~= nil) and (args[3] ~= nil) and (args[4] ~= nil) and (args[5] ~= nil) then --rework
- watchapi.setpos(args[2],args[3],args[4],args[5])
- end
Advertisement
Add Comment
Please, Sign In to add comment