Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----Custimization variables----
- computerID=1626 --The ID of the turtle DJ server
- -------------------------------
- sendmsg=""
- --To run on a monitor, paste this into an empty file: 'shell.run("monitor","top","djclient")'
- --Run that file and it works!!!
- --Credit to Freack100 for automatic rednet finder!--
- for k,v in pairs(rs.getSides()) do
- if peripheral.isPresent(v) then
- if peripheral.getType(v) == "modem" then
- rednet.open(v)
- end
- end
- end
- orange=colors.orange
- black=colors.black
- lime=colors.lime
- function centerprint(text)
- local x,y = term.getSize()
- local x2,y2 = term.getCursorPos()
- term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
- write(text)
- term.setCursorPos(1,y2+1)
- end
- function line(linenum,color)
- local x,y = term.getSize()
- paintutils.drawLine(1,linenum,x,linenum,color)
- end
- function color(color2)
- term.setBackgroundColor(color2)
- end
- function play(disk)
- rednet.send(computerID,disk)
- end
- while not term.isColor() do
- term.clear()
- term.setCursorPos(1,1)
- print("DJMix OS 3.0")
- print("Choices: 13, cat, blocks, chirp, far, mall, mellohi, stal, strad, ward, 11, and wait")
- print("Type song name here: (spelling counts)")
- sendmsg=read()
- if sendmsg=="exit" then break end
- rednet.send(computerid,sendmsg)
- end
- if term.isColor() then
- line(1,lime)
- line(2,lime)
- line(3,lime)
- line(4,orange)
- line(5,black)
- line(6,orange)
- line(7,black)
- line(8,orange)
- line(9,black)
- line(10,orange)
- line(11,black)
- line(12,orange)
- line(13,black)
- line(14,orange)
- line(15,black)
- line(16,orange)
- line(17,lime)
- line(18,lime)
- line(19,lime)
- term.setCursorPos(1,4)
- color(orange)
- centerprint("13")
- color(black)
- centerprint("cat")
- color(orange)
- centerprint("blocks")
- color(black)
- centerprint("chirp")
- color(orange)
- centerprint("far")
- color(black)
- centerprint("mall")
- color(orange)
- centerprint("mellohi")
- color(black)
- centerprint("stal")
- color(orange)
- centerprint("strad")
- color(black)
- centerprint("ward")
- color(orange)
- centerprint("11")
- color(black)
- centerprint("wait")
- color(orange)
- centerprint("stop")
- end
- while term.isColor() do
- event,button,x,y=os.pullEvent("mouse_click")
- if y==4 then play("13") end
- if y==5 then play("cat") end
- if y==6 then play("blocks") end
- if y==7 then play("chirp") end
- if y==8 then play("far") end
- if y==9 then play("mall") end
- if y==10 then play("mellohi") end
- if y==11 then play("stal") end
- if y==12 then play("strad") end
- if y==13 then play("ward") end
- if y==14 then play("11") end
- if y==15 then play("wait") end
- if y==16 then play("stop") end
- sleep(0.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment