Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. --Vagabond
  2. --#main
  3. addLabel("mapinfo", "-- [[ Mandatory Scripts ]] --")
  4.  
  5. local manaId = 28650
  6. local manaPercent = 95
  7. macro(200, "Potion Healing", function()
  8. if (manapercent() <= manaPercent) then
  9. usewith(manaId, player)
  10. end
  11. end)
  12.  
  13.  
  14. --#panels
  15.  
  16. --#macros
  17. addLabel("mapinfo", "-- [[ Spell Caster ]] --")
  18.  
  19.  
  20. local singleTargetSpell = 'exori max pura'
  21. local multiTargetSpell = 'exevo max frigo'
  22. local strongerTargetSpell = 'exevo gran max frigo'
  23. local buffTargetSpell = 'utito gran mas frigo'
  24. local distance = 3
  25. local amountOfMonsters = 2
  26.  
  27. macro(250, "Exp Caster", function()
  28. local specAmount = 0
  29. if not g_game.isAttacking() then
  30. return
  31. end
  32. for i,mob in ipairs(getSpectators()) do
  33. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
  34. specAmount = specAmount + 1
  35. end
  36. end
  37. if (specAmount >= amountOfMonsters) then
  38. say(buffTargetSpell)
  39. say(strongerTargetSpell)
  40. say(multiTargetSpell)
  41. else
  42. say(buffTargetSpell)
  43. say(strongerTargetSpell)
  44. say(singleTargetSpell)
  45. end
  46. end)
  47.  
  48. local singleTargetSpell = 'exori max pura'
  49. local strongSpell = 'exevo gran max frigo'
  50. local distance = 3
  51. local amountOfMonsters = 1
  52.  
  53. macro(250, "PVP Caster", function()
  54. local specAmount = 0
  55. if not g_game.isAttacking() then
  56. return
  57. end
  58. for i,mob in ipairs(getSpectators()) do
  59. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isPlayer()) then
  60. specAmount = specAmount + 1
  61. end
  62. end
  63. if (specAmount >= amountOfMonsters) then
  64. say(strongSpell)
  65. say(singleTargetSpell)
  66.  
  67. end
  68. end)
  69.  
  70. local singleTargetSpell = 'exori max pura'
  71. local strongTargetSpell = 'exevo gran max frigo'
  72. local buffTargetSpell = 'utito gran mas frigo'
  73. local distance = 3
  74. local amountOfMonsters = 1
  75.  
  76. macro(250, "Boss Caster", function()
  77. local specAmount = 0
  78. if not g_game.isAttacking() then
  79. return
  80. end
  81. for i,mob in ipairs(getSpectators()) do
  82. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
  83. specAmount = specAmount + 1
  84. end
  85. end
  86. if (specAmount >= amountOfMonsters) then
  87. say(buffTargetSpell)
  88. say(strongTargetSpell)
  89. say(singleTargetSpell)
  90. else
  91. say(buffTargetSpell)
  92. say(strongTargetSpell)
  93. say(singleTargetSpell)
  94. end
  95. end)
  96.  
  97.  
  98. local multiTargetSpell = 'exevo max frigo'
  99. local strongerTargetSpell = 'exevo gran max frigo'
  100. local buffTargetSpell = 'utito gran mas frigo'
  101. local distance = 3
  102. local amountOfMonsters = 1
  103.  
  104. macro(250, "Dungeon Caster", function()
  105. local specAmount = 0
  106.  
  107. for i,mob in ipairs(getSpectators()) do
  108. if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
  109. specAmount = specAmount + 1
  110. end
  111. end
  112. if (specAmount >= amountOfMonsters) then
  113. say(buffTargetSpell)
  114. say(strongerTargetSpell)
  115. say(multiTargetSpell)
  116. end
  117. end)
  118.  
  119. --
  120.  
  121. addLabel("mapinfo", "-- [[ Other Scripts ]] --")
  122.  
  123. --
  124.  
  125. local walkButton = modules.game_luniabot.walkButton
  126. function turnOnWalking()
  127. walkButton:setChecked(true)
  128. end
  129. function turnOffWalking()
  130. walkButton:setChecked(false)
  131. end
  132.  
  133. macro(500, "Exp Mode", function()
  134. for i, tile in ipairs(g_map.getTiles(posz())) do
  135. for u,item in ipairs(tile:getItems()) do
  136. if (item:getId() == 25058) or (item:getId() == 21463) then
  137. turnOffWalking()
  138. autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
  139. schedule(5000, turnOnWalking)
  140. elseif (item:getId() == 9586) then
  141. turnOffWalking()
  142. g_game.use(item)
  143. schedule(5000, turnOnWalking)
  144. delay(1500)
  145. end
  146. end
  147. end
  148. end)
  149.  
  150. --
  151.  
  152. function hasEffect(tile, effect)
  153. for i, fx in ipairs(tile:getEffects()) do
  154. if fx:getId() == effect then
  155. return true
  156. end
  157. end
  158. return false
  159. end
  160.  
  161. macro(100, "Arrows", function()
  162. for _, tile in pairs(g_map.getTiles(posz())) do
  163. if (hasEffect(tile, 56) or hasEffect(tile, 56)) then
  164. turnOffWalking();
  165. autoWalk(tile:getPosition(), 100, { ignoreNonPathable = true });
  166. schedule(5000, turnOnWalking);
  167. end
  168. end
  169. end)
  170.  
  171. --
  172.  
  173. local playerToFollow = 'Vithrax'
  174. macro(250, "Follow Vithrax", function()
  175. if g_game.isFollowing() then
  176. return
  177. end
  178. for _, followcreature in ipairs(g_map.getSpectators(pos(), false)) do
  179. if (followcreature:getName() == playerToFollow and getDistanceBetween(pos(), followcreature:getPosition()) <= 8) then
  180. g_game.follow(followcreature)
  181. end
  182. end
  183. end)
  184.  
  185. --
  186.  
  187. local friendList = {"Akalay", "Vithrax", "Lazar", "Boss Hunter"}
  188.  
  189. macro(100, "Heal Friend", function()
  190. for i, friendSio in ipairs(friendList) do
  191. local friend = getPlayerByName(friendSio)
  192. if friend and friend:getHealthPercent() < 90 then
  193. say("exura gran sio \"" .. friendSio)
  194. delay(1000)
  195. end
  196. end
  197. end)
  198.  
  199. --
  200.  
  201. macro(10, "Reattack", function()
  202. if (not g_game.isAttacking()) then
  203. attack(target);
  204. end
  205. end)
  206.  
  207. addLabel("mapinfo", "-- [[ Buttons ]] --")
  208.  
  209. addButton("Bosses", "Bosses", function()
  210. say("!bosses")
  211. end)
  212.  
  213. addButton("Spells", "Spells", function()
  214. say("!spells")
  215. end)
  216. --#hotkeys
  217.  
  218. --#callbacks
  219.  
  220. --#other
  221. onAddThing(function(tile, thing)
  222. if thing:isItem() and thing:getId() == 2129 then
  223. local pos = tile:getPosition().x .. "," .. tile:getPosition().y .. "," .. tile:getPosition().z
  224. if not storage[pos] or storage[pos] < now then
  225. storage[pos] = now + 20000
  226. end
  227. tile:setTimer(storage[pos] - now)
  228. end
  229. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement