Advertisement
MrTrala

Miner with commands

Sep 20th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.62 KB | None | 0 0
  1. --[[
  2.     Miner for ArchLightOnline
  3.     Version 1.0 - PRIV VERSION (Ownership; Cornelius)
  4.     Created by Mr Trala
  5.    
  6. Instructions;
  7. Don't use "stand" waypoints, that would make it slower (it will still work tho) use "nodes"
  8. It will start "mining" if you don't have anything targeting (so be sure to keep hold target off).
  9. You should use an script to kill invisible monster too.
  10. Should use a gold coin changer or gold coin droper.
  11. Have fun!
  12.  
  13. Credits to;
  14. Cornelius -- Idea
  15. Mr Trala -- Programmer
  16. ]]
  17.  
  18. config = {
  19.     RockID = {8503},  -- Items ID's to be "picked" - Can be various IDS ex; {8503, 1111, 2222, 3333, 5555}
  20.     PickID = 3456, --ID of your pick.
  21.     leaderName = {"Mr Trala"} -- Name of the leaders.
  22. }
  23.  
  24. LocalSpeechProxy.OnReceive("CommandCenter", function(proxy, mtype, speaker, level, text)
  25.     if text == "/start Mine" and (table.find(config.leaderName, speaker)) then
  26.         Module.Start('Miner')
  27.         print('The module with the name "Miner" has been started.')
  28.        
  29.     elseif text == "/stop Mine" and (table.find(config.leaderName, speaker)) then
  30.         Module.Stop('Miner')
  31.         print('The module with the name "Miner" has been stopped.')
  32.     end
  33. end)
  34.  
  35. Module.New('Miner', function(module)
  36. local pos = Self.Position()
  37.     if (Self.TargetID() <= 0) then
  38.         for y = -6, 6 do
  39.             for x = -6, 6 do
  40.                 if table.contains(config.RockID, Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id) then
  41.                     Walker.Stop()            
  42.                     Self.UseItemWithGround(config.PickID, pos.x + x, pos.y + y, pos.z)
  43.                     wait(900, 1200)
  44.                     module:Delay(math.random(50,60))
  45.                 end
  46.             end
  47.         end
  48.     end
  49. end, false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement