Advertisement
Guest User

(XML) MUD: Aardwolf auto-quaff potion plug-in

a guest
Feb 28th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.86 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on Saturday, February 28, 2015, 12:10 PM -->
  4. <!-- MuClient version 4.93 -->
  5.  
  6. <!-- Plugin "Auto_Quaff_v1" generated by Plugin Wizard -->
  7.  
  8. <!--
  9. Auto Potion Quaffer v_1.0  by Luanewb
  10.  
  11. 28/02/2015
  12. -->
  13.  
  14. <muclient>
  15. <plugin
  16.   name="Auto_Quaff_v1"
  17.   author="Luanewb"
  18.   id="74974f49235f91d1fad9097c"
  19.   language="Lua"
  20.   purpose="Auto Potion Quaffer"
  21.   save_state="y"
  22.   date_written="2015-02-28 12:03:49"
  23.   requires="4.93"
  24.   version="1.0"
  25.   >
  26. <description trim="y">
  27. <![CDATA[
  28. Auto Potion Quaffer by Luanewb v_1.0
  29.  
  30. Written by Luanewb for MUD: Aardwolf on 28/02/2015 (dd/mm/yyyy)
  31.  
  32. qff_help:
  33.  
  34. USAGE :
  35.  
  36. qff_show - shows all values
  37. Set container for potions with:-
  38. qff_c *
  39.  
  40. Set health potion with:
  41. qff_hp_pot *
  42. Set Max. Health for health quaffing range (maximum) with :
  43. qff_hp_max *
  44. Set Min. Health for health quaffing range (minimum) with :
  45. qff_hp_min *
  46.  
  47. Set mana potion with:
  48. qff_mn_pot *
  49. Set Max. Mana for mana quaffing range (maximum) with :
  50. qff_mn_max *
  51. Set Min. Mana for mana quaffing range (minimum) with :
  52. qff_mn_min *
  53.  
  54. Enjoy :)
  55.  
  56. -- Luanewb
  57. ]]>
  58. </description>
  59.  
  60. </plugin>
  61.  
  62.  
  63. <!--  Get our standard constants -->
  64.  
  65. <include name="constants.lua"/>
  66.  
  67. <!--  Triggers  -->
  68.  
  69. <triggers>
  70.   <trigger
  71.   enabled="y"
  72.   expand_variables="y"
  73.   group="Quaffer"
  74.   match="[*/*hp */*mn */*mv *qt *tnl] &gt;"
  75.   send_to="12"
  76.   sequence="100"
  77.  >
  78.   <send>if %1 &gt;=tonumber(GetVariable("quaffer_hp_min")) and %1&lt;=tonumber (GetVariable("quaffer_hp_max")) then
  79.  
  80. Send ("get ", GetVariable("quaffer_hp_pot"), " ", GetVariable("quaffer_container"))
  81.  
  82. Send ("quaff ", GetVariable("quaffer_hp_pot"))
  83.  
  84. end
  85.  
  86. if %3&gt;=tonumber(GetVariable("quaffer_mn_min")) and %3&lt;=tonumber (GetVariable("quaffer_mn_max")) then
  87.  
  88. Send ("get ", GetVariable("quaffer_mn_pot"), " ", GetVariable("quaffer_container"))
  89. Send ("quaff ", GetVariable("quaffer_mn_pot"))
  90.  
  91. end</send>
  92.   </trigger>
  93. </triggers>
  94.  
  95. <!--  Aliases  -->
  96.  
  97. <aliases>
  98.   <alias
  99.   match="qff_hp_pot *"
  100.   enabled="y"
  101.   expand_variables="y"
  102.   group="Quaffer"
  103.   send_to="12"
  104.   sequence="100"
  105.  >
  106.   <send>SetVariable("quaffer_hp_pot", "%1")</send>
  107.   </alias>
  108.   <alias
  109.   match="qff_mn_pot *"
  110.   enabled="y"
  111.   expand_variables="y"
  112.   group="Quaffer"
  113.   send_to="12"
  114.   sequence="100"
  115.  >
  116.   <send>SetVariable("quaffer_mn_pot", "%1")</send>
  117.   </alias>
  118.   <alias
  119.   match="qff_mn_max *"
  120.   enabled="y"
  121.   expand_variables="y"
  122.   group="Quaffer"
  123.   send_to="12"
  124.   sequence="100"
  125.  >
  126.   <send>SetVariable("quaffer_mn_max", "%1")
  127. print("Quaffer Max Mana set to : ", GetVariable("quaffer_mn_max"))</send>
  128.   </alias>
  129.   <alias
  130.   match="qff_show"
  131.   enabled="y"
  132.   expand_variables="y"
  133.   group="Quaffer"
  134.   send_to="12"
  135.   sequence="100"
  136.  >
  137.   <send>print ("hp max : ", GetVariable("quaffer_hp_max"))
  138. print ("hp min : ", GetVariable("quaffer_hp_min"))
  139. print ("mn max : ", GetVariable("quaffer_mn_max"))
  140. print ("mn min : ", GetVariable("quaffer_mn_min"))
  141. print ("hp pot : ", GetVariable("quaffer_hp_pot"))
  142. print ("mn pot : ", GetVariable("quaffer_mn_pot"))
  143. print ("cntanr : ", GetVariable("quaffer_container"))</send>
  144.   </alias>
  145.   <alias
  146.   match="qff_hp_min *"
  147.   enabled="y"
  148.   expand_variables="y"
  149.   group="Quaffer"
  150.   send_to="12"
  151.   sequence="100"
  152.  >
  153.   <send>SetVariable("quaffer_hp_min", "%1")
  154. print("Quaffer Min Health set to : ", GetVariable("quaffer_hp_min"))</send>
  155.   </alias>
  156.   <alias
  157.   match="qff_mn_min *"
  158.   enabled="y"
  159.   expand_variables="y"
  160.   group="Quaffer"
  161.   send_to="12"
  162.   sequence="100"
  163.  >
  164.   <send>SetVariable("quaffer_mn_min", "%1")
  165. print("Quaffer Min Mana set to : ", GetVariable("quaffer_mn_min"))</send>
  166.   </alias>
  167.   <alias
  168.   match="qff_hp_max *"
  169.   enabled="y"
  170.   expand_variables="y"
  171.   group="Quaffer"
  172.   send_to="12"
  173.   sequence="100"
  174.  >
  175.   <send>SetVariable("quaffer_hp_max", "%1")
  176. print("Quaffer Max Health set to : ", GetVariable("quaffer_hp_max"))</send>
  177.   </alias>
  178.   <alias
  179.   match="qff_c *"
  180.   enabled="y"
  181.   expand_variables="y"
  182.   group="Quaffer"
  183.   send_to="12"
  184.   sequence="100"
  185.  >
  186.   <send>SetVariable("quaffer_container", "%1")</send>
  187.   </alias>
  188. </aliases>
  189.  
  190. <!--  Variables  -->
  191.  
  192. <variables>
  193.   <variable name="quaffer_mn_pot">lotus</variable>
  194.   <variable name="quaffer_container">testament</variable>
  195.   <variable name="quaffer_hp_pot">heal</variable>
  196.   <variable name="quaffer_mn_max">520</variable>
  197.   <variable name="quaffer_hp_max">500</variable>
  198.   <variable name="quaffer_mn_min">400</variable>
  199.   <variable name="quaffer_hp_min">400</variable>
  200. </variables>
  201.  
  202. <!--  Plugin help  -->
  203.  
  204. <aliases>
  205.   <alias
  206.   script="OnHelp"
  207.   match="qff_help"
  208.   enabled="y"
  209.  >
  210.   </alias>
  211. </aliases>
  212.  
  213. <script>
  214. <![CDATA[
  215. function OnHelp ()
  216.  world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
  217. end
  218. ]]>
  219. </script>
  220.  
  221. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement