inventory_offer

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 12:43, 1 July 2016 by Phil (Talk | contribs) (Created page with "{{DISPLAYTITLE:inventory_offer}} <onlyinclude>Fires when bot receives a message in the local chat</onlyinclude> <syntaxhighlight lang="javascript"> Bot.on("inventory_offer",...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Fires when bot receives a message in the local chat

Bot.on("inventory_offer", function(event) { ... });

Reference

This event comes with the following event object:

Variable Required Description
Output:
name The name of the event in this case inventory_offer
item_type The type of the inventory item eg: Notecard, Object, Landmark...
sender_type The type of the sender AGENT or OBJECT
sender_name The name of the sender
sender_uuid The UUID of the sender
item_name The name of the offered item.
object_id The UUID of the offered item.
item_creator The UUID of the creator from the invetory item.

Example

Bot.on("inventory_offer", function(event) {
	console.log(event.sender_name + " send me an " + event.item_type + " with the name: \n" + event.item_name);
});

console.log("Bot is listening to inventory offers");