WoTMUD Archives

A player-run forum for the Wheel of Time MUD
It is currently Sun Oct 21, 2018 8:09 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: HoM cMUD Scripts
PostPosted: Sun Sep 30, 2018 5:07 am 
Offline

Joined: Tue Apr 07, 2015 8:24 pm
Posts: 119
Location: Seattle
-----Map-----
    [Updated: 10/17/2018]
Map follows sneaking group leader via Dline mechanics.
Built in brief mode for optimal map follow functions.
Map script is designed to be used in SAFE mode.

Type helpMap to view help file in client.
Type helpMapFind to view Find command related help file in client.
Type helpFleeDline to view Flee and Dline related help file in client.

Type colorMap <type> [color] to set colors for Map messages of the specified type.
Available colorMap types: (shown in current set color)
    Fail - Fail message color:
    Info - Info message color:
    Search - Search message color:
    Success - Success message color:

Type toggleMap to toggle all Map related messages on/off.
    Type toggleFind to turn only MapFind related messages on/off.
    Type toggleDline to turn only Dline related messages on/off.
      Note: sneak leader follow function uses Dline mechanics and will trigger messages.

Type toggleMapBrief to toggle client side brief mode.
    Note: mimics the brief command, but allows for optimal map follow functions.

Type toggleDlineFind to turn automatic dline/flee find command on/off.
    Note: When on and map position fails on a flee (or sneak lead) the find command is automatically sent.

Direct download link: MapCmud.txt

Active Triggers: 23/31
Input Triggers: 3
Events: onConnect
Code:
#CLASS {Map}
#ALIAS helpMap {
   #PRINT {%crlf <color @mapColorInfo>-----Map Help File-----</color>}
   #PRINT {<color @mapColorInfo>  [Updated: 10/17/2018]</color>}
   #PRINT { Map follows sneaking group leader via Dline mechanics.}
   #PRINT {  Note: script is designed to be used in SAFE mode.}
   #PRINT {}
   #PRINT {<color @mapColorInfo> Type colorMap <type> [color] to set colors for Map messages of the specified type.</color>}
   #PRINT {  Available colorMap types: (shown in current set color)}
   #PRINT {   <color %replace(@mapColorFail,","," ")>Fail - Fail message color: @mapColorFail</color>}
   #PRINT {   <color %replace(@mapColorInfo,","," ")>Info - Info message color: @mapColorInfo</color>}
   #PRINT {   <color %replace(@mapColorSearch,","," ")>Search - Search message color: @mapColorSearch</color>}
   #PRINT {   <color %replace(@mapColorSuccess,","," ")>Success - Success message color: @mapColorSuccess</color>}
   #PRINT {}
   #PRINT {  Note: can use [foreground background] format, background color is optional.}
   #PRINT {   Example: colorMap fail red darkgray}
   #PRINT {}
   #PRINT { Type toggleMap to toggle all Map related messages on/off.}
   #PRINT {  <color @mapColorInfo>Message setting: %if(@showMap,ON,OFF)</color>}
   #PRINT {}
   #PRINT { Type toggleMapBrief to toggle client side brief mode.}
   #PRINT {  Note: mimics the brief command, but allows for optimal map follow functions.}
   #PRINT {    <color @mapColorInfo>Map Brief Mode: %if(%class(mapBriefMode),ON,OFF)</color>}
   #PRINT {}
   #PRINT {<color @mapColorInfo> -----Map Related Help Files-----</color>}
   #PRINT { Type helpMapFind to view the Find related help file.}
   #PRINT { Type helpFleeDline to view the Flee and Dline related help file.}
   #PRINT {}
   }
#ALIAS helpMapFind {
   #PRINT {%crlf <color @mapColorInfo> -----MapFind-----</color>}
   #PRINT { Type find to send look command and set current map location.}
   #PRINT {  Hint: place in macro for quick access.}
   #PRINT {}
   #PRINT { Type toggleFind to turn only MapFind related messages on/off.}
   #PRINT {  <color @mapColorInfo>Message setting: %if(@showFind,ON,OFF)</color>}
   #PRINT {}
   }
#ALIAS helpFleeDline {
   #PRINT {%crlf <color @mapColorInfo> -----FleeDline-----</color>}
   #PRINT { FleeDline sets map position after a flee is detected.}
   #PRINT {  Notes: works for both in-combat and out-of-combat flees.}
   #PRINT {   Tracks movement during flee for dline map correction.}
   #PRINT {}
   #PRINT { For script compatibility set all directional commands to single letters.}
   #PRINT {  Examples: n e s w d u}
   #PRINT {}
   #PRINT { Type toggleDlineFind to turn automatic dline/flee find command on/off.}
   #PRINT {  Note: When on and map position fails on a flee the find command is automatically sent.}
   #PRINT {   <color @mapColorInfo>Dline Find Mode: %if(%class(dlineAutoFind),ON,OFF)</color>}
   #PRINT {}
   #PRINT { Type toggleDline to turn only Dline related messages on/off.}
   #PRINT {  Note: sneak leader follow function uses Dline mechanics and will trigger messages.}
   #PRINT {   <color @mapColorInfo>Message setting: %if(@showDline,ON,OFF)</color>}
   #PRINT {}
   }
#ALIAS colorMap {
   #IF (%null(%1)) {
      #PRINT {%crlf  <color @mapColorInfo>Usage: colorMap <type> [color]</color>}
      #PRINT {}
      #PRINT {  Available Alert types: (shown in current set color)}
      #PRINT {   <color %replace(@mapColorFail,","," ")>Fail - Fail message color: @mapColorFail</color>}
      #PRINT {   <color %replace(@mapColorInfo,","," ")>Info - Info message color: @mapColorInfo</color>}
      #PRINT {   <color %replace(@mapColorSearch,","," ")>Search - Search message color: @mapColorSearch</color>}
      #PRINT {   <color %replace(@mapColorSuccess,","," ")>Success - Success message color: @mapColorSuccess</color>}
      #PRINT {}
      #PRINT {  Note: can use [foreground background] format, background color is optional.}
      #PRINT {   Example: colorMap fail red darkgray}
      #PRINT {}
      } {
      #IF (%class(%concat("mapColor",%1))=-1) {
         #PRINT {%crlf <color @mapColorInfo>%1 is an invalid type selection...</color>}
         } {
         #IF (%null(%2)) {
            #PRINT {%crlf <color @mapColorInfo>What color is that?...</color>}
            } {
            #IF (%colorname(%2)=536870911 AND %color(%2)=0) {
               #VAR %concat("mapColor",%1) {}
               #PRINT {%crlf <color @mapColorInfo>%2 is an invalid color. %concat("mapColor",%proper(%1)) variable cleared.</color>}
               } {
               #IF (%null(%3)) {
                  #VAR %concat("mapColor",%1) {%2}
                  #PRINT {%crlf Map %proper(%1) message color set: <color %2>%2</color>}
                  } {
                  #IF (%colorname(%3)=536870911 AND %color(%3)=0) {
                     #VAR %concat("mapColor",%1) {}
                     #PRINT {%crlf <color @mapColorInfo>%3 is an invalid color. %concat("mapColor",%proper(%1)) variable cleared.</color>}
                     } {
                     #VAR %concat("mapColor",%1) {%concat(%2," ",%3)}
                     #PRINT {%crlf Map %proper(%1) message color set: <color %2 %3>%2 %3</color>}
                     }
                  }
               }
            }
         }
      }
   }
#ALIAS toggleMap {
   #IF (@showMap) {
      #VAR showMap 0
      #VAR showFind 0
      #VAR showDline 0
      #PRINT {%crlf <color @mapColorInfo>Map related messages are now disabled.</color>}
      } {
      #VAR showMap 1
      #VAR showFind 1
      #VAR showDline 1
      #PRINT {%crlf <color @mapColorInfo>Map related messages are now enabled.</color>}
      }
   }
#ALIAS toggleFind {
   #IF (@showFind) {
      #VAR showFind 0
      #PRINT {%crlf <color @mapColorInfo>Find related messages are now off.</color>}
      } {
      #VAR showFind 1
      #PRINT {%crlf <color @mapColorInfo>Find related messages are now on.</color>}
      }
   }
#ALIAS toggleDline {
   #IF (@showDline) {
      #VAR showDline 0
      #PRINT {%crlf <color @mapColorInfo>FleeDline related messages are now off.</color>}
      } {
      #VAR showDline 1
      #PRINT {%crlf <color @mapColorInfo>FleeDline related messages are now on.</color>}
      }
   }
#ALIAS toggleDlineFind {
   #IF (%class(dlineAutoFind)) {
      #T- {dlineAutoFind}
      #PRINT {%crlf <color @mapColorInfo>Dline auto find on failed detection is now off.</color>}
      } {
      #T+ {dlineAutoFind}
      #PRINT {%crlf <color @mapColorInfo>Dline auto find on failed detection is now on.</color>}
      }
   }
#ALIAS toggleMapBrief {
   #IF (%class(mapBriefMode)) {
      #T- {mapBriefMode}
      #PRINT {%crlf <color @mapColorInfo>Client side brief mode is now off.</color>}
      } {
      #T+ {mapBriefMode}
      #PRINT {%crlf <color @mapColorInfo>Client side brief mode is now on.</color>}
      #PRINT {<color @mapColorInfo> Set in-game brief mode to off. </color>}
      }
   }
#ALIAS findMessageRoom {
   #IF (%numitems(@mapRoomKey)=0) {
      #PRINT {%crlf <color @mapColorFail>Room name not found, check your map!</color>}
      } {
      #IF (%numitems(@mapRoomKey)>1) {
         #PRINT {%crlf <color @mapColorSearch>Multiple matches, searching descriptions...</color>}
         findMessageDesc
         } {
         #PRINT {%crlf <color @mapColorSuccess>Room found! Setting map position.</color>}
         }
      }
   }
#ALIAS findMessageDesc {
   #IF (%numitems(@findByDesc)=0) {
      #PRINT {<color @mapColorFail> Failed to match room description...</color>}
      findMessageExit
      } {
      #IF (%numitems(@findByDesc)>1) {
         #PRINT {<color @mapColorSearch> Multiple matches, searching exits...</color>}
         findMessageExit
         } {
         #PRINT {<color @mapColorSuccess> Description Found! Setting map position.</color>}
         }
      }
   }
#ALIAS findMessageExit {
   #IF (%numitems(@findByExit)=0) {
      #PRINT {<color @mapColorFail> Failed to match room exits...</color>}
       #IF (%ismember(%roomkey(),@mapRoomKey)) {
         #PRINT {<color @mapColorSuccess> Map position is already in room with matching name. No action taken.</color>}
         } {
         #PRINT {<color @mapColorSuccess> Setting map position to room with matching name (random).</color>}
         }
      } {
      #IF (%numitems(@findByExit)=1) {
         #PRINT {<color @mapColorSuccess> Exits Found! Setting map position.</color>}
         } {
         #PRINT {<color @mapColorSearch> Multiple exits match...</color>}
          #IF (%ismember(%roomkey(),@mapRoomKey)) {
            #PRINT {<color @mapColorSuccess> Map position is already in room with matching name. No action taken.</color>}
            } {
            #PRINT {<color @mapColorSuccess> Setting map position to room with matching name (random).</color>}
            }
         }
      }
   }
#ALIAS fleeDlineMessage {
   #IF (%class(onSneakFollow)) {
      #PRINT {%crlf <color @mapColorSearch>Follow the Leader! Searching for correct room...</color>}
      } {
      #PRINT {%crlf <color @mapColorSearch>Flee Detected! Attempting to correct map position...</color>}
      }
   #IF (@showDline=2) {
      #IF (%class(onSneakFollow)) {
         #PRINT {<color @mapColorSuccess> Sneaky! Setting map position.</color>}
         } {
         #PRINT {<color @mapColorSuccess> Flee Double Line Success! Setting map position.</color>}
         }
      } {
      #IF (@showDline=3) {
         #IF (%class(onSneakFollow)) {
            #PRINT {<color @mapColorSearch> Multiple possible map positions after following.</color>}
            } {
            #PRINT {<color @mapColorSearch> Multiple possible map positions after fleeing.</color>}
            }
         #IF (%class(dlineAutoFind)) {
            #IF (%class(onSneakFollow)) {
               #PRINT {<color @mapColorFail> Failed to correct map position after following.</color>}
               #PRINT {<color @mapColorSearch> Sending find command...</color>}
               } {
               #PRINT {<color @mapColorFail> Failed to correct map position after fleeing.</color>}
               #PRINT {<color @mapColorSearch> Sending find command...</color>}
               }
            } {
            #IF (%class(onSneakFollow)) {
               #PRINT {<color @mapColorFail> Failed to correct map position after following.</color>}
               } {
               #PRINT {<color @mapColorFail> Failed to correct map position after fleeing.</color>}
               }
            }
         }
      }
   }
#ALIAS find {
   #T+ {onFindExit}
   #T+ {onFindPrompt}
   #VAR findByDesc {}
   #VAR findByExit {}
   #IF (@showFind) {
      #PRINT {<color @mapColorSearch> Searching map for your current location...</color>}
      }
   #SENDRAW look
   }
#ALIAS findMatchRoom {
   #IF (%numitems(@mapRoomKey)=1) {
      #TELEPORT @mapRoomKey
      } {
      #IF (%numitems(@mapRoomKey)=0) {
         #IF (@showFind) {} {
            #SHOW {%crlf <color @mapColorFail>Room name not found, check your map!</color>}
            }
         } {
         findMatchDesc
         }
      }
   }
#ALIAS findMatchDesc {
   #IF (@showFind) {#ADD showFind 1}
   #FORALL @mapRoomKey {
      #IF (%subchar(%roomdesc(%i),%crlf" |","")=%subchar(@mapRoomDesc,%crlf" |","")) {
         #ADDITEM findByDesc %i
         }
      }
   #IF (%numitems(@findByDesc)=1) {
      #TELEPORT @findByDesc
      } {
      findMatchExit
      }
   }
#ALIAS findMatchExit {
   #IF (@showFind) {#ADD showFind 1}
   #FORALL @mapRoomKey {
      #IF (@mapRoomExit=%sort(%roomexit(%i))) {
         #ADDITEM findByExit %i
         } {
         #IF (%numitems(@findByExit)=1) {
            #TELEPORT @findByExit
            } {
            #IF (%ismember(%roomkey,@mapRoomKey)) {} {
               #TELEPORT %item(@mapRoomKey,%random(1,%numitems(@mapRoomKey)))
               }
            }
         }
      }
   }
#ALIAS fleeSetDline {
   #T+ {onFleeExit}
   #T+ {onFleePrompt}
   #VAR dlineDescMatched {}
   #VAR dlineExitMatched {}
   #VAR dlinePossibleKeys {}
   #VAR fleeRoomKey {%roomkey()}
   #FORALL %roomexit(@fleeRoomKey) {
      #FORALL %roomlink(@fleeRoomKey,%i) {
         #ADDITEM dlinePossibleKeys {%j}
            }
         }
   }
#ALIAS dlineFindRoom {
   #IF (@showDline) {#VAR showDline {1}}
   #FORALL @dlinePossibleKeys {
      #IF (%ismember(%i,@mapRoomKey)) {
         #IF (%subchar(%roomdesc(%i),%crlf" |","")=%subchar(@mapRoomDesc,%crlf" |","")) {
            #ADDITEM dlineDescMatched {%i}
            }
         }
      }
   #IF (%numitems(@dlineDescMatched)=1) {
      #IF (@showDline) {#ADD showDline 1}
      #TELEPORT @dlineDescMatched
      } {
      #FORALL @dlinePossibleKeys {
         #IF (%ismember(%i,@mapRoomKey)) {
            #IF (@mapRoomExit=%sort(%roomexit(%i))) {
               #ADDITEM dlineExitMatched {%i}
               }
            }
         }
      #IF (%numitems(@dlineExitMatched)>1) {
         #IF (@showDline) {#ADD showDline 2}
         #IF (%class(dlineAutoFind)) {
            #ALARM "dlineFindAlarm" {+.5} {
               find
               } "Map"
            }
         } {
         #IF (@showDline) {#ADD showDline 1}
         #TELEPORT @dlineExitMatched
         }
      }
   }
#VAR dlineDescMatched {}
#VAR dlineExitMatched {}
#VAR dlinePossibleKeys {}
#VAR findByDesc {} {}
#VAR findByExit {} {}
#VAR fleeDlineDirections {}
#VAR fleeRoomKey {}
#VAR mapColorFail red
#VAR mapColorInfo dodgerblue
#VAR mapColorSearch green
#VAR mapColorSuccess blue
#VAR mapCurrentDirection {}
#VAR mapGroupLeader {}
#VAR mapMoveAdjustment {}
#VAR mapMoveDirection {}
#VAR mapRoomDesc {}
#VAR mapRoomExit {}
#VAR mapRoomKey {}
#VAR mapRoomName {}
#VAR showDline 1
#VAR showFind 1
#VAR showMap 1
#TRIGGER "mapRoomTrigger" {^%e[36m([A-Z]*)%e[0m$} {
   #IF (%match(%1,"%w speaks from the %w '*'")) {} {
      #T+ {mapDescTrigger}
      #T+ {mapExitTrigger}
      #VAR mapRoomDesc {}
      #VAR mapRoomName {%1}
      #VAR mapRoomKey {%mapquery(NAME = '%replace(%1,"'","''")')}
      }
   } "" {case|color}
#TRIGGER "mapRoomPrompt" {^{o|*} * > %e[36m([A-Z]*)%e[0m$} {
   #IF (%match(%1,"%w speaks from the %w '*'")) {} {
      #T+ {mapDescTrigger}
      #T+ {mapExitTrigger}
      #VAR mapRoomDesc {}
      #VAR mapRoomName {%1}
      #VAR mapRoomKey {%mapquery(NAME = '%replace(%1,"'","''")')}
      }
   } "" {case|color}
#TRIGGER "mapDescTrigger" {^(*)$} {
   #IF (%match(%1,"{*|o} * >")) {} {
      #IF (%match(%1,^@mapRoomName$)) {} {
         #IF (%begins(%line,"[ obvious exits: ")) {
            #T- {mapDescTrigger}
            } {
            #VAR mapRoomDesc {%additem(%line,@mapRoomDesc)}
            #IF (%class(mapBriefMode)) {#GAG}
            }
         }
      }
   } "" {case|disable}
#TRIGGER "mapExitTrigger" {^~[ obvious exits: (*) ~]$} {
   #T- {mapExitTrigger}
   #VAR mapRoomExit (%lower(%sort(%replace(%if(%pos("]",%1),%left(%1,(%pos("]",%1)-2)),%1)," ","|"))))
   #RAISE onFindExit
   #RAISE onFleeExit
   } "" {case|disable}
#TRIGGER "mapPrompt" {^{*|o} * >} {
   #T- {onMapAdjustment}
   #VAR mapMoveAdjustment {}
   #RAISE onFindPrompt
   #RAISE onFleePrompt
   #RAISE onLookPrompt
   #RAISE onSneakFollow
   } "" {case|nocr|prompt}
#TRIGGER "fleeFleeTrigger" {^You panic and attempt to flee!$} {
   #IF (%class(dlineFleeDetection)) {
      fleeSetDline
      #T- {dlineFleeDetection}
      }
   #T+ {onDlineRelatedDetection}
   } "" {case}
#TRIGGER "fleePanicTrigger" {PANIC!  You couldn't escape!$} {
   #T- {fleePanicTrigger}
   #T- {fleeZerkTrigger}
   #T- {onDlineRelatedDetection}
   #T- {onFleePrompt}
   #T+ {dlineFleeDetection}
   #VAR fleeDlineDirections {}
   } "" {case|disable}
#TRIGGER "fleeZerkTrigger" {Berserk! Death! Death! Fight to the death!$} {
   #T- {fleeZerkTrigger}
   #T- {fleePanicTrigger}
   #T- {onDlineRelatedDetection}
   #T+ {dlineFleeDetection}
   #VAR fleeDlineDirections {}
   } "" {case|disable}
#TRIGGER "mapSetFollow" {You now follow ([A-Z]%w).$} {
   #T+ {mapStopTrigger}
   #T+ {mapLeavesTrigger}
   #T+ {mapFollowSneak}
   #VAR mapGroupLeader %1
   } "" {case}
#TRIGGER "mapStopTrigger" {You stop following @{mapGroupLeader}.$} {
   #T- {mapStopTrigger}
   #T- {mapLeavesTrigger}
   #T- {mapFollowTrigger}
   #T- {mapFollowSneak}
   #VAR mapGroupLeader {}
   } "" {case|disable}
#TRIGGER "mapLeavesTrigger" {@mapGroupLeader leaves (%w)*.$} {
   #T- {mapFollowSneak}
   #T+ {mapFollowTrigger}
   #VAR mapMoveDirection %1
   } "" {case|disable}
#TRIGGER "mapFollowTrigger" {You follow @{mapGroupLeader}.$} {
   #T- {mapFollowTrigger}
   #T+ {mapFollowSneak}
   #MOVE @mapMoveDirection
   } "" {case|disable}
#TRIGGER "mapFollowSneak" {You follow @{mapGroupLeader}.$} {
   fleeSetDline
   #T+ {onSneakFollow}
   } "" {case|disable}
#TRIGGER "mapClosedTrigger" {The (*) seems to be closed.$} {
   #IF (%doorname(,@mapMoveAdjustment)=%1) {
      #NODIR 1
      } {
      #MOVE @mapMoveAdjustment
      #VAR mapMoveAdjustment {}
      #NODIR 1
      }
   } "" {case}
#TRIGGER "mapAlasTrigger" {Alas, you cannot go that way...$} {
   #IF (%roomlink(,@mapMoveAdjustment)=-1) {} {
      #MOVE @mapMoveAdjustment
      #VAR mapMoveAdjustment {}
      #NODIR 1
      }
   } "" {case}
#TRIGGER "mapRestingTrigger" {Nah... You feel too relaxed to do that..} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapSleepingTrigger" {In your dreams, or what?} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapSittingTrigger" {Maybe you should get on your feet first?} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapFightingTrigger" {No way!  You're fighting for your life!} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapShudderTrigger" {You shudder at the concept of crossing water.} {
   #MOVE @mapMoveAdjustment
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapSwimTrigger" {You would need to swim there, you can't just walk it.} {
   #MOVE @mapMoveAdjustment
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapExhaustedTrigger" {You are too exhausted.} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapRideInside" {You can't ride in there.} {
   #MOVE @mapMoveAdjustment
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapRideWater" {You can't ride on water.} {
   #MOVE @mapMoveAdjustment
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapCantRide" {You can't ride there on a horse!} {
   #MOVE @mapMoveAdjustment
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapBoatTrigger" {You need a boat to go there.} {
   #MOVE @mapMoveAdjustment
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapMountHaggard" {Your mount is too exhausted.} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapMountFighting" {Your mount is engaged in combat!} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapMountSleeping" {Your mount ought to be awake and standing first!} {
   #NODIR 1
   } "" {case|verbatim}
#TRIGGER "mapBlindTrigger" {You can't see a damned thing, you're blinded!} {
   #OK
   } "" {case|verbatim}
#TRIGGER "mapDarkTrigger" {It is pitch black...} {
   #OK
   } "" {case|verbatim}
#ONINPUT "dlineFleeDetection" {^{f|fl|fle|flee}$} {
   #T- {dlineFleeDetection}
   #T+ {onDlineRelatedDetection}
   #T+ {fleePanicTrigger}
   #T+ {fleeZerkTrigger}
   fleeSetDline
   } "" {}
#ONINPUT "mapMovementInput" {^({d|e|n|s|u|w})$} {
   #T+ {onMapCurrent}
   #RAISE onDlineRelatedDetection %1
   #RAISE onMapAdjustment %1
   #RAISE onMapCurrent %1
   } "" {}
#ONINPUT "mapLookInput" {^{l|lo|loo|look}$} {
   #IF (%class(mapBriefMode)) {
      #T+ {onLookPrompt}
      #T- {mapBriefMode}
      } {}
   } "" {}
#EVENT onConnection {
   #T+ {onFindExit}
   #T+ {onFindPrompt}
   #T- {onFleeExit}
   #T- {onFleePrompt}
   #T- {onLookPrompt}
   #T- {onSneakFollow}
   #T- {onMapAdjustment}
   #T- {onDlineRelatedDetection}
   }
#EVENT onMapAdjustment {
   #T- {onMapAdjustment}
   #T- {onMapCurrent}
   #VAR mapMoveAdjustment %1
   #IF (@mapCurrentDirection=@mapMoveAdjustment) {
      #VAR mapMoveAdjustment {}
      }
   }
#EVENT onMapCurrent {
   #T- {onMapCurrent}
   #T+ {onMapAdjustment}
   #VAR mapCurrentDirection %1
   }
#EVENT onDlineRelatedDetection {
   #VAR fleeDlineDirections {%additem(%1,@fleeDlineDirections)}
   }
#EVENT onFindExit {
   #T- {onFindExit}
   findMatchRoom
   }
#EVENT onFindPrompt {
   #T- {onFindPrompt}
   #IF (@showFind) {findMessageRoom}
   }
#EVENT onFleeExit {
   #T- {onFleeExit}
   dlineFindRoom
   }
#EVENT onSneakFollow {
   #T- {onSneakFollow}
   dlineFindRoom
   }
#EVENT onFleePrompt {
   #T- {onFleePrompt}
   #T- {onDlineRelatedDetection}
   #T- {fleePanicTrigger}
   #T- {fleeZerkTrigger}
   #IF (@showDline) {fleeDlineMessage}
   #FORALL @fleeDlineDirections {#MOVE %i}
   #VAR fleeDlineDirections {}
   #T+ {dlineFleeDetection}
   }
#EVENT onLookPrompt {
   #T- {onLookPrompt}
   #T+ {mapBriefMode}
   }
#EVENT mapBriefMode {}
#EVENT dlineAutoFind {}
#CLASS 0

_________________
House of Medakan zMUD Scripts: Table of Contents

House of Medakan cMUD Scripts: Table of Contents


Last edited by Taziar on Wed Oct 17, 2018 12:24 pm, edited 7 times in total.

Top
 Profile  
 
 Post subject: Re: HoM cMUD Scripts
PostPosted: Sat Oct 06, 2018 4:46 am 
Offline

Joined: Tue Apr 07, 2015 8:24 pm
Posts: 119
Location: Seattle
-----Pulse Timer----- (aka spinning timer)
    [Updated 10/16/2018]

Type helpPulseTimer to view help file in client.

Image

Direct download link: PulseTimer.txt
Active Triggers: 3/16
Oninput: 0
Events: onConnect, custom
Code:
#CLASS {PulseTimer}
#ALIAS helpPulseTimer {
   #PRINT {%crlf <color @pulseColorInfo>-----Pulse Timer Help File-----</color>}
   #PRINT {      <color @pulseColorInfo>[Updated: 10/16/2018]</color>}
   #PRINT {}
   #PRINT { Usage: <color @pulseColorInfo>colorPulse <type> [color]</color> to set color for type.}
   #PRINT {  Available types: (shown in current set color)}
   #PRINT {   Info - Info message color: <color @pulseColorInfo>%proper(@pulseColorInfo)</color>}
   #PRINT {   Pulse - Pulse symbol color: <color @pulseColorPulse>%proper(@pulseColorPulse)</color>}
   #PRINT {}
   #PRINT {  Note: can use [foreground background] format, background color is optional.}
   #PRINT {   Example: colorPulse info red darkgray}
   #PRINT {}
   #PRINT { Usage: <color @pulseColorInfo>fontPulse <font></color> to set font type for Pulse Timer.}
   #PRINT {  Note: single name fonts only, fonts like Times New Roman will bug out.}
   #PRINT {   Current font type: <color @pulseColorInfo>%proper(@pulseFont)</color>}
   #PRINT {}
   #PRINT { Usage: <color @pulseColorInfo>sizePulse <#></color> to set font size for Pulse Timer.}
   #PRINT {  Note: cannot be more or less than 4-5 points from default session font size.}
   #PRINT {   Hint: if timer does not show correctly try adjusting sizePulse #}
   #PRINT {    Current font size: <color @pulseColorInfo>@pulseSize</color>}
   #PRINT {}
   #PRINT { For standard results set color, font, and size to the same as default session.}
   #PRINT {}
   #PRINT { <color @pulseColorInfo>-----Special Function-----</color>}
   #PRINT {  Usage: <color @pulseColorInfo>rainbowPulse</color> to toggle Pulse Timer rainbow color rotation on/off.}
   #PRINT {   Rainbow function: <color @pulseColorInfo>%if(%class(eventRainbowPulse),ON,OFF)</color>}
   #PRINT {}
   }
#ALIAS colorPulse {
   #IF (%null(%1)) {
      #PRINT {%crlf  Usage: <color @pulseColorInfo>colorPulse <type> [color]</color>}
      #PRINT {}
      #PRINT {  Available types: (shown in current set color)}
      #PRINT {   Info - Info message color: <color @pulseColorInfo>%proper(@pulseColorInfo)</color>}
      #PRINT {   Pulse - Pulse symbol color: <color @pulseColorPulse>%proper(@pulseColorPulse)</color>}
      #PRINT {}
      #PRINT {  Note: can use [foreground background] format, background color is optional.}
      #PRINT {   Example: colorPulse info red darkgray}
      #PRINT {}
      } {
      #IF (%class(%concat("pulseColor",%1))=-1) {
         #PRINT {%crlf <color @pulseColorInfo>%1 is an invalid type selection...</color>}
         } {
         #IF (%null(%2)) {
            #PRINT {%crlf <color @pulseColorInfo>What color is that?...</color>}
            } {
            #IF (%colorname(%2)=536870911 AND %color(%2)=0) {
               #VAR %concat("pulseColor",%1) {}
               #PRINT {%crlf <color @pulseColorInfo>%2 is an invalid color. %concat("pulseColor",%proper(%1)) variable cleared.</color>}
               } {
               #IF (%null(%3)) {
                  #VAR %concat("pulseColor",%1) {%2}
                  #PRINT {%crlf %proper(%1) color set: <color %2>%2</color>}
                  } {
                  #IF (%colorname(%3)=536870911 AND %color(%3)=0) {
                     #VAR %concat("pulseColor",%1) {}
                     #PRINT {%crlf <color @pulseColorInfo>%3 is an invalid color. %concat("pulseColor",%proper(%1)) variable cleared.</color>}
                     } {
                     #VAR %concat("pulseColor",%1) {%concat(%2," ",%3)}
                     #PRINT {%crlf %proper(%1) color set: <color %2 %3>%2 %3</color>}
                     }
                  }
               }
            }
         }
      }
   }
#ALIAS sizePulse {
   #IF (%isnumber(%1)) {
      #VAR pulseSize %1
      #PRINT {%crlf Pulse Timer symbol font size set to: <color @pulseColorInfo>@pulseSize</color> %crlf}
      } {
      #PRINT {%crlf <color @pulseColorInfo>What kind of number is that...</color> %crlf}
      }
   }
#ALIAS fontPulse {
   #IF (%null(%1)) {
      #PRINT {%crlf <color @pulseColorInfo>Font name not detected...</color> %crlf}
      } {
      #VAR pulseFont {%-1}
      #PRINT {%crlf Pulse Timer symbol font set to: <color @pulseColorInfo>@pulseFont</color> %crlf}
      }
   }
#ALIAS rainbowPulse {
   #IF (%class(eventRainbowPulse)) {
      #T- {eventRainbowPulse}
      #PRINT {%crlf <color @pulseColorInfo>Pulse Timer symbol color set to normal.</color> %crlf}
      } {
      #T+ {eventRainbowPulse}
      #PRINT {}
      #MXP { Pulse Timer color set: <color red>R<color orange>A<color yellow>I<color green>N<color blue>B<color indigo>O<color violet>W</color>}
      #PRINT {</color>}
      }
   }
#VAR pulseColorPulse {white}
#VAR pulseColorInfo {dodgerblue}
#VAR pulseCount {}
#VAR pulseFont {consolas}
#VAR pulseLastPrompt {}
#VAR pulseRainbowCount {0}
#VAR pulseRainbowList {red|orange|yellow|green|blue|indigo|violet}
#VAR pulseSize {14}
#TRIGGER "pulseChargeTrigger" {^(You line up your charge...)(*)$} {
   #IF (%ends(%line,"> ")) {
      #PSUB {@pulseLastPrompt %e[K} %x1
      #PRINT {You line up your charge...}
      }
   } "" {case}
#TRIGGER "pulseBeginTimer" {^(%s)(*)$} {
   #IF (%null(%2)) {
      #IF (%null(%line2)) {} {#PRINT {}}
      #T+ {eventDashFirst}
      #T+ {pulseDash}
      #T+ {pulseDashLine}
      #VAR pulseCount 1
      #T+ {pulsePrompt}
      #T+ {pulseCancelled}
      #T+ {pulseOk}
      } {
      #IF (%ends(%line,"> ")) {
         #PSUB {@pulseLastPrompt %e[K} %x1
         #PRINT {%crlf}
         #T+ {eventDashFirst}
         #T+ {pulseDash}
         #T+ {pulseDashLine}
         #VAR pulseCount 1
         }
      }
   } "" {nocr|prompt}
#TRIGGER "pulseBeginLine" {^(%s)(*)$} {
   #IF (%null(%2)) {
      #IF (%null(%line2)) {} {#PRINT {}}
      #T+ {eventDashFirst}
      #T+ {pulseDash}
      #T+ {pulseDashLine}
      #VAR pulseCount 1
      #T+ {pulsePrompt}
      #T+ {pulseCancelled}
      #T+ {pulseOk}
      } {
      #IF (%ends(%line,"> ")) {
         #PSUB {@pulseLastPrompt %e[K} %x1
         #PRINT {%crlf}
         #T+ {eventDashFirst}
         #T+ {pulseDash}
         #T+ {pulseDashLine}
         #VAR pulseCount 1
         }
      }
   } "" {}
#TRIGGER "pulseDash" {^(-)} {
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%1</DEST></FONT>}
   #RAISE eventDashFirst
   #RAISE eventDashLast
   #T+ {pulsePrompt}
   #T+ {pulseCancelled}
   #T+ {pulseOk}
   } "" {disable|nocr|prompt}
#TRIGGER "pulseDashLine" {^(-)} {
   #PRINT {}
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%e[2A%1</DEST></FONT>}
   #VAR pulseCount 1
   #RAISE eventDashFirst
   #RAISE eventDashLast
   #T+ {pulsePrompt}
   #T+ {pulseCancelled}
   #T+ {pulseOk}
   } "" {disable}
#TRIGGER "pulseEqual" {^(=)} {
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%1</DEST></FONT>}
   #RAISE eventEqualFirst
   #RAISE eventEqualLast
   } "" {disable|nocr|prompt}
#TRIGGER "pulseEqualLine" {^(=)} {
   #PRINT {}
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%e[2A%1</DEST></FONT>}
   #VAR pulseCount 1
   #RAISE eventEqualFirst
   #RAISE eventEqualLast
   } "" {disable}
#TRIGGER "pulsePlus" {^(+)} {
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%1</DEST></FONT>}
   #RAISE eventPlusFirst
   #RAISE eventPlusLast
   } "" {disable|nocr|prompt}
#TRIGGER "pulsePlusLine" {^(+)} {
   #PRINT {}
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%e[2A%1</DEST></FONT>}
   #VAR pulseCount 1
   #RAISE eventPlusFirst
   #RAISE eventPlusLast
   } "" {disable}
#TRIGGER "pulseStar" {^(~*)} {
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%1</DEST></FONT>}
   #RAISE eventStarLast
   #RAISE eventStarFirst
   } "" {disable|nocr|prompt}
#TRIGGER "pulseStarLine" {^(~*)} {
   #PRINT {}
   #ADD pulseCount 1
   #PSUB {" "} %x1
   #RAISE eventRainbowPulse
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%e[2A%1</DEST></FONT>}
   #VAR pulseCount 1
   #RAISE eventStarLast
   #RAISE eventStarFirst
   } "" {disable}
#TRIGGER "pulseSpace" {^(%s)} {
   #ADD pulseCount 1
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%1</DEST></FONT>}
   #T+ {pulseDash}
   #T+ {pulseDashLine}
   #T+ {eventDashFirst}
   } "" {disable|nocr|prompt}
#TRIGGER "pulseSpaceLine" {^(%s)} {
   #PRINT {}
   #ADD pulseCount 1
   #MXP {<FONT @pulseFont @pulseSize @pulseColor><DEST X=@pulseCount>%e[2A%1</DEST></FONT>}
   #VAR pulseCount 1
   #T+ {pulseDash}
   #T+ {pulseDashLine}
   #T+ {eventDashFirst}
   } "" {disable}
#TRIGGER "pulsePrompt" {^({o|*} * > )} {
   #PSUB {%1} %x1
   #VAR pulseLastPrompt %1
   #T- {pulsePrompt}
   #T- {pulseCancelled}
   #T- {pulseOk}
   #T- {pulseDash}
   #T- {pulseDashLine}
   #T- {eventDashFirst}
   #T- {eventDashLast}
   #T- {pulseEqual}
   #T- {pulseEqualLine}
   #T- {eventEqualFirst}
   #T- {eventEqualLast}
   #T- {pulsePlus}
   #T- {pulsePlusLine}
   #T- {eventPlusFirst}
   #T- {eventPlusLast}
   #T- {pulseStar}
   #T- {pulseStarLine}
   #T- {eventStarFirst}
   #T- {eventStarLast}
   #T- {pulseSpace}
   #T- {pulseSpaceLine}
   #T+ {pulseBeginLine}
   #T+ {pulseBeginTimer}
   } "" {nocr|prompt}
#TRIGGER "pulseCancelled" {^Cancelled.} {
   #T- {pulseCancelled}
   #T+ {pulseBeginLine}
   #T+ {pulseBeginTimer}
   } "" {disable}
#TRIGGER "pulseOk" {^Ok.} {
   #T- {pulseOk}
   #T+ {pulseBeginLine}
   #T+ {pulseBeginTimer}
   } "" {disable}
#EVENT eventDashFirst {
   #T- {eventDashFirst}
   #T- {pulseDash}
   #T- {pulseDashLine}
   #T- {pulseBeginLine}
   #T- {pulseBeginTimer}
   #T+ {pulseEqual}
   #T+ {pulseEqualLine}
   #T+ {eventEqualFirst}
   }
#EVENT eventDashLast {
   #T- {eventDashLast}
   #T- {pulseDash}
   #T- {pulseDashLine}
   #T+ {pulseSpace}
   #T+ {pulseSpaceLine}
   }
#EVENT eventEqualFirst {
   #T- {eventEqualFirst}
   #T- {pulseEqual}
   #T- {pulseEqualLine}
   #T+ {pulsePlus}
   #T+ {pulsePlusLine}
   #T+ {eventPlusFirst}
   }
#EVENT eventEqualLast {
   #T- {eventEqualLast}
   #T- {pulseEqual}
   #T- {pulseEqualLine}
   #T+ {pulseDash}
   #T+ {pulseDashLine}
   #T+ {eventDashLast}
   }
#EVENT eventPlusFirst {
   #T- {eventPlusFirst}
   #T- {pulsePlus}
   #T- {pulsePlusLine}
   #T+ {pulseStar}
   #T+ {pulseStarLine}
   #T+ {eventStarFirst}
   }
#EVENT eventPlusLast {
   #T- {eventPlusLast}
   #T- {pulsePlus}
   #T- {pulsePlusLine}
   #T+ {pulseEqual}
   #T+ {pulseEqualLine}
   #T+ {eventEqualLast}
   }
#EVENT eventStarFirst {
   #T- {eventStarFirst}
   #T+ {eventStarLast}
   }
#EVENT eventStarLast {
   #T- {eventStarLast}
   #T- {pulseStar}
   #T- {pulseStarLine}
   #T+ {pulsePlus}
   #T+ {pulsePlusLine}
   #T+ {eventPlusLast}
   }
#EVENT eventRainbowPulse {
   #ADD pulseRainbowCount 1
   #VAR pulseColorPulse %item(@pulseRainbowList,(@pulseRainbowCount\%numitems(@pulseRainbowList)+1))
   }
#EVENT onConnect {
   #T+ {pulsePrompt}
   }
#CLASS 0

_________________
House of Medakan zMUD Scripts: Table of Contents

House of Medakan cMUD Scripts: Table of Contents


Top
 Profile  
 
PostPosted: Sat Oct 20, 2018 9:29 pm 
Offline

Joined: Tue Apr 07, 2015 8:24 pm
Posts: 119
Location: Seattle
-----Mounts-----
    [Released: 10/20/18]

Type helpMounts to view help file in client.

Type helpMountsClan to view list of current clan mounts.

Direct download link: MountsCmud.txt

Active Triggers: 1/43
Code:
#CLASS {Mounts}
#ALIAS helpMounts {
   #PRINT {%crlf<color dodgerblue> -----Mounts Help File-----</color>}
   #PRINT {<color dodgerblue>    [Updated: 10/20/2018]</color>}
   #PRINT { Mounts script adds numbers to aid in mount targeting when using the look command or entering a room.}
   #PRINT {  Note: colors the entire line whenever you see a mount that is not being ridden.}
   #PRINT {   <color @mountColorHorse>"|"1"|" A warhorse is here, stamping his feet impatiently.</color>}
   #PRINT {   <color @mountColorSeanchan>"|"2"|" An armoured black stallion paws the ground.</color>}
   #PRINT {     Note: armoured Deathwatch horse has SS color, but runs off horse keyword list.}
   #PRINT {}
   #PRINT { Separate colored number lists for shadow stallions, raken, and torm.}
   #PRINT { <color @mountColorSeanchan>"|"R1"|" A grey-skinned winged animal is here.</color>}
   #PRINT { <color @mountColorSeanchan>"|"T1"|" A sleek well-trained torm glares fiercely about.</color>}
   #PRINT { <color @mountColorShadow>"|"1"|" A black shadow stallion paws the ground here, fiery-red eyes shining with evil.</color>}
   #PRINT {}
   #PRINT { When you ride a mount only the number is colored:}
   #PRINT { <color @mountColorHorse>"|"1"|" </color>A warhorse is here, stamping his feet impatiently, being ridden by you.}
   #PRINT { <color @mountColorShadow>"|"1"|" </color>A black shadow stallion paws the ground here, fiery-red eyes shining with evil, being ridden by you.}
   #PRINT {}
   #PRINT { When you see someone else ride a mount, the mount name and number is colored.}
   #PRINT { Taziar Medakan, Sun Captain is standing here, riding <color @mountColorHorse>"|"2"|" bloodstock stallion</color>}
   #PRINT { ~*<color red>Rig</color>~* is here, fighting Reen mending a weapon, riding <color @mountColorShadow>"|"2"|" shadow stallion</color>}
   #PRINT {}
   #PRINT { Type mountColor <mountType> [fcolor bcolor] [background color optional]}
   #PRINT {  Available mount types:}
   #PRINT {   <color @mountColorClan>Clan</color>}
   #PRINT {   <color @mountColorHorse>Horse</color>}
   #PRINT {   <color @mountColorSeanchan>Seanchan</color>}
   #PRINT {   <color @mountColorShadow>Shadow</color>}
   #PRINT {}
   #PRINT { Type <color dodgerblue>helpMountsClan</color> to view clan mount list.}
   #PRINT {}
   }
#ALIAS helpMountsClan {
   #PRINT {%crlf %crlf <color dodgerblue> Clan Horse List:</color>}
   #PRINT {   Black Talon:           }
   #PRINT {   Child of Light:        <color @mountColorClan>An armored white cavalry horse stands here, ready for battle.</color>}
   #PRINT {   Civil Watch:           <color @mountColorClan>A piebald rouncey stands here, its mane plaited with ribbons.</color>}
   #PRINT {   Defender of the Stone: <color @mountColorClan>A Tairen destrier barded in black and gold stands here.</color>}
   #PRINT {   Deathwatch:            <color @mountColorSeanchan>An armoured black stallion paws the ground.</color>}
   #PRINT {   Dragonsworn:           }
   #PRINT {   Forrester:             <color @mountColorClan>An elusive white stag is here, intelligent eyes observing you.</color>}
   #PRINT {   Hand of Light:         <color @mountColorClan>A battle-trained destrier stands here.</color>}
   #PRINT {   Gleeman:               }
   #PRINT {   Illian Companion:      <color @mountColorClan>An Illianer golden-maned steed stands here observing its surroundings.</color>}
   #PRINT {   Illuminator:           <color @mountColorClan>A sturdy fell pony stands here, multi-colored tubes protruding from its saddlebags.</color>}
   #PRINT {   Imperial Army:         }
   #PRINT {   Iron Fist:             }
   #PRINT {   Kin:                   }
   #PRINT {   Legion of Unity:       }
   #PRINT {   Lion Warden:           <color @mountColorClan>A red Andoran charger, pride of her majesties stables.</color>}
   #PRINT {   Lion Warden:           <color @mountColorClan>A white destrier stands here proudly, alert for battle.</color>}
   #PRINT {   Morat'raken:           <color @mountColorSeanchan>A grey-skinned winged animal is here.</color>}
   #PRINT {   Morat'torm:            <color @mountColorSeanchan>A sleek well-trained torm glares fiercely about.</color>}
   #PRINT {   Rising Sun:            }
   #PRINT {   Red Eagle:             <color @mountColorClan>A jet black courser stands here, clad in the red-and-gold livery of Manetheren.</color>}
   #PRINT {   Saldaean Cavalry:      }
   #PRINT {   Shienaran Lancer:      <color @mountColorClan>A battle-trained Shienaran warlander stands here, vigilant of its surroundings.</color>}
   #PRINT {   Sword and Hand:        }
   #PRINT {   Thiefbane:             <color @mountColorClan>A silver-haired thoroughbred stands here, alert for its master's whistle.</color>}
   #PRINT {   Wall Guard:            }
   #PRINT {   White Leopard:         }
   #PRINT {   Winged Guard:          <color @mountColorClan>A blood bay stallion is here, pawing the ground restlessly.</color>}
   #PRINT {   Wisdom:                <color @mountColorClan>A dapple grey courser with a finely brushed coat dances from spot to spot.</color>}
   #PRINT {   Valon Guard:           }
   #PRINT {}
   }
#ALIAS mountColor {
   #PRINT {}
   #IF (%null(%1)) {
      #PRINT { Usage: mountColor <type> <color> [bcolor] [background color optional]}
      #PRINT {}
      #PRINT {  Available types:}
      #PRINT {   <color @mountColorClan>Clan</color>}
      #PRINT {   <color @mountColorHorse>Horse</color>}
      #PRINT {   <color @mountColorSeanchan>Seanchan</color>}
      #PRINT {   <color @mountColorShadow>Shadow</color>}
      #PRINT {}
      } {
      #IF (%class(%concat(mountColor,%1))=-1) {
         #PRINT {%1 is an invalid type selection...}
         } {
         #IF (%null(%2)) {
            #PRINT {What color is that?...}
            } {
            #IF (%colorname(%2)=536870911 AND %color(%2)=-1) {
               #VAR %concat(mountColor,%1) {}
               #PRINT { %2 is an invalid color. %concat(mountColor,%proper(%1)) variable cleared.}
               } {
               #IF (%null(%3)) {
                  #VAR %concat(mountColor,%1) {%2}
                  #PRINT {%proper(%1) color set: <color %2>%2</color>}
                  } {
                  #IF (%colorname(%3)!=536870911 AND %color(%3)!=0) {
                     #VAR %concat(mountColor,%1) {}
                     #PRINT { %3 is an invalid color. %concat(mountColor,%proper(%1)) variable cleared.}
                     } {
                     #VAR %concat(mountColor,%1) %concat(%2," ",%3)
                     #PRINT {%proper(%1) color set: <color %2 %3>%2 %3</color>}
                     }
                  }
               }
            }
         }
      }
   }
