From a41145dfddb684958b0e5f2441a6f1fdaa7fe156 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 29 Dec 2022 23:23:14 +0000 Subject: shop --- shop.lua | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/shop.lua b/shop.lua index 5904dec..590a1de 100644 --- a/shop.lua +++ b/shop.lua @@ -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 -- cgit v1.2.3