Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1" ?>
- <cmud>
- <class name="ResearchPlugin">
- <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>researchscript</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>#ADDITEM reslist %-1
- #PRINT {%-1 added to research list.}
- #PRINT {Current research list: @reslist}</value>
- </alias>
- <trigger priority="470">
- <pattern>^You can't learn about that in books. Go find a teacher.</pattern>
- <value>#VAR newres %item(@reslist,1)
- #DELITEM reslist @newres
- #IF %if(@newres =~ %x, 1, 0)
- {#PRINT Now researching: @newres
- #PRINT Remaining research: @reslist
- 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>#VAR newres %item(@reslist,1)
- #DELITEM reslist @newres
- #IF %if(@newres =~ %x, 1, 0)
- {#PRINT Now researching: @newres
- #PRINT Remaining research: @reslist
- rese @newres}</value>
- <notes>used in continuing research</notes>
- </trigger>
- <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>#VAR newres %item(@reslist,1)
- #DELITEM reslist @newres
- #IF %if(@newres =~ %x, 1, 0)
- {#PRINT Now researching: @newres
- #PRINT Remaining research: @reslist
- 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>#VAR newres %item(@reslist,1)
- #DELITEM reslist @newres
- #IF %if(@newres =~ %x, 1, 0)
- {#PRINT Now researching: @newres
- #PRINT Remaining research: @reslist
- rese @newres}</value>
- <notes>used in continuing research</notes>
- </trigger>
- <var name="reslist" type="StringList">
- <json>[]</json>
- </var>
- <trigger priority="620">
- <pattern>Go learn it the hard way, sissy.</pattern>
- <value>#VAR newres %item(@reslist,1)
- #DELITEM reslist @newres
- #IF %if(@newres =~ %x, 1, 0)
- {#PRINT Now researching: @newres
- #PRINT Remaining research: @reslist
- rese @newres}</value>
- <notes>used in continuing research</notes>
- </trigger>
- <trigger priority="19840">
- <pattern>^You can't learn more about that from books.</pattern>
- <value>#VAR newres %item(@reslist,1)
- #DELITEM reslist @newres
- #IF %if(@newres =~ %x, 1, 0)
- {#PRINT Now researching: @newres
- #PRINT Remaining research: @reslist
- rese @newres}</value>
- </trigger>
- </class>
- </cmud>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement