on_inventory_option
on_inventory_option
Section titled “on_inventory_option”
fun on_inventory_option( inventory: InventoryDefinition, item: ItemDefinition, option: String, behaviour: InterfaceOpContext.(subject: Actor) -> Unit)InterfaceOpContext.(subject: Actor) -> Unitfun bagOptions(bag: InventoryDefinition) { on_inventory_option(bag, Assets.Item.shark, "Eat") { player -> player.message("You eat the shark.") } on_inventory_option(bag, "Drop") { player -> player.message("You drop the item in slot $slot.") }}
on_login { player -> player.message("Right-click a shark in your bag to eat it.") }inventory
Section titled “inventory”inventory: InventoryDefinitionitem: ItemDefinitionoption
Section titled “option”option: StringProperties
Section titled “Properties”interfaceId
Section titled “interfaceId”val interfaceId: IntcomponentId
Section titled “componentId”val componentId: Intval op: Intoption
Section titled “option”val option: Stringval item: Intval slot: Intinventory
Section titled “inventory”val inventory: Inventory?val items: rift.items.ItemContainer?on_inventory_option
Section titled “on_inventory_option”
fun on_inventory_option( inventory: InventoryDefinition, option: String, behaviour: InterfaceOpContext.(subject: Actor) -> Unit)InterfaceOpContext.(subject: Actor) -> Unitinventory
Section titled “inventory”inventory: InventoryDefinitionoption
Section titled “option”option: StringProperties
Section titled “Properties”interfaceId
Section titled “interfaceId”val interfaceId: IntcomponentId
Section titled “componentId”val componentId: Intval op: Intoption
Section titled “option”val option: Stringval item: Intval slot: Intinventory
Section titled “inventory”val inventory: Inventory?val items: rift.items.ItemContainer?on_inventory_option
Section titled “on_inventory_option”
fun on_inventory_option( inventoryId: Int, item: ItemDefinition, option: String, behaviour: InterfaceOpContext.(subject: Actor) -> Unit)InterfaceOpContext.(subject: Actor) -> UnitinventoryId
Section titled “inventoryId”inventoryId: Intitem: ItemDefinitionoption
Section titled “option”option: StringProperties
Section titled “Properties”interfaceId
Section titled “interfaceId”val interfaceId: IntcomponentId
Section titled “componentId”val componentId: Intval op: Intoption
Section titled “option”val option: Stringval item: Intval slot: Intinventory
Section titled “inventory”val inventory: Inventory?val items: rift.items.ItemContainer?on_inventory_option
Section titled “on_inventory_option”
fun on_inventory_option( inventoryId: Int, option: String, behaviour: InterfaceOpContext.(subject: Actor) -> Unit)InterfaceOpContext.(subject: Actor) -> UnitinventoryId
Section titled “inventoryId”inventoryId: Intoption
Section titled “option”option: StringProperties
Section titled “Properties”interfaceId
Section titled “interfaceId”val interfaceId: IntcomponentId
Section titled “componentId”val componentId: Intval op: Intoption
Section titled “option”val option: Stringval item: Intval slot: Intinventory
Section titled “inventory”val inventory: Inventory?val items: rift.items.ItemContainer?