Here is a Rules example in Rules export format:
{ "rules_display_userpoints_after_updating_content" : {
"LABEL" : "Display userpoints after updating content",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "userpoints_rules", "rules", "rules_conditional" ],
"ON" : { "node_update" : [] },
"DO" : [
{ "userpoints_rules_get_current_points" : {
"USING" : { "user" : [ "site:current-user" ], "tid" : "all" },
"PROVIDE" : { "loaded_points" : { "total_points" : "Number of points in all categories together" } }
}
},
{ "drupal_message" : { "message" : "You now have [total-points:value] points" } },
{ "CONDITIONAL" : [
{
"IF" : { "NOT data_is" : { "data" : [ "total-points" ], "op" : "\u003C", "value" : "20" } },
"DO" : [
{ "drupal_message" : { "message" : "You have sufficient points (you still have [total-points:value] ...)." } }
]
},
{ "ELSE" : [
{ "drupal_message" : { "message" : "You DO NOT have sufficient points (you only have [total-points:value] ...)." } }
]
}
]
}
]
}
}
It does retrieve, as the very first Rules Action (not Rules Condition!) the current amount of user points of a user. If the amount is at least 20, it will display a message starting with "You have sufficient points ...", otherwise the message starts with "You DO NOT have sufficient points ...".