Ha the game is nuts.
my username is edicted you can hit me up if you escape vLAN (starting single-player training ground)
debugging is a little difficult
the game uses a strict and modified version of javascript
only very specific ways of doing things are allowed.
For example every script must start with
function(context, args){
}
// nothing is allowed above or below this function
args stores command line arguments in a dictionary (called an object in JS) {}
most data in the game is transmitted using these {key:value} pairs
you can't use console.log() in hackMUD
there's a special library that has many things including custom logs.
var L = #fs.scripts.lib()
This is me accessing the game's library and storing the reference as L
From here I can call L.log("error code") and it will add it to an Array.
I can access this array with L.get_log().
I can call #D() to actually return these error codes back to console.
Documentation on the library and how this works is here:
https://hackmud.com/forums/general_discussion/scripting_reference
#fs denotes a "fullsec" script.
There are 5 levels of security in the game.
- fullsec (4)
- highsec (3)
- midsec (2)
- lowsec (1)
- nullsec (0)
You can't read other players public scripts in the game but you can check their level to make sure they aren't going to steal all your shit. For example highsec can't steal money (GC) but it can leak information about your account. fullsec is 100% safe. midsec can transfer money. I think lowsec can transfer upgrades and nullsec can do anything (like unequip upgrades so they can be stolen).
do you store your scripts in the game somehow or do you keep the offline.
Both
Typing #dir in game will open your game directory folder outside the game. This is where you put the custom scripts.js you build. Then when you're ready you type #up script.js and it will upload to the game server. You can then call the script in game by typing username.script{}. If you play on another machine you can call #down script and it will download your script to the new device, so it acts like a basic cloud storage device.
You should start playing I'm bored of doing this all on my own lol
RE: regex