Legends of the Jedi Forums Newbie Watering Hole Fixed/Updated CMUD Research Script
This topic has 13 replies, 10 voices, and was last updated 14 years, 4 months ago by Kirash.
Viewing 14 posts - 1 through 14 (of 14 total)
    • Anonymous Member
      October 2, 2009 at 3:44 am #1226

      I decided to fix/update Seyalas’s research script. Most of the changes are cosmetic.
      The list of changes:
      –Added Practice to the options for those skills that can’t be researched, you still have to be near a teacher, obviously.
      –Fixed it so [i:2sewjz7y]all [/i:2sewjz7y]skills[i:2sewjz7y] should[/i:2sewjz7y] now show up properly, including those with hyphens, underscores, or numbers in the name.
      –Fixed it so all skill names show up in braces instead of only the second and third columns…though those braces appeared to have been a side-effect of the way Selayas wrote the script in the first place. I think it looks better with them there.
      –Fixed colum alignment, it still isn’t the same as the base practice screen, but it looks better.
      –Fixed it so it [i:2sewjz7y]only[/i:2sewjz7y] links skills on the practice list..that means if someone says "blahblahblah <whatevernumber>%" on com 0 or OOC it’s not got to link what they say like it did before.
      –Fixed it so when you finishing researching a skill it checks to make sure you have something in your queue before trying to research again..
      saves your client from sending an empty ‘research’ command, better for you, and better for the MUD since it doesn’t need to proccess a useless and unneccessary command
      –Changed it so skills at 0% are red instead of orange, for easier readability
      –Changed it so skills at 100% are green instead of orange, again, for easier readability. They are also no longer linked as, there is no reason to research them
      –These colors can be adjusted to suit your tastes.

      Now for some screenshots, this is the original Seyalas script look:
      [img:2sewjz7y]http://www.ipoga.dk/img/reslist.gif[/img:2sewjz7y]

      This is the way it looks now(forgive the poor quality, it gets the point across at least):
      [img:2sewjz7y]http://img200.imageshack.us/img200/9673/researchscript.jpg[/img:2sewjz7y]

      Here’s the code: It’s saved in XML format so to get it into CMUD, just copy&paste it into notepad or w/e save it as whatever name you like, as long as it has the .xml extension, make sure the editor is set to save as "All files" otherwise you’ll get a .txt or .doc or such at the end. I suggest "researchscript.xml"
      go into cmud and open the package editor..one of the fastest ways is to hit the Triggers button. After that go to File->Import XML, select the xml file and hit open. It shouldn’t have any affect on your other settings or triggers.

      [code:2sewjz7y] <?xml version="1.0" encoding="ISO-8859-1" ?>
      – <cmud>
      – <class name="researchscript">
      <notes>This script originally written by Seyalas. Modified by @zareth to properly catch skills with names including numbers, underscore character, or hyphen character, as well as clean up unnecessary commands sent to the mud. Also makes the interface more readable in my opinion.</notes>
      – <alias name="rese">
      <value>research %-1 #VA rese %-1 {researchscript}</value>
      </alias>
      – <var name="rese" usedef="true">
      <value>tractor beams</value>
      <default>researchscript</default>
      </var>
      – <trigger priority="400">
      <pattern>^You study for hours on end, but fail to gather any knowledge.</pattern>
      <value>rese @rese</value>
      <notes>used in continuing research</notes>
      </trigger>
      – <trigger priority="410">
      <pattern>^You finish your studies and feel much more skilled.</pattern>
      <value>rese @rese</value>
      <notes>used in continuing research</notes>
      </trigger>
      – <alias name="enq">
      – <value>
      – <![CDATA[ #ADDITEM reslist %-1
      #ECHO <color orange>~!<bold> %-1 </bold>added to research list.</color>
      #ECHO <color orange>~! Current research list: </color><color teal>@reslist</color>
      ]]>
      </value>
      </alias>
      – <trigger priority="470">
      <pattern>^You can’t learn about that in books. Go find a teacher.</pattern>
      – <value>
      – <![CDATA[ #VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO <color orange>~! Now researching @newres</color>
      #ECHO <color orange>~! Remaining research: </color><color teal>@reslist</color>
      rese @newres}
      ]]>
      </value>
      <notes>trigger used in continuing research</notes>
      </trigger>
      – <trigger priority="490">
      <pattern>^You can’t learn any more about that from books!</pattern>
      – <value>
      – <![CDATA[ #VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO <color orange>~! Now researching @newres</color>
      #ECHO <color orange>~! Remaining research: </color><color teal>@reslist</color>
      rese @newres}
      ]]>
      </value>
      <notes>used in continuing research</notes>
      </trigger>
      <var name="reslist" type="StringList" />
      <var name="newres" />
      – <class name="linker" enabled="false">
      <notes>This hold the trigger that turns the skill names in the practice list into links and changes color of the link depending on skill percentage.</notes>
      – <trigger priority="340" trigontrig="false" repeat="true">
      <pattern>({%w|%w %w|%w%s%w%s%d|%w-%w|%w_%w})(%s)(%d)~%</pattern>
      – <value>
      – <![CDATA[ #switch (%3 = 0) {#SUB {{<color red><send ‘rese %1|enq %1|prac %1’ ‘Research %1|Enqueue %1|Practice %1’>%1</send>%2%3~%</color>}}} (0 < %3 && %3 < 100) {#SUB {{<color orange><send ‘rese %1|enq %1|prac %1’ ‘Research %1|Enqueue %1|Practice %1’>%1</send>%2%3~%</color>}}} (%3 = 100) {#SUB {{<color green>%1%2%3~%</color>}}}

      ]]>
      </value>
      </trigger>
      </class>
      – <trigger priority="520">
      <pattern>^


      Skills


      </pattern>
      <value>#T+ linker #SUB {


      Skills


      }</value>
      <notes>used for formatting and to trigger the linker</notes>
      </trigger>
      – <trigger priority="530">
      <pattern>^To see a shorter practice list, type PRACTICE <class name>.</pattern>
      <value>#T- linker</value>
      <notes>used to disable the linker</notes>
      </trigger>
      – <trigger priority="550">
      <pattern>^


      Weapons


      </pattern>
      <value>#SUB {


      Weapons


      }</value>
      <notes>used for formatting</notes>
      </trigger>
      – <trigger priority="560">
      <pattern>^


      Feats


      </pattern>
      <value>#SUB {


      Feats


      }</value>
      <notes>Used for formatting</notes>
      </trigger>
      – <trigger priority="620">
      <pattern>^You can’t learn bounty hunting skills from a book!</pattern>
      – <value>
      – <![CDATA[ #VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO <color orange>~! Now researching @newres</color>
      #ECHO <color orange>~! Remaining research: </color><color teal>@reslist</color>
      rese @newres}
      ]]>
      </value>
      <notes>used in continuing research</notes>
      </trigger>
      – <trigger priority="630">
      <pattern>^You can’t learn smuggling skills from a book!</pattern>
      – <value>
      – <![CDATA[ #VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO <color orange>~! Now researching @newres</color>
      #ECHO <color orange>~! Remaining research: </color><color teal>@reslist</color>
      rese @newres}
      ]]>
      </value>
      <notes>used in continuing research</notes>
      </trigger>
      </class>
      </cmud>[/code:2sewjz7y]

      Suggestions for improving the scripts looks/capability are welcome, or if you need help adjusting the colors to suit your tastes, just leave a post. <!– s:) –><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!– s:) –>

    • Ranman Participant
      October 2, 2009 at 10:41 am #11718

      Very nice script, I could really use this and wish I’d had it to use years ago, alas.

      Would it work on Mush?

    • Anonymous Member
      October 2, 2009 at 6:55 pm #11720

      Unfortunately, at the moment it will not. It was written in zScript, which is the Zmud/CMUD proprietary language. I’ll look into converting it.

    • Gann Participant
      October 2, 2009 at 7:10 pm #11721

      Can someone post script’s for MUSHclient please?

    • Avanga Member
      October 14, 2009 at 11:36 pm #11997

      Isn’t working for me. D:

    • zareth Member
      October 16, 2009 at 12:38 am #12021

      BLARGH. Same reason the MUSHClient script wasn’t working at first. The XML got screwed up by IE. Go figure. Here’s the fixed version:

      [code:zzigkkry]&lt;?xml version=&quot;1&#46;0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;
      &lt;cmud&gt;
      &lt;class name=&quot;researchscript&quot;&gt;
      &lt;notes&gt;This script originally written by Seyalas&#46; Modified by @zareth to properly catch skills with names including numbers, underscore character, or hyphen character, as well as clean up unnecessary commands sent to the mud&#46; Also makes the interface more readable in my opinion&#46;&lt;/notes&gt;
      &lt;alias name=&quot;rese&quot;&gt;
      &lt;value&gt;research %-1
      #VA rese %-1 {researchscript}&lt;/value&gt;
      &lt;/alias&gt;
      &lt;var name=&quot;rese&quot; usedef=&quot;true&quot;&gt;
      &lt;value&gt;tractor beams&lt;/value&gt;
      &lt;default&gt;researchscript&lt;/default&gt;
      &lt;/var&gt;
      &lt;trigger priority=&quot;400&quot;&gt;
      &lt;pattern&gt;^You study for hours on end, but fail to gather any knowledge&#46;&lt;/pattern&gt;
      &lt;value&gt;rese @rese&lt;/value&gt;
      &lt;notes&gt;used in continuing research&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;410&quot;&gt;
      &lt;pattern&gt;^You finish your studies and feel much more skilled&#46;&lt;/pattern&gt;
      &lt;value&gt;rese @rese&lt;/value&gt;
      &lt;notes&gt;used in continuing research&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;alias name=&quot;enq&quot;&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#ADDITEM reslist %-1
      #ECHO &lt;color orange&gt;~!&lt;bold&gt; %-1 &lt;/bold&gt;added to research list&#46;&lt;/color&gt;
      #ECHO &lt;color orange&gt;~! Current research list&#58; &lt;/color&gt;&lt;color teal&gt;@reslist&lt;/color&gt;&#93;&#93;&gt;&lt;/value&gt;
      &lt;/alias&gt;
      &lt;trigger priority=&quot;470&quot;&gt;
      &lt;pattern&gt;^You can’t learn about that in books&#46; Go find a teacher&#46;&lt;/pattern&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO &lt;color orange&gt;~! Now researching @newres&lt;/color&gt;
      #ECHO &lt;color orange&gt;~! Remaining research&#58; &lt;/color&gt;&lt;color teal&gt;@reslist&lt;/color&gt;
      rese @newres}&#93;&#93;&gt;&lt;/value&gt;
      &lt;notes&gt;trigger used in continuing research&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;490&quot;&gt;
      &lt;pattern&gt;^You can’t learn any more about that from books!&lt;/pattern&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO &lt;color orange&gt;~! Now researching @newres&lt;/color&gt;
      #ECHO &lt;color orange&gt;~! Remaining research&#58; &lt;/color&gt;&lt;color teal&gt;@reslist&lt;/color&gt;
      rese @newres}&#93;&#93;&gt;&lt;/value&gt;
      &lt;notes&gt;used in continuing research&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;var name=&quot;reslist&quot; type=&quot;StringList&quot;/&gt;
      &lt;var name=&quot;newres&quot;/&gt;
      &lt;class name=&quot;linker&quot; enabled=&quot;false&quot;&gt;
      &lt;notes&gt;This hold the trigger that turns the skill names in the practice list into links and changes color of the link depending on skill percentage&#46;&lt;/notes&gt;
      &lt;trigger priority=&quot;340&quot; trigontrig=&quot;false&quot; repeat=&quot;true&quot;&gt;
      &lt;pattern&gt;({%w|%w %w|%w%s%w%s%d|%w-%w|%w_%w})(%s)(%d)~%&lt;/pattern&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#switch (%3 = 0) {#SUB {{&lt;color red&gt;&lt;send ‘rese %1|enq %1|prac %1’ ‘Research %1|Enqueue %1|Practice %1’&gt;%1&lt;/send&gt;%2%3~%&lt;/color&gt;}}} (0 &lt; %3 &amp;&amp; %3 &lt; 100) {#SUB {{&lt;color orange&gt;&lt;send ‘rese %1|enq %1|prac %1’ ‘Research %1|Enqueue %1|Practice %1’&gt;%1&lt;/send&gt;%2%3~%&lt;/color&gt;}}} (%3 = 100) {#SUB {{&lt;color green&gt;%1%2%3~%&lt;/color&gt;}}}

      &#93;&#93;&gt;&lt;/value&gt;
      &lt;/trigger&gt;
      &lt;/class&gt;
      &lt;trigger priority=&quot;520&quot;&gt;
      &lt;pattern&gt;^


      Skills


      &lt;/pattern&gt;
      &lt;value&gt;#T+ linker
      #SUB {


      Skills


      }&lt;/value&gt;
      &lt;notes&gt;used for formatting and to trigger the linker&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;530&quot;&gt;
      &lt;pattern&gt;^To see a shorter practice list, type PRACTICE &amp;lt;class name&amp;gt;&#46;&lt;/pattern&gt;
      &lt;value&gt;#T- linker&lt;/value&gt;
      &lt;notes&gt;used to disable the linker&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;550&quot;&gt;
      &lt;pattern&gt;^


      Weapons


      &lt;/pattern&gt;
      &lt;value&gt;#SUB {


      Weapons


      }&lt;/value&gt;
      &lt;notes&gt;used for formatting&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;560&quot;&gt;
      &lt;pattern&gt;^


      Feats


      &lt;/pattern&gt;
      &lt;value&gt;#SUB {


      Feats


      }&lt;/value&gt;
      &lt;notes&gt;Used for formatting&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;620&quot;&gt;
      &lt;pattern&gt;^You can’t learn bounty hunting skills from a book!&lt;/pattern&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO &lt;color orange&gt;~! Now researching @newres&lt;/color&gt;
      #ECHO &lt;color orange&gt;~! Remaining research&#58; &lt;/color&gt;&lt;color teal&gt;@reslist&lt;/color&gt;
      rese @newres}&#93;&#93;&gt;&lt;/value&gt;
      &lt;notes&gt;used in continuing research&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;trigger priority=&quot;630&quot;&gt;
      &lt;pattern&gt;^You can’t learn smuggling skills from a book!&lt;/pattern&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#VAR newres %item(@reslist,1)
      #DELITEM reslist @newres
      #IF %if(@newres =~ %x, 1, 0)
      {#ECHO &lt;color orange&gt;~! Now researching @newres&lt;/color&gt;
      #ECHO &lt;color orange&gt;~! Remaining research&#58; &lt;/color&gt;&lt;color teal&gt;@reslist&lt;/color&gt;
      rese @newres}&#93;&#93;&gt;&lt;/value&gt;
      &lt;notes&gt;used in continuing research&lt;/notes&gt;
      &lt;/trigger&gt;
      &lt;/class&gt;
      &lt;/cmud&gt;
      [/code:zzigkkry]

    • zareth Member
      October 18, 2009 at 6:57 pm #12049

      Well, as no one has posted contrary I’m assuming the new xml is working. Let me know if there are any problems so I can fix them.

    • Avanga Member
      October 18, 2009 at 10:01 pm #12057

      I had the opportunity to try it and it works lovely. Thank you, Mr. Zareth!

    • Trayn Participant
      October 19, 2009 at 2:08 am #12066

      how do you get it to work for mushclient?

    • zareth Member
      October 19, 2009 at 2:13 am #12067

      You don’t. This is a CMUD research script. I have a MUSHClient version of it posted in this thread:[url:1qgf2vf0]http&#58;//www&#46;legendsofthejedi&#46;com/forums/viewtopic&#46;php?f=4&amp;t=1226[/url:1qgf2vf0]

    • ashamor Participant
      December 30, 2009 at 9:38 am #12968

      **UPDATE**

      So, in my quest to find a way to clear the queue, I e-mail Zareth. And, being the awesome person he is, he replied:

      [quote:365xlqbr]As a matter of fact, there wasn’t. So I made one. Copy and paste the following line into your CMUD command line, then hit enter.

      #ALIAS cq {#LOOP %numitems(reslist)+1 {#NOOP %pop(reslist)};#ECHO Research List Cleared!} researchscript

      After that, just type cq to clear the list. I could add that to the context menu options as well, but it would require a bit more work, and depending on how good you are with CMUD scripting and MXP, not just an easy copy+paste.[/quote:365xlqbr]

    • Walldo Keymaster
      December 31, 2009 at 7:56 pm #12985

      That is awesome, thanks. What i’d like now is some sort of auto-add feature. A full practice sheet is a test of clicking ability. Maybe have it just automatically que up anything it highlights red.

    • Elithis Member
      January 9, 2010 at 1:55 pm #13063

      It looks great, however I’m having some trouble with it. Whenever I try to load the XML into CMUD it gives me this error:
      file: .line: 2 Col: 1 Error: Expecting String: ‘&lt;’

      Thanks

    • Kirash Participant
      January 9, 2010 at 10:00 pm #13070

      I’m guessing this wouldn’t work for zmud. Do you happen to have a script like this that would? I don’t fancy paying 30 bucks for a mud client no matter how good it is unless someone can tell me where to get a serial that actually works.

Viewing 14 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic.