SHARE
TWEET

Untitled

a guest Jan 17th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. local walk_button = modules.game_luniabot.walkButton;
  3.  
  4. function hasEffect(tile, effect)
  5.   for i, fx in ipairs(tile:getEffects()) do
  6.     if fx:getId() == effect then
  7.       return true
  8.     end
  9.   end
  10.   return false
  11. end
  12.  
  13. local walkButton = modules.game_luniabot.walkButton
  14. function turnOnWalking()
  15.   walkButton:setChecked(true)
  16. end
  17. macro(1000, "open monster boxes",  function()
  18.   local tiles = g_map.getTiles(posz());
  19.   for i = 1, #tiles do
  20.     local items = tiles[i]:getItems();
  21.     for i = 1, #items do
  22.       local item = items[i];
  23.       if (item and item:getId() == 9586) then
  24.         walkButton:setChecked(false)
  25.         g_game.use(item)
  26.         schedule(5000, turnOnWalking);
  27.         return
  28.       end
  29.     end
  30.   end
  31. end)
  32.  
  33. macro(100, "essence",  function()
  34.   for _, tile in pairs(g_map.getTiles(posz())) do
  35.     if (hasEffect(tile, 56) or hasEffect(tile, 56)) then
  36.       walk_button:setChecked(false)
  37.       autoWalk(tile:getPosition(), 100, { ignoreNonPathable = true })
  38.       schedule(5000, function() walk_button:setChecked(true); end)
  39.     end
  40.   end
  41. end)
  42.  
  43. macro(1000, "open monster flames",  function()
  44.   for i, tile in ipairs(g_map.getTiles(posz())) do
  45.       for u,item in ipairs(tile:getItems()) do
  46.           if (item:getId() == 25058) then
  47.             autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  48.           end
  49.         end
  50.     end
  51. end)
  52.  
  53. local manaId = 28650
  54. local manaPercent = 95
  55. macro(200, "faster mana potting",  function()
  56.   if (manapercent() <= manaPercent) then
  57.     usewith(manaId, player)
  58.   end
  59. end)
  60.  
  61. local healthId = 23374
  62. local healthPercent = 99
  63. macro(200, "faster health potting",  function()
  64.   if (hppercent() <= healthPercent) then
  65.     usewith(healthId, player)
  66.   end
  67. end)
  68.  
  69.  
  70. local healingSpell = 'Exura vita'
  71. local hpPercent = 90
  72. macro(50, "faster healing",  function()
  73.   if (hppercent() <= hpPercent) then
  74.     say(healingSpell)
  75.   end
  76. end)
  77.  
  78. local singleTargetSpell = 'exori gran pura'
  79. local multiTargetSpell = 'exevo mas pura'
  80. local fatal_spell = 'exevo gran max mort'
  81. local distance = 4
  82. local amountOfMonsters = 2
  83.  
  84. macro(250, "Multi target spell",  function()
  85.     local specAmount = 0
  86.     if not g_game.isAttacking() then
  87.         return
  88.     end
  89.     for i,mob in ipairs(getSpectators()) do
  90.         if (getDistanceBetween(player:getPosition(), mob:getPosition())  <= distance and mob:isMonster())  then
  91.             specAmount = specAmount + 1
  92.         end
  93.     end
  94.     if (specAmount >= amountOfMonsters) then
  95.         say(fatal_spell)
  96.         say(multiTargetSpell)
  97.     else
  98.         say(singleTargetSpell)
  99.     end
  100. end)
  101.  
  102.  
  103. macro(500, "replace coins", function()
  104.   for i, container in pairs(getContainers()) do
  105.     for j, item in ipairs(container:getItems()) do
  106.       if item:getCount() == 100 and item:getId() == 3031 then
  107.         g_game.use(item)
  108.         return
  109.       end
  110.     end
  111.   end
  112. end)
  113.  
  114. local playerToFollow = 'Twigz'
  115. macro(1000, "auto follow - twigz",  function()
  116.     if g_game.isFollowing() then
  117.         return
  118.     end
  119.     for _, followcreature in ipairs(g_map.getSpectators(pos(), false)) do
  120.         if (followcreature:getName() == playerToFollow and getDistanceBetween(pos(), followcreature:getPosition()) <= 8) then
  121.             g_game.follow(followcreature)
  122.         end
  123.     end
  124. end)
  125.  
  126. macro(1000, "activate follow", function() g_game.setChaseMode(1) end)
  127.  
  128.  
  129. local walkButton = modules.game_luniabot.walkButton
  130. function turnOnWalking()
  131.   walkButton:setChecked(true)
  132. end
  133. macro(500, "Blackskull flames",  function()for i, tile in ipairs(g_map.getTiles(g_game.getLocalPlayer():getPosition().z)) do
  134.   if (tile) then
  135.     for u,item in ipairs(tile:getItems()) do
  136.       if (item) then
  137.         if (item:getId() == 21463) then
  138.           walkButton:setChecked(false)
  139.           autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  140.           schedule(5000, turnOnWalking);
  141.           return
  142.         end
  143.       end
  144.     end
  145.   end
  146. end
  147. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top