January 30, 2023

Lumen Language Documentation

How? You say, i say easy

use YourLibrary.LibOption // Import library

Pub dependies:

// Publish modes
pub.Publish("Your Text") // Publish line in console with text
pub.PublishAsWarning("Warning Text") // Warn your line
pub.PublishAsError("Oops...") // Error your line
// Pubs (now this is not useable, 18.02.23, but my projects auto-converted by new lumen system, ex: pub.True or pub.False to true, false)
pub.True() // True
pub.False() // False

Create function:

// Function
function Test(functionOption1, functionOption2) // Creates function
{
    pub.Publish("Example under sea") // Publishing message in console
}

Working with booleans

// To use booleans import special lib
use lumen.Booleans
// If you want to working with program booleans you can not import lib

lumen.SetBool("app.example.boolString", "hi")

bool1 = GetBool("app.example.boolString") // Getting boolean context
pub.Publish("Boolean 1 String: "..bool1..) // Publishing boolean as line

2D Game

use lumen.Game
use lumen.Game.Elements
use lumen.Json // Added 18.02.23

game.Assets.JsonImport({
    "background.jpg" : "gameBg",
    "character.png" : "gameCharacter"
})

game.Animations:Create({
    "https://arcsoftwares.ml/lumenGameCharacterAnimation" : "anim"
})

game.Animations("anim"):AddTo("gameCharacter")

function gameMain(game)
{
    game.CreateGameContainer(name="container", inString={
        game.Assets("gameCharacter"):Options(isGameMainCharacter=pub.True, animation="anim")}
    
    game.CreateUIContainer(name="ui", inString={
        game.UI:CreateLabel(name="gameTime", text=game.OnGameStarted(time))}
}

game.Attach(assets, gameMain()):OpenAppDialog(resolution=game.Default(resolution)) // Edited

Sandbox or window modes

use lumen
use lumen.UI
use lumen.UI.Extra
use lumen.Booleans // idk
use lumen.Booleans.Extra // New library
use lumen.System // I don't know, if you need this you can write this line :)
use lumen.Sandbox // New feauture in lumen, lumen now loading in sandbox, but you can not write this line in code
use lumen.Window // New feauture and library
use lumen.Game

// Or you can install this libraries from library mananger in new version of "Lumen Editor", download link soon

lumen.Development.SetCommandForBool(command=game):As(command="window")

string windowResolution = window.DefaultResolution

function buttonCallback(button)
{
    if button.OneMouseClick() == button.OneMouseClick(clicked=true)
    {
        ui.UiAlert(theme=window.Default(uiAlertTheme), position=window.CenterUp(), alertType=window.AlertType.Warning(), text="Alert", description="Closing program...", animation=window.Animation(anim=window.Animations.Sine(), delay=1), skipAnimation=pub.True))
        window.Quit()
    }
}

lumen.CreateWindow(name="Example Window", resolution=window.Default(resolution), objectsContainer={
    ui.CreateTextLabel(id=1, text="Example Window Text", position=window.Center)
    ui.CreateTextButton(id=1, text="Close", position=window.CenterDown(pxAlign=10), callback=buttonCallback())
}

Lumen Chatting System

use lumen
use lumen.UI.Extra
use lumen.Window
use lumen.Window.Extra // New library
use lumen.Chat // Main chatting system
use lumen.Json

string roleBackend={
    ui.Frame(backrgound=bg.DarkRed(), text="Banned", textColor=white, textAlign=ui.Center(), frameAlign=ui.GetInformImage(userId.Image):Align(+2px))
}

function void.massive(name, id, id.admin, userId, chat, chatId, massive)
{
    massive.CreateInfromServer(massive.LoadFromHttps("cdn.exencept.com/lumen-chatting-system/chattingServer.lmn"))
    massive.LoadInfromServer(massive.RecentlyInportedSite())
    
    string massiveClient = massive.GetLumenFloatBoolean(massive.GetFloat(massive.RecentlyImportedSite(massive.STMPServer(clientName=name, clientId=id)))
    string chatId = massive.SetChadId(massive.CreateChatId(id=lumen.Random else lumen.ButNotToBeAgain()))
    
    string mainChat = massive.CreateChat(chatId=chatId, admin=id.admin:SetRole(name=admin, text="Admin"))
}

if (chat.NewUserHasJoined())
{
    massive:Chat(chat=mainChat, userIdWhoChatted=userId, chatId=chatId, userName=name):Priority(1) // -1 - Blocked user, 0 - Guest, 1 - Human, 2 - Moderator/Admin, 3 - Chat Creator (This is you)
}

function void.roles(blockedUser="-1", guset=0, human=1, moderator=2, admin=2, chatCreator=3, clientOwner=255, userId)
{
    if (role=blockedUser, user=userId, attributes)
    {
        attributes.Get(userId):String({
            canChatting=false
            canSendGif=false
            canSendStickers=false
            roleFrame=roleBackend
        )}
    else
        userId.RestoreDefaultParam()
    }
}

userId.UserBeenChatted(system=lumen.Chat(void(massive), checkRoles=true)

Lumen Video Editor System

use lumen
use lumen.UI.Extra
use lumen.Booleans.Extra
use lumen.Window
use lumen.Window.Extra
use lumen.Json
use lumen.Cocktail
use lumen.Cocktail.VideoRestorer
use lumen.Cocktail.Video
use LagFishLibrary.LumenEditing

// AD: Selling my domain cloudstores.site for 130 rub (776 tenge, 1usd), all details in site purchase.cloudstores.site, domain registrator Beget LLC (beget.com, cp.beget.com)

nonStricted = lagFishLibrary.Import(lumen.JsonImport({
    "main" : "cdn.lagfish.ru/lumen-library",
    "@main" : {
        "window" : "main(/window)"
        "window-adjust-content" : "window(?adjust=allContent)"
})

window.CreateWindow(type="fast/start", json=nonStricted)

Other tutorials:

How to create plugin?

use lumen
use lumen.API
use lumen.API.DollarsContent // Idk why i named that this

// Add .Justify("*") to end of all items what you enter to functions

function lumen.PluginIsEnabled(name="MyPluginName", description="My Big Description", type="text/api", arg="yourarg", plugin)
{
    $after plugin.Loaded({
        if (arg == "%null")
        {
            pub.Publish("Line with no argument").Justify("*")
        }
        
        if (arg == "other")
        {
            pub.Publish("Line with argument"..arg..).Justify("*")
    })
}

(NEW!) Lumen Text Editor (MS Word + key system + accounting system)

%system:Attach(lib=lumen.cocktail.lte.libs, canExecute=onlyInThisFile)

use lumen.Cocktail.LTE.Libs // I hide all plugins from you)

app:JsonImport({
    "main" : "..."
    
// Soon!