HumanNPC

Adds interactive Human NPCs which can be modded by other plugins

Total Downloads: 24,392 - First Release: Mar 25, 2015 - Last Update: Apr 19, 2018

4.93233/5, 133 likes
  1. Same Problem help me plz
    Code:
       {
         "userid": 1169724946,
         "displayName": "Guard Tower",
         "invulnerability": false,
         "health": 100.0,
         "respawn": true,
         "respawnSeconds": 10.0,
         "spawnInfo": {
           "position": "-682.7027 13.12253 427.9161",
           "rotation": "-0.08113139 0.7331402 -0.08886363 -0.6693478"
         },
         "waypoint": null,
         "collisionRadius": 400.0,
         "spawnkit": "npc",
         "damageAmount": 10.0,
         "damageDistance": 400.0,
         "damageInterval": 0.5,
         "attackDistance": 200.0,
         "maxDistance": 3.0,
         "minstrel": null,
         "hostile": true,
         "speed": 1.0,
         "stopandtalk": false,
         "stopandtalkSeconds": 3.0,
         "enable": true,
         "lootable": true,
         "hitchance": 0.75,
         "reloadDuration": 0.0,
         "needsAmmo": true,
         "defend": true,
         "message_hello": null,
         "message_bye": null,
         "message_use": null,
         "message_hurt": null,
         "message_kill": null,
         "protections": {
           "Generic": 0.0,
           "Hunger": 0.0,
           "Thirst": 0.0,
           "Cold": 0.0,
           "Drowned": 0.0,
           "Heat": 0.0,
           "Bleeding": 0.0,
           "Poison": 0.0,
           "Suicide": 0.0,
           "Bullet": 0.0,
           "Slash": 0.0,
           "Blunt": 0.0,
           "Fall": 0.0,
           "Radiation": 0.0,
           "Bite": 0.0,
           "Stab": 0.0,
           "Explosion": 0.0,
           "RadiationExposure": 0.0,
           "ColdExposure": 0.0,
           "Decay": 0.0,
           "ElectricShock": 0.0,
           "Arrow": 0.0
         }
     
    Last edited by a moderator: Mar 19, 2018
  2. I used "npc_remove" for one npc on my local server, but on next day when I launched my server again this npc respawned and killed me. I used "npc_edit","npc_remove" and "npc_end"
     
  3. Can I Have Some Help Im Trying To Create A Bot House But The Bots Cant Hit people they Have Guns And Everything hostile On The HitChance Is 100 But Still Cant Hit Anyone How Can I Fix This
     
  4. I have same issue! anyone found a fix to getting the npc to shoot from a distance instead of running up to my face and then shooting me? tried all the commands given but non of them seem to work for this issue.
    [DOUBLEPOST=1521502195][/DOUBLEPOST]
    did you sort the first issue as I am having same problem?
     
  5. For my part I tried everything without success, no one answered directly to this problem mentioned multiple times.
     
  6. This is a great Plugin but I think the waypoint stop logic has been partially disabled and not quite implemented well.
    To fix update the following lines of code
    line 240:
    from:
    Code:
    Interface.Oxide.LogInfo("Blocked waypoint? {0} for {1}", pair.Key, npc.player.displayName);
    to:
    Code:
    Interface.Oxide.LogInfo("Blocked waypoint or stop point? {0} for {1}", pair.Key, npc.player.displayName);
    line 241:
    from:
    Code:
    //cachedWaypoints.Add(new WaypointInfo(pair.Key, speed));
    to:
    Code:
    cachedWaypoints.Add(new WaypointInfo(pair.Key, speed));
    Add new code after line 331:
    Code:
    var pre_pos = currentWaypoint>0 ? cachedWaypoints[currentWaypoint-1].Position : npc.player.transform.position;
    old line 333 / new line 334:
    from:
    Code:
    if (npc.player.transform.position == wp.Position)
    to:
    Code:
    if (pre_pos == wp.Position)
     
    Last edited by a moderator: Mar 28, 2018
  7. Code:
     Unable to load HumanNPC. System.TypeInitializationException: An exception was thrown by the type initializer for Oxide.Plugins.HumanNPC ---> System.NullReferenceException: Object reference not set to an instance of an object
      at Oxide.Plugins.HumanNPC..cctor () [0x00000] in <filename unknown>:0
      --- End of inner exception stack trace ---
      at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    Started to happen after rust update and new oxide update from today.
     
  8. @Nogrod @Wulf HumanNPC core does not seem to be working anymore since new patch. All my NPC vendors are fast asleep like offline players.
     
  9. Help !
    Code:
    (20:54:40) | HumanNPC and PathFinding were compiled successfully in 1724ms
    (20:54:40) | HumanNPC plugin is waiting for requirements to be loaded: PathFinding
    (20:54:40) | Loaded plugin PathFinding v1.1.2 by Reneb / Nogrod
    (20:54:40) | Unable to load HumanNPC. System.TypeInitializationException: An exception was thrown by the type initializer for Oxide.Plugins.HumanNPC ---> System.NullReferenceException: Object reference not set to an instance of an object
      at Oxide.Plugins.HumanNPC..cctor () [0x00000] in <filename unknown>:0
      --- End of inner exception stack trace ---
      at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    (20:54:40) | No previous version to rollback plugin: HumanNPC
     
  10. Wulf

    Wulf Community Admin

  11. Hi !
    Is it possible to sit down an NPC on a chair ?
    I tried to spawn it when I'm on a chair but it stays stand up through the chair...
    Thx for any answer ^^
     
  12. Help please. I install the HumanNPC plugin. And at me such here errors: (03:58:00) | error when compiling: human NPC.SN (1314.29) : error CS0117: 'vis' does not contain a definition for 'colBuffer'
    ((03: 58: 00) | compile error: PathFinding.cs (404.24): error CS1540: cannot access protected member's base Player.viewAngles via qualifier BasePlayer "Type". The classifier must be of type ' oxide.Plug-ins.innovative.The following path " or derived from it
     
  13. Wulf

    Wulf Community Admin

    Update Rust and Oxide, you're outdated.
     
  14. health XXX => To set the Health of the NPC (limited by rust to max 100) - So does this mean you can only give these bots a health amount of 100 only? in the BotSpawns plugin you can give the bots like 10000 if you want.
     
    Last edited by a moderator: Apr 29, 2018
  15. Good plugin...
     
  16. Hi, how do you do to face bots vs NPC?
     
  17. Hi, is it possible to stop the plugin from removing bots placed by other plugins eg. botspawn and phantom sleepers? Thanks
     
  18. Weird,I use both HumanNPC and BotSpawn and I don’t have this problem.When did it start or was it always like this?
     
  19. I had botspawn putting custom NPCs at different monuments. I installed HumanNPC today and on plugin initialization the console spits out about 50 of these:

    Code:
    Detected a HumanNPC with no data or disabled, deleting him
     
  20. Yeah,I got the same massages yesterday after the wipe and update,but all of my BotSpawn bots were in place.Just fly around the map and see if they are where they suppose to be