Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon=peripheral.wrap("right")
- shopitems={"Cobble","Stone","Glass","Wooden","Coal","Torch"}
- shopprice={"1$"}
- shopani={"stone","planks"}
- shopam={"Piece"}
- local tick = 1.3
- function sc(x,y)
- mon.setCursorPos(x,y)
- end
- function mw(string)
- mon.write(string)
- end
- function center(offset,blockno,shopitem,y,charoffset)
- sc(charoffset+math.ceil((offset*10)+((blockno*10)/2)-(#shopitem/2)),y)
- mw(shopitem)
- end
- mon.clear()
- function blocklayout(offset,blockno,itemno,amount,priceno,charoffset)
- center(offset,blockno,shopitems[itemno],2,charoffset)
- center(offset,blockno.shopam[amount],3,charoffset)
- center(offset,blockno,shopprice[priceno],4,charoffset)
- end
- mon.clear()
- function del() --Delete later ^Testing script
- center(0,1,shopitems[1],2,0)
- center(0,1,shopprice[1],3,0)
- center(1,1,shopitems[2],2,0)
- center(2,1,shopitems[3],2,1)
- center(3,1,shopitems[4],2,2)
- end
- blocklayout(0,1,1,1,1,0)
Advertisement
Add Comment
Please, Sign In to add comment