Thread: [562] deflect curses!

Results 1 to 7 of 7
  1. #1 [562] deflect curses! 
    Banned
    Join Date
    May 2011
    Posts
    1,010
    Thanks given
    78
    Thanks received
    64
    Rep Power
    0
    i've added curses on my server but now the only thing that doesnt work is deflect with npc. in pvp it works but not in mvp... i just want the npcs to hit 0 when pray is on.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    May 2011
    Posts
    1,010
    Thanks given
    78
    Thanks received
    64
    Rep Power
    0
    bump
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jun 2010
    Posts
    595
    Thanks given
    76
    Thanks received
    100
    Rep Power
    87
    Im just gonna give you the code even though its spoonfeeding...

    Go to NPCvsPlayer class

    Find this line:
    Code:
    public void RangeAttack(Player p, NPC n) {
    in that method find this part:
    Code:
    				if (IsSpecial(n.getId())) {
    					SpecialNpcs(p, n);
    					return;
    				}
    Below that add this:
    Code:
    				if (p.DeflectRange == true) {
    				   if (rangeDamage > 3) {
    					n.hit(rangeDamage / 4);
    					p.graphics(2229);
    					p.animate(12573);
    				   } else {
    					n.hit(p, 1);
    					p.graphics(2229);
    					p.animate(12573);
    				}
    				}
    Now you have deflect range working..

    Find this line :
    Code:
    public void MeleeAttack(final Player p, NPC n) {
    In that method find this part
    Code:
    				if (IsSpecial(n.getId())) {
    					SpecialNpcs(p, n);
    					return;
    				}
    				final int meleeDamage = Misc.random(n.getMaxHit());
    Below that add this:
    Code:
    				if (p.DeflectMelee == true) {
    				   if (meleeDamage > 3) {
    					n.hit(meleeDamage / 4);
    					p.graphics(2230);
    					p.animate(12573);
    				   } else {
    					n.hit(p, 1);
    					p.graphics(2230);
    					p.animate(12573);
    				}
    				}
    Thats all i have right now, Try to create deflect mage from what i gave you.. and your welcome



    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    CloudIn

    Keiron''s Avatar
    Join Date
    Mar 2010
    Age
    34
    Posts
    336
    Thanks given
    32
    Thanks received
    99
    Rep Power
    134
    maybe it has to be in playervsnpc not npcvsplayer?
    Reply With Quote  
     

  6. #5  
    Registered Member

    Join Date
    Jun 2010
    Posts
    595
    Thanks given
    76
    Thanks received
    100
    Rep Power
    87
    Nope, NPCvsPlayer is the one working for me.


    Reply With Quote  
     

  7. #6  
    Banned
    Join Date
    May 2011
    Posts
    1,010
    Thanks given
    78
    Thanks received
    64
    Rep Power
    0
    works for me ty very much
    Reply With Quote  
     

  8. #7  
    Registered Member

    Join Date
    Jun 2010
    Posts
    595
    Thanks given
    76
    Thanks received
    100
    Rep Power
    87
    No 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] Deflect Prayers
    By Mr Impact in forum Tutorials
    Replies: 40
    Last Post: 12-26-2011, 11:07 AM
  2. How To Add Deflect Prayers?
    By d43d pk3r in forum Help
    Replies: 0
    Last Post: 02-19-2011, 06:48 PM
  3. Deflect curses
    By XzTraviSzX in forum Help
    Replies: 0
    Last Post: 12-07-2010, 06:33 PM
  4. Deflect Curses
    By Seb Bruce in forum Show-off
    Replies: 8
    Last Post: 02-06-2010, 09:43 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
  •