Thread: removing a npc

Results 1 to 5 of 5
  1. #1 removing a npc 
    Registered Member
    rmb7's Avatar
    Join Date
    Nov 2008
    Posts
    1,026
    Thanks given
    2
    Thanks received
    12
    Rep Power
    200
    How would I remove a spawned npc that was spawned by the spawnANPC method. I am using Devo 2.7. The npc isn't spawned by a player or anything its just put there. I am trying to make pest control and this would be very helpful if someone could help me.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Nov 2006
    Posts
    530
    Thanks given
    5
    Thanks received
    21
    Rep Power
    514
    Lmao... autospawn.cfg?
    [Only registered and activated users can see links. ]
    Still a pretty cool vid.
    Reply With Quote  
     

  3. #3  
    Registered Member
    rmb7's Avatar
    Join Date
    Nov 2008
    Posts
    1,026
    Thanks given
    2
    Thanks received
    12
    Rep Power
    200
    L2R I said it was spawned by the spawnANPC method. That has nothing to do with autospawn.cfg
    Reply With Quote  
     

  4. #4  
    Whoops.
    Hatsune Miku's Avatar
    Join Date
    Oct 2008
    Age
    26
    Posts
    35
    Thanks given
    0
    Thanks received
    9
    Rep Power
    1
    Just create a method that kills certain NPCs and call it when necessary, something like:

    Code:
    public void HerpDerp() {
    		for (int i = 0; i < server.npcHandler.maxNPCs; i++) {
    		if (server.npcHandler.npcs[i] != null) {
    		if(server.npcHandler.npcs[i].npcType >= #### && server.npcHandler.npcs[i].npcType <= ####) {
    		server.npcHandler.npcs[i].IsDead = true;
    }
    }
    }
    You don't have to do it by the NPCs ID either, use coordinates or whatever you want.

    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Nov 2006
    Posts
    530
    Thanks given
    5
    Thanks received
    21
    Rep Power
    514
    Quote Originally Posted by rmb7 View Post
    L2R I said it was spawned by the spawnANPC method. That has nothing to do with autospawn.cfg
    You telling me to learn to read is like me telling you to learn to code.

    Idiot.
    [Only registered and activated users can see links. ]
    Still a pretty cool vid.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

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