List Commands for Console

--[[ ~ C O M M A N D S ~
    command=0 type=1 function=2 useage=3 hint=4 mod/op=5 (0,1,2)
    command type function useage     hint
    types include:
    1. simple: /say hi = hi
    2. advanced: /tell [client] [msg] = you tell soandso "hi"
    3. complex: /email [] [subject]|[msg]|[etc]|[etc]
    All the console commands below

local _cmd = {}
local _cmds = 0
function __C() _cmds = _cmds + 1 return _cmds end

--com, type, fn, use, desc, lvl 
_cmd[__C()] = "!1|1|com_1|!1|Choose path 1|0|"
_cmd[__C()] = "!2|1|com_2|!2|Choose path 2|0|" 
_cmd[__C()] = "!3|1|com_3|!3|Choose path 3|0|"
_cmd[__C()] = "!4|1|com_4|!4|Choose path 4|0|"
_cmd[__C()] = "!about|1|com_about|!about|About this project.|0|"
_cmd[__C()] = "!addnote|1|com_addnote|!addnote [message]|Create a note.|0|"
_cmd[__C()] = "!announce|1|com_broadcast|!announce|Make a public broadcast.|1|"
_cmd[__C()] = "!buy|1|com_buy|!buy [item_id]|Buy an item.|0|"
_cmd[__C()] = "!clear|1|com_clear|!clear|Clear the command output text.|0|"
_cmd[__C()] = "!commands|1|com_commands|!commands|View all available commands.|0|"
_cmd[__C()] = "!deletenote|1|com_deletenote|!deletenote [id]|Delete a note.|0|"
_cmd[__C()] = "!dice|1|com_dice|!dice [sides]|Roll some dice.|0|"
_cmd[__C()] = "!die|1|com_kill|!die|Kill yourself.|0|"
_cmd[__C()] = "!exit|1|com_exit|!exit|Close the Command Console.|0|"
_cmd[__C()] = "!fly|1|com_fly|!fly|Toggle flying mode.|0|"
_cmd[__C()] = "!give|2|com_give|!give [target] [item id]|Give target player an item.|1|"
_cmd[__C()] = "!gold|2|com_gold|!gold [target] [amount]|Give target player some gold.|1|"
_cmd[__C()] = "!heal|1|com_heal|!heal [target]|Heal target player.|1|"
_cmd[__C()] = "!healall|1|com_healall|!healall|Heal everyone.|1|"
_cmd[__C()] = "!help|1|com_help|!help|Help with commands, etc.|0|"
_cmd[__C()] = "!item|1|com_object|!item [object]|Change current spawn object.|0|"
_cmd[__C()] = "!items|1|com_objects|!items|View all spawnable objects.|0|"
_cmd[__C()] = "!join|1|com_play|!join|Join the next available round.|0|"
_cmd[__C()] = "!kill|1|com_kill|!kill [target]|Kill the target player.|1|"
_cmd[__C()] = "!killall|1|com_killall|!killall|Kill all creatures AND players.|1|"
_cmd[__C()] = "!last|1|com_last|!last|Perform your last command.|0|"
_cmd[__C()] = "!list|1|com_objects|!list|View all spawnable objects.|0|"
_cmd[__C()] = "!me|1|com_stats|!me|View your stats.|0|"
_cmd[__C()] = "!motd|1|com_motd|!motd|View the 'Message of the Day'|0|"
_cmd[__C()] = "!note|1|com_note|!note [id]|Read a note.|0|"
_cmd[__C()] = "!notes|1|com_notes|!notes|View your list of notes.|0|"
_cmd[__C()] = "!place|1|com_build|!place [object]|Spawn an object. Example: house, car, tree|1|"
_cmd[__C()] = "!player|1|com_stats|!player [name]|View target player's stats.|0|"
_cmd[__C()] = "!players|1|com_players|!players|View the players list.|0|"
_cmd[__C()] = "!rank|1|com_rank|!rank|View your leaderboard rank.|0|"
_cmd[__C()] = "!roll|1|com_dice|!roll|Roll a pair of dice.|0|"
_cmd[__C()] = "!say|1|com_say|!say [message]|Say something.|0|"
_cmd[__C()] = "!setmotd|1|com_setmotd|!setmotd [message]|Change the Message of the Day.|0|"
_cmd[__C()] = "!shop|1|com_shop|!shop [armor, pets, potions, weapons]|View the shop!|0|"
_cmd[__C()] = "!shout|1|com_shout|!shout [message]|Shout a message.|0|"
_cmd[__C()] = "!spawn|1|com_spawn|!spawn [creature name or id]|Spawn a creature.|1|"
_cmd[__C()] = "!start|1|com_start|!start|Start the match.|0|"
_cmd[__C()] = "!stats|1|com_stats|!stats [target]|View target player's stats.|0|"
_cmd[__C()] = "!stop|1|com_stop|!stop|Stop the match.|0|"

--_cmd[__C() = "!|1|com_|!|EXPLAIN|0|"

_cmd._about = "'Survival Cart' was started on July 24, 2020. Last updated: Aug 6, 2020. By user: togagames @"

_cmd._motd = "Can't wait til this Command Console works 100%!"

_cmd._help = "Type: !commands for a list of commands."

_cmd._count = _cmds

function _cmd._getCommandList()
    local _test = "Here's some test text."
    local _list = ""
    local __com     = nil
    local __type     = nil
    local __fn         = nil
    local __use     = nil
    local __desc     = nil
    local __perm     = nil
    local _line        = nil
    local a            = 1
    local _split    = {}
    for b=1,_cmds do
        _line = _cmd[b]
        a = 1    
        _split = {}
        for i in string.gmatch(_line, "([^|]*)|") do -- | delimiter
            _split[a] = i -- get our 6 values: split[1-6]
            a = a + 1
        --com, type, fn, use, desc, lvl
        --print("ITERATION: ",b)
        __com     = _split[1]
        __type     = _split[2]
        __fn     = _split[3]
        __use     = _split[4]
        __desc     = _split[5]
        __perm     = _split[6]
        _list     = _list..__use.." - "..__desc.."\n"
    --return "Count: "..tostring(_cmd._count) -- all tests work!
    --return _list.._test.." - ".._test.."\n"
    --return _cmd[2]
    return _list

return _cmd

Latest Posts

Emulation ProcessEmulation Process

  Record Locs for Emulation in Core Grab data. Here, I am recording x,yz, and name data to emulate. Next Convert to usable array for Core template data. Snippet>> Pattern  Core template replacement pattern: Path:[C:\Users\soandso\Documents\My Games\CORE\Saved\Maps\mycoregame\Data\Tree\Emulator_