Thread: [PI] NPCs With Melee Attack

Results 1 to 7 of 7
  1. #1 [PI] NPCs With Melee Attack 
    Registered Member
    Join Date
    Mar 2013
    Posts
    38
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    I currently have found out that my NPCs that are called for melee attacks, will hit 0s every single hit even if we change everything around in NPCHandler. You will have 1 def and, lets say bork, bork will hit 0s constantly. Can anyone help?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Nice Boots View Post
    I currently have found out that my NPCs that are called for melee attacks, will hit 0s every single hit even if we change everything around in NPCHandler. You will have 1 def and, lets say bork, bork will hit 0s constantly. Can anyone help?
    What do you mean change stuff in Npchandler. If you're using pi, npc attacks def and maxhits are handled in the autospawn
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2013
    Posts
    38
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Karma_K View Post
    What do you mean change stuff in Npchandler. If you're using pi, npc attacks def and maxhits are handled in the autospawn
    Yea, I changed max hit for bork to like 1000 and he still hits 0s repeatedly
    Reply With Quote  
     

  4. #4  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Nice Boots View Post
    Yea, I changed max hit for bork to like 1000 and he still hits 0s repeatedly
    Post his autospawn
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2013
    Posts
    38
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Karma_K View Post
    Post his autospawn

    Code:
    spawn = 7133	3239	3747	0	1	1000	355	355	bork
    Reply With Quote  
     

  6. #6  
    Donator
    Darkness's Avatar
    Join Date
    Nov 2012
    Age
    26
    Posts
    876
    Thanks given
    121
    Thanks received
    75
    Rep Power
    47
    NpcHandler.java
    Code:
    	 public int getMaxHit(int i) {
    Here's mine :

    Code:
    		 case 7133:
    			 return 58;

    I think if that's not defined it prob won't hit. I had the same problem with bork

    Try using this by the way :


    Code:
    spawn = 7133	3239	3747	0	1	60	1000	355	bork
    As 1000 was the max hit, 355 and 355 were attack and def respectively

    In my game it was 50-600-400 and worked pretty good.

    I still thought it wasn't powerfull enough and here's what I did :
    In npcHandler
    Code:
    	 public void loadSpell(int i) {
    Added this somewhere


    Code:
    		 case 7133:
    			 random = Misc.random(2);
    			 npcs[i].attackType = 0 + random;
    			 if (npcs[i].attackType == 1) {
    				 npcs[i].projectileId = 26;
    			 } else {
    				 npcs[i].forceChat("DIE!!!");
    				 npcs[i].attackType = 2;
    				 npcs[i].projectileId = 2183;
    			 }
    			 break;
    so it would also mage I beleive, and hit throught melee prayer.

    Also where if you want it that way you have to add this in

    public static int getAttackEmote(int i) {

    Code:
    		case 7133://bork
    			if (npcs[i].attackType == 1)
    				return 8754;
    			else
    				if (npcs[i].attackType == 2)
    					return 8754;
    Attached image
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Mar 2013
    Posts
    72
    Thanks given
    0
    Thanks received
    4
    Rep Power
    11
    Code:
    	public int getMaxHit(int i) {
    			switch (npcs[i].npcType) {
    			case 7133:
    			if (npcs[i].attackType == 0)
    				return 30;
    			else
    			if (npcs[i].attackType == 1)
    				return 40;
    			else
    			if (npcs[i].attackType == 2)
    				return 50;
    That is for bork should fix your problem.
    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] NPC Death and Attack Animations
    By Karma_K in forum Help
    Replies: 3
    Last Post: 01-22-2013, 10:14 PM
  2. [pi] NPC won't attack if object is in the way
    By xxskylarscapexx in forum Help
    Replies: 0
    Last Post: 02-28-2012, 06:07 PM
  3. [PI] NPCs with variable combat level
    By purepout in forum Help
    Replies: 13
    Last Post: 03-18-2011, 01:10 AM
  4. [PI]NPC New model attack emotes?
    By Xyger in forum Help
    Replies: 3
    Last Post: 08-26-2010, 01:34 AM
  5. Replies: 0
    Last Post: 06-26-2010, 05:45 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
  •