Jump to content
MakeWebGames

Captcha trainings missions + energy


Iam

Recommended Posts

I am looking for a captcha for the trainings missions. It annoys me that they can click with a bot to become full strength.

Also i would like to know how to edit this line so every time they do a trainings mission, 1 energy point will be used.

 

			print '<div class="suc_msg">You have successfully spent 1 hour of studying the art of fighting!</div>';
			$db->query("UPDATE `users` SET `money` = `money` - ".$cost['learn']." WHERE `userid` = ".$userid);
			$db->query("UPDATE `userstats` SET `intelligence` = ".$intelligence.", `endurance` = ".$endurance.", `reflexive` = ".$reflexive." WHERE `userid` = ".$userid);
Edited by Iam
Link to comment
Share on other sites

Various ways you could tackle the bot issue;

 

  • Store the last train in a session. Check if they last trained within x seconds. If so, kill the training action.
  • Third party CAPTCHA tool
    • There are some awesome ones, which aren't just "type the text" ones - as these can be beaten to an extent.

       

     

In short, integrating a third party CAPTCHA solution is pretty easy. Creating your own is a good idea also (maybe), but robots can bypass them - so it could take a while to ensure bots cannot "read" them and humans can - without lowering user experience, and a third party application is probably the safer option - you don't need to develop it, future updates, ...

For the energy to minus a value after training;

 

print '<div class="suc_msg">You have successfully spent 1 hour of studying the art of fighting!</div>';
$db->query("UPDATE `users` SET `money` = `money` - ".$cost['learn'].", `energy`=`energy`-1 WHERE `userid` = ".$userid);
$db->query("UPDATE `userstats` SET `intelligence` = ".$intelligence.", `endurance` = ".$endurance.", `reflexive` = ".$reflexive." WHERE `userid` = ".$userid);
Edited by sniko
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...