2
u/Roodiger23 Aug 12 '21
Hmm that's weird that they downloaded blank. I'm not at my computer right now, but I'm on the latest CC for 1.16.5.
When you manually added the files, did you put them in the right folders? The diamonds and title scripts need to be in the screens folder
1
u/Ouroboros9076 Aug 12 '21
Yessir, diamonds and title are in the screens folder and then I changed the apis folder to be named encrypt bc I thought the apis/sha might be confused by the apis directory added by CC. Unless.. is the sha api supposed to be added to the CC apis? Other than that thought I'm not really sure what's goin on, but I'll let you know if I figure it out!
1
u/Roodiger23 Aug 12 '21
Hmm nope, apis was just what I named the folder. You're on 1.16.5? Using advanced computers?
1
u/Ouroboros9076 Aug 12 '21
1.6.4 using tekkit modpack, I am using advanced computer and screens
2
u/Roodiger23 Aug 12 '21
Oooh I just checked and CC 1.58 is from the old computer craft and not from tweaked. I'm not sure how that will mess with the rest of the code, but I believe that at least for that error, require didn't exist back then. Try changing require "/apis/sha" to os.loadAPI("/apis/sha") on line 5 in the title file
2
u/Ouroboros9076 Aug 12 '21
That got rid of that error! I also found out that 'paintutils.drawBox' and 'paintutils.drawFilledBox' are not supported by CC versions lower than 1.64, after disabling all of those the game runs! Thank you, very excited to play and show my friends
1
u/Roodiger23 Aug 12 '21
Awesome! I'm honestly surprised it runs since I never tested it on the OG CC haha but glad it works! Let me know if you come across any bugs :)
2
u/Ouroboros9076 Aug 13 '21
Didn't come across any glitches not caused by the version issues, but wanted to let you know I made a couple edits and it completely works with the old CC! Recreated the filled boxes and fixed some screen refreshing issues. I even hooked up a command block to use the diamond rewards. This is a pretty cool game and the logic seems pretty intuitive and readable, just wanted to let you know since you seemed to think that it was bad code or something. It's a very fine project especially for someone who's new to Lua!
1
u/Roodiger23 Aug 13 '21
Hey thanks a lot! I really appreciate the kind words and the feedback! Feel free to make a new Pastebin with your changes, then we can link that for people using the old CC!
I'm glad you're liking it! I made it as a fun little game for my server, and it's been awesome competing to get the highest score. My biggest gripe right now is that the leaderboard shows the current diamond count, not the total diamonds earned, so I need to change that.
I do know how to program in other languages, it's just some stuff I would usually do doesn't work the same way in Lua haha so I'm just assuming there are better ways to do some of the stuff that I'm doing, but I'm glad you were able to read through it and it's understandable! I always try to code so that I can figure out what's going on if I revist it a year later haha
2
u/Ouroboros9076 Aug 12 '21
Hi, this looks very cool. I try running and I get "title:5: attempt to call nil"
I've tried changing the directory name and moving the sha program directly into the screens folder but can't seem to get it working, any idea what might be wrong?
2
u/Roodiger23 Aug 12 '21
You installed it by downloading the install Pastebin and just running install?
Then when you reboot the PC what happens?
1
u/Ouroboros9076 Aug 12 '21
Thanks for the quick response! I tried this method and the files were created blank so I manually pasted the programs into the correct filenames and ran startup.lua, when I reboot the PC it does not do anything. Running CC V1.58 btw


7
u/Roodiger23 Aug 09 '21 edited Aug 09 '21
Hey guys! I've been working on a cookie clicker clone in computer craft.
You guys can check it out if you want! It plays like cookie clicker basically.
I got the idea from reading an old computer craft post about cookie clicker, and wanted to give it a shot for myself!
First you set up a new game, with a username and a password. Then it loads you into the game. You can play for however long you want. If you close the game, or the server restarts, or anything, it will save the game and you will be able to load it with your username and password.
If you are using a command computer, it will give the player a diamond when you hit certain diamond milestones (Still need more work here, it only gives a few diamonds). If you are using and advanced computer, it will ignore that feature.
The password is hashed when it is saved, so it should be secure enough! (Thanks to Anavrins and PG231 from the discord server)
To get the game set up, you need to have some advanced monitors set up, 5 horizontally, 3 vertically. Then you need to have an advanced or command computer on the right side of the monitor.Then you use the following to start the game:
pastebin get d9b7h8D4installYou can check out the code here:
Install code:https://pastebin.com/d9b7h8D4
Startup code:https://pastebin.com/BgTaVCap
Title code:https://pastebin.com/NYQnJNRr
Main game code:https://pastebin.com/nskTfHev
And yes, I know that the code is probably awful. This is my first time using Lua. Any suggestions for how to improve it is welcome! I know that most of it can probably be improved haha Just try to be nice