Legends of the Jedi Forums Newbie Watering Hole Helpful scripts (CMud)
This topic has 38 replies, 18 voices, and was last updated 13 years, 5 months ago by Cortanis.
Viewing 15 posts - 1 through 15 (of 39 total)
    • seyalas Participant
      July 13, 2008 at 10:12 pm #708

      So, I thought it could be nice to help each other out with helpful scripts. Personally, I use CMud, so naturally that’s what I’ll be posting. For starters, this useful script for researching skills (Keep in mind, this script is only to save you from typing, you have to be watching <!– s:D –><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!– s:D –> ) :

      –Abstract

      researchscript allows you to right-click skills in the prac-list, adding them to a research-list. As long as research is not interrupted, the script will automatically research the skills in added order. Left-clicking a skill will start researching it.

      –Screenshot

      [img:3h7805qc]http&#58;//www&#46;ipoga&#46;dk/img/reslist&#46;gif[/img:3h7805qc]

      –Code

      [code:3h7805qc]
      &lt;class name=&quot;researchscript&quot; id=&quot;32&quot;&gt;
      &lt;trigger priority=&quot;340&quot; id=&quot;34&quot;&gt;
      &lt;pattern&gt;({%w|%w %w})(%s)(%d)~%&lt;/pattern&gt;
      &lt;value&gt;&lt;!&#91;CDATA&#91;#SUB {&lt;color orange&gt;&lt;send ‘rese %1|enq %1’ ‘Research %1|Enqueue %1’&gt;%1&lt;/send&gt;%2%3~%&lt;/color&gt;}
      &#93;&#93;&gt;&lt;/value&gt;
      &lt;/trigger&gt;
      &lt;alias name=&quot;rese&quot; id=&quot;38&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; id=&quot;39&quot;&gt;
      &lt;value&gt;enhancement&lt;/value&gt;
      &lt;default&gt;researchscript&lt;/default&gt;
      &lt;/var&gt;
      &lt;trigger priority=&quot;400&quot; id=&quot;40&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;/trigger&gt;
      &lt;trigger priority=&quot;410&quot; id=&quot;41&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;/trigger&gt;
      &lt;alias name=&quot;enq&quot; id=&quot;45&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; id=&quot;47&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
      #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;/trigger&gt;
      &lt;trigger priority=&quot;490&quot; id=&quot;49&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
      #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;/trigger&gt;
      &lt;/class&gt;

      [/code:3h7805qc]

    • Avanga Member
      July 13, 2008 at 10:15 pm #7389

      That’s awfully sexy.

    • Walldo Keymaster
      July 16, 2008 at 6:57 pm #7405

      I’m a complete newbie when it comes to scripts and especially CMUD.

      When I went to paste this in, it told me

      [quote:26ivwcci]Error parsing command:
      Illegal token: {%W|%w %w})(%s)(%d)~%&lt;/pattern&gt;[/quote:26ivwcci]

    • Corey Participant
      July 16, 2008 at 7:46 pm #7406

      Quickly! Someone make this work for zmud too <!– s:) –><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!– s:) –>

    • seyalas Participant
      July 16, 2008 at 9:59 pm #7408

      I don’t know why that wouldn’t work… did you import it as XML or paste it into the command line? If it keeps being a problem, you could try pasting the below into the command line… I’m not so sure about how well it will work though. However, it might actually work for ZMUD too…

      [code:1fab05cb]
      #TRIG {({%w|%w %w})(%s)(%d)~%} {#SUB {&lt;color orange&gt;&lt;send ‘rese %1|enq %1’ ‘Research %1|Enqueue %1’&gt;%1&lt;/send&gt;%2%3~%&lt;/color&gt;}} {researchscript}
      #TRIG {You can’t learn about that in books&#46; Go find a teacher&#46;} {VAR newres %item(@reslist,1);#DELITEM reslist @newres;#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} {researchscript}
      #TRIG {You can’t learn any more about that from books!} {VAR newres %item(@reslist,1);#DELITEM reslist @newres;#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} {researchscript}
      #TRIG {You finish your studies and feel much more skilled&#46;} {rese @rese} {researchscript}
      #TRIG {You study for hours on end, but fail to gather any knowledge&#46;} {rese @rese} {researchscript}
      #ALIAS {rese} {research %-1;#VA rese %-1 {researchscript}} {researchscript}
      #ALIAS {enq} {#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;} {researchscript}
      [/code:1fab05cb]

    • Csilla Member
      July 17, 2008 at 4:59 am #7409

      Can someone tell me where exactly I would put this? I really want to use it but I am at a loss as to how and where exactly I put it in.

    • seyalas Participant
      July 17, 2008 at 7:24 am #7410

      Okay, here’s a quick tutorial for importing scripts in CMUD:

      [b:3heqasli]Option 1[/b:3heqasli] (prefered method):

      [list:3heqasli]
      [*:3heqasli]Copy the code from my first post, the one in XML formatting.[/*:m:3heqasli]
      [*:3heqasli]Paste it into notepad, or any other text editor (not Word).[/*:m:3heqasli]
      [*:3heqasli]Save the file as &quot;whatever&quot;.xml – if you use windows notepad, it may add a .txt extension after the .xml – remove that![/*:m:3heqasli]
      [*:3heqasli]In CMUD, open the package editor, eg. by pressing &quot;Triggers&quot;[/*:m:3heqasli]
      [*:3heqasli]From the File menu, choose &quot;Import XML&quot;, then locate the file you just saved.[/*:m:3heqasli]
      [*:3heqasli]Tadah![/*:m:3heqasli][/list:u:3heqasli]

      [b:3heqasli]Option 2[/b:3heqasli] (alternate method):

      [list:3heqasli]
      [*:3heqasli]Copy the code from the first post[/*:m:3heqasli]
      [*:3heqasli]Open your CMUD package editor, eg. by pressing &quot;Triggers&quot;[/*:m:3heqasli]
      [*:3heqasli]Create a new class (&quot;New&quot; &gt; &quot;New Class&quot;)[/*:m:3heqasli]
      [*:3heqasli]Underneath the Class-window there will be two tabs, one named &quot;Options&quot;, one named &quot;XML&quot;, click &quot;XML&quot;[/*:m:3heqasli]
      [*:3heqasli]Paste the code into the view above the tab[/*:m:3heqasli]
      [*:3heqasli]Save[/*:m:3heqasli]
      [*:3heqasli]…Tadah? I haven’t tested it, but it should work <!– s:P –><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!– s:P –>[/*:m:3heqasli][/list:u:3heqasli]

    • Inactive
      July 30, 2008 at 6:44 pm #7531

      Sort of like.. client-side MXP?

    • Gyndi Participant
      August 3, 2008 at 1:53 am #7563

      First off, I’m just gonna say this is pretty nifty, I downloaded the CMud trial so I could check it out. Good job on that. Nooow, on to the real dilemma, some of the skills (namely space combat 1 &amp; 2, install_camera, and emergency_refuel) can’t be researched this way. The space combats are completely blue and you can’t click on them, the install_camera only highlights the ‘camera’ part so when it goes to research it, it gives the ‘You aren’t ready to learn this skill yet’ message, and the emergency_refuel is the same as install_camera except instead of telling you that you aren’t ready to learn it yet, it tells you that it can’t find a skill in all the books or whatever.

      I just thought I’d put this out there in case you want to fix it or something. Researching four skills manually isn’t going to kill anyone though.

      Thanks for the awesome script <!– s:) –><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!– s:) –>

    • CruelAngel Member
      September 7, 2008 at 4:35 pm #7742

      Hrm, ZMUD one doesn’t seem to work. It’ll let you enqueue the skills, but after the first research it starts spitting out blanks after the research command.

    • Niath Member
      September 23, 2008 at 9:39 pm #7820

      Here’s the script I’ve made and use for zMUD 7.0.1:

      [code:2dfnq9vl]
      #ALIAS research {#if (%1) {#var research %1;#loop (%numparam( ) -1) {#var research %concat( @research, &quot; &quot;, %param( %i + 1))};#additem researchlist @research};#if (@researchlist) {~research %item( @researchlist, 1)};#noop}
      #ALIAS researchall {#var researchlist &quot;&quot;;#var resthreshold 0;#if (%isnumber(%1)) {#var resthreshold %1};#echo Starting scan!;#T+ resallscanner;practice}
      #TRIGGER {^You can’t learn about that in books&#46; Go find a teacher&#46;} {#delnitem researchlist 1;#if (@researchlist) {~research %item( @researchlist, 1)} {#echo Done researching!}}
      #TRIGGER {^You can’t learn any more about that from books!} {#delnitem researchlist 1;#if (@researchlist) {~research %item( @researchlist, 1)} {#echo Done researching!}}
      #TRIGGER {^You study for hours on end, but fail to gather any knowledge&#46;} {~research %item( @researchlist, 1)}
      #TRIGGER {^You finish your studies and feel much more skilled&#46;} {~research %item( @researchlist, 1)}
      #TRIGGER &quot;resallscanner&quot; {*} {#if ((%line =~ &quot;^(&amp;19)%s(%d)~% (&amp;19)%s(%d)~% (&amp;19)%s(%d)~%&quot;)|(%line =~ &quot;^(&amp;19)%s(%d)~% (&amp;19)%s(%d)~%&quot;)|(%line =~ &quot;^(&amp;19)%s(%d)~%&quot;)) {#gag;#if ((%number(%%2) &lt;= @resthreshold)AND(!%null(%%1))) {#additem researchlist &quot;%%1&quot;};#if ((%number(%%4) &lt;= @resthreshold)AND(!%null(%%3))) {#additem researchlist &quot;%%3&quot;};#if ((%number(%%6) &lt;= @resthreshold)AND(!%null(%%5))) {#additem researchlist &quot;%%5&quot;}} {#if (%line =~ &quot;^


      &quot;) {#gag} {#if (%line =~ &quot;^To see a shorter practice list&quot;) {#gag;#set resallscanner 2 1}}}} {looplines|param=99|notrig|disable}
      #COND {*} {#echo Scan incomplete after 99 lines! Bugging out!;#set resallscanner 2 1} {notrig|disable}
      #COND {*} {#echo Scan done! Researching now&#46;&#46;&#46;;#state resallscanner 0;#T- resallscanner;research} {manual|notrig|disable}
      #TRIGGER {^You can’t learn smuggling skills from a book!} {#delnitem researchlist 1;#if (@researchlist) {~research %item( @researchlist, 1)} {#echo Done researching!}} [/code:2dfnq9vl]

      You can use &quot;researchall&quot; to research anything that is below the threshold (check the researchall alias where it says #var resthreshold 0; and change 0 to suit your needs).
      You can also use &quot;research whatever&quot; to add whatever to the research list.
      &quot;research&quot; with no arguments resumes researching from the list (if you interrupt for any reason).

      Known bug: The regex on the skill scanner does not recognise the line containing &quot;advanced electronics&quot;. Too lazy to look into it right now as it’s been some time (2+ years) since I wrote this.

      I’m eager to copy seyalas’s idea of adding to the queue by clicking on the skill list but only if more people are interested (I’m satisfied with my own simpler version – I’m a commandline kind of guy).

      Let me know if it works for you.

    • Avanga Member
      September 29, 2008 at 1:37 am #7852

      I’m on 7.04 and that script didn’t work for me… but then, I’m retarded.

    • Niath Member
      September 29, 2008 at 5:33 pm #7855

      If you could explain what went wrong and it didn’t work I could fix it for you.

      It is now tested/working on zMUD 7.21 (althouth some stuff can be simplified code-wise in that version)

    • Avanga Member
      September 29, 2008 at 10:23 pm #7856

      I’d like to explain but I donno. o.o;;

      I’d hit research and it wouldn’t do anything. A lot of the triggers/aliases had errors in them. o.O

    • Niath Member
      October 6, 2008 at 2:41 pm #7885

      [code:xjb7skjo]#CLASS {LOTJ Research}
      #ALIAS researchall {#var researchlist &quot;&quot; 0 &quot;LOTJ Research&quot;;#var resthreshold 0 0 &quot;LOTJ Research&quot;;#if (%isnumber(%1)) {#var resthreshold %1 0 &quot;LOTJ Research&quot;};#echo Starting scan!;#T+ researchscan1;#T+ researchscan2;#T+ researchscan3;practice}
      #ALIAS research {#if (%1) {#var research %1 0 &quot;LOTJ Research&quot;;#loop (%numparam( ) -1) {#var research %concat( @research, &quot; &quot;, %param( %i + 1))};#additem researchlist @research};#if (@researchlist) {~research %item( @researchlist, 1)};#noop}
      #VAR researchlist {0} {0}
      #VAR resthreshold {0} {0}
      #VAR research {0} {0}
      #TRIGGER &quot;resallscanner&quot; {*} {#if (%line =~ &quot;^s*(w+&#91;s-&#93;?w+s?d?)(s+d{1,3})%(s+(w+&#91;s-&#93;?w+s?d?)s+(d{1,3})%)?(s+(w+&#91;s-&#93;?w+s?d?)s+(d{1,3})%)?s*$&quot;) {#gag;#if ((%number(%%2) &lt;= @resthreshold)AND(!%null(%%1))) {#additem researchlist &quot;%%1&quot;};#if ((%number(%%5) &lt;= @resthreshold)AND(!%null(%%4))) {#additem researchlist &quot;%%3&quot;};#if ((%number(%%8) &lt;= @resthreshold)AND(!%null(%%7))) {#additem researchlist &quot;%%5&quot;}} {#if (%line =~ &quot;^


      &quot;) {#gag} {#if (%line =~ &quot;^To see a shorter practice list&quot;) {#gag;#set resallscanner 2 1}}}} &quot;&quot; {looplines|param=99|notrig|disable}
      #COND {*} {#echo Scan incomplete after 99 lines! Bugging out!;#set resallscanner 2 1} {notrig|disable}
      #COND {*} {#echo Scan done! Researching now&#46;&#46;&#46;;#state resallscanner 0;#T- resallscanner;research} {manual|notrig|disable}
      #TRIGGER {^You search and search but cant find that information&#46;} {#delnitem researchlist 1;#if (@researchlist) {~research %item(@researchlist, 1)} {#echo Research done!}}
      #TRIGGER &quot;researchscan3&quot; {To see a shorter practice list, type PRACTICE &lt;class name&gt;&#46;} {#gag;#echo Scan done! Researching now&#46;&#46;&#46;;#T- researchscan1;#T- researchscan2;#T- researchscan3;research} &quot;&quot; {disable}
      #TRIGGER {^You can’t learn about that in books&#46; Go find a teacher&#46;} {#delnitem researchlist 1;#if (@researchlist) {~research %item(@researchlist, 1)} {#echo Research done!}}
      #TRIGGER {^You can’t learn any more about that from books!} {#delnitem researchlist 1;#if (@researchlist) {~research %item( @researchlist,1)} {#echo Research done!}}
      #TRIGGER {^You study for hours on end, but fail to gather any knowledge&#46;} {~research %item( @researchlist, 1)}
      #TRIGGER {^You finish your studies and feel much more skilled&#46;} {~research %item( @researchlist, 1)}
      #TRIGGER {^You can’t learn smuggling skills from a book!} {#delnitem researchlist 1;#if (@researchlist) {~research %item( @researchlist,1)} {#echo Research done!}}
      #REGEX &quot;researchscan1&quot; {^s*(w+&#91;s-&#93;?w+(sd)?)(s+d{1,3})%(s+(w+&#91;s-&#93;?w+(sd)?)s+(d{1,3})%)?(s+(w+&#91;s-&#93;?w+(sd)?)s+(d{1,3})%)?s*$} { #gag;#if ((%number(%3) &lt;= @resthreshold)AND(!%null(%1))) {#additem researchlist &quot;%1&quot;};#if ((%number(75) &lt;= @resthreshold)AND(!%null(%5))) {#additem researchlist &quot;%5&quot;};#if ((%number(%11) &lt;= @resthreshold)AND(!%null(%9))) {#additem researchlist &quot;%9&quot;}} &quot;&quot; {notrig|disable}
      #TRIGGER &quot;researchscan2&quot; {^


      } {#gag} &quot;&quot; {notrig|disable}
      #CLASS 0[/code:xjb7skjo]

      Updated. Various issues fixed (including but not limited to the aforementioned one about advanced electronics).
      Tested on a clean zMUD 7.21

      The alias to research everything up to 90% is researchall 90

      Hope it works for everyone this time.

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