Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. --Lazar
  2. --#main
  3.  
  4. --#panels
  5.  
  6. --#macros
  7. local singleTargetSpell = 'uber exori gran'
  8. local multiTargetSpell = 'uber exori gran'
  9. local strongTargetSpell = 'exori gran mas'
  10. local distance = 3
  11. local amountOfMonsters = 2
  12.  
  13. macro(250, "multi target spell", function()
  14. local specAmount = 0
  15. if not g_game.isAttacking() then
  16. return
  17. end
  18. for i,mob in ipairs(getSpectators()) do
  19. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
  20. specAmount = specAmount + 1
  21. end
  22. end
  23. if (specAmount >= amountOfMonsters) then
  24. say(strongTargetSpell)
  25. say(multiTargetSpell)
  26. else
  27. say(strongTargetSpell)
  28. say(singleTargetSpell)
  29. end
  30. end)
  31.  
  32. local singleTargetSpell = 'uber exori gran'
  33. local multiTargetSpell = 'uber exori gran'
  34. local strongTargetSpell = 'exori gran mas'
  35. local distance = 3
  36. local amountOfMonsters = 1
  37.  
  38. macro(250, "PVP target spell", function()
  39. local specAmount = 0
  40. if not g_game.isAttacking() then
  41. return
  42. end
  43. for i,mob in ipairs(getSpectators()) do
  44. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isPlayer()) then
  45. specAmount = specAmount + 1
  46. end
  47. end
  48. if (specAmount >= amountOfMonsters) then
  49. say(strongTargetSpell)
  50. say(multiTargetSpell)
  51. else
  52. say(strongTargetSpell)
  53. say(singleTargetSpell)
  54. end
  55. end)
  56. --
  57.  
  58. macro(2500, "open monster boxes", function()
  59. for i, tile in ipairs(g_map.getTiles(posz())) do
  60. for u,item in ipairs(tile:getItems()) do
  61. if (item:getId() == 9586) then
  62. g_game.use(item)
  63. return
  64. end
  65. end
  66. end
  67. end)
  68.  
  69. --
  70.  
  71. macro(1000, "invasion portal", function()
  72. for i, tile in ipairs(g_map.getTiles(posz())) do
  73. for u,item in ipairs(tile:getItems()) do
  74. if (item:getId() == 25058) then
  75. autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  76. end
  77. end
  78. end
  79. end)
  80.  
  81.  
  82. --
  83.  
  84. macro(1000, "black skull flames", function()
  85. for i, tile in ipairs(g_map.getTiles(posz())) do
  86. for u,item in ipairs(tile:getItems()) do
  87. if (item:getId() == 21463) then
  88. autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  89. end
  90. end
  91. end
  92. end)
  93.  
  94. --
  95.  
  96. local oldTarget
  97. macro(200, "hold target", function()
  98. if g_game.isAttacking() then
  99. oldTarget = g_game.getAttackingCreature()
  100. end
  101. if (oldTarget and not g_game.isAttacking() and getDistanceBetween(pos(), oldTarget:getPosition()) <= 8) then
  102. g_game.attack(oldTarget)
  103. end
  104. end)
  105.  
  106. --
  107.  
  108. local manaId = 28649
  109. local manaPercent = 95
  110. macro(200, "faster potting", function()
  111. if (hppercent() <= manaPercent) then
  112. usewith(manaId, player)
  113. end
  114. end)
  115.  
  116. --
  117.  
  118. --#hotkeys
  119.  
  120. --#callbacks
  121.  
  122. --#other
  123. onAddThing(function(tile, thing)
  124. if thing:isItem() and thing:getId() == 2129 then
  125. local pos = tile:getPosition().x .. "," .. tile:getPosition().y .. "," .. tile:getPosition().z
  126. if not storage[pos] or storage[pos] < now then
  127. storage[pos] = now + 20000
  128. end
  129. tile:setTimer(storage[pos] - now)
  130. end
  131. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement