WoTMUD Archives
http://www.wotmudarchives.org/forum/

House of Medakan cMUD Scripts
http://www.wotmudarchives.org/forum/viewtopic.php?f=9&t=2440
Page 2 of 4

Author:  Taziar [ Sun Sep 30, 2018 5:07 am ]
Post subject:  Re: HoM cMUD Scripts

Type helpGate to view help file in client.



Direct download:

Code:
Currently in debug

Author:  Taziar [ Sat Oct 06, 2018 4:46 am ]
Post subject:  Re: HoM cMUD Scripts

Type helpJavelin to view help file in client.



Direct download:

Code:
Currently in debug

Author:  Taziar [ Sat Oct 20, 2018 9:29 pm ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpLocate to view help file in client.



Direct download:

Code:
Currently in debug

Author:  Taziar [ Mon Oct 22, 2018 3:07 am ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpLog to view help file in client.

Image

Direct download: LogCMUD.txt

Code:
#CLASS {Log}
#ALIAS helpLog {
   #PRINT {%crlf <C dodgerblue>-----Log Help File-----</C>}
   #PRINT {   <C dodgerblue>[Updated: 8/28/2019]</C>}
   #PRINT {}
   #PRINT { Type <C dodgerblue>logSet <path></C> to set path for logging.}
   #PRINT {  Example: logSet C:\Users\Medakan\Google Drive\Logs\}
   #PRINT {}
   #PRINT { Type <C dodgerblue>logOpen</C> to open windows explorer to log destination folder.}
   #PRINT {  Hint: can use command to verify correct file location.}
   #PRINT {}
   #PRINT { Type <C dodgerblue>logRead</C> to open current log in notepad.}
   #PRINT {  Hint: can use command to verify log is recording.}
   #PRINT {}
   #PRINT { Saves log under current character name and date.}
   #PRINT {  File format: YearMonthDayCharacter.txt}
   #PRINT {   Example: 20161114Taziar.txt}
   #PRINT {}
   #PRINT { If using the Comms script an additional comms log is saved.}
   #PRINT {  Comms path: %if(@logCommsPath,@logCommsPath,"")}
   #PRINT {}
   #PRINT { <C red> Warning! </C> Paths not to cMUD directory need to be created manually.}
   #PRINT {                       If logging comms create directory named Comms at logSet path.}
   #PRINT {}
   }
#ALIAS logSet {
   #IF (%null(%1)) {
      #PRINT {%crlf Syntax example: <C dodgerblue>logSet C:\Users\Medakan\Google Drive\Logs\</C>}
      } {
      #VAR logPath {%1}
      #IF (%numparam()>1) {
         #LOOP 2,%numparam() {
            #VAR logPath %concat(@logPath," ",%param(%i))
            }
         }
      #IF (NOT %ends(@logPath,"\")) {
         #VAR logPath {%concat(@logPath,"\")}
         }
      #RAISE eventLogStart
      }
   }
#ALIAS logRead {
   #LAUNCH {notepad.exe %concat(~",@logCurrentPath,~")}
   }
#ALIAS logOpen {
   #LAUNCH {explorer %concat(~",@logPath,~")}
   }
#VAR logCurrentPath {}
#VAR logCommsPath {}
#VAR logPath {}
#EVENT OnConnect {
   #IF (%null(@logPath)) {
      #PRINT {<C red>WARNING!!</C> log path is not set, use logSet command to setup logging.}
      } {
      #RAISE eventLogStart
      }
   }
#EVENT eventLogStart {
   #VAR logCurrentPath {%concat(@logPath,%time(yyyymmdd),%char,".txt")}
   #VAR logCommsPath {%concat(@logPath,"Comms\",c,%time(yyyymmdd),%char,".txt")}
   #LOG @logCurrentPath
   #EXECWIN Communications {
      #LOG @logCommsPath
      }
   }
#CLASS 0

Author:  Taziar [ Sun Aug 18, 2019 2:57 am ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpMacros to view help file in client.

Image

Example:
ImageImage

Direct download: MacrosCMUD.txt

Code:
#CLASS {Macros}
#ALIAS helpMacros {
   #PRINT {%crlf <C dodgerblue>-----Macros Help File-----</C>}
   #PRINT {     <C dodgerblue>[Updated: 8/30/2019]</C>}
   #PRINT { Default keypad macros are created in Macros class folder.}
   #PRINT { All macros in both the Macros class folder and individual character}
   #PRINT {  folders will need to be set to each individual character's preferences.}
   #PRINT {}
   #PRINT { To set a macro open the settings window, select Macros script.}
   #PRINT { Place macro commands in corresponding #EVENT eventMacroKey }
   #PRINT {  Note: individual macro events will be inside each character named folder.}
   #PRINT {}
   #PRINT { Button captions are customized by placing caption in buttonCaption variable.}
   #PRINT {  Note: individual button caption variables will be inside each character named folder.}
   #PRINT {}
   #PRINT { Shared macros: DEC|KEY0|KEY1|KEY2|KEY3|KEY4|KEY5|KEY6|KEY7|KEY8|KEY9}
   #PRINT {  Note: shared macros are used by all characters.}
   #PRINT {}
   #PRINT { F-Key macros: F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12}
   #PRINT {  Note: all F-Keys are shared and set via the Macro script.}
   #PRINT {}
   #PRINT { Individual character macros: ADD|DIV|END|HOME|INS|MULT|PGDN|PGUP|SUB}
   #PRINT {  Note: corresponding buttons show under the Target buttons when Target script is active.}
   #PRINT {}
   }
#KEY DEC {#SEND {notice}}
#KEY KEY0 {
   #IF (%class(Map)) {
      #RAISE eventMapFind
      } {
      #FIND
      }
   }
#KEY KEY1 {#SEND {where}}
#KEY KEY2 {#SEND {s}}
#KEY KEY3 {#SEND {d}}
#KEY KEY4 {#SEND {w}}
#KEY KEY5 {#SEND {look}}
#KEY KEY6 {#SEND {e}}
#KEY KEY7 {#SEND {flee}}
#KEY KEY8 {#SEND {n}}
#KEY KEY9 {#SEND {u}}
#KEY ADD {#RAISE eventMacroADD}
#KEY DIV {#RAISE eventMacroDIV}
#KEY END {#RAISE eventMacroEND}
#KEY HOME {#RAISE eventMacroHOME}
#KEY INS {#RAISE eventMacroINS}
#KEY MULT {#RAISE eventMacroMULT}
#KEY PGDN {#RAISE eventMacroPGDN}
#KEY PGUP {#RAISE eventMacroPGUP}
#KEY SUB {#RAISE eventMacroSUB}
#EVENT onConnect {
   #IF (%class(Macros|%char)=-1) {
      #CLASS {Macros|%char} {disable}
      #EVENT eventMacroADD {#SEND {open @doorname}}
      #EVENT eventMacroDIV {}
      #EVENT eventMacroEND {}
      #EVENT eventMacroHOME {}
      #EVENT eventMacroINS {hiddenTarget}
      #EVENT eventMacroMULT {}
      #EVENT eventMacroPGDN {}
      #EVENT eventMacroPGUP {}
      #EVENT eventMacroSUB {#SEND {close @doorname}}
      #VAR buttonCaptionADD {[open] ~@doorName}
      #VAR buttonCaptionDIV {}
      #VAR buttonCaptionEND {}
      #VAR buttonCaptionHOME {}
      #VAR buttonCaptionINS {[toggle] Hidden Target}
      #VAR buttonCaptionMULT {}
      #VAR buttonCaptionPGDN {}
      #VAR buttonCaptionPGUP {}
      #VAR buttonCaptionSUB {[close] ~@doorname}
      #CLASS 0
      } {
      #T+ Macros|%char
      }
   #UPDATE Macros
   }
#BUTTON 13 "@buttonCaptionINS" {#RAISE eventMacroINS} {} {} {} {} {wotmud\Key16\InsertKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {INS} {buttonINS} 1
#BUTTON 14 "@buttonCaptionHOME" {#RAISE eventMacroHOME} {} {} {} {} {wotmud\Key16\HomeKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {HOME} {buttonHOME} 1
#BUTTON 15 "@buttonCaptionEND" {#RAISE eventMacroEND} {} {} {} {} {wotmud\Key16\EndKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {END} {buttonEND} 1
#BUTTON 16 "@buttonCaptionPGUP" {#RAISE eventMacroPGUP} {} {} {} {} {wotmud\Key16\PGUPKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {PGUP} {buttonPGUP} 1
#BUTTON 17 "@buttonCaptionPGDN" {#RAISE eventMacroPGDN} {} {} {} {} {wotmud\Key16\PGDNKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {PGDN} {buttonPGDN} 1
#BUTTON 18 "@buttonCaptionDIV" {#RAISE eventMacroDIV} {} {} {} {} {wotmud\Key16\DIVKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {DIV} {buttonDIV} 1
#BUTTON 19 "@buttonCaptionMULT" {#RAISE eventMacroMULT} {} {} {} {} {wotmud\Key16\MULTKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {MULT} {buttonMULT} 1
#BUTTON 20 "@buttonCaptionSUB" {#RAISE eventMacroSUB} {} {} {} {} {wotmud\Key16\SUBKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {SUB} {buttonSUB} 1
#BUTTON 21 "@buttonCaptionADD" {#RAISE eventMacroADD} {} {} {} {} {wotmud\Key16\ADDKey16.bmp} {0} {148} {23} {} {} {} {black} {black} {push} {} {Macros} {explore} {ADD} {buttonADD} 1
#CLASS 0
#CALL {%btncol(13,green,black)}
#CALL {%btncol(14,green,black)}
#CALL {%btncol(15,green,black)}
#CALL {%btncol(16,green,black)}
#CALL {%btncol(17,green,black)}
#CALL {%btncol(18,dodgerblue,black)}
#CALL {%btncol(19,dodgerblue,black)}
#CALL {%btncol(20,dodgerblue,black)}
#CALL {%btncol(21,dodgerblue,black)}

Author:  Taziar [ Wed Aug 21, 2019 8:28 pm ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpMap to view help file in client.

Image

Direct download: MapCMUD.txt

Code:
#CLASS {Map}
#ALIAS helpMap {
   #PRINT {%crlf <C dodgerblue>-----Map Help File-----</C>}
   #PRINT {  <C dodgerblue>[Updated: 9/28/2019]</C>}
   #PRINT {}
   #PRINT { Type <C dodgerblue>toggleMapBrief</C> to toggle client side brief mode.}
   #PRINT {  Note: mimics the in-game brief command, but allows for optimal map follow functions.}
   #PRINT {    Map Brief Mode: <C dodgerblue>%if(%class(eventBriefMode),ON,OFF)</C>}
   #PRINT {}
   #PRINT { <C dodgerblue> -----MapFind-----</C>}
   #PRINT { Type <C dodgerblue>find</C> to send look command and set current map location.}
   #PRINT {  Note: can also use #RAISE eventMapFind}
   #PRINT {}
   #PRINT { <C dodgerblue> -----Flee/Dline-----</C>}
   #PRINT { Flee/Dline automatically sets map position after a flee is detected.}
   #PRINT {  Notes: works for in-combat flees only.}
   #PRINT {   Tracks movement during flee for dline map correction.}
   #PRINT {}
   #PRINT { <C dodgerblue> -----Mapping-----</C>}
   #PRINT {}
   #PRINT { Type <C dodgerblue>helpMapping</C> to view mapping specific help file.}
   #PRINT {}
   }
#ALIAS toggleMapBrief {
   #IF (%class(eventBriefMode)) {
      #T- eventBriefMode
      #PRINT {%crlf <C dodgerblue>Client side brief mode is now off.</C>}
      } {
      #T+ eventBriefMode
      #PRINT {%crlf <C dodgerblue>Client side brief mode is now on.</C>}
      #PRINT {<C dodgerblue> Set in-game brief mode to off. </C>}
      }
   }
#VAR mapGroupLeader {}
#VAR mapMoveDirection {}
#VAR mapMoveAdjust {}
#VAR mapRoomKey {}
#VAR mapRoomName {}
#TRIGGER "mapRoomBrief" {^(*)%e[36m([A-Z]*)%e[0m$} {
   #IF (%ends(%1,"> ") OR %null(%1)) {
      #IF (%match(%2,"%w speaks from the %w '*'") OR %match(%2,"%w answers your prayer '*'")) {} {
         #VAR mapRoomKey {%mapquery(NAME = '%replace(%2,"'","''")')}
         #RAISE eventBriefMode
         }
      }
   } "" {case|color}
#TRIGGER "mapExitBrief" {^~[ obvious exits: (*)~]$} {
   #GAGOFF
   #UNGAG
   } "" {case}
#TRIGGER "mapExitLook" {^~[ obvious exits: (*)~]$} {
   #T- mapExitLook
   #T+ eventBriefMode
   } "" {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 %w.$} {
   #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|someone}.$} {
   #T- mapFollowTrigger
   #MOVE @mapMoveDirection
   #VAR mapMoveDirection {}
   #T+ mapFollowSneak
   } "" {case|disable}
#TRIGGER "mapFollowSneak" {^You follow someone.$} {
   #T+ mapExitFlee
   #T+ fleeNoInput
   #VAR fleeRoomFrom %roomnum
   #FIND
   } "" {case|disable}
#TRIGGER "mapClosedTrigger" {The (*) seems to be closed.$} {
   #IF (%doorname(,@mapMoveAdjust)=%1) {
      #NODIR 1
      } {
      #MOVE @mapMoveAdjust
      #NODIR 1
      }
   } "" {case}
#TRIGGER "mapAlasTrigger" {Alas, you cannot go that way...$} {
   #IF (%roomlink(,@mapMoveAdjust)=-1) {} {
      #MOVE @mapMoveAdjust
      #NODIR 1
      }
   } "" {case}
#TRIGGER "mapRestingTrigger" {Nah... You feel too relaxed to do that..$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapSleepingTrigger" {In your dreams, or what?$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapSittingTrigger" {Maybe you should get on your feet first?$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapFightingTrigger" {No way!  You're fighting for your life!$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapExhaustedTrigger" {You are too exhausted.$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapMountHaggard" {Your mount is too exhausted.$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapMountFighting" {Your mount is engaged in combat!$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapMountSleeping" {Your mount ought to be awake and standing first!$} {
   #NODIR 1
   } "" {case}
#TRIGGER "mapShudderTrigger" {You shudder at the concept of crossing water.$} {
   #MOVE @mapMoveAdjust
   #NODIR 1
   } "" {case}
#TRIGGER "mapSwimTrigger" {You would need to swim there, you can't just walk it.$} {
   #MOVE @mapMoveAdjust
   #NODIR 1
   } "" {case}
#TRIGGER "mapRideInside" {You can't ride in there.$} {
   #MOVE @mapMoveAdjust
   #NODIR 1
   } "" {case}
#TRIGGER "mapRideWater" {You can't ride on water.$} {
   #MOVE @mapMoveAdjust
   #NODIR 1
   } "" {case}
#TRIGGER "mapCantRide" {You can't ride there on a horse!$} {
   #MOVE @mapMoveAdjust
   #NODIR 1
   } "" {case}
#TRIGGER "mapBoatTrigger" {You need a boat to go there.$} {
   #MOVE @mapMoveAdjust
   #NODIR 1
   } "" {case}
#TRIGGER "mapBlindTrigger" {You can't see a damned thing, you're blinded!$} {
   #OK
   } "" {case}
#TRIGGER "mapDarkTrigger" {It is pitch black...$} {
   #OK
   } "" {case}
#TRIGGER "mapMovePrompt" {{o|*} * >} {
   #T- mapMovePrompt
   #T- eventMapAdjust
   #T+ eventMapMove
   #VAR mapMoveAdjust {}
   } "" {disable|nocr|prompt}
#TRIGGER "mapConnectTrigger" {Don't forget to read the forums at * !} {
   #T- mapConnectTrigger
   #T+ mapConnectFind
   #FIND
   } "" {case}
#ONINPUT "mapConnectFind" {^look$} {
   #T- mapConnectFind
   #NOINPUT
   } "" {disable}
#ONINPUT "mapMoveInput" {^({d|e|n|s|u|w})$} {
   #T+ mapMovePrompt
   #RAISE eventMapAdjust %1
   #RAISE eventMapMove %1
   } "" {}
#ONINPUT "mapLookInput" {^{l|lo|loo|look}$} {
   #IF (%class(eventBriefMode)) {
      #T- eventBriefMode
      #T+ mapExitLook
      }
   } "" {}
#EVENT eventBriefMode {
   #GAGON
   }
#EVENT eventMapAdjust {
   #T- eventMapAdjust
   #T- eventMapMove
   #VAR mapMoveAdjust %1
   #IF (@mapMoveDirection=@mapMoveAdjust) {
      #VAR mapMoveAdjust {}
      }
   }
#EVENT eventMapMove {
   #T+ eventMapAdjust
   #VAR mapMoveDirection %1
   }
#EVENT onConnection {
   #T+ mapConnectTrigger
   #T- eventMapAdjust
   }
#CLASS 0
#CLASS {Map|MapDline}
#VAR fleeDlineDir {}
#TRIGGER "fleeFleeTrigger" {^You panic and attempt to flee!$} {
   #T+ dlineFleePrompt
   #T+ dlineFleeDetection
   #VAR fleeDlineDir {}
   } "" {case}
#TRIGGER "fleePanicTrigger" {PANIC!  You couldn't escape!$} {
   #T- dlineFleeDetection
   #T- fleePanicTrigger
   #T- fleeZerkTrigger
   #T+ fleeFleeTrigger
   #VAR fleeDlineDir {}
   } "" {case|disable}
#TRIGGER "fleeZerkTrigger" {Berserk! Death! Death! Fight to the death!$} {
   #T- dlineFleeDetection
   #T- fleeZerkTrigger
   #T- fleePanicTrigger
   #T+ fleeFleeTrigger
   #VAR fleeDlineDir {}
   } "" {case|disable}
#TRIGGER "dlineFleePrompt" {{o|*} * >} {
   #T- dlineFleePrompt
   #T+ fleeFleeTrigger
   #MOVE {@fleeDlineDir}
   #VAR fleeDlineDir {}
   } "" {nocr|prompt}
#ONINPUT "dlineFleeDetection" {^({d|e|n|s|u|w})$} {
   #T- dlineFleeDetection
   #VAR fleeDlineDir {%1}
   } "" {disable}
#ONINPUT "dlineFleeInput" {^{f|fl|fle|flee}$} {
   #T- fleeFleeTrigger
   #T+ dlineFleePrompt
   #T+ dlineFleeDetection
   #VAR fleeDlineDir {}
   } "" {}
#CLASS 0
#CLASS {Map|MapFind}
#ALIAS find {
   #RAISE eventMapFind
   }
#VAR findByDesc {} {}
#VAR findByExit {} {}
#VAR findRoomDesc {}
#VAR findRoomExit {}
#TRIGGER "mapRoomFind" {^(*)%e[36m([A-Z]*)%e[0m$} {
   #T- mapRoomFind
   #IF (%ends(%1,"> ") OR %null(%1)) {
      #T+ mapDescFind
      #T+ mapExitFind
      #VAR findRoomDesc {}
      #VAR mapRoomName {%2}
      #VAR mapRoomKey {%mapquery(NAME = '%replace(%2,"'","''")')}
      }
   } "" {case|color|disable}
#TRIGGER "mapDescFind" {^(*)$} {
   #IF (%ends(%1,"> ") OR %match(%1,^@mapRoomName$)) {} {
      #IF (%begins(%line,"[ obvious exits: ")) {
         #T- mapDescFind
         } {
         #VAR findRoomDesc {%additem(%line,@findRoomDesc)}
         }
      }
   } "" {case|disable}
#TRIGGER "mapExitFind" {^~[ obvious exits: (*)~]$} {
   #T- mapExitFind
   #T+ eventBriefMode
   #VAR findRoomExit (%lower(%sort(%replace(%if(%pos("]",%1),%left(%1,(%pos("]",%1)-2)),%1)," ","|"))))
   #RAISE eventFindRoom
   } "" {case|disable}
#EVENT eventMapFind {
   #T+ mapRoomFind
   #VAR findByDesc {}
   #VAR findByExit {}
   #FIND
   }
#EVENT eventFindRoom {
   #IF (%numitems(@mapRoomKey)=1) {
      #IF (@maproom=%roomnum) {} {
         #TELEPORT @mapRoomKey
         }
      } {
      #IF (%numitems(@mapRoomKey)=0) {
         #PRINT {%crlf <C white red>Room name not found...</C>}
         } {
         #RAISE eventFindDesc
         }
      }
   }
#EVENT eventFindDesc {
   #FORALL @mapRoomKey {
      #IF (%subchar(%roomdesc(%i),%crlf" |","")=%subchar(@findRoomDesc,%crlf" |","")) {
         #ADDITEM findByDesc %i
         }
      }
   #IF (%numitems(@findByDesc)=1) {
      #IF (@findByDesc=%roomnum) {} {
         #TELEPORT @findByDesc
         }
      } {
      #RAISE eventFindExit
      }
   }
#EVENT eventFindExit {
   #FORALL @mapRoomKey {
      #IF (@findRoomExit=%sort(%roomexit(%i))) {
         #ADDITEM findByExit %i
         }
      }
   #IF (%numitems(@findByExit)=1) {
      #IF (@findByExit=%roomnum) {} {
         #TELEPORT @findByExit
         }
      }
   }
#CLASS 0
#CLASS {Map|MapFlee}
#VAR fleeDisplayDirection {}
#VAR fleeRoomExit {}
#VAR fleeRoomFrom {}
#TRIGGER "mapHeelsTrigger" {^You flee head over heels.$} {
   #T+ mapExitFlee
   #T+ fleeNoInput
   #VAR fleeRoomFrom %roomnum
   #FIND
   } "" {case}
#TRIGGER "mapExitFlee" {^~[ obvious exits: (*)~]$} {
   #T- mapExitFlee
   #T+ mapFleePrompt
   #VAR fleeRoomExit (%lower(%sort(%replace(%if(%pos("]",%1),%left(%1,(%pos("]",%1)-2)),%1)," ","|"))))
   } "" {case|disable}
#TRIGGER "mapFleePrompt" {{o|*} * >} {
   #T- mapFleePrompt
   #VAR fleeDisplayDirection %upper(%reversedir(%remove(.,%walk(@fleeRoomFrom)),1))
   #IF (%null(@fleeDisplayDirection)) {} {#PRINT {<C white red> You fled @fleeDisplayDirection </C>}}
   } "" {disable|nocr|prompt}
#ONINPUT "fleeNoInput" {^look$} {
   #T- fleeNoInput
   #NOINPUT
   } "" {disable}
#CLASS 0
#CLASS {Map|Mapping}
#ALIAS helpMapping {
      #PRINT {%crlf <C dodgerblue>-----Mapping Help File-----</C>}
      #PRINT {    <C dodgerblue>[Updated: 9/23/2019]</C>}
      #PRINT {}
      #PRINT { Type <C dodgerblue>mapLook</C> to confirm current room description and exits.}
      #PRINT {  Hint: place mapLook in macro for easy access.}
      #PRINT {   Note: if room description and exits match no message is displayed.}
      #PRINT {    With mapping macros turned ON mapLook auto triggers on movement.}
      #PRINT {}
      #PRINT { Type <C dodgerblue>toggleMapping</C> to toggle mapping mode on/off.}
      #PRINT {  Hint: place toggleMapping in macro for quick toggling.}
      #PRINT {   Note: with mapping macros ON double line movement may confuse mapLook function.}
      #PRINT {}
   }
#ALIAS mapLook {
   #T+ mappingRoomTrigger
   #SEND {look}
   }
#ALIAS toggleMapping {
   #IF (%class(eventMappingMode)) {
      #MENU {Mapper|File|Follow Mode}
      #T- eventMappingMode
      #PRINT {%crlf Mapping mode disabled.}
      } {
      #T+ eventMappingMode
      #PRINT {%crlf Mapping mode enabled.}
      }
   }
#VAR mappingDirections {n|e|s|w|u|d}
#VAR mappingRoomDesc {}
#VAR mappingRoomExit {}
#VAR mappingRoomName {}
#TRIGGER "mappingRoomTrigger" {^(*)%e[36m([A-Z]*)%e[0m$} {
   #T- mappingRoomTrigger
   #IF (%ends(%1,"> ") OR %null(%1)) {
      #T+ mappingDescTrigger
      #T+ mappingExitTrigger
      #VAR mappingRoomDesc {}
      #VAR mappingRoomName {%1}
      }
   } "" {case|color|disable}
#TRIGGER "mappingDescTrigger" {^(*)$} {
   #IF (%ends(%1,"> ") OR %match(%1,^@mappingRoomName$)) {} {
      #IF (%begins(%line,"[ obvious exits: ")) {
         #T- mappingDescTrigger
         } {
         #VAR mappingRoomDesc {%additem(%line,@mappingRoomDesc)}
         }
      }
   } "" {case|disable}
#TRIGGER "mappingExitTrigger" {^~[ obvious exits: (*)~]$} {
   #T- mappingExitTrigger
   #T+ mappingPrompt
   #VAR mappingRoomExit %lower(%sort(%replace(%if(%pos("]",%1),%left(%1,%eval(%pos("]",%1)-2)),%1)," ","|")))
   } "" {case|disable}
#TRIGGER "mappingPrompt" {^{*|o} * >} {
   #T- mappingPrompt
   #IF (@mappingRoomName=%roomname()) {
      #IF (%subchar(%roomdesc(),%crlf" |","")=%subchar(@mappingRoomDesc,%crlf" |","")) {} {
         #PRINT {%crlf <C white red>Failed to match room description. Update map!</C>}
         }
      #IF (%sort(%roomexit())=@mappingRoomExit) {} {
         #PRINT {%crlf <C white red>Failed to match room exits. Check room links.</C>}
         }
      } {
      #PRINT {%crlf <C white red>Failed to match room name. Check map location.</C>}
      }
   } "" {case|disable|nocr|prompt}
#ONINPUT "mappingDetection" {^{down|east|north|south|west|up}$} {
   #T+ mappingRoomTrigger
   } "" {}
#EVENT eventMappingMode {}
#CLASS 0

Author:  Taziar [ Tue Aug 27, 2019 1:45 am ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpMeleeRound to view help file in client.

Image

Direct download: MeleeRoundCMUD.txt

Code:
#CLASS {MeleeRound}
#ALIAS helpMeleeRound {
   #PRINT {%crlf <C dodgerblue>-----Melee Round Help File-----</C>}
   #PRINT {    <C dodgerblue>[Updated: 9/9/2019]</C>}
   #PRINT { Colors and tracks melee combat statistics against cross race opponents.}
   #PRINT { Script tracks individual character data across sessions.}
   #PRINT {}
   #PRINT {  Type <C dodgerblue>attackCount</C>      (show total melee round hits and misses attempted for current session)}
   #PRINT {  Type <C dodgerblue>defendCount</C>      (show total melee round hits and misses against current session)}
   #PRINT {   Note: attack and defend commands show current session statistics.}
   #PRINT {}
   #PRINT {  Type <C dodgerblue>meleeCount</C>       (show total melee round data for current character)}
   #PRINT {   Note: meleeCount command show overtime statistics for current character.}
   #PRINT {}
   #PRINT {  Type <C dodgerblue>resetMelee</C> to reset ALL data for current character.}
   #PRINT {}
   #PRINT {  Type <C dodgerblue>meleeColor <type> <color> [bcolor]</C> background color optional}
   #PRINT {   Available meleeColor types: (shown in current set color)}
   #PRINT {   <C %replace(@meleeColorCrossRaceHitYou,","," ")>CrossRaceHitYou</C>  (set color of line when a CrossRace player hits you))}
   #PRINT {   <C %replace(@meleeColorYouHitCrossRace,","," ")>YouHitCrossRace</C>  (set color of line when you hit a CrossRace player))}
   #PRINT {}
   #PRINT {    Example: meleeColor CrossRaceHitYou red black (sets red foreground with a black background)}
   #PRINT {}
   }
#ALIAS meleeColor {
   #IF (%null(%1)) {
      #PRINT {%crlf Usage: <C dodgerblue>meleeColor <type> <color> [bcolor]</C> background color optional}
      #PRINT {  Available meleeColor types: (shown in current set color)}
      #PRINT {   <C %replace(@meleeColorCrossRaceHitYou,","," ")CrossRaceHitYou</C>  (set color of line when a CrossRace player hits you))}
      #PRINT {   <C %replace(@meleeColorYouHitCrossRace,","," ")YouHitCrossRace</C>  (set color of line when you hit a CrossRace player))}
      } {
      #IF (%class(%concat("meleeColor",%1))=-1) {
         #PRINT {%crlf %1 is an invalid type selection...}
         } {
         #IF (%null(%2)) {
            #PRINT {%crlf What color is that?...}
            } {
            #IF (%colorname(%2)=536870911 AND %color(%2)=0) {
               #VAR %concat("meleeColor",%1) {}
               #PRINT {%crlf %2 is an invalid color. %concat("meleeColor",%proper(%1)) variable cleared.}
               } {
               #IF (%null(%3)) {
                  #VAR %concat("meleeColor",%1) {%2}
                  #PRINT {%crlf Color set: @meleeMXPcolor(%2)}
                  } {
                  #IF (%colorname(%3)=536870911 AND %color(%3)=0) {
                     #VAR %concat("meleeColor",%1) {}
                     #PRINT {%crlf %3 is an invalid color. %concat("meleeColor",%proper(%1)) variable cleared.}
                     } {
                     #VAR %concat("meleeColor",%1) {%concat(%2,",",%3)}
                     #PRINT {%crlf Color set: <C %2 %3>%2 %3</C>}
                     }
                  }
               }
            }
         }
      }
   }
#ALIAS attackCount {
   #VAR attackCrossRacePercent (@attackCrossRaceHit*100/@attackCrossRaceTotal)
   #VAR attackCrossRacePercentParry (@attackCrossRaceParry*100/@attackCrossRaceTotal)
   #VAR attackCrossRacePercentDodge (@attackCrossRaceDodge*100/@attackCrossRaceTotal)
   #PRINT {%crlf <C dodgerblue>CrossRace Attack Data:</C>}
   #PRINT {This session you've hit your opponents @attackCrossRaceHit out of @attackCrossRaceTotal total melee rounds (@{attackCrossRacePercent}~% hit)}
   #PRINT {This session your opponents have parried @attackCrossRaceParry out of @attackCrossRaceTotal total melee rounds (@{attackCrossRacePercentParry}~% parried)}
   #PRINT {This session your opponents have dodged @attackCrossRaceDodge out of @attackCrossRaceTotal total melee rounds (@{attackCrossRacePercentDodge}~% dodged)}
   }
#ALIAS defendCount {
   #VAR defendCrossRacePercent (@defendCrossRaceHit*100/@defendCrossRaceTotal)
   #VAR defendCrossRacePercentParry (@defendCrossRaceParry*100/@defendCrossRaceTotal)
   #VAR defendCrossRacePercentDodge (@defendCrossRaceDodge*100/@defendCrossRaceTotal)
   #PRINT {%crlf <C dodgerblue>CrossRace Defense Data:</C>}
   #PRINT {This session you've been hit @defendCrossRaceHit out of @defendCrossRaceTotal total melee rounds (@{defendCrossRacePercent}~% hit)}
   #PRINT {This session you've parried @defendCrossRaceParry out of @defendCrossRaceTotal total melee rounds (@{defendCrossRacePercentParry}~% parried)}
   #PRINT {This session you've dodged @defendCrossRaceDodge out of @defendCrossRaceTotal total melee rounds (@{defendCrossRacePercentDodge}~% dodged)}
   }
#ALIAS meleeCount {
   #VAR %concat(attack,%char,CrossRacePercent) (%expand(%concat("@",attack,%char,CrossRaceHit))*100/%expand(%concat("@",attack,%char,CrossRaceTotal)))
   #VAR %concat(attack,%char,CrossRacePercentParry) (%expand(%concat("@",attack,%char,CrossRaceParry))*100/%expand(%concat("@",attack,%char,CrossRaceTotal)))
   #VAR %concat(attack,%char,CrossRacePercentDodge) (%expand(%concat("@",attack,%char,CrossRaceDodge))*100/%expand(%concat("@",attack,%char,CrossRaceTotal)))
   #PRINT {%crlf <C dodgerblue>Cross Race Attacks since %expand(%concat("@",%char,MROT)):</C>}
   #PRINT {You've hit your opponents %expand(%concat("@",attack,%char,CrossRaceHit)) out of %expand(%concat("@",attack,%char,CrossRaceTotal)) total melee rounds (%expand(%concat("@",attack,%char,CrossRacePercent))~% hit)}
   #PRINT {Your opponents have parried %expand(%concat("@",attack,%char,CrossRaceParry)) out of %expand(%concat("@",attack,%char,CrossRaceTotal)) total melee rounds (%expand(%concat("@",attack,%char,CrossRacePercentParry))~% parried)}
   #PRINT {Your opponents have dodged %expand(%concat("@",attack,%char,CrossRaceDodge)) out of %expand(%concat("@",attack,%char,CrossRaceTotal)) total melee rounds (%expand(%concat("@",attack,%char,CrossRacePercentDodge))~% dodged)}
   #VAR %concat(defend,%char,CrossRacePercent) (%expand(%concat("@",defend,%char,CrossRaceHit))*100/%expand(%concat("@",defend,%char,CrossRaceTotal)))
   #VAR %concat(defend,%char,CrossRacePercentParry) (%expand(%concat("@",defend,%char,CrossRaceParry))*100/%expand(%concat("@",defend,%char,CrossRaceTotal)))
   #VAR %concat(defend,%char,CrossRacePercentDodge) (%expand(%concat("@",defend,%char,CrossRaceDodge))*100/%expand(%concat("@",defend,%char,CrossRaceTotal)))
   #PRINT {%crlf <C dodgerblue>Cross Race Defense since %expand(%concat("@",%char,MROT)):</C>}
   #PRINT {You've been hit %expand(%concat("@",defend,%char,CrossRaceHit)) out of %expand(%concat("@",defend,%char,CrossRaceTotal)) total melee rounds (%expand(%concat("@",defend,%char,CrossRacePercent))~% hit)}
   #PRINT {You've parried %expand(%concat("@",defend,%char,CrossRaceParry)) out of %expand(%concat("@",defend,%char,CrossRaceTotal)) total melee rounds (%expand(%concat("@",defend,%char,CrossRacePercentParry))~% parried)}
   #PRINT {You've dodged %expand(%concat("@",defend,%char,CrossRaceDodge)) out of %expand(%concat("@",defend,%char,CrossRaceTotal)) total melee rounds (%expand(%concat("@",defend,%char,CrossRacePercentDodge))~% dodged)}
   }
#ALIAS resetMelee {
   #RESET {meleeRound}
   #VAR %concat(attack,%char,CrossRaceDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(attack,%char,CrossRaceHit) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(attack,%char,CrossRaceParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(attack,%char,CrossRacePercent) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(attack,%char,CrossRacePercentDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(attack,%char,CrossRacePercentParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(attack,%char,CrossRaceTotal) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRaceDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRaceHit) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRaceParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRacePercent) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRacePercentDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRacePercentParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(defend,%char,CrossRaceTotal) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #VAR %concat(%char,MROT) {%time("m/d/20y")} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
   #PRINT {%crlf Melee Rounds data for %char is now reset.}
   }
#VAR meleeAttack {blast|cleave|crush|hack|hit|lance|pierce|pound|scythe|shoot|slash|slice|smite|stab|sting|strike|whip}
#VAR meleeAttacked {blasts|cleaves|crushes|hacks|hits|lances|pierces|pounds|scythes|shoots|slashes|slices|smites|stabs|stings|strikes|whips}
#VAR meleeAttacking {blasting|cleaving|crushing|hacking|hitting|lancing|piercing|pounding|scything|shooting|slashing|slicing|smiting|stabbing|stinging|striking|whipping}
#VAR meleeBladeMaster {assume|flow effortlessly into|gracefully flow into|spin effortlessly into}
#VAR meleeBodypart {body|head|left arm|left foot|left hand|left leg|right arm|right foot|right hand|right leg}
#VAR meleeFlowList {assume|flow effortlessly into|gracefully flow into|spin effortlessly into}
#VAR meleeSwordForms {Arc of the Moon|Bundling Straw|Cat on Hot Sand|Hummingbird Kisses the Honeyrose|Lightning of Three Prongs|Lizard in the Thornbush|Low Wind Rising|Moon Rises Over the Water|Parting the Silk|Ribbon in the Air|Stones Falling from the Cliff|Striking the Spark|The Boar Rushes Down the Mountain|The Cat Dances on the Wall|The Courtier Taps His Fan|The Falcon Swoops|The Falling Leaf|The Heron Spreads Its Wings|The Kingfisher Takes a Silverback|The River Undercuts the Bank|The Swallow Takes Flight|The Wood Grouse Dances|Thistledown Floats on the Wind|Tower of Morning|Water Flows Downhill|Whirlwind on the Mountain|Wind and Rain}
#VAR meleeTickle {barely|tickle|barely tickle}
#VAR meleeTickles {barely|tickles|barely tickles}
#VAR attackCrossRaceDodge {0} {0}
#VAR attackCrossRaceHit {0} {0}
#VAR attackCrossRaceParry {0} {0}
#VAR attackCrossRacePercent {0} {0}
#VAR attackCrossRacePercentDodge {0} {0}
#VAR attackCrossRacePercentParry {0} {0}
#VAR attackCrossRaceTotal {0} {0}
#VAR defendCrossRaceDodge {0} {0}
#VAR defendCrossRaceTotal {0} {0}
#VAR defendCrossRaceHit {0} {0}
#VAR defendCrossRaceParry {0} {0}
#VAR defendCrossRacePercent {0} {0}
#VAR defendCrossRacePercentDodge {0} {0}
#VAR defendCrossRacePercentParry {0} {0}
#VAR meleeColorCrossRaceHitYou {crimson}
#VAR meleeColorYouHitCrossRace {dodgerblue}
#EVENT OnConnect {
   #IF (%class(MeleeRound|%concat(%char,MeleeRoundVariables))=-1) {
      #CLASS {MeleeRound|%concat(%char,MeleeRoundVariables)} {disable}
      #CLASS 0
      #VAR %concat(attack,%char,CrossRaceDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(attack,%char,CrossRaceHit) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(attack,%char,CrossRaceParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(attack,%char,CrossRacePercent) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(attack,%char,CrossRacePercentDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(attack,%char,CrossRacePercentParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(attack,%char,CrossRaceTotal) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRaceDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRaceHit) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRaceParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRacePercent) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRacePercentDodge) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRacePercentParry) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(defend,%char,CrossRaceTotal) {0} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      #VAR %concat(%char,MROT) {%time("m/d/20y")} {_nodef} {MeleeRound|%concat(%char,MeleeRoundVariables)}
      } {
      #T+ {MeleeRound|%concat(%char,MeleeRoundVariables)}
      }
   }
#EVENT eventAttackCrossSuccess {
   #ADD attackCrossRaceHit 1
   #ADD attackCrossRaceTotal 1
   #ADD %concat(attack,%char,CrossRaceTotal) 1
   #ADD %concat(attack,%char,CrossRaceHit) 1
   }
#EVENT eventAttackCrossDodge {
   #ADD attackCrossRaceDodge 1
   #ADD attackCrossRaceTotal 1
   #ADD %concat(attack,%char,CrossRaceTotal) 1
   #ADD %concat(attack,%char,CrossRaceDodge) 1
   }
#EVENT eventAttackCrossParry {
   #ADD attackCrossRaceParry 1
   #ADD attackCrossRaceTotal 1
   #ADD %concat(attack,%char,CrossRaceTotal) 1
   #ADD %concat(attack,%char,CrossRaceParry) 1
   }
#EVENT eventDefendCrossHit {
   #ADD defendCrossRaceHit 1
   #ADD defendCrossRaceTotal 1
   #ADD %concat(defend,%char,CrossRaceTotal) 1
   #ADD %concat(defend,%char,CrossRaceHit) 1
   }
#EVENT eventDefendCrossParry {
   #ADD defendCrossRaceParry 1
   #ADD defendCrossRaceTotal 1
   #ADD %concat(defend,%char,CrossRaceTotal) 1
   #ADD %concat(defend,%char,CrossRaceParry) 1
   }
#EVENT eventDefendCrossDodge {
   #ADD defendCrossRaceDodge 1
   #ADD defendCrossRaceTotal 1
   #ADD %concat(defend,%char,CrossRaceTotal) 1
   #ADD %concat(defend,%char,CrossRaceDodge) 1
   }
#CLASS 0
#CLASS {MeleeRound|MeleeSwordforms}
#TRIGGER {(You {@meleeBladeMaster} {@meleeSwordForms}, {@meleeAttacking} )(~*)[A-Z]%w(~*)'s( {@meleeBodypart}*)$} {
   #RAISE eventAttackCrossSuccess
   #RAISE eventYouHitCrossRace
   #PCOL {@meleeColorYouHitCrossRace} %x1
   #PCOL {white} %x2
   #PCOL {white} %x3
   #PCOL {@meleeColorYouHitCrossRace} %x4
   } "" {case}
#CLASS 0
#CLASS {MeleeRound|MeleeCrossRace}
#TRIGGER {(You {@meleeTickle} )(~*)[A-Z]%w(~*)'s( {@meleeBodypart} with your {@meleeAttack}.)$} {
   #RAISE eventAttackCrossSuccess
   #PCOL {@meleeColorYouHitCrossRace} %x1
   #PCOL {white} %x2
   #PCOL {white} %x3
   #PCOL {@meleeColorYouHitCrossRace} %x4
   } "" {case}
#TRIGGER {(You *{@meleeAttack} )(~*)[A-Z]%w(~*)'s( {@meleeBodypart}*)$} {
   #RAISE eventAttackCrossSuccess
   #PCOL {@meleeColorYouHitCrossRace} %x1
   #PCOL {white} %x2
   #PCOL {white} %x3
   #PCOL {@meleeColorYouHitCrossRace} %x4
   } "" {case}
#TRIGGER {You try to {@meleeAttack} (~*)[A-Z]%w(~*), but {he|she} {deflects the blow|parries successfully}.$} {
   #RAISE eventAttackCrossParry
   #PCOL {white} %x1
   #PCOL {white} %x2
   } "" {case}
#TRIGGER {You try to {@meleeAttack} (~*)[A-Z]%w(~*), but {he|she} dodges the attack.$} {
   #RAISE eventAttackCrossDodge
   #PCOL {white} %x1
   #PCOL {white} %x2
   } "" {case}
#TRIGGER {(~*)[A-Z]%w(~*) swiftly dodges your attempt to {@meleeAttack} {him|her}.$} {
   #RAISE eventAttackCrossDodge
   #PCOL {white} %x1
   #PCOL {white} %x2
   } "" {case}
#TRIGGER {(~*)[A-Z]%w(~*)( *{@meleeAttacked} your {@meleeBodypart}*)$} {
   #RAISE eventDefendCrossHit
   #PCOL {white} %x1
   #PCOL {white} %x2
   #PCOL {@meleeColorCrossRaceHitYou} %x3
   } "" {case}
#TRIGGER {(~*)[A-Z]%w(~*)( {barely tickles|tickles} your {@meleeBodypart} with {his|her} {@meleeAttack}.)$} {
   #RAISE eventDefendCrossHit
   #PCOL {white} %x1
   #PCOL {white} %x2
   #PCOL {@meleeColorCrossRaceHitYou} %x3
   } "" {case}
#TRIGGER {(~*)[A-Z]%w(~*) tries to {@meleeAttack} you, but you {deflect the blow|parry successfully}.$} {
   #RAISE eventDefendCrossParry
   #PCOL {white} %x1
   #PCOL {white} %x2
   } "" {case}
#TRIGGER {(~*)[A-Z]%w(~*) tries to {@meleeAttack} you, but you dodge the attack.$} {
   #RAISE eventDefendCrossDodge
   #PCOL {white} %x1
   #PCOL {white} %x2
   } "" {case}
#TRIGGER {You swiftly dodge (~*)[A-Z]%w(~*)'s attempt to {@meleeAttack} you.$} {
   #RAISE eventDefendCrossDodge
   #PCOL {white} %x1
   #PCOL {white} %x2
   } "" {case}
#CLASS 0

Author:  Taziar [ Sat Oct 12, 2019 6:12 pm ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpMend to view help file in client.

Image

Direct download: MendCMUD.txt

Code:
#CLASS {Mend}
#ALIAS helpMend {
   #PRINT {%crlf <C dodgerblue>-----Mend Help File-----</C>}
   #PRINT {    <C dodgerblue>[Updated: 8/28/2019]</C>}
   #PRINT {}
   #PRINT { Type <C dodgerblue>mendAll <keyword></C> to mend all weapons of that type in inventory.}
   #PRINT {}
   }
#ALIAS mendAll {
   #T+ mendFinish
   #T+ mendSkip
   #T+ mendWhat
   #VAR mendCount 1
   #VAR mendKeyword %1
   #SEND {mend @{mendCount}.@{mendKeyword}}
   }
#VAR mendCount {}
#VAR mendKeyword {}
#TRIGGER "mendFinish" {You finish mending *...$} {
   #VAR mendCount (@mendCount+1)
   #SEND {mend @{mendCount}.@{mendKeyword}}
   } "" {case|disable}
#TRIGGER "mendWhat" {Mend what?$} {
   #T- mendWhat
   #T- mendFinish
   #T- mendSkip
   } "" {case|disable}
#TRIGGER "mendSkip" {But it is not even scratched!$} {
   #VAR mendCount (@mendCount+1)
   #SEND {mend @{mendCount}.@{mendKeyword}}
   } "" {case|disable}
#CLASS 0

Author:  Taziar [ Sat Oct 12, 2019 6:12 pm ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpMounts to view help file in client.

Image

Type helpMountsClan to view help file in client.

Image

Direct download: MountsCMUD.txt

Code:
#CLASS {Mounts}
#ALIAS helpMounts {
   #PRINT {%crlf <C dodgerblue>-----Mounts Help File-----</C>}
   #PRINT {    <C dodgerblue>[Updated: 8/16/2019]</C>}
   #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 {   <C @mountColorHorse>"|1|" A warhorse is here, stamping his feet impatiently.</C>}
   #PRINT {   <C @mountColorSeanchan>"|2|" An armoured black stallion paws the ground.</C>}
   #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 { <C @mountColorSeanchan>"|R1|" A grey-skinned winged animal is here.</C>}
   #PRINT { <C @mountColorSeanchan>"|T1|" A sleek well-trained torm glares fiercely about.</C>}
   #PRINT { <C @mountColorShadow>"|1|" A black shadow stallion paws the ground here, fiery-red eyes shining with evil.</C>}
   #PRINT {}
   #PRINT { When you ride a mount only the number is colored:}
   #PRINT { <C @mountColorHorse>"|1|"</C> A warhorse is here, stamping his feet impatiently, being ridden by you.}
   #PRINT { <C @mountColorShadow>"|1|"</C> 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 <C @mountColorHorse>"|2|" bloodstock stallion</C>}
   #PRINT { *<C red>Rig</C>* is here, fighting Reen mending a weapon, riding <C @mountColorShadow>"|2|" shadow stallion</C>}
   #PRINT {}
   #PRINT { Type mountColor <mountType> [fcolor bcolor] [background color optional]}
   #PRINT {  Available mount types:}
   #PRINT {   <C @mountColorClan>Clan</C>}
   #PRINT {   <C @mountColorHorse>Horse</C>}
   #PRINT {   <C @mountColorSeanchan>Seanchan</C>}
   #PRINT {   <C @mountColorShadow>Shadow</C>}
   #PRINT {}
   #PRINT { Type <C dodgerblue>helpMountsClan</C> to view clan mount list.}
   #PRINT {}
   }
#ALIAS helpMountsClan {
   #PRINT {%crlf %crlf <C dodgerblue> Clan Horse List:</C>}
   #PRINT {   Child of Light:            <C @mountColorClan>An armored white cavalry horse stands here, ready for battle.</C>}
   #PRINT {   Civil Watch:               <C @mountColorClan>A piebald rouncey stands here, its mane plaited with ribbons.</C>}
   #PRINT {   Defender of the Stone:     <C @mountColorClan>A Tairen destrier barded in black and gold stands here.</C>}
   #PRINT {   Deathwatch:                <C @mountColorSeanchan>An armoured black stallion paws the ground.</C>}
   #PRINT {   Dragonsworn:               <C @mountColorClan>A tall bay stallion stands here, ears alert for danger.</C>}
   #PRINT {   Hand of Light:             <C @mountColorClan>A battle-trained destrier stands here.</C>}
   #PRINT {   Gleeman:                   <C @mountColorClan>A donkey wearing a patchwork blanket stands here.</C>}
   #PRINT {   Illian Companion:          <C @mountColorClan>An Illianer golden-maned steed stands here observing its surroundings.</C>}
   #PRINT {   Illuminator:               <C @mountColorClan>A sturdy fell pony stands here, multi-colored tubes protruding from its saddlebags.</C>}
   #PRINT {   Imperial Guard:            <C @mountColorSeanchan>A blood bay charger stands here ready for adventure.</C>}
   #PRINT {   Kandori Merchants' Guild:  <C @mountColorClan>A long-eared mule is here, looking hardy.</C>}
   #PRINT {   Legion of Unity:           <C @mountColorClan>A black and ivory stallion stands here, still as night.</C>}
   #PRINT {   Lion Warden:               <C @mountColorClan>A red Andoran charger, pride of her majesties stables.</C>}
   #PRINT {   Lion Warden:               <C @mountColorClan>A white destrier stands here proudly, alert for battle.</C>}
   #PRINT {   Morat'raken:               <C @mountColorSeanchan>A grey-skinned winged animal is here.</C>}
   #PRINT {   Morat'torm:                <C @mountColorSeanchan>A sleek well-trained torm glares fiercely about.</C>}
   #PRINT {   Rising Sun:                <C @mountColorClan>A large destrier stands here, wearing full barding etched with a rising sun.</C>}
   #PRINT {   Red Eagle:                 <C @mountColorClan>A jet black courser stands here, clad in the red-and-gold livery of Manetheren.</C>}
   #PRINT {   Shienaran Lancer:          <C @mountColorClan>A battle-trained Shienaran warlander stands here, vigilant of its surroundings.</C>}
   #PRINT {   Sword and Hand:            <C @mountColorClan>A cut-throat Domani razor stands here tossing its head.</C>}
   #PRINT {   Thiefbane:                 <C @mountColorClan>A silver-haired thoroughbred stands here, alert for its master's whistle.</C>}
   #PRINT {   Wall Guard:                <C @mountColorClan>A placid red roan steed is here, caparisoned with the banner of a golden fist..</C>}
   #PRINT {   White Tower:               <C @mountColorClan>A pale destrier stands here, adorned with the white flame of Tar Valon.</C>}
   #PRINT {   Winged Guard:              <C @mountColorClan>A blood bay stallion is here, pawing the ground restlessly.</C>}
   #PRINT {   Wisdom:                    <C @mountColorClan>A dapple grey courser with a finely brushed coat dances from spot to spot.</C>}
   #PRINT {}
   }
#ALIAS mountColor {
   #PRINT {}
   #IF (%null(%1)) {
      #PRINT { Usage: mountColor <type> <C> [bcolor] [background color optional]}
      #PRINT {}
      #PRINT {  Available types:}
      #PRINT {   <C @mountColorClan>Clan</C>}
      #PRINT {   <C @mountColorHorse>Horse</C>}
      #PRINT {   <C @mountColorSeanchan>Seanchan</C>}
      #PRINT {   <C @mountColorShadow>Shadow</C>}
      #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: <C %2>%2</C>}
                  } {
                  #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: <C %2 %3>%2 %3</C>}
                     }
                  }
               }
            }
         }
      }
   }
#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|black and ivory stallion|blood bay stallion|cut-throat Domani razor|donkey wearing a patchwork blanket|fine piebald rouncey|golden-maned steed|jet black courser|large destrier|long-eared mule|pale destrier|red Andoran charger|red roan steed|sturdy fell pony|Tairen destrier|tall bay stallion|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 {<C @mountColorShadow>~|@mountCountShadow~| shadow stallion</C>} %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 {<C @mountColorShadow>~|@mountCountShadow~|</C>%e[33m  %1} %x1
      } {
      #PSUB {<C @mountColorShadow>~|@mountCountShadow~| %1</C>} %x1
      }
   } "" {case}
#TRIGGER "mountRideRaken" {, riding (a raken.)$} {
   #ADD mountCountRaken 1
   #PSUB {<C @mountColorSeanchan>~|%concat(R,@mountCountRaken)~| raken</C>} %x1
   } "" {case}
#TRIGGER "mountRaken" {^(A grey-skinned winged animal is here*)$} {
   #ADD mountCountRaken 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<C @mountColorSeanchan>~|%concat(R,@mountCountRaken)~|</C>%e[33m %1} %x1
      } {
      #PSUB {<C @mountColorSeanchan>~|%concat(R,@mountCountRaken)~| %1</C>} %x1
      }
   } "" {case}
#TRIGGER "mountRideTorm" {, riding (a torm.)$} {
   #ADD mountCountTorm 1
   #PSUB {<C @mountColorSeanchan>~|%concat(T,@mountCountTorm)~| torm</C>} %x1
   } "" {case}
#TRIGGER "mountTorm" {^(A sleek well-trained torm glares fiercely about*)$} {
   #ADD mountCountTorm 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<C @mountColorSeanchan>~|%concat(T,@mountCountTorm)~|</C>%e[33m %1} %x1
      } {
      #PSUB {<C @mountColorSeanchan>~|%concat(T,@mountCountTorm)~| %1</C>} %x1
      }
   } "" {case}
#TRIGGER "mountRideArmoured" {, riding (an armoured black stallion.)$} {
   #ADD mountCountHorse 1
   #PSUB {<C @mountColorSeanchan>~|@mountCountHorse~| armoured black stallion</C>} %x1
   } "" {case}
#TRIGGER "mountArmoured" {^(An armoured black stallion paws the ground*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<C @mountColorSeanchan>~|@mountCountHorse~|</C>%e[33m %1} %x1
      } {
      #PSUB {<C @mountColorSeanchan>~|@mountCountHorse~| %1</C>} %x1
      }
   } "" {case}
#TRIGGER "mountRideImperial" {, riding (a blood bay charger.)$} {
   #ADD mountCountHorse 1
   #PSUB {<C @mountColorSeanchan>~|@mountCountHorse~| armoured black stallion</C>} %x1
   } "" {case}
#TRIGGER "mountImperial" {^(A blood bay charger stands here ready for adventure*)$} {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<C @mountColorSeanchan>~|@mountCountHorse~|</C>%e[33m %1} %x1
      } {
      #PSUB {<C @mountColorSeanchan>~|@mountCountHorse~| %1</C>} %x1
      }
   } "" {case}
#TRIGGER "mountRideHorse" {, riding ({a|an} (*).)$} {
   #IF (%ismember(%2,@mountList)) {
      #ADD mountCountHorse 1
      #PSUB {<C @mountColorHorse>~|@mountCountHorse~| %2</C>} %x1
      } {
      #IF (%ismember(%2,@mountClanList)) {
         #ADD mountCountHorse 1
         #PSUB {<C @mountColorClan>~|@mountCountHorse~| %2</C>} %x1
         }
      }
   } "" {case}
#TRIGGER "mountGray" {^(A gray palfrey prances skittishly nearby*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountWarhorse" {^(A warhorse is here, stamping his feet impatiently*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountWild" {^(A wild stallion bucks madly*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountDraft" {^(A draft horse is here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountShaggy" {^(A shaggy brown mare stands here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountIllianer" {^(An Illianer steed stands here proudly, its black mane glistening*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountDun" {^(A dun mare is here, snorting angrily*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountTall" {^(A tall dust-colored gelding prances in a circle here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountBloodstock" {^(A Tairen bloodstock stallion stands here, tail swaying with the breeze*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountPalomino" {^(Prancing about on dainty feet, a palomino mare stands here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountBlack" {^(A black stallion prances about*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountRazor" {^(Eyes keen, a Domani razor stands here swishing its tail*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountBrown" {^(A brown horse is here, nipping at a tuft of grass*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountChestnut" {^(A chestnut stallion trots about*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountSpotted" {^(A spotted horse wanders skittishly around here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountTremalking" {^(A sturdy white-maned pony tosses its head here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountColt" {^(A playful colt is running about here*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountRoan" {^(A sturdy roan colored horse stands alert*)$} {
   #RAISE eventMount %1
   } "" {case}
#TRIGGER "mountClanChild" {^(An armored white cavalry horse stands here, ready for battle*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanCivil" {^(A piebald rouncey stands here, its mane plaited with ribbons*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanDefender" {^(A Tairen destrier barded in black and gold stands here*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanDragon" {^(A tall bay stallion stands here, ears alert for danger*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanEagles" {^(A jet black courser stands here, clad in the red-and-gold livery of Manetheren*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanCompanions" {^(An Illianer golden-maned steed stands here observing its surroundings*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanGleemen" {^(A donkey wearing a patchwork blanket stands here*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanHand" {^(A battle-trained destrier stands here*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanIlluminator" {^(A sturdy fell pony stands here, multi-colored tubes protruding from its saddlebags*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanKandori" {^(A long-eared mule is here, looking hardy*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanLancer" {^(A battle-trained Shienaran warlander stands here, vigilant of its surroundings*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanLegion" {^(A black and ivory stallion stands here, still as night*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanLionWarden" {^(A white destrier stands here proudly, alert for battle*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanRising" {^(A large destrier stands here, wearing full barding etched with a rising sun*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanSword" {^(A cut-throat Domani razor stands here tossing its head*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanThiefbane" {^(A silver-haired thoroughbred stands here, alert for its master's whistle*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanWallGuard" {^(A placid red roan steed is here, caparisoned with the banner of a golden fist*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanWarden" {^(A red Andoran charger, pride of her majesties stables*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanWhiteTower" {^(A pale destrier stands here, adorned with the white flame of Tar Valon*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanWinger" {^(A blood bay stallion is here, pawing the ground restlessly*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#TRIGGER "mountClanWisdoms" {^(A dapple grey courser with a finely brushed coat dances from spot to spot*)$} {
   #RAISE eventClanMount %1
   } "" {case}
#EVENT eventClanMount {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<C @mountColorClan>~|@mountCountHorse~|</C>%e[33m %1} %x1
      } {
      #PSUB {<C @mountColorClan>~|@mountCountHorse~| %1</C>} %x1
      }
   }
#EVENT eventMount {
   #ADD mountCountHorse 1
   #IF %ends(%1,"being ridden by you.") {
      #PSUB {<C @mountColorHorse>~|@mountCountHorse~|</C>%e[33m %1} %x1
      } {
      #PSUB {<C @mountColorHorse>~|@mountCountHorse~| %1</C>} %x1
      }
   }
#CLASS 0

Author:  Taziar [ Sat Oct 12, 2019 6:12 pm ]
Post subject:  Re: House of Medakan cMUD Scripts

Type helpPlayerZone to view help file in client.



Direct download:

Code:
Currently in debug

Page 2 of 4 All times are UTC - 5 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/