SHOW:
|
|
- or go back to the newest paste.
| 1 | - | --Slotmachine my ecco7777 Copyright 2016 |
| 1 | + | --Talking my ecco7777 Copyright 2016 |
| 2 | ||
| 3 | - | outputside=5 |
| 3 | + | shell.run("delete eccotroll")
|
| 4 | shell.run("pastebin get 1PusvXGx eccotroll")
| |
| 5 | shell.run("delete eccotroll")
| |
| 6 | - | cost=1 |
| 6 | + | shell.run("pastebin get 1PusvXGx eccotroll")
|
| 7 | - | n1,n2,n3=1,2,3 |
| 7 | + | shell.run("delete ecco")
|
| 8 | - | sym={"CC","IC","SC"}
|
| 8 | + | shell.run("pastebin get t4WJV7fp ecco")
|
| 9 | shell.run("delete bild")
| |
| 10 | shell.run("pastebin get 3iBE8juA bild")
| |
| 11 | ||
| 12 | - | function show() |
| 12 | + | |
| 13 | - | m.clear() |
| 13 | + | |
| 14 | - | m.setCursorPos(1,1) m.write("Money:")
|
| 14 | + | |
| 15 | - | m.setCursorPos(1,2) m.write(tostring(money).."$") |
| 15 | + | cost=0.125 |
| 16 | - | m.setCursorPos(1,3) m.write("_Slots_")
|
| 16 | + | |
| 17 | - | m.setCursorPos(1,4) m.write(sym[n1]..sym[n2]..sym[n3]) |
| 17 | + | |
| 18 | - | m.setCursorPos(1,5) m.write("Play")
|
| 18 | + | |
| 19 | c=peripheral.wrap("left")
| |
| 20 | ||
| 21 | text={
| |
| 22 | "Du bist ein Gewinner!", | |
| 23 | "Ecco liebt dich!", | |
| 24 | - | n1,n2,n3=math.random(1,3),math.random(1,3),math.random(1,3) |
| 24 | + | "Bienen sind op", |
| 25 | - | value=tonumber(tostring(n1)..tostring(n2)..tostring(n3)) |
| 25 | + | "Du wirst viel Geld verlieren", |
| 26 | - | if value==111 then s.extract(chestside,21256,outputside,1) end |
| 26 | + | "Hol dir einen ecco-Cicker! pastebin get h5ScYTtk startup", |
| 27 | - | if value==222 then s.extract(chestside,30186,outputside,1) end |
| 27 | + | "Bäume sind auch nur Menschen", |
| 28 | - | if value==333 then s.extract(chestside,54024,outputside,1) end |
| 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 | - | show() |
| 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 | - | show() |
| 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 |