ID : 123 ); $achievement_title = ( $achievement ? $achievement->post_title : __( 'First Badge', 'gamipress' ) ); $achievement_singular = ( $achievement && isset( $achievements_types[$achievement->post_type] ) ? $achievements_types[$achievement->post_type]['singular_name'] : __( 'Badge', 'gamipress' ) ); $rank = gamipress_ai_assistant_get_random_post( array_keys( $rank_types ) ); $rank_id = ( $rank ? $rank->ID : 123 ); $rank_title = ( $rank ? $rank->post_title : __( 'Beginner', 'gamipress' ) ); $rank_singular = ( $rank && isset( $rank_types[$rank->post_type] ) ? $rank_types[$rank->post_type]['singular_name'] : __( 'Rank', 'gamipress' ) ); $user = wp_get_current_user(); $user_first = $user->user_login; $user_email = $user->user_email; $user_id = $user->ID; $abilities = array( 'suggest-gamification' => array( 'label' => __( 'Suggest Configurations', 'gamipress' ), 'icon' => 'gamipress', 'desc' => __( 'I can suggest, design and create all gamification elements for GamiPress.', 'gamipress' ), 'prompts' => array( sprintf( __( 'Suggest 5 badges based on %1$s activities and create them as %2$s', 'gamipress' ), gamipress_ai_assistant_get_random_plugins( 2 ), gamipress_ai_assistant_get_random_plural( $achievements_types, __( 'badges', 'gamipress' ) ), ), sprintf( __( 'Generate a points type with 3 awards and 2 deducts based on %1$s activities', 'gamipress' ), gamipress_ai_assistant_get_random_plugins( 1 ), ), sprintf( __( 'Set up 5 progressive %1$s based on %2$s thresholds that increase by 100', 'gamipress' ), gamipress_ai_assistant_get_random_plural( $rank_types, __( 'ranks', 'gamipress' ) ), gamipress_ai_assistant_get_random_singular( $points_types, __( 'point', 'gamipress' ) ), ), ), ), 'create-types' => array( 'label' => __( 'Create New Types', 'gamipress' ), 'icon' => 'heart', 'desc' => __( 'I\'m able to create new types (points, achievements and ranks).', 'gamipress' ) . ' ' . __( 'For points types, I can also define points awards and deductions in the same prompt.', 'gamipress' ) , 'prompts' => array( sprintf( __( 'Add the "Points" points type with 3 awards based on %1$s', 'gamipress' ), gamipress_ai_assistant_get_random_plugins( 1 ), ), __( 'Create the "Badge" achievement type', 'gamipress' ), __( 'Add a rank type named "Rank"', 'gamipress' ), ), ), 'create-achievements-ranks' => array( 'label' => __( 'Set Up Achievements & Ranks', 'gamipress' ), 'icon' => 'admin-tools', 'desc' => __( 'I can design, create and configure new achievements & ranks for your site.', 'gamipress' ), 'prompts' => array( sprintf( __( 'Create the %1$s "Early Bird" given for logging 5 times', 'gamipress' ), gamipress_ai_assistant_get_random_singular( $achievements_types, __( 'badge', 'gamipress' ) ), ), sprintf( __( 'Create a %1$s for visiting the site 3 times and commenting on %2$s', 'gamipress' ), gamipress_ai_assistant_get_random_singular( $rank_types, __( 'rank', 'gamipress' ) ), __( 'Sample Page', 'gamipress' ), ), ), ), 'create-points-awards-deducts' => array( 'label' => __( 'Add Points Rules', 'gamipress' ), 'icon' => 'flag', 'desc' => __( 'I can add new rules to award and deduct points to your points types.', 'gamipress' ), 'prompts' => array( sprintf( __( 'Add 2 awards based on %1$s to %2$s', 'gamipress' ), gamipress_ai_assistant_get_random_plugin(), gamipress_ai_assistant_get_random_plural( $points_types, __( 'points', 'gamipress' ) ), ), sprintf( __( 'New rule: Deduct 25 %1$s for publishing a new post', 'gamipress' ), gamipress_ai_assistant_get_random_plural( $points_types, __( 'points', 'gamipress' ) ), $user_first, ), ), ), 'create-requirements' => array( 'label' => __( 'Set Up Requirements', 'gamipress' ), 'icon' => 'rank', 'desc' => __( 'I can add new requirements to achievements and ranks.', 'gamipress' ), 'prompts' => array( sprintf( __( 'Add a step to "%1$s" %2$s for log in 5 times', 'gamipress' ), $achievement_title, $achievement_singular, ), sprintf( __( 'New requirement to "%1$s" %2$s: Earn 100 %3$s', 'gamipress' ), $rank_title, $rank_singular, gamipress_ai_assistant_get_random_plural( $points_types, __( 'points', 'gamipress' ) ), ), sprintf( __( 'Set up the %1$s "%2$s" with 3 steps based on %3$s', 'gamipress' ), $achievement_singular, $achievement_title, gamipress_ai_assistant_get_random_plugin(), ), ), ), 'award-deduct-points' => array( 'label' => __( 'Award/Deduct Points', 'gamipress' ), 'icon' => 'star-filled', 'desc' => __( 'I can update your users balance and register the movement on user earnings.', 'gamipress' ), 'prompts' => array( sprintf( __( 'Award 10 %1$s to %2$s for commenting', 'gamipress' ), gamipress_ai_assistant_get_random_plural( $points_types, __( 'points', 'gamipress' ) ), $user_first, ), sprintf( __( 'Deduct 10 %1$s to %2$s without register on earnings', 'gamipress' ), gamipress_ai_assistant_get_random_plural( $points_types, __( 'points', 'gamipress' ) ), $user_first, ), ), ), 'award-revoke-achievements-ranks' => array( 'label' => __( 'Award/Revoke Achievements & Ranks', 'gamipress' ), 'icon' => 'awards', 'desc' => __( 'I can manage your users earnings easily.', 'gamipress' ), 'prompts' => array( sprintf( __( 'Award the %1$s "%2$s" to %3$s', 'gamipress' ), $achievement_singular, $achievement_title, $user_first, ), sprintf( __( 'Revoke the %1$s "%2$s" to %3$s', 'gamipress' ), $rank_singular, $rank_title, $user_first, ), ), ), ); $first_ability = array_keys( $abilities )[0]; ?>