Skip to content

GoldenD60/Skript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

Welcome to the Skript Documentation (copy from online documentation)

Context

  1. Installation
  2. Installation for Python
  3. Installation for VBScript
  4. Getting Started
  5. How To Run
  6. Text-Based Commands
  7. Saying "Hello World"
  8. Getting User Input
  9. Displaying a shape in ASCII text
  10. Integer-Based Commands
  11. Calculating '2 + 2'

Installation

Skript is a lightweight easy-to-use coding language for games. To install, Check if you have these programs installed:

Python and VBScript

You will need Windows 7 and above or Linux or Mac OS X.

Python

Windows

Linux/Unix

Max OS X

Other

VBScript

Windows XP

Mac

Linux: Run this in the terminal: sudo apt-get install wine

For more details visit the python website.

Getting Started

How to run

To run it, follow these steps:

  1. Open the Command Prompt/Terminal
  2. Type cd/ls then a space after
  3. In File Explorer/Finder, find where you stored the repository.
  4. Go into the folder called 'bin'
  5. Drag skript.bat into the Command Prompt/Terminal
  6. Hit enter in the Command Prompt/Terminal

Text-Based Commands

Saying "Hello World"

Let's do something basic, also you might be confused because the Command Prompt/Terminal says Do you want to open the console or the skript editor? just ignore this message for now. Let's talk about how it's done. Skript is just like you are typing in English sentences if you want it to say something you put say but, Skript need some 'Arguments' or some people call them 'Parameters' but Arguments and Parameters are the exact same thing. Basically, it needs some information to run the command. So if we go back to the Command Prompt/Terminal and it wants to know if you want to open the console or the skript editor. Because you are just starting out with no experience, just type console and you need to spell it exactly. Once you have typed in that, it's going to load the console up. You should have something like this:

Do you want to open the console or the skript editor? console
Skript 1.0.4
Type "help" for more information.
>

Obviously, I probably don't have the same Skript version as you, but it doesn't really matter too much. You can type in say and it should say back print > Now, this is where the Arguments comes in. Type in 'Hello World!' your Command Prompt/Terminal should look like this:

> say
print > Hello World!
Hello World!
> 

Getting User Input

Now the rest of the coding is simple. To get input from the user just type quite simply 'get input from user', it should look something like this:

Skript 1.0.4
Type "help" for more information.
> get input from user

Displaying a shape in ASCII text

Let's create a shape in ASCII text, firstly type display in ASCII text then you can display either a triangle or square. I'm going to type square, On my screen, it looks something like this:

Skript 1.0.4
Type "help" for more information.
> display in ASCII text
asciidisplay [Triangle/Square]> square
___________
|         |
|         |
|         |
|_________|
>

When you type in triangle, it looks something like this:

Skript 1.0.4
Type "help" for more information.
> display in ASCII text
asciidisplay [Triangle/Square]> triangle
    /\
   /##\
  /####\
 /######\
/________\
>

Integer-Based Commands

Calculating '2+2'

I need some math for my maths homework! The good thing is I have got skript, Let's do some calculating. To start doing some math, type calculate now this command is unique to every other command. Because it needs more than 1 argument, so type the operation, in this case, '+', then the first number of the calculation. What I mean by this is let's say we have a+b, the first number of the calculation is a. Let's do the calculation 2 + 2, Make sure that when you do your calculation. Just make sure your numbers are under 2 billion or 2,147,483,647 or else it will show you an error. So let's type in the first number of the calculation '2', then. Now the last number of the calculation, 2, your screen should look like this:

Skript 1.0.4
Type "help" for more information.
> calculate
mathf(operator) > +
mathf(int[1]) > 2
mathf(int[2]) > 2
4
>

Executable Commands

Exiting Skript

By typing 'Exit' we can exit skript. Finally! I am done with this documentation, please can I get a cup of coffee after all this work? * sips coffee * what a great way to end this 143-lines of documentation, at last!

About

Skript is a Programming Language with easy-to-learn commands

Resources

Stars

Watchers

Forks

Packages

No packages published