Advertisement
MrTrala

Examples Control by Voice

Feb 10th, 2016
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. --[[
  2. Asdasdasd By trala and shit
  3. ]]
  4.  
  5. config = {
  6.     leaderName = {"Mr Trilo", "Saul Pallavicino", "Etc"}
  7. }
  8.  
  9. LocalSpeechProxy.OnReceive("StepsNShit", function(proxy, mtype, speaker, level, text)
  10.     if text == "east" and (table.find(config.leaderName, speaker)) then
  11.         Self.Step(EAST) -- Walks EAST
  12.  
  13.     elseif text == "south" and (table.find(config.leaderName, speaker)) then
  14.         Self.Step(SOUTH) -- Walks SOUTH
  15.        
  16.     elseif text == "north" and (table.find(config.leaderName, speaker)) then
  17.         Self.Step(NORTH) -- Walks NORTH
  18.    
  19.     elseif text == "west" and (table.find(config.leaderName, speaker)) then
  20.         Self.Step(WEST) -- Walks WEST
  21.  
  22.     elseif text == "Drop EXP POTS" and (table.find(config.leaderName, speaker)) then
  23.     Self.CloseContainers()
  24.     Self.OpenMainBackpack()
  25.     Self.DropItem(911, 1075, 6, 11372) -- An example of how to drop items at XYZ "Self.DropItem(X, Y, Z, ITEMID)"
  26.    
  27.     elseif text == "exit" and (table.find(config.leaderName, speaker)) then
  28.     os.exit() -- If you told your MC char "exit" os.exit will force close that client
  29.    
  30.     elseif text == "go label start" and (table.find(config.leaderName, speaker)) then
  31.     Walker.Goto("start")
  32.     Walker.Start() -- An example on how to program CaveBot Labels (Very useful if you want to have ALOT of wayps)
  33.     end
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement