Thread: Killing agressive NPC

Results 1 to 7 of 7
  1. #1 Killing agressive NPC 
    Banned

    Join Date
    Nov 2014
    Posts
    611
    Thanks given
    180
    Thanks received
    156
    Rep Power
    0
    Hello,

    I was wondering how to kill all agressive NPC's that are targeting x player;
    I am working on a deadman server (i dont really have any experience with java since about 5 years ago)

    There's a guard system that's working pretty well, but the guard is set as guard[0], so when there's multiple guards, it will always be the same guard dying once the player has been killed.

    I think that the best solution to solve would be to create some sort of method that kills all agressive npcs targeting playername.

    Any ideas?

    Thank you in advance
    Last edited by Thrallix; 10-17-2017 at 07:39 PM. Reason: Typo
    Reply With Quote  
     

  2. #2  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    It all comes down to how your aggressive codes are being handled.
    Question is why do you want them to be killed cause it feels pretty abusive if that is the case?
    (Aggro a mob, run away, see it getting killed and get loot unless you wish or have something to prevent that)


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Banned

    Join Date
    Nov 2014
    Posts
    611
    Thanks given
    180
    Thanks received
    156
    Rep Power
    0
    Quote Originally Posted by arch337 View Post
    It all comes down to how your aggressive codes are being handled.
    Question is why do you want them to be killed cause it feels pretty abusive if that is the case?
    (Aggro a mob, run away, see it getting killed and get loot unless you wish or have something to prevent that)
    The guards are not meant to be attacked, it's for when a player enters a safezone while being skulled.

    I'm not sure how it's handled, but I use Project Insanity.

    P.S. They don't have to be killed, but they have to be cleared up somehow.
    Reply With Quote  
     

  5. #4  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by Thrallix View Post
    The guards are not meant to be attacked, it's for when a player enters a safezone while being skulled.

    I'm not sure how it's handled, but I use Project Insanity.

    P.S. They don't have to be killed, but they have to be cleared up somehow.
    Ah ok cause you did write "I was wondering how to kill all agressive NPC's that are targeting x player;".
    What you are looking for is to despawn guards when the player dies.
    To do that make sure they have a player id or name prefix so that the game knows they have been "spawned" by that specific player.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Nov 2014
    Posts
    611
    Thanks given
    180
    Thanks received
    156
    Rep Power
    0
    Quote Originally Posted by arch337 View Post
    Ah ok cause you did write "I was wondering how to kill all agressive NPC's that are targeting x player;".
    What you are looking for is to despawn guards when the player dies.
    To do that make sure they have a player id or name prefix so that the game knows they have been "spawned" by that specific player.
    That's where I'm stuck on, I'm not sure where to start
    Reply With Quote  
     

  7. #6  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by Thrallix View Post
    That's where I'm stuck on, I'm not sure where to start
    So debug the whole spawning the guard and see it step by step what is going on.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #7  
    Banned

    Join Date
    Nov 2014
    Posts
    611
    Thanks given
    180
    Thanks received
    156
    Rep Power
    0
    All done, thanks!
    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. Replies: 10
    Last Post: 02-24-2011, 01:03 PM
  2. If killed by Npc Drop items
    By Delifed in forum Requests
    Replies: 0
    Last Post: 07-16-2009, 08:57 PM
  3. Kill all npcs?
    By SilentZPrO in forum Help
    Replies: 2
    Last Post: 03-29-2009, 07:13 PM
  4. agressive npc glitch (richscape 4.2)
    By Bando in forum Help
    Replies: 4
    Last Post: 02-05-2009, 02:21 AM
  5. Agressive npc's
    By Jeremie in forum Requests
    Replies: 0
    Last Post: 10-09-2008, 10:20 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
  •