Guest User

Untitled

a guest
Oct 16th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. init start
  2. local monsters = {'Dragon Lord', 'Dragon'}
  3. local monsterscount = 2
  4. local safelist = {}
  5. local checkplayers = true
  6. local consideronlyfloor = false
  7. local runeorspell = 'avalanche rune' -- Change this to 'avalanche', or 'stone shower', or 'thunderstorm', or 'great fireball'
  8. local spellmp = 0 -- mana that the spell waste -- Script By Derrek
  9. for i=1, #safelist do safelist[i] = safelist[i]:lower() end
  10. for i=1, #monsters do monsters[i] = monsters[i]:lower() end
  11. init end
  12.  
  13. auto(100)
  14. local monstersaround,foundplayer,m,searchtype,i = 2, false
  15. foreach creature m '' do
  16. if m ~= $target and isonspellarea(m,'3x3') then
  17. local cname = m.name:lower()
  18. if m.ismonster then
  19. i = 1
  20. while (i <= #monsters) and (monsters[i] ~= cname) do
  21. i = i+1
  22. end
  23. if (i <= #monsters) or #monsters == 0 then
  24. monstersaround = monstersaround+1
  25. end
  26. elseif not foundplayer and (not consideronlyfloor or m.posz == $posz) then
  27. i = 1
  28. while (i <= #safelist) and (safelist[i] ~= cname) do
  29. i = i+1
  30. end
  31. if (i > #monsters) or #monsters == 0 then
  32. foundplayer = true
  33. end
  34. end
  35. end
  36. end
  37. if (monstersaround >= monsterscount) and (runeorspell ~= 'exori con' or $mp >= spellmp) and (not foundplayer) then
  38. if runeorspell == 'exori con' then
  39. cast(runeorspell)
  40. else
  41. useoncreature(runeorspell,$target)
  42. end
  43. wait(900,1200)
  44. end
Add Comment
Please, Sign In to add comment