Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. public function train($stat,$effort,$userid) {
  2. $user=$this->db->query("SELECT * FROM willofth_neenja.wotn_user JOIN willofth_neenja.wotn_stats ON `user_id` = `stats_id` WHERE `user_id` = '$userid'");
  3. if ((($stat=='strength') OR ($stat=='guard') OR ($stat=='accuracy')) AND ($user['stats_stamina']/10 < $effort)) {
  4. echo "<font color=\"red\"><strong> Not enough stamina to train!</strong></font>";
  5. return false;
  6. } elseif ((($stat=='willpower') OR ($stat=='intelligence') OR ($stat=='agility')) AND ($user['stats_chakra']/10 < $effort)) {
  7. echo "<font color=\"red\"><strong> Not enough chakra to train!</strong></font>";
  8. return false;
  9. } else {
  10.  
  11. switch ($stat) {
  12. case 'strength':
  13. break;
  14. case 'guard':
  15. break;
  16. case 'accuracy':
  17. break;
  18. case 'willpower':
  19. break;
  20. case 'intelligence':
  21. break;
  22. case 'agility':
  23. break;
  24. default:
  25. echo "<font color=\"red\"><strong>You need to select something to train.</strong></font>";
  26. break;
  27.  
  28. }
  29.  
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement