armark1ng

Untitled

Sep 4th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. package com.rs.game.npc.combat.impl;
  2.  
  3. import com.rs.game.Animation;
  4. import com.rs.game.Entity;
  5. import com.rs.game.npc.NPC;
  6. import com.rs.game.npc.combat.CombatScript;
  7. import com.rs.game.npc.combat.NPCCombatDefinitions;
  8. import com.rs.game.npc.vorago.Scopulus;
  9. import com.rs.game.player.Player;
  10. import com.rs.game.player.content.Combat;
  11. import com.rs.utils.Utils;
  12.  
  13. public class ScopulusCombat extends CombatScript {
  14.  
  15. @Override
  16. public Object[] getKeys() {
  17. return new Object[] { 17185 };
  18. }
  19.  
  20. @Override
  21. public int attack(NPC npc, Entity target) {
  22. Scopulus scop = (Scopulus) npc;
  23. NPCCombatDefinitions def = scop.getCombatDefinitions();
  24. scop.setNextAnimation(new Animation(def.getAttackEmote()));
  25.  
  26. for (Player player : scop.getVorago().getVoragoInstance().getPlayersOnBattle()) {
  27. if (player == null || player.isDead() || !Utils.isOnRange(scop, player, scop.isEnraged() ? 2 : 1))
  28. continue;
  29. int damage = getMaxHit(scop, 5600, Combat.MELEE_TYPE, player);
  30. damage *= scop.isEnraged() ? 1.2 : 1;
  31. delayHit(scop, 0, player, getMeleeHit(npc, damage));
  32. }
  33. return scop.isEnraged() ? 2 : 4;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment