Thread: Making hits show(Not as dumb as it sounds READ)

Results 1 to 6 of 6
  1. #1 Making hits show(Not as dumb as it sounds READ) 
    Registered Member
    dark bl00d23's Avatar
    Join Date
    Sep 2008
    Posts
    333
    Thanks given
    5
    Thanks received
    10
    Rep Power
    111
    I'm working on a nice pest control for my server- I have the NPC id's and HP and everything and I have the void knight's HP going down too.Now I need to know how to make it show what the shifter hits(Like red splash- blue splash) on the knight.Any help or even ideas would be appreciated.
    Reply With Quote  
     

  2. #2  
    Registered Member
    ViperSniper's Avatar
    Join Date
    Apr 2007
    Age
    27
    Posts
    2,417
    Thanks given
    367
    Thanks received
    82
    Rep Power
    976
    server.npcHandler.npcs[attacknpc].hitDiff = hitDiff;
    server.npcHandler.npcs[attacknpc].HP -= hitDiff;
    server.npcHandler.npcs[attacknpc].updateRequired = true;
    server.npcHandler.npcs[attacknpc].hitUpdateRequired = true;
    :indeed:
    Reply With Quote  
     

  3. #3  
    Registered Member
    dark bl00d23's Avatar
    Join Date
    Sep 2008
    Posts
    333
    Thanks given
    5
    Thanks received
    10
    Rep Power
    111
    Quote Originally Posted by ViperSniper View Post
    server.npcHandler.npcs[attacknpc].hitDiff = hitDiff;
    server.npcHandler.npcs[attacknpc].HP -= hitDiff;
    server.npcHandler.npcs[attacknpc].updateRequired = true;
    server.npcHandler.npcs[attacknpc].hitUpdateRequired = true;
    K I added all that into the code I already had- testing now.

    EDIT: WORKS TYVM!!!
    Last edited by Bits&Bytes; 03-22-2009 at 09:39 PM. Reason: TY, Works.
    Reply With Quote  
     

  4. #4  
    Registered Member
    ViperSniper's Avatar
    Join Date
    Apr 2007
    Age
    27
    Posts
    2,417
    Thanks given
    367
    Thanks received
    82
    Rep Power
    976
    No problem, but you might need to delete the server.npcHandler.npcs[attacknpc].HP -= hitDiff;
    If you already added it, other wise its gunna do double damage.
    And if i was you i would move NPCvsNpc into NPC.java if you havent already.
    NpcHandler is likely to make it buggy.
    :indeed:
    Reply With Quote  
     

  5. #5  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by ViperSniper View Post
    No problem, but you might need to delete the server.npcHandler.npcs[attacknpc].HP -= hitDiff;
    If you already added it, other wise its gunna do double damage.
    And if i was you i would move NPCvsNpc into NPC.java if you havent already.
    NpcHandler is likely to make it buggy.
    How so? And putting it in NPC will only cause more lag. (Each NPC made creates a new instance of the NPC.java, so if tis like 30mbx500 npcs :z)

    [Only registered and activated users can see links. ]



    Reply With Quote  
     

  6. #6  
    Registered Member
    ViperSniper's Avatar
    Join Date
    Apr 2007
    Age
    27
    Posts
    2,417
    Thanks given
    367
    Thanks received
    82
    Rep Power
    976
    Cos my npcs cannot attack at the same time
    if they do only one of them hits.
    :indeed:
    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
  •