- ComputerCraft | Programmable Computers for Minecraft
- → YuvonDovah's Content
YuvonDovah's Content
There have been 26 items by YuvonDovah (Search limited from 10-February 22)
#147925 The Ctrl+V Game
Posted by
YuvonDovah
on 05 October 2013 - 04:03 AM
in
Forum Games
/ ____| | | / ____| / _| |
| | ___ _ __ ___ _ __ _ _| |_ ___ _ __| | _ __ __ _| |_| |_
| | / _ \| '_ ` _ \| '_ \| | | | __/ _ \ '__| | | '__/ _` | _| __|
| |___| (_) | | | | | | |_) | |_| | || __/ | | |____| | | (_| | | | |_
\_____\___/|_| |_| |_| .__/ \__,_|\__\___|_| \_____|_| \__,_|_| \__|
| |
|_|
#147819 Long Os - [v1.2 Released] Multitasking Multilocalized Windowed Open-source Os
Posted by
YuvonDovah
on 04 October 2013 - 03:00 PM
in
Operating Systems
#147692 Flowos (Open Source) - 13.9.27Dp
Posted by
YuvonDovah
on 03 October 2013 - 01:50 PM
in
Operating Systems
--Desktop
slc = 0 -- sets the colours
tBarC = 2048
tBartC = 1
backColor = 1
term.setBackgroundColor(backColor)
term.clear()
contextX = 0
contextY = 0
function drawPrograms()
term.setTextColor(1)
term.setBackgroundColor(8)
term.setCursorPos(16,2)
print(" ")
term.setCursorPos(16,3)
print(" -Help ")
term.setCursorPos(16,4)
print(" -Games ")
term.setCursorPos(16,5)
print(" ")
end
function drawPrograms2()
term.setTextColor(1)
term.setBackgroundColor(8)
term.setCursorPos(16,2)
print(" ")
term.setCursorPos(16,3)
print(" -Help ")
term.setCursorPos(16,4)
print(" >Games ")
term.setCursorPos(16,5)
print(" ")
end
function drawGames()
term.setTextColor(1)
term.setBackgroundColor(8)
term.setCursorPos(26,3)
print(" ")
term.setCursorPos(26,4)
print(" -GoldRunner ")
term.setCursorPos(26,5)
print(" -3D Maze ")
term.setCursorPos(26,6)
print(" ")
end
function titleBar() -- Draws the task bar at the top of the page
term.setCursorPos(1,1)
local w = term.getSize()
term.setBackgroundColor(tBarC)
term.setTextColor(tBartC)
term.clearLine()
term.setCursorPos(3, 1)
print("[Main Menu]")
term.setCursorPos(16, 1)
print("[Programs]")
term.setCursorPos(28, 1)
print("[BlueTooth]")
clock()
end
function drawBluetoothDropDown() --Draws the bluetooth dropdown
term.setTextColor(1)
term.setBackgroundColor(8)
term.setCursorPos(28,2)
print(" ")
term.setCursorPos(28,3)
print(" -Send ")
term.setCursorPos(28,4)
print(" -Recieve ")
term.setCursorPos(28,5)
print(" ")
end
function clock() -- sets the time to top left corner
term.setTextColor(1)
term.setBackgroundColor(tBarC)
local time = textutils.formatTime(os.time(), true)
local w = term.getSize()
term.setCursorPos(w - #time + 1, 1)
print(time)
end
function drawDesktop() -- Draws background image
term.setBackgroundColor(backColor)
term.clear()
bground = paintutils.loadImage("background_1")
paintutils.drawImage(bground,1, 1)
titleBar()
end
function drawMenu1() --Draws the main menu drop down.
term.setTextColor(1)
term.setBackgroundColor(8)
term.setCursorPos(3,2)
print(" ")
term.setCursorPos(3,3)
print(" -Shutdown ")
term.setCursorPos(3,4)
print(" -Restart ")
term.setCursorPos(3,5)
print(" -Exit ")
term.setCursorPos(3,6)
print(" ")
end
function drawMenu2() -- Draws the left click edi menu
term.setBackgroundColor(8)
term.setTextColor(1)
term.setCursorPos(contextX, contextY)
print(" ")
term.setCursorPos(contextX, contextY+1)
print(" -Edit GUI ")
term.setCursorPos(contextX, contextY+2)
print(" -Background ")
term.setCursorPos(contextX, contextY+3)
print(" ")
end
drawDesktop() -- buttons and there functions
while true do
local event, button, X, Y = os.pullEventRaw()
local w = term.getSize()
if slc == 0 then
if event == "mouse_click" then
if X >=3 and X <=13 and Y==1 and button ==1 then
drawMenu1()
slc = 1
elseif X >=16 and X <=26 and Y >=1 and Y <=1 and button == 1 then slc = 4
drawPrograms()
elseif X >=24 and X <=34 and Y >=1 and Y <=1 and button == 1 then slc = 3
drawBluetoothDropDown()
elseif X >=w - 2 and X <=w and Y==1 and button ==1 then slc = 0
clock()
slc = 0
elseif X >= 1 and Y >=2 and button == 2 then slc = 2
if X >=38 then
contextX = 38
end
if Y >=14 then
contextY = 14
end
if X <= 38 then
contextX = X
end
if Y <= 14 then
contextY = Y
end
drawMenu2()
else
drawDesktop()
end
end
elseif slc == 4 then
if X >=16 and X <=26 and button == 1 and Y== 3 then slc = 0
shell.run("help")
elseif X >=16 and X <=26 and button == 1 and Y== 4 then slc = 0
drawGames()
drawPrograms2() slc = 5
else
slc = 0
drawDesktop()
end
elseif slc == 3 then
if X >=1 and X <=11 and button == 1 and Y== 3 then slc = 0
else
slc = 0
drawDesktop()
end
elseif slc == 1 then
if X >=1 and X <=11 and button == 1 and Y== 3 then slc = 0
os.shutdown()
elseif X>=1 and X<=11 and Y==4 and button ==1 then slc = 0
os.reboot()
elseif X>=1 and X<=11 and Y==5 and button ==1 then slc = 0
so.run({},"")
else
slc = 0
drawDesktop()
end
elseif slc == 5 then
if X >=26 and X <=39 and button == 1 and Y== 4 then slc = 0
shell.run("cd", "goldrunner")
shell.run("GoldRunner")
elseif X >=26 and X <=39 and button == 1 and Y== 5 then slc = 0
shell.run("maze3d")
else
slc = 0
drawDesktop()
end
elseif slc == 2 then
if X >= contextX and X <= contextX+13 and Y==contextY+1 and button == 1 then slc = 0
sleep(0.1)
shell.run("cd","OS","cd","Core","edit","gui")
drawDesktop()
elseif X>= contextX and X <=contextX+13 and Y==contextY+2 and button == 1 then slc = 0
shell.run("paint","background_1")
drawDesktop()
else slc = 0
drawDesktop()
end
end
end
#147665 Flowos (Open Source) - 13.9.27Dp
Posted by
YuvonDovah
on 03 October 2013 - 12:01 PM
in
Operating Systems
svdragster, on 03 October 2013 - 11:47 AM, said:
Ingame time with the os.time() also maybe the day (in game), i've tried to do this but I need to get it to refresh every second and if I do that it refreshes the whole of my os screen meaning every time I press a button (in the os) it refreshes and gone; hope you might be able to figure it out though.
#147654 [Open Source] PearOS (Preview 2) - OS X Inspired OS
Posted by
YuvonDovah
on 03 October 2013 - 10:27 AM
in
Operating Systems
#147653 Flowos (Open Source) - 13.9.27Dp
Posted by
YuvonDovah
on 03 October 2013 - 10:19 AM
in
Operating Systems
#147196 How To Refresh A Clock
Posted by
YuvonDovah
on 29 September 2013 - 01:07 PM
in
Ask a Pro
#146292 How To Refresh A Clock
Posted by
YuvonDovah
on 23 September 2013 - 12:07 PM
in
Ask a Pro
BigTwisty, on 23 September 2013 - 11:48 AM, said:
Second, it is a good idea to not hard code your screen locations, just in case your position is off or you decide to run code on a monitor.
function time() local time = textutils.formatTime(os.time(), true) local w = term.getSize() term.setCursorPos(w - #time + 1, 1) print(time) end
3rd, you need to check the rest of your code to ensure this function is being called regularly. This is why we need to see the rest of your code.
Okay, that is done now.
#146285 How To Refresh A Clock
Posted by
YuvonDovah
on 23 September 2013 - 11:08 AM
in
Ask a Pro
Please open image in new tab to see clearer.
So my problem is that when I have the time on my OS, in the top right hand of the screen in the picture, it doesn't refresh. Whenever I click it does refresh but I would like it to refresh automatically every second. I know that I can do this with the os.startTimer(3) command but am not sure how to implement it into my code and I have no idea how to use it.
function Time()
local time = os.time()
time = textutils.formatTime(time, true)
term.setCursorPos(47,1)
print(""..time)
end
--Desktop
slc = 0
tBarC = 2048
tBartC = 1
backColor = 32768
term.setBackgroundColor(backColor)
term.clear()
contextX = 0
contextY = 0
function titleBar()
term.setCursorPos(1,1)
term.setBackgroundColor(tBarC)
term.setTextColor(tBartC)
term.clearLine()
term.setCursorPos(3, 1)
print("[Main Menu]")
end
function drawDesktop()
term.setBackgroundColor(backColor)
term.clear()
bground = paintutils.loadImage("background_1")
paintutils.drawImage(bground,1, 1)
term.setBackgroundColor(2048)
term.setTextColor(1)
term.setCursorPos(3,3)
print("[Help]")
titleBar()
end
function drawMenu1()
term.setTextColor(1)
term.setBackgroundColor(8)
term.setCursorPos(3,2)
print(" ")
term.setCursorPos(3,3)
print(" -Shutdown ")
term.setCursorPos(3,4)
print(" -Restart ")
term.setCursorPos(3,5)
print(" ")
end
function drawMenu2()
term.setBackgroundColor(8)
term.setTextColor(1)
term.setCursorPos(contextX, contextY)
print(" ")
term.setCursorPos(contextX, contextY+1)
print(" -Edit GUI ")
term.setCursorPos(contextX, contextY+2)
print(" -FileManager ")
term.setCursorPos(contextX, contextY+3)
print(" ")
end
drawDesktop()
while true do
local event, button, X, Y = os.pullEventRaw()
if slc == 0 then
if event == "mouse_click" then
if X >=3 and X <=13 and Y==1 and button ==1 then
drawMenu1()
slc = 1
elseif X >=3 and X <=8 and Y >=3 and Y <=3 and button == 1 then
shell.run("help")
elseif X >= 1 and Y >=2 and button == 2 then slc = 2
if X >=38 then
contextX = 38
end
if Y >=14 then
contextY = 14
end
if X <= 38 then
contextX = X
end
if Y <= 14 then
contextY = Y
end
drawMenu2()
else
drawDesktop()
end
end
elseif slc == 1 then
if X >=1 and X <=11 and button == 1 and Y== 3 then slc = 0
os.shutdown()
elseif X>=1 and X<=11 and Y==4 and button ==1 then slc = 0
os.reboot()
else
slc = 0
drawDesktop()
end
elseif slc == 2 then
if X >= contextX and X <= contextX+13 and Y==contextY+1 and button == 1 then slc = 0
shell.run("edit","gui")
drawDesktop()
elseif X>= contextX and X <=contextX+13 and Y==contextY+2 and button == 1 then slc = 0
shell.run("Help")
drawDesktop()
else slc = 0
drawDesktop()
end
end
end#144853 How To Improve My Lock?
Posted by
YuvonDovah
on 14 September 2013 - 12:10 PM
in
Ask a Pro
#144784 How To Improve My Lock?
Posted by
YuvonDovah
on 14 September 2013 - 02:51 AM
in
Ask a Pro
#144727 Cinema
Posted by
YuvonDovah
on 13 September 2013 - 03:22 PM
in
Media
Sorry my german isn't amazing, but thats really cool i've been trying to something similar myself.
#144722 How To Improve My Lock?
Posted by
YuvonDovah
on 13 September 2013 - 03:02 PM
in
Ask a Pro
Lock
os.pullEvent = os.pullEventRaw
local done = false
while done == false do
term.clear()
term.setCursorPos(1,1)
write("Password:")
local password = read('*')
term.clear()
term.setCursorPos(1,1)
if password == "PASSWORD" then
done = true
elseif password == "PASSWORD" then
print("Access Granted")
redstone.setOutput("right",true)
sleep(5)
redstone.setOutput("right",false)
sleep(2)
redstone.setOutput("back",true)
sleep(1)
redstone.setOutput("back",false)
else
print("Access Denied")
sleep(2)
term.clear()
term.setCursorPos(1,1)
end
end
Startup
os.run({}, "lock")
#144517 Colour Coded Cables [1.5/1.6]
Posted by
YuvonDovah
on 12 September 2013 - 11:50 AM
in
Suggestions
#144281 [1.51+] Using Network Cables (for dummies)
Posted by
YuvonDovah
on 10 September 2013 - 01:21 PM
in
Tutorials
#143998 How To Add Cc Code Into A Server
Posted by
YuvonDovah
on 08 September 2013 - 12:33 PM
in
Media
LBPHacker, on 08 September 2013 - 07:33 AM, said:
YuvonDovah, on 07 September 2013 - 05:48 PM, said:
#143892 Variable Size Quarry (now with Super Ore Quarry™)
Posted by
YuvonDovah
on 07 September 2013 - 05:50 PM
in
Turtle Programs
civilwargeeky, on 07 September 2013 - 01:32 PM, said:
YuvonDovah, on 06 September 2013 - 07:45 PM, said:
Also, on the pace of updates, I'm really sorry but Rome II is fun and school is annoying. I will attempt to schedule some time for myself to work on theses programs.
#143891 How To Add Cc Code Into A Server
Posted by
YuvonDovah
on 07 September 2013 - 05:48 PM
in
Media
Engineer, on 07 September 2013 - 06:30 AM, said:
YuvonDovah, on 07 September 2013 - 06:17 AM, said:
#143835 How To Add Cc Code Into A Server
Posted by
YuvonDovah
on 07 September 2013 - 06:17 AM
in
Media
#143781 How Can I Make Two Texts On A Monitor Different Sizes?
Posted by
YuvonDovah
on 06 September 2013 - 07:51 PM
in
Ask a Pro
#143779 Variable Size Quarry (now with Super Ore Quarry™)
Posted by
YuvonDovah
on 06 September 2013 - 07:45 PM
in
Turtle Programs
#143748 How To Add Cc Code Into A Server
Posted by
YuvonDovah
on 06 September 2013 - 03:00 PM
in
Media
#142142 How To Add Cc Code Into A Server
Posted by
YuvonDovah
on 28 August 2013 - 06:43 PM
in
Media
PasteBin: http://pastebin.com/
The Code I Used In The Video: (not working for some reason)
Sorry that it's so quiet i've fixed that now!
Please like and comment with any questions or advice.
Subscribe if you wish to see more!
Only works if your server allows outgoing internet.
#142139 Variable Size Quarry (now with Super Ore Quarry™)
Posted by
YuvonDovah
on 28 August 2013 - 06:35 PM
in
Turtle Programs
#141958 [1.51+] Using Network Cables (for dummies)
Posted by
YuvonDovah
on 27 August 2013 - 02:34 PM
in
Tutorials
- ComputerCraft | Programmable Computers for Minecraft
- → YuvonDovah's Content


