Thread: I need a little help with npcs

Results 1 to 3 of 3
  1. #1 I need a little help with npcs 
    Banned

    Join Date
    Jul 2008
    Posts
    3,523
    Thanks given
    188
    Thanks received
    696
    Rep Power
    0
    ok, i know this will probably be an easy fix, but i dont really know where to start.

    Let's get to the point.

    The npcs on my server don't display block animations when they are being attacked.

    can i be directed to how or where i would be able to make it so the npcs display block animations when i attack them?


    Thanks in advance.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jan 2009
    Age
    31
    Posts
    2,661
    Thanks given
    66
    Thanks received
    207
    Rep Power
    0
    find were the npc take a damage and add this

    Code:
    npcs[i].DoBlockAnim();
    add these voids in NPC.java

    Code:
    private int getBlockAnim(){
    switch(npcType){
                case 1:
                        return 415:
                default:
                        return 415:
    }
    }
    Code:
    public void DoBlockAnim(){
    	animNumber = getBlockAnim();
    	animUpdateRequired = true;
    	updateRequired = true;
    }
    }
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jul 2008
    Posts
    3,523
    Thanks given
    188
    Thanks received
    696
    Rep Power
    0
    well i tried a number of things but i cant seem to get it to work, im not quite good with java things.

    where would i look for how the npc takes damage? atleast i can say i tried..

    i tried in a couple of these (in npc.java)
    Code:
    	public void appendNPCUpdateBlock(stream str) {
    	protected void appendHitUpdate(stream str) {
    was able to those voids without getting errors though.. tweaked 1 or 2 things to get them to work.

    just cant find the right spot where npcs take damage
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •