Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function train($stat,$effort,$userid) {
- $user=$this->db->query("SELECT * FROM willofth_neenja.wotn_user JOIN willofth_neenja.wotn_stats ON `user_id` = `stats_id` WHERE `user_id` = '$userid'");
- if ((($stat=='strength') OR ($stat=='guard') OR ($stat=='accuracy')) AND ($user['stats_stamina']/10 < $effort)) {
- echo "<font color=\"red\"><strong> Not enough stamina to train!</strong></font>";
- return false;
- } elseif ((($stat=='willpower') OR ($stat=='intelligence') OR ($stat=='agility')) AND ($user['stats_chakra']/10 < $effort)) {
- echo "<font color=\"red\"><strong> Not enough chakra to train!</strong></font>";
- return false;
- } else {
- switch ($stat) {
- case 'strength':
- break;
- case 'guard':
- break;
- case 'accuracy':
- break;
- case 'willpower':
- break;
- case 'intelligence':
- break;
- case 'agility':
- break;
- default:
- echo "<font color=\"red\"><strong>You need to select something to train.</strong></font>";
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement