Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open()
- --mon=peripheral.wrap("")
- rSideVill="bottom"
- rSideLamp="top"
- modem=peripheral.wrap("")
- selected=1
- turtleID=1
- rToggle=false
- function posW(x,y,z,c)
- mon.setCursorPos(x,y)
- mon.setTextColor(c)
- mon.write(z)
- end
- tbl={"Enderman","Creeper","Witch","Villager","Blaze","Cow","!Let them spawn!","!Lamp!"}
- --tbl2=textutils.unserialize(rednet.receive())
- while true do
- for i=1,#tbl-2 do
- if selected~=i then
- posW(0,i,tbl[i],0xffffff)
- redstone.setOutput(rSideVill,false)
- elseif selected==i then
- posW(1,i,tbl[i],0xff0000)
- if selected==4 then
- redstone.setOutput(rSideVill,true)
- end
- end
- end
- posW(0,#tbl-1,tbl[#tbl-1],0x00ff00)
- posW(0,#tbl,tbl[#tbl],0xffff00)
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if yPos<=6 then
- selected=yPos
- elseif yPos==#tbl-1 then
- rednet.send(turtleID,yPos)
- elseif yPos==#tbl then
- redstone.setOutput(rSideLamp,(rToggle=not rToggle))
- posW(7,#tbl,rToggle,0xffff00)
- end
- sleep(.25)
- mon.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement