Area in question: The entrance (A) and four rooms (1, 2, 3 and 4) containing three guards each.
Make a simple text-file using notepad, let's call it "square.txt". For this instruction you
plan to start in room A, move east, follow the numbers and end up back where you started.
The file should look like this when you're done:
e;kill guard
n;kill guard
e;kill guard
s;kill guard
w;w;#close 1
Move or place the file directly into your cmud-directory.
Alias for starting script: start_kill_square
Command: #file 1 square.txt;#read 1
Triggers you will need:
String: died.
Command: kill guard
String: You find no such living creature.
Command: #read 1
Execution: Stand in room A and write: start_kill_square
Watch as the beauty of automation unfolds.
Explanation:
As your alias does #read 1 square.txt it will load the file into cmud's memory. #read 1 will
execute the first line in your file, in this case "e;kill guard", meaning it will move east
and kill guard. As your first guard dies, your trigger on "died." will make you attack the
next guard and so on untill there are no more guards left. The game will then echo "You find
no such living creature." and your trigger now makes cmud read the next line in the file, in
this case "n;kill guard". The rest is self-explanatory. As the last line is read, the command
#close 1 will now unload square.txt from cmud's memory.
This is what you could call the skeleton of a script, and is basically all there is to it.
A tip: Pay attention! This type of scripting will not take into consideration that someone
else may be fighting in a room, and will simply attack the guard regardless. This is considered
extremely rude and people have been killed over less. A simple #read 1 if you see someone fighting
will skip the room and proceed to the next. (hint: triggers are your friend)
Don't expect anyone to send their script, they may have put time and efforts into making it.
Make your own!
A -very- basic guide to old school scripting using CMUD
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
A -very- basic guide to old school scripting using CMUD
Last edited by nils on 14 Jun 2017 14:30, edited 1 time in total.
Nil Mortifi Sine Lucre
- Tarax the Terrible
- Myth
- Posts: 1331
- Joined: 09 Mar 2010 20:33
- Location: UK
Re: A -very- basic guide to old school scripting using CMUD
Come on Nils get with the mudlet revolution... 
Good show tho, there are lots of players who like the web client but want a bit more power.
Just one thing I'd say..
Don't use this basic try and kill next then move script if you are in the red fang guild.
As your eyes glow when u can't find something to attack.
Which this would do every room.
At which point many friendly players will attack you to see if you are botting unattended.
Alternative to that is to have the script more advanced that it recognizes how many mobs are in it when you entered and counts them down.
eg in general terms not any client syntax
a trigger x no. of watching orcs, set variable mobsInRoom = x
trigger mob died, mobsInRoom -1
or fire health all command and count them
A lot easier for random description enemies like kobolds
eg
set koboldInRoom 0
activate koboldCounter trigger
health all
"kobold is feeling" = koboldInRoom +1
> = deactivate counter trigger
"kobold dies" koboldInRoom -1
if koboldInRoom = 0, move

Good show tho, there are lots of players who like the web client but want a bit more power.
Just one thing I'd say..
Don't use this basic try and kill next then move script if you are in the red fang guild.
As your eyes glow when u can't find something to attack.
Which this would do every room.
Code: Select all
String: You find no such living creature:
Command: #read 1
Alternative to that is to have the script more advanced that it recognizes how many mobs are in it when you entered and counts them down.
eg in general terms not any client syntax
a trigger x no. of watching orcs, set variable mobsInRoom = x
trigger mob died, mobsInRoom -1
or fire health all command and count them
A lot easier for random description enemies like kobolds
eg
set koboldInRoom 0
activate koboldCounter trigger
health all
"kobold is feeling" = koboldInRoom +1
> = deactivate counter trigger
"kobold dies" koboldInRoom -1
if koboldInRoom = 0, move
Re: A -very- basic guide to old school scripting using CMUD
Not sure if you get the concept of basic. What you're suggesting certainly isn't.
Nil Mortifi Sine Lucre
Re: A -very- basic guide to old school scripting using CMUD
Does this work on mobile without importing it into the cmud which I'm pretty sure is impossible with a phone? And is there any way that I can do this with just aliases and triggers. Example: #read trigger 2 line 1. ;)
Re: A -very- basic guide to old school scripting using CMUD
It won't work in webclient, if that's what you're asking.
Nil Mortifi Sine Lucre
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/