What variable contains the number of NewPoints a user has, and how would I subtract from this variable and inject it back into the database whenever a user purchases an item from a shopping page? I do not want to bother with a shop plug-in because those do not suit my needs. Thank you!
+1 on your Reputation. I actually think I will be writing my own plug-in for this.
You can use the newpoints_addpoints(); provided within the plugin file:
if($mybb->input['action'] == 'buy')
{
newpoints_addpoints($mybb->user['uid'], -10);
}
elseif($mybb->input['action'] == 'sell')
{
newpoints_addpoints($mybb->user['uid'], 10);
}
error('No valid action selected.');