armark1ng

Untitled

Sep 4th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. package com.rs.game.npc.combat.impl;
  2.  
  3. import com.rs.game.Entity;
  4. import com.rs.game.npc.NPC;
  5. import com.rs.game.npc.combat.CombatScript;
  6. import com.rs.game.npc.combat.NPCCombatDefinitions;
  7. import com.rs.game.npc.vorago.StoneClone;
  8. import com.rs.game.player.Player;
  9. import com.rs.game.player.content.Combat;
  10.  
  11. public class StoneCloneCombat extends CombatScript {
  12.  
  13. @Override
  14. public Object[] getKeys() {
  15. return new Object[] { 17158, 17159, 17160 };// melee,range,mage
  16. }
  17.  
  18. private StoneClone clone;
  19.  
  20. @Override
  21. public int attack(NPC npc, Entity target) {
  22. clone = (StoneClone) npc;
  23. Player player = (Player) target;
  24. int combatType = clone.getId() == 17160 ? NPCCombatDefinitions.MAGE
  25. : clone.getId() == 17159 ? NPCCombatDefinitions.RANGE : NPCCombatDefinitions.MELEE;
  26. int damage = getRandomMaxHit(npc, 250, NPCCombatDefinitions.MELEE, target);
  27. delayHit(npc, 1, target, combatType == NPCCombatDefinitions.MELEE ? getMeleeHit(npc, damage)
  28. : combatType == NPCCombatDefinitions.RANGE ? getRangeHit(npc, damage) : getMagicHit(npc, damage));
  29. return 3;
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment