fishermedders

DupeBuster

Dec 21st, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. --DupeBuster by XMedders (Fisher)
  2. --fishermedders.com - written for
  3. --the craftersland.net servers
  4.  
  5. term.write( "What is the Player's Username? " )
  6. name = read( )
  7. print( "What side is the ME System Controller on, or what is the network peripheral name? " )
  8. term.write( "Appliccable: top, bottom, left, right, back, front" )
  9. side = read()
  10.  
  11. --Start the loop
  12. --may the 75th annual dupebust commence >:]
  13. me = peripheral.wrap( side )
  14. time = http.get( "http://www.timeapi.org/utc/now" ).readAll( )
  15. items = fs.open( "items", "w" )
  16. items.writeLine( "Busting Duper "..name.." at utc timestamp "..time.."!")
  17. items.writeLine( " " )
  18.  
  19. me = peripheral.wrap( side )
  20. for k,v in ipairs( me.getAvailableItems( ) ) do
  21.   items.writeLine( textutils.serialize( v ) )
  22.   items.writeLine( " " )
  23. end
  24.  
  25. items.writeLine( "fin." )
  26. items.close( )
  27.  
  28. print( " " )
  29. print( "DUPER BUSTED, AND JUST IN TIME TO SAVE CHRISTMAS" )
  30. print( "saved to file 'items'." )
  31. print( " " )
  32. input = ""
  33. repeat
  34.   term.write( "Upload this to pastebin? [y/n]" )
  35.   input = read()
  36.   input = string.lower(input)
  37. until input == "yes" or input == "y" or input == "no" or input == "n"
  38.  
  39. if input == "yes" or input == "y" then
  40.   shell.run( "pastebin put items" )
  41. else
  42.   print( "Thanks for using CL's #1 dupebusting suite." )
  43. end
Add Comment
Please, Sign In to add comment