SetOnCraftingEventHandler

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Sets/removes the specified UDF Script as a handler that will be invoked in the event an Item is crafted in the Recipe Menu.

When invoked, the script is passed with two arguments: the crafted item's Base Form, and the quantity.

Syntax

[help]
SetOnCraftingEventHandler handlerScript:form setOrRremove:1/0

Example

SetOnCraftingEventHandler OnCraftingUDF 1

Sets the OnCraftingUDF script as a handler for this event.

SetOnCraftingEventHandler OnCraftingUDF 0

Removes the OnCraftingUDF script as a handler of the above.

Handler Script

A skeleton handler script for this event:

scn	OnCraftingUDF

ref	rItemForm
int	iQuantity

begin Function {rItemForm, iQuantity}

	(code)

end