Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. =begin
  2. Documentation: https://elanthipedia.play.net/Lich_script_repository#crossing-training
  3. =end
  4.  
  5. custom_require.call(%w(drinfomon spellmonitor common common-arcana drinfomon events))
  6.  
  7. class AutoFeast
  8. include DRC
  9. include DRCA
  10.  
  11. def initialize
  12. @settings = get_settings
  13. echo DRStats.mana
  14. echo DRStats.health
  15. monitor
  16. end
  17.  
  18. def monitor
  19. loop do
  20. pause until DRStats.spirit >= 80
  21. fix_health if DRStats.health < 55
  22. fix_mana if DRStats.mana < 20
  23. end
  24. end
  25.  
  26. def feast(spell, settings)
  27. prepare?(spell['abbrev'], spell['mana'], spell['symbiosis'])
  28. find_charge_invoke_stow(settings.cambrinth, settings.stored_cambrinth, settings.cambrinth_cap, settings.dedicated_camb_use, spell['cambrinth'])
  29. if spell['prep_time']
  30. pause #{spell['prep_time']}
  31. else
  32. waitcastrt?
  33. end
  34. cast?(spell['cast'], spell['symbiosis'], spell['before'], spell['after'])
  35. end
  36.  
  37. def fix_health
  38. heal_spell = @settings.feast_vit
  39. feast(heal_spell, @settings)
  40. end
  41. def fix_mana
  42. mana_spell = @settings.feast_mana
  43. feast(mana_spell, @settings)
  44. end
  45.  
  46. end
  47. AutoFeast.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement