ComputerCraft Coding Challenge 1 » Item Shop

Описание к видео ComputerCraft Coding Challenge 1 » Item Shop

Prerequisites:
Lesson 1-8 » User Input & String Manipulation -    • ComputerCraft Lua 1-8 » Fundamentals ...  

Next Lesson: Coming Soon!
Full Playlist:    • ComputerCraft Lua Tutorials  

Thank you again for your patience guys. I'm sorry for no subtitles, but this took way longer to edit than it should have and I didn't want to delay the upload any longer. I leave all my videos open for anyone to add captions, so if you know how to do that it would be much appreciated.

This is our first Coding Challenge. In this challenge, I'm giving you guys the task of creating a program that simulates buying and selling items in an item shop from an RPG like game. This is an optional challenge to help you practice what you've learned from my lessons. If you want to participate, there are required instructions you have to fulfill, and there are optional ones. I'll show a demonstration in the video of how I would write my program based on the instructions given. Below there will be a link to the pastebin for my item shop program. If you would like feedback on yours, feel free to post a pastebin link to your own program in the comments. Anyone is open to constructive criticism. Make sure to use Lua as the syntax highlighting when making your pastebin post so that it's easier for the rest of us to read your code.

Here are the full instructions:
Required:
--Give the shop an inventory of some items, minimum 4 unique items.
--Set a price for each item in the shop.
--Allow the player to 'buy' any amount of 1 item.
--Give the player an inventory.
--Give the player a wallet with some balance.
--Do not allow the player to buy more than they can afford.
--Show a message at the end of the transaction that shows the changes to the player's inventory and wallet balance.
Optional:
--Give the shop a limited stock.
--Do not allow the player to buy more than the shop has.
--Give the player some already owned items, minimum 4 unique items. They may match the shop items.
--Create a process for the player to sell their items to the shop that is similar to buying.
--Do not allow the player to sell more than what they have.
--Show a message at the end of the transaction that shows the changes to the shop's and player's --inventory and wallet balance.

And here's my item shop program: https://pastebin.com/hy5fyUxF

Relevant Resources
-----------------------------------------------------------------------------------------
Lua Documentation: https://www.lua.org/​
CC:Tweaked Wiki: https://tweaked.cc/
Pastebin: https://pastebin.com/

Additional Resources
-----------------------------------------------------------------------------------------
Official Minecraft Wiki: https://minecraft.gamepedia.com/Minec...
Official Minecraft Forums: https://www.minecraftforum.net/​
Latest ComputerCraft Download: https://www.curseforge.com/minecraft/...
CCEmuX Download: https://emux.cc/
Community Discord:   / discord  

Credits and Links
-----------------------------------------------------------------------------------------
Music:
Big Giant Circles - You Can Have Mine -    • Big Giant Circles - "You Can Have Mine"  
Big Giant Circles - Nerd Appropriate Theme -    / biggiantcircles  
Big Giant Circles - Vindicate Me feat. Random aka Mega Ran -    / biggiantcircles  
Big Giant Circles - Buzzsaw (featuring zircon) -    • Big Giant Circles - Impostor Nostalgi...  
Big Giant Circles - The Glory Days -    • Big Giant Circles - The Glory Days: "...  
Big Giant Circles - Houston -    • Big Giant Circles - The Glory Days: "...  
Music License: https://biggiantcircles.tumblr.com/po...
Scripted, Recorded and edited by RaiuPlays

00:00 - Intro
01:19 - Instructions
03:02 - Item Buying (Required Instructions)
09:16 - Error Checking (Required Instructions)
12:15 - Item Selling (Optional Instructions)
26:21 - Outro

Комментарии

Информация по комментариям в разработке