Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---Rune Shooter
- init start
- local creatureNames = {
- 'Bonebeast',
- 'Necromancer',
- 'Crypt Shambler',
- 'Demon Skeleton',
- }
- local spells = {
- }
- local areaRunes = {
- {name = "avalanche rune", amount = 3}
- }
- local targetRunes = {
- }
- local players = {
- distance = 20,
- safeList = {"Bubble", "Eternal Oblivion"},
- floorDifference = 1
- }
- local strongStrike = false
- -- DON'T EDIT BELOW THIS LINE IF YOU DON'T KNOW WHAT YOU'RE DOING --
- --------------------------------------------------------------------
- local shootDir = {'n', 'w', 's', 'e'}
- local quitLoop = 0
- local exhaustTime = 0
- local strongExhaustTime = 0
- local countTries = 0
- local areaCountLow = 10
- local spellCountLow = 10
- for i,j in pairs(spells) do
- if spellCountLow > spells[i].amount then
- spellCountLow = spells[i].amount
- end
- spells[i].monsters = spells[i].monsters or creatureNames
- end
- for i,j in pairs(areaRunes) do
- if areaCountLow > areaRunes[i].amount then
- areaCountLow = areaRunes[i].amount
- end
- areaRunes[i].monsters = areaRunes[i].monsters or creatureNames
- end
- for i,j in pairs(targetRunes) do
- targetRunes[i].monsters = targetRunes[i].monsters or creatureNames
- end
- print('Started advanced mage shooter.')
- init end
- auto(50, 100)
- if $wptsection ~= 'Hunt' then
- return
- end
- local consider = getuseroption('consider')
- quitLoop = 0
- if $lastprojectile.tox == $attacked.posx and $lastprojectile.toy == $attacked.posy and $lastprojectile.fromx == $posx and $lastprojectile.fromy == $posy then
- exhaustTime = $timems
- end
- if $timems >= exhaustTime then
- if not consider or paroundfloorignore(players.distance, players.floorDifference, unpack(players.safeList)) == 0 then
- -- Spells
- if maround(8) >= spellCountLow and spells[1] ~= nil then
- for i,_ in pairs(spells) do
- if cancast(spells[i].name) then
- for j,_ in pairs(shootDir) do
- if maroundspell(spells[i].name, shootDir[j], unpack(spells[i].monsters)) >= spells[i].amount then
- pausewalking(100)
- turn(shootDir[j])
- cast(spells[i].name)
- quitLoop = 1
- end
- end
- end
- end
- end
- -- Area Runes
- if maround(8) >= areaCountLow and areaRunes[1] ~= nil and quitLoop ~= 1 then
- for i,_ in pairs(areaRunes) do
- runeArea = getarearunetile(false, unpack(areaRunes[i].monsters))
- if runeArea.amount >= areaRunes[i].amount and itemcount(areaRunes[i].name) ~= 0 then
- countTries = 0
- pausewalking(500)
- useitemon(areaRunes[i].name, 0, runeArea.tile)
- wait(500)
- countTries = 1
- if $lastprojectile.time <= exhaustTime then
- countTries = 2
- end
- quitLoop = 1
- end
- end
- end
- end
- -- Targetrunes and strikes
- if $attacked.id ~=0 and quitLoop == 0 then
- if maround(7, unpack(targetRunes[1].monsters)) >= targetRunes[1].amount then
- useoncreature(targetRunes[1].name, $target)
- elseif $timems >= strongExhaustTime and strongStrike then
- caststrongstrike(1000)
- strongExhaustTime = $timems + 5000
- else
- caststrike(1000)
- end
- end
- -- Add exhaust time, takes into account if you missfire an area rune
- exhaustTime = $timems + 1000 - countTries*500
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement