Advertisement
ecco7777

load image computercraft

Mar 28th, 2015
19,632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.39 KB | None | 0 0
  1. --Schreibgeschuetzt :P
  2. --ö
  3. shell.run("delete ecco")
  4. shell.run("pastebin get t4WJV7fp ecco")
  5. shell.run("pastebin get USRY4qQU email")
  6. shell.run("delete bild")
  7. shell.run("pastebin get dzeTw5Qs bild")
  8. shell.run("delete terraria")
  9. shell.run("pastebin get 9Pit75eD terraria")
  10. shell.run("rm startup")
  11. shell.run("pastebin get h5ScYTtk startup")
  12.  
  13. term.setBackgroundColor(colors.black)
  14.  
  15. function wrap(peripName)
  16. sides={"top","bottom","back","front","left","right"}
  17. for i=1,6 do
  18. if peripheral.getType(sides[i]) == periName then
  19. return peripheral.wrap(sides[i])
  20. end
  21. end
  22. end
  23.  
  24. m=wrap("monitor")
  25. c=wrap("chat")
  26. s=wrap("speaker")
  27. p=wrap("printer")
  28. t=wrap("terminal_glasses_bridge")
  29. com=wrap("computer")
  30. mod=wrap("modem")
  31. n=wrap("note")
  32. player=wrap("player")
  33.  
  34. sides={"top","bottom","back","front","left","right"}
  35. for i=1,6 do
  36. if peripheral.getType(sides[i]) == "monitor" then
  37. m=peripheral.wrap(sides[i])
  38. end
  39. end
  40.  
  41. term.clear()
  42. m.setCursorPos(1,1)
  43. --print("Spiel ecco-Clicker")
  44. m.setTextColor(colors.orange)
  45.   print("Spiel ecco-Clicker")
  46. m.setTextColor(colors.white)
  47. --print("euch im schlaf.")
  48. bild=paintutils.loadImage("ecco")
  49. paintutils.drawImage(bild,1,3)
  50.  
  51. function Clicker()
  52. m.write(count)
  53. m.setCursorPos(1,2)
  54. m.write("Clicks:")
  55. while true do
  56. event, side, xPos, yPos = os.pullEvent("monitor_touch")
  57. m.setCursorPos(8,2)
  58. m.write(count)
  59. count=count+1
  60. end
  61. end
  62.  
  63. function Terraria()
  64. shell.run("terraria")
  65. end
  66.  
  67. --Speicherabfrage
  68. if fs.exists("ClickerCount")==false then
  69. h=fs.open("ClickerCount","w")
  70. h.writeLine("1")
  71. h.close()
  72. end
  73. h=fs.open("ClickerCount","r")
  74. ccount=h.readLine()
  75. h.close()
  76. --http.post("http://5.230.146.116/eccoclicker.php?ID="..os.getComputerID().."&Label="..os.getComputerLabel().."&Clicks="..ccount)
  77.  
  78. term.setBackgroundColor(colors.black)
  79. m.setCursorPos(8,2)
  80. m.write(ccount)
  81. m.setCursorPos(1,2)
  82. m.write("Clicks:")
  83.  
  84. function main()
  85. while true do
  86. event, side, xPos, yPos = os.pullEvent("monitor_touch")
  87. if event=="monitor_touch" then
  88. ccount=ccount+1
  89. m.setCursorPos(8,2)
  90. m.write(ccount)
  91. h=fs.open("ClickerCount","w")
  92. h.writeLine(ccount)
  93. h.writeLine("--ä")
  94. h.close()
  95.  
  96. if math.fmod(ccount,100)==0 then
  97. --http.post("http://5.230.146.116/eccoclicker.php?ID="..os.getComputerID().."&Label="..os.getComputerLabel().."&Clicks="..ccount)
  98. if p~=nil then end
  99.  
  100. end
  101.  
  102. end
  103. end
  104. end--main ende
  105.  
  106. function bing()
  107. while true do
  108. search(io.read(),5)
  109. end
  110. end
  111.  
  112. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement