Award currency on new registration
-
Hello,
May be a stupid question but we would like to award a 1000 currency(Essence) sign-up bonus on a new user registration. Usually, this would be set by a nontechnical admin via an interface but I do not see anywhere they can set this? Is this only able to get set through the API and/or post scripts? My admins don't know JSONThanks,
Chris -
@Chris-Brooks said in Award currency on new registration:
ward a 1000 currency(Essenc
Hi Chris,
There are two ways to do this.
#1 - if you're using our XP system, you could reward the user 1000 Essence for achieving level 1 (which assumably has a requirement of 0 XP points)
#2 - Otherwise, you can register a script against the Authentication Success API hook (service = Authenticate, Operation = Authenticate, Pre/Post = Post).
In your script, check to see if the newUser flag is set to "true". <- warning, it's a string! (darn legacy)
If it is, award the user the 1000 Essense.
General info on writing API hooks here - https://getbraincloud.com/apidocs/apiref/#cc-ccscripts-apihooks
Hope that helps!
Paul.
-
@Paul-Winterhalder Option 1 works! The game doesn't have levels so everyone would be level one but the admins can simply set up the initial reward for level 1 and we are good to go. A bit hokey but effective.
Thank you,
Chris -
Happy to help!
Paul.