Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[if not shell.run("ESGraphics") then
- shell.run("pastebin","get","iifHYZ2v","ESGraphics")
- shell.run("ESGraphics")
- end]]
- texttable={""}
- cluster={{0,0,false}}
- clusterIDs={}
- commands={}
- commands["READY"]=function (TEXT)
- cluster[#cluster+1]={TEXT[2],0}
- clusterIDs[TEXT[2]]=#cluster
- end
- commands["NEWPOWER"]=function (TEXT)
- cluster[clusterIDs[TEXT[2]]]={TEXT[2],TEXT[3]}
- end
- rednet.open("left")
- function update()
- local N=1
- id,msg,dis,pro=rednet.receive(0.01)
- if id==nil then else
- for n in string.gmatch(msg, ".") do
- if n=="&" then N=N+1 texttable[N]="" else texttable[#texttable]=texttable[#texttable]..n end
- end
- commands[texttable[1]](texttable)
- end
- print(texttable[1])
- end
- function draw()
- if id==nil then else
- for i=1,#cluster do
- print(cluster[i].." "..i) end
- end
- texttable=nil
- texttable={""}
- end
- while true do
- update()
- draw()
- --r.systemupdate()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement