Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SelectInfluenceReward

From RoR Wiki

UI Lua API · Interact functions
Version: WAR 1.4.8

Asks the server for an influence reward from the NPC the player is talking to.

SelectInfluenceReward(rewardLevel, rewardIndex)

Arguments

rewardLevel
number – Reward tier, 1 to 3.
rewardIndex
number – Reward within the tier, 1 to 4.

Returns

Nothing.

Details

  • Nothing is sent if either value is out of range.
  • The client then checks its influence data for the current interaction. Nothing is sent unless:
    • influence data is present,
    • the player's influence has reached the amount needed for rewardLevel, and
    • the status the client keeps for that tier allows a claim.
  • If the checks pass, a request for the reward is sent to the server for the NPC the player last interacted with.
  • 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_interactionwindow/source/interactioninfluencerewards.lua:

for level = 1, TomeWindow.NUM_REWARD_LEVELS
do
    for reward = 1, TomeWindow.MAX_REWARDS_PER_LEVEL
    do
        if( ButtonGetPressedFlag("EA_Window_InteractionInfluenceRewardsLevel"..level.."Reward"..reward) == true )
        then
            SelectInfluenceReward( level, reward )
        end
    end
end

See also