Npctp

Create an NPC that will TP a player to anywhere, run commands, or open a door

Total Downloads: 1,052 - First Release: Nov 27, 2016 - Last Update: May 10, 2018

5/5, 5 likes
  1. im trying to add a npc to let people go to it and press e to get a random spawn anywhere on the map ive tryed both ways to get this to work :) but no luck

    i have got the npc in i went into HumanNPC.json to get the id which is 44179522 i made a temp spawn file up with 1 spawn to test this its called npcr then i went to my npc and entered this code in /npctp_add 123456789 npcr but it dosent do anything for me i have reloaded this 5 times now to make sure i have no errors and no luck
     
  2. can you post a copy of your oxide/data/NpcTp/NpcTp_data.json.
     
  3. Code:
    {
      "NpcTP": {
        "123456789": {
          "NpcName": "<color=orange>Npc</color> : ",
          "SpawnFile": "npcr",
          "Cooldown": 0,
          "CanUse": true,
          "useUI": false,
          "Cost": 0.0,
          "permission": "npctp.default",
          "UseCommand": false,
          "CommandOnPlayer": false,
          "Command": "say",
          "Arrangements": "this is a test",
          "useMessage": false,
          "MessageNpc": "none",
          "EnableDead": false,
          "DeadOnPlayer": false,
          "DeadCmd": "jail.send",
          "DeadArgs": "5",
          "OpenDoor": false,
          "DoorLocX": 0.0,
          "DoorLocY": 0.0,
          "DoorLocZ": 0.0,
          "DoorId": 0
        }
      }
    }
    [DOUBLEPOST=1486426260][/DOUBLEPOST]

    just noticed what wrong with i....it didnt add my correct id in 44179522
     
  4. does it work now that you fixed you id?
     
  5. yes it dose i feel stupid hahaha i dont know why i never noticed that is there a way to make it spawn randomly onthe map or do i need the spawn file
     
  6. you need the spawn file..
     
  7. This plugins getting to be more of just Npc tp players so thinking it need a new name any ideas out there or any requests for things to be added?
     
  8. Thanks for adding the open door ability, Ts3hosting!
     
  9. Nice plugin, works easily.
    Am I able to set an autospawn point with this plugin or any that you know of?
    I want to give players the option to toggle an autospawn in the safezone or arena, so they dont have to walk back when they die fighting their friends.

    Also, can I use one NPC to open multiple sets of doors with UI prompts?
    Depending on player choice, certain doors open?

    How could I kill a player or empty their inventory before teleportation?

    Thanks!
     
    Last edited by a moderator: Feb 14, 2017
  10. Ts3hosting updated Npctp with a new update entry:

    v2.4.1

     
  11. Added a new "CommandOnPlayerName" setting to npcs, and renamed the previous "CommandOnPlayer" to "CommandOnPlayerId"
    Works in for chat configuration same as the rest of the setting do, and initializes new Npc's with "CommandOnPlayerName" set to false.
    Fixed part of the help output to the chat when using incorrect commands.
    I was referred to "/npctp_edit <NPCID> <Setting> <Value>" in game when messing up a chat command, but /npctp_edit isnt the command, "/npctp <NPCID> <Setting> <Value>" works fine. Just dropped the '_edit' in the help output.

    This just allows you to use this plugin with others that use commands referring to player name, instead of steamID.

    Hope I didn't mess anything up, I'm new to this stuff.
     

    Attached Files:

  12. At the moment I have 4 types of npc's (Zombies) which I want to spawn all over the map. I used for each type the command "/npctp_add npcid random" several times but in the data file only 4 npc's (one of each type) are added.

    Also, I put the waypoints as "random" but still the npc is spawning where I put their spawn in HumanNPC.

    EDIT: (figured last one out already)

    And for last, is it possible to give the player who killed an npc RP points on serverrewards? So yes, can you give an example of what the command should look like?

    (I tried: "sr add "userID" 200" "sr add "STEAMID" 200" "sr add "{{VAR=STREAMID}}" 200" "sr add "$player.id" 200")
     
    Last edited by a moderator: Feb 20, 2017
  13. How does the command "use" function work? Can I make an NPC use a torch? Also, what is the UI function used for?

    Sorry for the newbie type questions... just trying to figure out what entries in the config do.

    Thank you.
     
  14. Wulf

    Wulf Community Admin

    @Ts3hosting, you can avoid prefixing your versions with "v", as that will throw off updater tools and is redundant for our site as it will show as "Version v2.4.1" and such.
     
  15. I am having an issue with my NPCTP taking money. I have added a cost and a command to grant rights. However, if I talk to the NPC he will grant the right without taking money. As well, if I talk to him without enough money, he will still grant the rights. Not sure what I'm doing wrong.

    "637535596": {
    "NpcName": "<color=orange>Npc</color> : ",
    "SpawnFile": null,
    "Cooldown": 0,
    "CanUse": true,
    "useUI": true,
    "Cost": 20.0,
    "permission": "npctp.default",
    "UseCommand": true,
    "CommandOnPlayer": true,
    "Command": "grantperm",
    "Arrangements": "npctp.thompson.talk 365d",
    "useMessage": true,
    "MessageNpc": "I can give you the Sailor Code for 20 coins.",
    "EnableDead": false,
    "DeadOnPlayer": false,
    "DeadCmd": "jail.send",
    "DeadArgs": "5",
    "OpenDoor": false,
    "DoorLocX": 0.0,
    "DoorLocY": 0.0,
    "DoorLocZ": 0.0,
    "DoorId": 0,
    "NoPermKill": false,
    "KillSleep": false
    },
     
  16. can i add multiple spawns through one npc player can choose which one they want to go to?
     
  17. Currently trying to set it up, so the npc runs the command /pc (For player challenges) on the player. But enabling the option UseOnPlayer, is forcing the steam64 ID into the command.
    So i get the output
    Code:
    (19:10:32) | Command 'pc 76561198018573984 ' not found
    In console. Is there any way to make the player simply just execute the command /pc?
     
  18. Code:
    15:21 [Error] Failed to call hook 'OnKillNPC' on plugin 'Npctp v2.4.1' (NullReferenceException: Object reference not set to an instance of an object)
    15:21 [Stacktrace]   at Oxide.Plugins.Npctp.OnKillNPC (.BasePlayer npc, .HitInfo hinfo) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Npctp.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0 
    No TP NPC randome
     

    Attached Files:

  19. hiya i have Random Spawnpoints 0.1.6 by k1llyOu am i able to create a npc and set it to the Random Spawnpoints in my town
     
  20. getting error hopefulyl it helps

    (01:15:26) | Error while compiling: Npctp.cs(399,24): error CS0411: The type arguments for method `BaseEntity.ClientRPCPlayer<T1,T2,T3,T4,T5>(Network.Connection, BasePlayer, string, T1, T2, T3, T4, T5)' cannot be inferred from the usage. Try specifying the type arguments explicitly