-
-
October 8, 2009 at 3:41 am #1234
This one, Autoresearch, Xavier gave me. Used it to replace my crappy one <!– s:P –><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!– s:P –>
[code:q7wrgu0s]<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!– Saved on Wednesday, April 29, 2009, 3:58 PM –>
<!– MuClient version 4.27 –><!– Plugin "Autoresearch" generated by Plugin Wizard –>
<muclient>
<plugin
name="Autoresearch"
author="Rein"
id="0c3d8ccb4d6097c74ba138ce"
language="VBscript"
save_state="y"
date_written="2009-04-29 15:57:09"
requires="4.27"
version="1.0"
></plugin>
<!– Get our standard constants –>
<include name="constants.vbs"/>
<!– Aliases –>
<aliases>
<alias
script="onResearch"
match="research *"
enabled="y"
sequence="100"
>
<send>research %1</send>
</alias>
</aliases><!– Timers –>
<timers>
<timer enabled="y" minute="3" second="0.00" offset_second="0.00" >
<send>save</send></timer>
</timers><!– Script –>
<script>
<![CDATA[
sub onResearch(name, line, wildcards)
dim nextResearch
nextResearch = wildcards(1)
world.DeleteTrigger "researchYes"
world.DeleteTrigger "researchNo"
world.AddTrigger "researchYes", "You finish your studies and feel much more skilled.", "research " & nextResearch, 1, 14, 0, "", ""
world.AddTrigger "researchNo", "You study for hours on end, but fail to gather any knowledge.", "research " & nextResearch, 1, 14, 0, "", ""
end sub]]>
</script></muclient>
[/code:q7wrgu0s]
-
October 8, 2009 at 4:51 am #11757
Just copy+paste that that into notepad, save it as autoresearch.xml. In MUSHClient, File->Plugins->Add, browse to the file, select it, and you’re good to go..
-
October 8, 2009 at 9:33 am #11762
I was so excited and about to post "Finally, at last!" and everything, but I need to upgrade my MUSH from 3.65 to 4.37 or higher first. <!– s:P –><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!– s:P –>
-
October 10, 2009 at 9:13 pm #11844
Alright, boys and girls with MUSHClient, I’ve taken the CMUD research script and converted it to Lua script, then used it as a base for a MUSHClient version. This is how it looks:
[img:173tcsmt]http://img176.imageshack.us/img176/6704/mushresearch.th.jpg[/img:173tcsmt][/url:173tcsmt]It doesn’t create a link/menu like the CMUD script does, but it does have the functionality. You can enqueue as many skills as you like, and research them, using the ‘enq <skillname>’ command. To start researching just type ‘rese’ or ‘research’. You can of course still research via ‘rese <skillname>’ or ‘research <skillname>’, however, it will continue researching that skill until it’s done or you interrupt it, and if you have more in your queue, it will keep researching those as well.
You can list the skills in your que with ‘listrq’, and you can remove them with ‘runq <skillname>’ if for some reason you don’t want a skill in your queue.
*edited to clear up install procedure
Step by step install:
Step 1: Make sure you have MUSHClient Version 4.40+ do this in MUSHClient by going to help–>about mushclient
Step 2: Open notepad
Step 3: Copy+Paste the script into notepad
Step 4: Select File–>Save as
Step 5: Enter a name such as "RScript.xml"
Step 6: In the "Filetype" dropdown box select "All types" [u:173tcsmt][i:173tcsmt]important[/i:173tcsmt][/u:173tcsmt] save the file, making sure to note where you saved it, I suggest the Desktop or My Documents
Step 7: In mushclient, go to file–>plugins Click the "add" button
Step 8: Make sure the file type it’s looking for is XML or "all types"
Step 9: In the "look in" dropdown box select the folder you saved it in
Step 10: Select the file you saved and click "open"
Step 11: Ensure you enable it, just look at the File–>Plugins menu it has an "enabled" field you may have to scroll to the right to see it, if it’s not enabled automatically, click it in the list and click the "Enable" button
Step 12: Research Away
Step 13: ProfitLet me know of any problems, it’s my first attempt at a MUSHClient plugin and first time using Lua script as well
[code:173tcsmt]<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!– Saved on Saturday, October 10, 2009, 1:30 PM –>
<!– MuClient version 4.40 –><!– Plugin "LotJResearchPlugin" generated by Plugin Wizard –>
<muclient>
<plugin
name="LotJResearchPlugin"
author="@zareth"
id="e1c7beb0cc624e2a68010fda"
language="Lua"
purpose="To ease the burden of skill research"
save_state="y"
date_written="2009-10-10 13:22:14"
requires="4.40"
version="1.0"
>
<description trim="y">
<![CDATA[
Plugin colors the practice list based on skill percentage.
You may use ‘enque <skillname>’ or ‘enq <skillname>’ to queue skills for the plugin to research.
Use ‘listrq’ to list the current skill queue.
‘runq <skillname>’ to remove a skill from the queue
use ‘rese’ or ‘research’ to start research, or ‘rese <skillname>’ or ‘research <skillname>’
the rest is all done by the plugin, *however* I wouldn’t just queue up a bunch of skills and leave the computer, for three reasons
1) it’s against the rules
2) someone could get annoyed that you are ignoring them ICly and perm you(they would PROBABLY need more to keep you from getting a restore..but better safe than sorry yes?)
3) In the unlikely event the plugin malfunctions, you wont be around to notice.
]]>
</description></plugin>
<!– Get our standard constants –>
<include name="constants.lua"/>
<!– Triggers –>
<triggers>
<trigger
enabled="y"
group="Research Script"
match="^To see a shorter practice list, type PRACTICE."
regexp="y"
send_to="12"
sequence="100"
>
<send>EnableTriggerGroup("ResearchLinkers", false)</send>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You can’t learn any more about that from books!$"
regexp="y"
script="NextResearch"
send_to="10"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You can’t learn bounty hunting skills from a book!$"
regexp="y"
script="NextResearch"
send_to="10"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You can’t learn smuggling skills from a book!$"
regexp="y"
script="NextResearch"
send_to="10"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You can’t learn about that in books. Go find a teacher.$"
regexp="y"
script="NextResearch"
send_to="10"
sequence="100"
>
</trigger>
<trigger
group="ResearchLinkers"
match="([A-Za-z0-9-_s]+)(s)(d+)%"
name="LRL1"
omit_from_output="y"
regexp="y"
script="Linker"
send_to="10"
sequence="102"
>
</trigger>
<trigger
group="ResearchLinkers"
match="([A-Za-z0-9-_s]+)(s)(d+)%[s*t*]([A-Za-z0-9-_s]+)(s)(d+)%"
name="LRL2"
omit_from_output="y"
regexp="y"
script="Linker"
send_to="10"
sequence="101"
>
</trigger>
<trigger
group="ResearchLinkers"
lines_to_match="1"
match="([A-Za-z0-9-_s]+)(s)(d+)%[s*t*]([A-Za-z0-9-_s]+)(s)(d+)%([A-Za-z0-9-_s]+)(s)(d+)%"
name="LRL3"
omit_from_output="y"
regexp="y"
script="Linker"
send_to="10"
sequence="100"
>
</trigger>
<trigger
enabled="y"
expand_variables="y"
group="ResearchScript"
match="^
Skills
"
regexp="y"
send_to="12"
sequence="100"
>
<send>EnableTriggerGroup("ResearchLinkers", true)</send>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You search and search but cant find that information."
regexp="y"
script="NextResearch"
send_to="10"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You finish your studies and feel much more skilled.$"
regexp="y"
script="ContResearch"
send_to="10"
sequence="100"
>
</trigger>
<trigger
enabled="y"
group="ResearchScript"
match="^You study for hours on end, but fail to gather any knowledge.$"
regexp="y"
script="ContResearch"
send_to="10"
sequence="100"
>
</trigger>
</triggers><!– Aliases –>
<aliases>
<alias
script="Enque"
match="enq *"
enabled="y"
group="ResearchScript"
send_to="10"
sequence="100"
>
</alias>
<alias
script="Runq"
match="runq *"
enabled="y"
group="ResearchScript"
send_to="10"
sequence="100"
>
</alias>
<alias
script="Enque"
match="enque *"
enabled="y"
group="ResearchScript"
send_to="10"
sequence="100"
>
</alias>
<alias
script="Listrq"
match="listrq"
enabled="y"
group="ResearchScript"
send_to="10"
sequence="100"
>
</alias>
<alias
script="Research"
match="research"
enabled="y"
group="ResearchScript"
sequence="100"
>
</alias>
<alias
script="Research"
match="rese *"
enabled="y"
group="ResearchScript"
send_to="10"
sequence="101"
>
</alias>
<alias
script="Research"
match="rese"
enabled="y"
group="ResarchScript"
sequence="100"
>
</alias>
<alias
script="Research"
match="research *"
enabled="y"
group="ResearchScript"
send_to="10"
sequence="101"
>
</alias>
</aliases><!– Variables –>
<variables>
<variable name="spacing"> </variable>
<variable name="percentage">80</variable>
<variable name="skillName">s</variable>
</variables><!– Script –>
<script>
<![CDATA[–necessary variables
researchQue = {} –Que list
currentResearch = "" –Do I really need to explain more?–function to add skill to que list
function Enque(name, line, wildcards)
t = #researchQue —find the size of the researchQue
if (t == 0) then
table.insert(researchQue, 1, wildcards[1]) –make first entry
else
table.insert(researchQue, wildcards[1]) — make subsequent entries
end –if
ColourNote("lime","", wildcards[1].." queued for research.")
end–function to remove skill from que list
function Runq(name, line, wildcards)
t =#researchQue — size of the que
for i,v in ipairs(researchQue) do –loop through the que
if (v == wildcards[1]) then –if current item matches, remove it from the list
table.remove(researchQue, i)
ColourNote("red","", "Skill "..wildcards[1].." removed from que.")
break
else
if (i == t) then — if looped all the way through the que and skill not found...
ColourNote("red","","Skill not found in research que.")
end
end — if
end –for
end–function to report que list contents
function Listrq(name, line, wildcards)
t = #researchQue –size of the que
local count = 1 — loop counter
ColourTell("orange","","Current Research Que: ")
while count <= t do
if (count ~= t) then –if count isn’t equal to the last item do this
ColourTell("cyan","",tostring(researchQue[count]).."|")
count = count+1
else — if it is do this
ColourTell("cyan","",tostring(researchQue[count]))
count = count+1
end–if
end–while
Note("") — sends a newline
end –function–function to begin research
function Research(name, line, wildcards)
if (wildcards[1] == nil) or (wildcards[1] == "") then –if no skill entered, call ContResearch function
ContResearch()
else — if a skill was entered, start researching it
currentResearch = wildcards[1]
Send("research "..currentResearch)
end –if
end –function–function to continue research
function ContResearch(name, line, wildcards)
if (currentResearch == nil) or (currentResearch == "") then –if current research variable is empty, call NextResearch function
NextResearch()
else — if it isn’t empty, research the skill it contains
Send("research "..currentResearch)
end –if
endfunction NextResearch(name, line, wildcards)
currentResearch = table.remove(researchQue, 1) –get next skill from que and set it as current research
if (currentResearch == nil) then –if current research is still empty then report research as completed
ColourNote("lime","", "Research Complete!")
else — if it’s not, then research the skill in it
Send("research "..currentResearch)
end –if
end–function to color skill list based on percentage, there may be a better way to do this, but I couldn’t make a repeat-on-same-line trigger work properly
function Linker(name, line, wildcards)
— first skill variables
skillName = wildcards[1]
spacing = wildcards[2]
percentage = wildcards[3]
skillName2 = wildcards[4]
— second skill variables, if applicable
spacing2 = wildcards[5]
percentage2 =wildcards[6]
–third skill variables, if applicable
skillName3 =wildcards[7]
spacing3 =wildcards[8]
percentage3 =wildcards[9]if (tonumber(percentage) == 0) then –color first skill based on percentage, 0 = red, 1-89 = orange, 90-100 = lime
ColourTell("red","", skillName..spacing..percentage.."%")
elseif (tonumber(percentage) > 0) and (tonumber(percentage) < 90) then
ColourTell("orange","", skillName..spacing..percentage.."%")
else
ColourTell("lime","", skillName..spacing..percentage.."%")
end –ifif (GetTriggerInfo(name, 31) < 6) then –if line doesn’t have second skill entry, do nothing
else — if it does, color the skill.
if (tonumber(percentage2) == 0) then
ColourTell("red","", skillName2..spacing2..percentage2.."%")
elseif (tonumber(percentage2) > 0) and (tonumber(percentage2) < 90) then
ColourTell("orange","", skillName2..spacing2..percentage2.."%")
else
ColourTell("lime","", skillName2..spacing2..percentage2.."%")
end –if
end –ifif (GetTriggerInfo(name, 31) < 9) then –if line doesn’t have third entry, do nothing
else –if it does, color the skill.
if (tonumber(percentage3) == 0) then
ColourTell("red","", skillName3..spacing3..percentage3.."%")
elseif (tonumber(percentage3) > 0) and (tonumber(percentage3) < 90) then
ColourTell("orange","", skillName3..spacing3..percentage3.."%")
else
ColourTell("lime","", skillName3..spacing3..percentage3.."%")
end –if
end –if
end
]]>
</script><!– Plugin help –>
<aliases>
<alias
script="OnHelp"
match="LotJResearchPlugin:help"
enabled="y"
>
</alias>
</aliases><script>
<![CDATA[
function OnHelp ()
world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
end
]]>
</script></muclient>
[/code:173tcsmt]
-
October 11, 2009 at 2:56 am #11849
Ok, I tried adding this on MUSHclient, but I know nothing about script’s, can someone take me through on how to add it please?
-
October 11, 2009 at 4:02 am #11851
The same method I described. Save it as a .xml file and use the plugin menu to open it. Ensure you highlight it and select ‘enable’ or it won’t be enabled <!– s:P –><img src="{SMILIES_PATH}/icon_razz.gif" alt="" title="Razz" /><!– s:P –>
-
October 11, 2009 at 4:05 am #11852
I tried that, but where I save it to I can’t find it for some reason, I even saved it to my desktop and it’s there but can’t find it when I try to load it up through there.
-
October 11, 2009 at 5:35 am #11853
You did save it as .xml right?
Make sure in the drop-down box you have ‘xml’ selected when you’re trying to load it in the plugin screen.
-
October 11, 2009 at 5:58 am #11854
You mean in the script language pull down right? There is no xml in there and in the scripts there is no other pull down menu.
-
October 11, 2009 at 6:48 pm #11862
Guess I wasn’t clear enough. My bad, my bad.
Step by step version:
Step 1: Make sure you have MUSHClient Version 4.40+ do this in MUSHClient by going to help–>about mushclient
Step 2: Open notepad
Step 3: Copy+Paste the script into notepad
Step 4: Select File–>Save as
Step 5: Enter a name such as "RScript.xml"
Step 6: In the "Filetype" dropdown box select "All types" [u:3i1cmqjh][i:3i1cmqjh]important[/i:3i1cmqjh][/u:3i1cmqjh]
Step 7: In mushclient, go to file–>plugins Click the "add" button
Step 8: Make sure the file type it’s looking for is XML or "all types"
Step 9: In the "look in" dropdown box select the folder you saved it in(My suggestion is to save to desktop)
Step 10: Select the file you saved and click "open"
Step 11: Ensure you enable it, just look at the File–>Plugins menu it has an "enabled" field you may have to scroll to the right to see it
Step 12: Research Away
Step 13: ProfitIf it isn’t working let me know, it my first time trying to make a MUSHClient plugin as well as my first time with Lua script. I may have made some errors somewhere, but the script DOES work on my test MUSHClient.
-
October 12, 2009 at 12:20 am #11891
Okay. Turns out there was a problem with the XML in the code window. Not sure if it was IE or what but there were some extra hyphens and breaks in it. It has been fixed in the post above. please report any other problems with it.
-Thanks to anastasius for helping to find and fix this one!
-
October 12, 2009 at 12:38 am #11894
Ok you lucky people, I worked with Zareth and we managed to get it going, there where some odd word wraps or something. It fully works now.
-
This topic has 37 replies, 18 voices, and was last updated 12 years, 5 months ago by .
You must be logged in to reply to this topic.