ZNZNCOOP

loaders

Dec 12th, 2014
31
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. p = peripheral.wrap('bottom')
  2. w = p.getWorld(p.getPeripheralWorldID())
  3. logName='loaders.log'
  4.  
  5. repeat
  6.   os.pullEvent('player_logout')
  7.   players = p.getPlayerUsernames()
  8. until #players < 2
  9.  
  10. logfile=fs.open(logName,'a') or fs.open(logName,'w')
  11. if #players==0 then
  12.   logName.writeLine('No players')
  13. else
  14.   for i=1,#players do
  15.     pl = p.getPlayerByName(players[i])
  16.     ent = pl.asEntity()
  17.     x, y, z = ent.getPosition()
  18.     logName.writeLine(players[i]..' '..x..','..y..','..z)
  19.   end
  20. end
  21.  
  22. for x=-156,156 do
  23.   for z=-156,156 do
  24.     if w.isChunkLoaded(x, z) then logName.writeLine(x..','..z) end
  25.     sleep(0)
  26.   end
  27. end
  28.  
  29. players = p.getPlayerUsernames()
  30. if #players==0 then
  31.   logName.writeLine('No players')
  32. else
  33.   for i=1,#players do
  34.     pl = p.getPlayerByName(players[i])
  35.     ent = pl.asEntity()
  36.     x, y, z = ent.getPosition()
  37.     logName.writeLine(players[i]..' '..x..','..y..','..z)
  38.   end
  39. end
  40.  
  41. logfile.close()
RAW Paste Data