Thread: [pi]NPC melee/mage attack

Results 1 to 6 of 6
  1. #1 [pi]NPC melee/mage attack 
    Registered Member
    Join Date
    Nov 2008
    Posts
    423
    Thanks given
    19
    Thanks received
    9
    Rep Power
    49
    How can I get a npc haveing two attack stiles.
    Also that I can add the emote/gfx to it. thanks

    Question two:
    Where do I add block emotes for npcs?
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,421
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    Both npc handler.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2008
    Posts
    423
    Thanks given
    19
    Thanks received
    9
    Rep Power
    49
    Yes, I know that..
    Just under what void and could u give me an example of code what im asking for.
    Reply With Quote  
     

  4. #4  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,421
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    Ermm kinda like this...

    search for
    Code:
    	public int getDeadEmote(int i) {
    Under all the cases add
    Code:
    	public int getBlockEmote(int i) {
    		switch(npcs[i].npcType) {
    Then use case for the npc id and return the animation.

    Ill give an example of two different attacks...

    under getAttack emote add something like..

    Code:
    			case 160: //zammy gws
    			if (npcs[i].attackType == 2)
    				return 6947;
    				else
    				if (npcs[i].attackType == 1)
    					return 6945;
    Then further down search for public void loadspell

    Add the 2 attack types and any projectile you want....
    Code:
    			case 160:
    			random = Misc.random(1);
    			npcs[i].attackType = 1 + random;
    				if (npcs[i].attackType == 2) {
    					npcs[i].projectileId = -1;				
    				} else {
    					npcs[i].attackType = 1;
    					//npcs[i].projectileId = 1198;
    				}
    			break;
    It's just an example though, there may be easier ways but you get the general idea.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2008
    Posts
    423
    Thanks given
    19
    Thanks received
    9
    Rep Power
    49
    Could you explain the loadspell part some more?
    Reply With Quote  
     

  6. #6  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,421
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    I don't have much knowledge on this, but basically its how random the attack is, just shows that it could randomly attack with attType 2 which from my example would be animation 6947, or attType 1 which would be 6945, the projectile id would be gfx, if not wanted comment it or -1.
    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
  •