Resource icon

PAID Spawn New Talking Venders 1.0.6

This is not for the everyday user please read all below if you have any issues contact me on discord.
Plugin will work with minimal config with https://umod.org/plugins/spawn-modular-car
if using https://umod.org/plugins/spawn-modular-car edit the config and set the spawn Position if not Position set it will spawn the car behind the vendor.


Permission: talkingnpc.admin

CHAT COMMANDS:
/npc_talker add <npcDisplayName> <OptionalDatafile> - Spawn in a talking npc.
/npc_talker remove <npcDisplayName> - Remove a talking npc.

To use the default datafile you must edit it and change the commands to whatever console command you want it to run on successful buy only if not using to spawn with mod-cars plugin

In order to create or edit the npcs you must edit there datafile.
a default datafile is created on first load but must be edited to the commands you choose it to run. if not using for default car spawns.

To create a new set of messages copy the default datafile and rename it and edit it to your liking.
Then when you add a new talking npc you set that datafile name in the optionalDatafile field.. Please note it is case sensitive.

The talking npc are set so you can run a console command on successful action..
To change the command in the default datafile here is an example there is 3 places in the default data file for the 3 choices. that are short medium long. options in the message.

To make him run player chat command.
"command": "SendAsPlayer chat.say \"/TheCommand\"",

"command": "vehicle carone playerID", // this is the console command to run on success playerID will input the players steamID
"message": "Here is my 250 scrap.",
"goodbye": "Go get your ride before someone steals it and please stop by again.",
"broke": "I am sorry you do not have enough scrap",
"price": 250, // the ammount of item to charge
"item": -932201673, // the itemID of the item to be charged

Code:
{
  "theConfig": {
    "Messages": {
      "theChoices": {
        "0": {
          "message": "Welcome to my shop wander. What would you like?",
          "reply": [
            {
              "command": "continue",
              "message": "I would like to buy a car.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 1
            },
            {
              "command": "close",
              "message": "I am just browsing.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 0
            }
          ]
        },
        "1": {
          "message": "A ride you say. Witch style ride would you like?",
          "reply": [
            {
              "command": "continue",
              "message": "I would like a short car.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 2
            },
            {
              "command": "continue",
              "message": "I would like a medium car.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 3
            },
            {
              "command": "continue",
              "message": "I would like a long car.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 4
            },
            {
              "command": "close",
              "message": "I am just browsing.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 1
            }
          ]
        },
        "2": {
          "message": "That is a nice choice. Do you want to buy this ride?",
          "reply": [
            {
              "command": "SendAsPlayer carspawns55912 small",
              "message": "Here is my 250 scrap.",
              "goodbye": "Go get your ride before someone steals it and please stop by again.",
              "broke": "I am sorry you do not have enough  scrap",
              "price": 250,
              "item": -932201673,
              "choiceConfig": 2
            },
            {
              "command": "close",
              "message": "I am just browsing.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 2
            }
          ]
        },
        "3": {
          "message": "That is a nice choice. Do you want to buy this ride?",
          "reply": [
            {
              "command": "SendAsPlayer carspawns55912 medium",
              "message": "Here is my 350 scrap.",
              "goodbye": "Go get your ride before someone steals it and please stop by again.",
              "broke": "I am sorry you do not have enough  scrap",
              "price": 350,
              "item": -932201673,
              "choiceConfig": 3
            },
            {
              "command": "close",
              "message": "I am just browsing.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 3
            }
          ]
        },
        "4": {
          "message": "That is a nice choice. Do you want to buy this ride?",
          "reply": [
            {
              "command": "SendAsPlayer carspawns55912 long",
              "message": "Here is my 500 scrap.",
              "goodbye": "Go get your ride before someone steals it and please stop by again.",
              "broke": "I am sorry you do not have enough  scrap",
              "price": 500,
              "item": -932201673,
              "choiceConfig": 4
            },
            {
              "command": "close",
              "message": "I am just browsing.",
              "goodbye": "",
              "broke": "",
              "price": 0,
              "item": -932201673,
              "choiceConfig": 4
            }
          ]
        }
      }
    }
  }
}

Code:
{
  "Settings": {
    "PermissionUse": "talkingnpc.admin",
    "carData": {
      "small": {
        "Position": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "Rotation": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "CodeLock": true,
        "KeyLock": false,
        "EnginePartsTier": 3,
        "FreshWaterAmount": 0,
        "FuelAmount": 500,
        "Modules": [
          "vehicle.1mod.cockpit.with.engine",
          "vehicle.1mod.flatbed"
        ]
      },
      "medium": {
        "Position": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "Rotation": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "CodeLock": true,
        "KeyLock": false,
        "EnginePartsTier": 3,
        "FreshWaterAmount": 0,
        "FuelAmount": 500,
        "Modules": [
          "vehicle.1mod.cockpit.with.engine",
          "vehicle.2mod.flatbed"
        ]
      },
      "long": {
        "Position": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "Rotation": {
          "x": 0.0,
          "y": 0.0,
          "z": 0.0
        },
        "CodeLock": true,
        "KeyLock": false,
        "EnginePartsTier": 3,
        "FreshWaterAmount": 0,
        "FuelAmount": 500,
        "Modules": [
          "vehicle.1mod.cockpit.with.engine",
          "vehicle.2mod.passengers"
        ]
      }
    }
  },
  "Version": {
    "Major": 1,
    "Minor": 0,
    "Patch": 6
  }
}

Author
Razor
Downloads
3
Type
Digital product
License duration
Unlimited
Views
281
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Razor

Latest updates

  1. Delete config new options.

    You must delete config.. Also delete default datafile if you are not using it. plugin will...
  2. added cooldown on npc per player

    added cooldown per npc per player.. you can edit the cooldown time in the TalkerSpawns.json...
  3. Rotation fix on npc spawn

    Fixed the npc not spawning at correct rotation.