Advertisement
Xerakon

LotJ Research Plugin

Aug 29th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. <?xml version="1.0" encoding="ISO-8859-1" ?>
  2. <cmud>
  3. <class name="ResearchPlugin">
  4. <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>
  5. <alias name="rese">
  6. <value>research %-1
  7. #VA rese %-1 {researchscript}</value>
  8. </alias>
  9. <var name="rese" usedef="true">
  10. <value>researchscript</value>
  11. <default>researchscript</default>
  12. </var>
  13. <trigger priority="400">
  14. <pattern>^You study for hours on end, but fail to gather any knowledge.</pattern>
  15. <value>rese @rese</value>
  16. <notes>used in continuing research</notes>
  17. </trigger>
  18. <trigger priority="410">
  19. <pattern>^You finish your studies and feel much more skilled.</pattern>
  20. <value>rese @rese</value>
  21. <notes>used in continuing research</notes>
  22. </trigger>
  23. <alias name="enq">
  24. <value>#ADDITEM reslist %-1
  25. #PRINT {%-1 added to research list.}
  26. #PRINT {Current research list: @reslist}</value>
  27. </alias>
  28. <trigger priority="470">
  29. <pattern>^You can't learn about that in books. Go find a teacher.</pattern>
  30. <value>#VAR newres %item(@reslist,1)
  31. #DELITEM reslist @newres
  32. #IF %if(@newres =~ %x, 1, 0)
  33. {#PRINT Now researching: @newres
  34. #PRINT Remaining research: @reslist
  35. rese @newres}</value>
  36. <notes>trigger used in continuing research</notes>
  37. </trigger>
  38. <trigger priority="490">
  39. <pattern>^You can't learn any more about that from books!</pattern>
  40. <value>#VAR newres %item(@reslist,1)
  41. #DELITEM reslist @newres
  42. #IF %if(@newres =~ %x, 1, 0)
  43. {#PRINT Now researching: @newres
  44. #PRINT Remaining research: @reslist
  45. rese @newres}</value>
  46. <notes>used in continuing research</notes>
  47. </trigger>
  48. <var name="newres"/>
  49. <class name="linker" enabled="false">
  50. <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>
  51. <trigger priority="340" trigontrig="false" repeat="true">
  52. <pattern>({%w|%w %w|%w%s%w%s%d|%w-%w|%w_%w})(%s)(%d)~%</pattern>
  53. <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>
  54. </trigger>
  55. </class>
  56. <trigger priority="520">
  57. <pattern>^------------------------------------Skills ------------------------------------</pattern>
  58. <value>#T+ linker
  59. #SUB {------------------------------------Skills ------------------------------------}</value>
  60. <notes>used for formatting and to trigger the linker</notes>
  61. </trigger>
  62. <trigger priority="530">
  63. <pattern>^To see a shorter practice list, type PRACTICE &lt;class name&gt;.</pattern>
  64. <value>#T- linker</value>
  65. <notes>used to disable the linker</notes>
  66. </trigger>
  67. <trigger priority="550">
  68. <pattern>^---------------------------------Weapons-----------------------------------</pattern>
  69. <value>#SUB {---------------------------------Weapons------------------------------------------}</value>
  70. <notes>used for formatting</notes>
  71. </trigger>
  72. <trigger priority="560">
  73. <pattern>^---------------------------------Feats-----------------------------------</pattern>
  74. <value>#SUB {---------------------------------Feats--------------------------------------------}</value>
  75. <notes>Used for formatting</notes>
  76. </trigger>
  77. <trigger priority="620">
  78. <pattern>^You can't learn bounty hunting skills from a book!</pattern>
  79. <value>#VAR newres %item(@reslist,1)
  80. #DELITEM reslist @newres
  81. #IF %if(@newres =~ %x, 1, 0)
  82. {#PRINT Now researching: @newres
  83. #PRINT Remaining research: @reslist
  84. rese @newres}</value>
  85. <notes>used in continuing research</notes>
  86. </trigger>
  87. <trigger priority="630">
  88. <pattern>^You can't learn smuggling skills from a book!</pattern>
  89. <value>#VAR newres %item(@reslist,1)
  90. #DELITEM reslist @newres
  91. #IF %if(@newres =~ %x, 1, 0)
  92. {#PRINT Now researching: @newres
  93. #PRINT Remaining research: @reslist
  94. rese @newres}</value>
  95. <notes>used in continuing research</notes>
  96. </trigger>
  97. <var name="reslist" type="StringList">
  98. <json>[]</json>
  99. </var>
  100. <trigger priority="620">
  101. <pattern>Go learn it the hard way, sissy.</pattern>
  102. <value>#VAR newres %item(@reslist,1)
  103. #DELITEM reslist @newres
  104. #IF %if(@newres =~ %x, 1, 0)
  105. {#PRINT Now researching: @newres
  106. #PRINT Remaining research: @reslist
  107. rese @newres}</value>
  108. <notes>used in continuing research</notes>
  109. </trigger>
  110. <trigger priority="19840">
  111. <pattern>^You can't learn more about that from books.</pattern>
  112. <value>#VAR newres %item(@reslist,1)
  113. #DELITEM reslist @newres
  114. #IF %if(@newres =~ %x, 1, 0)
  115. {#PRINT Now researching: @newres
  116. #PRINT Remaining research: @reslist
  117. rese @newres}</value>
  118. </trigger>
  119. </class>
  120. </cmud>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement