diff options
author | ubq323 <ubq323@ubq323.website> | 2022-12-29 23:23:14 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-12-29 23:23:14 +0000 |
commit | a41145dfddb684958b0e5f2441a6f1fdaa7fe156 (patch) | |
tree | f030b07cac15f5c7c370da2c055a595902383a28 | |
parent | 67163387857fdcd56e7e286e27bbc079444ff5db (diff) |
shop
-rw-r--r-- | shop.lua | 47 |
1 files changed, 24 insertions, 23 deletions
@@ -87,7 +87,7 @@ function proctrans(tr) end -function shop_run() +function run_shop() while true do msgtxt = assert(ws.receive(),"ws error") msg = textutils.unserializeJSON(msgtxt) @@ -104,29 +104,30 @@ function shop_run() end end -while true do - local ty,b=os.pullEvent() - print(ty,b) +function run_topdisp() + + local mtop = peripheral.wrap"top" + while true do + mtop.setTextScale(3.5) + mtop.setTextColor(colors.cyan) + mtop.setCursorPos(1,1) + mtop.write"DIAMONDS" + + os.sleep(0.75) + mtop.clear() + os.sleep(0.25) + + mtop.setTextScale(3) + mtop.setTextColor(colors.white) + mtop.setCursorPos(1,1) + mtop.write("5KST EACH") + + os.sleep(0.75) + mtop.clear() + os.sleep(0.25) + end end --- mtop = peripheral.wrap"top" --- while true do --- mtop.setTextScale(3.5) --- mtop.setTextColor(colors.cyan) --- mtop.setCursorPos(1,1) --- mtop.write"DIAMONDS" - --- os.sleep(0.75) --- mtop.clear() --- os.sleep(0.25) - --- mtop.setTextScale(3) --- mtop.setTextColor(colors.white) --- mtop.setCursorPos(1,1) --- mtop.write("5KST EACH") - --- os.sleep(0.75) --- mtop.clear() --- os.sleep(0.25) +parallel.waitForAny(run_shop, run_topdisp) -- end |