#VAR mountColorClan goldenrod
#VAR mountColorHorse cyan
#VAR mountColorSeanchan magenta
#VAR mountColorShadow red
#VAR mountCountHorse 0
#VAR mountCountRaken 0
#VAR mountCountShadow 0
#VAR mountCountTorm 0
#VAR mountList {black stallion|bloodstock stallion|brown horse|brown stallion|chestnut stallion|Domani razor|draft horse|dun mare|dust-colored gelding|gray palfrey|Illianer steed|playful colt|prancing palomino mare|roan charger|shaggy brown mare|spotted horse|warhorse|white-maned pony|wild stallion}
#VAR mountClanList {armored white cavalry horse|battle-trained gray destrier|battle-trained Shienaran warlander|blood bay stallion|fine piebald rouncey|golden-maned steed|jet black courser|red Andoran charger|sturdy fell pony|Tairen destrier|white destrier}
#TRIGGER "mountExitsTrigger" {^~[ obvious exits: *~]$} {
   #T+ {Mounts|MountTriggers}
   #T+ {mountPromptTrigger}
   } "" {case}
#TRIGGER "mountPromptTrigger" {{o|*} * >} {
   #T- {mountPromptTrigger}
   #T- {Mounts|MountTriggers}
   #VAR mountCountHorse 0
   #VAR mountCountRaken 0
   #VAR mountCountShadow 0
   #VAR mountCountTorm 0
   } "" {case|nocr|prompt}
#CLASS 0
#CLASS {Mounts|MountTriggers} {disable}
#TRIGGER "mountRideShadow" {, riding (a shadow stallion.)$} {
   #ADD mountCountShadow 1
   #PSUB {<color @mountColorShadow>"|"@mountCountShadow"|" shadow stallion</color>} %x1
   } "" {case}
#TRIGGER "mountShadow" {^(A black shadow stallion paws the ground here, fiery-red eyes shining with evil*)$} {
   #ADD mountCountShadow 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorShadow>"|"@mountCountShadow"|"</color>%e[33m  %1} %x1
      } {
      #PSUB {<color @mountColorShadow>"|"@mountCountShadow"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountRideRaken" {, riding (a raken.)$} {
   #ADD mountCountRaken 1
   #PSUB {<color @mountColorSeanchan>"|"%concat(R,@mountCountRaken)"|" raken</color>} %x1
   } "" {case}
#TRIGGER "mountRaken" {^(A grey-skinned winged animal is here*)$} {
   #ADD mountCountRaken 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorSeanchan>"|"%concat(R,@mountCountRaken)"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorSeanchan>"|"%concat(R,@mountCountRaken)"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountRideTorm" {, riding (a torm.)$} {
   #ADD mountCountTorm 1
   #PSUB {<color @mountColorSeanchan>"|"%concat(T,@mountCountTorm)"|" torm</color>} %x1
   } "" {case}
#TRIGGER "mountTorm" {^(A sleek well-trained torm glares fiercely about*)$} {
   #ADD mountCountTorm 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorSeanchan>"|"%concat(T,@mountCountTorm)"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorSeanchan>"|"%concat(T,@mountCountTorm)"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountRideArmoured" {, riding (an armoured black stallion.)$} {
   #ADD mountCountHorse 1
   #PSUB {<color @mountColorSeanchan>"|"@mountCountHorse"|" armoured black stallion</color>} %x1
   } "" {case}
#TRIGGER "mountArmoured" {^(An armoured black stallion paws the ground*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorSeanchan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorSeanchan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountRideHorse" {, riding ({a|an} (*).)$} {
   #IF (%ismember(%2,@mountList)) {
      #ADD mountCountHorse 1
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %2</color>} %x1
      } {
      #IF (%ismember(%2,@mountClanList)) {
         #ADD mountCountHorse 1
         #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %2</color>} %x1
         }
      }
   } "" {case}
#TRIGGER "mountGray" {^(A gray palfrey prances skittishly nearby*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountWarhorse" {^(A warhorse is here, stamping his feet impatiently*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountWild" {^(A wild stallion bucks madly*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountDraft" {^(A draft horse is here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountShaggy" {^(A shaggy brown mare stands here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountIllianer" {^(An Illianer steed stands here proudly, its black mane glistening*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountDun" {^(A dun mare is here, snorting angrily*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountTall" {^(A tall dust-colored gelding prances in a circle here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountBloodstock" {^(A Tairen bloodstock stallion stands here, tail swaying with the breeze*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountPalomino" {^(Prancing about on dainty feet, a palomino mare stands here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountBlack" {^(A black stallion prances about*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountRazor" {^(Eyes keen, a Domani razor stands here swishing its tail*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountBrown" {^(A brown horse is here, nipping at a tuft of grass*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountLionWarden" {^(A white destrier stands here proudly, alert for battle*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountChestnut" {^(A chestnut stallion trots about*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountHandLight" {^(A battle-trained destrier stands here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountSpotted" {^(A spotted horse wanders skittishly around here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountTremalking" {^(A sturdy white-maned pony tosses its head here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountColt" {^(A playful colt is running about here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountRoan" {^(A sturdy roan colored horse stands alert*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorHorse>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanWarden" {^(A red Andoran charger, pride of her majesties stables*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanChild" {^(An armored white cavalry horse stands here, ready for battle*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanCivil" {^(A piebald rouncey stands here, its mane plaited with ribbons*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanDefender" {^(A Tairen destrier barded in black and gold stands here*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanForrester" {^(An elusive white stag is here, intelligent eyes observing you*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanCompanions" {^(An Illianer golden-maned steed stands here observing its surroundings*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanIlluminator" {^(A sturdy fell pony stands here, multi-colored tubes protruding from its saddlebags*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanEagles" {^(A jet black courser stands here, clad in the red-and-gold livery of Manetheren*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanLancer" {^(A battle-trained Shienaran warlander stands here, vigilant of its surroundings*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanThiefbane" {^(A silver-haired thoroughbred stands here, alert for its master's whistle*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanWinger" {^(A blood bay stallion is here, pawing the ground restlessly*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#TRIGGER "mountClanWisdoms" {^(A dapple grey courser with a finely brushed coat dances from spot to spot*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|"</color>%e[33m %1} %x1
      } {
      #PSUB {<color @mountColorClan>"|"@mountCountHorse"|" %1</color>} %x1
      }
   } "" {case}
#CLASS 0

_________________
House of Medakan zMUD Scripts: Table of Contents

House of Medakan cMUD Scripts: Table of Contents


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group