The SEconomy class gives us the ability to transfer silver or issue silver rewards from Sinespace's vault. Therefore, for the below methods to work, you will need to first set the AcessKey which is an API Key given by Sinespace.
To request an API Key, please submit a support ticket.
Here's two API Keys which are pre-generated and available to the public:
b9184836-9c73-486a-b058-a0a668b860f7 Maximum 5000 silver per 24 hours per user, AND allows up to 5000 to be deducted as well. Works only on Preview.
11f55b74-69ee-4dd3-8983-17c466912beb Maximum 500 silver per 24 hours per user. Works on Preview or Live.
Note: The above two keys work with DeductSilver() and AddSilver(). You'll need an API Key which has your specific required function enabled.
void DeductSilver (int amount, Action< bool > onFinished=null) void DeductSilver (int amount, Closure onFinished=null)
Deducts amount of silver from player's silver balance. You can also bind a function which will be called when operation is finished (optional), which also returns a Boolean if the operation succeeded or not (for example, API Key limit reached). This method requires AccessKey to be set first.
void AddSilver (int amount, Action< bool > onFinished=null) void AddSilver (int amount, Closure onFinished=null)
Adds amount of silver to player's silver balance. You can also bind a function which will be called when operation is finished (optional), which also returns a Boolean if the operation succeeded or not (for example, API Key limit reached). The source of the silver is Sinespace. This method requires AccessKey to be set first.
void TransferSilverFrom (int amount, string reason, int to, Action< bool > onFinished=null) void TransferSilverFrom (int amount, string reason, int to, Closure onFinished=null)
Removes 'amount' of silver from player avatar's balance and sends it to 'to' avatar ID. You can also bind a function which will be called when operation is finished (optional), which also returns a Boolean if the operation succeeded or not (for example, API Key limit reached). This method requires AccessKey to be set first.
string AccessKey set
This API Key needs to be set before any of the SEconomy functions will work.
Function Name |
---|
Property |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
void DeductSilver (int amount, Action< bool > onFinished=null) void DeductSilver (int amount, Closure onFinished=null)
void TransferSilverFrom (int amount, string reason, int to, Action< bool > onFinished=null) void TransferSilverFrom (int amount, string reason, int to, Closure onFinished=null)
void IssueReward (int id, Action< bool > onFinished=null) void IssueReward (int id, Closure onFinished=null)
string AccessKey set
void Authorize (Closure onAuthorized=null, Closure onRejected=null)
Requests access to inventory functions, must be called prior to attempting to access inventory. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
int CountCopiesOfItem (int itemID)
Function Description
void AddToHotbar (int index, int itemID)
Adds the first found instance of itemID to the players hotbar entry at slot 'index'.
void RemoveFromHotbar (int index)
Remove item at slot index from Hotbar
void RequestRefresh ()
Forces a check for external changes to the users inventory, can only be called once every 60 seconds
bool Authorized get
Returns true if player has accepted access authorization request to his inventory
SInventoryItem[] Items get
Returns the array of the users current inventory items
bool IsMemberOf (int groupID)
Whether is a member of this group.
SGroupInfo GetGroupInfo (int groupID)
Get the group info by groupID.
void JoinGroup (int groupID, bool force=false)
Shows player a prompt to join specified group. If force is true, the user will not be shown a prompt. (force parameter is white-label only)
void LeaveGroup (int groupID, bool force=false)
Shows player a prompt to leave specified group. If force is true, the user will not be shown a prompt. (force parameter is white-label only)
SGroupInfo[] Membership get
Return an array with all the groups this player is a member of
void Authorize (Closure onAuthorized=null, Closure onRejected=null) void Authorize (Action onAuthorized=null, Action onRejected=null)
Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.
void LoadProfile (Closure onFinished)
Load the profile of player
SUserProfile ActivePlayerProfile get
Property Description
void StartQuest (int id)
Function Description
int GetQuestStep (int questID)
Function Description
void ResetQuest (int id)
Function Description
void SetQuestStep (int questID, int step)
Function Description
void CompleteQuest (int questID)
Function Description
void AbortQuest (int id)
Function Description
void AwardAchievement (int id)
Function Description
bool HasAchievement (int id)
Function Description
Function Name |
---|
Property Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Function Name |
---|
Property |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Function Name |
---|
Property Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Function Name |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
void Authorize (Closure onAuthorized=null, Closure onRejected=null)
int CountCopiesOfItem (int itemID)
void AddToHotbar (int index, int itemID)
void RemoveFromHotbar (int index)
void RequestRefresh ()
bool Authorized get
SInventoryItem[] Items get
bool IsMemberOf (int groupID)
SGroupInfo GetGroupInfo (int groupID)
void JoinGroup (int groupID, bool force=false)
void LeaveGroup (int groupID, bool force=false)
SGroupInfo[] Membership get
void LoadProfile (Action< SUserProfile > onFinished) void LoadProfile (Closure onFinished)
SUserProfile ActivePlayerProfile get
onFinished
Callback Function
onFinished(SUserProfile) is called once profile is loaded
void (int id)
int (int questID)
void (int id)
void (int questID, int step)
void (int questID)
void (int id)
void (int id)
bool (int id)