Advertisement
mah17

Sub Item Randomizer

Nov 13th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. -- I'm not gagged this time
  2. rednet.close("left")
  3. rednet.open("left")
  4.  
  5. -- Yes sir I've been a bad boy
  6. dom = 6
  7.  
  8. function iveBeenSoBad( spankme )
  9.   sleep(0.25)
  10.   rednet.send(dom, spankme)
  11. end
  12.  
  13. math.randomseed(os.time())
  14. local iveBeenBad = math.random(50)
  15. while true do
  16.   leather, fun, times = os.pullEvent()
  17.  
  18.   if leather == "rednet_message" then
  19.     if fun == dom then
  20.       print("Dom:"..tostring(times))
  21.       if times == "init" then
  22.         print("Sub:true")
  23.         iveBeenSoBad("true") --I'm ready for it
  24.       end
  25.      
  26.       if times == "guess" then
  27.         print("Sub:"..tostring(iveBeenBad))
  28.         iveBeenSoBad(tostring(iveBeenBad))
  29.       end
  30.      
  31.       if times == "guessreceived" then
  32.         iveBeenBad = math.random(50)
  33.         iveBeenSoBad("verify")
  34.       end
  35.      
  36.     end
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement