Wumbolicious

TPPI Bank Program

Apr 18th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.23 KB | None | 0 0
  1. x = 0
  2. a = 0
  3. b = 0
  4. c = 0
  5. d = 0
  6. e = 0
  7. f = 0
  8.  
  9. side = "left"
  10.  
  11. mon = peripheral.wrap(side)
  12. mon.setTextScale(1)
  13. mon.setCursorPos(1,1)
  14. mon.write("IRON INGOT COUNTER")
  15. mon.setCursorPos(1,2)
  16. mon.write("===================")
  17.  
  18. while true do
  19.   term.clear()
  20.   term.setCursorPos(1,1)
  21.   print("Depositing? Put iron in top left. Please enter your minecraft name.")
  22.   term.setCursorPos(1,3)
  23.   print("---------------------------------------")
  24.   term.setCursorPos(1,9)
  25.   print("---------------------------------------")
  26.   term.setCursorPos(1,10)
  27.   print("Adding non-iron ingots WILL break the system! Please play fairly.")
  28.   term.setCursorPos(1,12)
  29.   print("ANY ITEM in the last slot is a tip!")
  30.   term.setCursorPos(1,5)
  31.   input = read()
  32.     if input == "3atmypwnage" then
  33.         term.setCursorPos(1,6)
  34.         print("Deposit or Withdrawal?:")
  35.         term.setCursorPos(25,6)
  36.         dow1 = read()
  37.         if dow1 == "Withdrawal" then
  38.             term.setCursorPos(1,7)
  39.             print("Amount?: ")
  40.             term.setCursorPos(10,7)
  41.             wamount = read()
  42.             x = x - wamount
  43.             sleep(.5)
  44.             mon.setCursorPos(14,4)
  45.             mon.write(x)
  46.             for i=1,wamount do
  47.             redstone.setOutput("front",true)
  48.             sleep(0.1)
  49.             redstone.setOutput("front",false)
  50.             sleep(0.1)
  51.             end
  52.             term.setCursorPos(16,7)
  53.             print("WORKING. BE PATIENT!")
  54.             sleep(4)
  55.         end
  56.         if dow1 == "Deposit" then
  57.         x = x + turtle.getItemCount()
  58.         term.setCursorPos(1,7)
  59.         print(turtle.getItemCount())
  60.         term.setCursorPos(4,7)
  61.         print("diamond(s) added to the bank!")
  62.         turtle.dropDown()
  63.         mon.setCursorPos(1,4)
  64.         mon.write("3atmypwnage:")
  65.         mon.setCursorPos(14,4)
  66.         mon.write(x)
  67.         turtle.select(16)
  68.         turtle.dropDown()
  69.         turtle.select(1)
  70.         sleep(7)
  71.         end
  72. end
  73.  
  74.     if input == "GummiDude1" then
  75.         term.setCursorPos(1,6)
  76.             print("Deposit or Withdrawal?:")
  77.             term.setCursorPos(25,6)
  78.             dow2 = read()
  79.             if dow2 == "Withdrawal" then
  80.             term.setCursorPos(1,7)
  81.             print("Amount?: ")
  82.             term.setCursorPos(10,7)
  83.             wamount = read()
  84.             a = a - wamount
  85.             sleep(.5)
  86.             mon.setCursorPos(14,5)
  87.             mon.write(a)
  88.             for i=1,wamount do
  89.             redstone.setOutput("front",true)
  90.             sleep(0.1)
  91.             redstone.setOutput("front",false)
  92.             sleep(0.1)
  93.             end
  94.             term.setCursorPos(16,7)
  95.             print("WORKING. BE PATIENT!")
  96.             sleep(4)
  97.     end
  98.         if dow2 == "Deposit" then
  99.             a = a + turtle.getItemCount()
  100.             term.setCursorPos(1,7)
  101.             print(turtle.getItemCount())
  102.             term.setCursorPos(4,7)
  103.             print("diamond(s) added to the bank!")
  104.             turtle.dropDown()
  105.             mon.setCursorPos(1,5)
  106.             mon.write("GummiDude1")
  107.             mon.setCursorPos(14,5)
  108.             mon.write(a)
  109.             turtle.select(16)
  110.             turtle.dropDown()
  111.             turtle.select(1)
  112.             sleep(7)
  113.     end
  114. end
  115.  
  116.     if input == "Dukenukum98" then
  117.      term.setCursorPos(1,6)
  118.         print("Deposit or Withdrawal?:")
  119.         term.setCursorPos(25,6)
  120.         dow3 = read()
  121.         if dow3 == "Withdrawal" then
  122.             term.setCursorPos(1,7)
  123.             print("Amount?: ")
  124.             term.setCursorPos(10,7)
  125.             wamount = read()
  126.             b = b - wamount
  127.             sleep(.5)
  128.             mon.setCursorPos(14,6)
  129.             mon.write(b)
  130.             for i=1,wamount do
  131.             redstone.setOutput("front",true)
  132.             sleep(0.1)
  133.             redstone.setOutput("front",false)
  134.             sleep(0.1)
  135.             end
  136.             term.setCursorPos(16,7)
  137.             print("WORKING. BE PATIENT!")
  138.             sleep(4)
  139.     end
  140.     end
  141.         if dow3 == "Deposit" then
  142.         b = b + turtle.getItemCount()
  143.         term.setCursorPos(1,7)
  144.         print(turtle.getItemCount())
  145.         term.setCursorPos(4,7)
  146.         print("diamond(s) added to the bank!")
  147.         turtle.dropDown()
  148.         mon.setCursorPos(1,6)
  149.         mon.write("Dukenukum98")
  150.         mon.setCursorPos(14,6)
  151.         mon.write(b)
  152.         turtle.select(16)
  153.         turtle.dropDown()
  154.         turtle.select(1)
  155.         sleep(7)
  156. end
  157.     if input == "SuperEnd123" then
  158. term.setCursorPos(1,6)
  159.         print("Deposit or Withdrawal?:")
  160.         term.setCursorPos(25,6)
  161.         dow4 = read()
  162.         if dow4 == "Withdrawal" then
  163.             term.setCursorPos(1,7)
  164.             print("Amount?: ")
  165.             term.setCursorPos(10,7)
  166.             wamount = read()
  167.             c = c - wamount
  168.             sleep(.5)
  169.             mon.setCursorPos(14,7)
  170.             mon.write(c)
  171.             for i=1,wamount do
  172.             redstone.setOutput("front",true)
  173.             sleep(0.1)
  174.             redstone.setOutput("front",false)
  175.             sleep(0.1)
  176.             end
  177.             term.setCursorPos(16,7)
  178.             print("WORKING. BE PATIENT!")
  179.             sleep(4)
  180.    
  181.     end
  182.         if dow4 == "Deposit" then
  183.         c = c + turtle.getItemCount()
  184.         term.setCursorPos(1,7)
  185.         print(turtle.getItemCount())
  186.         term.setCursorPos(4,7)
  187.         print("diamond(s) added to the bank!")
  188.         turtle.dropDown()
  189.         mon.setCursorPos(1,7)
  190.         mon.write("SuperEnd123:")
  191.         mon.setCursorPos(14,7)
  192.         mon.write(c)
  193.         turtle.select(16)
  194.         turtle.dropDown()
  195.         turtle.select(1)
  196.         sleep(7)
  197. end
  198. end
  199.  
  200.     if input == "L1qu1ds1n" then
  201.         term.setCursorPos(1,6)
  202.         print("Deposit or Withdrawal?:")
  203.         term.setCursorPos(25,6)
  204.         dow5 = read()
  205.         if dow5 == "Withdrawal" then
  206.             term.setCursorPos(1,7)
  207.             print("Amount?: ")
  208.             term.setCursorPos(10,7)
  209.             wamount = read()
  210.             d = d - wamount
  211.             sleep(.5)
  212.             mon.setCursorPos(14,8)
  213.             mon.write(x)
  214.             for i=1,wamount do
  215.             redstone.setOutput("front",true)
  216.             sleep(0.1)
  217.             redstone.setOutput("front",false)
  218.             sleep(0.1)
  219.             end
  220.             term.setCursorPos(16,7)
  221.             print("WORKING. BE PATIENT!")
  222.             sleep(4)
  223.         end
  224.         if dow5 == "Deposit" then
  225.         d = d + turtle.getItemCount()
  226.         term.setCursorPos(1,7)
  227.         print(turtle.getItemCount())
  228.         term.setCursorPos(4,7)
  229.         print("diamond(s) added to the bank!")
  230.         turtle.dropDown()
  231.         mon.setCursorPos(1,8)
  232.         mon.write("L1qu1ds1n:")
  233.         mon.setCursorPos(14,8)
  234.         mon.write(d)
  235.         turtle.select(16)
  236.         turtle.dropDown()
  237.         turtle.select(1)
  238.         sleep(7)
  239. end
  240. end
  241.  
  242.     if input == "BaZilMan501" then
  243.         term.setCursorPos(1,6)
  244.         print("Deposit or Withdrawal?:")
  245.         term.setCursorPos(25,6)
  246.         dow6 = read()
  247.         if dow6 == "Withdrawal" then
  248.             term.setCursorPos(1,7)
  249.             print("Amount?: ")
  250.             term.setCursorPos(10,7)
  251.             wamount = read()
  252.             e = e - wamount
  253.             sleep(.5)
  254.             mon.setCursorPos(14,9)
  255.             mon.write(e)
  256.             for i=1,wamount do
  257.             redstone.setOutput("front",true)
  258.             sleep(0.1)
  259.             redstone.setOutput("front",false)
  260.             sleep(0.1)
  261.             end
  262.             term.setCursorPos(16,7)
  263.             print("WORKING. BE PATIENT!")
  264.             sleep(4)
  265.     end
  266.         if dow6 == "Deposit" then
  267.         e = e + turtle.getItemCount()
  268.         term.setCursorPos(1,7)
  269.         print(turtle.getItemCount())
  270.         term.setCursorPos(4,7)
  271.         print("diamond(s) added to the bank!")
  272.         turtle.dropDown()
  273.         mon.setCursorPos(1,9)
  274.         mon.write("BaZilMan501:")
  275.         mon.setCursorPos(14,9)
  276.         mon.write(e)
  277.         turtle.select(16)
  278.         turtle.dropDown()
  279.         turtle.select(1)
  280.         sleep(7)
  281. end
  282. end
  283.  
  284.     if input == "subtract" then
  285.         term.setCursorPos(1,6)
  286.         print("Which Player?: ")
  287.             term.setCursorPos(16,6)
  288.             inputname = read()
  289.                 if inputname == "3atmypwnage" then
  290.                 term.setCursorPos(1,7)
  291.                 print("Amount?: ")
  292.                     term.setCursorPos(10,7)
  293.                     inputamount = read()
  294.                         x = x - inputamount
  295.                         mon.setCursorPos(14,4)
  296.                         mon.write(x)
  297.                         sleep(2)
  298.                 end
  299.                 if inputname == "GummiDude1" then
  300.                 term.setCursorPos(1,7)
  301.                 print("Amount?: ")
  302.                     term.setCursorPos(10,7)
  303.                     inputamount = read()
  304.                         a = a - inputamount
  305.                         mon.setCursorPos(14,5)
  306.                         mon.write(a)
  307.                         sleep(2)
  308.                 end
  309.                 if inputname == "Dukenukum98" then
  310.                 term.setCursorPos(1,7)
  311.                 print("Amount?: ")
  312.                     term.setCursorPos(10,7)
  313.                     inputamount = read()
  314.                         b = b - inputamount
  315.                         mon.setCursorPos(14,6)
  316.                         mon.write(b)
  317.                         sleep(2)
  318.                 end
  319.                 if inputname == "SuperEnd123" then
  320.                 term.setCursorPos(1,7)
  321.                 print("Amount?: ")
  322.                     term.setCursorPos(10,7)
  323.                     inputamount = read()
  324.                         c = c - inputamount
  325.                         mon.setCursorPos(14,7)
  326.                         mon.write(c)
  327.                         sleep(2)
  328.                 end
  329.                 if inputname == "L1qu1ds1n" then
  330.                 term.setCursorPos(1,7)
  331.                 print("Amount?: ")
  332.                     term.setCursorPos(10,7)
  333.                     inputamount = read()
  334.                         d = d - inputamount
  335.                         mon.setCursorPos(14,8)
  336.                         mon.write(d)
  337.                         sleep(2)
  338.                 end
  339.                 if inputname == "BaZilMan501" then
  340.                 term.setCursorPos(1,7)
  341.                 print("Amount?: ")
  342.                     term.setCursorPos(10,7)
  343.                     inputamount = read()
  344.                         e = e - inputamount
  345.                         mon.setCursorPos(14,9)
  346.                         mon.write(e)
  347.                         sleep(2)
  348.                 end
  349.     end
  350. end
Add Comment
Please, Sign In to add comment