Jump to content


Eagle4Life69's Content

There have been 13 items by Eagle4Life69 (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#80882 Auto Start computers and turtles

Posted by Eagle4Life69 on 27 January 2013 - 10:16 AM in Ask a Pro

I have noticed an issue with 1.4 I have programs that I have set up to always be on (wireless redstone signal and such) when you walk away allowing the chunk to become unloaded (go to nether) when you come back you have to access the pc to get it to start this does not work for a jukebox located underground or for a turtle that is next to a tree that is surrounded in water.

Here is my startup program for my turtle
Spoiler
and here is the one for my Music Player which also plays the music
Spoiler

If my code is the issue then please let me know otherwise does anyone know why this is happening?



#69909 Okay, required Tree Farmer program

Posted by Eagle4Life69 on 06 January 2013 - 10:45 AM in Turtle Programs

I switched it to a logging turtle and it worked.. Thanks, does it pick up the saplings from the water?



#69900 Okay, required Tree Farmer program

Posted by Eagle4Life69 on 06 January 2013 - 10:18 AM in Turtle Programs

I did exactly like you say gave it a full stack of saplings in the first slot and a log in slot 2
Here is the turtle interface
Posted Image
and the overall view of the tree farm
Posted Image

any help would be great



#69670 Okay, required Tree Farmer program

Posted by Eagle4Life69 on 06 January 2013 - 12:38 AM in Turtle Programs

So I tried this. It breaks the first block and just stops. Not sure why. Tree is grown but now I need it to move forward
repeat
  turtle.select(2)
  while not turtle.compare() do sleep(20) end
turtle.dig()
turtle.forward()
  while turtle.compareUp() do
turtle.digUp()
turtle.up()
for i = 1,4 do
	    turtle.dig()
	    turtle.turnLeft()
   end
  end
  while turtle.down() do end
  turtle.select(1)
  sleep(200)
  turtle.turnLeft()
  turtle.back()
  while turtle.suck() do end
  turtle.place()
  for i = 1,6 do turtle.back() end
  turtle.turnLeft()
  turtle.turnLeft()
  turtle.refuel(turtle.getItemCount(1)-16)
  for i = 3,16 do
   if turtle.getItemCount(i) > 1 then
	    turtle.select(i)
	    turtle.dropDown()
   end
  end
  turtle.select(1)
until turtle.getFuelLevel() < 1



#32963 Program Goes Black then Reboots PC

Posted by Eagle4Life69 on 20 September 2012 - 07:39 PM in Ask a Pro

I will remove the os.reboots to see the error.... And if I knew where the code has having problems I could fix... thanks for your help



#32926 Program Goes Black then Reboots PC

Posted by Eagle4Life69 on 20 September 2012 - 03:35 PM in Ask a Pro

Hello pros, My program was running fine with tekkit 3.1.1 but now with 3.1.2 it reboots the PC the program is setup to get a signal from 3 different Item detectors one detectors counts blocks of 64 then 10 then 1. This is part of a banking program. Here is my code (i removed the URL to my site)

debug_char = "="
disk.eject("bottom")
term.clear()
term.setCursorPos(1,1)
function PrintCentered(sText)
	local w, h = term.getSize()
	local x, y = term.getCursorPos()
	x = math.max(math.floor((w / 2) - (#sText / 2)), 0)
y = math.max(math.floor((h / 2)),0)
	term.setCursorPos(x, y)
	print(sText)
end
coin = 0
bOut = 0
mult = 0
mult2 = 0
coin2 = 0
coin3 = 0
function counting()
rsInput = rs.getBundledInput("back")
  os.startTimer(20)
if colors.test(rsInput, colors.brown) == true then
  coin = coin + 1
elseif colors.test(rsInput, colors.purple) == true then
  coin2 = coin2 + 1
elseif colors.test(rsInput, colors.green) == true then
  coin3 = coin3 + 1
end
end
function loop()
while true do
  --event = os.pullEvent()
  if event == "redstone" then
   bOut = colors.combine(bOut, colors.white)
   rs.setBundledOutput("back", bOut)
   counting()
  elseif event == "timer" then
   bOut = colors.subtract(bOut, colors.yellow)
   rs.setBundledOutput("back", bOut)
   mult=coin*64
   mult2=coin2*10
   mult=coin3+mult+mult2
   sleep(10)
   break
  end
end
end
PrintCentered("Please Insert Debit Card")
function mainLoop()
while(true) do
  event, driveSide = os.pullEventRaw()
  if(event=="disk" and driveSide) then
   path = disk.getMountPath(driveSide)
   if(path) then
	path = path.."/id"
	file = fs.exists(path) and io.open(path, "r") or nil
   end
  
   term.clear()
   term.setCursorPos(1,1)
   PrintCentered("Please Enter Account Pin Number")
   pin = read("*")
  
	sCode = file:read()
	local response = http.get(
	  "/bank.php?task=check&id="..textutils.urlEncode( sCode ).."&pin="..textutils.urlEncode( pin )
	 )
	if response then
	local sResponse = response.readAll()
	 response.close()
	 if sResponse == "deny" then
	  term.clear()
	  term.setCursorPos(1,1)
	  print("Account or Password is wrong, Please try again")
	  disk.eject(driveSide)
	  sleep(5)
	  if(file) then file:close() file = nil end
	  os.reboot()
	 else
	  term.clear()
	  term.setCursorPos(1,1)
	  PrintCentered("Please Deposit Money into Chest on Right")
	  bOut = colors.subtract(bOut, colors.white)
	  rs.setBundledOutput("back", bOut)
	  sleep(8)
	  bOut = colors.combine(bOut, colors.white)
	  rs.setBundledOutput("back", bOut)
	  disk.eject(driveSide)
	  term.clear()
	  term.setCursorPos(1,1)
	   bOut = colors.combine(bOut, colors.yellow)
	   rs.setBundledOutput("back", bOut)
	   PrintCentered("Counting Money, This takes 20 seconds")
	  loop()
	  term.clear()
	  term.setCursorPos(1,1)
	   PrintCentered("You have Deposited $"..mult)
	  local response = http.get(
	  "/bank.php?task=deposit&id="..textutils.urlEncode( sCode ).."&pin="..textutils.urlEncode( pin ).."&amount="..textutils.urlEncode( mult )
	 )
	  if response then
	  sleep(3)
	   local sResponse1 = response.readAll()
	   term.clear()
	   term.setCursorPos(1,1)
	   PrintCentered("Your Current Balance is $"..sResponse1)
	   sleep(5)
	   if(file) then file:close() file = nil end
	   os.reboot()
	  
	  end
	 end
	end	  
	if(file) then file:close() file = nil end
  
  elseif(debug_char and event=="char" and driveSide==debug_char) then return("break") end
end
end
repeat
ok, err, val = pcall(mainLoop)
if(not ok and err) then
  if(err=="Terminated") then print ("Access denied.")
  else
   print(err)
  end
end
until(ok and err=="break")
It is failing as it should be counting the $$, I have been thrown a error once in a while something like vb issue not sure the exact code.

Thanks for any help you can give me.



#25876 Making a Pretty Menu

Posted by Eagle4Life69 on 14 August 2012 - 02:42 AM in Ask a Pro

Perfect thanks so much



#25873 Making a Pretty Menu

Posted by Eagle4Life69 on 14 August 2012 - 02:32 AM in Ask a Pro

ok how to add timer?
would I use os.startTimer



#25869 Making a Pretty Menu

Posted by Eagle4Life69 on 14 August 2012 - 02:23 AM in Ask a Pro

ok... Is there a way to tell if someone has walked away from the computer and have it reset the menu to the beginning?



#25825 Making a Pretty Menu

Posted by Eagle4Life69 on 13 August 2012 - 10:07 PM in Ask a Pro

I would love help on creating a pretty menu system for my shopping mall, like an information kiosk.

I am new to Lua and Computer Craft only creating basic programs with basic 2 deep menus. Here is my issue I have a menu and it loads first set fine, then press option 1 it goes into it, but then any button sends it to main menu.

Please help here is my code I have now let me know how to do it better and correctly.

Thanks
bOut = 0
function Main_Menu()
while true do
  term.clear()
  term.setCursorPos(1,1)
  --clearscreen()
  print ( [[
   +********************************+
   |								|
   |	   Information  Kiosk	   |
   |								|
   +--------------------------------+
   |		 Please Choose		  |
   |  1. Store Directory			|
   |  2. How to Buy				 |
   |  3. How to Sell				|
   +********************************+
  ]] )
  os.pullEvent = os.pullEventRaw
  e, p = os.pullEvent()
  if e == "char" then
   if p == "1" then
	Store_Directory()
   elseif p == "2" then
  
   elseif p == "3" then
  
   else
  
   end
  end
end
end
function Store_Directory()
term.clear()
term.setCursorPos(1,1)
print ( [[
  +********************************+
  |								|
  |		Store  Directory		|
  |								|
  +--------------------------------+
  |  A. Fire Items				 |
  |  B.							|
  |  C.							|
  | press 0 to return to main menu |
  +********************************+
]] )
os.pullEvent = os.pullEventRaw
e, p = os.pullEvent()
  if e == "char" then
   if p == "a" then
	term.clear()
	term.setCursorPos(1,1)
	print ( [[
	 +********************************+
	 |								|
	 |		 Fire  Items		  |
	 |								|
	 +--------------------------------+
	 |	You can find Fire Items	 |
	 |		   in store #		   |
	 |			   21			   |
	 |	 Upper level  left side	 |
	 +********************************+
	]] )
	sleep(5)
	Main_Menu()
   elseif p == "b" then
	
   elseif p == "c" then
	
   elseif p == "0" then
	Main_Menu()
   else
	
   end
  end
end
Main_Menu()



#22053 Banking

Posted by Eagle4Life69 on 28 July 2012 - 01:51 AM in Ask a Pro

unless I change it in the server
modem_range=64



#21821 Banking

Posted by Eagle4Life69 on 27 July 2012 - 05:59 AM in Ask a Pro

Thanks I may use world anchors at the server (making the system have to phone home so I can make multiple ATM's



#21786 Banking

Posted by Eagle4Life69 on 27 July 2012 - 02:55 AM in Ask a Pro

Ok so I was planing on making a program that would handle all of the banking on the server. I was wondering if anyone had done this and if there was code, I don't mind starting from scratch but making the program from scratch would take longer.

Please let me know. and if you have suggestions on what to do or not to do that would help me out a lot Thanks