Advertisement
Guest User

raceemotes

a guest
Sep 26th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.30 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE muclient>
  3. <!-- Saved on Thursday, September 17, 2015, 5:38 AM -->
  4. <!-- MuClient version 4.94 -->
  5.  
  6. <!-- Plugin "Race_Emotes" generated by Plugin Wizard -->
  7.  
  8. <!--
  9. Get better at life Bagz!
  10. -->
  11.  
  12. <muclient>
  13. <plugin
  14.    name="Race_Emotes"
  15.    author="Mostly Nick Gammon w Bagz Hacks"
  16.    id="19df337f76ec93929842f9c3"
  17.    language="Lua"
  18.    purpose="To give unconcious movement to characters based on race/body type"
  19.    date_written="2015-09-17 05:34:23"
  20.    requires="1.00"
  21.    version="1.0"
  22.    >
  23. <description trim="y">
  24. <![CDATA[
  25.  
  26. SPECIAL THANKS TO XAVIOUS FOR DEBUG HELP!
  27.  
  28. This makes an alias that uses a list of emotes or socials you define in the "speech" table. (would like to figure out how to change this on the fly in game and not have to hard code it. Would eventually like to add support for various races.)
  29.  
  30. It picks one emote or social from the list ever 35 to 90 seconds (also defined in the script in the line with:
  31.  
  32. wait.time (35 + math.random (35))   -- 35 to 90 seconds
  33.  
  34. start with: raceemotes on
  35.  
  36. stop with: raceemotes off
  37. ]]>
  38. </description>
  39.  
  40. </plugin>
  41.  
  42. <!--  Get our standard constants -->
  43.  
  44. <include name="constants.lua"/>
  45.  
  46. <!--  Aliases  -->
  47.  
  48. <aliases>
  49.   <alias
  50.    match="raceemotes on"
  51.    enabled="y"
  52.    send_to="12"
  53.    sequence="100"
  54.   >
  55.   <send>ColourNote ("silver", "purple", "-=(Hutt Racial Emotes Enabled)=-")
  56. require "wait"
  57.  
  58. wait.make (function ()  --- coroutine below here
  59.  
  60. speech = {
  61.  
  62.  "emote wriggles and shifts their massive form to redistribute their weight.",
  63.   "emote shudders deeply and gives a low, rumbling belch.",
  64.   "emote blinks their bulbous eyes quickly, then slowly narrows them as they refocus their vision.",
  65.   "emote stretches their diminutive arms and flicks their tail back and forth to stimulate blood circulation.",
  66.   "emote flares their cavernous nostrils and pulls themself up straight, switching postures to ease their back muscles.",
  67.   "emote lets out a long breath of air with an audible, 'OOOoooOoooooooowwwwhHHh'",
  68.   "emote relaxes their muscles and shifts down into a softer more gelatonous form of themself."
  69.  
  70.  -- more here
  71.  
  72.   }  -- end of speech table
  73.  
  74.   last_random = 1 --Initialize to prevent errors
  75.  
  76.   while not GetVariable ("stop_raceemotes") do
  77.     wait.time (35 + math.random (55))   -- 35 to 90 seconds
  78.     -- wait.time (10)   10 seconds for testing
  79.     current_random = math.random(1, #speech)
  80.     if current_random == last_random then --If our random variable is the same as the last one..
  81.       current_random = current_random + 1
  82.     end --if
  83.     Send (speech [ current_random ])
  84.     last_random = current_random --Our last array item used..
  85.   end -- while
  86.  
  87.   DeleteVariable ("stop_raceemotes")
  88.  
  89.  ColourNote ("silver", "", "-=(Hutt Racial Emotes Disabled)=-")
  90.  
  91. end)  -- end of coroutine
  92.  
  93. </send>
  94.   </alias>
  95.   <alias
  96.    match="raceemotes off"
  97.    enabled="y"
  98.    variable="stop_raceemotes"
  99.    send_to="12"
  100.    sequence="100"
  101.   >
  102.   <send>SetVariable("stop_raceemotes", "1")</send>
  103.   </alias>
  104. </aliases>
  105.  
  106. <!--  Plugin help  -->
  107.  
  108. <aliases>
  109.   <alias
  110.    script="OnHelp"
  111.    match="Race_Emotes:help"
  112.    enabled="y"
  113.   >
  114.   </alias>
  115. </aliases>
  116.  
  117. <script>
  118. <![CDATA[
  119. function OnHelp ()
  120.   world.Note (world.GetPluginInfo (world.GetPluginID (), 3))
  121. end
  122. ]]>
  123. </script>
  124.  
  125. </muclient>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement