Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. ---Rune Shooter
  2.  
  3. init start
  4. local creatureNames = {
  5. 'Bonebeast',
  6. 'Necromancer',
  7. 'Crypt Shambler',
  8. 'Demon Skeleton',
  9. }
  10.  
  11. local spells = {
  12. }
  13.  
  14. local areaRunes = {
  15. {name = "avalanche rune", amount = 3}
  16. }
  17.  
  18. local targetRunes = {
  19. }
  20.  
  21. local players = {
  22. distance = 20,
  23. safeList = {"Bubble", "Eternal Oblivion"},
  24. floorDifference = 1
  25. }
  26.  
  27. local strongStrike = false
  28.  
  29. -- DON'T EDIT BELOW THIS LINE IF YOU DON'T KNOW WHAT YOU'RE DOING --
  30. --------------------------------------------------------------------
  31.  
  32.  
  33. local shootDir = {'n', 'w', 's', 'e'}
  34.  
  35.  
  36. local quitLoop = 0
  37. local exhaustTime = 0
  38. local strongExhaustTime = 0
  39. local countTries = 0
  40. local areaCountLow = 10
  41. local spellCountLow = 10
  42.  
  43. for i,j in pairs(spells) do
  44. if spellCountLow > spells[i].amount then
  45. spellCountLow = spells[i].amount
  46. end
  47. spells[i].monsters = spells[i].monsters or creatureNames
  48. end
  49.  
  50. for i,j in pairs(areaRunes) do
  51. if areaCountLow > areaRunes[i].amount then
  52. areaCountLow = areaRunes[i].amount
  53. end
  54. areaRunes[i].monsters = areaRunes[i].monsters or creatureNames
  55. end
  56.  
  57. for i,j in pairs(targetRunes) do
  58. targetRunes[i].monsters = targetRunes[i].monsters or creatureNames
  59. end
  60.  
  61.  
  62. print('Started advanced mage shooter.')
  63. init end
  64.  
  65. auto(50, 100)
  66.  
  67. if $wptsection ~= 'Hunt' then
  68. return
  69. end
  70.  
  71. local consider = getuseroption('consider')
  72.  
  73. quitLoop = 0
  74.  
  75.  
  76. if $lastprojectile.tox == $attacked.posx and $lastprojectile.toy == $attacked.posy and $lastprojectile.fromx == $posx and $lastprojectile.fromy == $posy then
  77. exhaustTime = $timems
  78. end
  79.  
  80. if $timems >= exhaustTime then
  81. if not consider or paroundfloorignore(players.distance, players.floorDifference, unpack(players.safeList)) == 0 then
  82. -- Spells
  83. if maround(8) >= spellCountLow and spells[1] ~= nil then
  84. for i,_ in pairs(spells) do
  85. if cancast(spells[i].name) then
  86. for j,_ in pairs(shootDir) do
  87. if maroundspell(spells[i].name, shootDir[j], unpack(spells[i].monsters)) >= spells[i].amount then
  88. pausewalking(100)
  89. turn(shootDir[j])
  90. cast(spells[i].name)
  91. quitLoop = 1
  92. end
  93. end
  94. end
  95. end
  96. end
  97.  
  98. -- Area Runes
  99. if maround(8) >= areaCountLow and areaRunes[1] ~= nil and quitLoop ~= 1 then
  100. for i,_ in pairs(areaRunes) do
  101. runeArea = getarearunetile(false, unpack(areaRunes[i].monsters))
  102. if runeArea.amount >= areaRunes[i].amount and itemcount(areaRunes[i].name) ~= 0 then
  103. countTries = 0
  104. pausewalking(500)
  105. useitemon(areaRunes[i].name, 0, runeArea.tile)
  106. wait(500)
  107. countTries = 1
  108. if $lastprojectile.time <= exhaustTime then
  109. countTries = 2
  110. end
  111. quitLoop = 1
  112. end
  113. end
  114. end
  115. end
  116.  
  117. -- Targetrunes and strikes
  118. if $attacked.id ~=0 and quitLoop == 0 then
  119. if maround(7, unpack(targetRunes[1].monsters)) >= targetRunes[1].amount then
  120. useoncreature(targetRunes[1].name, $target)
  121. elseif $timems >= strongExhaustTime and strongStrike then
  122. caststrongstrike(1000)
  123. strongExhaustTime = $timems + 5000
  124. else
  125. caststrike(1000)
  126. end
  127. end
  128.  
  129. -- Add exhaust time, takes into account if you missfire an area rune
  130. exhaustTime = $timems + 1000 - countTries*500
  131. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement