Trader

A mob that has some dialogue options with radials, allows for selling items and buying em'
Vars | |
buyphrase | Phrase said when the NPC sells you an item. |
---|---|
interestedphrase | Phrase said when the NPC finds an item in the wanted_items list in your hands. |
itemrejectphrase | Phrase said when NPC finds none of your inhand items in wanted_items. |
itemsellacceptphrase | Phrase said when you accept selling a thing to the NPC. |
itemsellcancelphrase | Phrase said when you cancel selling a thing to the NPC. |
lore | Phrases used when you talk to the NPC |
nocashphrase | Phrase said when you have too little money to buy an item. |
products | Associated list of items the NPC sells with how much they cost. |
sell_sound | Sound used when item sold/bought |
wanted_items | Associated list of items able to be sold to the NPC with the money given for them. |
Procs | |
buy_item | Generates a radial of the items the NPC sells and lets the user try to buy one Arguments: |
check_menu | Checks if the user is ok to use the radial |
deep_lore | Makes the NPC say one picked thing from the lore list variable, can be overriden for fun stuff |
generate_cash | Creates a holochip the value set by the proc and puts it in the user's hands Arguments: |
sell_item | Checks if an item is in the list of wanted items and if it is after a Yes/No radial returns generate_cash with the value of the item for the NPC Arguments: |
try_buy | Tries to buy an item from the trader Arguments: |
try_sell | Tries to call sell_item on one of the user's held items, if fail gives a chat message |
Var Details
buyphrase

Phrase said when the NPC sells you an item.
interestedphrase

Phrase said when the NPC finds an item in the wanted_items list in your hands.
itemrejectphrase

Phrase said when NPC finds none of your inhand items in wanted_items.
itemsellacceptphrase

Phrase said when you accept selling a thing to the NPC.
itemsellcancelphrase

Phrase said when you cancel selling a thing to the NPC.
lore

Phrases used when you talk to the NPC
nocashphrase

Phrase said when you have too little money to buy an item.
products

Associated list of items the NPC sells with how much they cost.
sell_sound

Sound used when item sold/bought
wanted_items

Associated list of items able to be sold to the NPC with the money given for them.
Proc Details
buy_item
Generates a radial of the items the NPC sells and lets the user try to buy one Arguments:
- user - The mob trying to buy something
check_menu
Checks if the user is ok to use the radial
Checks if the user is not a mob or is incapacitated or not adjacent to the source of the radial, in those cases returns FALSE, otherwise returns TRUE Arguments:
- user - The mob checking the menu
deep_lore
Makes the NPC say one picked thing from the lore list variable, can be overriden for fun stuff
generate_cash
Creates a holochip the value set by the proc and puts it in the user's hands Arguments:
- value - The amount of cash that will be on the holochip
- user - The mob we put the holochip in hands of
sell_item
Checks if an item is in the list of wanted items and if it is after a Yes/No radial returns generate_cash with the value of the item for the NPC Arguments:
- user - The mob trying to sell something
- selling - The item being sold
try_buy
Tries to buy an item from the trader Arguments:
- user - The mob trying to buy something
- item_to_buy - Item that is being bought
try_sell
Tries to call sell_item on one of the user's held items, if fail gives a chat message
Gets both items in the user's hands, and then tries to call sell_item on them, if both fail, he gives a chat message Arguments:
- user - The mob trying to sell something