Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.94 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE MudletPackage>
  3. <MudletPackage version="1.001">
  4. <TriggerPackage>
  5. <TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  6. <name>Rift-replacement</name>
  7. <script></script>
  8. <triggerType>0</triggerType>
  9. <conditonLineDelta>0</conditonLineDelta>
  10. <mStayOpen>0</mStayOpen>
  11. <mCommand></mCommand>
  12. <packageName></packageName>
  13. <mFgColor>#ff0000</mFgColor>
  14. <mBgColor>#ffff00</mBgColor>
  15. <mSoundFile></mSoundFile>
  16. <colorTriggerFgColor>#000000</colorTriggerFgColor>
  17. <colorTriggerBgColor>#000000</colorTriggerBgColor>
  18. <regexCodeList />
  19. <regexCodePropertyList />
  20. <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="yes" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  21. <name>Rift start</name>
  22. <script>enableTrigger("Rift-capture")
  23. enableTrigger("Rift-herbs/mineral")
  24. enableTrigger("Rift-stop")
  25. riftcuratives = {
  26. { herb = "ash", mineral = "stannum", h_amount = 0, m_amount = 0 },
  27. { herb = "bellwort", mineral = "cuprum", h_amount = 0, m_amount = 0 },
  28. { herb = "bloodroot", mineral = "magnesium", h_amount = 0, m_amount = 0 },
  29. { herb = "elm", mineral = "cinnabar", h_amount = 0, m_amount = 0 },
  30. { herb = "ginger", mineral = "antimony", h_amount = 0, m_amount = 0 },
  31. { herb = "ginseng", mineral = "ferrum", h_amount = 0, m_amount = 0 },
  32. { herb = "goldenseal", mineral = "plumbum", h_amount = 0, m_amount = 0 },
  33. { herb = "kelp", mineral = "aurum", h_amount = 0, m_amount = 0 },
  34. { herb = "pear", mineral = "calcite", h_amount = 0, m_amount = 0 },
  35. { herb = "valerian", mineral = "realgar", h_amount = 0, m_amount = 0 },
  36. { herb = "lobelia", mineral = "argentum", h_amount = 0, m_amount = 0 },
  37. { herb = "skullcap", mineral = "azurite", h_amount = 0, m_amount = 0 }, -- blindness
  38. { herb = "bayberry", mineral = "arsenic", h_amount = 0, m_amount = 0 }, -- blindness
  39. { herb = "cohosh", mineral = "gypsum", h_amount = 0, m_amount = 0 }, -- insomnia
  40. { herb = "hawthorn", mineral = "calamine", h_amount = 0, m_amount = 0 }, -- deafness
  41. { herb = "kola", mineral = "quartz", h_amount = 0, m_amount = 0 }, -- kola
  42. { herb = "myrrh", mineral = "bisemutum", h_amount = 0, m_amount = 0 }, -- scholasticism
  43. { herb = "echinacea", mineral = "dolomite", h_amount = 0, m_amount = 0 }, -- thirdeye
  44. { herb = "skullcap", mineral = "malachite", h_amount = 0, m_amount = 0 }, -- rebounding
  45. { herb = "sileris", mineral = "quicksilver",h_amount = 0, m_amount = 0 }, -- fangbarrier
  46. { herb = "moss", mineral = "potash", h_amount = 0, m_amount = 0 },
  47. }
  48.  
  49. -- change riftcols value in Rift-stop trigger to change number of cols displayed</script>
  50. <triggerType>0</triggerType>
  51. <conditonLineDelta>1</conditonLineDelta>
  52. <mStayOpen>0</mStayOpen>
  53. <mCommand></mCommand>
  54. <packageName></packageName>
  55. <mFgColor>#ff0000</mFgColor>
  56. <mBgColor>#ffff00</mBgColor>
  57. <mSoundFile></mSoundFile>
  58. <colorTriggerFgColor>#000000</colorTriggerFgColor>
  59. <colorTriggerBgColor>#000000</colorTriggerBgColor>
  60. <regexCodeList>
  61. <string>^Glancing into your rift, you see\:$</string>
  62. <string>^-{78}$</string>
  63. </regexCodeList>
  64. <regexCodePropertyList>
  65. <integer>1</integer>
  66. <integer>1</integer>
  67. </regexCodePropertyList>
  68. </Trigger>
  69. <Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  70. <name>Rift-capture</name>
  71. <script>for amount, curative in string.gmatch(matches[1], "%[%s*(%d+)%]([^[]+)") do
  72.  
  73. local unknown = true
  74.  
  75. for k, v in pairs(riftcuratives) do
  76. if string.match(curative, "%s" .. v.herb) then
  77. if v.herb == "ash" then misc:print("&lt;blue&gt;" .. v.herb .. ":" .. curative) end
  78. v.h_amount = tonumber(amount) unknown = false break
  79. elseif string.match(curative, "%s" .. v.mineral) then
  80. v.m_amount = tonumber(amount) unknown = false break
  81. end
  82. end
  83.  
  84. if unknown then table.insert(riftcuratives, { herb = "unknown", mineral = curative, h_amount = tonumber(amount) }) end
  85.  
  86. end
  87. deleteLine()</script>
  88. <triggerType>0</triggerType>
  89. <conditonLineDelta>0</conditonLineDelta>
  90. <mStayOpen>0</mStayOpen>
  91. <mCommand></mCommand>
  92. <packageName></packageName>
  93. <mFgColor>#ff0000</mFgColor>
  94. <mBgColor>#ffff00</mBgColor>
  95. <mSoundFile></mSoundFile>
  96. <colorTriggerFgColor>#000000</colorTriggerFgColor>
  97. <colorTriggerBgColor>#000000</colorTriggerBgColor>
  98. <regexCodeList>
  99. <string>^\[\s*\d+\]\s\w+.*$</string>
  100. </regexCodeList>
  101. <regexCodePropertyList>
  102. <integer>1</integer>
  103. </regexCodePropertyList>
  104. </Trigger>
  105. <Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  106. <name>Rift-herbs/mineral</name>
  107. <script>deleteLine()</script>
  108. <triggerType>0</triggerType>
  109. <conditonLineDelta>0</conditonLineDelta>
  110. <mStayOpen>0</mStayOpen>
  111. <mCommand></mCommand>
  112. <packageName></packageName>
  113. <mFgColor>#ff0000</mFgColor>
  114. <mBgColor>#ffff00</mBgColor>
  115. <mSoundFile></mSoundFile>
  116. <colorTriggerFgColor>#000000</colorTriggerFgColor>
  117. <colorTriggerBgColor>#000000</colorTriggerBgColor>
  118. <regexCodeList>
  119. <string>^Herbs$</string>
  120. <string>^Minerals$</string>
  121. </regexCodeList>
  122. <regexCodePropertyList>
  123. <integer>1</integer>
  124. <integer>1</integer>
  125. </regexCodePropertyList>
  126. </Trigger>
  127. <Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  128. <name>Rift-stop</name>
  129. <script>disableTrigger("Rift-capture")
  130. disableTrigger("Rift-herbs/mineral")
  131. disableTrigger("Rift-stop")
  132. local riftstring, riftcols = "", 3
  133. for k, v in pairs(riftcuratives) do
  134. if v.herb == "unknown" then
  135. riftstring = riftstring .. "&lt;forest_green&gt;[" .. (((v.h_amount &lt; 200) and "&lt;red&gt;") or "&lt;gray&gt;") .. string.rep(" ", 5-string.len(v.h_amount)) .. v.h_amount .. "&lt;forest_green&gt;]&lt;gray&gt;" .. v.mineral .. string.rep(" ", 24 - string.len(v.mineral))
  136. else
  137. riftstring = riftstring .. "&lt;forest_green&gt;[" .. (((v.h_amount + v.m_amount &lt; 200) and "&lt;red&gt;") or "&lt;gray&gt;") .. string.rep(" ", 5-string.len(v.h_amount)) .. v.h_amount .. string.rep(" ", 5-string.len(v.m_amount)) .. v.m_amount .. "&lt;forest_green&gt;] &lt;gray&gt;" .. string.sub(v.herb .. "/" .. v.mineral, 1, 18) .. string.rep(" ", 17 - string.len(v.herb .. v.mineral))
  138. end
  139.  
  140. if (k / riftcols) == math.floor(k / riftcols) or table.getn(riftcuratives) == k then
  141. riftstring = riftstring .. "\n"
  142. end
  143. end
  144. selectString(matches[1], 1)
  145. replace("")
  146. cecho("&lt;olive_drab&gt;Herb &amp; Minerals\n" .. riftstring .. "&lt;olive_drab&gt;Elixirs\n")</script>
  147. <triggerType>0</triggerType>
  148. <conditonLineDelta>0</conditonLineDelta>
  149. <mStayOpen>0</mStayOpen>
  150. <mCommand></mCommand>
  151. <packageName></packageName>
  152. <mFgColor>#ff0000</mFgColor>
  153. <mBgColor>#ffff00</mBgColor>
  154. <mSoundFile></mSoundFile>
  155. <colorTriggerFgColor>#000000</colorTriggerFgColor>
  156. <colorTriggerBgColor>#000000</colorTriggerBgColor>
  157. <regexCodeList>
  158. <string>^Elixirs$</string>
  159. </regexCodeList>
  160. <regexCodePropertyList>
  161. <integer>1</integer>
  162. </regexCodePropertyList>
  163. </Trigger>
  164. </TriggerGroup>
  165. </TriggerPackage>
  166. </MudletPackage>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement