ecco7777

Talking ecco

Jan 6th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Talking my ecco7777 Copyright 2016
  2.  
  3. shell.run("delete eccotroll")
  4. shell.run("pastebin get 1PusvXGx eccotroll")
  5. shell.run("delete eccotroll")
  6. shell.run("pastebin get 1PusvXGx eccotroll")
  7. shell.run("delete ecco")
  8. shell.run("pastebin get t4WJV7fp ecco")
  9. shell.run("delete bild")
  10. shell.run("pastebin get 3iBE8juA bild")
  11.  
  12. chestside=2
  13. --0 for down, 1 for up, 2 for -Z, 3 for +Z, 4 for -X and 5 for +X.
  14. money=0
  15. cost=0.125
  16.  
  17. m=peripheral.wrap("top")
  18. s=peripheral.wrap("right")
  19. c=peripheral.wrap("left")
  20.  
  21. text={
  22. "Du bist ein Gewinner!",
  23. "Ecco liebt dich!",
  24. "Bienen sind op",
  25. "Du wirst viel Geld verlieren",
  26. "Hol dir einen ecco-Cicker! pastebin get h5ScYTtk startup",
  27. "Bäume sind auch nur Menschen",
  28. "Frag mich nach Tina",
  29. "Ich der Herr der Bienen",
  30. "Danke fuer dein Geld, es wird nicht gespendet.",
  31. "Vanilla braucht Computercraft!"}
  32.  
  33. function play()
  34. if money>=cost then
  35. money=money-cost
  36. shell.run("monitor top bild ecco")
  37. m.setCursorPos(1,33) m.write("Money: "..tostring(money))
  38. c.say(text[math.random(1,10)],10)
  39. sleep(1)
  40. else
  41. shell.run("monitor top bild eccotroll")
  42. m.setCursorPos(1,33) m.write("Money: "..tostring(money))
  43. c.say("Für 1.25$ rede ich mit dir :)",10)
  44. sleep(1)
  45. end
  46. end
  47.  
  48. function payin()
  49. if id==21256 then money=money+(0.125*amount) end
  50. if id==30186 then money=money+(1*amount) end
  51. if id==54024 then money=money+(8*amount) end
  52. if id==86792 then money=money+(64*amount) end
  53. if id==119560 then money=money+(512*amount) end
  54. s.sort(chestside,amount)
  55. end
  56.  
  57. shell.run("monitor top bild ecco")
  58. while true do
  59. shell.run("monitor top bild ecco")
  60. m.setCursorPos(1,33) m.write("Money: "..tostring(money))
  61. event,id,amount=os.pullEvent()
  62. if event=="isort_item" then payin() end
  63. if event=="monitor_touch" then play() end
  64. end
Add Comment
Please, Sign In to add comment