Jump to content


EmTeaKay's Content

There have been 110 items by EmTeaKay (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#104412 Riddles

Posted by EmTeaKay on 01 April 2013 - 09:06 AM in Forum Games

Does it not have an indent?



#104339 Riddles

Posted by EmTeaKay on 01 April 2013 - 06:45 AM in Forum Games

View PostDlcruz129, on 17 March 2013 - 02:07 PM, said:

A woman shoots her husband. Then she holds him under water for over 5 minutes. Finally, she hangs him. But 5 minutes later they both go out together and enjoy a wonderful dinner together. How can this be?
Shoots him with a camera.
Don't know.
Hangs the picture she took.



#42156 [Programming][Lua][Question] Making a timer?

Posted by EmTeaKay on 19 October 2012 - 07:37 PM in Ask a Pro

Thank you. I'll try this and get back to you on it. This should help.

EDIT: This does help! Thank you so much.



#41907 How to send a pulse of redstone to flip the switch

Posted by EmTeaKay on 19 October 2012 - 12:38 AM in Ask a Pro

Use this code:
shell.run("redpulse", "side", "time", "amount of pulses you want")
Or, another way to do this using a function is:
function rdpls(side, time, pulse)
 shell.run("redpulse", side, time, pulse)
end



#41862 [Programming][Lua][Question] Making a timer?

Posted by EmTeaKay on 18 October 2012 - 10:26 PM in Ask a Pro

This is great, except I can't type, let's say, a password. Other than that, this is great.



#41852 [Programming][Lua][Question] Making a timer?

Posted by EmTeaKay on 18 October 2012 - 09:56 PM in Ask a Pro

How do I make a timer? I know you can make a timer with os.startTimer(x). But I want a timer where you can still type and do other stuff in the program. Anyone know how to do this? If so, please respond. Thank you in advance.



#34259 [Programming][Help]Make a program do something a certain number of times?

Posted by EmTeaKay on 25 September 2012 - 07:44 PM in Ask a Pro

I found out how to do it.
No worries.



#32427 Locking Computers

Posted by EmTeaKay on 17 September 2012 - 07:21 PM in Ask a Pro

Use this to make it untypeable until the computer restarts.
sleep()
Or use this for an amount of seconds.
sleep(1)



#32325 Is it possible to boot a computer or turtle and run a program remotely?

Posted by EmTeaKay on 17 September 2012 - 03:50 AM in Ask a Pro

I haven't tested this, but it should work.
--Put this into sender
print("Enter ID of sender: ")
id = read()
print("What would you like to send: ")
msg = read()
rednet.send(id, msg)
end
--Put this into receiver
id, msg = rednet.receive()
print(msg)
if msg == "runClear" then
shell.run("clear")
end



#32275 How do people get the logos & stuff on a monitor?

Posted by EmTeaKay on 16 September 2012 - 09:51 PM in Ask a Pro

Since I didn't want to make a new post, how do you change the size of the text?



#32195 A quick guide through menu making

Posted by EmTeaKay on 16 September 2012 - 11:51 AM in Tutorials

Well, if you find a way to do it, would you please PM me how?



#32142 [Programming][Help] Making a menu

Posted by EmTeaKay on 16 September 2012 - 04:59 AM in Ask a Pro

http://pastebin.com/AsXYxYYi All right, I got a different menu code. But this one prints vertical when I want it to print horizontal. Could someone please help?
And, sorry for the double post.



#32135 [Programming][Help] Making a menu

Posted by EmTeaKay on 16 September 2012 - 03:56 AM in Ask a Pro

It seems that the problem is that I can't have it as a startup.



#32129 [Programming][Help] Making a menu

Posted by EmTeaKay on 16 September 2012 - 02:26 AM in Ask a Pro

Grim Reaper, I used your code and I stripped away all the '--''s. Now it says:
startup:28:attempt to call nil
And here is my current code, in the form of Pastebin:
http://pastebin.com/8RCmSMpE



#32128 Team Econ (Using peripherals to make life better!)

Posted by EmTeaKay on 16 September 2012 - 01:55 AM in General

View Posttiin57, on 16 September 2012 - 01:48 AM, said:

EmptyK, you cannot contribute to this project without github. Denied.
You know what? I changed my mind! Github account name EmTeaKay



#32117 Team Econ (Using peripherals to make life better!)

Posted by EmTeaKay on 16 September 2012 - 01:03 AM in General

IGN: EmptyK
Best program: Password Door Lock/Light Switch
What your current project is: Making a menu for different "stuff".
Your github username: I don't have one. And I won't get one either.
Notes: I am somewhat good at Lua, not the best, and not the worst.



#32111 [Question]Are computer id's static?

Posted by EmTeaKay on 16 September 2012 - 12:39 AM in Ask a Pro

Labled computers are static. However, unlabled computers will lose all of the programs you have.



#32103 My art

Posted by EmTeaKay on 15 September 2012 - 11:02 PM in Media

Awesome images. +1



#32101 [Programming][Menu] Making a border

Posted by EmTeaKay on 15 September 2012 - 10:39 PM in Ask a Pro

Okay, but that didn't help. Is there a way you could edit my code? And, if it's not too much trouble, could the person who helps me also change the options from vertical to horizontal?



#32097 A quick guide through menu making

Posted by EmTeaKay on 15 September 2012 - 10:07 PM in Tutorials

How do I make a border for my menu? I tried asking in Ask a Pro forum section, and they said to come here.
Also, my options looke like this:
1
2
3
When I want them to look like this:
1 2 3
Any help?
Here's the code:
function clear()
term.clear()
term.setCursorPos(1,1)
end
function one()
sleep(.5)
clear()
print("Hello")
end
function two()
sleep(.5)
clear()
print("Hey")
end
function three()
sleep(.5)
clear()
print("Hi")
end
local menuOptions = {"1", "2", "3"}
local termX, termY = term.getSize()
local selected = 1
function centerText(text, termY)
term.setCursorPos(termX/2-#text/2,termY)
term.write(text)
return true
end
function start()
while true do
term.clear()
for i,v in ipairs(menuOptions) do
  if i == selected then
	   centerText("["..v.."]", i)
else
	centerText(v,i)
end
   end
   local id, key = os.pullEvent()
   if key == 208 and selected < #menuOptions then
	selected = selected + 1
   elseif key == 200 and selected > 1 then
	selected = selected - 1
   elseif key == 28 then
	return selected
   end
end
end
x = start()
print()
if selected == 1 then
one()
end
if selected == 2 then
two()
end
if selected == 3 then
three()
end



#32072 [Programming][Menu] Making a border

Posted by EmTeaKay on 15 September 2012 - 07:23 PM in Ask a Pro

How do I make a menu border? So it would appear like this:

+----------+
| [1] |
| 2 |
| 3 |
+----------+

Also, here is my current code:
function clear()
term.clear()
term.setCursorPos(1,1)
end
function one()
sleep(.5)
clear()
print("Hello")
end
function two()
sleep(.5)
clear()
print("Hey")
end
function three()
sleep(.5)
clear()
print("Hi")
end
local menuOptions = {"1", "2", "3"}
local termX, termY = term.getSize()
local selected = 1
function centerText(text, termY)
term.setCursorPos(termX/2-#text/2,termY)
term.write(text)
return true
end
function start()
while true do
 term.clear()
 for i,v in ipairs(menuOptions) do
  if i == selected then
	   centerText("["..v.."]", i)
 else
    centerText(v,i)
 end
   end
   local id, key = os.pullEvent()
   if key == 208 and selected < #menuOptions then
    selected = selected + 1
   elseif key == 200 and selected > 1 then
    selected = selected - 1
   elseif key == 28 then
    return selected
   end
end
end
x = start()
print()
if selected == 1 then
 one()
end
if selected == 2 then
 two()
end
if selected == 3 then
 three()
end



#31977 [Programming][Help] Making a menu

Posted by EmTeaKay on 15 September 2012 - 04:50 AM in Ask a Pro

Yes, I do agree it is a lot better explained, but searching through that much code without knowing what you're looking for is daunting. So, do you think I could give you my current code and you change it? Because I am that that great at Lua tables and all that jazz.
http://pastebin.com/3zEBxREP
Also, thank you in advance.



#31925 [Programming][Help] Making a menu

Posted by EmTeaKay on 14 September 2012 - 07:42 PM in Ask a Pro

Great, I got it working, but how do I make it so it goes sideways instead of up and down?



#31826 [Programming][Help] Making a menu

Posted by EmTeaKay on 14 September 2012 - 04:24 AM in Ask a Pro

Current code:
local menuOptions = {"1", "2", "3"}
local termX, termY = term.getSize()
local selected = 1
function centerText(text, termY)
term.setCursorPos(termX/2-#text/2,termY)
term.write(text)
return true
end
function start()
while true do
 term.clear()
 for i,v in ipairs(menuOptions) do
  if i == selected then
	   centerText("[ "..v.."] ", i)
 else
    centerText(v,i)
 end
   end
   x,y = os.pullEvent()
   if y == keys.down and selected < #menuOptions then
    selected = selected + 1
   elseif y == keys.up and selected > 1 then
    selected = selected - 1
   elseif y == keys.enter then
    return selected
   end
end
end
x = start()
print()
print("You have selected option: "..x)  
Also, it shows up like
[1]
[2]
[3]



#31821 [Programming][Help] Making a menu

Posted by EmTeaKay on 14 September 2012 - 03:25 AM in Ask a Pro

So, I need help making a menu. Nothing complex, just a three option menu. I know there's a tutorial here: http://www.computerc...gh-menu-making/ but I can't get that to work.
All I need is the code and an explanation and I'll be able to figure it out.