Posted 12 October 2012 - 02:18 PM
Hello, I'm attempting to create a program for a tekkit train station. The program I am currently working on is to buy tickets. I have written a basic program using numerical inputs to designate where you want to go.
Its been tested and works fine but i want something a bit more advanced with a menu. I have watched a few tutorials and have a little understanding, but I just cant seem to get it to work.
I was just wondering if anyone can give me a few tips or hints on how to write the program I would like.
The basic program I used is;
shell.run("clear")
term.setCursorPos(1,1)
print("Welcome to the Rim Station")
print("")
print(" Ticket Sales")
print(" Select Ticket")
print(" ")
print("[1] Destination 1")
print("[2] Destination 2")
print("[3] Destination 3")
print("[4] Destination 4")
input = read()
A = "1"
B = "2"
C = "3"
D = "4"
E = "5"
F = "6"
G = "Edit"
if input == A then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 1)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == B then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 16384)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == C then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 64)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == D then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 2048)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == G then
shell.run("click")
else
shell.run("controls")
end
Thanks
Its been tested and works fine but i want something a bit more advanced with a menu. I have watched a few tutorials and have a little understanding, but I just cant seem to get it to work.
I was just wondering if anyone can give me a few tips or hints on how to write the program I would like.
The basic program I used is;
shell.run("clear")
term.setCursorPos(1,1)
print("Welcome to the Rim Station")
print("")
print(" Ticket Sales")
print(" Select Ticket")
print(" ")
print("[1] Destination 1")
print("[2] Destination 2")
print("[3] Destination 3")
print("[4] Destination 4")
input = read()
A = "1"
B = "2"
C = "3"
D = "4"
E = "5"
F = "6"
G = "Edit"
if input == A then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 1)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == B then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 16384)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == C then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 64)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == D then
shell.run("clear")
term.setCursorPos(1,1)
rs.setBundledOutput("back", 2048)
print("Please Insert 1IC into payment shoot")
sleep(4)
print("")
print("Printing, Please Wait")
sleep(27)
shell.run("startup")
elseif input == G then
shell.run("click")
else
shell.run("controls")
end
Thanks