Advertisement
wedgesvisions

Elite Dangerous Voice Commands for GlovePie

Aug 21st, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * ELITE: DANGEROUS Voice Commands Script for GlovePIE
  3.  * Author: Wedge - www.youtube.com/wedgesvisions
  4.  * Version: 1.0
  5.  * Last Update: 11/27/2014
  6.  * Pastebin: http://pastebin.com/mk1xJ88R
  7.  * GlovePIE Download: http://glovepie.org/glovepie_download.php
  8.  */
  9.  
  10. /*
  11.  * PUSH TO TALK
  12.  * Disabled
  13.  * To enable, remove the //
  14.  * And edit your key
  15.  */
  16. //Microphone.Enabled = mouse.XButton1
  17.  
  18. /*
  19.  * Say "start listening" to begin.
  20.  */
  21. if said("enable voice commands",5) or said("start listening",5) then
  22.    var.listen=true
  23.    say("enabled")
  24. end if
  25.  
  26. if said("disable voice commands",5) or said("stop listening",5) then
  27.    var.listen=false
  28.    say("disabled")
  29. end if
  30.  
  31. /*
  32.  * STATES
  33.  */
  34.  
  35. // STOPPING SHIP
  36. if key.x then
  37.    var.ShipSpeed=0
  38. end if
  39.  
  40. // WEAPONS TOGGLE
  41. toggle(var.HardPoints) = pressed(key.u) or pressed(key.LeftControl)
  42.  
  43. if said("reset weapons status",5) then
  44.    var.HardPoints=0
  45. end if
  46.  
  47. /*
  48.  * COMMANDS LIST
  49.  */
  50. if var.listen == true then
  51.  
  52. // FLIGHT THROTTLE
  53. key.x = said("set speed 0",5) or said("speed 0",5) or said("stop ship",5) or said("full stop",5)
  54. key.9 = said("set speed 25",5) or said("speed 25",5) or said("speed two five",5)
  55. key.8 = said("set speed 50",5) or said("speed 50",5) or said("speed five zero",5)
  56. key.7 = said("set speed 75",5) or said("speed 75",5) or said("speed seven five",5)
  57. key.6 = said("set speed 100",5) or said("speed 100",5) or said("full speed",5) or said("full throttle",5) or said("maximum speed",5)
  58. key.F5 = said("set speed minus 25",5) or said ("speed minus 25",5)
  59. key.F6 = said("set speed minus 50",5) or said ("speed minus 50",5)
  60. key.F7 = said("set speed minus 75",5) or said ("speed minus 75",5)
  61. key.F8 = said("set speed minus 100",5) or said ("speed minus 100",5) or said ("full negative speed",5)
  62.  
  63. // SPEED VARS
  64.  
  65. if said("set speed 25",5) or said("speed 25",5) or said("speed two five",5) then
  66.    var.ShipSpeed=25
  67. end if
  68. if said("set speed 50",5) or said("speed 50",5) or said("speed five zero",5) then
  69.    var.ShipSpeed=50
  70. end if
  71. if said("set speed 75",5) or said("speed 75",5) or said("speed seven five",5) then
  72.    var.ShipSpeed=75
  73. end if  
  74. if said("set speed 100",5) or said("speed 100",5) or said("full speed",5) or said("full throttle",5) or said("maximum speed",5) then
  75.    var.ShipSpeed=100
  76. end if  
  77. if said("set speed 0",5) or said("speed 0",5) or said("stop ship",5) or said("full stop",5) then
  78.    var.ShipSpeed=0
  79. end if
  80.  
  81. // THROTTLE/SPEED UP
  82. if said("throttle up",5) or said("speed up",5) then
  83.    if var.ShipSpeed==0 then
  84.       var.ShipSpeed=25
  85.       press key.9
  86.       release key.9
  87.    else if var.ShipSpeed==25 then
  88.       press key.8
  89.       release key.8
  90.       var.ShipSpeed=50
  91.    else if var.ShipSpeed==50 then
  92.       press key.7
  93.       release key.7
  94.       var.ShipSpeed=75
  95.    else if var.ShipSpeed==75 then
  96.       press key.6
  97.       release key.6
  98.       var.ShipSpeed=100
  99.    end if
  100. end if
  101.  
  102. // THROTTLE/SPEED DOWN
  103. if said("throttle down",5) or said("speed down",5) then
  104.    if var.ShipSpeed==100 then
  105.       press key.7
  106.       release key.7
  107.       var.ShipSpeed=75
  108.    else if var.ShipSpeed==75 then
  109.       press key.8
  110.       release key.8
  111.       var.ShipSpeed=50
  112.    else if var.ShipSpeed==50 then
  113.       press key.9
  114.       release key.9
  115.       var.ShipSpeed=25
  116.    else if var.ShipSpeed==25 then
  117.       press key.x
  118.       release key.x
  119.       var.ShipSpeed=0
  120.    end if
  121. end if
  122.  
  123. // FLIGHT MISCELLANEOUS
  124. key.LeftShift = said("engine boost",5) or said ("boost",5)
  125. key.c = said("FSD",5) or said ("frame shift",5) or said ("frame shift drive",5) or said ("warp",5) or said ("jump",5) or said ("super cruise",5) or said ("cancel charge",5) or said ("cancel warp",5) or said ("disengage",5)
  126.  
  127. // TARGETING
  128. key.t = said("target ahead",5) or said ("target",5)
  129. key.g = said("next ship",5) or said ("target next ship",5) or said ("cycle next ship",5)
  130. key.y = said("highest threat",5) or said ("next threat",5) or said ("threat",5) or said ("target threat",5)
  131. key.h = said("hostile",5) or said ("target next hostile",5) or said ("target hostile",5) or said ("cycle hostile",5)
  132. key.j = said("target subsystem",5) or said ("next subsystem",5) or said ("subsystem",5) or said ("cycle subsystem",5)
  133.  
  134. // WEAPONS
  135. key.1 = said("cycle group",5) or said ("weapons group",5) or said ("fire group",5) or said("cycle weapons",5)
  136.  
  137. if said("deploy weapons",5) or said("deploy hard points",5) or said("weapons on",5) or said("weapons online",5) then
  138.    if var.HardPoints==0 then
  139.       press key.u
  140.       release key.u
  141.       var.HardPoints=1
  142.    end if
  143. else if said("retract weapons",5) or said("retract hard points",5) or said("weapons off",5) or said("weapons offline",5) then
  144.    if var.HardPoints==1 then
  145.       press key.u
  146.       release key.u
  147.       var.HardPoints=0
  148.    end if
  149. end if
  150.  
  151. // COOLING
  152. key.delete = said("silent running",5) or said ("disable silent running",5) or said("silent mode",5) or said ("disable silent mode",5) or said ("go silent",5) or said ("disable silent",5)
  153. key.end = said("heat sink",5) or said ("deploy heat sink",5)
  154.  
  155. // MISCELLANEOUS
  156. key.l = said("ship lights",5) or said ("ship lights on",5) or said ("ship lights off",5) or said ("lights",5) or said ("lights on",5) or said ("lights off",5)
  157. key.F1,key.F1,key.F1,key.F1 = said("shields",5) or said ("full shields",5) or said ("systems",5) or said ("power systems",5) or said ("power to systems",5)
  158. key.F3,key.F3,key.F3,key.F3 = said("weapons",5) or said ("full weapons",5) or said ("power weapons",5) or said ("power to weapons",5)
  159. key.F2,key.F2,key.F2,key.F2 = said("engines",5) or said ("full engines",5) or said ("power engines",5) or said ("power to engines",5)
  160. key.F4 = said("balance",5) or said ("power balance",5) or said ("balance power",5)
  161. key.z = said("landing gear",5) or said ("deploy landing gear",5) or said ("retract landing gear",5)
  162. key.insert = said("cargo scoop",5) or said ("retract cargo scoop",5) or said("deploy cargo scoop",5)
  163. key.home = said("jettison cargo",5) or said ("release cargo",5) or said ("jettison all cargo",5)
  164. key.k = said("chaff launcher",5) or said ("launch chaff",5) or said ("chaff",5)
  165.  
  166. // MODE SWITCHES
  167. key.3 = said("target panel",5) or said ("one",5) or said ("panel left",5) or said("left panel",5) or said("left",5)
  168. key.4 = said("systems panel",5) or said ("four",5) or said ("panel right",5) or said("right panel",5) or said("right",5)
  169. key.5 = said("sensors panel",5) or said ("three",5) or said ("zoom",5) or said("radar panel",5) or said("radar",5) or said("zoom radar",5) or said("zoom out radar",5)
  170. key.backspace = said("comms panel",5) or said ("two",5) or said ("panel comms",5) or said("comms panel",5)
  171. key.f9 = said("galaxy map",5) or said ("open galaxy map",5)
  172.  
  173. // DOCKING
  174. key.3,key.e,key.e,key.space,key.s,key.space,key.3 = said("requesting permission to dock",5) or said("docking permission",5)
  175.  
  176. //key. = said("",5) or said ("",5) or said ("",5)
  177.  
  178. end if
  179.  
  180. /*
  181. if said("disable voice commands",5) or said("stop listening",5) then
  182.    var.listen=false
  183.    say("disabled")
  184. end if
  185. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement