Getting NPC to trade items for player?
How would i get an npc to trade an itm from a player and return another item  for example how would i get the npc to use 100 metal frags and return 25 scrap to the player? i have tried a couple of diffrent versions of this and cant seem to ge tit to work. I have also tried to change the command to invtory.give and the arrangment to scrap 25.  I know i could just set this up in a vending machine but i wanted to try something new.
{
  "NpcTP": {
    "1320692355": {
      "NpcName": "<color=orange>Npc</color> : ",
      "SpawnFile": null,
      "Cooldown": 0,
      "CanUse": true,
      "useUI": false,
      "Cost": 0.0,
      "permission": "npctp.default",
      "useItem": true,
      "ItemShortName": "metal.fragments",
      "ItemAmount": 100,
      "UseCommand": true,
      "CommandOnPlayer": true,
      "Command": "inventory.give scrap 25",
      "Arrangements": "",
      "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,
      "NoPermKill": false,
      "KillSleep": false
    }
  }
}​
change
Command": "inventory.give",
"Arrangements": "scrap 25",
thanks ill try that

Merged post

Nope that did not work either? am i missing something?
{
"NpcTP": {
"1428277163": {
"NpcName": "<color=#ffff00>Npc</color> : ",
"SpawnFile": null,
"Cooldown": 0,
"CanUse": true,
"useUI": false,
"Cost": 0.0,
"permission": "npctp.default",
"useItem": true,
"ItemShortName": "metal.fragments",
"ItemAmount": 100,
"UseCommand": true,
"CommandOnPlayer": true,
"Command": "inventory.give",
"Arrangements": "scrap 25",
"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,
"NoPermKill": false,
"KillSleep": false
}
}
}
no that looks right when you click on the npc does he say anything? does he take the metal frags?

Merged post

what version of the plugin are you using? i would recomend updating to the newest version.

Merged post

Example of the new version config to run mutipal commands and take mutipal items.
{
  "NpcTP": {
    "1360609784": {
      "NpcName": "<color=#ffff00>Npc</color> : ",
      "SpawnFile": null,
      "Cooldown": 0,
      "CanUse": true,
      "useUI": false,
      "Cost": 0.0,
      "permission": "npctp.default",
      "useItem": true,
      "UseCommand": true,
      "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,
      "NoPermKill": false,
      "KillSleep": false,
      "Commands": {
        "say": {
          "Command": "say",
          "Arrangements": "this is a test",
          "OnPlayer": false
        },
        "say2": {
          "Command": "inventroy.give",
          "Arrangements": "scrap 25",
          "OnPlayer": true
        }
      },
      "Items": {
        "metal": {
          "ItemShortName": "metal.fragments",
          "Amount": 100
        },
        "stones": {
          "ItemShortName": "stones",
          "Amount": 10
        }
      }
    }
  }​
ill update and try again. no it does not take the frags at all
read the update notes you may need to also delete your data and lang file. when updating...  there is a chat command to add items to use and commands..
okay i updated and tried it still a no go. not sure what is wrong but thanks for the hlpe anyways. ill just vend it.
{
  "NpcTP": {
    "1428277163": {
      "NpcName": "<color=#ffff00>Npc</color> : ",
      "SpawnFile": null,
      "Cooldown": 0,
      "CanUse": true,
      "useUI": false,
      "Cost": 0.0,
      "permission": "npctp.default",
      "useItem": true,
      "UseCommand": true,
      "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,
      "NoPermKill": false,
      "KillSleep": false,
      "Commands": {
        "say": {
          "Command": "say",
          "Arrangements": "this is a test",
          "OnPlayer": false
        },
        "say2": {
          "Command": "inventroy.give",
          "Arrangements": "scrap 25",
          "OnPlayer": true
        }
      },
      "Items": {
        "metal": {
          "ItemShortName": "metal.fragments",
          "Amount": 100
        },
        "stones": {
          "ItemShortName": "stones",
          "Amount": 10
        }
      }
    }
  }​
i will look into this.

Merged post

you sure you got the correct npc and the correct id.

Merged post

if geting no output makes me think somthing is a miss with the npc   go up the  the npc and /npc_edit   should return the npc id verify its what you have in the datafile of 1428277163  also make sure the user has the perm npctp.default

Merged post

it looks like you are copying the example config i would try deleting the datafile reload then do.
/npctp_add <npcID>
/npctp <npcID> command giveitem
/npctp <npcID> item <Item shortname>
then edit the newly created datafile..