Advertisement
PaymentOption

Primitive cyberwar

May 12th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.23 KB | None | 0 0
  1. local w,h = term.getSize()
  2.  
  3. shell.run("boxCLASS")
  4. shell.run("helperFuncs")
  5.  
  6. rednet.open("top")
  7. rednet.open("right")
  8. rednet.open("left")
  9. rednet.open("back")
  10. rednet.open("bottom")
  11.  
  12. shell.run("mkdir", "SpongedInfo")
  13.  
  14.  
  15. selection = 1
  16. message = ""
  17.  
  18. -- Rednet functions --
  19. function spam(time, receiver)
  20.     if receiver == nil then
  21.         repeat
  22.             rednet.broadcast("d9f23j9osdculf90ds9uf3indj9vj390jg90u39jnnv09dsjf903u90ufvo8zhjdportj2")
  23.             time = time-1
  24.         until time == 0
  25.     else
  26.         repeat
  27.             rednet.send(receiver, "d9f23j9osdculf90ds9uf3indj9vj390jg90u39jnnv09dsjf903u90ufvo8zhjdportj2")
  28.             time = time-1
  29.         until time == 0
  30.     end
  31. end
  32.  
  33. function sponge(time)
  34.     repeat
  35.         sender, message = rednet.receive(0.8)
  36.        
  37.         if sender ~= nil then
  38.             local file = fs.open("SpongedInfo/"..sender, "w")
  39.             file.writeLine(tostring(message))
  40.             file.close()
  41.         end
  42.         time = time-1
  43.     until time <= 0
  44. end
  45.  
  46. function attack(receiver, attackType)
  47.     if ping(receiver) then
  48.         rednet.send(receiver, tostring(attackType))
  49.         return true
  50.     else
  51.         return false
  52.     end
  53. end
  54. --------------------------
  55.  
  56. while true do
  57.     clear()
  58.     print("Type the amount of desired spam time: ")
  59.     local spamTime = tonumber(read())
  60.    
  61.     print("Spamming....")
  62.     spam(spamTime, nil)
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement