This snippet (compatible with the latest version S of Dawn of Time) will allow you to have mobs load up a random weapon through use of a MUDprog like this: mob random_weapon wield all
Category: Code
Snippets, mob prog scripts and useful programming advice for MUD code bases.

Example MUD Prog – Randomly Restrung NPC’s
These progs will show you a simple framework for randomly named NPC’s. The example will randomly set the gender, name, short and long description for the NPC. The mob will load a random set of clothing and possibly a piece of loot. Please note, these MUD Progs were written and tested on a Dawn of…

Snippet – Giving NPC’s the String and Short Commands
By giving mobiles the ability to use the immortal commands STRING and SHORT, amazing things can happen. In my next post, I’m going to show you how to write three scripts that will give your cities a plethora of randomly named NPC’s. Those scripts depend on this snippet. Please note, this snippet is compatible with…

Snippet – Adding Bank Balance to Worth
In the stock DOT codebase, if a player types WORTH the game does not include the player’s bank balance in the displayed information. Here’s how to add it to your game: act_info.cpp In void do_worth BELOW this piece of code: if (IS_NPC(ch)) { ch->printlnf( “You have %ld gold and %ld silver.”, ch->gold,ch->silver); return; } add…

Example Object Mprog – Books w/ Language Skill Requirements
Here’s a simple object prog that will check to see if a player has a high enough language skill level to read a book. The Item Vnum: 1001 Type: book Level: 0 Area[1]: global.are Cost: 0 Weight: 0.5 lbs Condition: 100 Material: paper Absolute size:…

Example Object Mprog – Quest Journal
This quest journal is an object that runs a prog whenever a player looks at the object. All the prog does is echo at the player the name of the quests they are on based on the tokens they carry (301, 302, & 303 as examples). If a player is not on one of the…