r/ComputerCraft • ComputerCrafter • May 14 '21

I made 3 programs for a computercraft casino.

113 Upvotes

14 comments sorted by

3

u/wv1106 ComputerCrafter May 14 '21 edited Jan 04 '25

MPORTANT!: I highly recommend not using these programs because I made them when I wasn't that experienced. Because of this, they are really easy to cheat. If you want an updated and overall better casino system, just send me a message.

Russian roulette installer: https://pastebin.com/6vUK3ydi

command: pastebin run 6vUK3ydi

slotmachine installer: https://pastebin.com/58Dr0iwP

command: pastebin run 58Dr0iwP

cashier: https://pastebin.com/GBbNYUnp

command: pastebin get GBbNYUnp startup

I

1

u/fatboychummy May 31 '21

Please note that security-through-obscurity will not work very well for you. Lua is very easy to reverse-engineer, and from your code I can tell it's quite easy to just give myself infinite credits then cash out.

local handle = io.open("disk/creds.lua", 'w')
handle:write("0987498011066011999999999999999911077011")
handle:close()

3

u/KillerDuper May 16 '21

The cashier and russian roulette game worked fine for me, but when i had a friend try it his card seemed to randomly gain loads of money, any idea what i could be doing wrong?

1

u/wv1106 ComputerCrafter May 16 '21 edited May 16 '21

Do you know when he gained the money? (While playing a serten game or something)

1

u/KillerDuper May 16 '21

right after dying in Russian roulette, and he definitely didn't win that much. Also right after withdrawing diamonds from his disk.

1

u/wv1106 ComputerCrafter May 16 '21

Was the server you play on laggy? Because I installed it on a server with my friends once and there it can be really laggy. It happend there too when it started to lagg. If that was the case i sadly can't do anything about that.

1

u/KillerDuper May 17 '21

Strange, the server wasnt laggy at all.

2

u/topHatCatGoBrrrrr Apr 11 '22

im confused on how you stored the credits on the floppy.. it ried look ing at the cashier code and i couldnt figure it out.

2

u/wv1106 ComputerCrafter Apr 12 '22

Tbh, it's a really bad way I came up with to make it harder for people to change there balance and steal all the diamonds by hiding it between some random numbers. I advise you to change it if you are going to use it with more experienced players because it is a really shitty way of doing it.

1

u/Timas_brope ComputerCrafter Jan 06 '24

Your security isnt that good tho... And with source code i can easily find the number or just spam gibberish and get something... In all of my banks and casinos i made a server in which all of transactions were made. I only saved id and a secret on a card. Secret were generated on card creation and just was used to decrypt server answers and encrypt requests, to prove that you are that card ID owner. Yeah, i writed balance in a label, but it was just a decoration.

1

u/wv1106 ComputerCrafter Jan 06 '24

Ye I know... this was just a program I made when I just got started with this mod. My friends didn't know how to use the mod back then so there was no risk.

My most recent casino programm uses cards with a unique id (long string of charachters) and a central computer where all the data is saved.

1

u/Rusty7Junker7 Jul 02 '24

do u have a pastebin for this? or able to make a new post?

1

u/[deleted] Jun 13 '21

I really love this but i wish there was a black jack game is there a easy way i can add this.

1

u/disduke_panda Sep 20 '21

Did you ever find a way?