Axmud is a MUD client written in Perl 5 / Gtk3.
Axbasic is the built-in scripting language used by Axmud. It's suitable for most scripting purposes, from the simple to the complex.
Axbasic's syntax will be instantly familiar to many people. It is identical to the syntax used by the commercial True BASIC package, which is the successor to the original Dartmouth BASIC first released in the 1960s.
In fact, Axmud will happily run most BASIC programmes written in those languages. Some features, such as pixel graphics and matrix operations, have not been implemented. (We don't think Axmud users will have any interest in them.)
Axbasic does, in fact, provide these features to a limited degree.
Event-driven programming can be implemented using Axmud interfaces (triggers, aliases, macros, timers and hooks). Axmud can create and store complex data structures that Axbasic scripts can use.
If Axbasic isn't up to the job, you can write a Perl plugin instead. (This tutorial doesn't discuss Perl plugins.)
This is a tutorial for beginners. It shows you how to write scripts in Axbasic, and how to run them within an Axmud session.
The authors assume that you're only interested in writing scripts for your favourite MUD. If you're looking a formal education in correct programming technique, BASIC is not a suitable choice.
We also assume that you have some very basic computer skills (such as how to open a text file in an editor, how to navigate folders on your computer's hard drive and how to install Axmud on your computer).
If you're already familiar with other scripting languages, or even with some flavour of BASIC, you might not need the tutorial at all.
Axbasic scripts use keywords and functions. All of them are documented in help files, and those help files can be read from within an Axmud session.
For example, you can see a (long) list of keywords and functions by typing the following command:
;axbasichelp
Axmud's client commands, as they're called, always begin with a semicolon. Almost all of them can be abbreviated, for example:
;abh
You can get help for a particular keyword, as well an example of its use, by typing either of the following:
;axbasichelp move
;abh move
You can get help for various functions in the same way:
;axbasichelp sin
;abh sin