imposiblaa

temp

Feb 26th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. local modem = peripheral.find("modem")
  2.  
  3. modem.open(47603)
  4.  
  5. local placeholderData = {
  6.     cheetos = {
  7.         price = 1,
  8.         amount = 64,
  9.         inStock = 135
  10.     },
  11.     funyuns = {
  12.         price = 10,
  13.         amount = 1,
  14.         inStock = 475
  15.     },
  16.     doritos = {
  17.         price = 1,
  18.         amount = 128,
  19.         inStock = 1963
  20.     },
  21.     netherite = {
  22.         price = 32,
  23.         amount = 1,
  24.         inStock  = 23
  25.     },
  26.     sand = {
  27.         price = 1,
  28.         amount = 128,
  29.         inStock = 3719
  30.     },
  31.     dirt = {
  32.         price = 0,
  33.         amount = 64,
  34.         inStock = 4829
  35.     }
  36. }
  37.  
  38. while true do
  39.     local event, side, channel, replyChannel, message = os.pullEvent("modem_message")
  40.  
  41.     if(message == "getShop") then
  42.         modem.transmit(replyChannel, 47601, placeholderData)
  43.     end
  44.     os.sleep(0.05)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment