Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. local walk_button = modules.game_luniabot.walkButton;
  2.  
  3. function hasEffect(tile, effect)
  4. for i, fx in ipairs(tile:getEffects()) do
  5. if fx:getId() == effect then
  6. return true
  7. end
  8. end
  9. return false
  10. end
  11.  
  12. macro(100, "essence", function()
  13. for _, tile in pairs(g_map.getTiles(posz())) do
  14. if (hasEffect(tile, 56) or hasEffect(tile, 56)) then
  15. walk_button:setChecked(false)
  16. autoWalk(tile:getPosition(), 100, { ignoreNonPathable = true })
  17. schedule(5000, function() walk_button:setChecked(true); end)
  18. end
  19. end
  20. end)
  21.  
  22. macro(1000, "open monster flames", function()
  23. for i, tile in ipairs(g_map.getTiles(posz())) do
  24. for u,item in ipairs(tile:getItems()) do
  25. if (item:getId() == 25058) then
  26. autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  27. end
  28. end
  29. end
  30. end)
  31.  
  32. local manaId = 23374
  33. local manaPercent = 99
  34. macro(200, "faster mana potting", function()
  35. if (manapercent() <= manaPercent) then
  36. usewith(manaId, player)
  37. end
  38. end)
  39.  
  40. local healthId = 23374
  41. local healthPercent = 99
  42. macro(200, "faster health potting", function()
  43. if (hppercent() <= healthPercent) then
  44. usewith(healthId, player)
  45. end
  46. end)
  47.  
  48.  
  49. local healingSpell = 'Exura gran san'
  50. local hpPercent = 90
  51. macro(50, "faster healing", function()
  52. if (hppercent() <= hpPercent) then
  53. say(healingSpell)
  54. end
  55. end)
  56.  
  57. local singleTargetSpell = 'exori mas con'
  58. local multiTargetSpell = 'exevo mas san'
  59. local distance = 3
  60. local amountOfMonsters = 3
  61.  
  62. macro(250, "multi target spell", function()
  63. local specAmount = 0
  64. if not g_game.isAttacking() then
  65. return
  66. end
  67. for i,mob in ipairs(getSpectators()) do
  68. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
  69. specAmount = specAmount + 1
  70. end
  71. end
  72. if (specAmount >= amountOfMonsters) then
  73. say(multiTargetSpell)
  74. else
  75. say(singleTargetSpell)
  76. end
  77. end)
  78.  
  79. macro(500, "replace coins", function()
  80. for i, container in pairs(getContainers()) do
  81. for j, item in ipairs(container:getItems()) do
  82. if item:getCount() == 100 and item:getId() == 3031 then
  83. g_game.use(item)
  84. return
  85. end
  86. end
  87. end
  88. end)
  89.  
  90. local walkButton = modules.game_luniabot.walkButton
  91. function turnOnWalking()
  92. walkButton:setChecked(true)
  93. end
  94. macro(500, "Blackskull flames", function()for i, tile in ipairs(g_map.getTiles(g_game.getLocalPlayer():getPosition().z)) do
  95. if (tile) then
  96. for u,item in ipairs(tile:getItems()) do
  97. if (item) then
  98. if (item:getId() == 21463) then
  99. walkButton:setChecked(false)
  100. autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  101. schedule(5000, turnOnWalking);
  102. return
  103. end
  104. end
  105. end
  106. end
  107. end
  108. end)
  109.  
  110. macro(1000, "activate follow", function() g_game.setChaseMode(1) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement