Thread: [Azure]Non-aggresive at Double Combat

Results 1 to 2 of 2
  1. #1 [Azure]Non-aggresive at Double Combat 
    Registered Member
    Join Date
    May 2013
    Posts
    6
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Basically my server has aggressive NPC's and I understand how to make them aggressive and stop following after certain distance. But you're supposed to not aggro monsters who you have double the combat lvl. Example: lvl 20 dark wizard is aggressive but when I am level 40 cb he stops being aggressive toward me. How would I do this? I am guessing it would be in the NPCHandler.java somewhere.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,253
    Thanks given
    1,145
    Thanks received
    909
    Rep Power
    2081
    create an integer that receives the NPCs combat level and before calling the attack code insert a simple if statement to check if the player's combat level is less than double.

    to give an example:
    Code:
    int npcCombatLevel = npc.getCombatLevel();
    if(player.getCombatLevel() <(npc.getCombatLevel() * 2)) {
    	// do aggression.
    }
    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. Replies: 12
    Last Post: 07-14-2010, 08:17 AM
  2. Replies: 10
    Last Post: 03-15-2009, 12:08 AM
  3. What 99 NON-combat skill would you like?
    By P Hatz Own in forum Voting
    Replies: 83
    Last Post: 05-04-2008, 07:01 PM
  4. Combat? Or non-combat?
    By Mdog in forum Voting
    Replies: 6
    Last Post: 04-28-2008, 03:29 AM
  5. How To Make Your Own (Non-Combat) Skill
    By hawaii84 in forum Tutorials
    Replies: 3
    Last Post: 11-15-2007, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •