Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. this.castStatic = function (target) {
  2. var staticrange, hpmax,
  3. staticlevel = me.getSkill(42, 1);
  4.  
  5. if (!target || staticlevel <= 0 || Config.CastStatic === 100) {
  6. return false;
  7. }
  8.  
  9. staticrange = Math.floor((5 + staticlevel - 1) * 2 / 3);
  10. hpmax = target.hpmax;
  11.  
  12. while (Math.floor(target.hp * 100 / hpmax) > Config.CastStatic) {
  13. if (getDistance(me, target) > staticrange) {
  14. Attack.getIntoPosition(target, staticrange);
  15. }
  16.  
  17. Skill.cast(42, 0);
  18. }
  19.  
  20. return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement