Advertisement
Guest User

AffectsListChecker.xml

a guest
Dec 4th, 2011
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.36 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on maanantai, joulukuu 05, 2011, 1:38  -->
  4. <!-- MuClient version 4.73 -->
  5.  
  6. <!-- Plugin "AffectListChecker" generated by Plugin Wizard -->
  7.  
  8. <muclient>
  9. <plugin
  10.   name="AffectListChecker"
  11.   author="Mort"
  12.   id="8bd1cd60c95b2482fb0a502b"
  13.   language="VBscript"
  14.   purpose="Checks your affect list and notifies of missing ones"
  15.   save_state="y"
  16.   date_written="2011-12-05 01:34:22"
  17.   requires="4.73"
  18.   version="1.0"
  19.   >
  20. <description trim="y">
  21. <![CDATA[
  22. Use the following commands:
  23. affs add <name of affect>
  24. affs del <name of affect>
  25.  
  26. When you use the affects command, the list gets checked if everything on your own list shows up in it. What doesn't show is announced after the affect list.
  27.  
  28. Plugin uses VBscript as its language.
  29. ]]>
  30. </description>
  31.  
  32. </plugin>
  33.  
  34.  
  35. <!--  Get our standard constants -->
  36.  
  37. <include name="constants.vbs"/>
  38.  
  39. <!--  Triggers  -->
  40.  
  41. <triggers>
  42.   <trigger
  43.   match="^\r?\n?$"
  44.   name="affectsEnd"
  45.   regexp="y"
  46.   send_to="12"
  47.   sequence="1"
  48.  >
  49.   <send>world.enabletrigger "affectsEnd", 0
  50. world.enabletrigger "affectChecker", 0
  51. dim want, got, i, miss
  52. got = split(world.getvariable("affects"), ";")
  53. want = world.getvariable("wantedAffects")
  54. for i = 0 to ubound(got)
  55. want = replace(want, ";"&amp;got(i)&amp;";", ";")
  56. next
  57. if len(want) &gt; 1 then
  58. want = left(want, len(want)-1)
  59. want = right(want, len(want)-1)
  60. miss = split(want, ";")
  61. world.ansinote ansi(33) &amp; ansi(1) &amp; "Missing affects: " &amp; ansi(31) &amp; join(miss, ", ")
  62. world.note ""
  63. end if</send>
  64.   </trigger>
  65.   <trigger
  66.   keep_evaluating="y"
  67.   match="^.*'(.*)'.*$"
  68.   name="affectChecker"
  69.   regexp="y"
  70.   send_to="12"
  71.   sequence="1"
  72.  >
  73.   <send>world.setvariable "affects", world.getvariable("affects") &amp; "%1;"
  74. </send>
  75.   </trigger>
  76.   <trigger
  77.   enabled="y"
  78.   match="You are affected by:"
  79.   name="affectsStart"
  80.   regexp="y"
  81.   send_to="12"
  82.   sequence="1"
  83.  >
  84.   <send>world.setvariable "affects", ";"
  85. world.enabletrigger "affectChecker", 1
  86. world.enabletrigger "affectsEnd", 1
  87. </send>
  88.   </trigger>
  89. </triggers>
  90.  
  91. <!--  Aliases  -->
  92.  
  93. <aliases>
  94.   <alias
  95.   match="affs add *"
  96.   enabled="y"
  97.   send_to="12"
  98.   sequence="100"
  99.  >
  100.   <send>dim v
  101. v = world.getvariable("wantedAffects")
  102. if instr(1, v, ";%1;") = 0 then
  103. v = v &amp; "%1;"
  104. world.note "Ok, added '%1' to affect check list"
  105. world.setvariable "wantedAffects", v
  106. else
  107. world.note "'%1' already exists or something else went wrong"
  108. end if
  109. </send>
  110.   </alias>
  111.   <alias
  112.   match="affs del *"
  113.   enabled="y"
  114.   send_to="12"
  115.   sequence="100"
  116.  >
  117.   <send>dim v
  118. v = world.getvariable("wantedAffects")
  119. if instr(1, v, ";%1;") = 0 then
  120. world.note "'%1' not found in affect check list"
  121. else
  122. v = replace(v, ";%1;", ";")
  123. world.note "Ok, deleted '%1' from affect check list"
  124. world.setvariable "wantedAffects", v
  125. end if
  126. </send>
  127.   </alias>
  128. </aliases>
  129.  
  130. <!--  Variables  -->
  131.  
  132. <variables>
  133.   <variable name="affects">;</variable>
  134.   <variable name="wantedAffects">;</variable>
  135. </variables>
  136.  
  137. <!--  Plugin help  -->
  138.  
  139. <aliases>
  140.   <alias
  141.   script="OnHelp"
  142.   match="AffectListChecker:help"
  143.   enabled="y"
  144.  >
  145.   </alias>
  146. </aliases>
  147.  
  148. <script>
  149. <![CDATA[
  150. Sub OnHelp (sName, sLine, wildcards)
  151.  world.Note world.GetPluginInfo (world.GetPluginID, 3)
  152. End Sub
  153. ]]>
  154. </script>
  155.  
  156. </muclient>
  157.  
  158.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement