Difference between revisions of "@ItemSmelt"
From SphereWiki
(Created page with "==Description== This trigger is fired when the character is smelting an item by a forge or by using the SMELT command. Fires on: * Characters ==References== The follow...") |
(→Arguments) |
||
Line 29: | Line 29: | ||
|- | |- | ||
| local.resource.''n''.ID|| IO || The ID of the itemdef that will be created if the smelting check is succesfull, n starts at 0. | | local.resource.''n''.ID|| IO || The ID of the itemdef that will be created if the smelting check is succesfull, n starts at 0. | ||
+ | |- | ||
| local.resource.''n''.amount|| IO || The amount value that will set on that particular resource if the smelting check is succesfull, n starts at 0. | | local.resource.''n''.amount|| IO || The amount value that will set on that particular resource if the smelting check is succesfull, n starts at 0. | ||
|} | |} |
Latest revision as of 21:10, 5 January 2023
Description
This trigger is fired when the character is smelting an item by a forge or by using the SMELT command.
Fires on:
References
The following object references are explicitly available for this trigger:
Name | Description |
I | The item being smelt. |
SRC | The character smelting the item.. |
Arguments
The following arguments are set for this trigger. If an argument is marked as "In" then a value will be passed in to the trigger, if an argument is marked as "Out" then it can be set to a value to affect Sphere's behaviour:
Argument | In/Out | Description |
ARGN1 | IO | Mining skill of the character (adjusted value, base skill + stat bonuses). |
ARGN2 | I | The total amount of different resources the item being smelted has.(For example a mace is made of iron ingots and logs, so the number of different resources is 2, for t_ore item the values is always 1. |
local.resource.n.ID | IO | The ID of the itemdef that will be created if the smelting check is succesfull, n starts at 0. |
local.resource.n.amount | IO | The amount value that will set on that particular resource if the smelting check is succesfull, n starts at 0. |
Return Values
The following return values are explicitly defined for this trigger:
Return Value | Description |
1 | Fails the smelting attempt and block default smelting behaviour.. |