Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.castStatic = function (target) {
- var staticrange, hpmax,
- staticlevel = me.getSkill(42, 1);
- if (!target || staticlevel <= 0 || Config.CastStatic === 100) {
- return false;
- }
- staticrange = Math.floor((5 + staticlevel - 1) * 2 / 3);
- hpmax = target.hpmax;
- while (Math.floor(target.hp * 100 / hpmax) > Config.CastStatic) {
- if (getDistance(me, target) > staticrange) {
- Attack.getIntoPosition(target, staticrange);
- }
- Skill.cast(42, 0);
- }
- return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement