summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shop.lua43
1 files changed, 23 insertions, 20 deletions
diff --git a/shop.lua b/shop.lua
index 8f33889..9c056ec 100644
--- a/shop.lua
+++ b/shop.lua
@@ -1,29 +1,32 @@
--- sres =textutils.unserializeJSON( http.post("https://krist.dev/ws/start","").readAll())
--- assert(sres.ok,"not ok")
--- wsurl = sres.url
+sres =textutils.unserializeJSON( http.post("https://krist.dev/ws/start","").readAll())
+assert(sres.ok,"not ok")
+ws = assert(http.websocket(sres.url))
-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)
+ _,_,c = os.pullEvent"websocket_message"
+ print(c)
+end
-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)
+-- mtop = peripheral.wrap"top"
+-- while true do
+-- mtop.setTextScale(3.5)
+-- mtop.setTextColor(colors.cyan)
+-- mtop.setCursorPos(1,1)
+-- mtop.write"DIAMONDS"
-end
+-- 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