-
Notifications
You must be signed in to change notification settings - Fork 94
give_reward
Ryzom Core Wiki edited this page Jul 8, 2024
·
5 revisions
title: Give Reward description: published: true date: 2023-03-16T23:08:09.152Z tags: editor: markdown dateCreated: 2023-03-16T22:25:04.230Z
The giveReward native AI script function sends a message to the EGS server to reward a player and notifies a specified NPC group of the reward.
TODO: This function causes one or more undocumented user event IDs to be triggered on the NPC group that is to be notified. The list of notifications needs to be documented here. {.is-danger}
TODO: This document is autogenerated and has not yet been reviewed. {.is-danger}
()giveReward(rewardText: s, rareRewardText: s, inventoryFullText: s, notEnoughPointsText: s, groupToNotify: c)
- rewardText (string): The text to display when the player receives a regular reward.
- rareRewardText (string): The text to display when the player receives a rare reward.
- inventoryFullText (string): The text to display when the player's inventory is full.
- notEnoughPointsText (string): The text to display when the player does not have enough points.
- groupToNotify (context): The NPC group that will receive user events to notify of the reward.
This function sends a message to the EGS server to reward the player and notify the NPC group of the reward.
(@groupToNotify)group_name.context();
()giveReward("You got a reward!", "You got a rare reward!", "Your inventory is full.", "You don't have enough points.", @groupToNotify);
This example code sends a reward message to the EGS server with the specified texts and sends user events to the group_name
group to notify of the reward.