Advertisement
Guest User

test

a guest
Apr 20th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. -- Monitor Setup
  2. mon = peripheral.wrap("back")
  3. mon.clear()
  4.  
  5. -- How to Invest
  6. mon.setCursorPos(30,32)
  7. mon.write("To invest: /pay GriffinHeileYT {Price of Shares} and")
  8. mon.setCursorPos(30,33)
  9. mon.write("tell me what stock you would like to invest in.")
  10.  
  11. -- Share Worth
  12. mon.setTextColor(colors.cyan)
  13. mon.setCursorPos(2,1)
  14. mon.write("Formula for Share Worth: #.# x 100 + 100")
  15. mon.setCursorPos(1,2)
  16. mon.write("-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=++-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-")
  17.  
  18. -- Stock Colors
  19. up = colors.green
  20. down = colors.red
  21. still = colors.white
  22. function color(clr)
  23.     mon.setTextColor(clr)
  24. end
  25.  
  26. -- Stocks
  27. function stock(line, clr, name, abbreviation, sales, performance)
  28.     mon.setCursorPos(1,line)
  29.     mon.setTextColor(clr)
  30.     mon.write(name)
  31.     mon.setCursorPos(12,line)
  32.     mon.setTextColor(colors.white)
  33.     mon.write(abr)
  34.     mon.setTextColor(clr)
  35.     mon.setCursorPos(17, line)
  36.     mon.write(sales)
  37. end
  38.  
  39. stock(4, colors.white, "Iron Ingot", "IRON", 0.00, colors.white)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement