                          CircleMUD Code Snippets
            http://democracy.queensu.ca/~fletcher/Circle/Snippet/
                                      
   This file has a large collection of small code snippets gleaned from
   the CircleMUD Mailing List. There are many more patches and snippets
   located on the CircleMUD FTP Site though, so you would be advised to
   check there as well.
   
   Note: Not all of these snippets will work perfectly with your version
   of code, so be prepared to fix one or two bugs that may arise, and
   please let me know what you needed to do to fix it. Sending a
   corrected version is always welcome.
   
   Finally, if you wish to use any of the snippets from this page, you
   are more than welcome. Please just mention the authors in your
   credits. If you wish to release any of these snippets to the public on
   another site, contact me FIRST (fletcher@democracy.queensu.ca).
   
     _________________________________________________________________
                                      
Available Snippets

   * 128 Bitvector code -- From Niese-Petersen (Updated Feb 16, 1997)
     [      128bits.txt]
   * 128 Bit Converters -- T-Rex (Added May 30, 1997)
     [      128conv.txt]
   * 128 Bit Converters (again) -- From The Count (Added Jul 3, 1997)
     [     128conv2.txt]
   * Abbreviations -- From Zigg
     [      abbrevs.txt]
   * Ability Score Rolling Function -- From fantasia
     [    abilities.txt]
   * Affects screen for spell affects -- From Jon Barrett (Added Jul 6, 1998)
     [     aff_view.txt]
   * AFK Code -- From Mark Komus (Added Dec 5, 1996)
     [          afk.txt]
   * AFK Code -- Another method -- From Rasdan (Updated Dec 8, 1997)
     [         afk2.txt]
   + A Listing of ANSI codes
     [     ansicode.txt]
   * Archer Code -- From Sammy
     [       archer.txt]
   * Argument Splitter -- From James Turner (Added Jul 6, 1998)
     [    split_arg.txt]
   * Attribute Command -- From Nashak (Added Dec 3, 1996)
     [    attribute.txt]
   * Assassin mobs -- From Doppleganger Software (Updated Feb 18, 1997)
     [     assassin.txt]
   * Autoassist Code -- From Josh B. (Added May 6, 1997)
     [      autoass.txt]
   * Autodiagnosis Code -- From Will Shaw (Added May 6, 1997)
     [     autodiag.txt]
   * Autoexit Code -- From Nashak
     [     autoexit.txt]
   * Autoexit Code (Another) -- From Eric Kilfoil (Added Mar 11, 1997)
     [    autoexit2.txt]
   * Autoexit (New Exits Format) -- From Nashak (Added Dec 3, 1996)
     [    autoexit3.txt]
   * Autoloot and Autosplit Code -- From Ron Hensley
     [       autosl.txt]
   * Beep Command -- From Lord Kyu (Added Jul 6, 1998)
     [         beep.txt]
   * Blood Left Behind -- From Rasdan (Added Jul 6, 1998)
     [        blood.txt]
   * Board code -- Replies -- From tigeba (Added Jun 23, 1997)
     [       boards.txt]
   * Body Parts -- Patrick Dughi (Added Apr 27, 1998)
     [     bodypart.txt]
   * Book Portal -- Ryan Stuck (Added Apr 27, 1998)
     [  book_portal.txt]
   * Butcher code -- From Mendar (Added Dec 3, 1996)
     [      butcher.txt]
   o Button Pushing Special Procedure -- From Justin Robinson
     [       button.txt]
   * Change Ownership Command -- From Crimson Wizard (Added Dec 8, 1997)
     [        chown.txt]
   * Charisma Affecting Aggressiveness -- From Lincoln Chan
     [     charisma.txt]
   * Clan Code. Mmmmm. -- From Mehdi Keddache (Updated May 6, 1997)
     [         clan.txt]
   * Cleric Special -- From Necro (Added Mar 31, 1997)
     [       cleric.txt]
   o Code for parse_class() -- From fantasia
     [        class.txt]
   * Coke Machine Special Procedure -- From Sliver
     [         coke.txt]
   * Copyto and Dig for OasisOLC -- From Myrddin (Added Dec 7, 1996)
     [       copyto.txt]
   * Colour For Circle -- From Nashak (Added Dec 3, 1996)
     [       colour.txt]
   * Colour For Circle (More) -- From Jorgen Sigvardsson (Added Jan 16, 1997)
     [   colourcode.txt]
   * Colour For Circle (More - Updated) -- From Jason Berg (Added Jul 6, 1998)
     [  colourcode2.txt]
   * Counting Objects -- From John Evans (Added Jul 6, 1998)
     [    obj_count.txt]
   * Damage Message Code -- From d. Hall (Added Dec 8, 1997)
     [       dammsg.txt]
   * Deathcount Code -- From Adam Beytin (Updated Jul 5, 1998)
     [        death.txt]
   * Death Smurfs -- From Patrick J. Dughi (Added Jul 6, 1998)
     [  death_smurf.txt]
   * Dig and Bury Command -- From Chris Ryan
     [          dig.txt]
   * Disallow mob names for players -- From Dez (Added Dec 7, 1996)
     [       pnames.txt]
   * Disintegrate Spell -- From Franco
     [ disintegrate.txt]
   * DNS Caching Code -- From AOW Admin (Added Jul 6, 1998)
     [       aowdns.txt]
   * dns lookup server -- From Rasmus Romlev (Added May 6, 1997)
     [          dns.txt]
   * do_sacrifice function -- From JTRhone (Added Jan 16, 1997)
     [        dosac.txt]
   * Dragon's Breath -- From Keith & Hades (Added Dec 4, 1996)
     [       dragon.txt]
   * Drunk Language Code -- From Haddixx
     [        drunk.txt]
   o Dual Wield -- From Argon (Added Dec 4, 1996)
     [   dual_wield.txt]
   * Eavesdrop Skill -- Siv (Added Apr 27, 1998)
     [    eavesdrop.txt]
   + Economy Code (for MercMuds) -- From Maniac (Added Feb 6, 1997)
     [      economy.txt]
   * Energy Drain Spell -- From Chris Rehbein (Added Mar 15, 1997)
     [       edrain.txt]
   * Elevator Special -- From Chris Warren (Added Dec 8, 1997)
     [     elevator.txt]
   * Embalmer code -- From Mendar (Added Dec 3, 1996)
     [     embalmer.txt]
   * Emblamer code -- From Mendar (Updated Jan 16, 1997)
     [     emblamer.txt]
   * Equipment Ordering -- From Lord Kyu (Added Jul 6, 1998)
     [     do_equip.txt]
   * Events -- From Skylar (Added Dec 4, 1996)
     [       events.txt]
   * Examine (for Objects) -- From Andy Hubbard (Added Dec 8, 1997)
     [      examine.txt]
   * EXP Needed Scale -- From Nashak (Added Dec 3, 1996)
     [          exp.txt]
   * Fear Spell -- From Franco
     [         fear.txt]
   * Ferry Code -- From Fili (Updated Jan 4, 1998)
     [        ferry.txt]
   * File Viewing Utility -- From Haddixx
     [        files.txt]
   * Fire Weapons -- From Gary Barnett (Updated Dec 5, 1996)
     [      firewpn.txt]
   * Forage Skill -- From Chuck Carson (Added Dec 4, 1996)
     [       forage.txt]
   * Gate Demon Spell -- From Phil Jensen (Added Jul 6, 1998)
     [         gate.txt]
   * Gossip Socials -- From Samedi (Added Feb 18, 1997)
     [       gemote.txt]
   * Hand to hand Combat -- From Demond De Inosantos (Added Jun 23, 1997)
     [    h2hcombat.txt]
   * Help entry levels -- From DOOMer (Added Jun 23, 1997)
     [      helplvl.txt]
   * Help Index Command -- From Angus Mezick (Added Jul 6, 1998)
     [      helpidx.txt]
   * Help Topic: Missing! -- From Samedi (Added Mar 5, 1997)
     [         help.txt]
   * Hidden Doors / Search -- Joe Frohne (Added Apr 27, 1998)
     [  hiddendoors.txt]
   * Home Command -- From Gekke (Added Dec 4, 1996)
     [         home.txt]
   * Hometowns -- From Daniel Burke
     [     hometown.txt]
   o How To Add Spells -- From goamkows (Added Dec 3, 1996)
     [     addspell.txt]
   * How To Add Wear Bits -- From WhiteDemon (Added Jul 6, 1998)
     [ new-wear_bit.txt]
   * IC Global Channel -- Quinn (Added Apr 27, 1998)
     [           ic.txt]
   * Identify (Minor) Spell -- From Soren P. Skou (Added Dec 8, 1997)
     [           id.txt]
   * Ignore code -- From Josh B. (Added May 6, 1997)
     [       ignore.txt]
   * Immlist code -- From Brian Helms (Added May 6, 1997)
     [      immlist.txt]
   * Innate spell code -- From Patrick J. Dughi (Added May 6, 1997)
     [      inn_spl.txt]
   * Innate object code -- From Danny Jacobs (Added Jun 30, 1997)
     [      inn_obj.txt]
   * Interposing Hand Spell -- From JTP94 (Added Jul 6, 1998)
     [     int_hand.txt]
   * Interpreter Tree Search (commands) -- From Angus (Added Dec 8, 1997)
     [      inttree.txt]
   * Invisible Object Special -- From Mike Carpenter (Added Dec 8, 1997)
     [       invobj.txt]
   * Ispell Code (Spell Checker) -- From Chris Baggett (Updated Jan 2, 1998)
     [       ispell.txt]
   * 'It' reference for objects -- From Gary Barnett (Added Feb 6, 1997)
     [           it.txt]
   * Language Addition -- From ?
     [     language.txt]
   * Liblist Commands Rlist, Mlist, Olist Commands -- From Myrddin
     [      liblist.txt]
   * Liblist: Room/Object/Mob listing -- From Stormrider (Updated Jul 6, 1998)
     [     liblist2.txt]
   * Lightning Storms -- From Axl (Updated May 6, 1997)
     [    lightning.txt]
   * Listen Skill -- From Ted Dubroff
     [       listen.txt]
   * Linewrapping Function -- From Daniel Koepke (Added Mar 5, 1997)
     [     linewrap.txt]
   * Linewrapping Function, more -- From Doppleganger Software (Added Jun 23, 1997)
     [    linewrap2.txt]
   * 'Load' Command Changes -- From The Lion King (Added Jul 6, 1998)
     [    vnum_name.txt]
   * Locate Object Spell -- From Ryan Stapleton (Added Jul 6, 1998)
     [   locate_obj.txt]
   * Locate Target Spell -- From David Klasinc (Added Dec 8, 1997)
     [   locate_tar.txt]
   * Magic 8-Ball! -- From Mike (Added Mar 15, 1997)
     [        8ball.txt]
   * Mail autoreception -- From Ryan Linn (Added Jan 26, 1997)
     [         mail.txt]
   * Mazes -- From Desmond Daignault (Added Feb 6, 1997)
     [         maze.txt]
   * More Mazes -- From Doppleganger Software (Added Feb 18, 1997)
     [        maze2.txt]
   * Multi Classing -- From Garadon (Added May 6, 1997)
     [       mclass.txt]
   * Multi Classing/Multi Leveling -- From Demond LaZaro (Added Dec 8, 1997)
     [      mclmlvl.txt]
   * Meterbar for Attributes -- From Adam Days (Added Dec 3, 1996)
     [     meterbar.txt]
   * Meterbar for attributes (Another) -- From Professor Hoopster (Added Dec 3, 1996)
     [    meterbar2.txt]
   * Mob Flag: Fast Aggression -- From Lars Juul (Added Dec 8, 1997)
     [       mobagg.txt]
   * Mob Flag: "Smart" Mobs -- From Lars Juul (Added Dec 8, 1997)
     [        mobiq.txt]
   * Mob Memory Commands -- From Demetrius Harris
     [       mobmem.txt]
   * Mob Stacking -- From PD (Added Mar 5, 1997)
     [     mobstack.txt]
   * Monkeys. Exploding Monkeys! -- From Jason Buckler (Added Feb 22, 1997)
     [      monkeys.txt]
   * Multi Attack for Mobs -- From Christian Duvall (Added Jun 23, 1997)
     [     multimob.txt]
   * Multi Attack Pointers -- From ?
     [     multihit.txt]
   * Multiple Greeting Screens -- From Erik Lundin (Added Jan 4, 1998)
     [     multigrt.txt]
   * Multiple Item Get/Put/Drop Commands -- From Darksword (Added Dec 4, 1996)
     [     multiget.txt]
   * Newbie Command -- From ? Update from Franco
     [       newbie.txt]
   * Newbie Guide Special Procedure -- From Sliver
     [        guide.txt]
   * New Score Format -- From Nashak (Added Dec 3, 1996)
     [        score.txt]
   * New Score Format (Another) -- From Lars Juul (Added May 6, 1997)
     [       score2.txt]
   * Object Affect Flags -- From ?
     [       objaff.txt]
   * Object Damage -- From Andy Hubbard (Added May 6, 1997)
     [       objdam.txt]
   * Object Stacking -- From Nashak (Added Dec 3, 1996)
     [    obj_stack.txt]
   o Object Timers -- From ?
     [     objtimer.txt]
   * Online Bugfile Viewer -- From Rasdan (Updated May 6, 1997)
     [      bugfile.txt]
   * Online Xname Command -- From David Endre
     [        xname.txt]
   * Pager -- From Murmix (Added May 30, 1997)
     [        pager.txt]
   * Peace Command -- From ?
     [        peace.txt]
   * Percentage loads for objs and mobs -- From Johan Dustler (Added Feb 6, 1997)
     [      percent.txt]
   * PFile Conversion Utility -- From Gekke Eekhoorn
     [      plrconv.txt]
   * PFile Conversion Utility (another) -- From Daniel Koepke (Added Mar 15, 1997)
     [     plrconv2.txt]
   * Player Listing Command -- From Justin Robinson
     [      players.txt]
   * Player Log File Checking -- From Thomas Katzlberger
     [         plog.txt]
   * Poof Saving (3.0bpl11, version 2) -- From Rasdan (Added Mar 3, 1997)
     [      poof3_2.txt]
   * Poof Saving (3.0bpl11, version 3) -- From Gary Barnett (Updated May 6, 1997)
     [      poof3_3.txt]
   * Poofin/Poofout Saving -- From ? (Circle 2.2)
     [        poof2.txt]
   * Poofin/Poofout Saving -- From John Dodds (Circle 3.x)
     [        poof3.txt]
   * Poofset Command -- From Rasdan (Added Mar 3, 1997)
     [      poofset.txt]
   o Portal Spell (Ideas) -- From Ground Zero
     [       portal.txt]
   o Portal Spell (Code) -- From Glenn Campbell (Added May 6, 1997)
     [      portal2.txt]
   * Portals -- With Objects -- Tony Robbins (Added Apr 27, 1998)
     [      portal3.txt]
   * Potion Brewing Code -- From Franco
     [         brew.txt]
   * Private Channels -- From Darksword (Added Feb 6, 1997)
     [        pchan.txt]
   * Proficiency System -- From Chuck Reed (Added Jul 6, 1998)
     [        profs.txt]
   + Proposal For New Player Structs -- From Jaco (Added Dec 4, 1996)
     [      structs.txt]
   * Purify Spell --  From Soren P. Skou (Added Dec 8, 1997)
     [       purify.txt]
   * Push Code (for players) --  From Leonardo Herrera (Added Dec 8, 1997)
     [         push.txt]
   * Quests.  Automated no less -- From DSW (Updated Apr 27, 1998)
     [        quest.txt]
   * Races -- From Nashak (Added Dec 3, 1996)
     [        races.txt]
   * Races vs. Classes -- From Nashak (Added Dec 3, 1996)
     [    raceclass.txt]
   * Recall Command -- Quinn (Added Apr 27, 1998)
     [       recall.txt]
   * Recall Snippet -- From The Ready *2* Die? Staff (Added Jul 6, 1998)
     [      recall2.txt]
   * Recall To Player Houses -- From Admin (Added Feb 6, 1997)
     [       gohome.txt]
   o Receptionists without rebooting! -- From Gary Barnett (Added May 6, 1997)
     [        recep.txt]
   * Recharge Spell -- From Franco
     [    recharge2.txt]
   * Recharger For Wand And Staff -- From David Carver
     [     recharge.txt]
   * Regen Objects -- From Robert Sinland (Updated Jan 4, 1998)
     [     regenobj.txt]
   * Regen Objects (another way) -- From Mike Carpenter (Added Jul 6, 1998)
     [    regenobj2.txt]
   * Regen Rooms -- From John Evans (Updated Mar 7, 1997)
     [        regen.txt]
   * Remort Snippet -- From Digital (Added Jul 6, 1998)
     [       remort.txt]
   * Rent Deduction Code -- From Michael J. Fara (Added Jul 6, 1998)
     [    rent_code.txt]
   * Reroll stats -- From BuckFloyd (Added Dec 7, 1996)
     [       reroll.txt]
   o Restricting access to rooms -- From Billy H. Chan
     [     roomrest.txt]
   * Retreat Skill -- S.Mead (Added Apr 27, 1998)
     [      retreat.txt]
   * Room Affection patch -- From The Arrow (Added Dec 3, 1996)
     [      roomaff.txt]
   * Roomlink -- From Brian Guilbault (Added Mar 5, 1997)
     [     roomlink.txt]
   * Roomlink (another) -- From Angus Mezick (Added Jul 6, 1998)
     [    roomlink2.txt]
   * Room Saving -- From Reza Nejad (Added Jan 16, 1997)
     [     roomsave.txt]
   + Rounds - Combat Initiative -- From Daniel Koepke (Added Dec 8, 1997)
     [       rounds.txt]
   * Same Mob EXP limits -- From Andrey Fidrya (Added Dec 8, 1997)
     [      samemob.txt]
   * Save Mud Time -- Chuck Reed (Added Apr 27, 1998)
     [     savetime.txt]
   * Scan Skill -- From Mark Gerritsen (Added Jul 6, 1998)
     [         scan.txt]
   * send_to_except function -- From Raf (Added Dec 8, 1997)
     [         stex.txt]
   * Sentinel Procedure -- From Mendar (Added Jan 16, 1997)
     [     sentinel.txt]
   * Show userids on incoming users -- From Mudadmin (Added Jan 26, 1997)
     [      showadd.txt]
   * Skill and Spell Listing Command -- From T-Rex (Updated May 6, 1997)
     [         sksp.txt]
   o Skill improvement code -- From Nashak (Updated Dec. 3, 1996)
     [      improve.txt]
   * Skillset Command -- From ?
     [     skillset.txt]
   * Skillstat Command -- From John Evans (Added Feb 26, 1997)
     [    skillstat.txt]
   * Skillstat Command (Alternate) -- From Samedi (Added Feb 26, 1997)
     [   skillstat2.txt]
   * Special Assigns -- From Gekke (Added Dec 4, 1996)
     [   spec_names.txt]
   o Spellbooks: Ideas -- From Rasmus Ronlev (Added May 6, 1997)
     [    spellbook.txt]
   o Spells: How to? -- From Rasdan (Added Mar 10, 1997)
     [    spellhelp.txt]
   * Spell Sphere System -- Christoffer Lundberg (Added Apr 27, 1998)
     [ spell_sphere.txt]
   * Spell/Skill List -- Raven Jade Kenago (Added Apr 27, 1998)
     [        slist.txt]
   * Spring Creation Spell -- From Chuck Carson (Added Dec 4, 1996)
     [       spring.txt]
   * Stun Skill -- From Ryan Stapleton (Added Jul 6, 1998)
     [         stun.txt]
   * Summon Mob Spell -- From Fili (Added May 30, 1997)
     [    mobsummon.txt]
   * Summon Spell (w/'answer') -- From Mark Gerritsen (Added Jul 6, 1998)
     [       summon.txt]
   * Teleport Spell -- From Franco
     [     teleport.txt]
   * Teleport Rooms -- From Daniel Burke (Added Dec 4, 1996)
     [    telerooms.txt]
   * Tell Procedure -- From Mendar (Added Jan 16, 1997)
     [     tellproc.txt]
   * Training stats -- From Tyrone Watt (Added March 17, 1998)
     [        train.txt]
   * Trust System -- Quinn (Added Apr 27, 1998)
     [        trust.txt]
   * Vehicle code -- From Chris Jacobson (Added May 6, 1997)
     [      vehicle.txt]
   * Verify Command -- From James Turner (Added Jul 6, 1998)
     [       verify.txt]
   * Vwear command -- From WarRat (Added Dec 3, 1996)
     [        vwear.txt]
   * Vwear command, cont. -- From Christian Duvall (Updated Jun 23, 1997)
     [       vwear2.txt]
   * Vwear command, cont. -- From James A. Young (Updated Jun 26 1997)
     [       vwear3.txt]
   * Water Currents -- From Chuck Reed (Added Jul 6, 1998)
     [      current.txt]
   * Who command update -- From Nashak (Added Dec 3, 1996)
     [          who.txt]
   * who -> html for web pages -- From Erik Niese-Petersen
     [     who2html.txt]
   * Whois command -- From Primacy
     [        whois.txt]
   * Who level sorting -- From George (Added Jun 23, 1997)
     [      whosort.txt]
   * Who level sorting (QSort) -- From Jorgen Sigvardsson (Added Dec 8, 1997)
     [     whosort2.txt]
   * Win95 Logging (I) -- From Shirak (Added Mar 26, 1997)
     [      winlog1.txt]
   * Win95 Logging (II) -- From Andy Hubbard (Added Mar 26, 1997)
     [      winlog2.txt]
   * XP per Level and titles -- From Nic Suzor/Dave Carver (Added Feb 22, 1997)
     [           xp.txt]
   * XP Part II -- From Andy Hubbard (Added Mar 5, 1997)
     [        xpmod.txt]
   * Zone Command: 'Force' -- From Andrey Fidrya (Added Jul 6, 1998)
     [     zone_cmd.txt]
     _________________________________________________________________
                                      
Legend

   * More or less 'drop-in' code, but with work to do.
   
   + Other possibly useful documents.
   
   o A definite walkthrough. What this means is that the snippet will
   give hints or suggestions on how to do things, not a definite
   methodology.
   
   If you disagree with any of these and think that they should be
   classed differently, please let me know (fletcher@democracy.queensu.ca).
   
     _________________________________________________________________

