Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:PerformCrafting

From RoR Wiki

UI Lua API · Crafting functions
Version: WAR 1.4.8

Asks the server to craft with the items currently placed in the crafting window.

PerformCrafting(tradeSkill, value)

Arguments

tradeSkill
number – A GameData.TradeSkills value: APOTHECARY (4) or TALISMAN (5).
value
number – Sent with the request. The stock UI always passes 1.

Returns

Nothing.

Details

  • For trade skills 4 and 5 the client sends a crafting "perform" request for that skill. For any other value it sends the same message type without the crafting command.
  • If a certain player state flag is set, the client adds a fixed message to the Chat text log instead of sending the request.
  • The ingredients are the ones added with AddCraftingContainer and AddCraftingItem. The result arrives from the server.
  • The function needs at least two arguments and only reads the last two.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

From default/ea_craftingwindow/source/talismanmakingwindow.lua:

PerformCrafting( GameData.TradeSkills.TALISMAN, 1 )

See also