Thread: [PI] Npc executes both range and melee attacks?

Results 1 to 2 of 2
  1. #1 [PI] Npc executes both range and melee attacks? 
    Registered Member Herewizard's Avatar
    Join Date
    Mar 2012
    Posts
    144
    Thanks
    24
    Thanked 1 Time in 1 Post
    Rep Power
    11
    I would like to edit in Dagganoths. They use their range attack [1343] when 2 or more spaces away, and melee attack [1341] when they are within a square... The attack, block, and death animations are retrieved from the NPC.config file in my server... I really don't know where to go about this. Anybody have ideas?

    Here is my Ahrim The Blighted code in NPCHandler.java. It executes 3 different types of spells randomly. This is not exactly what I want for the dagganoths, as I don't want it to be random. They use range attack when further away from the player, and melee when within a square. Anyway, here's Ahrim:

    Code:
    			case 2025:
    			npcs[i].attackType = 2;
    			int r = Misc.random(3);
    			if(r == 0) {
    				npcs[i].gfx100(158);
    				npcs[i].projectileId = 159;
    				npcs[i].endGfx = 160;
    			}
    			if(r == 1) {
    				npcs[i].gfx100(161);
    				npcs[i].projectileId = 162;
    				npcs[i].endGfx = 163;
    			}
    			if(r == 2) {
    				npcs[i].gfx100(164);
    				npcs[i].projectileId = 165;
    				npcs[i].endGfx = 166;
    			}
    			if(r == 3) {
    				npcs[i].gfx100(155);
    				npcs[i].projectileId = 156;
    			}
    			break;
    Reply With Quote  
     

  2. #2  
    Registered Member Herewizard's Avatar
    Join Date
    Mar 2012
    Posts
    144
    Thanks
    24
    Thanked 1 Time in 1 Post
    Rep Power
    11
    Still in need
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Protect from Melee/Magic/Range on NPC's Improved
    By mrClassic in forum Snippets
    Replies: 11
    Last Post: 09-15-2011, 07:57 AM
  2. NPC immune against mage/melee/range
    By Lechuur in forum Snippets
    Replies: 6
    Last Post: 08-10-2011, 12:28 PM
  3. Combat, Npc Range of different attacks.
    By Serenity in forum RS 503+ Client & Server
    Replies: 17
    Last Post: 01-01-2010, 05:57 PM
  4. Replies: 7
    Last Post: 11-08-2009, 12:56 PM
  5. adding range following and melee
    By killamess in forum Tutorials
    Replies: 46
    Last Post: 09-19-2009, 07:31 PM
Tags for this Thread

View Tag Cloud

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