<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FernFlower</id>
		<title>ComputerCraft Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=FernFlower"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/FernFlower"/>
		<updated>2026-07-11T09:12:55Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Download&amp;diff=3533</id>
		<title>Download</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Download&amp;diff=3533"/>
				<updated>2012-10-25T16:37:34Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: cleaned up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== You can download the latest version of ComputerCraft [http://www.minecraftforum.net/topic/892282- here]. ===&lt;br /&gt;
&lt;br /&gt;
==Changelog:==&lt;br /&gt;
&lt;br /&gt;
{{Changelog}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Please no  list-ception [[Category:Lists]] --!&amp;gt;&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=User_talk:Thesbros&amp;diff=3518</id>
		<title>User talk:Thesbros</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=User_talk:Thesbros&amp;diff=3518"/>
				<updated>2012-10-24T19:37:05Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: NVM asked cloudy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Keymapper API ==&lt;br /&gt;
&lt;br /&gt;
The keymapper API was intended to assist with deciphering os.pullEvent(&amp;quot;key&amp;quot;) calls. os.pullEvent(&amp;quot;char&amp;quot;) basically replicates the conditions that it was intended to solve, and that's why os.pullEvent(&amp;quot;char&amp;quot;) was the only one I listed in the deprecated statement. Can you explain to me your reasoning for including key events in the notice? [[User:Riking|Riking]]&lt;br /&gt;
&lt;br /&gt;
== Random Reverts? ==&lt;br /&gt;
Hello its mandrake again. and I would like to ask why you keep reverting like a madman?! I wanted that page deleted for a reason. The code on that page is old and outdated and did not work back in 1.3 or so when i tried it.&lt;br /&gt;
[[User:FernFlower|FernFlower]] 21:28, 23 October 2012 (EDT)&lt;br /&gt;
What page? --[[User:Thesbros|Thesbros]] 23:45, 23 October 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=3517</id>
		<title>Printer</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=3517"/>
				<updated>2012-10-24T19:34:03Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: fixed the page - cloudy told me to do so&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The printer was added in the  [[ComputerCraft]] 1.42 update. The printer is placed next to a computer, and allows for printing text onto paper with any color of ink.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
{{Crafting grid&lt;br /&gt;
 |A1=stone |B1=stone         |C1=stone&lt;br /&gt;
 |A2=stone |B2=redstone_dust |C2=stone&lt;br /&gt;
 |A3=stone |B3=Ink_Sac |C3=stone&lt;br /&gt;
 |Output=printer&lt;br /&gt;
 }}&lt;br /&gt;
== Usage ==&lt;br /&gt;
To use a printer, place it adjacently but not diagonally next to a computer (left, right, top, bottom, front, or back side). Place any color ink in the single left slot, and paper in any of the top slots.&lt;br /&gt;
&lt;br /&gt;
If you are using blocks to pull/insert items from the printer the diffrent slots are avaible from these sides:&lt;br /&gt;
Paper tray is accessible from the top, output paper tray is accessible from the front or bottom, and the ink slot is accessible from the back or sides.&lt;br /&gt;
&lt;br /&gt;
[[File:PrinterGUI.png|thumb|256px|GUI of the Printer]]&lt;br /&gt;
&lt;br /&gt;
==API calls==&lt;br /&gt;
&lt;br /&gt;
Please see [[Peripheral (API)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Blocks]]&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=3501</id>
		<title>Printer</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=3501"/>
				<updated>2012-10-24T14:10:46Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The printer was added in the  [[ComputerCraft]] 1.42 update. The printer is placed next to a computer, and allows for printing text onto paper with any color of ink.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
{{Crafting grid&lt;br /&gt;
 |A1=stone |B1=stone         |C1=stone&lt;br /&gt;
 |A2=stone |B2=redstone_dust |C2=stone&lt;br /&gt;
 |A3=stone |B3=Ink_Sac |C3=stone&lt;br /&gt;
 |Output=printer&lt;br /&gt;
 }}&lt;br /&gt;
== Usage ==&lt;br /&gt;
To use a printer, place it adjacently but not diagonally next to a computer (left, right, top, bottom, front, or back side). Place any color ink in the single left slot, and paper in any of the top slots.&lt;br /&gt;
&lt;br /&gt;
If you are using blocks to pull/insert items from the printer the diffrent slots are avaible from these sides:&lt;br /&gt;
Paper tray is accessible from the top, output paper tray is accessible from the front or bottom, and the ink slot is accessible from the back or sides.&lt;br /&gt;
&lt;br /&gt;
[[File:PrinterGUI.png|thumb|256px|GUI of the Printer]]&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.newPage|newPage]]()&lt;br /&gt;
|Starts a new page. Returns true if page got started, false if not.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.endPage|endPage]]()&lt;br /&gt;
|Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.write|write]]( text )&lt;br /&gt;
|Writes text to the paper, works the same way as [[term.write()]]&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.setPageTitle|setPageTitle]]( text )&lt;br /&gt;
|Sets the title of the page.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getPaperLevel|getPaperLevel]]()&lt;br /&gt;
|Returns the amount of paper available in the paper tray.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getInkLevel|getInkLevel]]()&lt;br /&gt;
|Returns the amount of ink in the ink slot.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getCursorPos|getCursorPos]]()&lt;br /&gt;
|Returns the coordinates of the cursor on the paper, works the same way as [[term.getCursorPos()]]&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.setCursorPos|setCursorPos]]( x, y )&lt;br /&gt;
|Sets the cursor pos.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getPageSize|getPageSize]]()&lt;br /&gt;
|Returns the size of the paper, works the same way as [[term.getSize()]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[[Peripheral (API)]]&lt;br /&gt;
[[Category:Blocks]]&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=3500</id>
		<title>Printer</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Printer&amp;diff=3500"/>
				<updated>2012-10-24T14:09:00Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: added the list of API calls to use the printer to the main page of this article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The printer was added in the  [[ComputerCraft]] 1.42 update. The printer is placed next to a computer, and allows for printing text onto paper with any color of ink.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
{{Crafting grid&lt;br /&gt;
 |A1=stone |B1=stone         |C1=stone&lt;br /&gt;
 |A2=stone |B2=redstone_dust |C2=stone&lt;br /&gt;
 |A3=stone |B3=Ink_Sac |C3=stone&lt;br /&gt;
 |Output=printer&lt;br /&gt;
 }}&lt;br /&gt;
== Usage ==&lt;br /&gt;
To use a printer, place it adjacently but not diagonally next to a computer (left, right, top, bottom, front, or back side). Place any color ink in the single left slot, and paper in any of the top slots.&lt;br /&gt;
&lt;br /&gt;
If you are using blocks to pull/insert items from the printer the diffrent slots are avaible from these sides:&lt;br /&gt;
Paper tray is accessible from the top, output paper tray is accessible from the front or bottom, and the ink slot is accessible from the back or sides.&lt;br /&gt;
&lt;br /&gt;
[[File:PrinterGUI.png|thumb|256px|GUI of the Printer]]&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.newPage|newPage]]()&lt;br /&gt;
|Starts a new page. Returns true if page got started, false if not.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.endPage|endPage]]()&lt;br /&gt;
|Ends the page and prints the page to the output tray. Returns true if page was ended, false if not.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.write|write]]( text )&lt;br /&gt;
|Writes text to the paper, works the same way as [[term.write()]]&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.setPageTitle|setPageTitle]]( text )&lt;br /&gt;
|Sets the title of the page.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getPaperLevel|getPaperLevel]]()&lt;br /&gt;
|Returns the amount of paper available in the paper tray.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getInkLevel|getInkLevel]]()&lt;br /&gt;
|Returns the amount of ink in the ink slot.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getCursorPos|getCursorPos]]()&lt;br /&gt;
|Returns the coordinates of the cursor on the paper, works the same way as [[term.getCursorPos()]]&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.setCursorPos|setCursorPos]]( x, y )&lt;br /&gt;
|Sets the cursor pos.&lt;br /&gt;
|-&lt;br /&gt;
|''printer''.[[printer.getPageSize|getPageSize]]()&lt;br /&gt;
|Returns the size of the paper, works the same way as [[term.getSize()]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Blocks]]&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Gps_(program)&amp;diff=3499</id>
		<title>Gps (program)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Gps_(program)&amp;diff=3499"/>
				<updated>2012-10-24T14:04:35Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''gps''' is a stock program designed to make use of the ''positioning capabilities'' introduced in ComputerCraft 1.31.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|gps host&lt;br /&gt;
|The computer will act as a gps host.&amp;lt;br /&amp;gt;&lt;br /&gt;
The computer's own location is retrieved using the gps.&lt;br /&gt;
|-&lt;br /&gt;
|gps host &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;&lt;br /&gt;
|The computer will act as a gps host.&amp;lt;br /&amp;gt;&lt;br /&gt;
You manually provide the computer's own location (x, y and z).&lt;br /&gt;
|-&lt;br /&gt;
|gps locate&lt;br /&gt;
|It will try to retrieve the computer or turtle own location.&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local function printUsage()&lt;br /&gt;
	print( &amp;quot;Usages:&amp;quot; )&lt;br /&gt;
	print( &amp;quot;gps host&amp;quot; )&lt;br /&gt;
	print( &amp;quot;gps host &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;&amp;quot; )&lt;br /&gt;
	print( &amp;quot;gps locate&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local tArgs = { ... }&lt;br /&gt;
if #tArgs &amp;lt; 1 then&lt;br /&gt;
	printUsage()&lt;br /&gt;
	return&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function readNumber()&lt;br /&gt;
	local num = nil&lt;br /&gt;
	while num == nil do&lt;br /&gt;
		num = tonumber(read())&lt;br /&gt;
		if not num then&lt;br /&gt;
			write( &amp;quot;Not a number. Try again: &amp;quot; )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return math.floor( num + 0.5 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function open()&lt;br /&gt;
	local bOpen, sFreeSide = false, nil&lt;br /&gt;
	for n,sSide in pairs(rs.getSides()) do	&lt;br /&gt;
		if peripheral.getType( sSide ) == &amp;quot;modem&amp;quot; then&lt;br /&gt;
			sFreeSide = sSide&lt;br /&gt;
			if rednet.isOpen( sSide ) then&lt;br /&gt;
				bOpen = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not bOpen then&lt;br /&gt;
		if sFreeSide then&lt;br /&gt;
			print( &amp;quot;No modem active. Opening &amp;quot;..sFreeSide..&amp;quot; modem&amp;quot; )&lt;br /&gt;
			rednet.open( sFreeSide )&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			print( &amp;quot;No modem attached&amp;quot; )&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
local sCommand = tArgs[1]&lt;br /&gt;
if sCommand == &amp;quot;locate&amp;quot; then&lt;br /&gt;
	if open() then&lt;br /&gt;
		gps.locate( 2, true )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
elseif sCommand == &amp;quot;host&amp;quot; then&lt;br /&gt;
	if turtle then&lt;br /&gt;
		print( &amp;quot;Turtles cannot act as GPS hosts.&amp;quot; )&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if open() then&lt;br /&gt;
		local x,y,z&lt;br /&gt;
		if #tArgs &amp;gt;= 4 then&lt;br /&gt;
			x = tonumber(tArgs[2])&lt;br /&gt;
			y = tonumber(tArgs[3])&lt;br /&gt;
			z = tonumber(tArgs[4])&lt;br /&gt;
			if x == nil or y == nil or z == nil then&lt;br /&gt;
				printUsage()&lt;br /&gt;
				return&lt;br /&gt;
			end&lt;br /&gt;
			print( &amp;quot;Position is &amp;quot;..x..&amp;quot;,&amp;quot;..y..&amp;quot;,&amp;quot;..z )&lt;br /&gt;
		else&lt;br /&gt;
			x,y,z = gps.locate( 2, true )&lt;br /&gt;
			if x == nil then&lt;br /&gt;
				print( &amp;quot;Run \&amp;quot;gps host &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;\&amp;quot; to set position manually&amp;quot; )&lt;br /&gt;
				return&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		print( &amp;quot;Serving GPS requests&amp;quot; )&lt;br /&gt;
	&lt;br /&gt;
		local nServed = 0&lt;br /&gt;
		while true do&lt;br /&gt;
			sender,message,distance = rednet.receive()&lt;br /&gt;
			if message == &amp;quot;PING&amp;quot; then&lt;br /&gt;
				rednet.send(sender, textutils.serialize({x,y,z}))&lt;br /&gt;
				&lt;br /&gt;
				nServed = nServed + 1&lt;br /&gt;
				if nServed &amp;gt; 1 then&lt;br /&gt;
					local x,y = term.getCursorPos()&lt;br /&gt;
					term.setCursorPos(1,y-1)&lt;br /&gt;
				end&lt;br /&gt;
				print( nServed..&amp;quot; GPS Requests served&amp;quot; )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
else&lt;br /&gt;
	printUsage()&lt;br /&gt;
	return&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[Category:Notable Programs]]&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Gps_(program)&amp;diff=3498</id>
		<title>Gps (program)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Gps_(program)&amp;diff=3498"/>
				<updated>2012-10-24T14:04:16Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''gps''' is a stock program designed to make use of the ''positioning capabilities'' introduced in ComputerCraft 1.31.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|gps host&lt;br /&gt;
|The computer will act as a gps host.&amp;lt;br /&amp;gt;&lt;br /&gt;
The computer's own location is retrieved using the gps.&lt;br /&gt;
|-&lt;br /&gt;
|gps host &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;&lt;br /&gt;
|The computer will act as a gps host.&amp;lt;br /&amp;gt;&lt;br /&gt;
You manually provide the computer's own location (x, y and z).&lt;br /&gt;
|-&lt;br /&gt;
|gps locate&lt;br /&gt;
|It will try to retrieve the computer or turtle own location.&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local function printUsage()&lt;br /&gt;
	print( &amp;quot;Usages:&amp;quot; )&lt;br /&gt;
	print( &amp;quot;gps host&amp;quot; )&lt;br /&gt;
	print( &amp;quot;gps host &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;&amp;quot; )&lt;br /&gt;
	print( &amp;quot;gps locate&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local tArgs = { ... }&lt;br /&gt;
if #tArgs &amp;lt; 1 then&lt;br /&gt;
	printUsage()&lt;br /&gt;
	return&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function readNumber()&lt;br /&gt;
	local num = nil&lt;br /&gt;
	while num == nil do&lt;br /&gt;
		num = tonumber(read())&lt;br /&gt;
		if not num then&lt;br /&gt;
			write( &amp;quot;Not a number. Try again: &amp;quot; )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return math.floor( num + 0.5 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function open()&lt;br /&gt;
	local bOpen, sFreeSide = false, nil&lt;br /&gt;
	for n,sSide in pairs(rs.getSides()) do	&lt;br /&gt;
		if peripheral.getType( sSide ) == &amp;quot;modem&amp;quot; then&lt;br /&gt;
			sFreeSide = sSide&lt;br /&gt;
			if rednet.isOpen( sSide ) then&lt;br /&gt;
				bOpen = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not bOpen then&lt;br /&gt;
		if sFreeSide then&lt;br /&gt;
			print( &amp;quot;No modem active. Opening &amp;quot;..sFreeSide..&amp;quot; modem&amp;quot; )&lt;br /&gt;
			rednet.open( sFreeSide )&lt;br /&gt;
			return true&lt;br /&gt;
		else&lt;br /&gt;
			print( &amp;quot;No modem attached&amp;quot; )&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
local sCommand = tArgs[1]&lt;br /&gt;
if sCommand == &amp;quot;locate&amp;quot; then&lt;br /&gt;
	if open() then&lt;br /&gt;
		gps.locate( 2, true )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
elseif sCommand == &amp;quot;host&amp;quot; then&lt;br /&gt;
	if turtle then&lt;br /&gt;
		print( &amp;quot;Turtles cannot act as GPS hosts.&amp;quot; )&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if open() then&lt;br /&gt;
		local x,y,z&lt;br /&gt;
		if #tArgs &amp;gt;= 4 then&lt;br /&gt;
			x = tonumber(tArgs[2])&lt;br /&gt;
			y = tonumber(tArgs[3])&lt;br /&gt;
			z = tonumber(tArgs[4])&lt;br /&gt;
			if x == nil or y == nil or z == nil then&lt;br /&gt;
				printUsage()&lt;br /&gt;
				return&lt;br /&gt;
			end&lt;br /&gt;
			print( &amp;quot;Position is &amp;quot;..x..&amp;quot;,&amp;quot;..y..&amp;quot;,&amp;quot;..z )&lt;br /&gt;
		else&lt;br /&gt;
			x,y,z = gps.locate( 2, true )&lt;br /&gt;
			if x == nil then&lt;br /&gt;
				print( &amp;quot;Run \&amp;quot;gps host &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt;\&amp;quot; to set position manually&amp;quot; )&lt;br /&gt;
				return&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		print( &amp;quot;Serving GPS requests&amp;quot; )&lt;br /&gt;
	&lt;br /&gt;
		local nServed = 0&lt;br /&gt;
		while true do&lt;br /&gt;
			sender,message,distance = rednet.receive()&lt;br /&gt;
			if message == &amp;quot;PING&amp;quot; then&lt;br /&gt;
				rednet.send(sender, textutils.serialize({x,y,z}))&lt;br /&gt;
				&lt;br /&gt;
				nServed = nServed + 1&lt;br /&gt;
				if nServed &amp;gt; 1 then&lt;br /&gt;
					local x,y = term.getCursorPos()&lt;br /&gt;
					term.setCursorPos(1,y-1)&lt;br /&gt;
				end&lt;br /&gt;
				print( nServed..&amp;quot; GPS Requests served&amp;quot; )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
else&lt;br /&gt;
	printUsage()&lt;br /&gt;
	return&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
[[Category:Notable Programs]]&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=User:Thesbros&amp;diff=3489</id>
		<title>User:Thesbros</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=User:Thesbros&amp;diff=3489"/>
				<updated>2012-10-24T01:31:21Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=User:FernFlower&amp;diff=3488</id>
		<title>User:FernFlower</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=User:FernFlower&amp;diff=3488"/>
				<updated>2012-10-24T01:30:26Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: Created page with &amp;quot;It is I mandrake&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is I mandrake&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=User_talk:Thesbros&amp;diff=3485</id>
		<title>User talk:Thesbros</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=User_talk:Thesbros&amp;diff=3485"/>
				<updated>2012-10-24T01:29:19Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Keymapper API ==&lt;br /&gt;
&lt;br /&gt;
The keymapper API was intended to assist with deciphering os.pullEvent(&amp;quot;key&amp;quot;) calls. os.pullEvent(&amp;quot;char&amp;quot;) basically replicates the conditions that it was intended to solve, and that's why os.pullEvent(&amp;quot;char&amp;quot;) was the only one I listed in the deprecated statement. Can you explain to me your reasoning for including key events in the notice? [[User:Riking|Riking]]&lt;br /&gt;
&lt;br /&gt;
== Random Reverts? ==&lt;br /&gt;
Hello its mandrake again. and I would like to ask why you keep reverting like a madman?! I wanted that page deleted for a reason. The code on that page is old and outdated and did not work back in 1.3 or so when i tried it.&lt;br /&gt;
[[User:FernFlower|FernFlower]] 21:28, 23 October 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=User:Thesbros&amp;diff=3484</id>
		<title>User:Thesbros</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=User:Thesbros&amp;diff=3484"/>
				<updated>2012-10-24T01:28:38Z</updated>
		
		<summary type="html">&lt;p&gt;FernFlower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello its mandrake again. and I would like to ask why you keep reverting like a madman?! I wanted that page deleted for a reason. The code on that page is old and outdated and did not work back in 1.3 or so when i tried it.&lt;br /&gt;
[[User:FernFlower|FernFlower]] 21:28, 23 October 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>FernFlower</name></author>	</entry>

	</feed>