Advertisement
Guest User

Untitled

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