Advertisement
kolton

Untitled

Aug 15th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function staticBoss(id, percent) {
  2. var i, unit, staticRange;
  3.  
  4. for (i = 0; i < 5 && !unit; i += 1) {
  5. unit = getUnit(1, id);
  6.  
  7. delay(200);
  8. }
  9.  
  10. if (!unit) {
  11. return false;
  12. }
  13.  
  14. // Static
  15. if (me.getSkill(42, 1) && Attack.checkResist(unit, "lightning") && Math.round(unit.hp * 100 / unit.hpmax) > percent) {
  16. staticRange = Math.floor((me.getSkill(42, 1) + 4) * 2 / 3);
  17.  
  18. while (Math.round(unit.hp * 100 / unit.hpmax) > percent) {
  19. if (getDistance(me, unit) > staticRange || checkCollision(me, unit, 0x4)) {
  20. if (!Attack.getIntoPosition(unit, staticRange, 0x4)) {
  21. return false;
  22. }
  23. }
  24.  
  25. if (!Skill.cast(42, 0)) {
  26. return false;
  27. }
  28. }
  29. }
  30.  
  31. return true;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement