Advertisement
Guest User

Untitled

a guest
May 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.02 KB | None | 0 0
  1. <!-- Saved on Wednesday, May 31, 2006, 9:51 AM -->
  2. <!-- MuClient version 3.70 -->
  3. <!-- Plugin "Quest_Inform" generated by Plugin Wizard -->
  4.  
  5. <muclient>
  6.  
  7. <plugin name="Quest_Inform" author="Onoitsu2" id="2b778ca65f74f5d3a4343cfc" language="Lua" purpose="Informs On A Certain Channel Quest Info" save_state="y" date_written="2006-05-31 09:49:56" requires="3.65" version="1.1">
  8.  
  9. <description trim="n">
  10. Quest Inform Plugin Help File - Commands are as follows: (without the of course)
  11. qchan = <CHANNEL> (ftalk = default) - sets the channel to send all Quest Inform related messages to (can even be tell PERSON)
  12. qinform help - shows this help message
  13. </description>
  14. </plugin>
  15. <!-- Get our standard constants -->
  16. <include name="constants.lua"/>
  17. <!-- Triggers -->
  18.  
  19. <triggers>
  20. <trigger enabled="y" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'You have (\d{1,}) minutes to complete your quest\.\'$" name="qtimematch" regexp="y" script="QTimeSetSend" sequence="26" lowercase_wildcard="y">
  21. </trigger>
  22. <trigger enabled="y" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'of (.*?)\.\'$" regexp="y" script="QAreaSet" sequence="27" lowercase_wildcard="y">
  23. </trigger>
  24. <trigger enabled="y" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'of (.*?) which(.*?)" regexp="y" script="QRoomSet" sequence="28" lowercase_wildcard="y">
  25. </trigger>
  26. <trigger enabled="y" custom_colour="4" group="questreq" ignore_case="y" keep_evaluating="y" match="^(.*?) tells you \'(An enemy of mine|Aardwolf\'s most heinous criminal)\,\s(.*?)\,(.*?)\'$" regexp="y" script="QMobSet" sequence="29" lowercase_wildcard="y">
  27. </trigger>
  28. <trigger group="questcom2" match="^You gain an extra 2 quest points \'MCCP Bonus\'\.$" regexp="y" script="QRewardSend" sequence="20">
  29. </trigger>
  30. <trigger group="questcom2" match="^\*\* You gain a bonus trivia point! \*\* $" regexp="y" script="QReward1Trivia" sequence="20">
  31. </trigger>
  32. <trigger group="questcom2" match="^\*\* You gain a bonus training session \*\* $" regexp="y" script="QReward1Train" sequence="20">
  33. </trigger>
  34. <trigger group="questcom2" match="^\*\* You gain a bonus practice \*\* $" regexp="y" script="QReward1Practice" sequence="20">
  35. </trigger>
  36. <trigger group="questcom2" match="^\*\* You gain a bonus (\d{1,}) practices \*\* $" regexp="y" script="QRewardXPractice" sequence="20">
  37. </trigger>
  38. <trigger group="questcom2" match="^You get lucky and gain an extra (.*?) quest points\.$" regexp="y" script="QRewardXPoints" sequence="20">
  39. </trigger>
  40. <trigger group="questcom2" match="^The gods reward you (.*?) bonus quest points\.$" regexp="y" script="QRewardDoublePoints" sequence="20">
  41. </trigger>
  42. <trigger group="questcom2" keep_evaluating="y" match="^(.*?) tells you \'I am also giving you (.*?) quest point(s?) tier bonus\.\'$" regexp="y" script="QRewardTierPoints" sequence="20">
  43. </trigger>
  44. <trigger group="questcom2" keep_evaluating="y" match="^(.*?) tells you \'As a reward\, I am giving you (.*?) quest points and (.*?) gold\.\'$" regexp="y" script="QReward1" sequence="20">
  45. </trigger>
  46. <trigger enabled="y" group="questcom" match="^You inform (.*?) that you have completed your quest\.$" regexp="y" script="InformQMComplete" send_to="12" sequence="20" lowercase_wildcard="y">
  47. </trigger>
  48. <trigger enabled="y" group="questcom" match="^Return to the questmaster before your time runs out\.$" regexp="y" script="QReturn" sequence="20">
  49. </trigger>
  50. <trigger custom_colour="4" enabled="y" group="quest_stuff" match="^You ask (.*?) for a quest\.$" regexp="y" script="QRequestGetName" sequence="30">
  51. </trigger>
  52. <trigger custom_colour="4" enabled="y" group="quest_stuff" match="^(There are (.*?) minutes remaining until you can go on another quest\.|You do not have to wait to go on another quest\.|QUEST\: You may now quest again\.)$" regexp="y" script="QTimeRemain" sequence="20">
  53. </trigger>
  54. </triggers>
  55. <!-- Aliases -->
  56.  
  57. <aliases>
  58. <alias script="SetChannel" ignore_case="y" match="^qchan\s*\=\s*(.*?)$" enabled="y" regexp="y">
  59. </alias>
  60. </aliases>
  61. <!-- Plugin help -->
  62.  
  63. <aliases>
  64. <alias script="OnHelp" ignore_case="y" match="qinform help" enabled="y">
  65. </alias>
  66. </aliases>
  67.  
  68. <script>
  69.  
  70.  
  71. function QTimeSetSend(sName,sLine,wildcards)
  72. DoAfterSpecial(.5,'world.EnableTrigger("qtimematch",false)',12)
  73. Note("Disabling Trigger")
  74. local questor, send, url
  75. questor = string.lower(world.GetVariable("questor"))
  76. if string.lower(wildcards[1]) == questor then
  77.  
  78. world.SetVariable("qtime",wildcards[2])
  79.  
  80. local mob, room, area, time, colorinfo, colortitles, colornorm, qchan
  81. mob = world.GetVariable("qmob")
  82. room = world.GetVariable("qroom")
  83. area = world.GetVariable("qarea")
  84. time = world.GetVariable("qtime")
  85. colorinfo = "@G"
  86. colortitles = "@C"
  87. colornorm = "@Y"
  88. qchan = world.GetVariable("qchan")
  89. sendinfo = qchan .. "@BQuest Info - " .. colortitles .. "Mob:" ..
  90. colorinfo .. mob .. colornorm .. ", " .. colortitles .. "Room:" ..
  91. colorinfo .. room .. colornorm .. ", " .. colortitles .. "Area:" ..
  92. colorinfo .. area .. colornorm .. ", " .. colortitles .. "Time:" ..
  93. colorinfo .. time .. colornorm
  94. DoAfterSpecial(2,"world.Send(sendinfo)",12)
  95. DoAfterSpecial(5,'world.EnableTrigger("qtimematch",true)',12)
  96. end
  97. end -- QTimeSetSend
  98.  
  99. function QAreaSet(sName,sLine,wildcards)
  100. local questor
  101. questor = string.lower(world.GetVariable("questor"))
  102. if string.lower(wildcards[1]) == questor then
  103. world.SetVariable("qarea",wildcards[2])
  104.  
  105. end
  106. end -- QAreaSet
  107.  
  108. function QRoomSet(sName,sLine,wildcards)
  109. local questor
  110. questor = string.lower(world.GetVariable("questor"))
  111. if string.lower(wildcards[1]) == questor then
  112. world.SetVariable("qroom",wildcards[2])
  113.  
  114. end
  115. end -- QRoomSet
  116.  
  117. function QMobSet(sName,sLine,wildcards)
  118. local questor
  119.  
  120. questor = string.lower(world.GetVariable("questor"))
  121. if string.lower(wildcards[1]) == questor then
  122. world.SetVariable("qmob",wildcards[3])
  123.  
  124. end
  125. end -- QMobSet
  126.  
  127. function QRewardSend(sName,sLine,wildcards)
  128. local questmessage, qchan, qptotal
  129. qptotal = tonumber(world.GetVariable("totalqp")) + 2
  130. questmessage = world.GetVariable("qcommessage")
  131. questmessage = questmessage .. " @Y+ @G2 @C(MCCP) qps @B= @G" .. qptotal .. " @RTOTAL QP@Y"
  132. qchan = world.GetVariable("qchan")
  133. world.Send(qchan .. questmessage)
  134. world.EnableGroup("questcom2",0)
  135. end -- QRewardSend
  136.  
  137. function QRewardTierPoints(sName,sLine,wildcards)
  138. local questmessage, qptotal
  139. questmessage = world.GetVariable("qcommessage")
  140. qptotal = tonumber(world.GetVariable("totalqp")) +
  141. tonumber(wildcards[2])
  142. questmessage = questmessage .. " @Y+ @G" .. wildcards[2] .. " @MTier Bonus!@Y"
  143. world.SetVariable("totalqp",qptotal)
  144. world.SetVariable("qcommessage",questmessage)
  145. end -- QRewardTierPoints
  146.  
  147. function QRewardDoublePoints(sName,sLine,wildcards)
  148. local questmessage, qptotal
  149. questmessage = world.GetVariable("qcommessage")
  150. qptotal = tonumber(world.GetVariable("totalqp")) + tonumber(wildcards[1])
  151. questmessage = questmessage .. " @Y+ @BDouble QP@Y"
  152. world.SetVariable("totalqp",qptotal)
  153. world.SetVariable("qcommessage",questmessage)
  154. end -- QRewardDoublePoints
  155.  
  156. function QReward1Trivia(sName,sLine,wildcards)
  157. local questmessage
  158. questmessage = world.GetVariable("qcommessage")
  159. questmessage = questmessage .. " @Y+ @MTrivia!@Y"
  160. world.SetVariable("qcommessage",questmessage)
  161. end -- QReward1Trivia
  162.  
  163. function QReward1Train(sName,sLine,wildcards)
  164. local questmessage
  165. questmessage = world.GetVariable("qcommessage")
  166. questmessage = questmessage .. " @Y+ @G1 @CTrain@Y"
  167. world.SetVariable("qcommessage",questmessage)
  168. end -- QReward1Train
  169.  
  170. function QReward1Practice(sName,sLine,wildcards)
  171. local questmessage
  172. questmessage = world.GetVariable("qcommessage")
  173. questmessage = questmessage .. " @Y+ @G1 @CPractice@Y"
  174. world.SetVariable("qcommessage",questmessage)
  175. end -- QReward1Practice
  176.  
  177. function QRewardXPractice(sName,sLine,wildcards)
  178. local questmessage
  179. questmessage = world.GetVariable("qcommessage")
  180. questmessage = questmessage .. " @Y+ @G" .. wildcards[1] .. " @CPractices@Y"
  181. world.SetVariable("qcommessage",questmessage)
  182. end -- QRewardXPractice
  183.  
  184. function QRewardXPoints(sName,sLine,wildcards)
  185. local questmessage, qptotal
  186. questmessage = world.GetVariable("qcommessage")
  187. qptotal = tonumber(world.GetVariable("totalqp")) + tonumber(wildcards[1])
  188. questmessage = questmessage .. " @Y+ @G" .. wildcards[1] .. " @CLucky Points@Y"
  189. world.SetVariable("totalqp",qptotal)
  190. world.SetVariable("qcommessage",questmessage)
  191. end -- QRewardXPoints
  192.  
  193. function QReward1(sName,sLine,wildcards)
  194. local questmessage, qptotal
  195. qptotal = tonumber(wildcards[2])
  196. questmessage = "@BLast Quest: @G" .. wildcards[2]
  197. world.SetVariable("totalqp",qptotal)
  198. world.SetVariable("qcommessage",questmessage)
  199. end -- QReward1
  200.  
  201. function InformQMComplete(sName,sLine,wildcards)
  202. world.SetVariable("questor",string.lower(wildcards[1]))
  203. world.EnableGroup("questcom2",1)
  204. end
  205.  
  206. function QReturn(sName,sLine,wildcards)
  207. local questor, qchan
  208. questor = string.lower(world.GetVariable("questor"))
  209. qchan = world.GetVariable("qchan")
  210. world.Send(qchan .. " '@CQuest @RMob @WDead @BReturning @YTo @G" .. questor .. "@Y'")
  211. end -- QReturn
  212.  
  213. function QRequestGetName(sName,sLine,wildcards)
  214. world.SetVariable("questor",string.lower(wildcards[1]))
  215.  
  216. end -- QRequestGetName
  217.  
  218. function QTimeRemain(sName,sLine,wildcards)
  219. local qchan
  220. qchan = world.GetVariable("qchan")
  221. if string.sub(wildcards[1],1,10) == "There are " then
  222. world.Send(qchan .. "'@CThere's @G" .. wildcards[2] .. " @YMinutes @WLeft @BTill @MNext @RQuest@Y'")
  223. else
  224. if wildcards[1] == "QUEST: You may now quest again." then
  225. world.Send(qchan .. "'@CThere's @RQuest @WPoints @BTa @YBe @GHad@Y'")
  226. end
  227. end
  228. end -- QTimeRemain
  229.  
  230. function SetChannel(sName,sLine,wildcards)
  231. local qchan
  232. qchan = string.lower(wildcards[1])
  233. if qchan == "" then
  234. qchan = "ftalk "
  235. end
  236. world.SetVariable("qchan",qchan .. " ")
  237. SaveState()
  238. end -- SetChannel
  239.  
  240.  
  241. function OnPluginInstall()
  242. world.SetVariable("qchan","ftalk ")
  243. OnHelp()
  244. end -- OnPluginInstall
  245.  
  246. function OnHelp ()
  247. world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
  248. end
  249. </script>
  250. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement