Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.65 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on Thursday, January 09, 2014, 11:23 PM -->
  4. <!-- MuClient version 4.84 -->
  5.  
  6. <!-- Plugin "Chat_Redirector" generated by Plugin Wizard -->
  7.  
  8. <muclient>
  9.  
  10. <plugin
  11. name="Chat_Redirector"
  12. author="Mike MacKenzie"
  13. id="7f15aad4db0be9a6bed8d9f6"
  14. language="Lua"
  15. purpose="New chat redirector"
  16. date_written="2014-01-09 23:19:39"
  17. requires="4.84"
  18. version="1.0"
  19. >
  20.  
  21. <description trim="y">
  22.  
  23. <![CDATA[
  24. Redirect chats and gains into different worlds, and have mute options on main world. "mute <#>" or "unmute <#>", Please note that by default nothing is muted, To automatically mute groups, have a login trigger, with send to world(immediate) with "mute <number of the desired mute>" as the send text, to fire the alias and mute the respective group.
  25. ]]>
  26.  
  27. </description>
  28. </plugin>
  29.  
  30. <!-- Get our standard constants -->
  31.  
  32. <include name="constants.lua"/>
  33.  
  34.  
  35. --[[
  36.  
  37. Okay so there are 3 mute toggles. You turn them on and off by doing "mute 1-3", or "unmute 1-3".
  38.  
  39. Here are lists of what each toggle controls.
  40.  
  41. mute 1: will mute stat gains, bonus gains, etc
  42. mute 2: will mute snet, ask, say, group, clan
  43. mute 3: wiznet, whisper, tells, info
  44.  
  45. --]]
  46.  
  47.  
  48. <!-- Triggers -->
  49.  
  50. <triggers>
  51. --[[
  52. This is the default trigger section. This group is on by default, because it is set to the top layer. When the other groups are turned on, it overlaps these triggers with duplicate triggers with a lower sequence, that still redirect to the same spot, but they omit from output. Also, please note group 0 is used for triggers that never omit from output.
  53. --]]
  54. Raditz (Quote)s,
  55. <trigger
  56. enabled="y"
  57. group="Gags"
  58. match="Raditz (Quote)s,*"
  59. omit_from_output="y"
  60. sequence="100"
  61. >
  62. </trigger>
  63.  
  64. <trigger
  65. enabled="y"
  66. group="Gags"
  67. match="(SNET 1) Dartz:*"
  68. omit_from_output="y"
  69. sequence="100"
  70. >
  71. </trigger>
  72.  
  73. <trigger
  74. enabled="y"
  75. group="Gags"
  76. match="Rodimus (Quote)s,*"
  77. omit_from_output="y"
  78. sequence="100"
  79. >
  80. </trigger>
  81.  
  82. <trigger
  83. enabled="y"
  84. group="Messages4"
  85. match="\[Wiznet\] (.*?)$"
  86. regexp="y"
  87. script="redirect"
  88. sequence="100"
  89. >
  90. </trigger>
  91.  
  92. <trigger
  93. enabled="y"
  94. group="Messages4"
  95. match="^(.*?) \((.*?)\)\: (.*?)$"
  96. regexp="y"
  97. script="redirect"
  98. sequence="100"
  99. >
  100. </trigger>
  101.  
  102. <trigger
  103. enabled="y"
  104. group="Messages4"
  105. match="^(.*?)[A-Za-z]+ whispers to you, \'(.*?)\'$"
  106. regexp="y"
  107. script="redirect"
  108. sequence="100"
  109. >
  110. </trigger>
  111.  
  112. <trigger
  113. enabled="y"
  114. group="Messages4"
  115. match="^(.*?)\You whisper to (.*?)\, \'(.*?)\'$"
  116. regexp="y"
  117. script="redirect"
  118. sequence="100"
  119. >
  120. </trigger>
  121.  
  122. <trigger
  123. enabled="y"
  124. group="Messages4"
  125. match="^(.*?)[A-Za-z]+ (sends a scouter transmission to you), \'(.*?)\'$"
  126. regexp="y"
  127. script="redirect"
  128. sequence="100"
  129. >
  130. </trigger>
  131.  
  132. <trigger
  133. enabled="y"
  134. group="Messages4"
  135. match="^(.*?)\You send a transmission to (.*?)\, \'(.*?)\'$"
  136. regexp="y"
  137. script="redirect"
  138. sequence="100"
  139. >
  140. </trigger>
  141.  
  142. <trigger
  143. enabled="y"
  144. group="Messages4"
  145. match="^(.*?) sends a transmission to you\, \'(.*?)\'(.*?)$"
  146. regexp="y"
  147. script="redirect"
  148. sequence="100"
  149. >
  150. </trigger>
  151.  
  152. <trigger
  153. enabled="y"
  154. group="Messages4"
  155. match="^(.*?)\[Info\]\: (.*?)$"
  156. regexp="y"
  157. script="redirect"
  158. sequence="100"
  159. >
  160. </trigger>
  161.  
  162. <trigger
  163. enabled="y"
  164. group="Messages4"
  165. match="^(.*?) RP Chats\: \'(.*?)\'$"
  166. regexp="y"
  167. script="redirect"
  168. sequence="100"
  169. >
  170. </trigger>
  171.  
  172. <trigger
  173. enabled="y"
  174. group="Messages4"
  175. match="You RP Chat\: \'(.*?)\'$"
  176. regexp="y"
  177. script="redirect"
  178. sequence="100"
  179. >
  180. </trigger>
  181.  
  182. <trigger
  183. enabled="y"
  184. group="Messages4"
  185. match="^(.*?)\[A-Za-z]+ asks, \'(.*?)\?'$"
  186. regexp="y"
  187. script="redirect"
  188. sequence="100"
  189. >
  190. </trigger>
  191.  
  192. <trigger
  193. enabled="y"
  194. group="Messages4"
  195. match="^(.*?)[A-Za-z]+ tells the group, \'(.*?)\'$"
  196. regexp="y"
  197. script="redirect"
  198. sequence="100"
  199. >
  200. </trigger>
  201.  
  202. <trigger
  203. enabled="y"
  204. group="Messages4"
  205. match="^(.*?)\[A-Za-z]+ (exclaim)s, \'(.*?)\!'$"
  206. regexp="y"
  207. script="redirect"
  208. sequence="100"
  209. >
  210. </trigger>
  211.  
  212. <trigger
  213. enabled="y"
  214. group="Messages4"
  215. match="^(.*?)\[A-Za-z]+ exclaims, \'(.*?)\'$"
  216. regexp="y"
  217. script="redirect"
  218. sequence="100"
  219. >
  220. </trigger>
  221.  
  222. <trigger
  223. enabled="y"
  224. group="Messages4"
  225. match="^(.*?)\You (say|chat|exclaim|mutter|ask|yell|\[Newbie\]|\[OOC\]|send a scouter transmission to|\(Holler\)|\(Shout\)|\(Roleplay\)|\(Quote\)|\(Congrat\)|\(Quest\)|OOC say|tell the group), \'(.*?)\'$"
  226. regexp="y"
  227. script="redirect"
  228. sequence="100"
  229. >
  230. </trigger>
  231.  
  232. <trigger
  233. enabled="y"
  234. group="Messages4"
  235. match="^(.*?)[A-Za-z]+ (say|chat|mutter||\[Newbie\]|exclaim|ask|yell|\[OOC\]|sends a scouter transmission to|\(Holler\)|\(Shout\)|\(Roleplay\)|\(Quote\)|\(Congrat\)|\(Quest\)|OOC say|)s, \'(.*?)\'$"
  236. regexp="y"
  237. script="redirect"
  238. sequence="100"
  239. >
  240. </trigger>
  241.  
  242.  
  243. <trigger
  244. enabled="y"
  245. group="Messages4"
  246. match="^(.*?)\((.*?)\)\: (.*?)|\(SNET (.*?)\) (.*?)\: (.*?)$$"
  247. regexp="y"
  248. script="redirect"
  249. sequence="100"
  250. >
  251. </trigger>
  252.  
  253. <trigger
  254. enabled="y"
  255. group="Messages4"
  256. match="\[(?:(.*?) )Bonus(?: \+(\d+))?\]$"
  257. regexp="y"
  258. script="redirect2"
  259. sequence="100"
  260. >
  261. </trigger>
  262.  
  263. <trigger
  264. enabled="y"
  265. group="Messages4"
  266. match="^(\[(.*?) Bonus (.*?)\]|\[(.*?) Bonus\](.*?)\.|\[Rage Loss \-1\]|(.*?)AFK flag is now (on|off)\.|(.*?) appears with an ear\-splitting bang\.|RANDOM BOT CHECK\!\[(.*?) Bonus\](.*?)|(.*?) drops Essence of (.*?)|You get Essence of (.*?))$"
  267. regexp="y"
  268. script="redirect2"
  269. sequence="100"
  270. >
  271. </trigger>
  272.  
  273. <trigger
  274. enabled="y"
  275. group="Messages4"
  276. match="^(.*?)\[(.*?)\]\: (.*?)$"
  277. regexp="y"
  278. script="redirect"
  279. sequence="100"
  280. >
  281. </trigger>
  282.  
  283. --[[
  284. This section is for group3 triggers, other channels.
  285. --]]
  286.  
  287. <trigger
  288. group="Messages3"
  289. match="\[Wiznet\] (.*?)$"
  290. omit_from_output="y"
  291. regexp="y"
  292. script="redirect"
  293. sequence="90"
  294. >
  295. </trigger>
  296.  
  297. <trigger
  298. group="Messages3"
  299. match="^(.*?) \((.*?)\)\: (.*?)$"
  300. omit_from_output="y"
  301. regexp="y"
  302. script="redirect"
  303. sequence="90"
  304. >
  305. </trigger>
  306.  
  307. <trigger
  308. group="Messages3"
  309. match="^(.*?)[A-Za-z]+ whispers to you, \'(.*?)\'$"
  310. omit_from_output="y"
  311. regexp="y"
  312. script="redirect"
  313. sequence="90"
  314. >
  315. </trigger>
  316.  
  317. <trigger
  318. group="Messages3"
  319. match="^(.*?)\You whisper to (.*?)\, \'(.*?)\'$"
  320. omit_from_output="y"
  321. regexp="y"
  322. script="redirect"
  323. sequence="90"
  324. >
  325. </trigger>
  326.  
  327. <trigger
  328. group="Messages3"
  329. match="^(.*?)[A-Za-z]+ (sends a scouter transmission to you), \'(.*?)\'$"
  330. omit_from_output="y"
  331. regexp="y"
  332. script="redirect"
  333. sequence="90"
  334. >
  335. </trigger>
  336.  
  337. <trigger
  338. group="Messages3"
  339. match="^(.*?)\You send a transmission to (.*?)\, \'(.*?)\'$"
  340. omit_from_output="y"
  341. regexp="y"
  342. script="redirect"
  343. sequence="90"
  344. >
  345. </trigger>
  346.  
  347. <trigger
  348. group="Messages3"
  349. match="^(.*?) sends a transmission to you\, \'(.*?)\'(.*?)$"
  350. omit_from_output="y"
  351. regexp="y"
  352. script="redirect"
  353. sequence="90"
  354. >
  355. </trigger>
  356.  
  357. <trigger
  358. group="Messages3"
  359. match="^(.*?)\[Info\]\: (.*?)$"
  360. omit_from_output="y"
  361. regexp="y"
  362. script="redirect"
  363. sequence="90"
  364. >
  365. </trigger>
  366.  
  367.  
  368.  
  369. --[[
  370. This section is for group2 triggers, spammy channels, can be muted.
  371. --]]
  372.  
  373.  
  374.  
  375. <trigger
  376. group="Messages2"
  377. match="^(.*?) RP Chats\: \'(.*?)\'$"
  378. omit_from_output="y"
  379. regexp="y"
  380. script="redirect"
  381. sequence="90"
  382. >
  383. </trigger>
  384.  
  385. <trigger
  386. group="Messages2"
  387. omit_from_output="y"
  388. match="You RP Chat\: \'(.*?)\'$"
  389. regexp="y"
  390. script="redirect"
  391. sequence="90"
  392. >
  393. </trigger>
  394.  
  395. <trigger
  396. group="Messages2"
  397. match="^(.*?)\[A-Za-z]+ asks, \'(.*?)\?'$"
  398. omit_from_output="y"
  399. regexp="y"
  400. script="redirect"
  401. sequence="90"
  402. >
  403. </trigger>
  404.  
  405. <trigger
  406. group="Messages2"
  407. match="^(.*?)[A-Za-z]+ tells the group, \'(.*?)\'$"
  408. omit_from_output="y"
  409. regexp="y"
  410. script="redirect"
  411. sequence="90"
  412. >
  413. </trigger>
  414.  
  415. <trigger
  416. group="Messages2"
  417. match="^(.*?)\[A-Za-z]+ (exclaim)s, \'(.*?)\!'$"
  418. omit_from_output="y"
  419. regexp="y"
  420. script="redirect"
  421. sequence="90"
  422. >
  423. </trigger>
  424.  
  425. <trigger
  426. group="Messages2"
  427. match="^(.*?)\[A-Za-z]+ exclaims, \'(.*?)\'$"
  428. omit_from_output="y"
  429. regexp="y"
  430. script="redirect"
  431. sequence="90"
  432. >
  433. </trigger>
  434.  
  435. <trigger
  436. group="Messages2"
  437. match="^(.*?)\You (say|chat|exclaim|mutter|ask|yell|\[OOC\]|send a scouter transmission to|\(Holler\)|\(Shout\)|sing|\(Roleplay\)|\(Quote\)|\(Congrat\)|\(Quest\)|OOC say|tell the group), \'(.*?)\'$"
  438. omit_from_output="y"
  439. regexp="y"
  440. script="redirect"
  441. sequence="90"
  442. >
  443. </trigger>
  444.  
  445. <trigger
  446. group="Messages2"
  447. match="^(.*?)[A-Za-z]+ (say|chat|mutter|exclaim|ask|yell|\[OOC\]|sends a transmission to|\(Holler\)|\(Shout\)|sing|\(Roleplay\)|\(Quote\)|\(Congrat\)|\(Quest\)|OOC say|)s, \'(.*?)\'$"
  448. omit_from_output="y"
  449. regexp="y"
  450. script="redirect"
  451. sequence="90"
  452. >
  453. </trigger>
  454.  
  455.  
  456. <trigger
  457. group="Messages2"
  458. match="^(.*?)\((.*?)\)\: (.*?)|\(SNET (.*?)\) (.*?)\: (.*?)$$"
  459. omit_from_output="y"
  460. regexp="y"
  461. script="redirect"
  462. sequence="90"
  463. >
  464. </trigger>
  465.  
  466. <trigger
  467. group="Messages2"
  468. match="^(.*?)\[(.*?)\]\: (.*?)$"
  469. omit_from_output="y"
  470. regexp="y"
  471. script="redirect"
  472. sequence="90"
  473. >
  474. </trigger>
  475.  
  476.  
  477. --[[
  478. This section is for group1 triggers, spammiest channels, can be muted.
  479. --]]
  480.  
  481. <trigger
  482. group="Messages1"
  483. match="\[(?:(.*?) )Bonus(?: \+(\d+))?\]$"
  484. omit_from_output="y"
  485. regexp="y"
  486. script="redirect2"
  487. sequence="90"
  488. >
  489. </trigger>
  490.  
  491. <trigger
  492. group="Messages1"
  493. match="^(\[(.*?) Bonus (.*?)\]|\[(.*?) Bonus\](.*?)\.|\[Rage Loss \-1\]|(.*?)AFK flag is now (on|off)\.|(.*?) appears with an ear\-splitting bang\.|RANDOM BOT CHECK\!\[(.*?) Bonus\](.*?)|(.*?) drops Essence of (.*?)|You get Essence of (.*?))$"
  494. omit_from_output="y"
  495. regexp="y"
  496. script="redirect2"
  497. sequence="90"
  498. >
  499. </trigger>
  500.  
  501. --[[
  502. This section is for group0 triggers, ones that never get muted. Note that most of these go to the 2nd window.
  503. --]]
  504.  
  505. <trigger
  506. enabled="y"
  507. group="Messages0"
  508. match="You get Namekian (One|Two|Three|Four|Five|Six|Seven) Star Dragonball.$"
  509. regexp="y"
  510. script="redirect2"
  511. sequence="90"
  512. >
  513. </trigger>
  514.  
  515. <trigger
  516. enabled="y"
  517. group="Messages0"
  518. match="^(.*?) drops Namekian (One|Two|Three|Four|Five|Six|Seven) Star Dragonball.$"
  519. regexp="y"
  520. script="redirect2"
  521. sequence="90"
  522. >
  523. </trigger>
  524.  
  525. <trigger
  526. enabled="y"
  527. group="Messages0"
  528. match="^\[System Error -1 Upgrade\]$"
  529. regexp="y"
  530. script="redirect2"
  531. sequence="90"
  532. >
  533. </trigger>
  534.  
  535. <trigger
  536. enabled="y"
  537. group="Messages0"
  538. match="You Have 2 minutes to 'say' the three numbers displayed above!"
  539. regexp="y"
  540. script="redirect"
  541. sequence="90"
  542. >
  543. </trigger>
  544.  
  545. <trigger
  546. enabled="y"
  547. group="Messages0"
  548. match="RANDOM BOT CHECK!"
  549. regexp="y"
  550. script="redirect"
  551. sequence="90"
  552. >
  553. </trigger>
  554.  
  555. <trigger
  556. enabled="y"
  557. group="Messages0"
  558. match="^(.*?) drops Essence of (Fate|Power|Mind).$"
  559. send_to="12"
  560. regexp="y"
  561. script="redirect2"
  562. sequence="90"
  563. >
  564. <send>
  565. Note("+++++ ESSENCE DROP +++++")
  566. Note("+++++ YOU GOT AN ESSENCE DROP! +++++")
  567. </send>
  568. </trigger>
  569.  
  570. </triggers>
  571.  
  572.  
  573. <!-- Aliases -->
  574.  
  575. --[[
  576. mute 1: will mute stat gains, bonus gains, etc
  577. mute 2: will mute snet, ask, say, group, clan
  578. mute 3: wiznet, whisper, tells, info
  579. --]]
  580.  
  581. <aliases>
  582.  
  583. <alias
  584. enabled="y"
  585. match="unmute 1"
  586. send_to="12"
  587. sequence="100"
  588. >
  589. <send>
  590. EnableTriggerGroup("Messages1", false)
  591. Note("++Bonus Gains, and the like, are now unmuted.")
  592. </send>
  593. </alias>
  594.  
  595. <alias
  596. enabled="y"
  597. match="mute 1"
  598. send_to="12"
  599. sequence="100"
  600. >
  601. <send>
  602. EnableTriggerGroup("Messages1", true)
  603. Note("--Bonus Gains, and the like, are now muted.")
  604. </send>
  605. </alias>
  606.  
  607. <alias
  608. enabled="y"
  609. match="unmute 2"
  610. send_to="12"
  611. sequence="100"
  612. >
  613. <send>
  614. EnableTriggerGroup("Messages2", false)
  615. Note("++Snet, Ask, Say, Group, And Clan unmuted.")
  616. </send>
  617. </alias>
  618.  
  619. <alias
  620. enabled="y"
  621. match="mute 2"
  622. send_to="12"
  623. sequence="100"
  624. >
  625. <send>
  626. EnableTriggerGroup("Messages2", true)
  627. Note("--Snet, Ask, Say, Group, And Clan muted.")
  628. </send>
  629. </alias>
  630.  
  631. <alias
  632. enabled="y"
  633. match="unmute 3"
  634. send_to="12"
  635. sequence="100"
  636. >
  637. <send>
  638. EnableTriggerGroup("Messages3", false)
  639. Note("++Wiznet, Whisper, Tells, and Info are now unmuted.")
  640. </send>
  641. </alias>
  642.  
  643. <alias
  644. enabled="y"
  645. match="mute 3"
  646. send_to="12"
  647. sequence="100"
  648. >
  649. <send>
  650. EnableTriggerGroup("Messages3", true)
  651. Note("--Wiznet, Whisper, Tells, and Info are now muted.")
  652. </send>
  653. </alias>
  654.  
  655.  
  656. </aliases>
  657.  
  658. <script>
  659. <![CDATA[
  660. chat_world = "DBE Chats"
  661. local first_time = true
  662.  
  663. function redirect (name, line, wildcards, styles)
  664.  
  665. -- try to find "chat" world
  666. local w = GetWorld (chat_world) -- get "chat" world
  667.  
  668. -- if not found, try to open it
  669. if first_time and not w then
  670. local filename = GetInfo (67) .. chat_world .. ".mcl"
  671. Open (filename)
  672. w = GetWorld (chat_world) -- try again
  673. if not w then
  674. ColourNote ("white", "red", "Can't open chat world file: " .. filename)
  675. first_time = false -- don't repeatedly show failure message
  676. end -- can't find world
  677. end -- can't find world first time around
  678.  
  679. if w then -- if present
  680. for _, v in ipairs (styles) do
  681. w:ColourTell (RGBColourToName (v.textcolour),
  682. RGBColourToName (v.backcolour),
  683. v.text)
  684. end -- for each style run
  685. w:Note ("") -- wrap up line
  686.  
  687. end -- world found
  688.  
  689. end -- function redirect
  690.  
  691. ]]>
  692. </script>
  693.  
  694. <script>
  695. <![CDATA[
  696. chat_world2 = "DBE Gains"
  697. local first_time = true
  698.  
  699. function redirect2 (name, line, wildcards, styles)
  700.  
  701. -- try to find "chat" world
  702. local w = GetWorld (chat_world2) -- get "chat" world
  703.  
  704. -- if not found, try to open it
  705. if first_time and not w then
  706. local filename = GetInfo (67) .. chat_world2 .. ".mcl"
  707. Open (filename)
  708. w = GetWorld (chat_world2) -- try again
  709. if not w then
  710. ColourNote ("white", "red", "Can't open gain world file: " .. filename)
  711. first_time = false -- don't repeatedly show failure message
  712. end -- can't find world
  713. end -- can't find world first time around
  714.  
  715. if w then -- if present
  716. for _, v in ipairs (styles) do
  717. w:ColourTell (RGBColourToName (v.textcolour),
  718. RGBColourToName (v.backcolour),
  719. v.text)
  720. end -- for each style run
  721. w:Note ("") -- wrap up line
  722.  
  723. end -- world found
  724.  
  725. end -- function redirect2
  726.  
  727. ]]>
  728. </script>
  729.  
  730. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement