;; $Id: mud-settings.el,v 1.74 2002/05/18 22:05:40 quarl Exp $ (require 'kc-mud) (setq mud-user "quarl") (setq mud-pass "zzzzzz") (setq mud-list '( (Necromiumx ("necromium.com" 4000 nil nil kc-necromium-setup)) )) (setq mud-default 'Necromium) ;;(setq mud-logging t) ;; TODO: move some of these to a library file. (require 'regexp-opt) (defun concat-regexps (&rest regexps) "Concatenate string/regexp arguments. List arguments are regexp-opt'ed with grouping. Thus, with only one string argument, simply returns the string argument. With only one list argument, is equivalent to (regexp-quote (car (regexps))) Example: (or-concat-regexps \"^\" '(\"abc\" \"abde\" \"q\") \"$\") ==> \"^\\\\(abc\\\\|bcdef\\\\|[ab]\\)$\"" (cond ((not regexps) nil) ((not (cdr regexps)) (let ((x (car regexps))) (if (listp x) (regexp-opt x) x))) (t (mapconcat (lambda (x) (if (listp x) (regexp-opt x t) x)) regexps nil)))) (defmacro ccregexps (&rest regexps) `(eval-when-compile (funcall 'concat-regexps ,@regexps))) (defun kc-necromium-setup-triggers () (mud--defvar-local mud-last-door "") (mud-add-trigger mud-open-whatever "The \\(\\S-+\\) seems to be closed\\." (mud-send-string-with-echo (format "open %s\n" (setq mud-last-door (match-string 1))))) (mud-add-trigger mud-unlock-whatever "It seems to be locked\\." (mud-send-string-with-echo (format "unlock %s\n" mud-last-door))) (mud-add-trigger mud-eat "^You are hungry." (mud-send-string "get food bag\neat food\n")) (mud-add-trigger mud-drink "^You are thirsty." (mud-send-string "drink water\ndrink water\n")) (mud-add-trigger mud-fountain (ccregexps "^" '("A pearl white fountain laced with gold trimmings rests here." "A moss covered stone fountain dominates the village square." "A large fountain of dark granite bubbles a steady stream of water into a pool.") "$") (mud-send-string "drink fountain\ndrink fountain\nfill water fountain\nfill 2.water fountain\n")) (mud-add-trigger mud-enter-npk (ccregexps '("You are about to enter a PURE NPK zone! Are you sure? (Y/N):")) (mud-send-string-with-echo "y\n")) (mud-add-trigger mud-get-branch (ccregexps '("A delicate plant with silver and gold branches grows here." "A branch from an aloe plant rests here, radiating healing energies.") ) (mud-send-string "get branch\nput branch pouch\n")) (mud-add-trigger mud-get-leaf (ccregexps '("An oak leaf rests here, radiating wisdom.")) (mud-send-string "get leaf\nput leaf pouch\n")) (mud-add-trigger mud-get-colors-potion (ccregexps '("A potion of swirling colors is lying here.") ) (mud-send-string "get colors\n")) (mud-add-trigger mud-no-mana "You haven't the energy to cast that spell!" (mud-send-string-with-echo "mana\n")) ;; (setq mud-died-find-box-string " ;;north ;;north ;;north ;;west ;;north ;;north ;;north ;;down ;;down ;;life ;;recall ;;") (mud-add-trigger mud-find-box "^A few ill-conceived demons tear chunks of flesh from your motionless corpse" (mud-send-string "/ 3n1w3n2d\nlife\n/ R\n")) (mud-add-trigger mud-get-box "^A little box containing the soul of \\S-+ is lying here." (mud-send-string-with-echo "get box\n")) ;; (setq mud-got-box-get-life-string ;;display brief ;;recall ;;west ;;west ;;west ;;west ;;west ;;west ;;west ;;north ;;north ;;north ;;north ;;north ;;west ;;west ;;west ;;west ;;west ;;north ;;north ;;north ;;down ;;down ;;life ;;stand ;;recall ;;east ;;east ;;east ;;north ;;display brief ;;sleep ;;") (mud-add-trigger mud-got-box-get-life "You get A little box containing the soul of " (mud-send-string "/ R7w5n5w3n2d\nlife\nstand\n/ R3en\nsleep\n")) (mud-add-trigger mud-priest-says "^An Ancient Priest says to you, 'Try looking around .*$" (mud-send-string (concat "tell self " (match-string 0) "\n"))) (mud-add-trigger mud-leave-ship "^The ship creaks gently as it pulls into the docks\\." (mud-send-string "wake\nstand\nleave ship\n")) ;;(defun string-or-zero (s) (if (and s (length s)) s "0")) (defun fface (s f) (put-text-property 0 (length s) 'face f s) s) (defun strlenp (s) (and (stringp s) (not (eq s "")))) (defvar mud-how-killed-regexp-alist) ;; note: these use `looking-at' on a single line so it's not as important ;; for them to be efficient. (setq mud-how-killed-regexp-alist '( ("Charred flesh goes flying as [^\n]+? causes? [^\n]+?'s body to explode!\n" "detonate") ("[^\n]+? is ripped to shreds by the shock\\.\n" "mindshock") ("[^\n]+? punch crushes [^\n]+?'s skull, spraying blood from \\(his\\|her\\|its\\) ears." "punch") ("[^\n]+? punch shoves broken fragments of [^\n]+?'s nose into \\(his\\|her\\|its\\) brain, killing \\(him\\|her\\|it\\)\\.\n" "punch") ("[^\n]+? hit snaps [^\n]+?'s spine, causing \\(his\\|her\\|its\\) \\(limp \\)?body to fall \\(limp \\)?to the ground\\.\n" "punch") ("[^\n]+? hit snaps [^\n]+?'s neck into tiny pieces\\.\n" "punch") ("[^\n]+? bludgeon snaps [^\n]+?'s neck into small fragments\\.\n" "bludgeon") ("[^\n]+? bludgeon cracks open [^\n]+?'s head like a walnut\\.\n" "bludgeon") ("[^\n]+? whip rips a [^\n]+?'s head from \\(his\\|her\\|its\\) neck, sending it rolling away." "whipped") ("A cyclone picks [^\n]+? up and slams \\(him\\|her\\|it\\) into the ground, snapping \\(his\\|her\\|its\\) spine\\.\n" "whirlwind") ("[^\n]+? lightning bolt shatters [^\n]+? to pieces!\n" "lightning") ("The magic missile tears away the remaining life of [^\n]+?!\n" "magic missile") ("YOU KILLED [^\n]+?!!! -- don't you feel ashamed\\.\\.\\.\n" "color spray") ("[^\n]+? makes [^\n]+? into a colorful corpse!\n" "color spray") ("[^\n]+? frost lance penetrates deep into the chest of [^\n]+?, splitting \\(him\\|her\\|it\\) in two\\.\n" "frost lance") ("[^\n]+? cloak of flames engulfs [^\n]+? and burns the flesh from \\(his\\|her\\|its\\) bones\\.\n" "cloak of flames") ("The earth opens beneath [^\n]+?'s feet and swallows it whole!\n" "earthquake") )) (defun mud-how-killed () "See if previous line describes how a mob was killed and if so, extract and return it abbreviated." (let ((p (point-marker)) (k mud-how-killed-regexp-alist) r) (beginning-of-line 0) ; move up and bol (while k (if (looking-at (caar k)) (progn (setq r (cadr (car k))) (setq k nil) (replace-match "") ) (setq k (cdr k)))) (goto-char p) r)) (defun mud-report-kill (new-text mob xp cp gp mr) (defun red (s) (fface s 'mud-kill-report-face)) (defun white (s) (fface s 'mud-kill-report-highlight-face)) (defun green (s) (fface s 'mud-kill-report-how-face)) (defun lb (x y) (if (strlenp x) (concat (white x) y) "")) ;; (replace-match "") (insert X) instead of (replace-match X) because this ;; way we can add new text-properties. (replace-match "") (let ((how-killed (mud-how-killed))) (mud-insert-output-string (format (red "KILLED%s %s! %s%s%s%s\n") (if how-killed (format (green " [%s]") how-killed) "") (white mob) (lb xp " xp ") (lb cp " cp ") (lb gp " gp ") (if (strlenp mr) "[mana recovered]" ""))) (mud-insert-output-string new-text) (message "Killed %s!" mob) )) ;; (setq mud-default-regexps-list nil) (mud-add-trigger mud-dead-format (concat "\\(?:\\(?:[^\n]+?\\) \\(?:screaming for aid\\|shivering in pain\\) shifts to another position within the group!\n\\)?" "\\([^\n]+?\\) is dead!\n" ; 1 "You receive \\([0-9]+\\) experience points\\.\n" ; 2 "\\(You recover your opponent's mana\\.\n\\)?" ; 3 "\\(?:You gain \\([0-9]+\\) character points?\\.\n\\)?" ; 4 "\\(You recover your opponent's mana\\.\n\\)?" ; 5 "\\(?:Your blood freezes as you hear [^\n]+?'s death cry\\.\n\\)" "\\(?:You collect \\([0-9]+\\) gold from the corpse of [^\n]+?\\.\n\\)?" ; 6 "\\(?:You split [0-9]+ coins among [0-9]+ members -- [0-9]+ coins each\\.\n\\)?" "\\(\\(?:You get [^\n]+?\n\\)*\\)" ;; 7 "\\(?:The corpse of [^\n]+? seems to be empty\\.\n\\)?" "\\(?:\\(?:You enchant a prayer to your\\|[^\n]+? enchants a prayer to \\(?:his\\|her\\|its\\)\\) god and the corpse of [^\n]+? suddenly vanishes\\.\n\\)" ) (mud-report-kill (match-string-no-properties 7) (match-string 1) (match-string 2) (match-string 4) (match-string 6) (or (match-string 3) (match-string 5))) ) ;; (mud-reload-regexps 'Necromium) (defun get-last-word (string) (substring string (string-match "\\S-*$" string))) (mud-add-trigger mud-msg-flame-cloak-engulfs "\nEnergy from \\(your\\|[^'\n]+?'s\\) cloak of flames engulfs [^,\n]+?, searing \\(his\\|her\\|its\\) flesh\\." (replace-match " [Cloak of Flames]")) (mud-add-trigger mud-msg-cast-refresh "\nYou suddenly feel much less tired as you refresh yourself\\." (replace-match " [refresh]")) (mud-add-trigger mud-msg-cast-mindshock "\nYou unleash electricity from the tips of your fingers that rip through the minds of others!" (replace-match " [mindshock]")) (mud-add-trigger mud-msg-cast-detonate "\nYou hear a cataclysmic explosion as your detonation rocks through [^\n]+?'s frame\\." (replace-match " [detonate]")) (mud-add-trigger mud-msg-cast-curse "\nYou cackle with an insane glee as your God bestows strength upon you\\." (replace-match " [curse (q1)]")) (mud-add-trigger mud-msg-cast-armor "\nA phantasmal suit of shimmering platemail armor settles around your body\\." (replace-match " [armor (q2)]")) (mud-add-trigger mud-msg-cast-displacement "\nYour form shimmers, and you appear displaced\\." (replace-match " [displacement]")) (mud-add-trigger mud-msg-cast-flesh-armor "\nYour flesh takes on a steel-like hardness\\." (replace-match " [flesh armor (q3)]")) (mud-add-trigger mud-msg-cast-detect-invisibility "\nYour eyes tingle as you become more sensitive to invisibility\\." (replace-match " [detect invisibility (q4)]")) (mud-add-trigger mud-msg-cast-detect-magic "\nYour eyes tingle as you become more sensitive to magical auras\\." (replace-match " [detect magic (q5)]")) (mud-add-trigger mud-msg-cast-sense-life "\nYou begin to feel more attuned to your surroundings\\." (replace-match " [sense life (q6)]")) (mud-add-trigger mud-msg-cast-infravision "\nYour eyes glow red as your vision improves\\." (replace-match " [infravision (q7)]")) (mud-add-trigger mud-msg-cast-protection-from-fire "\nA cool breeze blows through your hair\\." (replace-match " [protection from fire (q8f)]")) (mud-add-trigger mud-msg-cast-protection-from-cold "\nA gentle warmth floods your body\\." (replace-match " [protection from cold (q8c)]")) (mud-add-trigger mud-msg-cast-cloak-of-flames "\nYou pull a cloak of swirling flames around your body\\." (replace-match " [cloak of flames]")) (mud-add-trigger mud-msg-cast-glyph "\nYou concentrate and leave a magical glyph in the local room, warning you of impending danger\\." (replace-match " [glyph of warning]")) (mud-add-trigger mud-msg-cast-decrypt "^[^\n]+? \\(closes his eyes and \\|stares at [^\n]+? and \\)?utters the words, '\\([^']+\\)\\(\\)'\\." (let ((s (mud-spell-decrypt (match-string 2)))) (if s (replace-match s nil t nil 3)))) (defun mud-settings-file-make-sexy (name) (save-excursion (goto-char (point-min)) (let ((beg (and (re-search-forward (concat ";;;<" name "/>") nil t) (re-search-forward "[;];;;;;" nil t) (point-marker))) (end (and (re-search-forward "[;];;;;;" nil t) (point-marker))) endf) (when (and beg end) (align-regexp beg end "[^\\]\"\\(\\s-+\\)" 1 6 nil) (goto-char beg) (while (let ((begf (and (re-search-forward "[;];;;;;" end t) (progn (next-line 1) (beginning-of-line) (point)))) (endf (and (re-search-forward "[;];;;;;" end t) (progn (beginning-of-line) (point))))) (and begf endf (progn (sort-lines nil begf endf) t)))) (message "Aligned, dude."))))) (defvar mud-spells-hash-table) (defvar mud-spells-alist) (defun mud-spell-decrypt (s) "Decrypt a spell name." (let ((d (gethash s mud-spells-hash-table))) (and d (concat " (" d ")")))) (defun mud-spells-init-hash-table () (setq mud-spells-hash-table (make-hash-table :test 'equal)) (mapcar (lambda (x) (puthash (car x) (cadr x) mud-spells-hash-table) nil) mud-spells-alist) nil) (progn (setq mud-spells-alist ;;; '( ;;;;;; ;;;;;; ("abrazak" "armor") ; onlovom ("candushefb" "return") ("gibqheabral" "sanctuary") ; sanctuary ("hiqi avykamina" "locate object") ("judifgo" "curse") ("marsor kariq" "dispel magic") ; dispel magic ("oculohabi" "detonate") ; e. ("poir" "heal") ; heal ("qfoi yaam" "create food") ; crea food ("qrait ay yriwog" "cloak of flames") ; cloak of flames ("tigoaeg qraem" "gaseous cloud") ("ubyfizuguab" "infravision") ; infravision ("ubzuguvuruhl" "invisibility") ; invisibility ("uoculobhuyl" "identify") ; ie.iyent.ify ("vfoihpo xif" "breathe water") ; breathe war ("vrogg" "bless") ; bless ("wubmgpaqt" "mindshock") ; mindshock ("wunshir vabrafuof" "mental barrier") ("yrl" "fly") ; fly ("yrogp abrazak" "flesh armor") ;;;;;; ;;;;;; )) (mud-spells-init-hash-table) ) ;; To automagically align and sort the spells, press C-x C-e at the end of ;; the next line: ;; (mud-settings-file-make-sexy "mud-spells-alist") (defvar mud-findings-hash-table) (defvar mud-findings-alist) (defvar mud-finding-actions) (defun mud-finding-determine-action (x) (let ((item (car x)) (action (cadr x))) (if (stringp action) action (format (or (cdr-safe (assoc action mud-finding-actions)) ;; action string (format "tell self invalid action '%S' for item '%%s'" action)) (or (car-safe (cddr x)) (get-last-word item)) ;; target )))) (defun mud-findings-init-hash-table () (setq mud-findings-hash-table (make-hash-table :test 'equal)) (mapcar (lambda (x) (puthash (car x) (mud-finding-determine-action x) mud-findings-hash-table) nil) mud-findings-alist) nil) (setq mud-finding-actions '((drop . "drop %s") (junk . "junk %s") (donate . "donate %s") (bag . "put %s bag") (pouch . "put %s pouch") (report . "tell self Got %s!") (ignore . ""))) (defun mud-settings-file-insert-new-lootings (arg) (if (equal arg "insert new lootings, dude") (save-excursion (goto-char (point-min)) (when (re-search-forward "[;];;" nil t) (beginning-of-line) (mapcar (lambda (item) (insert "(\"" item "\" ignore)") (indent-according-to-mode) (newline)) mud-unknown-looted-items)) (setq mud-unknown-looted-items-old mud-unknown-looted-items) (setq mud-unknown-looted-items nil)))) (progn (setq mud-findings-alist ;;; '( ;;;;;; ;;;;;; ("Llyod's beacon" report) ("a platinum orb" report) ("a sparkling red potion" report "red potion") ;;;;;; ;;;;;; ("a bloody goat's horn" pouch) ("a box of \"NecroGods\" brand cookies" bag) ("a decaying vulture's feather" pouch) ("a dried up leaf from the father oak" pouch) ("a pickled boar's snout" pouch) ("the exfoliated skin of a serpent" pouch) ("the severed legs of a toad" pouch) ("a glowing branch from an aloe plant" pouch) ;;;;;; ;;;;;; ("a juicy turnip" donate) ("a scroll of identify" donate) ("a scroll of safety" donate) ("an acorn" donate) ("frog legs" donate) ;;;;;; ;;;;;; ("a Tattered Smock" junk) ;;;;;; ;;;;;; ("Dark Green Leather Armor" drop) ("Iron Plated Boots" drop) ("a Golden Ring set with a stunning Sapphire Gemstone" drop "ring") ("a Guardsman's Longsword" drop) ("a Jewelled Tiara of Black Steel" drop "tiara") ("a Ninja's Black Belt" drop) ("a Ninja's hood" drop) ("a Short FishSword" drop) ("a Sturdy Silver Broadsword" drop) ("a Thin Silver Broadsword" drop) ("a Wooden Staff" drop) ("a beginner's necklace of magic" drop) ("a biscuit" drop) ("a biscuit" drop) ("a blade dubbed \"Varanno's Vengeance\"" drop "blade") ("a blue hilted longsword" drop) ("a bracelet made of string" drop) ("a brass amulet" drop) ("a brightly colored jester's hat" drop) ("a bronze bracer" drop) ("a bronze canteen" drop) ("a bronze shield with steel trim" drop "shield") ("a bucket of water" drop) ("a carved ring of redwood" drop) ("a chunk of home-made cheese" drop) ("a clamshell" drop) ("a clinging suit of green algae" drop) ("a deck of magic cards" drop) ("a deep blue bracelet" drop) ("a deep blue shield" drop) ("a delicate golden bracelet" drop) ("a dented steel breastplate" drop) ("a dented sword" drop) ("a finely carved Dagger of Bone" drop) ("a fishing net" drop) ("a four leaf clover" drop) ("a fur lined cap" drop) ("a green ring made of wood" drop "ring") ("a grey steel helm with a black plume" drop) ("a large chef's hat" drop) ("a large cooking fork" drop) ("a large hunting spear" drop) ("a large shield made of precious metals" drop) ("a large stone club" drop) ("a large, heavy sword" drop) ("a large, worn cloak" drop) ("a leather bound portolano" drop) ("a long blue spear" drop) ("a long blue-handled pike" drop) ("a long white, flowing dress" drop) ("a long, flowing gown of satin" drop) ("a lucky rabbit's foot" drop) ("a lumber axe" drop) ("a lute" drop) ("a magic paintbrush" drop) ("a maroon travel cloak" drop) ("a meat pie" drop) ("a pair of blue legplates" drop) ("a pair of brightly colored baggy pants" drop) ("a pair of glasses" drop) ("a pair of grass snake fangs" drop) ("a pair of hand puppets named Jimbo and Timbo" drop) ("a pair of lucky dice" drop) ("a pair of red shoulder plates" drop) ("a pair of satin slippers" drop) ("a pair of worn, brown gloves" drop) ("a plain silver ring" drop) ("a plain steel band" drop) ("a pointed pike" drop) ("a red silk veil" drop) ("a ring with the crest of the Cutter Shark" drop) ("a sharpened oak dagger" drop) ("a sharpened steel dagger" drop) ("a shimmering silver ball" drop) ("a shiny copper ring" drop) ("a silver serving tray" drop) ("a simple gold ring" drop) ("a small bag of golden dust" drop) ("a small band of oak" drop) ("a small circlet set with emeralds" drop) ("a small silver tiara" drop) ("a small steel shield" drop) ("a small wooden pipe" drop) ("a snowy white cape" drop) ("a soft velvet wristband" drop) ("a steel breastplate embossed with the seal of Vitus" drop "breastplate") ("a steel chain belt" drop) ("a steel finger sheath" drop) ("a steel longsword" drop) ("a steel shortsword" drop) ("a stone shield" drop) ("a suit of blue chainmail decorated with white stars" drop "suit") ("a supply pack" drop) ("a tarnished band of gold" drop) ("a thin, silver rapier" drop) ("a tiny golden band encrusted with rubies" drop "band") ("a turtle shell" drop) ("a walking stick" drop) ("a well-tailored coat with brass buttons" drop "coat") ("a whip made of black cord" drop) ("a whipcord belt" drop) ("a worn hunting belt" drop) ("a worn leather scabbard" drop) ("a woven satchel" drop) ("an Assassin's Sword" drop) ("an algae-encrusted key" drop) ("an amber bead necklace" drop) ("an amulet of live oak" drop) ("an enchanted dagger" drop) ("an endurium breastplate" drop) ("an engraved band of steel" drop) ("an oak staff" drop) ("an old, faded bonnet" drop) ("an orange globe of light" drop) ("black leather boots" drop) ("blue baggy sleeves" drop) ("brown travel boots" drop) ("dark green pants" drop) ("dark green sleeves" drop) ("dark olive green robes" drop) ("elven hunting boots" drop) ("some brass knuckles" drop) ("spiked steel boots" drop) ("staff of knowledge" drop) ("steel plated gauntlets" drop) ("the Boots of the Huntmaster" drop) ("the Gloves of Might" drop) ("the ivy torch of Thannadus" drop) ("the scabbard of remembrance" drop) ("the sharp bee stinger" drop) ("the tail of a blue horse" drop) ("thick leather pants set with spikes" drop) ("wooden prayer beads" drop) ;;;;;; ;;;;;; ("a large lever" ignore) ("a pearl" ignore) ("a potion of lesser salvation" ignore "lesser potion") ("a potion of salvation" ignore "salvation potion") ("a simple wooden key" ignore) ("a small silver key with a blue tint" ignore) ("a tiny vial of saltwater" ignore) ("a tiny yellow wand" ignore) ("an elixir of forest herbs" ignore) ("an elven star ring" ignore) ("scroll of natural life" ignore) ("the trepedi key" ignore) ("a small pile of gold coins" ignore) ("a little pile of gold coins" ignore) ;;;;;; ;;;;;; ;;;;;; ;;;;;; ;;; )) (mud-findings-init-hash-table) ) ;; To automagically align and sort the lootings, press C-x C-e at the end of ;; the next line: ;; (mud-settings-file-make-sexy "mud-findings-alist") ;; ;; To automagically add previously unknown looted items, press C-x C-e at the ;; end of the next line: ;; (mud-settings-file-insert-new-lootings "insert new lootings, dude") (defvar mud-unknown-looted-items-old nil) (defvar mud-unknown-looted-items nil "Items looted that don't have an action to them.") (defun mud-report-loot (item result) (defun white (s) (fface s 'mud-loot-report-face)) (defun orange (s) (fface s 'mud-loot-report-highlight-face)) ;;(replace-match "") (mud-insert-output-string (format (white " Loot: %s%s\n") (orange item) result))) (defun mud-process-looted-item (item) ;;(message "mud processing %s" item) (replace-match "") (let ((result (gethash item mud-findings-hash-table))) (mud-report-loot item (if (stringp result) (if (equal result "") "" (mud-send-string (concat result "\n")) ;; nonzero string (concat " {" result "}")) (add-to-list 'mud-unknown-looted-items item) ;; nonstring (message "Unprocessed looting: %s" item) " [NEW]" )))) (mud-add-trigger mud-looted-item "^You get \\([^\n]+?\\) from the corpse of [^\n]+\\.\n" (mud-process-looted-item (match-string-no-properties 1))) (mud-add-trigger mud-breathe-water "^You choke and clutch your throat as water rushes into your lungs!$" (mud-send-string-with-echo "breathewater\n")) (mud-add-trigger mud-sanc-out "^The sparkling globe of protection around your body fades into nothingness\\.$" (mud-send-string-with-echo "sancout\n")) (mud-add-trigger mud-cloak-out "^The cloak of flames around your body dissipates\\.$" (mud-send-string-with-echo "cloakout\n")) (mud-add-trigger mud-anti-idle "^You have been idle, and are pulled into a void\\.$" (mud-send-string-with-echo "jump\n")) (mud-add-trigger mud-too-exhausted-to-follow "^You are too exhausted to follow\\.$" (mud-send-string-with-echo "exhaustedfollow\n")) ;;(mud-add-trigger mud-tells-you ;; "\\([A-Z][a-z]+\\) tells you, '" ;; ( ;; )) ;(mud-add-trigger-gag "^Your blood freezes as you hear [^\n]*'s death cry.") ;;(mud-add-trigger-gag "^You recover your opponent's mana.") ;; stuff i never want to see: (mud-add-gag (ccregexps '( "There is already another liquid in it!" "Your stomach can't contain anymore!" "[Duel2] The Duel2 script is currently enabled. t awat dhelp for information." "[AWAT] The AWAT script is currently enabled. t awat help for information." "Please wait while it gets dumped to a log...\nOkay. Thanks!" ) )) ) (defun kc-necromium-setup-keys () (mud-define-key-reply mud-score [ (meta c) ] "score\n") (mud-define-key-reply mud-report [ (meta t) ] "report\n") (mud-define-key-reply mud-look [ (meta l) ] "look\n") (mud-define-key-reply mud-refresh [ (meta r) ] "refresh\n") (mud-define-key-reply mud-wrefresh [ (control c) (meta r) ] "wrefresh\n") (mud-define-key-reply mud-mindshock [ (meta s) ] "ss\n") (mud-define-key-reply mud-detonate [ (meta d) ] "dd\n") (mud-define-key-reply mud-bash [ (meta b) ] "bb\n") (mud-define-key-reply mud-assist [ (meta a) ] "xassist\n") (mud-define-key-reply mud-qall [ (control c) (meta q) ] "q1\nq2\nq3\nq4\nq5\nq6\nq7\nq8f\n") (mud-define-key-reply mud-qwall-uta [ (control c) (control x) (meta q) ] "qw1 uta\nqw2 uta\nqw3 uta\n") (mud-define-key-reply mud-super-drink [ (control c) (meta d) ] "drink fountain drink fountain pour water out fill water fountain pour 2.water out fill 2.water fountain") ) (defun kc-necromium-setup-faces () (defun kc-mud-setup-face (name color &optional boldp) (copy-face 'mud-default-face name) (set-face-foreground name color) (set-face-bold-p name boldp)) (kc-mud-setup-face 'mud-kill-report-face "red" t) (kc-mud-setup-face 'mud-kill-report-highlight-face "white" t) (kc-mud-setup-face 'mud-kill-report-how-face "green") (kc-mud-setup-face 'mud-loot-report-face "white") (kc-mud-setup-face 'mud-loot-report-highlight-face "dark orange" t) ) (defun kc-necromium-setup () (message "Applying Necromium local settings...") (kc-necromium-setup-triggers) (kc-necromium-setup-keys) (kc-necromium-setup-faces) (message "Applying Necromium local settings... done") )