Custom Extra Scripts (TeaScript)

This is a list of useful custom scripts made for the TeaScript language. Feel free to use any of the scripts you find here, and contribute any script that you may find useful!

For an explanation on how to create a custom script, check here.

Adding Your Own Script
This is a template so you can add your own functions to this list.

Name of Script
Created by: user

Requisites: optional

Here is an explanation or notes of the function. Make sure to underline number values, and italicize string values.

rad2deg
Created by: SetaYoshi

Requisites: None

Converts a radian value to degrees

deg2rad
Created by: SetaYoshi

Requisites: None

Converts a degree value to radians

rec2polr
Created by: SetaYoshi

Requisites: None

Returns the magnitude in polar form of rectangular numbers

rec2pola
Created by: SetaYoshi

Requisites: None

Returns the angle in polar form of rectangular numbers

rec2polad
Created by: SetaYoshi

Requisites: None

Returns the angle in degrees in polar form of rectangular numbers

pol2recx
Created by: SetaYoshi

Requisites: None

Returns the x component in rectangular form from polar numbers

pol2recy
Created by: SetaYoshi

Requisites: None

Returns the x component in rectangular form from polar numbers

podl2recx
Created by: SetaYoshi

Requisites: None

Returns the x component in rectangular form from polar numbers in degrees

pold2recy
Created by: SetaYoshi

Requisites: None

Returns the x component in rectangular form from polar numbers

tolowercase
Created by: SetaYoshi

Requisites: An user-variable called tmp

Converts all letters to lower case.

lowertext

touppercase
Created by: SetaYoshi

Requisites: An user-variable called tmp

Converts all letters to uppercase.

uppertext

getColorC
Created by: SetaYoshi

Requisites: none

Converts a SMBX Color and returns a component.

For component type use:


 * 1: alpha value
 * 2: red value
 * 3: green value
 * 4: blue value

component

name2key
Created by: SetaYoshi

Requisites: none

Converts the name of a key to a number to be used by the  function. Use the player value to choose what player (1: player 1, 2:player 2)



keypressvalue =

convertify
Created by: _FyreNova

Requisites: none



Converts units. If you use, it will convert from frames to the unit. If you use, it will convert from the unit to frames. Units can be seconds, milliseconds, and minutes.

secondtimer =

logn
Created by: SetaYoshi

Requisites: None

Does a log operation at any base

sqrn
Created by: SetaYoshi

Requisites: None

Does a root at any base

factorial
Created by: SetaYoshi

Requisites: None

Performs a factorial operation

modul
Created by: SetaYoshi

Requisites: None

A more accurate modulus operator

lin_interp
Created by: SetaYoshi

Requisites: None

Performs a linear interpolation. Given 2 pairs of points, it will find a missing y with a given x

distance
Created by: SetaYoshi

Requisites: None

Finds the distance between 2 given points

min
Created by: SetaYoshi

Requisites: None

Returns the smaller number

max
Created by: SetaYoshi

Requisites: None

Returns the larger number

midd
Created by: SetaYoshi

Requisites: None

Returns the middle number

isInteger
Created by: SetaYoshi

Requisites: None

Returns the middle number

rand
Created by: SetaYoshi

Requisites: None

Returns a random number between 2 numbers

randInt
Created by: SetaYoshi

Requisites: None

Returns a random integer between 2 numbers

randSub
Created by: SetaYoshi

Requisites: None

Returns a random character in a string

char

randBool
Created by: SetaYoshi

Requisites: None

Randomly returns -1 or 0

char

coil
Created by: SetaYoshi

Requisites: None

Forces a number to loop between a range

wrap
Created by: SetaYoshi

Requisites: None

A modified version of coil that is more practical for counting

tie
Created by: SetaYoshi

Requisites: None

A less flexible form of coil

knot
Created by: SetaYoshi

Requisites: None

An alternate form of tie that is more practical for counting.

brace
Created by: SetaYoshi

Requisites: None

When the number overflows, it will snap to the opposite boundary

clamp
Created by: SetaYoshi

Requisites: None

When the number overflows, it will snap to the current boundary

tween
Created by: _FyreNova

Requisites: None

Returns the tweened number between and , using  as its percentage.

c_sin
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate sin

c_cos
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate cos

c_cos
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate cos

c_tan
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate tan

c_csc
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate csc

c_sec
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate sec

c_cot
Created by: SetaYoshi

Requisites: modul, factorial

Using taylor expansion to calculate sec

arcsin
Created by: SetaYoshi

Requisites: factorial

Using taylor expansion to calculate arcsin

arccos
Created by: SetaYoshi

Requisites: factorial

Using taylor expansion to calculate sec

arctan
Created by: SetaYoshi

Requisites: factorial

Using taylor expansion to calculate sec

arccsc
Created by: SetaYoshi

Requisites: factorial

Using taylor expansion to calculate sec

arcsec
Created by: SetaYoshi

Requisites: factorial

Using taylor expansion to calculate sec

arccot
Created by: SetaYoshi

Requisites: factorial

Using taylor expansion to calculate sec

sinh
Created by: SetaYoshi

Requisites: none

The hyperbolic form of sin

cosh
Created by: SetaYoshi

Requisites: none

The hyperbolic form of cos

tanh
Created by: SetaYoshi

Requisites: none

The hyperbolic form of tan

csch
Created by: SetaYoshi

Requisites: none

The hyperbolic form of csc

sech
Created by: SetaYoshi

Requisites: none

The hyperbolic form of sec

coth
Created by: SetaYoshi

Requisites: none

The hyperbolic form of sec

arcsinh
Created by: SetaYoshi

Requisites: none

The hyperbolic inverse form of sin

arccosh
Created by: SetaYoshi

Requisites: none

The hyperbolic inverse form of cos

arctanh
Created by: SetaYoshi

Requisites: none

The hyperbolic inverse form of tan

arccsch
Created by: SetaYoshi

Requisites: none

The hyperbolic inverse form of csc

arcsech
Created by: SetaYoshi

Requisites: none

The hyperbolic inverse form of sec

arccoth
Created by: SetaYoshi

Requisites: none

The hyperbolic inverse form of cot

onscreen
Created by: YvajekK Based on SetaYoshi's script

Requisites: None

Detects if the object is on the screen. Returns:


 * 0: when the object isn't visible
 * 1: when the object is visible and the screen isn't splitted
 * 2: when the object is visible on the second player's screen