Guest User

Untitled

a guest
Nov 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. init start
  2. local monsters = {"Grim Reaper"}
  3. local playersetup = {checkplayers = true, checkonlyonfloor = false, maxplayerdist = 7, safelist = {'Bubble', 'Eternal Oblivion'}}
  4. local spells = {
  5. {name = 'Divine Caldera', monsteramount = 2}
  6.  
  7. }
  8. --dont change things below
  9. local searchtype = 'p'
  10. if playersetup.checkonlyfloor then searchtype = 'pf' end
  11. table.lower(playersetup.safelist)
  12. table.lower(monsters)
  13. for i,j in ipairs(spells) do
  14. if spells[i].name ~= 'strike' and spells[i].name ~= 'strong strike' then
  15. spells[i].info = spellinfo(j.name)
  16. if not spells[i].info then
  17. table.remove(spells,i)
  18. end
  19. end
  20. if spells[i].info and table.find({'front', 'bigbeam','smallbeam','bigwave','smallwave','strike'},spells[i].info.condition) then
  21. spells[i].needdir = true
  22. else
  23. spells[i].needdir = false
  24. end
  25. end
  26. local function haveplayer()
  27. if playersetup.checkplayers then
  28. foreach creature p searchtype do
  29. if p ~= $self and p.dist <= playersetup.maxplayerdist and not table.find(playersetup.safelist,p.name:lower()) then
  30. return true
  31. end
  32. end
  33. end
  34. return false
  35. end
  36. init end
  37.  
  38. auto(100)
  39. for i,j in ipairs(spells) do
  40. if (j.info and cancastspell(j.info)) or cancastspell(j.name,$attacked) then
  41. if not haveplayer() and j.monsteramount then
  42. local highest,bestdir = 0
  43. if j.needdir then
  44. highest, bestdir = 0
  45. local dirs = {w = 0, e = 0, n = 0, s = 0}
  46. for a,b in pairs(dirs) do
  47. b = maroundspell(j.info.condition, a, table.unpack(monsters))
  48. if b > highest or (b >= highest and a == $self.dir) then
  49. highest = b
  50. bestdir = a
  51. end
  52. end
  53. else
  54. highest = maroundspell(j.info.condition, table.unpack(monsters))
  55. bestdir = $self.dir
  56. end
  57. if highest >= j.monsteramount then
  58. if $self.dir ~= bestdir then turn(bestdir) wait(50,70) end
  59. cast(j.info.words)
  60. wait(cooldown('attack'))
  61. end
  62. elseif j.targethp and $attacked.id ~= 0 and $attacked.hppc <= j.targethp and cancastspell(j.info,$attacked) then
  63. cast(j.info.words)
  64. wait(cooldown('attack'))
  65. end
  66. end
  67. end
Add Comment
Please, Sign In to add comment