Advertisement
Faited

Magical Times

Sep 11th, 2021 (edited)
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local bridge = peripheral.find("rsBridge")
  2.  
  3. local box = peripheral.find("chatBox")
  4.  
  5. local manager = peripheral.find("inventoryManager")
  6.  
  7. while true do
  8.  
  9.     event, username, message = os.pullEvent("chat")
  10.  
  11.     if username == "esgamo"
  12.     then
  13.         a = string.find(message, " ")
  14.         itemname = string.sub(message, 0, a)
  15.         itemcount = string.sub(message, a, string.len(message))
  16.         itemname = message
  17.     end
  18.    
  19.     print(itemname)
  20.    
  21.     bridge.exportItem({name=itemname,count=tonumber(itemcount)},"top")
  22.    
  23.     manager.addItemToPlayer("left",1000)
  24.  
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement