Posted 15 February 2015 - 01:13 AM
i made a snippet of code to get player locations, inventory data, and other various data down to whether the player is on a ladder, and write it to the file.
the coordinates are relative to the sensor, add you're coordinates to the coordinates displayed
in the output file to get the actual coordinates
make sure to replace "NAME_OF_REPORT_FILE" and "USERNAME_HERE" with the respected properties
the coordinates are relative to the sensor, add you're coordinates to the coordinates displayed
in the output file to get the actual coordinates
make sure to replace "NAME_OF_REPORT_FILE" and "USERNAME_HERE" with the respected properties
--code by creeper9207
ip = peripheral.wrap("left")
ifile = fs.open("/NAME_OF_REPORT_FILE", "w")
i = peripheral.call("top", "getPlayerData", "USERNAME_HERE")
i2 = textutils.serialize(i)
ifile.write(i2)
ifile.flush()
ifile.close()
Edited on 21 March 2015 - 12:59 AM