Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("front")
- rednet.broadcast("essasi")
- mon = peripheral.wrap("back")
- shell.run("monitor back outil")
- while close~=1 do
- event, side, xpos, ypos = os.pullEvent("monitor_touch")
- print("xpos:"..xpos.." ypos:"..ypos)
- if(((xpos>4) and (xpos<15) ) and ((ypos>1) and (ypos<5))) then
- rednet.broadcast("jouer")
- shell.run("monitor back go")
- close = 1
- end
- end
- mon.setCursorPos(18,1)
- mon.write("$")
- while true do
- event,side,xpos,ypos = os.pullEvent("monitor_touch")
- print("xpos:"..xpos)
- if(xpos == 18) then
- print("envoie")
- shell.run("monitor back money")
- mon.setCursorPos(1,1)
- mon.setBackgroundColor(colors.lime)
- mon.write("Attente de credit")
- mon.setCursorPos(1,2)
- mon.setBackgroundColor(colors.red)
- mon.write("l'ingot de fer +1")
- mon.setCursorPos(1,3)
- mon.setBackgroundColor(colors.grey)
- mon.write("l'ingot d'or +10")
- mon.setCursorPos(1,4)
- mon.setBackgroundColor(colors.yellow)
- mon.write("diamant +80")
- mon.setCursorPos(1,5)
- mon.setBackgroundColor(colors.blue)
- mon.write("netherstar +20000")
- rednet.send(44,"demande")
- id,mess = rednet.receive()
- print("vous avez creditez de "..mess)
- mon.setCursorPos(2,3)
- mon.write("money :"..mess.." credits")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement