Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- shell.run("pastebin","get","HRbMF1Eg","button")
- fs.makeDir("folder")
- sug="id:"
- red=1
- m=peripheral.wrap("top")
- function fillTable()
- button.setTable("1",one,2,4,8,10)
- button.setTable("2",two,5,7,8,10)
- button.setTable("3",three,8,10,8,10)
- button.setTable("4",four,2,4,5,7)
- button.setTable("5",five,5,7,5,7)
- button.setTable("6",six,8,10,5,7)
- button.setTable("7",seven,2,4,2,4)
- button.setTable("8",eight,5,7,2,4)
- button.setTable("9",nine,8,10,2,4)
- button.setTable(":",colon,2,5,11,13)
- button.setTable("0",zero,6,10,11,13)
- button.setTable("Enter",enter,2,10,14,16)
- button.setTable("Clear",clear,2,10,17,19)
- button.screen()
- end
- function getClick()
- event,side,x,y=os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function one()
- button.flash("1")
- sug=(sug.."1")
- end
- function two()
- button.flash("2")
- sug=(sug.."2")
- end
- function three()
- button.flash("3")
- sug=(sug.."3")
- end
- function four()
- button.flash("4")
- sug=(sug.."4")
- end
- function five()
- button.flash("5")
- sug=(sug.."5")
- end
- function six()
- button.flash("6")
- sug=(sug.."6")
- end
- function seven()
- button.flash("7")
- sug=(sug.."7")
- end
- function eight()
- button.flash("8")
- sug=(sug.."8")
- end
- function nine()
- button.flash("9")
- sug=(sug.."9")
- end
- function zero()
- button.flash("0")
- sug=(sug.."0")
- end
- function colon()
- button.flash(":")
- sug=(sug..":")
- end
- function enter()
- button.flash("Enter")
- god=fs.open(("folder".."/"..red),"w")
- god.write(sug)
- god.close()
- red=red+1
- sug="id:"
- m.setCursorPos(15,13)
- m.clearLine()
- m.setCursorBlink(false)
- m.write(sug)
- end
- function clear()
- sug="id:"
- button.flash("Clear")
- m.setCursorPos(15,13)
- m.clearLine()
- m.setCursorBlink(false)
- m.write(sug)
- end
- fillTable()
- button.heading("Want an item? enter its id here if we dont have it")
- getClick()
- m.setCursorPos(15,13)
- m.clearLine()
- m.setCursorBlink(false)
- m.write(sug)
- while true do
- getClick()
- fillTable()
- m.setCursorPos(15,13)
- m.clearLine()
- m.setCursorBlink(false)
- m.write(sug)
- end
Advertisement
Add Comment
Please, Sign In to add comment