Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- init start
- local monsters = {"Grim Reaper"}
- local playersetup = {checkplayers = true, checkonlyonfloor = false, maxplayerdist = 7, safelist = {'Bubble', 'Eternal Oblivion'}}
- local spells = {
- {name = 'Divine Caldera', monsteramount = 2}
- }
- --dont change things below
- local searchtype = 'p'
- if playersetup.checkonlyfloor then searchtype = 'pf' end
- table.lower(playersetup.safelist)
- table.lower(monsters)
- for i,j in ipairs(spells) do
- if spells[i].name ~= 'strike' and spells[i].name ~= 'strong strike' then
- spells[i].info = spellinfo(j.name)
- if not spells[i].info then
- table.remove(spells,i)
- end
- end
- if spells[i].info and table.find({'front', 'bigbeam','smallbeam','bigwave','smallwave','strike'},spells[i].info.condition) then
- spells[i].needdir = true
- else
- spells[i].needdir = false
- end
- end
- local function haveplayer()
- if playersetup.checkplayers then
- foreach creature p searchtype do
- if p ~= $self and p.dist <= playersetup.maxplayerdist and not table.find(playersetup.safelist,p.name:lower()) then
- return true
- end
- end
- end
- return false
- end
- init end
- auto(100)
- for i,j in ipairs(spells) do
- if (j.info and cancastspell(j.info)) or cancastspell(j.name,$attacked) then
- if not haveplayer() and j.monsteramount then
- local highest,bestdir = 0
- if j.needdir then
- highest, bestdir = 0
- local dirs = {w = 0, e = 0, n = 0, s = 0}
- for a,b in pairs(dirs) do
- b = maroundspell(j.info.condition, a, table.unpack(monsters))
- if b > highest or (b >= highest and a == $self.dir) then
- highest = b
- bestdir = a
- end
- end
- else
- highest = maroundspell(j.info.condition, table.unpack(monsters))
- bestdir = $self.dir
- end
- if highest >= j.monsteramount then
- if $self.dir ~= bestdir then turn(bestdir) wait(50,70) end
- cast(j.info.words)
- wait(cooldown('attack'))
- end
- elseif j.targethp and $attacked.id ~= 0 and $attacked.hppc <= j.targethp and cancastspell(j.info,$attacked) then
- cast(j.info.words)
- wait(cooldown('attack'))
- end
- end
- end
Add Comment
Please, Sign In to add comment