Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:BuyCareerPackage

From RoR Wiki
Revision as of 19:40, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Game functions
Version: WAR 1.4.8

Asks the server to buy a career advance (ability, mastery point, renown or tome reward) from the trainer the player is talking to.

BuyCareerPackage(tier, category, packageId)

Arguments

tier
number – Tier of the advance (the tier field of the advance data).
category
number – Category of the advance, a GameData.CareerCategory value (the category field of the advance data).
packageId
number – ID of the advance (the packageId field of the advance data).

Returns

Nothing.

Details

  • Sends a purchase request with the three values and a value identifying the player's current NPC interaction. tier and category are cut to 8 bits, packageId to 16 bits.
  • The client does not check that the player can afford the advance or meets its requirements. The server decides; the stock training windows assume the purchase worked.
  • Nothing is sent if the connection is not ready.
  • The function needs at least three arguments and only reads the last three.

Errors

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

Example

From default/ea_interactionwindow/source/interactioncoretraining.lua:

local packageID    = EA_Window_InteractionCoreTraining.advanceData[dataIndex].packageId
local tier         = EA_Window_InteractionCoreTraining.advanceData[dataIndex].tier
local category     = EA_Window_InteractionCoreTraining.advanceData[dataIndex].category
BuyCareerPackage( tier, category, packageID )

Buying specialization levels, from default/ea_interactionwindow/source/interactionspecialtytraining.lua:

-- TODO: make tier not hardcoded
BuyCareerPackage( 1, GameData.CareerCategory.SPECIALIZATION, tab )

See also