Here is my startup program for my turtle
If my code is the issue then please let me know otherwise does anyone know why this is happening?
There have been 13 items by Eagle4Life69 (Search limited from 29-March 23)
Posted by Eagle4Life69 on 27 January 2013 - 10:16 AM in Ask a Pro
os.pullEvent() event = "rednet_message" p1 = senderID p2 = message term.clear() term.setCursorPos(1,1) print("Waiting for Instructions") repeat rednet.open("right") local event,p1,p2 = os.pullEvent() if event=="rednet_message" then if p2 == "treefarm" then shell.run("treefarm", p1) end end until event=="char" and p1=="x"
os.pullEvent() event = "rednet_message" p1 = senderID p2 = message term.clear() term.setCursorPos(1,1) print("Waiting for Instructions") repeat rednet.open("top") local event,p1,p2 = os.pullEvent() if event=="rednet_message" then if p1 == 5 then shell.run("dj", "play", p2) end end until event=="char" and p1=="x"
Posted by Eagle4Life69 on 06 January 2013 - 10:45 AM in Turtle Programs
Posted by Eagle4Life69 on 06 January 2013 - 10:18 AM in Turtle Programs
Posted by Eagle4Life69 on 06 January 2013 - 12:38 AM in Turtle Programs
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
Posted by Eagle4Life69 on 20 September 2012 - 07:39 PM in Ask a Pro
Posted by Eagle4Life69 on 20 September 2012 - 03:35 PM in Ask a Pro
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.
Posted by Eagle4Life69 on 14 August 2012 - 02:42 AM in Ask a Pro
Posted by Eagle4Life69 on 14 August 2012 - 02:32 AM in Ask a Pro
Posted by Eagle4Life69 on 14 August 2012 - 02:23 AM in Ask a Pro
Posted by Eagle4Life69 on 13 August 2012 - 10:07 PM in Ask a Pro
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()
Posted by Eagle4Life69 on 28 July 2012 - 01:51 AM in Ask a Pro
modem_range=64
Posted by Eagle4Life69 on 27 July 2012 - 05:59 AM in Ask a Pro
Posted by Eagle4Life69 on 27 July 2012 - 02:55 AM in Ask a Pro