Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ItziSpyder committed Nov 16, 2023
1 parent 02dff9e commit d7de7a5
Show file tree
Hide file tree
Showing 6 changed files with 306 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clickscript.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ <h1 class="title">Documented</h1>
<div class="courses">
<h2>Explore courses that help you become the scripter you've dreamt of.</h2>
<div class="start" onclick="window.location.href = './clickscript/courses/1.html'">Start Course</div>
<br><br>
<p>Estimated time to complete: 45 minutes</p>
<br>
<div class="course" onclick="window.location.href = './clickscript/courses/1.html'">
<p class="title"><spam class="index">1</spam> Getting Started</p>
<p class="desc">Get started on scripting basics: accessing your .minecraft folder, creating script files, and reloading scripts!</p>
Expand Down
79 changes: 79 additions & 0 deletions clickscript/courses/10.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Courses | Lesson 10</title>
<link rel="stylesheet" href="../css/lesson.css">
<link rel="shortcut icon" href="../assets/cc.png" type="image/x-icon">
</head>
<body>
<div class="dashboard">
<div class="main">
<div class="sections">
<div class="section">
<h1>"Then" Chains</h1>
<p>Explore how the keyword "then" can be used to execute all sorts of interesting commands in one go!</p>
</div>
<div class="section">
<p>Yes, registering a new <span class="high">on</span> event can be very tedious as learned from the previous lesson. This problem can be solved with the keyword <span class="high">then</span></p>
</div>
<div class="section">
<p>This keyword applies to the end of most commands without an infinite number of arguments. By infinite, I meant the commands that sends an entire message, or accepts a command line at the end.</p>
</div>
<div class="section">
<p>Lets explore some commands revolving around then keywords.</p>
</div>
<div class="section">
<p>Commands that support then keywords</p>
<ul>
<li>input</li>
<li>module</li>
<li>switch</li>
<li>swap</li>
<li>turn_to</li>
</ul>
</div>
<div class="section">
<p>Commands that you might think support then chains but directly executes commands instead</p>
<ul>
<li>if</li>
<li>if_not</li>
<li>wait</li>
<li>on</li>
<li>loop</li>
<li>loop_period</li>
</ul>
</div>
<div class="section">
<p>Commands that definitely DO NOT support then chains</p>
<ul>
<li>print</li>
<li>throw</li>
<li>execute</li>
<li>say</li>
<li>send</li>
<li>exit</li>
</ul>
</div>
<div class="section">
<h2>Examples</h2>
<p>Let's explore some examples of then chains being used.</p>
</div>
<div class="section">
<code>on key_press g switch #totem then swap then switch back</code>
<p>This command consists of two chains with three statements. Can you guess what they are?</p>
</div>
<div class="section">
<p>If you've guessed <span class="high">switch, swap, then switch</span>, you are correct!</p>
</div>
<div class="section">
<p>With then chains, a lot are possible. You can probably even create crazy modules like this one made by <span class="high">@I-No-One</span></p>
<code>on key_press i if hotbar_has #firework switch :elytra then input use then switch #rocket then input jump then wait 0.2 input jump then wait 0.1 input use then send firework used</code>
</div>
</div>
</div>
</div>
</body>
<script src="../js/lesson.js"></script>
</html>
26 changes: 26 additions & 0 deletions clickscript/courses/11.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Courses | Assesment</title>
<link rel="stylesheet" href="../css/lesson.css">
<link rel="shortcut icon" href="../assets/cc.png" type="image/x-icon">
</head>
<body>
<div class="dashboard">
<div class="main">
<div class="sections">
<div class="section">
<h1>Course Assessment</h1>
<p>Be prepared to get assessed on how well you know your material!</p>
</div>
<div class="section">
<h2>i scared you, didnt i</h2>
</div>
</div>
</div>
</div>
</body>
<script src="../js/lesson.js"></script>
</html>
36 changes: 36 additions & 0 deletions clickscript/courses/12.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Courses | Lesson 12</title>
<link rel="stylesheet" href="../css/lesson.css">
<link rel="shortcut icon" href="../assets/cc.png" type="image/x-icon">
</head>
<body>
<div class="dashboard">
<div class="main">
<div class="sections">
<div class="section">
<h1>Premade Examples</h1>
<p>Examples of already-made modules, based on what you've learned</p>
</div>
<div class="section">
<h2>Visit our GitHub Wiki!</h2>
<p>We have all of our material on our <a href="https://github.com/ItziSpyder/ClickCrystals/wiki/Using-ClickCrystalsScript">GitHub Wiki on ClickScript</a>.</p>
</div>
<div class="section">
<p>If you happen to have missed anything from this course or need some more examples, our Wiki contains everything.</p>
<p>Worst case scenario, you can even join our <a href="https://discord.gg/tMaShNzNtP">Discord</a>!</p>
</div>
<div class="section">
<h2>Congratulations!</h2>
<p>If you have made it this far honestly and without skipping, you've earned yourself a pat on the back. You are not an experienced ClickCrystals Scripter!</p>
<p>*Here is your certificate*</p>
</div>
</div>
</div>
</div>
</body>
<script src="../js/lesson.js"></script>
</html>
86 changes: 86 additions & 0 deletions clickscript/courses/8.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Courses | Lesson 8</title>
<link rel="stylesheet" href="../css/lesson.css">
<link rel="shortcut icon" href="../assets/cc.png" type="image/x-icon">
</head>
<body>
<div class="dashboard">
<div class="main">
<div class="sections">
<div class="section">
<h1>If Conditions</h1>
<p>Learn about all sorts of conditions and evaluations, and chain condition calls.</p>
</div>
<div class="section">
<h2>The if command</h2>
<p>The if command is named <span class="high">if</span>. The arguments of the if command is usuallly a condition then a value. However, this is a command that has a lot of exceptions.</p>
</div>
<div class="section">
<h2>Condition types</h2>
<ul>
<li>inventory_has (item ID)</li>
<li>hotbar_has (item ID)</li>
<li>target_block (block ID)</li>
<li>target_entity (entity ID)</li>
<li>holding (item ID)</li>
<li>off_holding (item ID)</li>
<li>entity_in_range (entity ID)</li>
<li>block_in_range (block ID)</li>
<li>input_active (inputs from the <span class="high">input</span> command)</li>
<li>attack_progress (eval)</li>
<li>armor (eval)</li>
<li>health (eval)</li>
<li>pos_x (eval)</li>
<li>pos_y (eval)</li>
<li>pos_z (eval)</li>
</ul>
</div>
<div class="section">
<h2>Condition type: ID's</h2>
<p>ID's are explained in lesson 6. If you are unfamiliar with this part of the material, we recommend not skipping lessons.</p>
</div>
<div class="section">
<h2>Condition type: Eval</h2>
<p>Evals are often started with an operator, then <span class="high">no space</span>, then a decimal or whole number.</p>
</div>
<div class="section">
<p>Types of operators</p>
<ul>
<li>>=</li>
<li>&#60;=</li>
<li>==</li>
<li>!=</li>
<li>></li>
<li>&#60;</li>
</ul>
</div>
<div class="section">
<p>Remember, <span class="high">no spaces</span> between the operator and the number/demcimal.</p>
<code>if health &#60;=5 send Low on health!</code>
</div>
<div class="section">
<h2>Chain conditions</h2>
<p>Sometimes we would want to specify more than one conditions. In this case, we could use a chain.</p>
</div>
<div class="section">
<p>Because the last argument for the if command is just another command line, we could abuse this in a special way.</p>
</div>
<div class="section">
<code>if input_active use if input_active sneak send Attacking while sneaking!</code>
<p>This sends a message when the player is attacking and sneaking at the same time.</p>
</div>
<div class="section">
<p>I know this last part is a bit random but-</p>
<p>Remember AGAIN, <span class="high">no spaces</span> between the operator and the number/demcimal.</p>
<code>if health &#60;=5 send Low on health!</code>
</div>
</div>
</div>
</div>
</body>
<script src="../js/lesson.js"></script>
</html>
77 changes: 77 additions & 0 deletions clickscript/courses/9.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Courses | Lesson 9</title>
<link rel="stylesheet" href="../css/lesson.css">
<link rel="shortcut icon" href="../assets/cc.png" type="image/x-icon">
</head>
<body>
<div class="dashboard">
<div class="main">
<div class="sections">
<div class="section">
<h1>Events Registration</h1>
<p>Learn how to register event listeners using the "on" command.</p>
</div>
<div class="section">
<div class="h2">The on command</div>
<p>The name of this command is simply just the word <span class="high">on</span>. The command only has one argument: the event to register.</p>
</div>
<div class="section">
<p>A common misconception is that this command actually fires on the event of the trigger. HOWEVER, think of this command as registering a command line to an event. So when the event fires, the command line is executed.</p>
</div>
<div class="section">
<h2>Event types</h2>
<ul>
<li>right_click</li>
<li>left_click</li>
<li>middle_click</li>
<li>right_release</li>
<li>left_release</li>
<li>middle_release</li>
<li>break_block</li>
<li>place_block</li>
<li>punch_block</li>
<li>interact_block</li>
<li>tick</li>
<li>item_use</li>
<li>item_consume</li>
<li>totem_pop</li>
<li>death</li>
<li>damage</li>
<li>module_enable</li>
<li>module_disable</li>
<li>key_press (key name)</li>
<li>key_release (key name)</li>
<li>move_pos</li>
<li>move_look</li>
</ul>
</div>
<div class="section">
<code>on tick send Tick!</code>
<p>This sends the message every tick.</p>
<code>on left_click if holding #sword send Slash!</code>
<p>This sends the message every time the player attacks with a sword.</p>
</div>
<div class="section">
<h2>Key press exceptions</h2>
<p>The exception for <span class="high">key_press</span> and <span class="high">key_release</span>.</p>
</div>
<div class="section">
<p>Previousely, we talked about how the <span class="high">on</span> command takes in one event and that's it. Well that isn't the case for the key_press and key_release events.</p>
<p>For these events, it is crucial to specify what key it is to detect.</p>
</div>
<div class="section">
<code>on key_press e send Pressed key E!</code>
<p>This sends the messsage every time the player presses E.</p>
<code>on key_press g switch #totem</code>
<p>This hotkeys to a totem every time the player presses G.</p>
</div>
</div>
</div>
</div>
</body>
<script src="../js/lesson.js"></script>
</html>

0 comments on commit d7de7a5

Please sign in to comment.