These are a pair of aliases I wrote to access an items.txt file on my hard drive from my cMud prompt.
WHAT THEY DO:
You can grab a starter file off the Diku page. This will let you search for any line that has a key word. So, if you're running around with a warrior and want to remember the stats on a pair of gloves you find you could type: item gloves
and you'd see this echoed to you on cMUD:
black gloves L18, 3 4 4 0, hit 2, cloth, w3
black leather gloves +E-G L35, 11 10 10 0, hit 1, arm -4, w1
blackened leather gloves L51, 1 1 1 0, arm -5, sbreath -5, dam 3, giant_only, w15
blademaster's gloves L48, 5 8 5 0, age 10, int 1, dex 1, dam 3, hit 3, leather, w1, Blademaster, Palace in Seantryn
If you find a new pair of gloves and learn the stats on them and want to add it to your file, you'd type this:
additem {studded leather work gloves L6, 4 4 4 4, dam 1, str 1, leather, w3, Middle-aged Man, Camelot}
Then next time you typed 'item gloves' you'd get this echoed....
black gloves L18, 3 4 4 0, hit 2, cloth, w3
black leather gloves +E-G L35, 11 10 10 0, hit 1, arm -4, w1
blackened leather gloves L51, 1 1 1 0, arm -5, sbreath -5, dam 3, giant_only, w15
blademaster's gloves L48, 5 8 5 0, age 10, int 1, dex 1, dam 3, hit 3, leather, w1, Blademaster, Palace in Seantryn
studded leather work gloves L6, 4 4 4 4, dam 1, str 1, leather, w3, Middle-aged Man, Camelot
ADD THESE TO cMUD as aliases...
#alias item {
#file 2 "C:\...REPLACE WITH YOUR PATHWAY...\ZmudItems.txt"
#var tmp_list %grep( 2, %1)
#loop 0,%numitems(@tmp_list) {#echo %item( @tmp_list, %i)}
#unvar tmp_list
#close 2
#GAG Opened "C:\...REPLACE WITH YOUR PATHWAY...\ZmudItems.txt" as file 2;
#GAG Closed "C:\...REPLACE WITH YOUR PATHWAY...\ZmudItems.txt" on file 2
#GAG Variable tmp_list removed.
}
#alias additem {
#file 2 "C:\...REPLACE WITH YOUR PATHWAY...\ZmudItems.txt"
#wri 2 %1
#echo %1
#close 2
#GAG Opened "C:\...REPLACE WITH YOUR PATHWAY...\ZmudItems.txt" as file 2;
#GAG Closed "C:\...REPLACE WITH YOUR PATHWAY...\ZmudItems.txt" on file 2
#GAG Variable tmp_list removed.
}