Thread: Need help using [fury] [Hyperion] cant attack player with magic and...

Results 1 to 7 of 7
  1. #1 Need help using [fury] [Hyperion] cant attack player with magic and... 
    Registered Member ryansheps's Avatar
    Join Date
    Feb 2013
    Posts
    129
    Thanks given
    8
    Thanks received
    3
    Rep Power
    13
    hello, guy's sorry about this. But i can't seem to Attack a Player with magic in wildy!

    and the only way i can attack a player anywhere is:

    what it does = Green
    what im using = Red
    what it also does! = Blue
    The text! = Black


    step 1: using mage on npc With The Spell Ice barrage

    step 2: it attack's the npc

    step 3: If you'r next to a player

    step 4: you click magic ice barrage on the player

    step 5: it then attack's the player "once" with ice barrage and it does it in the wildy aswell...




    Code for magic in playerCombat!


    Spoiler for Code Magic playercombat.java:
    Code:
    switch (type) {
    		case MAGIC:
    			SpellHandler.handleSpellEffect(player, victim);
    			if (player.getSpellId() > -1) {
    				player.setSpellId(-1);
    			}
    			break;
    		case MELEE:
    			break;
    		case RANGED:
    			Item arrows = player.getEquipment().get(Equipment.SLOT_ARROWS);
    			if (arrows != null) {
    				if (arrows.getCount() > 1) {
    					player.getEquipment().set(Equipment.SLOT_ARROWS, new Item(arrows.getId(), arrows.getCount() - 1));
    				} else {
    					player.getEquipment().remove(Equipment.SLOT_ARROWS, arrows);
    				}
    				Ranged.getSingleton().dropShootersArrow(player, victim, arrows);
    			}
    			break;
    
    		}
    	}
    
    	@Override
    	public int getDamageCalculation() {
    		switch (getAttackType()) {
    		case MAGIC:
    			return MagicCalculations.magicMaxHitModifier(player);
    		case MELEE:
    			return MeleeCalculations.calculateMeleeMaxHit(player, player.isUsingSpecial());
    		case RANGED:
    			return RangedCalculations.calculateRangedMaxHit(player, player.isUsingSpecial());
    		default:
    			break;
    
    		}
    		return 0;
    	}
    
    	@Override
    	public int getDefensiveCalculation(Entity attacker) {
    		switch (getAttackType()) {
    		case MAGIC:
    			return MagicCalculations.calculateMagicDefence(player);
    		case MELEE:
    			return (int) MeleeCalculations.calculateMeleeDefence(player);
    		case RANGED:
    			return RangedCalculations.calculateRangeDefence(player);
    		default:
    			break;
    
    		}
    		return 0;
    	}
    
    	@Override
    	public int getAttackCalculation() {
    		int output = 0;
    		switch (getAttackType()) {
    		case MAGIC:
    			output = MagicCalculations.calculateMagicAttack(player);
    			break;
    		case MELEE:
    			output = MeleeCalculations.calculateMeleeAttack(player, player.isUsingSpecial());
    			break;
    		case RANGED:
    			output = RangedCalculations.calculateRangeAttack(player);
    			break;
    
    		}
    		return output;
    	}
    
    	@Override
    	public int calculateAttackDelay() {
    		Item equip = player.getEquipment().get(3);
    		int delay = 4;
    		if (equip != null) {
    			delay = (WeaponLoader.getWeapon(equip.getId()).getAttackSpeed() / 600);
    		}
    		if (getAttackType() == AttackType.RANGED && getAttackStyle() != AttackStyle.AGGRESSIVE) {
    			delay++;
    		}
    		return delay;
    	}
    
    	@Override
    	public AttackType determineAttackType() {
    		return ((player.getSpellId() > 0 || player.getAutocastId() > 0) ? AttackType.MAGIC : Equipment.isRanging(player) ? AttackType.RANGED : AttackType.MELEE);
    	}
    
    	@Override
    	public boolean canUseRanged() {
    		return ArrowRequirements.canUseArrowWithBow(player);
    	}
    
    	@Override
    	public boolean canUseMage() {
    		return true;
    		//you can use magic if the return is false you can not use magic!
    	}
    
    
    	@Override
    	public int getHitDelayCalculation() {
    		switch (getAttackType()) {
    		case MELEE:
    			return 1;
    		case RANGED:
    		case MAGIC:
    			int distance = RS2Utils.distanceToPoint(player.getLocation(), player.getInteractingEntity().getLocation());
    			int modifier = 0;
    			switch (distance) {
    			case 4:
    			case 5:
    			case 6:
    			case 7:
    			case 8:
    				modifier = 1;
    				break;
    			}
    			return 3 + modifier;
    		default:
    			return 1;
    
    		}
    	}
    
    	@Override
    	public PlayerMagicDefinitions getMagicDefinition() {
    		PlayerMagicDefinitions def = MagicSpellLoader.getSpell(player.getSpellId() > -1 ? player.getSpellId() : player.getAutocastId() > -1 ? player.getAutocastId() : -1);
    		return def;
    	}
    
    	@Override
    	public Magic getMagic() {
    		return null;
    	}
    
    	@Override
    	public int getDistanceRequired(AttackType type) {
    		switch (type) {
    		case MAGIC:
    			return 8;
    		case MELEE:
    			return 1;
    		case RANGED:
    			return 7;
    		default:
    			return 1;
    		
    		}
    	}
    
    }





    Please help me

    Thanks

    -ryan
    Last edited by ryansheps; 05-03-2014 at 07:31 PM. Reason: codes
    advertisement removed
    [/URL]
    Reply With Quote  
     

  2. #2  
    Registered Member ryansheps's Avatar
    Join Date
    Feb 2013
    Posts
    129
    Thanks given
    8
    Thanks received
    3
    Rep Power
    13
    Bump!
    advertisement removed
    [/URL]
    Reply With Quote  
     

  3. #3  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Which version of Fury are yo using?
    Reply With Quote  
     

  4. #4  
    Registered Member ryansheps's Avatar
    Join Date
    Feb 2013
    Posts
    129
    Thanks given
    8
    Thanks received
    3
    Rep Power
    13
    1.3 my friend!
    advertisement removed
    [/URL]
    Reply With Quote  
     

  5. #5  
    Registered Member ryansheps's Avatar
    Join Date
    Feb 2013
    Posts
    129
    Thanks given
    8
    Thanks received
    3
    Rep Power
    13
    Bump!
    advertisement removed
    [/URL]
    Reply With Quote  
     

  6. #6  
    Registered Member ryansheps's Avatar
    Join Date
    Feb 2013
    Posts
    129
    Thanks given
    8
    Thanks received
    3
    Rep Power
    13
    Bump!
    advertisement removed
    [/URL]
    Reply With Quote  
     

  7. #7  
    Registered Member ryansheps's Avatar
    Join Date
    Feb 2013
    Posts
    129
    Thanks given
    8
    Thanks received
    3
    Rep Power
    13
    sort it out u noobs derepping me for no reason.....
    advertisement removed
    [/URL]
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. pi attack players with magic follow bug
    By Edd - in forum Buying
    Replies: 24
    Last Post: 03-29-2012, 10:31 PM
  2. [Z508]Cant attack players[Help]
    By refx nexus in forum Help
    Replies: 4
    Last Post: 03-14-2010, 06:38 PM
  3. Replies: 15
    Last Post: 01-13-2010, 02:57 AM
  4. cant attack players in pvp please help!!
    By Samdude151 in forum Help
    Replies: 4
    Last Post: 12-24-2009, 10:18 PM
  5. Need HELP PLEASE READ!!! [Hyperion]
    By Proland in forum Requests
    Replies: 2
    Last Post: 12-09-2009, 08:16 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •