Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCurserPos(1,1)
- end
- itemExtention = ".shop"
- priceExtention = ".pri"
- curencyExtention = ".ce"
- count = 1
- function createListing(name, price, curencyUsed)
- file = io.open("listing"..count..itemExtention, "a")
- io.output(file)
- io.write(name)
- io.close
- file = io.open("listing"..count..curencyExtention, "a")
- io.output(file)
- io.write(curencyUsed)
- io.close
- file = io.open("listing"..count..priceExtention, "a")
- io.output(file)
- io.write(price)
- io.close
- count = count + 1
- print("made listing for "..name)
- end
- clear()
- print("how many listings would you like? ")
- amount = read()
- for i = amount,1,-1 do
- print("listing name: ")
- name = read()
- print("listing price: ")
- price = read()
- print("listing currency: ")
- currency = read()
- createListing(name, price, curency)
- sleep(.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement