CMUD/ZMUD Script Samples

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Icarus
Veteran
Posts: 244
Joined: 04 Dec 2012 20:54

Re: CMUD/ZMUD Script Samples

Post by Icarus » 26 Dec 2014 01:24

Dread wrote:Thank you very much Icarus!

I copied that code, pasted it into notepad++, saved it as xml and then imported it into Cmud. It worked great! I did the same thing with Earth's code and it does nothing
however. Is there another step I need to do there?
I did that with Earth's, and it works nicely for me, so... dunno, but I am hoping one of the wizzes with gmcp can figure out a way to capture with %gmcp.comm.*

Ic
Flee you fools!

Einar
Apprentice
Posts: 41
Joined: 29 Mar 2012 13:44

Re: CMUD/ZMUD Script Samples

Post by Einar » 27 Dec 2014 01:19

I've not tested it thoroughly but it seems the code works as intended - all it does is printing the new lines from Comm package in gmcp to another window named Converse.
Attachments
CaptureSpeechToAnotherWindow.xml
(351 Bytes) Downloaded 170 times

Dread
Great Adventurer
Posts: 188
Joined: 12 Mar 2010 23:53

Re: CMUD/ZMUD Script Samples

Post by Dread » 30 Dec 2014 17:16

Einar wrote:I've not tested it thoroughly but it seems the code works as intended - all it does is printing the new lines from Comm package in gmcp to another window named Converse.
I will give this a try, thanks!

Einar
Apprentice
Posts: 41
Joined: 29 Mar 2012 13:44

Re: CMUD/ZMUD Script Samples

Post by Einar » 30 Dec 2014 20:32

Any feedback is welcomed - let me know if it works at all if you are happy how it works, or how it should be tweaked to work even better.

Icarus
Veteran
Posts: 244
Joined: 04 Dec 2012 20:54

Re: CMUD/ZMUD Script Samples

Post by Icarus » 03 Jan 2015 17:31

Einar wrote:Any feedback is welcomed - let me know if it works at all if you are happy how it works, or how it should be tweaked to work even better.
It works as adverticed, next will be to try to implement some filtering...
Flee you fools!

Dread
Great Adventurer
Posts: 188
Joined: 12 Mar 2010 23:53

Re: CMUD/ZMUD Script Samples

Post by Dread » 03 Jan 2015 21:21

Einar wrote:Any feedback is welcomed - let me know if it works at all if you are happy how it works, or how it should be tweaked to work even better.
Finally got a chance to load this, it seems to be working great! I will play with it a bit and let you know if I have any questions.

Thanks!

Icarus
Veteran
Posts: 244
Joined: 04 Dec 2012 20:54

Re: CMUD/ZMUD Script Samples

Post by Icarus » 28 Jan 2015 18:04

First of, huge thanks to Einar for the beginning of this code and to Earth's code for communication, from which I use all the messengers.

Code: Select all

<class name="Communication" id="52302">
  <var name="DisplaySayInAnotherWindow" id="52303">
    <value>no idea if it works properly</value>
    <json>out of lothores</json>
  </var>
  <trigger type="GMCP" priority="33910" regex="true" id="52304">
    <pattern>Comm.Channel</pattern>
    <value>DisplaySayInAnotherWindow = %gmcp.Comm.Channel.Body
DisplayWhoInAnotherWindow = %gmcp.Comm.Channel.Name
DisplayLineInAnotherWindow =%gmcp.Comm.Channel.Line
;#if (%ends(%1,"mighty war cry")) {} {#if (%ends(%2, "You should know better than to attack a minotaur.")) {} {#capture Converse #color gray}}
#if (%ismember(%gmcp.comm.channel.name,@blocked_npcs))
  {}
  {
  Converse:#print {%time(hh:mm:ss) %ansi(bold,white)@DisplayWhoInAnotherWindow %upper(@DisplayLineInAnotherWindow): @DisplaySayInAnotherWindow %ansi(reset)}
  }</value>
  </trigger>
  <class name="Messengers" id="52306">
    <trigger priority="123580" id="52308">
      <pattern>Postmaster tells you that you have (*).</pattern>
      <value>#color khaki
#window converse %time(hh:nn:ss) - %1
#play "C:\Users\Christian\Documents\My Games\CMUD\Genesis\Sounds\GotMail.mp3"</value>
    </trigger>
    <trigger priority="10280" id="52310">
      <pattern>* hands you a letter and says: I have a letter for you from (*)</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Message from %1</value>
    </trigger>
    <trigger priority="17600" id="52312">
      <pattern>A brown monkey runs towards you and jumps back on your shoulder. * gives you a message from (*).</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Message from %1</value>
    </trigger>
    <trigger priority="10280" id="52314">
      <pattern>A red-winged harrekki descends from above, sinks its talons into your arm, and gives you a message from (*).</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Message from %1</value>
    </trigger>
    <trigger priority="26430" id="52316">
      <pattern>A tiny elven nymph dragon mysteriously appears, lands on your shoulder tickling your neck with her tail and you retrieve a scroll from her.</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Eil-Galaith dragon message!</value>
    </trigger>
    <trigger priority="17580" id="52318">
      <pattern>arrives jogging and hands you a message from (*).</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Letter from %1</value>
    </trigger>
    <trigger priority="35670" id="52320">
      <pattern>chipmunk scampers up to you with a message from (*). You</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Message from %1</value>
    </trigger>
    <trigger priority="22630" id="52322">
      <pattern>eagle descends from the sky, lands on your shoulder and gives you a message from (*).</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Message from %1</value>
    </trigger>
    <trigger priority="127980" id="52324">
      <pattern>flutters down from above and lands on your shoulder, handing you a rolled up scroll.</pattern>
      <value>#color white
#window converse %time(hh:nn:ss) - Faerie scroll from a kender.</value>
    </trigger>
  </class>
  <trigger priority="103890" id="52386">
    <pattern>(*) project a thought to (*):</pattern>
    <value>#window converse %time(hh:nn:ss) - %1 to %2:
#c+ converse
#alarm +0.501 {#c-}</value>
  </trigger>
  <trigger priority="103880" id="52387">
    <pattern>(*) projects a thought to you:</pattern>
    <value>#window converse %time(hh:nn:ss) - %1:
#c+ converse
#alarm +0.501 {#c-}</value>
  </trigger>
  <var name="blocked_npcs" type="StringList" id="52583">
    <value>The savage dark-skinned haradrim warrior|The watching small male orc|A male orc voice|The Uruk Captain|The ruthless titanic male human|Loran|Ashburz|The young ogre|The tall ogre|The awful ogre|The monstrous ogre|The titanic ogre|The red-eyed ogre|The bald ogre|The small ogre|The nasty ogre|The huge ogre|The cruel ogre|The little ogre|The terrible ogre|The terrifying ogre|The petty ogre|The wretched ogre|The brutal ogre|The ugly ogre|The horrible ogre|The massive ogre|The unearthly ogre|The hairy ogre|The mean ogre|The black-skinned orc|The large troll|The large uruk|The ghostly gully dwarf|The dwarven ghost captain||||The wicked dark-skinned haradrim warrior|The brutal dark-skinned haradrim captain|The dirty dark-skinned haradrim warrior|The clever broad-shouldered dwarf|Rommik</value>
    <json>["The savage dark-skinned haradrim warrior","The watching small male orc","A male orc voice","The Uruk Captain","The ruthless titanic male human","Loran","Ashburz","The young ogre","The tall ogre","The awful ogre","The monstrous ogre","The titanic ogre","The red-eyed ogre","The bald ogre","The small ogre","The nasty ogre","The huge ogre","The cruel ogre","The little ogre","The terrible ogre","The terrifying ogre","The petty ogre","The wretched ogre","The brutal ogre","The ugly ogre","The horrible ogre","The massive ogre","The unearthly ogre","The hairy ogre","The mean ogre","The black-skinned orc","The large troll","The large uruk","The ghostly gully dwarf","The dwarven ghost captain","","","","The wicked dark-skinned haradrim warrior","The brutal dark-skinned haradrim captain","The dirty dark-skinned haradrim warrior","The clever broad-shouldered dwarf","Rommik"]</json>
  </var>
  <var name="DisplayWhoInAnotherWindow" id="52598">
    <value>You</value>
    <json>You</json>
  </var>
  <var name="DisplayLineInAnotherWindow" id="52599">
    <value>say</value>
    <json>say</json>
  </var>
</class>
Now, for the MOST of chat, this would capture it, but there is still some that is not captured by %gmcp.

IF you find something (often guild-chats and such) you should mail your guild wizard and/or domain of guild and ask for this to be fixed. If your guild is in queue for recode, you can postpone this some, as it will hopefully happen during recode.

Result looks like this:

Code: Select all

17:05:03 You SHOUT: test 
17:05:06 You SAY: test 
17:05:24 Ria SHOUT: test 
Hoping for Mercade, our resident genious, to figure out and add "target" for speach, if you want normal speach, look up %gmcp.comm.channel and alter the code in the trigger Comm.Channel
Flee you fools!

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/