Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Changing catch rate number to % capture rate

Elite Diviner
Joined
Dec 23, 2008
Messages
425
Reaction score
15
What's the formula to change the Catch rate (For example: 45 for bulbasaur) to 5.9%?
 
Elite Diviner
Joined
Dec 23, 2008
Messages
425
Reaction score
15
for any specific source? some of these sources have catch rate included in the encounter rate.
This is for the pokemon-arena browser game, there's a table only with the catch rate (example:45) and not with the %
so I'm making a new pokedex that will show the %, but I can't find how to do so..
 
RaGEZONER || Webdevloper
Banned
Joined
Oct 6, 2011
Messages
614
Reaction score
130
Code:
$result = mysql_query("SELECT wild_id, vangbaarheid FROM pokemon_wild WHERE wild_id='".$_GET['pokemon']."'");
	$szamok = mysql_fetch_assoc($result);
	$egesz = 765.7657657657659;
	$egy = $egesz/100;
	$kerdeses_szam = $szamok['vangbaarheid'];
	$eredmeny = $kerdeses_szam/$egy;
	number_format($eredmeny, 2, '.', '');
	$a = $eredmeny;
	$b = 50;
   
	$felkerekites = ceil($a*$b)/$b;
	echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
 
Last edited:
Joined
Jul 29, 2012
Messages
527
Reaction score
71
This is for the pokemon-arena browser game, there's a table only with the catch rate (example:45) and not with the %
so I'm making a new pokedex that will show the %, but I can't find how to do so..

So... jsut add the % in with a string, just like Kiru's code:
Code:
echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
see the % before the <br>?
 
Elite Diviner
Joined
Dec 23, 2008
Messages
425
Reaction score
15
Code:
$result = mysql_query("SELECT wild_id, vangbaarheid FROM pokemon_wild WHERE wild_id='".$_GET['pokemon']."'");
	$szamok = mysql_fetch_assoc($result);
	$egesz = 765.7657657657659;
	$egy = $egesz/100;
	$kerdeses_szam = $szamok['vangbaarheid'];
	$eredmeny = $kerdeses_szam/$egy;
	number_format($eredmeny, 2, '.', '');
	$a = $eredmeny;
	$b = 50;
   
	$felkerekites = ceil($a*$b)/$b;
	echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
Thanks I saw that you gave me it in skype it works perfectly :D

So... jsut add the % in with a string, just like Kiru's code:
Code:
echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
see the % before the <br>?

This is the easy part, Thanks anyway :p
 
Back
Top